openc3-cosmos-tool-admin 6.8.1 → 6.9.1

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 (161) hide show
  1. checksums.yaml +4 -4
  2. data/tools/admin/ArrayWidget-DLfNWDzN-e5dda102920cdc58df21.js +2 -0
  3. data/tools/admin/ArrayplotWidget-CoRsUxHG-9f96a78d35484babbcc2.js +1 -0
  4. data/tools/admin/BarColumn-DHP-zQ4R-71e3fbbd9eaa015f859d.js +1 -0
  5. data/tools/admin/BlockWidget-BmHSFvOq-1d1d3a1a21d0232d3d25.js +2 -0
  6. data/tools/admin/ButtonWidget-C3ZWRjZZ-cb9cd7aecb9f8bb23ec8.js +2 -0
  7. data/tools/admin/CanvasWidget-CL-XzPF4-2fbb6ee544800ad39962.js +1 -0
  8. data/tools/admin/CanvasdotWidget-D8Y9DgVE-ca03cd798c694a9f76da.js +1 -0
  9. data/tools/admin/CanvasimageWidget-DHSGK_tD-958e8d8c0d7a25a9a931.js +1 -0
  10. data/tools/admin/CanvasimagevalueWidget-Btt_fQfC-2c7d4bdcfc3c850193d5.js +1 -0
  11. data/tools/admin/CanvaslabelWidget-BF_8RTjv-988781975173716c6752.js +1 -0
  12. data/tools/admin/CanvaslabelvalueWidget-scbwaujI-5e58478e5cd3f15189a1.js +1 -0
  13. data/tools/admin/CanvaslineWidget-gRvm_-TT-8463efc10e7e5f475e6d.js +1 -0
  14. data/tools/admin/CanvaslinevalueWidget-CljziRek-3f688369236ad348e0d7.js +1 -0
  15. data/tools/admin/CheckbuttonWidget-BOabI_jE-f9701442b0a6ee763674.js +1 -0
  16. data/tools/admin/ComboboxWidget-BLXNYFiY-fb0d798e48d988bfc2fa.js +1 -0
  17. data/tools/admin/DateWidget-BTqLCtLS-485bd9a637881db50566.js +1 -0
  18. data/tools/admin/DetailsDialog-BNCS3QAe-6cb0ae8e55ec14871521.js +1 -0
  19. data/tools/admin/DynamicWidget-CfMtj7H8-adb5c16912a8cc73444e.js +1 -0
  20. data/tools/admin/FormatvalueWidget-CLYx8qbg-7c96f196e42c1f3467cd.js +1 -0
  21. data/tools/admin/Graph-BliBYJxD-12dab47709e511c35275.js +1 -0
  22. data/tools/admin/GraphWidget-Cb6Ozf54-f301ffe4b81faab7f209.js +1 -0
  23. data/tools/admin/HorizontalWidget-AY2M01qP-dcb248d4557a94df6bc9.js +1 -0
  24. data/tools/admin/HorizontalboxWidget-2MEKvq_C-3f613b3bc4a7e73b0016.js +1 -0
  25. data/tools/admin/HorizontallineWidget-DgpOPA7q-9990fdf6559340723255.js +1 -0
  26. data/tools/admin/IframeWidget-UKKUl7k5-327adf87e2effc5fe229.js +1 -0
  27. data/tools/admin/ImageLoader-C-CIL4YD-b538496d655832654258.js +1 -0
  28. data/tools/admin/ImageviewerWidget-DhuQH5Io-201c0147cfdd171f8fb0.js +1 -0
  29. data/tools/admin/InterfacesTab-Dq3oAKqz-f2fd85c98880ee9ace58.js +1 -0
  30. data/tools/admin/LabelWidget-SO9zqcNN-42beb86aa876f0d83fa6.js +1 -0
  31. data/tools/admin/LabelledWidget-DWoM5AJ5-a7ceb818d3ba46de3cc3.js +1 -0
  32. data/tools/admin/LabelprogressbarWidget-D3vnkvQZ-b33a1b6faa99b0af5ace.js +1 -0
  33. data/tools/admin/LabelsparklineWidget-DO0T-Jot-577ba59d876076f4fdff.js +1 -0
  34. data/tools/admin/LabelvalueWidget-B6BbNFnk-51a0aef39666ca5f3c98.js +1 -0
  35. data/tools/admin/LabelvaluedescWidget-CxfL-H9C-956accb49897f765ab83.js +1 -0
  36. data/tools/admin/LabelvaluelimitsbarWidget-BT5k9mHv-1275978c2fd98de217d7.js +1 -0
  37. data/tools/admin/LabelvaluelimitscolumnWidget-DUbmxh4p-45ec5740e448af4235c3.js +1 -0
  38. data/tools/admin/LabelvaluerangebarWidget-DexAc2UB-4d48398c0e41cbb046a8.js +1 -0
  39. data/tools/admin/Layout-Dd6dRf3R-887413ce3863101360d5.js +1 -0
  40. data/tools/admin/LedWidget-D1RwHb_V-a9b7d3265fd1aee98578.js +1 -0
  41. data/tools/admin/LimitsbarWidget-ClOmoV50-61ed5764d851e804cace.js +1 -0
  42. data/tools/admin/LimitscolorWidget-CBUoEYKp-e993ee30cabee34bbdd0.js +1 -0
  43. data/tools/admin/LimitscolumnWidget-hsHkmY-_-c48e5f428df7da0bed22.js +1 -0
  44. data/tools/admin/LinegraphWidget-CXrKtxOo-b365bcb5db673346c905.js +1 -0
  45. data/tools/admin/MatrixbycolumnsWidget-CsogVU9c-6ed1a295d7136445b9eb.js +1 -0
  46. data/tools/admin/MicroservicesTab-DzEvbxlM-d1318f6aefa06ed61d37.js +1 -0
  47. data/tools/admin/OutputDialog-7M4L50tA-4d8bb8551f214ac0b862.js +1 -0
  48. data/tools/admin/PackagesTab-N4SD1Pxj-58779e5bc07cf0321e09.js +1 -0
  49. data/tools/admin/PluginsTab-C7PH2Wym-860a289fc08b19a3a34a.js +5 -0
  50. data/tools/admin/ProgressbarWidget-CO6CEkxP-aa9097ef0634366583d6.js +1 -0
  51. data/tools/admin/RadiobuttonWidget-DrxUclws-14e36b68c13972132456.js +1 -0
  52. data/tools/admin/RadiogroupWidget-DN9C38cg-b40b88eb8f6a001bf8eb.js +1 -0
  53. data/tools/admin/RangebarWidget-5uQTfLMP-a066e0c203198215bb39.js +1 -0
  54. data/tools/admin/RedisTab-Cyrr_g9k-71dde9352231b057d343.js +1 -0
  55. data/tools/admin/RollupWidget-B0DCULnu-ae9320088f6cc1bd019b.js +1 -0
  56. data/tools/admin/RoutersTab-BAfpG8k3-9e3ada931881ddb91d96.js +1 -0
  57. data/tools/admin/ScrollwindowWidget-BOkZQgtf-5238338c7af7cf429b07.js +1 -0
  58. data/tools/admin/SecretsTab-D5RxHYVp-85d671ddd7e3c3854aff.js +1 -0
  59. data/tools/admin/SettingsTab-CKGQEwd_-4bb1f250c177aef622b1.js +2 -0
  60. data/tools/admin/SignalWidget-Cis0Xkea-ca8be270511647909b11.js +1 -0
  61. data/tools/admin/SimpleTextDialog-D2mEDvGY-bc7c7ff7fc43c9a6b3b5.js +1 -0
  62. data/tools/admin/SpacerWidget-CLcqC2Qk-7a5e4b687c662cd5cfaf.js +1 -0
  63. data/tools/admin/SparklineWidget-CTp83eZ--ce6ee4faac034e6b5e14.js +1 -0
  64. data/tools/admin/TabbookWidget-uucd-zsX-d82ce4e8e40e83291fd6.js +1 -0
  65. data/tools/admin/TargetsTab-CM4ABe5y-afd5cde7a2299325b130.js +1 -0
  66. data/tools/admin/TextboxWidget-C2n38ti5-785c5c28db2a8d1f7a43.js +1 -0
  67. data/tools/admin/TextfieldWidget--HTv9ddk-e21c35eaf43cbc82e6c6.js +1 -0
  68. data/tools/admin/TimeWidget-CPNVZaUM-642993622fb28ab114da.js +1 -0
  69. data/tools/admin/TitleWidget-Cp0cb6V8-dd7a7125d73e92b9445e.js +1 -0
  70. data/tools/admin/ToolsTab-DGjyBWkp-78afb2c1f2a66aacb366.js +6 -0
  71. data/tools/admin/VWidget-DQGJRgAk-7b045b0f559a9315f4ff.js +1 -0
  72. data/tools/admin/ValueWidget-Bk1RFjks-cf3eac099ae59ca39db8.js +1 -0
  73. data/tools/admin/ValuelimitsbarWidget-C0HIBYh2-8b1d7333204dfad9047b.js +1 -0
  74. data/tools/admin/ValuelimitscolumnWidget-BTT90uyX-a30c6d2f4086e52a477f.js +1 -0
  75. data/tools/admin/ValuerangebarWidget-CcQw_XK9-ad2b7851b35260b5e13d.js +1 -0
  76. data/tools/admin/VerticalWidget-CNtFQv3R-60f2084f54c114d2945a.js +1 -0
  77. data/tools/admin/VerticalboxWidget-Yxmz1SnU-aeee73a1a8be56267bcb.js +1 -0
  78. data/tools/admin/Widget-LsyjS7ZS-cb641f7a8059edf8be8f.js +1 -0
  79. data/tools/admin/main-81d6c06ada3eed99ae7f.js +1509 -0
  80. data/tools/admin/main.js +1 -1
  81. data/tools/admin/settings-DCxXjkio-a694e1ee5ad29e564bfa.js +1 -0
  82. metadata +81 -81
  83. data/tools/admin/ArrayWidget-FGjLmPfG-44fcda8c1a58ea6170ae.js +0 -2
  84. data/tools/admin/ArrayplotWidget-Cfo18TYm-5bd2712eb1c8ad56f585.js +0 -1
  85. data/tools/admin/BarColumn-BuJ6MTYG-e6baf9cd4e004a6d2c77.js +0 -1
  86. data/tools/admin/BlockWidget-B_JwY8-N-929823088b2dc2a31061.js +0 -2
  87. data/tools/admin/ButtonWidget-Cd4M3aBD-729dbae240cffee578e0.js +0 -2
  88. data/tools/admin/CanvasWidget-CpKdOgTG-72dfb48d50386b283e48.js +0 -1
  89. data/tools/admin/CanvasdotWidget-zYbI5LAw-9f238e2bc2f57d73642c.js +0 -1
  90. data/tools/admin/CanvasimageWidget--ORQEPj6-9f154109b61ab23337f0.js +0 -1
  91. data/tools/admin/CanvasimagevalueWidget-CtAtYHRm-e6fee91dd3784883d10c.js +0 -1
  92. data/tools/admin/CanvaslabelWidget-DWoROb6o-5ee30233a32883e5d14e.js +0 -1
  93. data/tools/admin/CanvaslabelvalueWidget-A4UbtwEc-ee2d0b455a50f84898d0.js +0 -1
  94. data/tools/admin/CanvaslineWidget-BBGi0nrb-e4383db5b68f5bc2031a.js +0 -1
  95. data/tools/admin/CanvaslinevalueWidget-C_9OkL7f-f1b4e56bc8baf58dd2ba.js +0 -1
  96. data/tools/admin/CheckbuttonWidget-CTJg8Ypg-50079f5903e15875b7b9.js +0 -1
  97. data/tools/admin/ComboboxWidget-DWiMZZk8-a00f8f7686c13682415b.js +0 -1
  98. data/tools/admin/DateWidget-C7GSh68_-84a7616e60c60f1b3f2e.js +0 -1
  99. data/tools/admin/DetailsDialog-B2l0BNc2-3107118d0513dc614cc7.js +0 -1
  100. data/tools/admin/DynamicWidget-CfMtj7H8-de373d40d9a1f4955294.js +0 -1
  101. data/tools/admin/FormatvalueWidget-CZJdsUAq-f13bb63ba261ce588aa0.js +0 -1
  102. data/tools/admin/Graph-DZBpdSgR-278780d2da2f41d54751.js +0 -1
  103. data/tools/admin/GraphWidget-CHm4bhMI-d4ab303c2a4fbe006680.js +0 -1
  104. data/tools/admin/HorizontalWidget-B2skpV1m-fd9cfc52e14eb0bc2d46.js +0 -1
  105. data/tools/admin/HorizontalboxWidget-BI0WZP5M-f47c09f349a1cfc189d3.js +0 -1
  106. data/tools/admin/HorizontallineWidget-AmxVeXcU-56e0d515ccd6a5d2cdca.js +0 -1
  107. data/tools/admin/IframeWidget-DcqRMhyW-cfcc4a02706137392581.js +0 -1
  108. data/tools/admin/ImageLoader-ly4zoGpO-2469fa5966dc7a1db434.js +0 -1
  109. data/tools/admin/ImageviewerWidget-cmDHcmW4-52417b688beecab4390f.js +0 -1
  110. data/tools/admin/InterfacesTab-BSCFzmW1-fe7971beba801c25eaad.js +0 -1
  111. data/tools/admin/LabelWidget-Bemw8Erq-ae1e6452ba4011265561.js +0 -1
  112. data/tools/admin/LabelledWidget-Cb7EvtUG-485388a48af14d741d82.js +0 -1
  113. data/tools/admin/LabelprogressbarWidget-qYgrGqLY-fda38bbf4ffea980a08c.js +0 -1
  114. data/tools/admin/LabelsparklineWidget-CMklq9-f-80e9864028d4e67e8f96.js +0 -1
  115. data/tools/admin/LabelvalueWidget-NjCMgiYL-2b1ef2c3155d4f49e9c0.js +0 -1
  116. data/tools/admin/LabelvaluedescWidget-Dflulqm7-e879f51ba8c998491312.js +0 -1
  117. data/tools/admin/LabelvaluelimitsbarWidget-M34NDk2S-a39d9a63d8a45f8bac39.js +0 -1
  118. data/tools/admin/LabelvaluelimitscolumnWidget-Cchaw_-k-21147c10274d26659d9c.js +0 -1
  119. data/tools/admin/LabelvaluerangebarWidget-7pEykAm3-e75263936f2183a05414.js +0 -1
  120. data/tools/admin/Layout-BNvQKlyy-3236ac6ad264fa10d886.js +0 -1
  121. data/tools/admin/LedWidget-_EA7ZKM8-468a5541579465eddb48.js +0 -1
  122. data/tools/admin/LimitsbarWidget-DdoQf46y-d7909ec7a332d2ceede2.js +0 -1
  123. data/tools/admin/LimitscolorWidget-Cv0umnVo-8586cd8761a9c9e09595.js +0 -1
  124. data/tools/admin/LimitscolumnWidget-CnCQtxim-eb57b696b57c671da90b.js +0 -1
  125. data/tools/admin/LinegraphWidget-ekyQoR7x-4b3fc16b7a619005f4fb.js +0 -1
  126. data/tools/admin/MatrixbycolumnsWidget-IBUcGNF7-b4c40fa3ba17c6de9b9d.js +0 -1
  127. data/tools/admin/MicroservicesTab-CUqp5uFH-6974f5fa8961c4dbd226.js +0 -1
  128. data/tools/admin/OutputDialog-wBy-sg3k-44d343cf4df6f6e77944.js +0 -1
  129. data/tools/admin/PackagesTab-BSVPTVe7-df0b500a72b70d9fc8f0.js +0 -1
  130. data/tools/admin/PluginsTab-DShjzJVP-57166351df2b8151c0f3.js +0 -5
  131. data/tools/admin/ProgressbarWidget-CnveFZVh-eeafad9f78cac9edbe77.js +0 -1
  132. data/tools/admin/RadiobuttonWidget-hWLrCb8W-92f15708234755c89d74.js +0 -1
  133. data/tools/admin/RadiogroupWidget-DK1fphkh-ce318f0563de0c739a98.js +0 -1
  134. data/tools/admin/RangebarWidget-vspY8CGV-369d2545270562f32911.js +0 -1
  135. data/tools/admin/RedisTab-B28s52_T-cb8984e5a59c843f562d.js +0 -1
  136. data/tools/admin/RollupWidget-07pNcXQV-ef87fd5e3fe3a507e537.js +0 -1
  137. data/tools/admin/RoutersTab-DX_r6FEQ-6a4c40a239b75e6ce631.js +0 -1
  138. data/tools/admin/ScrollwindowWidget-BcbyrYUo-883957a1d8e1d5ad5428.js +0 -1
  139. data/tools/admin/SecretsTab-BNFEqrT1-e67f23fdc7cd0fd3f836.js +0 -1
  140. data/tools/admin/SettingsTab-C4T8ecIZ-613602608dee52cbcd7f.js +0 -2
  141. data/tools/admin/SignalWidget-BDp5sUHj-9b7bdb092fce69b84ffc.js +0 -1
  142. data/tools/admin/SimpleTextDialog-LQJdcAXX-13f4c9397341216c87a5.js +0 -1
  143. data/tools/admin/SpacerWidget-DcOnQ1yI-d6e75fc20c5facdfb73e.js +0 -1
  144. data/tools/admin/SparklineWidget-CVglnlAm-323a88928d7ac4f079e6.js +0 -1
  145. data/tools/admin/TabbookWidget-p51Oa7Ru-74df45116a11340f4a75.js +0 -1
  146. data/tools/admin/TargetsTab-CBagO3CX-3d9410ab4bacd6faa8ec.js +0 -1
  147. data/tools/admin/TextboxWidget-DM-XX97e-be745b584d0bf27cb543.js +0 -1
  148. data/tools/admin/TextfieldWidget-7cYHAgH8-467a69602c44ccfa8076.js +0 -1
  149. data/tools/admin/TimeWidget-EvQJyu6x-ab15784e1530e935e5d1.js +0 -1
  150. data/tools/admin/TitleWidget-6ddfJuqd-5818a07dd81f0018d314.js +0 -1
  151. data/tools/admin/ToolsTab-ClJNvp8z-6364c3b197c5dca67597.js +0 -6
  152. data/tools/admin/VWidget-P-X9ffkl-afe8821fe00c082d6017.js +0 -1
  153. data/tools/admin/ValueWidget-DAUGuQ9f-691cb1a776cd1ba3bb42.js +0 -1
  154. data/tools/admin/ValuelimitsbarWidget-DmLUXw0I-85cf0746e60cd516e18d.js +0 -1
  155. data/tools/admin/ValuelimitscolumnWidget-DDmo8wHJ-2cca5729acb3b3225ea2.js +0 -1
  156. data/tools/admin/ValuerangebarWidget-CbzWSWq3-321e3f31c5610ac80b98.js +0 -1
  157. data/tools/admin/VerticalWidget-BuKinn_c-79df282d86feacb7b7cb.js +0 -1
  158. data/tools/admin/VerticalboxWidget-C0zD5h0O-ae5e104f9b3771f1d13e.js +0 -1
  159. data/tools/admin/Widget-BIXl-Pk5-73a605540046d0272b73.js +0 -1
  160. data/tools/admin/main-a4f4e7cef92e830d29de.js +0 -1508
  161. data/tools/admin/settings-DToCplG_-ca6efbbfb677a1b36d60.js +0 -1
@@ -0,0 +1,1509 @@
1
+ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(fr,nt){"use strict";var Ve,qt,st,Pe,He,nn,Un,Hp,jp,Up,Cn,oi,go,It,Rl,ku,jr,Cs,ia,Wa,Vp,Gp,qp,Kp,Su,Yp,Xp,Zp,Qp,Jp,_u,ef,tf,nf,rf,Au,of,sf;return{setters:[kt=>{Ve=kt.resolveComponent,qt=kt.createBlock,st=kt.openBlock,Pe=kt.withCtx,He=kt.createVNode,nn=kt.createElementBlock,Un=kt.createElementVNode,Hp=kt.useCssVars,jp=kt.defineAsyncComponent,Up=kt.Teleport,Cn=kt.toDisplayString,oi=kt.Fragment,go=kt.renderList,It=kt.createTextVNode,Rl=kt.mergeProps,ku=kt.createSlots,jr=kt.createCommentVNode,Cs=kt.normalizeStyle,ia=kt.h,Wa=kt.withModifiers,Vp=kt.toRaw,Gp=kt.defineComponent,qp=kt.warn,Kp=kt.inject,Su=kt.computed,Yp=kt.shallowRef,Xp=kt.watchEffect,Zp=kt.normalizeClass,Qp=kt.getCurrentInstance,Jp=kt.provide,_u=kt.createApp,ef=kt.withDirectives,tf=kt.vShow},kt=>{nf=kt.createRouter,rf=kt.createWebHistory},kt=>{Au=kt.getMountedApps},kt=>{of=kt.createStore},kt=>{sf=kt.createVuetify}],execute:function(){fr({$:ff,c:SE,e:Md,f:Dr,l:Ln,p:ts,y:sr});var kt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function af(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),t.push.apply(t,r)}return t}function ks(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?af(Object(t),!0).forEach(function(r){lx(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):af(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function lx(n,e,t){return(e=function(r){var d=function(p,g){if(Ss(p)!=="object"||p===null)return p;var b=p[Symbol.toPrimitive];if(b!==void 0){var h=b.call(p,g);if(Ss(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(p)}(r,"string");return Ss(d)==="symbol"?d:String(d)}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Ss(n){return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ss(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var e=function(t){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,d=String(t),p=d.length,g=-1,b="",h=d.charCodeAt(0);++g<p;)(r=d.charCodeAt(g))!=0?b+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":g==0&&p==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+d.charAt(g):d.charAt(g):b+="�";return b};n.CSS||(n.CSS={}),n.CSS.escape=e})(kt);var cx={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function ux(n){if(Ss(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var e=ks(ks({},cx),n);if(!e.Vue&&!e.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!e.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(e.appOptions.el&&typeof e.appOptions.el!="string"&&!(e.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(Ss(e.appOptions.el)));e.createApp=e.createApp||e.Vue&&e.Vue.createApp;var t={};return{bootstrap:hx.bind(null,e,t),mount:dx.bind(null,e,t),unmount:fx.bind(null,e,t),update:px.bind(null,e,t)}}function hx(n){return n.loadRootComponent?n.loadRootComponent().then(function(e){return n.rootComponent=e}):Promise.resolve()}function dx(n,e,t){var r={};return Promise.resolve().then(function(){return function(d,p){return typeof d.appOptions=="function"?d.appOptions(p):Promise.resolve(ks({},d.appOptions))}(n,t).then(function(d){var p;if(t.domElement&&!d.el&&(d.el=t.domElement),d.el)if(typeof d.el=="string"){if(!(p=document.querySelector(d.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(d.el))}else(p=d.el).id||(p.id="single-spa-application:".concat(t.name)),d.el="#".concat(CSS.escape(p.id));else{var g="single-spa-application:".concat(t.name);d.el="#".concat(CSS.escape(g)),(p=document.getElementById(g))||((p=document.createElement("div")).id=g,document.body.appendChild(p))}if(!n.replaceMode&&(d.el=d.el+" .single-spa-container",!p.querySelector(".single-spa-container"))){var b=document.createElement("div");b.className="single-spa-container",p.appendChild(b)}r.domEl=p,d.render||d.template||!n.rootComponent||(d.render=function(f){return f(n.rootComponent)}),d.data||(d.data={});var h=d.data;if(d.data=function(){return ks(ks({},typeof h=="function"?h.call(this,this):h),t)},n.createApp){if(r.vueInstance=n.createApp(d),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,t)).then(function(){return r.root=r.vueInstance.mount(d.el),e[t.name]=r,r.vueInstance});r.root=r.vueInstance.mount(d.el)}else if(r.vueInstance=new n.Vue(d),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,t)).then(function(){return e[t.name]=r,r.vueInstance});return e[t.name]=r,r.vueInstance})})}function px(n,e,t){return Promise.resolve().then(function(){var r=e[t.name],d=ks(ks({},n.appOptions.data||{}),t),p=r.root||r.vueInstance;for(var g in d)p[g]=d[g]})}function fx(n,e,t){return Promise.resolve().then(function(){var r=e[t.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 gx=(n,e)=>{const t=n.__vccOpts||n;for(const[r,d]of e)t[r]=d;return t},mx={};function vx(n,e){const t=Ve("router-view"),r=Ve("v-app");return st(),qt(r,{id:"innerapp"},{default:Pe(()=>[He(t)]),_:1})}const yx=gx(mx,[["render",vx]]),lf=function(n){var e;!n.name!=="NotFound"&&(n.path=`/tools/admin/${n.path.replace(/^\//,"")}`),(e=n.children)==null||e.forEach(lf)},WF="modulepreload",BF=function(n){return"/"+n},zF={},rt=function(e,t,r){let d=Promise.resolve();function p(g){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=g,window.dispatchEvent(b),!b.defaultPrevented)throw g}return d.then(g=>{for(const b of g||[])b.status==="rejected"&&p(b.reason);return e().catch(p)})},eo=fr("d",(n,e)=>{const t=n.__vccOpts||n;for(const[r,d]of e)t[r]=d;return t}),bx="/icons/customIcons.svg",$u={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return bx+"#"+this.icon}}},cf=()=>{Hp(n=>({"259824e2":n.color}))},uf=$u.setup;$u.setup=uf?(n,e)=>(cf(),uf(n,e)):cf;const wx={class:"cosmos-custom-icon"},xx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Cx=["href"];function kx(n,e,t,r,d,p){return st(),nn("span",wx,[(st(),nn("svg",xx,[Un("use",{href:p.iconSrc},null,8,Cx)]))])}const Sx=eo($u,[["render",kx],["__scopeId","data-v-4b6f1199"]]),Ol=6e4,Tu=36e5,_x=1e3,hf=Symbol.for("constructDateFrom");function sr(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&hf in n?n[hf](e):n instanceof Date?new n.constructor(e):new Date(e)}function Ln(n,e){return sr(e||n,n)}let Ax={};function oa(){return Ax}function Jo(n,e){var t,r,d,p;const g=oa(),b=(e==null?void 0:e.weekStartsOn)??((r=(t=e==null?void 0:e.locale)==null?void 0:t.options)==null?void 0:r.weekStartsOn)??g.weekStartsOn??((p=(d=g.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,h=Ln(n,e==null?void 0:e.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 sa(n,e){return Jo(n,{...e,weekStartsOn:1})}function df(n,e){const t=Ln(n,void 0),r=t.getFullYear(),d=sr(t,0);d.setFullYear(r+1,0,4),d.setHours(0,0,0,0);const p=sa(d),g=sr(t,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const b=sa(g);return t.getTime()>=p.getTime()?r+1:t.getTime()>=b.getTime()?r:r-1}function Nl(n){const e=Ln(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function $x(n,...e){const t=sr.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function pf(n,e){const t=Ln(n,void 0);return t.setHours(0,0,0,0),t}function Tx(n,e,t){const[r,d]=$x(void 0,n,e),p=pf(r),g=pf(d),b=+p-Nl(p),h=+g-Nl(g);return Math.round((b-h)/864e5)}function Mx(n,e){const t=df(n),r=sr(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),sa(r)}function Ex(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ff(n){return!(!Ex(n)&&typeof n!="number"||isNaN(+Ln(n)))}function Lx(n,e){const t=Ln(n,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const Ix={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"}},Rx=(n,e,t)=>{let r;const d=Ix[n];return typeof d=="string"?r=d:e===1?r=d.one:r=d.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function Mu(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const Ox={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Nx={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Dx={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fx={date:Mu({formats:Ox,defaultWidth:"full"}),time:Mu({formats:Nx,defaultWidth:"full"}),dateTime:Mu({formats:Dx,defaultWidth:"full"})},Px={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Wx=(n,e,t,r)=>Px[n];function Ba(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let d;if(r==="formatting"&&n.formattingValues){const g=n.defaultFormattingWidth||n.defaultWidth,b=t!=null&&t.width?String(t.width):g;d=n.formattingValues[b]||n.formattingValues[g]}else{const g=n.defaultWidth,b=t!=null&&t.width?String(t.width):n.defaultWidth;d=n.values[b]||n.values[g]}const p=n.argumentCallback?n.argumentCallback(e):e;return d[p]}}const Bx={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hx={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"]},jx={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"]},Ux={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"}},Vx={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"}},Gx=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},qx={ordinalNumber:Gx,era:Ba({values:Bx,defaultWidth:"wide"}),quarter:Ba({values:zx,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ba({values:Hx,defaultWidth:"wide"}),day:Ba({values:jx,defaultWidth:"wide"}),dayPeriod:Ba({values:Ux,defaultWidth:"wide",formattingValues:Vx,defaultFormattingWidth:"wide"})};function za(n){return(e,t={})=>{const r=t.width,d=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],p=e.match(d);if(!p)return null;const g=p[0],b=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(b)?Yx(b,a=>a.test(g)):Kx(b,a=>a.test(g));let f;f=n.valueCallback?n.valueCallback(h):h,f=t.valueCallback?t.valueCallback(f):f;const s=e.slice(g.length);return{value:f,rest:s}}}function Kx(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function Yx(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function Xx(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const d=r[0],p=e.match(n.parsePattern);if(!p)return null;let g=n.valueCallback?n.valueCallback(p[0]):p[0];g=t.valueCallback?t.valueCallback(g):g;const b=e.slice(d.length);return{value:g,rest:b}}}const Zx=/^(\d+)(th|st|nd|rd)?/i,Qx=/\d+/i,Jx={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},e1={any:[/^b/i,/^(a|c)/i]},t1={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},n1={any:[/1/i,/2/i,/3/i,/4/i]},r1={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},i1={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]},o1={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},s1={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]},a1={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},l1={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}},c1={ordinalNumber:Xx({matchPattern:Zx,parsePattern:Qx,valueCallback:n=>parseInt(n,10)}),era:za({matchPatterns:Jx,defaultMatchWidth:"wide",parsePatterns:e1,defaultParseWidth:"any"}),quarter:za({matchPatterns:t1,defaultMatchWidth:"wide",parsePatterns:n1,defaultParseWidth:"any",valueCallback:n=>n+1}),month:za({matchPatterns:r1,defaultMatchWidth:"wide",parsePatterns:i1,defaultParseWidth:"any"}),day:za({matchPatterns:o1,defaultMatchWidth:"wide",parsePatterns:s1,defaultParseWidth:"any"}),dayPeriod:za({matchPatterns:a1,defaultMatchWidth:"any",parsePatterns:l1,defaultParseWidth:"any"})},gf={code:"en-US",formatDistance:Rx,formatLong:Fx,formatRelative:Wx,localize:qx,match:c1,options:{weekStartsOn:0,firstWeekContainsDate:1}};function u1(n,e){const t=Ln(n,void 0);return Tx(t,Lx(t))+1}function mf(n,e){const t=Ln(n,void 0),r=+sa(t)-+Mx(t);return Math.round(r/6048e5)+1}function Eu(n,e){var t,r,d,p;const g=Ln(n,e==null?void 0:e.in),b=g.getFullYear(),h=oa(),f=(e==null?void 0:e.firstWeekContainsDate)??((r=(t=e==null?void 0:e.locale)==null?void 0:t.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((p=(d=h.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,s=sr((e==null?void 0:e.in)||n,0);s.setFullYear(b+1,0,f),s.setHours(0,0,0,0);const a=Jo(s,e),l=sr((e==null?void 0:e.in)||n,0);l.setFullYear(b,0,f),l.setHours(0,0,0,0);const u=Jo(l,e);return+g>=+a?b+1:+g>=+u?b:b-1}function h1(n,e){var t,r,d,p;const g=oa(),b=(e==null?void 0:e.firstWeekContainsDate)??((r=(t=e==null?void 0:e.locale)==null?void 0:t.options)==null?void 0:r.firstWeekContainsDate)??g.firstWeekContainsDate??((p=(d=g.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,h=Eu(n,e),f=sr((e==null?void 0:e.in)||n,0);return f.setFullYear(h,0,b),f.setHours(0,0,0,0),Jo(f,e)}function vf(n,e){const t=Ln(n,e==null?void 0:e.in),r=+Jo(t,e)-+h1(t,e);return Math.round(r/6048e5)+1}function pn(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const es={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return pn(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):pn(t+1,2)},d(n,e){return pn(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return pn(n.getHours()%12||12,e.length)},H(n,e){return pn(n.getHours(),e.length)},m(n,e){return pn(n.getMinutes(),e.length)},s(n,e){return pn(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),d=Math.trunc(r*Math.pow(10,t-3));return pn(d,e.length)}},aa={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yf={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),d=r>0?r:1-r;return t.ordinalNumber(d,{unit:"year"})}return es.y(n,e)},Y:function(n,e,t,r){const d=Eu(n,r),p=d>0?d:1-d;if(e==="YY"){const g=p%100;return pn(g,2)}return e==="Yo"?t.ordinalNumber(p,{unit:"year"}):pn(p,e.length)},R:function(n,e){const t=df(n);return pn(t,e.length)},u:function(n,e){const t=n.getFullYear();return pn(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return pn(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return pn(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return es.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return pn(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const d=vf(n,r);return e==="wo"?t.ordinalNumber(d,{unit:"week"}):pn(d,e.length)},I:function(n,e,t){const r=mf(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):pn(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):es.d(n,e)},D:function(n,e,t){const r=u1(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):pn(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const d=n.getDay(),p=(d-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(p);case"ee":return pn(p,2);case"eo":return t.ordinalNumber(p,{unit:"day"});case"eee":return t.day(d,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(d,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(d,{width:"short",context:"formatting"});case"eeee":default:return t.day(d,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const d=n.getDay(),p=(d-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(p);case"cc":return pn(p,e.length);case"co":return t.ordinalNumber(p,{unit:"day"});case"ccc":return t.day(d,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(d,{width:"narrow",context:"standalone"});case"cccccc":return t.day(d,{width:"short",context:"standalone"});case"cccc":default:return t.day(d,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),d=r===0?7:r;switch(e){case"i":return String(d);case"ii":return pn(d,e.length);case"io":return t.ordinalNumber(d,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const r=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let d;switch(r===12?d=aa.noon:r===0?d=aa.midnight:d=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(d,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(d,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let d;switch(r>=17?d=aa.evening:r>=12?d=aa.afternoon:r>=4?d=aa.morning:d=aa.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(d,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(d,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return es.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):es.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):pn(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):pn(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):es.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):es.s(n,e)},S:function(n,e){return es.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return wf(r);case"XXXX":case"XX":return _s(r);case"XXXXX":case"XXX":default:return _s(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return wf(r);case"xxxx":case"xx":return _s(r);case"xxxxx":case"xxx":default:return _s(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+bf(r,":");case"OOOO":default:return"GMT"+_s(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+bf(r,":");case"zzzz":default:return"GMT"+_s(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return pn(r,e.length)},T:function(n,e,t){return pn(+n,e.length)}};function bf(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),d=Math.trunc(r/60),p=r%60;return p===0?t+String(d):t+String(d)+e+pn(p,2)}function wf(n,e){return n%60===0?(n>0?"-":"+")+pn(Math.abs(n)/60,2):_s(n,e)}function _s(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),d=pn(Math.trunc(r/60),2),p=pn(r%60,2);return t+d+e+p}const xf=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Cf=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},d1=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],d=t[2];if(!d)return xf(n,e);let p;switch(r){case"P":p=e.dateTime({width:"short"});break;case"PP":p=e.dateTime({width:"medium"});break;case"PPP":p=e.dateTime({width:"long"});break;case"PPPP":default:p=e.dateTime({width:"full"});break}return p.replace("{{date}}",xf(r,e)).replace("{{time}}",Cf(d,e))},Lu={p:Cf,P:d1},p1=/^D+$/,f1=/^Y+$/,g1=["D","DD","YY","YYYY"];function kf(n){return p1.test(n)}function Sf(n){return f1.test(n)}function Iu(n,e,t){const r=m1(n,e,t);if(console.warn(r),g1.includes(n))throw new RangeError(r)}function m1(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const v1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,b1=/^'([^]*?)'?$/,w1=/''/g,x1=/[a-zA-Z]/;function ts(n,e,t){var r,d,p,g,b,h,f,s;const a=oa(),l=(t==null?void 0:t.locale)??a.locale??gf,u=(t==null?void 0:t.firstWeekContainsDate)??((d=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:d.firstWeekContainsDate)??a.firstWeekContainsDate??((g=(p=a.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((h=(b=t==null?void 0:t.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,c=Ln(n,t==null?void 0:t.in);if(!ff(c))throw new RangeError("Invalid time value");let m=e.match(y1).map(x=>{const M=x[0];if(M==="p"||M==="P"){const $=Lu[M];return $(x,l.formatLong)}return x}).join("").match(v1).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const M=x[0];if(M==="'")return{isToken:!1,value:C1(x)};if(yf[M])return{isToken:!0,value:x};if(M.match(x1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:x}});l.localize.preprocessor&&(m=l.localize.preprocessor(c,m));const w={firstWeekContainsDate:u,weekStartsOn:i,locale:l};return m.map(x=>{if(!x.isToken)return x.value;const M=x.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Sf(M)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&kf(M))&&Iu(M,e,String(n));const $=yf[M[0]];return $(c,M,l.localize,w)}).join("")}function C1(n){const e=n.match(b1);return e?e[1].replace(w1,"'"):n}var ns=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _f={exports:{}},Af;function k1(){return Af||(Af=1,function(n,e){(function(){var t="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var d=function(s,a,l){if(typeof s!="string"){d.original?d.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(l=a),d.modules[s]||(d.payloads[s]=l,d.modules[s]=null)};d.modules={},d.payloads={};var p=function(s,a,l){if(typeof a=="string"){var u=h(s,a);if(u!=null)return l&&l(),u}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var i=[],c=0,m=a.length;c<m;++c){var w=h(s,a[c]);if(w==null&&g.original)return;i.push(w)}return l&&l.apply(null,i)||!0}},g=function(s,a){var l=p("",s,a);return l==null&&g.original?g.original.apply(this,arguments):l},b=function(s,a){if(a.indexOf("!")!==-1){var l=a.split("!");return b(s,l[0])+"!"+b(s,l[1])}if(a.charAt(0)=="."){var u=s.split("/").slice(0,-1).join("/");for(a=u+"/"+a;a.indexOf(".")!==-1&&i!=a;){var i=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=b(s,a);var l=d.modules[a];if(!l){if(l=d.payloads[a],typeof l=="function"){var u={},i={id:a,uri:"",exports:u,packaged:!0},c=function(w,x){return p(a,w,x)},m=l(c,u,i);u=m||i.exports,d.modules[a]=u,delete d.payloads[a]}l=d.modules[a]=u||l}return l};function f(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(d.original=a.define,a.define=d,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(g.original=a.require,a.require=g,a.require.packaged=!0)}f(t)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(t,r,d){function p(g,b,h){Object.defineProperty(g,b,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||p(String.prototype,"startsWith",function(g,b){return b=b||0,this.lastIndexOf(g,b)===b}),String.prototype.endsWith||p(String.prototype,"endsWith",function(g,b){var h=this;(b===void 0||b>h.length)&&(b=h.length),b-=g.length;var f=h.indexOf(g,b);return f!==-1&&f===b}),String.prototype.repeat||p(String.prototype,"repeat",function(g){for(var b="",h=this;g>0;)g&1&&(b+=h),(g>>=1)&&(h+=h);return b}),String.prototype.includes||p(String.prototype,"includes",function(g,b){return this.indexOf(g,b)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(g),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(g){return Object.keys(g).map(function(b){return g[b]})}),Array.prototype.find||p(Array.prototype,"find",function(g){for(var b=this.length,h=arguments[1],f=0;f<b;f++){var s=this[f];if(g.call(h,s,f,this))return s}}),Array.prototype.findIndex||p(Array.prototype,"findIndex",function(g){for(var b=this.length,h=arguments[1],f=0;f<b;f++){var s=this[f];if(g.call(h,s,f,this))return f}}),Array.prototype.includes||p(Array.prototype,"includes",function(g,b){return this.indexOf(g,b)!=-1}),Array.prototype.fill||p(Array.prototype,"fill",function(g){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),l=arguments[2],u=l===void 0?h:l>>0,i=u<0?Math.max(h+u,0):Math.min(u,h);a<i;)b[a]=g,a++;return b}),Array.of||p(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(t,r,d){t("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(t,r,d){r.deepCopy=function p(g){if(typeof g!="object"||!g)return g;var b;if(Array.isArray(g)){b=[];for(var h=0;h<g.length;h++)b[h]=p(g[h]);return b}if(Object.prototype.toString.call(g)!=="[object Object]")return g;b={};for(var h in g)b[h]=p(g[h]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(t,r,d){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 p=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(p,"")},r.stringTrimRight=function(b){return b.replace(g,"")},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=t("./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(l){f==null&&(f=setTimeout(s,l||h))};return a.delay=function(l){f&&clearTimeout(f),f=setTimeout(s,l||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(t,r,d){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 p=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(p.platform)||["other"])[0].toLowerCase(),b=p.userAgent||"",h=p.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="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(t,r,d){var p=t("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function l(u,i,c){if(typeof u=="string"&&u){var m=document.createTextNode(u);return i&&i.appendChild(m),m}if(!Array.isArray(u))return u&&u.appendChild&&i&&i.appendChild(u),u;if(typeof u[0]!="string"||!u[0]){for(var w=[],x=0;x<u.length;x++){var M=l(u[x],i,c);M&&w.push(M)}return w}var $=document.createElement(u[0]),k=u[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<u.length;x++)l(u[x],$,c);return C==2&&Object.keys(k).forEach(function(R){var N=k[R];R==="class"?$.className=Array.isArray(N)?N.join(" "):N:typeof N=="function"||R=="value"||R[0]=="$"?$[R]=N:R==="ref"?c&&(c[N]=$):R==="style"?typeof N=="string"&&($.style.cssText=N):N!=null&&$.setAttribute(R,N)}),i&&i.appendChild($),$},r.getDocumentHead=function(l){return l||(l=document),l.head||l.getElementsByTagName("head")[0]||l.documentElement},r.createElement=function(l,u){return document.createElementNS?document.createElementNS(u||g,l):document.createElement(l)},r.removeChildren=function(l){l.innerHTML=""},r.createTextNode=function(l,u){var i=u?u.ownerDocument:document;return i.createTextNode(l)},r.createFragment=function(l){var u=l?l.ownerDocument:document;return u.createDocumentFragment()},r.hasCssClass=function(l,u){var i=(l.className+"").split(/\s+/g);return i.indexOf(u)!==-1},r.addCssClass=function(l,u){r.hasCssClass(l,u)||(l.className+=" "+u)},r.removeCssClass=function(l,u){for(var i=l.className.split(/\s+/g);;){var c=i.indexOf(u);if(c==-1)break;i.splice(c,1)}l.className=i.join(" ")},r.toggleCssClass=function(l,u){for(var i=l.className.split(/\s+/g),c=!0;;){var m=i.indexOf(u);if(m==-1)break;c=!1,i.splice(m,1)}return c&&i.push(u),l.className=i.join(" "),c},r.setCssClass=function(l,u,i){i?r.addCssClass(l,u):r.removeCssClass(l,u)},r.hasCssString=function(l,u){var i=0,c;if(u=u||document,c=u.querySelectorAll("style")){for(;i<c.length;)if(c[i++].id===l)return!0}},r.removeElementById=function(l,u){u=u||document,u.getElementById(l)&&u.getElementById(l).remove()};var b,h=[];r.useStrictCSP=function(l){b=l,l==!1?f():h||(h=[])};function f(){var l=h;h=null,l&&l.forEach(function(u){s(u[0],u[1])})}function s(l,u,i){if(!(typeof document>"u")){if(h){if(i)f();else if(i===!1)return h.push([l,u])}if(!b){var c=i;!i||!i.getRootNode?c=document:(c=i.getRootNode(),(!c||c==i)&&(c=document));var m=c.ownerDocument||c;if(u&&r.hasCssString(u,c))return null;u&&(l+=`
2
+ /*# sourceURL=ace/css/`+u+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(l)),u&&(w.id=u),c==m&&(c=r.getDocumentHead(m)),c.insertBefore(w,c.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(l,u){r.buildDom(["link",{rel:"stylesheet",href:l}],r.getDocumentHead(u))},r.scrollbarWidth=function(l){var u=r.createElement("ace_inner");u.style.width="100%",u.style.minWidth="0px",u.style.height="200px",u.style.display="block";var i=r.createElement("ace_outer"),c=i.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",i.appendChild(u);var m=l&&l.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(i);var w=u.offsetWidth;c.overflow="scroll";var x=u.offsetWidth;return w===x&&(x=i.clientWidth),m.removeChild(i),w-x},r.computedStyle=function(l,u){return window.getComputedStyle(l,"")||{}},r.setStyle=function(l,u,i){l[u]!==i&&(l[u]=i)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=p.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,p.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),!p.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(l,u,i){l.style.transform="translate("+Math.round(u)+"px, "+Math.round(i)+"px)"}:r.translate=function(l,u,i){l.style.top=Math.round(i)+"px",l.style.left=Math.round(u)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,r,d){/*
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 p=t("./dom");r.get=function(g,b){var h=new XMLHttpRequest;h.open("GET",g,!0),h.onreadystatechange=function(){h.readyState===4&&b(h.responseText)},h.send(null)},r.loadScript=function(g,b){var h=p.getDocumentHead(),f=document.createElement("script");f.src=g,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(g){var b=document.createElement("a");return b.href=g,b.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,r,d){r.inherits=function(p,g){p.super_=g,p.prototype=Object.create(g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(p,g){for(var b in g)p[b]=g[b];return p},r.implement=function(p,g){r.mixin(p,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,r,d){var p={},g=function(){this.propagationStopped=!0},b=function(){this.defaultPrevented=!0};p._emit=p._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=g),f.preventDefault||(f.preventDefault=b),s=s.slice();for(var l=0;l<s.length&&(s[l](f,this),!f.propagationStopped);l++);if(a&&!f.defaultPrevented)return a(f,this)}},p._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)}},p.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})},p.setDefaultHandler=function(h,f){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[h]){var a=s[h],l=s._disabled_[h];l||(s._disabled_[h]=l=[]),l.push(a);var u=l.indexOf(f);u!=-1&&l.splice(u,1)}s[h]=f},p.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 l=a.indexOf(f);l!=-1&&a.splice(l,1)}}},p.on=p.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},p.off=p.removeListener=p.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)}},p.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=p}),ace.define("ace/lib/report_error",["require","exports","module"],function(t,r,d){r.reportError=function(p,g){var b=new Error(p);b.data=g,typeof console=="object"&&console.error&&console.error(b),setTimeout(function(){throw b})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(t,r,d){var p={"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=p}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(t,r,d){"no use strict";var p=t("./oop"),g=t("./event_emitter").EventEmitter,b=t("./report_error").reportError,h=t("./default_english_messages").defaultEnglishMessages,f={setOptions:function(i){Object.keys(i).forEach(function(c){this.setOption(c,i[c])},this)},getOptions:function(i){var c={};if(i)Array.isArray(i)||(i=Object.keys(i));else{var m=this.$options;i=Object.keys(m).filter(function(w){return!m[w].hidden})}return i.forEach(function(w){c[w]=this.getOption(w)},this),c},setOption:function(i,c){if(this["$"+i]!==c){var m=this.$options[i];if(!m)return s('misspelled option "'+i+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(i,c);m.handlesSet||(this["$"+i]=c),m&&m.set&&m.set.call(this,c)}},getOption:function(i){var c=this.$options[i];return c?c.forwardTo?this[c.forwardTo]&&this[c.forwardTo].getOption(i):c&&c.get?c.get.call(this):this["$"+i]:s('misspelled option "'+i+'"')}};function s(i){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,l,u=function(){function i(){this.$defaultOptions={},a=h,l="dollarSigns"}return i.prototype.defineOptions=function(c,m,w){return c.$options||(this.$defaultOptions[m]=c.$options={}),Object.keys(w).forEach(function(x){var M=w[x];typeof M=="string"&&(M={forwardTo:M}),M.name||(M.name=x),c.$options[M.name]=M,"initialValue"in M&&(c["$"+M.name]=M.initialValue)}),p.implement(c,f),this},i.prototype.resetOptions=function(c){Object.keys(c.$options).forEach(function(m){var w=c.$options[m];"value"in w&&c.setOption(m,w.value)})},i.prototype.setDefaultValue=function(c,m,w){if(!c){for(c in this.$defaultOptions)if(this.$defaultOptions[c][m])break;if(!this.$defaultOptions[c][m])return!1}var x=this.$defaultOptions[c]||(this.$defaultOptions[c]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},i.prototype.setDefaultValues=function(c,m){Object.keys(m).forEach(function(w){this.setDefaultValue(c,w,m[w])},this)},i.prototype.setMessages=function(c,m){a=c,m&&m.placeholders&&(l=m.placeholders)},i.prototype.nls=function(c,m,w){a[c]||(s("No message found for the key '"+c+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+m+"'."),a[m]||s("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=a[c]||a[m]||m;return w&&(l==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(M,$){return $=="$"?"$":w[$]})),l==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(M,$){return w[$]}))),x},i}();u.prototype.warn=s,u.prototype.reportError=b,p.implement(u.prototype,g),r.AppConfig=u}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(t,r,d){d.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(t,r,d){r.isDark=!1,r.cssClass="ace-tm",r.cssText=t("./textmate-css"),r.$id="ace/theme/textmate";var p=t("../lib/dom");p.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(t,r,d){"no use strict";var p=t("./lib/lang"),g=t("./lib/net"),b=t("./lib/dom"),h=t("./lib/app_config").AppConfig;d.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(u){if(!f.hasOwnProperty(u))throw new Error("Unknown config key: "+u);return f[u]},r.set=function(u,i){if(f.hasOwnProperty(u))f[u]=i;else if(this.setDefaultValue("",u,i)==!1)throw new Error("Unknown config key: "+u);u=="useStrictCSP"&&b.useStrictCSP(i)},r.all=function(){return p.copyObject(f)},r.$modes={},r.moduleUrl=function(u,i){if(f.$moduleUrls[u])return f.$moduleUrls[u];var c=u.split("/");i=i||c[c.length-2]||"";var m=i=="snippets"?"/":"-",w=c[c.length-1];if(i=="worker"&&m=="-"){var x=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g");w=w.replace(x,"")}(!w||w==i)&&c.length>1&&(w=c[c.length-2]);var M=f[i+"Path"];return M==null?M=f.basePath:m=="/"&&(i=m=""),M&&M.slice(-1)!="/"&&(M+="/"),M+i+m+w+this.get("suffix")},r.setModuleUrl=function(u,i){return f.$moduleUrls[u]=i};var s=function(u,i){if(u==="ace/theme/textmate"||u==="./theme/textmate")return i(null,t("./theme/textmate"));if(a)return a(u,i);console.error("loader is not configured")},a;r.setLoader=function(u){a=u},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(u,i){var c;if(Array.isArray(u))var m=u[0],w=u[1];else if(typeof u=="string")var w=u;var x=function(M){if(M&&!r.$loading[w])return i&&i(M);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(i),!(r.$loading[w].length>1)){var $=function(){s(w,function(k,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 $();g.loadScript(r.moduleUrl(w,m),$),l()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(M){M.default?x(M.default):x(M)});else{try{c=this.$require(w)}catch{}x(c||r.$loaded[w])}},r.$require=function(u){if(typeof d.require=="function"){var i="require";return d[i](u)}},r.setModuleLoader=function(u,i){r.dynamicModules[u]=i};var l=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"),l=function(){})};r.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,r,d){t("./lib/fixoldbrowsers");var p=t("./config");p.setLoader(function(f,s){t([f],function(a){s(null,a)})});var g=function(){return this||typeof window<"u"&&window}();d.exports=function(f){p.init=b,p.$require=t,f.require=t},b(!0);function b(f){if(!(!g||!g.document)){p.set("packaged",f||t.packaged||d.packaged||g.define&&(void 0).packaged);var s={},a="",l=document.currentScript||document._currentScript,u=l&&l.ownerDocument||document;l&&l.src&&(a=l.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var i=u.getElementsByTagName("script"),c=0;c<i.length;c++){var m=i[c],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,M=0,$=x.length;M<$;M++){var k=x[M];k.name.indexOf("data-ace-")===0&&(s[h(k.name.replace(/^data-ace-/,""))]=k.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"&&p.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(t,r,d){var p=function(){function g(b,h,f,s){this.start={row:b,column:h},this.end={row:f,column:s}}return g.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},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(b,h){return this.compare(b,h)==0},g.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)},g.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},g.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},g.prototype.intersects=function(b){var h=this.compareRange(b);return h==-1||h==0||h==1},g.prototype.isEnd=function(b,h){return this.end.row==b&&this.end.column==h},g.prototype.isStart=function(b,h){return this.start.row==b&&this.start.column==h},g.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)},g.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)},g.prototype.inside=function(b,h){return this.compare(b,h)==0?!(this.isEnd(b,h)||this.isStart(b,h)):!1},g.prototype.insideStart=function(b,h){return this.compare(b,h)==0?!this.isEnd(b,h):!1},g.prototype.insideEnd=function(b,h){return this.compare(b,h)==0?!this.isStart(b,h):!1},g.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},g.prototype.compareStart=function(b,h){return this.start.row==b&&this.start.column==h?-1:this.compare(b,h)},g.prototype.compareEnd=function(b,h){return this.end.row==b&&this.end.column==h?1:this.compare(b,h)},g.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)},g.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 g.fromPoints(s||this.start,f||this.end)},g.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 g.fromPoints(s||this.start,a||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(b){var h=b.documentToScreenPosition(this.start),f=b.documentToScreenPosition(this.end);return new g(h.row,h.column,f.row,f.column)},g.prototype.moveBy=function(b,h){this.start.row+=b,this.start.column+=h,this.end.row+=b,this.end.column+=h},g}();p.fromPoints=function(g,b){return new p(g.row,g.column,b.row,b.column)},p.comparePoints=function(g,b){return g.row-b.row||g.column-b.column},r.Range=p}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,r,d){for(var p=t("./oop"),g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},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,g.PRINTABLE_KEYS[48+h]=""+h,g.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var f=String.fromCharCode(h+32);b["Key"+f.toUpperCase()]=h,g.PRINTABLE_KEYS[h]=f}for(var h=1;h<13;h++)b["F"+h]=111+h,g.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,g.PRINTABLE_KEYS[173]="-";for(var l in g.FUNCTION_KEYS){var u=g.FUNCTION_KEYS[l].toLowerCase();g[u]=parseInt(l,10)}for(var l in g.PRINTABLE_KEYS){var u=g.PRINTABLE_KEYS[l].toLowerCase();g[u]=parseInt(l,10)}p.mixin(g,g.MODIFIER_KEYS),p.mixin(g,g.PRINTABLE_KEYS),p.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,function(){for(var i=["cmd","ctrl","alt","shift"],c=Math.pow(2,i.length);c--;)g.KEY_MODS[c]=i.filter(function(m){return c&g.KEY_MODS[m]}).join("-")+"-"}(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",p.mixin(r,g),r.default=r,r.keyCodeToString=function(i){var c=g[i];return typeof c!="string"&&(c=String.fromCharCode(i)),c.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,d){var p=t("./keys"),g=t("./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 l(M,$,k){this.elem=M,this.type=$,this.callback=k}l.prototype.destroy=function(){i(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=r.addListener=function(M,$,k,C){M.addEventListener($,k,a()),C&&C.$toDestroy.push(new l(M,$,k))},i=r.removeListener=function(M,$,k){M.removeEventListener($,k,a())};r.stopEvent=function(M){return r.stopPropagation(M),r.preventDefault(M),!1},r.stopPropagation=function(M){M.stopPropagation&&M.stopPropagation()},r.preventDefault=function(M){M.preventDefault&&M.preventDefault()},r.getButton=function(M){return M.type=="dblclick"?0:M.type=="contextmenu"||g.isMac&&M.ctrlKey&&!M.altKey&&!M.shiftKey?2:M.button},r.capture=function(M,$,k){var C=M&&M.ownerDocument||document;function R(N){$&&$(N),k&&k(N),i(C,"mousemove",$),i(C,"mouseup",R),i(C,"dragstart",R)}return u(C,"mousemove",$),u(C,"mouseup",R),u(C,"dragstart",R),R},r.addMouseWheelListener=function(M,$,k){u(M,"wheel",function(C){var R=.15,N=C.deltaX||0,I=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=N*R,C.wheelY=I*R;break;case C.DOM_DELTA_LINE:var L=15;C.wheelX=N*L,C.wheelY=I*L;break;case C.DOM_DELTA_PAGE:var B=150;C.wheelX=N*B,C.wheelY=I*B;break}$(C)},k)},r.addMultiMouseDownListener=function(M,$,k,C,R){var N=0,I,L,B,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(A){if(r.getButton(A)!==0?N=0:A.detail>1?(N++,N>4&&(N=1)):N=1,g.isIE){var S=Math.abs(A.clientX-I)>5||Math.abs(A.clientY-L)>5;(!B||S)&&(N=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},$[N-1]||600),N==1&&(I=A.clientX,L=A.clientY)}if(A._clicks=N,k[C]("mousedown",A),N>4)N=0;else if(N>1)return k[C](P[N],A)}Array.isArray(M)||(M=[M]),M.forEach(function(A){u(A,"mousedown",O,R)})};function c(M){return 0|(M.ctrlKey?1:0)|(M.altKey?2:0)|(M.shiftKey?4:0)|(M.metaKey?8:0)}r.getModifierString=function(M){return p.KEY_MODS[c(M)]};function m(M,$,k){var C=c($);if(!k&&$.code&&(k=p.$codeToKeyCode[$.code]||k),!g.isMac&&b){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),b.altGr)if((3&C)!=3)b.altGr=0;else return;if(k===18||k===17){var R=$.location;if(k===17&&R===1)b[k]==1&&(h=$.timeStamp);else if(k===18&&C===3&&R===2){var N=$.timeStamp-h;N<50&&(b.altGr=!0)}}}if(k in p.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&$.location===3&&(M($,C,-k),$.defaultPrevented))){if(g.isChromeOS&&C&8){if(M($,C,k),$.defaultPrevented)return;C&=-9}return!C&&!(k in p.FUNCTION_KEYS)&&!(k in p.PRINTABLE_KEYS)?!1:M($,C,k)}}r.addCommandKeyListener=function(M,$,k){var C=null;u(M,"keydown",function(R){b[R.keyCode]=(b[R.keyCode]||0)+1;var N=m($,R,R.keyCode);return C=R.defaultPrevented,N},k),u(M,"keypress",function(R){C&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),C=null)},k),u(M,"keyup",function(R){b[R.keyCode]=null},k),b||(w(),u(window,"focus",w))};function w(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(M,$){$=$||window;var k="zero-timeout-message-"+x++,C=function(R){R.data==k&&(r.stopPropagation(R),i($,"message",C),M())};u($,"message",C),$.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(M,$){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):M()},$)},r.$idleBlockId=null,r.blockIdle=function(M){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},M||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(M){setTimeout(M,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(t,r,d){var p;d.exports={lineMode:!1,pasteCancelled:function(){return p&&p>Date.now()-50?!0:p=!1},cancel:function(){p=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,r,d){var p=t("../lib/event"),g=t("../config").nls,b=t("../lib/useragent"),h=t("../lib/dom"),f=t("../lib/lang"),s=t("../clipboard"),a=b.isChrome<18,l=b.isIE,u=b.isChrome>63,i=400,c=t("../lib/keys"),m=c.KEY_MODS,w=b.isIOS,x=w?/\s/:/\n/,M=b.isMobile,$=function(){function k(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="",M||(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"}),p.addListener(this.text,"blur",function(I){N.ignoreFocusEvents||(R.onBlur(I),N.$isFocused=!1)},R),p.addListener(this.text,"focus",function(I){if(!N.ignoreFocusEvents){if(N.$isFocused=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}R.onFocus(I),b.isEdge?setTimeout(N.resetSelection.bind(N)):N.resetSelection()}},R),this.$focusScroll=!1,R.on("beforeEndOperation",function(){var I=R.curOp,L=I&&I.command&&I.command.name;if(L!="insertstring"){var B=L&&(I.docChanged||I.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,p.addCommandKeyListener(this.text,function(I,L,B){if(!N.inComposition)return R.onCommandKey(I,L,B)},R),p.addListener(this.text,"select",this.onSelect.bind(this),R),p.addListener(this.text,"input",this.onInput.bind(this),R),p.addListener(this.text,"cut",this.onCut.bind(this),R),p.addListener(this.text,"copy",this.onCopy.bind(this),R),p.addListener(this.text,"paste",this.onPaste.bind(this),R),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&p.addListener(C,"keydown",function(I){if(!(b.isMac&&!I.metaKey||!I.ctrlKey))switch(I.keyCode){case 67:N.onCopy(I);break;case 86:N.onPaste(I);break;case 88:N.onCut(I);break}},R),this.syncComposition=f.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),p.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),R),p.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),R),p.addListener(this.text,"keyup",this.onKeyup.bind(this),R),p.addListener(this.text,"keydown",this.syncComposition.bind(this),R),p.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),R),this.closeTimeout,p.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),R),p.addListener(this.text,"mousedown",function(I){I.preventDefault(),N.onContextMenuClose()},R),p.addListener(R.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),R),p.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),R),w&&this.addIosSelectionHandler(C,R,this.text)}return k.prototype.addIosSelectionHandler=function(C,R,N){var I=this,L=null,B=!1;N.addEventListener("keydown",function(O){L&&clearTimeout(L),B=!0},!0),N.addEventListener("keyup",function(O){L=setTimeout(function(){B=!1},100)},!0);var P=function(O){if(document.activeElement===N&&!(B||I.inComposition||R.$mouseHandler.isMousePressed)&&!I.copied){var A=N.selectionStart,S=N.selectionEnd,D=null,z=0;if(A==0?D=c.up:A==1?D=c.home:S>I.lastSelectionEnd&&I.lastValue[S]==`
167
+ `?D=c.end:A<I.lastSelectionStart&&I.lastValue[A-1]==" "?(D=c.left,z=m.option):A<I.lastSelectionStart||A==I.lastSelectionStart&&I.lastSelectionEnd!=I.lastSelectionStart&&A==S?D=c.left:S>I.lastSelectionEnd&&I.lastValue.slice(0,S).split(`
168
+ `).length>2?D=c.down:S>I.lastSelectionEnd&&I.lastValue[S-1]==" "?(D=c.right,z=m.option):(S>I.lastSelectionEnd||S==I.lastSelectionEnd&&I.lastSelectionEnd!=I.lastSelectionStart&&A==S)&&(D=c.right),A!==S&&(z|=m.shift),D){var U=R.onCommandKey({},z,D);if(!U&&R.commands){D=c.keyCodeToString(D);var K=R.commands.findKeyCommand(z,D);K&&R.execCommand(K)}I.lastSelectionStart=A,I.lastSelectionEnd=S,I.resetSelection("")}}};document.addEventListener("selectionchange",P),R.on("destroy",function(){document.removeEventListener("selectionchange",P)})},k.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},k.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var 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()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},k.prototype.onCut=function(C){this.doCopy(C,!0)},k.prototype.onCopy=function(C){this.doCopy(C,!1)},k.prototype.onPaste=function(C){var R=this.handleClipboardData(C);s.pasteCancelled()||(typeof R=="string"?(R&&this.host.onPaste(R,C),b.isIE&&setTimeout(this.resetSelection),p.preventDefault(C)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(C,R){var N=this,I=this.host.getCopyText();if(!I)return p.preventDefault(C);this.handleClipboardData(C,I)?(w&&(this.resetSelection(I),this.copied=I,setTimeout(function(){N.copied=!1},10)),R?this.host.onCut():this.host.onCopy(),p.preventDefault(C)):(this.copied=!0,this.text.value=I,this.text.select(),setTimeout(function(){N.copied=!1,N.resetSelection(),R?N.host.onCut():N.host.onCopy()}))},k.prototype.handleClipboardData=function(C,R,N){var I=C.clipboardData||window.clipboardData;if(!(!I||a)){var L=l||N?"Text":"text/plain";try{return R?I.setData(L,R)!==!1:I.getData(L)}catch(B){if(!N)return this.handleClipboardData(B,R,!0)}}},k.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var R=this.text.value,N=this.sendText(R,!0);(R.length>i+100||x.test(N)||M&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.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,I=this.text.selectionEnd,L=this.lastSelectionStart,B=this.lastValue.length-this.lastSelectionEnd,P=C,O=C.length-N,A=C.length-I,S=0;L>0&&this.lastValue[S]==C[S];)S++,L--;for(P=P.slice(S),S=1;B>0&&this.lastValue.length-S>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-S]==C[C.length-S];)S++,B--;O-=S-1,A-=S-1;var D=P.length-S+1;if(D<0&&(L=-D,D=0),P=P.slice(0,D),!R&&!P&&!O&&!L&&!B&&!A)return"";this.sendingText=!0;var z=!1;return b.isAndroid&&P==". "&&(P=" ",z=!0),P&&!L&&!B&&!O&&!A||this.commandMode?this.host.onTextInput(P):this.host.onTextInput(P,{extendLeft:L,extendRight:B,restoreStart:O,restoreEnd:A}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=N,this.lastSelectionEnd=I,this.lastRestoreEnd=A,z?`
169
+ `:P},k.prototype.onSelect=function(C){var R=this;if(!this.inComposition){var N=function(I){return I.selectionStart===0&&I.selectionEnd>=R.lastValue.length&&I.value===R.lastValue&&R.lastValue&&I.selectionEnd!==R.lastSelectionEnd};this.copied?this.copied=!1:N(this.text)?(this.host.selectAll(),this.resetSelection()):M&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.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,I=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=N||this.lastSelectionEnd!=I)&&this.text.setSelectionRange(N,I),this.lastSelectionStart=N,this.lastSelectionEnd=I}},k.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var R=0,N=0,I="",L=function(K,X){for(var ee=X,de=1;de<=K-C.rowStart&&de<2*C.numberOfExtraLines+1;de++)ee+=C.host.session.getLine(K-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 A=[],S=this.rowStart;S<=this.rowEnd;S++)A.push(this.host.session.getLine(S));if(I=A.join(`
172
+ `),R=L(P.start.row,P.start.column),N=L(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,I=D+`
173
+ `+I}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+=I.length+1,I=I+`
174
+ `+z}else M&&O>0&&(I=`
175
+ `+I,N+=1,R+=1);I.length>i&&(R<i&&N<i?I=I.slice(0,i):(I=`
176
+ `,R==N?R=N=0:(R=0,N=1)));var U=I+`
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}},k.prototype.setHost=function(C){this.host=C},k.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},k.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var R=this.host.session.selection.cursor.row;C+=g("text-input.aria-label","Cursor at row $0",[R+1])}this.text.setAttribute("aria-label",C)},k.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||u||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 I=[];if(N)for(var L=this.text.parentElement;L&&L.nodeType==1;)I.push(L),L.setAttribute("ace_nocontext","true"),!L.parentElement&&L.getRootNode?L=L.getRootNode().host:L=L.parentElement;this.text.focus({preventScroll:!0}),N&&I.forEach(function(B){B.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=R)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(C){this.inputHandler=C},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},k.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},k.prototype.setCopyWithEmptySelection=function(C){},k.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},k.prototype.moveToMouse=function(C,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 I=this.host.container.getBoundingClientRect(),L=h.computedStyle(this.host.container),B=I.top+(parseInt(L.borderTopWidth)||0),P=I.left+(parseInt(L.borderLeftWidth)||0),O=I.bottom-B-this.text.clientHeight-2,A=function(S){h.translate(N.text,S.clientX-P-2,Math.min(S.clientY-B-2,O))};A(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),b.isWin&&p.capture(this.host.container,A,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k}();r.TextInput=$,r.$setUserAgentForTests=function(k,C){M=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,r,d){var p=t("../lib/useragent"),g=0,b=550,h=function(){function a(l){l.$clickSelection=null;var u=l.editor;u.setDefaultHandler("mousedown",this.onMouseDown.bind(l)),u.setDefaultHandler("dblclick",this.onDoubleClick.bind(l)),u.setDefaultHandler("tripleclick",this.onTripleClick.bind(l)),u.setDefaultHandler("quadclick",this.onQuadClick.bind(l)),u.setDefaultHandler("mousewheel",this.onMouseWheel.bind(l));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(c){l[c]=this[c]},this),l.selectByLines=this.extendSelectionBy.bind(l,"getLineRange"),l.selectByWords=this.extendSelectionBy.bind(l,"getWordRange")}return a.prototype.onMouseDown=function(l){var u=l.inSelection(),i=l.getDocumentPosition();this.mousedownEvent=l;var c=this.editor,m=l.getButton();if(m!==0){var w=c.getSelectionRange(),x=w.isEmpty();(x||m==1)&&c.selection.moveToPosition(i),m==2&&(c.textInput.onContextMenu(l.domEvent),p.isMozilla||l.preventDefault());return}if(this.mousedownEvent.time=Date.now(),u&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(l);return}return this.captureMouse(l),this.startSelect(i,l.domEvent._clicks>1),l.preventDefault()},a.prototype.startSelect=function(l,u){l=l||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(l):u||i.selection.moveToPosition(l),u||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var l,u=this.editor,i=u.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(i);if(c==-1)l=this.$clickSelection.end;else if(c==1)l=this.$clickSelection.start;else{var m=s(this.$clickSelection,i);i=m.cursor,l=m.anchor}u.selection.setSelectionAnchor(l.row,l.column)}u.selection.selectToPosition(i),u.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(l){var u,i=this.editor,c=i.renderer.screenToTextCoordinates(this.x,this.y),m=i.selection[l](c.row,c.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)u=this.$clickSelection.end,(m.end.row!=c.row||m.end.column!=c.column)&&(c=m.start);else if(x==1&&w>=0)u=this.$clickSelection.start,(m.start.row!=c.row||m.start.column!=c.column)&&(c=m.end);else if(w==-1&&x==1)c=m.end,u=m.start;else{var M=s(this.$clickSelection,c);c=M.cursor,u=M.anchor}i.selection.setSelectionAnchor(u.row,u.column)}i.selection.selectToPosition(c),i.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var l=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),u=Date.now();(l>g||u-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(l){var u=l.getDocumentPosition(),i=this.editor,c=i.session,m=c.getBracketRange(u);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=i.selection.getWordRange(u.row,u.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(l){var u=l.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var c=i.getSelectionRange();c.isMultiLine()&&c.contains(u.row,u.column)?(this.$clickSelection=i.selection.getLineRange(c.start.row),this.$clickSelection.end=i.selection.getLineRange(c.end.row).end):this.$clickSelection=i.selection.getLineRange(u.row),this.select()},a.prototype.onQuadClick=function(l){var u=this.editor;u.selectAll(),this.$clickSelection=u.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(l){if(!l.getAccelKey()){l.getShiftKey()&&l.wheelY&&!l.wheelX&&(l.wheelX=l.wheelY,l.wheelY=0);var u=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,c=l.domEvent.timeStamp,m=c-i.t,w=m?l.wheelX/m:i.vx,x=m?l.wheelY/m:i.vy;m<b&&(w=(w+i.vx)/2,x=(x+i.vy)/2);var M=Math.abs(w/x),$=!1;if(M>=1&&u.renderer.isScrollableBy(l.wheelX*l.speed,0)&&($=!0),M<=1&&u.renderer.isScrollableBy(0,l.wheelY*l.speed)&&($=!0),$)i.allowed=c;else if(c-i.allowed<b){var k=Math.abs(w)<=1.5*Math.abs(i.vx)&&Math.abs(x)<=1.5*Math.abs(i.vy);k?($=!0,i.allowed=c):i.allowed=0}if(i.t=c,i.vx=w,i.vy=x,$)return u.renderer.scrollBy(l.wheelX*l.speed,l.wheelY*l.speed),l.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,l,u,i){return Math.sqrt(Math.pow(u-a,2)+Math.pow(i-l,2))}function s(a,l){if(a.start.row==a.end.row)var u=2*l.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var u=l.column-4;else var u=2*l.row-a.start.row-a.end.row;return u<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,r,d){r.preventParentScroll=function(p){p.stopPropagation();var g=p.currentTarget,b=g.scrollHeight>g.clientHeight;b||p.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,r,d){var p=this&&this.__extends||function(){var c=function(m,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,M){x.__proto__=M}||function(x,M){for(var $ in M)Object.prototype.hasOwnProperty.call(M,$)&&(x[$]=M[$])},c(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),g=this&&this.__values||function(c){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&c[m],x=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&x>=c.length&&(c=void 0),{value:c&&c[x++],done:!c}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("./lib/dom");t("./lib/event");var h=t("./range").Range,f=t("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function c(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return c.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},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(m){this.getElement().textContent=m},c.prototype.setHtml=function(m){this.getElement().innerHTML=m},c.prototype.setPosition=function(m,w){var x=this.getElement(),M=x.offsetParent&&x.offsetParent.getBoundingClientRect();x.style.left=m-(M?M.left:0)+"px",x.style.top=w-(M?M.top:0)+"px"},c.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},c.prototype.setTheme=function(m){this.$element.className=s+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},c.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c}(),l=function(){function c(){this.popups=[]}return c.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},c.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},c.prototype.updatePopups=function(){var m,w,x,M;this.popups.sort(function(P,O){return O.priority-P.priority});var $=[];try{for(var k=g(this.popups),C=k.next();!C.done;C=k.next()){var R=C.value,N=!0;try{for(var I=(x=void 0,g($)),L=I.next();!L.done;L=I.next()){var B=L.value;if(this.doPopupsOverlap(B,R)){N=!1;break}}}catch(P){x={error:P}}finally{try{L&&!L.done&&(M=I.return)&&M.call(I)}finally{if(x)throw x.error}}N?$.push(R):R.hide()}}catch(P){m={error:P}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(m)throw m.error}}},c.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),M=w.getElement().getBoundingClientRect();return x.left<M.right&&x.right>M.left&&x.top<M.bottom&&x.bottom>M.top},c}(),u=new l;r.popupManager=u,r.Tooltip=a;var i=function(c){p(m,c);function m(w){w===void 0&&(w=document.body);var x=c.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 M=x.getElement();return M.style.whiteSpace="pre-wrap",M.style.pointerEvents="auto",M.addEventListener("mouseout",x.onMouseOut),M.tabIndex=-1,M.addEventListener("blur",(function(){M.contains(document.activeElement)||this.hide()}).bind(x)),M.addEventListener("wheel",f),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.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)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var M=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||M||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||M||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,M=w.getDocumentPosition(),$=x.session.getLine(M.row);if(M.column==$.length){var k=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(M.row,M.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,M,$){var k=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(u.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 I=this.getElement();I.innerHTML="",I.appendChild(M),I.style.maxHeight="",I.style.display="block";var L=I.clientHeight,B=I.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,O=!0;R.pageY-L<0&&R.pageY<P&&(O=!1),I.style.maxHeight=(O?R.pageY:P)-k+"px",I.style.top=O?"":R.pageY+C.lineHeight+"px",I.style.bottom=O?window.innerHeight-R.pageY+"px":"",I.style.left=Math.min(R.pageX,window.innerWidth-B-k)+"px"}},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){!w&&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,u.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m}(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(t,r,d){var p=this&&this.__extends||function(){var c=function(m,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,M){x.__proto__=M}||function(x,M){for(var $ in M)Object.prototype.hasOwnProperty.call(M,$)&&(x[$]=M[$])},c(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),g=this&&this.__values||function(c){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&c[m],x=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&x>=c.length&&(c=void 0),{value:c&&c[x++],done:!c}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("../lib/dom"),h=t("../lib/event"),f=t("../tooltip").Tooltip,s=t("../config").nls,a=5,l=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=l;function u(c){var m=c.editor,w=m.renderer.$gutterLayer,x=new i(m,!0);c.editor.setDefaultHandler("guttermousedown",function(N){if(!(!m.isFocused()||N.getButton()!=0)){var I=w.getRegion(N);if(I!="foldWidgets"){var L=N.getDocumentPosition().row,B=m.session.selection;if(N.getShiftKey())B.selectTo(L,0);else{if(N.domEvent.detail==2)return m.selectAll(),N.preventDefault();c.$clickSelection=m.selection.getLineRange(L)}return c.setState("selectByLines"),c.captureMouse(N),N.preventDefault()}}});var M,$;function k(){var N=$.getDocumentPosition().row,I=m.session.getLength();if(N==I){var L=m.renderer.pixelToScreenCoordinates(0,$.y).row,B=$.$pos;if(L>m.session.documentToScreenRow(B.row,B.column))return C()}if(x.showTooltip(N),!!x.isOpen)if(m.on("mousewheel",C),m.on("changeSession",C),window.addEventListener("keydown",C,!0),c.$tooltipFollowsMouse)R($);else{var P=$.getGutterRow(),O=w.$lines.get(P);if(O){var A=O.element.querySelector(".ace_gutter_annotation"),S=A.getBoundingClientRect(),D=x.getElement().style;D.left=S.right-a+"px",D.top=S.bottom-l+"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))||(M&&(M=clearTimeout(M)),x.isOpen&&(x.hideTooltip(),m.off("mousewheel",C),m.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(N){x.setPosition(N.x,N.y)}c.editor.setDefaultHandler("guttermousemove",function(N){var I=N.domEvent.target||N.domEvent.srcElement;if(b.hasCssClass(I,"ace_fold-widget")||b.hasCssClass(I,"ace_custom-widget"))return C();x.isOpen&&c.$tooltipFollowsMouse&&R(N),$=N,!M&&(M=setTimeout(function(){M=null,$&&!c.isMousePressed&&k()},50))}),h.addListener(m.renderer.$gutter,"mouseout",function(N){$=null,x.isOpen&&(M=setTimeout(function(){M=null,C(N)},50))},m)}r.GutterHandler=u;var i=function(c){p(m,c);function m(w,x){x===void 0&&(x=!1);var M=c.call(this,w.container)||this;M.id="gt"+ ++m.$uid,M.editor=w,M.visibleTooltipRow;var $=M.getElement();return $.setAttribute("role","tooltip"),$.setAttribute("id",M.id),$.style.pointerEvents="auto",x&&(M.onMouseOut=M.onMouseOut.bind(M),$.addEventListener("mouseout",M.onMouseOut)),M}return m.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},m.prototype.setPosition=function(w,x){var M=window.innerWidth||document.documentElement.clientWidth,$=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),C=this.getHeight();w+=15,x+=15,w+k>M&&(w-=w+k-M),x+C>$&&(x-=20+C),f.prototype.setPosition.call(this,w,x)},Object.defineProperty(m,"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}),m.prototype.showTooltip=function(w){var x,M=this.editor.renderer.$gutterLayer,$=M.$annotations[w],k;$?k={displayText:Array.from($.displayText),type:Array.from($.type)}:k={displayText:[],type:[]};var C=M.session.getFoldLine(w);if(C&&M.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},N={error:1,security:2,warning:3,info:4,hint:5},I,L=w+1;L<=C.end.row;L++)if(M.$annotations[L])for(var B=0;B<M.$annotations[L].text.length;B++){var P=M.$annotations[L].type[B];R[P].push(M.$annotations[L].text[B]),(!I||N[P]<N[I])&&(I=P)}if(["error","security","warning"].includes(I)){var O="".concat(m.annotationsToSummaryString(R)," in folded code.");k.displayText.push(O),k.type.push(I+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var A={error:[],security:[],warning:[],info:[],hint:[]},S=M.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<k.displayText.length;L++){var D=b.createElement("span"),z=b.createElement("span");(x=z.classList).add.apply(x,["ace_".concat(k.type[L]),S]),z.setAttribute("aria-label","".concat(m.annotationLabels[k.type[L].replace("_fold","")].singular)),z.setAttribute("role","img"),z.appendChild(b.createTextNode(" ")),D.appendChild(z),D.appendChild(b.createTextNode(k.displayText[L])),D.appendChild(b.createElement("br")),A[k.type[L].replace("_fold","")].push(D)}var U=this.getElement();b.removeChildren(U),A.error.forEach(function(X){return U.appendChild(X)}),A.security.forEach(function(X){return U.appendChild(X)}),A.warning.forEach(function(X){return U.appendChild(X)}),A.info.forEach(function(X){return U.appendChild(X)}),A.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 K=this.$findLinkedAnnotationNode(w);K&&K.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},m.prototype.$findLinkedAnnotationNode=function(w){var x=this.$findCellByRow(w);if(x){var M=x.element;if(M.childNodes.length>2)return M.childNodes[2]}},m.prototype.$findCellByRow=function(w){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(x){return x.row===w})},m.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)}},m.annotationsToSummaryString=function(w){var x,M,$=[],k=["error","security","warning","info","hint"];try{for(var C=g(k),R=C.next();!R.done;R=C.next()){var N=R.value;if(w[N].length){var I=w[N].length===1?m.annotationLabels[N].singular:m.annotationLabels[N].plural;$.push("".concat(w[N].length," ").concat(I))}}}catch(L){x={error:L}}finally{try{R&&!R.done&&(M=C.return)&&M.call(C)}finally{if(x)throw x.error}}return $.join(", ")},m}(f);i.$uid=0,r.GutterTooltip=i}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,d){var p=t("../lib/event"),g=t("../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(){p.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){p.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 p.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return g.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(t,r,d){var p=t("../lib/dom"),g=t("../lib/event"),b=t("../lib/useragent"),h=200,f=200,s=5;function a(u){var i=u.editor,c=p.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(te){u[te]=this[te]},this),i.on("mousedown",this.onMouseDown.bind(u));var w=i.container,x,M,$,k,C,R,N=0,I,L,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(c),se.setDragImage&&se.setDragImage(c,0,0),setTimeout(function(){i.container.removeChild(c)}),se.clearData(),se.setData("Text",i.session.getTextRange()),L=!0,this.setState("drag")},this.onDragEnd=function(te){if(w.draggable=!1,L=!1,this.setState(null),!i.getReadOnly()){var le=te.dataTransfer.dropEffect;!I&&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 M=te.clientX,$=te.clientY,x||z(),N++,te.dataTransfer.dropEffect=I=de(te),g.preventDefault(te)},this.onDragOver=function(te){if(!(i.getReadOnly()||!ee(te.dataTransfer)))return M=te.clientX,$=te.clientY,x||(z(),N++),K!==null&&(K=null),te.dataTransfer.dropEffect=I=de(te),g.preventDefault(te)},this.onDragLeave=function(te){if(N--,N<=0&&x)return U(),I=null,g.preventDefault(te)},this.onDrop=function(te){if(R){var le=te.dataTransfer;if(L)switch(I){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(),I=null}return U(),g.preventDefault(te)}},g.addListener(w,"dragstart",this.onDragStart.bind(u),i),g.addListener(w,"dragend",this.onDragEnd.bind(u),i),g.addListener(w,"dragenter",this.onDragEnter.bind(u),i),g.addListener(w,"dragover",this.onDragOver.bind(u),i),g.addListener(w,"dragleave",this.onDragLeave.bind(u),i),g.addListener(w,"drop",this.onDrop.bind(u),i);function A(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:M,y:$};else{var Ae=l(O.x,O.y,M,$);Ae>s?P=null:se-P>=f&&(i.renderer.scrollCursorIntoView(),P=null)}}function S(te,le){var se=Date.now(),ue=i.renderer.layerConfig.lineHeight,me=i.renderer.layerConfig.characterWidth,Ae=i.renderer.scroller.getBoundingClientRect(),Te={x:{left:M-Ae.left,right:Ae.right-M},y:{top:$-Ae.top,bottom:Ae.bottom-$}},Me=Math.min(Te.x.left,Te.x.right),Je=Math.min(Te.y.top,Te.y.bottom),qe={row:te.row,column:te.column};Me/me<=2&&(qe.column+=Te.x.left<Te.x.right?-3:2),Je/ue<=1&&(qe.row+=Te.y.top<Te.y.bottom?-1:1);var pt=te.row!=qe.row,ot=te.column!=qe.column,ft=!le||te.row!=le.row;pt||ot&&!ft?B?se-B>=h&&i.renderer.scrollCursorIntoView(qe):B=se:B=null}function D(){var te=R;R=i.renderer.screenToTextCoordinates(M,$),A(R,te),S(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(k),D(),k=setInterval(D,20),N=0,g.addListener(document,"mousemove",X)}function U(){clearInterval(k),i.session.removeMarker(x),x=null,i.selection.fromOrientedRange(C),i.isFocused()&&!L&&i.$resetCursorStyle(),C=null,R=null,N=0,B=null,P=null,g.removeListener(document,"mousemove",X)}var K=null;function X(){K==null&&(K=setTimeout(function(){K!=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 Ae="none";return ue&&le.indexOf(me)>=0?Ae="copy":se.indexOf(me)>=0?Ae="move":le.indexOf(me)>=0&&(Ae="copy"),Ae}}(function(){this.dragWait=function(){var u=Date.now()-this.mousedownEvent.time;u>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var u=this.editor.container;u.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(u){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var u=this.editor,i=u.container;i.draggable=!0,u.renderer.$cursorLayer.setBlinking(!1),u.setStyle("ace_dragging");var c=b.isWin?"default":"move";u.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(u){var i=this.editor.container;if(b.isIE&&this.state=="dragReady"){var c=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&i.dragDrop()}if(this.state==="dragWait"){var c=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(u){if(this.$dragEnabled){this.mousedownEvent=u;var i=this.editor,c=u.inSelection(),m=u.getButton(),w=u.domEvent.detail||1;if(w===1&&m===0&&c){if(u.editor.inMultiSelectMode&&(u.getAccelKey()||u.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=u.domEvent.target||u.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),i.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var M=i.container;M.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(u,this.onMouseDrag.bind(this)),u.defaultPrevented=!0}}}}).call(a.prototype);function l(u,i,c,m){return Math.sqrt(Math.pow(c-u,2)+Math.pow(m-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(t,r,d){var p=t("./mouse_event").MouseEvent,g=t("../lib/event"),b=t("../lib/dom");r.addTouchListeners=function(h,f){var s="scroll",a,l,u,i,c,m,w=0,x,M=0,$=0,k=0,C,R;function N(){var A=window.navigator&&window.navigator.clipboard,S=!1,D=function(){var K=f.getCopyText(),X=f.session.getUndoManager().hasUndo();R.replaceChild(b.buildDom(S?["span",!K&&z("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&z("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&z("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&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(K){return f.commands.canExecute(K,f)},U=function(K){var X=K.target.getAttribute("action");if(X=="more"||!S)return S=!S,D();X=="paste"?A.readText().then(function(ee){f.execCommand(X,ee)}):X&&((X=="cut"||X=="copy")&&(A?A.writeText(f.getCopyText()):document.execCommand("copy")),f.execCommand(X)),R.firstChild.style.display="none",S=!1,X!="openCommandPalette"&&f.focus()};R=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),f.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],f.container)}function I(){if(!f.getOption("enableMobileMenu")){R&&L();return}R||N();var A=f.selection.cursor,S=f.renderer.textToScreenCoordinates(A.row,A.column),D=f.renderer.textToScreenCoordinates(0,0).pageX,z=f.renderer.scrollLeft,U=f.container.getBoundingClientRect();R.style.top=S.pageY-U.top-3+"px",S.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",L)}function L(A){R&&(R.style.display="none"),f.off("input",L)}function B(){c=null,clearTimeout(c);var A=f.selection.getRange(),S=A.contains(x.row,x.column);(A.isEmpty()||!S)&&(f.selection.moveToPosition(x),f.selection.selectWord()),s="wait",I()}function P(){c=null,clearTimeout(c),f.selection.moveToPosition(x);var A=M>=2?f.selection.getLineRange(x.row):f.session.getBracketRange(x);A&&!A.isEmpty()?f.selection.setRange(A):f.selection.selectWord(),s="wait"}g.addListener(h,"contextmenu",function(A){if(C){var S=f.textInput.getElement();S.focus()}},f),g.addListener(h,"touchstart",function(A){var S=A.touches;if(c||S.length>1){clearTimeout(c),c=null,u=-1,s="zoom";return}C=f.$mouseHandler.isMousePressed=!0;var D=f.renderer.layerConfig.lineHeight,z=f.renderer.layerConfig.lineHeight,U=A.timeStamp;i=U;var K=S[0],X=K.clientX,ee=K.clientY;Math.abs(a-X)+Math.abs(l-ee)>D&&(u=-1),a=A.clientX=X,l=A.clientY=ee,$=k=0;var de=new p(A,f);if(x=de.getDocumentPosition(),U-u<500&&S.length==1&&!w)M++,A.preventDefault(),A.button=0,P();else{M=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(),Ae=f.renderer.layerConfig.offset,Te=f.renderer.scrollLeft,Me=function(pt,ot){return pt=pt/z,ot=ot/D-.75,pt*pt+ot*ot};if(A.clientX<me.left){s="zoom";return}var Je=Me(A.clientX-me.left-se.left+Te,A.clientY-me.top-se.top+Ae),qe=Me(A.clientX-me.left-ue.left+Te,A.clientY-me.top-ue.top+Ae);Je<3.5&&qe<3.5&&(s=Je>qe?"cursor":"anchor"),qe<3.5?s="anchor":Je<3.5?s="cursor":s="scroll",c=setTimeout(B,450)}u=U},f),g.addListener(h,"touchend",function(A){C=f.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),s=="zoom"?(s="",w=0):c?(f.selection.moveToPosition(x),w=0,I()):s=="scroll"?(O(),L()):I(),clearTimeout(c),c=null},f),g.addListener(h,"touchmove",function(A){c&&(clearTimeout(c),c=null);var S=A.touches;if(!(S.length>1||s=="zoom")){var D=S[0],z=a-D.clientX,U=l-D.clientY;if(s=="wait")if(z*z+U*U>4)s="cursor";else return A.preventDefault();a=D.clientX,l=D.clientY,A.clientX=D.clientX,A.clientY=D.clientY;var K=A.timeStamp,X=K-i;if(i=K,s=="scroll"){var ee=new p(A,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,k=U/X),f._emit("mousewheel",ee),ee.propagationStopped||($=k=0)}else{var de=new p(A,f),te=de.getDocumentPosition();s=="cursor"?f.selection.moveCursorToPosition(te):s=="anchor"&&f.selection.setSelectionAnchor(te.row,te.column),f.renderer.scrollCursorIntoView(te),A.preventDefault()}}},f);function O(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs($)<.01&&($=0),Math.abs(k)<.01&&(k=0),w<20&&($=.9*$),w<20&&(k=.9*k);var A=f.session.getScrollTop();f.renderer.scrollBy(10*$,10*k),A==f.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(t,r,d){var p=t("../lib/event"),g=t("../lib/useragent"),b=t("./default_handlers").DefaultHandlers,h=t("./default_gutter_handler").GutterHandler,f=t("./mouse_event").MouseEvent,s=t("./dragdrop_handler").DragdropHandler,a=t("./touch_handler").addTouchListeners,l=t("../config"),u=function(){function i(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=c,new b(this),new h(this),new s(this);var w=function($){var k=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());k&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},x=c.renderer.getMouseEventTarget();p.addListener(x,"click",this.onMouseEvent.bind(this,"click"),c),p.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),p.addMultiMouseDownListener([x,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),p.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var M=c.renderer.$gutter;p.addListener(M,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),p.addListener(M,"click",this.onMouseEvent.bind(this,"gutterclick"),c),p.addListener(M,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),p.addListener(M,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),p.addListener(x,"mousedown",w,c),p.addListener(M,"mousedown",w,c),g.isIE&&c.renderer.scrollBarV&&(p.addListener(c.renderer.scrollBarV.element,"mousedown",w,c),p.addListener(c.renderer.scrollBarH.element,"mousedown",w,c)),c.on("mousemove",function($){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=c.renderer.screenToTextCoordinates($.x,$.y),C=c.session.selection.getRange(),R=c.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},c)}return i.prototype.onMouseEvent=function(c,m){this.editor.session&&this.editor._emit(c,new f(m,this.editor))},i.prototype.onMouseMove=function(c,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(c,new f(m,this.editor))},i.prototype.onMouseWheel=function(c,m){var w=new f(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(c,w)},i.prototype.setState=function(c){this.state=c},i.prototype.captureMouse=function(c,m){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var M=this,$=!0,k=function(L){if(L){if(g.isWebKit&&!L.which&&M.releaseMouse)return M.releaseMouse();M.x=L.clientX,M.y=L.clientY,m&&m(L),M.mouseEvent=new f(L,M.editor),M.$mouseMoved=!0}},C=function(L){w.off("beforeEndOperation",I),$=!1,w.session&&R(),M[M.state+"End"]&&M[M.state+"End"](L),M.state="",M.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),M.$onCaptureMouseMove=M.releaseMouse=null,L&&M.onMouseEvent("mouseup",L),w.endOperation()},R=function(){M[M.state]&&M[M.state](),M.$mouseMoved=!1},N=function(){$&&(R(),p.nextFrame(N))};if(g.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){C(c)});var I=function(L){M.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(M[M.state+"End"]&&M[M.state+"End"](),M.state="",M.releaseMouse())};w.on("beforeEndOperation",I),w.startOperation({command:{name:"mouse"}}),M.$onCaptureMouseMove=k,M.releaseMouse=p.capture(this.editor.container,k,C),N()},i.prototype.cancelContextMenu=function(){var c=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),m&&m.domEvent&&p.stopEvent(m.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},i}();u.prototype.releaseMouse=null,l.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,r,d){var p=t("../lib/dom"),g=function(){function b(h){h.on("click",function(f){var s=f.getDocumentPosition(),a=h.session,l=a.getFoldAt(s.row,s.column,1);l&&(f.getAccelKey()?a.removeFold(l):a.expandFold(l),f.stop());var u=f.domEvent&&f.domEvent.target;u&&p.hasCssClass(u,"ace_inline_button")&&p.hasCssClass(u,"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,l=h.session;l.foldWidgets&&l.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,l=h.session,u=l.getParentFoldRangeData(a,!0),i=u.range||u.firstRange;if(i){a=i.start.row;var c=l.getFoldAt(a,l.getLine(a).length,1);c?l.removeFold(c):(l.addFold("...",i),h.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}f.stop()}})}return b}();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,r,d){var p=t("../lib/keys"),g=t("../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,l){for(var u,i=!1,c=this.$editor.commands,m=this.$handlers.length;m--&&(u=this.$handlers[m].handleKeyboard(this.$data,f,s,a,l),!(!(!u||!u.command)&&(u.command=="null"?i=!0:i=c.exec(u.command,this.$editor,u.args,l),i&&l&&f!=-1&&u.passEvent!=!0&&u.command.passEvent!=!0&&g.stopEvent(l),i))););return!i&&f==-1&&(u={command:"insertstring"},i=c.exec("insertstring",this.$editor,s)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",u),i},h.prototype.onCommandKey=function(f,s,a){var l=p.keyCodeToString(a);return this.$callKeyboardHandlers(s,l,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(t,r,d){var p=0,g=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]],l=0,u=1,i=0,c=1,m=2,w=3,x=4,M=5,$=6,k=7,C=8,R=9,N=10,I=11,L=12,B=13,P=14,O=15,A=16,S=17,D=18,z=[D,D,D,D,D,D,D,D,D,$,M,$,C,M,D,D,D,D,D,D,D,D,D,D,D,D,D,D,M,M,M,$,C,x,x,I,I,I,x,x,x,x,x,N,R,N,R,R,m,m,m,m,m,m,m,m,m,m,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,M,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,I,I,I,I,x,x,x,x,i,x,x,D,x,x,I,I,m,m,x,i,x,x,x,m,i,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,i,c,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,M,B,P,O,A,S,R,I,I,I,I,I,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 K(te,le,se,ue){var me=p?a:s,Ae=null,Te=null,Me=null,Je=0,qe=null,pt=null,ot=-1,ft=null,Zt=null,gn=[];if(!ue)for(ft=0,ue=[];ft<se;ft++)ue[ft]=de(te[ft]);for(g=p,b=!1,h=!1,f=!1,Zt=0;Zt<se;Zt++){if(Ae=Je,gn[Zt]=Te=ee(te,ue,gn,Zt),Je=me[Ae][Te],qe=Je&240,Je&=15,le[Zt]=Me=me[Je][5],qe>0)if(qe==16){for(ft=ot;ft<Zt;ft++)le[ft]=1;ot=-1}else ot=-1;if(pt=me[Je][6],pt)ot==-1&&(ot=Zt);else if(ot>-1){for(ft=ot;ft<Zt;ft++)le[ft]=Me;ot=-1}ue[Zt]==M&&(le[Zt]=0),g|=Me}if(f){for(ft=0;ft<se;ft++)if(ue[ft]==$){le[ft]=p;for(var Kt=ft-1;Kt>=0&&ue[Kt]==C;Kt--)le[Kt]=p}}}function X(te,le,se){if(!(g<te)){if(te==1&&p==u&&!h){se.reverse();return}for(var ue=se.length,me=0,Ae,Te,Me,Je;me<ue;){if(le[me]>=te){for(Ae=me+1;Ae<ue&&le[Ae]>=te;)Ae++;for(Te=me,Me=Ae-1;Te<Me;Te++,Me--)Je=se[Te],se[Te]=se[Me],se[Me]=Je;me=Ae}me++}}}function ee(te,le,se,ue){var me=le[ue],Ae,Te,Me,Je;switch(me){case i:case c:b=!1;case x:case w:return me;case m:return b?w:m;case k:return b=!0,c;case C:return x;case R:return ue<1||ue+1>=le.length||(Ae=se[ue-1])!=m&&Ae!=w||(Te=le[ue+1])!=m&&Te!=w?x:(b&&(Te=w),Te==Ae?Te:x);case N:return Ae=ue>0?se[ue-1]:M,Ae==m&&ue+1<le.length&&le[ue+1]==m?m:x;case I:if(ue>0&&se[ue-1]==m)return m;if(b)return x;for(Je=ue+1,Me=le.length;Je<Me&&le[Je]==I;)Je++;return Je<Me&&le[Je]==m?m:x;case L:for(Me=le.length,Je=ue+1;Je<Me&&le[Je]==L;)Je++;if(Je<Me){var qe=te[ue],pt=qe>=1425&&qe<=2303||qe==64286;if(Ae=le[Je],pt&&(Ae==c||Ae==k))return c}return ue<1||(Ae=le[ue-1])==M?x:se[ue-1];case M:return b=!1,h=!0,p;case $:return f=!0,x;case B:case P:case A:case S: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)?c:i:se==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(te)?L:/[\u0660-\u0669\u066b-\u066c]/.test(te)?w:le==1642?I:/[\u06f0-\u06f9]/.test(te)?m:k:se==32&&le<=8287?U[le&255]:se==254&&le>=65136?k:x}r.L=i,r.R=c,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(te,le,se){if(te.length<2)return{};var ue=te.split(""),me=new Array(ue.length),Ae=new Array(ue.length),Te=[];p=se?u:l,K(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]===c&&(le[Me]>k&&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++)Ae[Me]=Te[me[Me]];return{logicalFromVisual:me,bidiLevels:Ae}},r.hasBidiCharacters=function(te,le){for(var se=!1,ue=0;ue<te.length;ue++)le[ue]=de(te.charAt(ue)),!se&&(le[ue]==c||le[ue]==k||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(t,r,d){var p=t("./lib/bidiutil"),g=t("./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=p,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,l){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,l),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 l=this.session.$getRowCacheIndex(a,this.currentRow);l>=0&&(s=this.session.$docRowCache[l])}return s},f.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var l,u=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(l=this.session.$getRowCacheIndex(a,this.currentRow-s-1),l===u);)u=l,s++;else s=this.currentRow;return s},f.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var l=s===this.session.getLength()-1,u=l?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[p.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?u:p.DOT))}else this.line+=this.showInvisibles?u:p.DOT;var c=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,M){return x===" "||c.isFullWidth(x.charCodeAt(0))?(w=x===" "?c.getScreenTabSize(M+m):2,m+=w-1,g.stringRepeat(p.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==p.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=[];p.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=p.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,l=s.$measureCharWidth("ה");this.charWidths[p.L]=this.charWidths[p.EN]=this.charWidths[p.ON_R]=a,this.charWidths[p.R]=this.charWidths[p.AN]=l,this.charWidths[p.R_H]=l*.45,this.charWidths[p.B]=this.charWidths[p.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 l=s.getCursorPosition(),u=s.selection.getSelectionAnchor().row;u<=l.row;u++)!a&&s.session.getLine(u).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(u,0,1):a&&s.session.getLine(u).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:u},s.session.$bidiHandler.RLE)},f.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,l=s>a?this.session.getOverwrite()?s:s-1:a,u=p.getVisualFromLogicalIdx(l,this.bidiMap),i=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&s<=a&&i[u]%2!==0&&u++;for(var m=0;m<u;m++)c+=this.charWidths[i[m]];return!this.session.getOverwrite()&&s>a&&i[u]%2===0&&(c+=this.charWidths[i[u]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},f.prototype.getSelections=function(s,a){var l=this.bidiMap,u=l.bidiLevels,i,c=[],m=0,w=Math.min(s,a)-this.wrapIndent,x=Math.max(s,a)-this.wrapIndent,M=!1,$=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<u.length;R++)C=l.logicalFromVisual[R],i=u[R],M=C>=w&&C<x,M&&!$?k=m:!M&&$&&c.push({left:k,width:m-k}),m+=this.charWidths[i],$=M;if(M&&R===u.length&&c.push({left:k,width:m-k}),this.isRtlDir)for(var N=0;N<c.length;N++)c[N].left+=this.rtlLineOffset;return c},f.prototype.offsetToCol=function(l){this.isRtlDir&&(l-=this.rtlLineOffset);var a=0,l=Math.max(l,0),u=0,i=0,c=this.bidiMap.bidiLevels,m=this.charWidths[c[i]];for(this.wrapIndent&&(l-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);l>u+m/2;){if(u+=m,i===c.length-1){m=0;break}m=this.charWidths[c[++i]]}return i>0&&c[i-1]%2!==0&&c[i]%2===0?(l<u&&i--,a=this.bidiMap.logicalFromVisual[i]):i>0&&c[i-1]%2===0&&c[i]%2!==0?a=1+(l>u?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===c.length-1&&m===0&&c[i-1]%2===0||!this.isRtlDir&&i===0&&c[i]%2!==0?a=1+this.bidiMap.logicalFromVisual[i]:(i>0&&c[i-1]%2!==0&&m!==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(t,r,d){var p=t("./lib/oop"),g=t("./lib/lang"),b=t("./lib/event_emitter").EventEmitter,h=t("./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 l=this;this.cursor.on("change",function(u){l.$cursorChanged=!0,l.$silent||l._emit("changeCursor"),!l.$isEmpty&&!l.$silent&&l._emit("changeSelection"),!l.$keepDesiredColumnOnChange&&u.old.column!=u.value.column&&(l.$desiredColumn=null)}),this.anchor.on("change",function(){l.$anchorChanged=!0,!l.$isEmpty&&!l.$silent&&l._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,l){this.$isEmpty=!1,this.anchor.setPosition(a,l)},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,l=this.lead;return a.row>l.row||a.row==l.row&&a.column>l.column},s.prototype.getRange=function(){var a=this.anchor,l=this.lead;return this.$isEmpty?h.fromPoints(l,l):this.isBackwards()?h.fromPoints(l,a):h.fromPoints(a,l)},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,l){var u=l?a.end:a.start,i=l?a.start:a.end;this.$setSelection(u.row,u.column,i.row,i.column)},s.prototype.$setSelection=function(a,l,u,i){if(!this.$silent){var c=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,l),this.cursor.setPosition(u,i),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||m)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var l=this.lead;this.$isEmpty&&this.setSelectionAnchor(l.row,l.column),a.call(this)},s.prototype.selectTo=function(a,l){this.$moveSelection(function(){this.moveCursorTo(a,l)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,l){this.clearSelection(),this.moveCursorTo(a,l)},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,l){if(typeof l>"u"){var u=a||this.lead;a=u.row,l=u.column}return this.session.getWordRange(a,l)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),l=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(l)},s.prototype.getLineRange=function(a,l){var u=typeof a=="number"?a:this.lead.row,i,c=this.session.getFoldLine(u);return c?(u=c.start.row,i=c.end.row):i=u,l===!0?new h(u,0,i,this.session.getLine(i).length):new h(u,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,l,u){var i=a.column,c=a.column+l;return u<0&&(i=a.column-l,c=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(i,c).split(" ").length-1==l},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),l;if(l=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(l.start.row,l.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var u=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,u,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-u):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),l;if(l=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(l.end.row,l.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 u=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,u,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,u):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,l=this.lead.column,u=this.session.documentToScreenRow(a,l),i=this.session.screenToDocumentPosition(u,0),c=this.session.getDisplayLine(a,null,i.row,i.column),m=c.match(/^\s*/);m[0].length!=l&&!this.session.$useEmacsStyleLineStart&&(i.column+=m[0].length),this.moveCursorToPosition(i)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,l=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==l.column){var u=this.session.getLine(l.row);if(l.column==u.length){var i=u.search(/\s+$/);i>0&&(l.column=i)}}this.moveCursorTo(l.row,l.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,l=this.doc.getLine(a).length;this.moveCursorTo(a,l)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,l=this.lead.column,u=this.doc.getLine(a),i=u.substring(l);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(a,l,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(i)&&(l+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=u.substring(l)),l>=u.length){this.moveCursorTo(a,u.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(l+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,l)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,l=this.lead.column,u;if(u=this.session.getFoldAt(a,l,-1)){this.moveCursorTo(u.start.row,u.start.column);return}var i=this.session.getFoldStringAt(a,l,-1);i==null&&(i=this.doc.getLine(a).substring(0,l));var c=g.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)&&(l-=this.session.nonTokenRe.lastIndex,c=c.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),l<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(l-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,l)},s.prototype.$shortWordEndIndex=function(a){var l=0,u,i=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(a))l=this.session.tokenRe.lastIndex;else{for(;(u=a[l])&&i.test(u);)l++;if(l<1){for(c.lastIndex=0;(u=a[l])&&!c.test(u);)if(c.lastIndex=0,l++,i.test(u))if(l>2){l--;break}else{for(;(u=a[l])&&i.test(u);)l++;if(l>2)break}}}return c.lastIndex=0,l},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,l=this.lead.column,u=this.doc.getLine(a),i=u.substring(l),c=this.session.getFoldAt(a,l,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(l==u.length){var m=this.doc.getLength();do a++,i=this.doc.getLine(a);while(a<m&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),l=0}var w=this.$shortWordEndIndex(i);this.moveCursorTo(a,l+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,l=this.lead.column,u;if(u=this.session.getFoldAt(a,l,-1))return this.moveCursorTo(u.start.row,u.start.column);var i=this.session.getLine(a).substring(0,l);if(l===0){do a--,i=this.doc.getLine(a);while(a>0&&/^\s*$/.test(i));l=i.length,/\s+$/.test(i)||(i="")}var c=g.stringReverse(i),m=this.$shortWordEndIndex(c);return this.moveCursorTo(a,l-m)},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,l){var u=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(l===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(u.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(u.column),u.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=u.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?u.column=this.$desiredColumn:this.$desiredColumn=u.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];a<0?a-=c.rowsAbove||0:a>0&&(a+=c.rowCount-(c.rowsAbove||0))}var m=this.session.screenToDocumentPosition(u.row+a,u.column,i);a!==0&&l===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+l,l===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,l,u){var i=this.session.getFoldAt(a,l,1);i&&(a=i.start.row,l=i.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(c.charAt(l))&&c.charAt(l-1)&&(this.lead.row==a&&this.lead.column==l+1?l=l-1:l=l+1),this.lead.setPosition(a,l),this.$keepDesiredColumnOnChange=!1,u||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,l,u){var i=this.session.screenToDocumentPosition(a,l);this.moveCursorTo(i.row,i.column,u)},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 l=this.getRange();return a?(a.start.column=l.start.column,a.start.row=l.start.row,a.end.column=l.end.column,a.end.row=l.end.row):a=l,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var l=this.getCursor();try{a(this);var u=this.getCursor();return h.fromPoints(l,u)}catch{return h.fromPoints(l,l)}finally{this.moveCursorToPosition(l)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(l){var u=l.clone();return u.isBackwards=l.cursor==l.start,u});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 l=a.length;l--;){var u=h.fromPoints(a[l].start,a[l].end);a[l].isBackwards&&(u.cursor=u.start),this.addRange(u,!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 l=this.ranges.length;l--;)if(!this.ranges[l].isEqual(a[l]))return!1;return!0},s}();f.prototype.setSelectionAnchor=f.prototype.setAnchor,f.prototype.getSelectionAnchor=f.prototype.getAnchor,f.prototype.setSelectionRange=f.prototype.setRange,p.implement(f.prototype,b),r.Selection=f}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,r,d){var p=t("./lib/report_error").reportError,g=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],l=[],u=0,i=this.matchMappings[s]={defaultToken:"text"},c="g",m=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(i.defaultToken=x.defaultToken),x.caseInsensitive&&c.indexOf("i")===-1&&(c+="i"),x.unicode&&c.indexOf("u")===-1&&(c+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var M=x.regex,$=new RegExp("(?:("+M+")|(.))").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)?M=x.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+u+1)}):($=1,M=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),i[u]=w,u+=$,l.push(M),x.onMatch||(x.onMatch=null)}}l.length||(i[0]=0,l.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,c)},this),this.regExps[s]=new RegExp("("+l.join(")|(")+")|($)",c)}}return h.prototype.$setMaxTokenCount=function(f){g=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 l=[],u=0,i=a.length;u<i;u++)s[u]&&(l[l.length]={type:a[u],value:s[u]});return l},h.prototype.$arrayTokens=function(f){if(!f)return[];var s=this.splitRegex.exec(f);if(!s)return"text";for(var a=[],l=this.tokenArray,u=0,i=l.length;u<i;u++)s[u+1]&&(a[a.length]={type:l[u],value:s[u+1]});return a},h.prototype.removeCapturingGroups=function(f){var s=f.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,l){return l?"(?:":a});return s},h.prototype.createSplitterRegexp=function(f,s){if(f.indexOf("(?=")!=-1){var a=0,l=!1,u={};f.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,c,m,w,x,M){return l?l=x!="]":x?l=!0:w?(a==u.stack&&(u.end=M+1,u.stack=-1),a--):m&&(a++,m.length!=1&&(u.stack=a,u.start=M)),i}),u.end!=null&&/^\)*$/.test(f.substr(u.end))&&(f=f.substring(0,u.start)+f.substr(u.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 l=s||"start",u=this.states[l];u||(l="start",u=this.states[l]);var i=this.matchMappings[l],c=this.regExps[l];c.lastIndex=0;for(var m,w=[],x=0,M=0,$={type:null,value:""};m=c.exec(f);){var k=i.defaultToken,C=null,R=m[0],N=c.lastIndex;if(N-R.length>x){var I=f.substring(x,N-R.length);$.type==k?$.value+=I:($.type&&w.push($),$={type:k,value:I})}for(var L=0;L<m.length-2;L++)if(m[L+1]!==void 0){C=u[i[L]],C.onMatch?k=C.onMatch(R,l,a,f):k=C.token,C.next&&(typeof C.next=="string"?l=C.next:l=C.next(l,a),u=this.states[l],u||(this.reportError("state doesn't exist",l),l="start",u=this.states[l]),i=this.matchMappings[l],x=N,c=this.regExps[l],c.lastIndex=N),C.consumeLineEnd&&(x=N);break}if(R){if(typeof k=="string")(!C||C.merge!==!1)&&$.type===k?$.value+=R:($.type&&w.push($),$={type:k,value:R});else if(k){$.type&&w.push($),$={type:null,value:""};for(var L=0;L<k.length;L++)w.push(k[L])}}if(x==f.length)break;if(x=N,M++>g){for(M>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"};l="start",a=[];break}}return $.type&&w.push($),a.length>1&&a[0]!==l&&a.unshift("#tmp",l),{tokens:w,state:a.length?a:l}},h}();b.prototype.reportError=p,r.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,r,d){var p=t("../lib/deep_copy").deepCopy,g;g=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 l=f[a],u=0;u<l.length;u++){var i=l[u];(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]=l}},this.getRules=function(){return this.$rules},this.embedRules=function(f,s,a,l,u){var i=typeof f=="function"?new f().getRules():f;if(l)for(var c=0;c<l.length;c++)l[c]=s+l[c];else{l=[];for(var m in i)l.push(s+m)}if(this.addRules(i,s),a)for(var w=Array.prototype[u?"push":"unshift"],c=0;c<l.length;c++)w.apply(this.$rules[l[c]],p(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(l){var u=s[l];u.processed=!0;for(var i=0;i<u.length;i++){var c=u[i],m=null;Array.isArray(c)&&(m=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var w=c.next||c.push;if(w&&Array.isArray(w)){var x=c.stateName;x||(x=c.token,typeof x!="string"&&(x=x[0]||""),s[x]&&(x+=f++)),s[x]=w,c.next=x,a(x)}else w=="pop"&&(c.next=h);if(c.push&&(c.nextState=c.next||c.push,c.next=b,delete c.push),c.rules)for(var M in c.rules)s[M]?s[M].push&&s[M].push.apply(s[M],c.rules[M]):s[M]=c.rules[M];var $=typeof c=="string"?c:c.include;if($&&($==="$self"&&($="start"),Array.isArray($)?m=$.map(function(C){return s[C]}):m=s[$]),m){var k=[i,1].concat(m);c.noEscape&&(k=k.filter(function(C){return!C.next})),u.splice.apply(u,k),i--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(f,s,a,l){var u=Object.create(null);return this.$keywordList=[],Object.keys(f).forEach(function(i){for(var c=f[i],m=c.split(l||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),u[x]=i}},this),f=null,a?function(i){return u[i.toLowerCase()]||s}:function(i){return u[i]||s}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(t,r,d){var p;p=function(){this.$behaviours={}},(function(){this.add=function(g,b,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][b]=h},this.addBehaviours=function(g){for(var b in g)for(var h in g[b])this.add(b,h,g[b][h])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,b){if(typeof g=="function")var h=new g().getBehaviours(b);else var h=g.getBehaviours(b);this.addBehaviours(h)},this.getBehaviours=function(g){if(g){for(var b={},h=0;h<g.length;h++)this.$behaviours[g[h]]&&(b[g[h]]=this.$behaviours[g[h]]);return b}else return this.$behaviours}}).call(p.prototype),r.Behaviour=p}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(t,r,d){var p=t("./range").Range,g=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 p(this.$row,f,this.$row,f+h.value.length)},b}();r.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,r,d){var p=t("../../lib/oop"),g=t("../behaviour").Behaviour,b=t("../../token_iterator").TokenIterator,h=t("../../lib/lang"),f=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,l={},u={'"':'"',"'":"'"},i=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,l.rangeCount!=w.multiSelect.rangeCount&&(l={rangeCount:w.multiSelect.rangeCount})),l[x])return a=l[x];a=l[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(w,x,M,$){var k=w.end.row-w.start.row;return{text:M+x+$,selection:[0,w.start.column+1,k,w.end.column+(k?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,M,$,k,C){var R=$.getCursorPosition(),N=k.doc.getLine(R.row);if(C=="{"){i($);var I=$.getSelectionRange(),L=k.doc.getTextRange(I),B=k.getTokenAt(R.row,R.column);if(L!==""&&L!=="{"&&$.getWrapBehavioursEnabled())return c(I,L,"{","}");if(B&&/(?:string)\.quasi|\.xml/.test(B.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(B.type)})||/(string)\.quasi/.test(B.type)&&B.value[R.column-B.start-1]!=="$"?void 0:(m.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion($,k))return/[\]\}\)]/.test(N[R.column])||$.inMultiSelectMode||w.braces?(m.recordAutoInsert($,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert($,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){i($);var O=N.substring(R.column,R.column+1);if(O=="}"){var A=k.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(A!==null&&m.isAutoInsertedClosing(R,N,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
180
+ `||C==`\r
181
+ `){i($);var S="";m.isMaybeInsertedClosing(R,N)&&(S=h.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var O=N.substring(R.column,R.column+1);if(O==="}"){var D=k.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!D)return null;var z=this.$getIndent(k.getLine(D.row))}else if(S)var z=this.$getIndent(N);else{m.clearMaybeInsertedClosing();return}var U=z+k.getTabString();return{text:`
182
+ `+U+`
183
+ `+z+S,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,M,$,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="{"){i($);var N=k.doc.getLine(C.start.row),I=N.substring(C.end.column,C.end.column+1);if(I=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,M,$,k,C){if(C=="("){i($);var R=$.getSelectionRange(),N=k.doc.getTextRange(R);if(N!==""&&$.getWrapBehavioursEnabled())return c(R,N,"(",")");if(m.isSaneInsertion($,k))return m.recordAutoInsert($,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){i($);var I=$.getCursorPosition(),L=k.doc.getLine(I.row),B=L.substring(I.column,I.column+1);if(B==")"){var P=k.$findOpeningBracket(")",{column:I.column+1,row:I.row});if(P!==null&&m.isAutoInsertedClosing(I,L,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,M,$,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="("){i($);var N=k.doc.getLine(C.start.row),I=N.substring(C.start.column+1,C.start.column+2);if(I==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,M,$,k,C){if(C=="["){i($);var R=$.getSelectionRange(),N=k.doc.getTextRange(R);if(N!==""&&$.getWrapBehavioursEnabled())return c(R,N,"[","]");if(m.isSaneInsertion($,k))return m.recordAutoInsert($,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){i($);var I=$.getCursorPosition(),L=k.doc.getLine(I.row),B=L.substring(I.column,I.column+1);if(B=="]"){var P=k.$findOpeningBracket("]",{column:I.column+1,row:I.row});if(P!==null&&m.isAutoInsertedClosing(I,L,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,M,$,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="["){i($);var N=k.doc.getLine(C.start.row),I=N.substring(C.start.column+1,C.start.column+2);if(I=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,M,$,k,C){var R=k.$mode.$quotes||u;if(C.length==1&&R[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;i($);var N=C,I=$.getSelectionRange(),L=k.doc.getTextRange(I);if(L!==""&&(L.length!=1||!R[L])&&$.getWrapBehavioursEnabled())return c(I,L,N,N);if(!L){var B=$.getCursorPosition(),P=k.doc.getLine(B.row),O=P.substring(B.column-1,B.column),A=P.substring(B.column,B.column+1),S=k.getTokenAt(B.row,B.column),D=k.getTokenAt(B.row,B.column+1);if(O=="\\"&&S&&/escape/.test(S.type))return null;var z=S&&/string|escape/.test(S.type),U=!D||/string|escape/.test(D.type),K;if(A==N)K=z!==U,K&&/string\.end/.test(D.type)&&(K=!1);else{if(z&&!U||z&&U)return null;var X=k.$mode.tokenRe;X.lastIndex=0;var ee=X.test(O);X.lastIndex=0;var de=X.test(A),te=k.$mode.$pairQuotesAfter,le=te&&te[N]&&te[N].test(O);if(!le&&ee||de||A&&!/[\s;,.})\]\\]/.test(A))return null;var se=P[B.column-2];if(O==N&&(se==N||X.test(se)))return null;K=!0}return{text:K?N+N:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,M,$,k,C){var R=k.$mode.$quotes||u,N=k.doc.getTextRange(C);if(!C.isMultiLine()&&R.hasOwnProperty(N)){i($);var I=k.doc.getLine(C.start.row),L=I.substring(C.start.column+1,C.start.column+2);if(L==N)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,M,$,k,C){if(x==="doc-start"&&(C===`
184
+ `||C===`\r
185
+ `)&&$.selection.isEmpty()){var R=$.getCursorPosition();if(R.column===0)return;for(var N=k.doc.getLine(R.row),I=k.doc.getLine(R.row+1),L=k.getTokens(R.row),B=0,P=0;P<L.length;P++){B+=L[P].value.length;var O=L[P];if(B>=R.column){if(B===R.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var A=L[P+1];if(!A||!/\.doc/.test(A.type))return}}var S=R.column-(B-O.value.length),D=O.value.indexOf("*/"),z=O.value.indexOf("/**",D>-1?D+2:0);if(z!==-1&&S>z&&S<z+3||D!==-1&&z!==-1&&S>=D&&S<=z||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(N);if(/\s*\*/.test(I))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]}}})},m.isSaneInsertion=function(w,x){var M=w.getCursorPosition(),$=new b(x,M.row,M.column);if(!this.$matchTokenType($.getCurrentToken()||"text",f)){if(/[)}\]]/.test(w.session.getLine(M.row)[M.column]))return!0;var k=new b(x,M.row,M.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",f))return!1}return $.stepForward(),$.getCurrentTokenRow()!==M.row||this.$matchTokenType($.getCurrentToken()||"text",s)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,M){var $=w.getCursorPosition(),k=x.doc.getLine($.row);this.isAutoInsertedClosing($,k,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=$.row,a.autoInsertedLineEnd=M+k.substr($.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,M){var $=w.getCursorPosition(),k=x.doc.getLine($.row);this.isMaybeInsertedClosing($,k)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=$.row,a.maybeInsertedLineStart=k.substr(0,$.column)+M,a.maybeInsertedLineEnd=k.substr($.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,M){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&M===a.autoInsertedLineEnd[0]&&x.substr(w.column)===a.autoInsertedLineEnd},m.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},m.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},p.inherits(m,g),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(t,r,d){for(var p=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],g=0,b=[],h=0;h<p.length;h+=2)b.push(g+=p[h]),p[h+1]&&b.push(45,g+=p[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(t,r,d){var p=t("../config"),g=t("../tokenizer").Tokenizer,b=t("./text_highlight_rules").TextHighlightRules,h=t("./behaviour/cstyle").CstyleBehaviour,f=t("../unicode"),s=t("../lib/lang"),a=t("../token_iterator").TokenIterator,l=t("../range").Range,u;u=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 g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(i,c,m,w){var x=c.doc,M=!0,$=!0,k=1/0,C=c.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var N=this.lineCommentStart.map(s.escapeRegExp).join("|"),I=this.lineCommentStart[0];else var N=s.escapeRegExp(this.lineCommentStart),I=this.lineCommentStart;N=new RegExp("^(\\s*)(?:"+N+") ?"),R=c.getUseSoftTabs();var L=function(K,X){var ee=K.match(N);if(ee){var de=ee[1].length,te=ee[0].length;!A(K,de,te)&&ee[0][te-1]==" "&&te--,x.removeInLine(X,de,te)}},B=I+" ",P=function(K,X){(!M||/\S/.test(K))&&(A(K,k,k)?x.insertInLine({row:X,column:k},B):x.insertInLine({row:X,column:k},I))},O=function(K,X){return N.test(K)},A=function(K,X,ee){for(var de=0;X--&&K.charAt(X)==" ";)de++;if(de%C!=0)return!1;for(var de=0;K.charAt(ee++)==" ";)de++;return C>2?de%C!=C-1:de%C==0}}else{if(!this.blockComment)return!1;var I=this.blockComment.start,S=this.blockComment.end,N=new RegExp("^(\\s*)(?:"+s.escapeRegExp(I)+")"),D=new RegExp("(?:"+s.escapeRegExp(S)+")\\s*$"),P=function(le,se){O(le,se)||(!M||/\S/.test(le))&&(x.insertInLine({row:se,column:le.length},S),x.insertInLine({row:se,column:k},I))},L=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=c.getTokens(se),me=0;me<ue.length;me++)if(ue[me].type==="comment")return!0}}function z(K){for(var X=m;X<=w;X++)K(x.getLine(X),X)}var U=1/0;z(function(K,X){var ee=K.search(/\S/);ee!==-1?(ee<k&&(k=ee),$&&!O(K,X)&&($=!1)):U>K.length&&(U=K.length)}),k==1/0&&(k=U,M=!1,$=!1),R&&k%C!=0&&(k=Math.floor(k/C)*C),z($?L:P)},this.toggleBlockComment=function(i,c,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var M=new a(c,w.row,w.column),$=M.getCurrentToken();c.selection;var k=c.selection.toOrientedRange(),C,R;if($&&/comment/.test($.type)){for(var N,I;$&&/comment/.test($.type);){var L=$.value.indexOf(x.start);if(L!=-1){var B=M.getCurrentTokenRow(),P=M.getCurrentTokenColumn()+L;N=new l(B,P,B,P+x.start.length);break}$=M.stepBackward()}for(var M=new a(c,w.row,w.column),$=M.getCurrentToken();$&&/comment/.test($.type);){var L=$.value.indexOf(x.end);if(L!=-1){var B=M.getCurrentTokenRow(),P=M.getCurrentTokenColumn()+L;I=new l(B,P,B,P+x.end.length);break}$=M.stepForward()}I&&c.remove(I),N&&(c.remove(N),C=N.start.row,R=-x.start.length)}else R=x.start.length,C=m.start.row,c.insert(m.end,x.end),c.insert(m.start,x.start);k.start.row==C&&(k.start.column+=R),k.end.row==C&&(k.end.column+=R),c.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(i,c,m){return this.$getIndent(c)},this.checkOutdent=function(i,c,m){return!1},this.autoOutdent=function(i,c,m){},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 c in i)if(i[c]){var m=i[c],w=m.prototype.$id,x=p.$modes[w];x||(p.$modes[w]=x=new m),p.$modes[c]||(p.$modes[c]=x),this.$embeds.push(c),this.$modes[c]=x}for(var M=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(R){(function(N){var I=M[R],L=N[I];N[M[R]]=function(){return this.$delegator(I,arguments,L)}})(k)},k=this,c=0;c<M.length;c++)$(c)},this.$delegator=function(i,c,m){var w=c[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],M=this.$modes[x];if(M)return M[i].apply(M,[w[1]].concat([].slice.call(c,1)))}w=w[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var k=w.split(this.$embeds[$]);if(!k[0]&&k[1]){c[0]=k[1];var M=this.$modes[this.$embeds[$]];return M[i].apply(M,c)}}var C=m.apply(this,c);return m?C:void 0},this.transformAction=function(i,c,m,w,x){if(this.$behaviour){var M=this.$behaviour.getBehaviours();for(var $ in M)if(M[$][c]){var k=M[$][c].apply(this,arguments);if(k)return k}}},this.getKeywords=function(i){if(!this.completionKeywords){var c=this.$tokenizer.rules,m=[];for(var w in c)for(var x=c[w],M=0,$=x.length;M<$;M++)if(typeof x[M].token=="string")/keyword|support|storage/.test(x[M].token)&&m.push(x[M].regex);else if(typeof x[M].token=="object"){for(var k=0,C=x[M].token.length;k<C;k++)if(/keyword|support|storage/.test(x[M].token[k])){var w=x[M].regex.match(/\(.+?\)/g)[k];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return i?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(i,c,m,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(M){return{name:M,value:M,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(u.prototype),r.Mode=u}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,r,d){var p=t("./lib/dom"),g=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,l=a.start.row,u=a.end.row,i=h.action=="add",c=l+1;c<u;c++)s[c]&&(s[c].hidden=i);s[u]&&(i?s[l]?s[u].hidden=i:s[l]=s[u]:(s[l]==s[u]&&(s[l]=void 0),s[u].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 l=f.splice(s+1,a);!f[s]&&l[l.length-1]&&(f[s]=l.pop()),l.forEach(function(i){i&&this.removeLineWidget(i)},this),this.$updateRows()}else{var u=new Array(a);f[s]&&f[s].column!=null&&h.start.column>f[s].column&&s++,u.unshift(s,0),f.splice.apply(f,u),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=p.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=p.createElement("div"),h.el.textContent=h.text),h.el&&(p.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&p.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 l=1/0,u=0;u<s.length;u++){var i=s[u];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 c=i.h/a.lineHeight;i.coverLine&&(c-=this.session.getRowLineCount(i.row),c<0&&(c=0)),i.rowCount!=c&&(i.rowCount=c,i.row<l&&(l=i.row))}}l!=1/0&&(this.session._emit("changeFold",{data:{start:{row:l}}}),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 l=Math.min(this.firstRow,s.firstRow),u=Math.max(this.lastRow,s.lastRow,a.length);l>0&&!a[l];)l--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,f.$cursorLayer.config=s;for(var i=l;i<=u;i++){var c=a[i];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,f.container.appendChild(c.el));var m=f.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;c.coverLine||(m+=s.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=m-s.offset+"px";var w=c.coverGutter?0:f.gutterWidth;c.fixedWidth||(w-=f.scrollLeft),c.el.style.left=w+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=s.width+2*s.padding+"px"),c.fixedWidth?c.el.style.right=f.scrollBar.getWidth()+"px":c.el.style.right=""}}}},b}();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(t,r,d){r.applyDelta=function(p,g,b){var h=g.start.row,f=g.start.column,s=p[h]||"";switch(g.action){case"insert":var a=g.lines;if(a.length===1)p[h]=s.substring(0,f)+g.lines[0]+s.substring(f);else{var l=[h,1].concat(g.lines);p.splice.apply(p,l),p[h]=s.substring(0,f)+p[h],p[h+g.lines.length-1]+=s.substring(f)}break;case"remove":var u=g.end.column,i=g.end.row;h===i?p[h]=s.substring(0,f)+s.substring(u):p.splice(h,i-h+1,s.substring(0,f)+p[i].substring(u));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,d){var p=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,b=function(){function s(a,l,u){this.$onChange=this.onChange.bind(this),this.attach(a),typeof l!="number"?this.setPosition(l.row,l.column):this.setPosition(l,u)}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 l=f(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(l.row,l.column,!0)}},s.prototype.setPosition=function(a,l,u){var i;if(u?i={row:a,column:l}:i=this.$clipPositionToDocument(a,l),!(this.row==i.row&&this.column==i.column)){var c={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:c,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,l){var u={};return a>=this.document.getLength()?(u.row=Math.max(0,this.document.getLength()-1),u.column=this.document.getLine(u.row).length):a<0?(u.row=0,u.column=0):(u.row=a,u.column=Math.min(this.document.getLine(u.row).length,Math.max(0,l))),l<0&&(u.column=0),u},s}();b.prototype.$insertRight=!1,p.implement(b.prototype,g);function h(s,a,l){var u=l?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&u}function f(s,a,l){var u=s.action=="insert",i=(u?1:-1)*(s.end.row-s.start.row),c=(u?1:-1)*(s.end.column-s.start.column),m=s.start,w=u?m:s.end;return h(a,m,l)?{row:a.row,column:a.column}:h(w,a,!l)?{row:a.row+i,column:a.column+(a.row==w.row?c:0)}:{row:m.row,column:m.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(t,r,d){var p=t("./lib/oop"),g=t("./apply_delta").applyDelta,b=t("./lib/event_emitter").EventEmitter,h=t("./range").Range,f=t("./anchor").Anchor,s=function(){function a(l){this.$lines=[""],l.length===0?this.$lines=[""]:Array.isArray(l)?this.insertMergedLines({row:0,column:0},l):this.insert({row:0,column:0},l)}return a.prototype.setValue=function(l){var u=this.getLength()-1;this.remove(new h(0,0,u,this.getLine(u).length)),this.insert({row:0,column:0},l||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(l,u){return new f(this,l,u)},a.prototype.$detectNewLine=function(l){var u=l.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=u?u[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(l){this.$newLineMode!==l&&(this.$newLineMode=l,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(l){return l==`\r
190
+ `||l=="\r"||l==`
191
+ `},a.prototype.getLine=function(l){return this.$lines[l]||""},a.prototype.getLines=function(l,u){return this.$lines.slice(l,u+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(l){return this.getLinesForRange(l).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(l){var u;if(l.start.row===l.end.row)u=[this.getLine(l.start.row).substring(l.start.column,l.end.column)];else{u=this.getLines(l.start.row,l.end.row),u[0]=(u[0]||"").substring(l.start.column);var i=u.length-1;l.end.row-l.start.row==i&&(u[i]=u[i].substring(0,l.end.column))}return u},a.prototype.insertLines=function(l,u){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(l,u)},a.prototype.removeLines=function(l,u){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(l,u)},a.prototype.insertNewLine=function(l){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(l,["",""])},a.prototype.insert=function(l,u){return this.getLength()<=1&&this.$detectNewLine(u),this.insertMergedLines(l,this.$split(u))},a.prototype.insertInLine=function(l,u){var i=this.clippedPos(l.row,l.column),c=this.pos(l.row,l.column+u.length);return this.applyDelta({start:i,end:c,action:"insert",lines:[u]},!0),this.clonePos(c)},a.prototype.clippedPos=function(l,u){var i=this.getLength();l===void 0?l=i:l<0?l=0:l>=i&&(l=i-1,u=void 0);var c=this.getLine(l);return u==null&&(u=c.length),u=Math.min(Math.max(u,0),c.length),{row:l,column:u}},a.prototype.clonePos=function(l){return{row:l.row,column:l.column}},a.prototype.pos=function(l,u){return{row:l,column:u}},a.prototype.$clipPosition=function(l){var u=this.getLength();return l.row>=u?(l.row=Math.max(0,u-1),l.column=this.getLine(u-1).length):(l.row=Math.max(0,l.row),l.column=Math.min(Math.max(l.column,0),this.getLine(l.row).length)),l},a.prototype.insertFullLines=function(l,u){l=Math.min(Math.max(l,0),this.getLength());var i=0;l<this.getLength()?(u=u.concat([""]),i=0):(u=[""].concat(u),l--,i=this.$lines[l].length),this.insertMergedLines({row:l,column:i},u)},a.prototype.insertMergedLines=function(l,u){var i=this.clippedPos(l.row,l.column),c={row:i.row+u.length-1,column:(u.length==1?i.column:0)+u[u.length-1].length};return this.applyDelta({start:i,end:c,action:"insert",lines:u}),this.clonePos(c)},a.prototype.remove=function(l){var u=this.clippedPos(l.start.row,l.start.column),i=this.clippedPos(l.end.row,l.end.column);return this.applyDelta({start:u,end:i,action:"remove",lines:this.getLinesForRange({start:u,end:i})}),this.clonePos(u)},a.prototype.removeInLine=function(l,u,i){var c=this.clippedPos(l,u),m=this.clippedPos(l,i);return this.applyDelta({start:c,end:m,action:"remove",lines:this.getLinesForRange({start:c,end:m})},!0),this.clonePos(c)},a.prototype.removeFullLines=function(l,u){l=Math.min(Math.max(0,l),this.getLength()-1),u=Math.min(Math.max(0,u),this.getLength()-1);var i=u==this.getLength()-1&&l>0,c=u<this.getLength()-1,m=i?l-1:l,w=i?this.getLine(m).length:0,x=c?u+1:u,M=c?0:this.getLine(x).length,$=new h(m,w,x,M),k=this.$lines.slice(l,u+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),k},a.prototype.removeNewLine=function(l){l<this.getLength()-1&&l>=0&&this.applyDelta({start:this.pos(l,this.getLine(l).length),end:this.pos(l+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(l,u){if(l instanceof h||(l=h.fromPoints(l.start,l.end)),u.length===0&&l.isEmpty())return l.start;if(u==this.getTextRange(l))return l.end;this.remove(l);var i;return u?i=this.insert(l.start,u):i=l.start,i},a.prototype.applyDeltas=function(l){for(var u=0;u<l.length;u++)this.applyDelta(l[u])},a.prototype.revertDeltas=function(l){for(var u=l.length-1;u>=0;u--)this.revertDelta(l[u])},a.prototype.applyDelta=function(l,u){var i=l.action=="insert";(i?l.lines.length<=1&&!l.lines[0]:!h.comparePoints(l.start,l.end))||(i&&l.lines.length>2e4?this.$splitAndapplyLargeDelta(l,2e4):(g(this.$lines,l,u),this._signal("change",l)))},a.prototype.$safeApplyDelta=function(l){var u=this.$lines.length;(l.action=="remove"&&l.start.row<u&&l.end.row<u||l.action=="insert"&&l.start.row<=u)&&this.applyDelta(l)},a.prototype.$splitAndapplyLargeDelta=function(l,u){for(var i=l.lines,c=i.length-u+1,m=l.start.row,w=l.start.column,x=0,M=0;x<c;x=M){M+=u-1;var $=i.slice(x,M);$.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+M,w=0),action:l.action,lines:$},!0)}l.lines=i.slice(x),l.start.row=m+x,l.start.column=w,this.applyDelta(l,!0)},a.prototype.revertDelta=function(l){this.$safeApplyDelta({start:this.clonePos(l.start),end:this.clonePos(l.end),action:l.action=="insert"?"remove":"insert",lines:l.lines.slice()})},a.prototype.indexToPosition=function(l,u){for(var i=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,m=u||0,w=i.length;m<w;m++)if(l-=i[m].length+c,l<0)return{row:m,column:l+i[m].length+c};return{row:w-1,column:l+i[w-1].length+c}},a.prototype.positionToIndex=function(l,u){for(var i=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,m=0,w=Math.min(l.row,i.length),x=u||0;x<w;++x)m+=i[x].length+c;return m+l.column},a.prototype.$split=function(l){return l.split(/\r\n|\r|\n/)},a}();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",p.implement(s.prototype,b),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,d){var p=t("./lib/oop"),g=t("./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 l=new Date,u=a.currentLine,i=-1,c=a.doc,m=u;a.lines[u];)u++;var w=c.getLength(),x=0;for(a.running=!1;u<w;){a.$tokenizeRow(u),i=u;do u++;while(a.lines[u]);if(x++,x%5===0&&new Date-l>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=u,i==-1&&(i=u),m<=i&&a.fireUpdateEvent(m,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 l=Array(a+1);l.unshift(s,1),this.lines.splice.apply(this.lines,l),this.states.splice.apply(this.states,l)}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],l=this.tokenizer.getLineTokens(s,a,f);return this.states[f]+""!=l.state+""?(this.states[f]=l.state,this.lines[f+1]=null,this.currentLine>f+1&&(this.currentLine=f+1)):this.currentLine==f&&(this.currentLine=f+1),this.lines[f]=l.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h}();p.implement(b.prototype,g),r.BackgroundTokenizer=b}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,r,d){var p=t("./lib/lang"),g=t("./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,l){if(this.regExp){for(var u=l.firstRow,i=l.lastRow,c={},m=a.$editor&&a.$editor.$search,w=m&&m.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=u;x<=i;x++){var M=this.cache[x];if(M==null||a.getValue().length!=this.docLen){if(w){M=[];var $=m.$multiLineForward(a,this.regExp,x,i);if($){var k=$.endRow<=i?$.endRow-1:i;k>x&&(x=k),M.push(new g($.startRow,$.startCol,$.endRow,$.endCol))}M.length>this.MAX_RANGES&&(M=M.slice(0,this.MAX_RANGES))}else M=p.getMatchOffsets(a.getLine(x),this.regExp),M.length>this.MAX_RANGES&&(M=M.slice(0,this.MAX_RANGES)),M=M.map(function(I){return new g(x,I.offset,x,I.offset+I.length)});this.cache[x]=M.length?M:""}if(M.length!==0)for(var C=M.length;C--;){var R=M[C].toScreenRange(a),N=R.toString();c[N]||(c[N]=!0,s.drawSingleLineMarker(f,R,this.clazz,l))}}this.docLen=a.getValue().length}},h}();b.prototype.MAX_RANGES=500,r.SearchHighlight=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,r,d){var p=function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,R,N){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var I=this.$undoStack.length;I>this.$undoDepth-1&&this.$undoStack.splice(0,I-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},k.prototype.addSelection=function(C,R){this.selections.push({value:C,rev:R||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,R){R==null&&(R=this.$rev+1);for(var N=this.$undoStack,I=N.length;I--;){var L=N[I][0];if(L.id<=C)break;L.id<R&&(L.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,R){for(var N=this.selections,I=N.length;I--;){var L=N[I];if(L.rev<C)return R&&(L=N[I+1]),L}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,R){R==null&&(R=this.$rev+1);for(var N=this.$undoStack,I=null,L=0,B=N.length;B--;){var P=N[B][0];if(P.id<R&&!I&&(I=B+1),P.id<=C){L=B+1;break}}return N.slice(L,I)},k.prototype.getChangedRanges=function(C,R){R==null&&(R=this.$rev+1)},k.prototype.getChangedLines=function(C,R){R==null&&(R=this.$rev+1)},k.prototype.undo=function(C,R){this.lastDeltas=null;var N=this.$undoStack;if(g(N,N.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var I=N.pop(),L=null;return I&&(L=C.undoChanges(I,R),this.$redoStack.push(I),this.$syncRev()),this.$fromUndo=!1,L}},k.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 I=this.$redoStack.pop(),L=null;return I&&(L=C.redoChanges(I,R),this.$undoStack.push(I),this.$syncRev()),this.$fromUndo=!1,L},k.prototype.$syncRev=function(){var C=this.$undoStack,R=C[C.length-1],N=R&&R[0].id||0;this.$redoStackBaseRev=N,this.$rev=N},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},k.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
192
+ ---
193
+ `+a(this.$redoStack)},k}();p.prototype.hasUndo=p.prototype.canUndo,p.prototype.hasRedo=p.prototype.canRedo,p.prototype.isClean=p.prototype.isAtBookmark,p.prototype.markClean=p.prototype.bookmark;function g(k,C){for(var R=C;R--;){var N=k[R];if(N&&!N[0].ignore){for(;R<C-1;){var I=i(k[R],k[R+1]);k[R]=I[0],k[R+1]=I[1],R++}return!0}}}var b=t("./range").Range,h=b.comparePoints;b.comparePoints;function f(k){return{row:k.row,column:k.column}}function s(k){return{start:f(k.start),end:f(k.end),action:k.action,lines:k.lines.slice()}}function a(k){if(k=k||this,Array.isArray(k))return k.map(a).join(`
194
+ `);var C="";return k.action?(C=k.action=="insert"?"+":"-",C+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?C=k.value.map(l).join(`
195
+ `):C=l(k.value)),k.start&&(C+=l(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function l(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function u(k,C){var R=k.action=="insert",N=C.action=="insert";if(R&&N)if(h(C.start,k.end)>=0)m(C,k,-1);else if(h(C.start,k.start)<=0)m(k,C,1);else return null;else if(R&&!N)if(h(C.start,k.end)>=0)m(C,k,-1);else if(h(C.end,k.start)<=0)m(k,C,-1);else return null;else if(!R&&N)if(h(C.start,k.start)>=0)m(C,k,1);else if(h(C.start,k.start)<=0)m(k,C,1);else return null;else if(!R&&!N)if(h(C.start,k.start)>=0)m(C,k,1);else if(h(C.end,k.start)<=0)m(k,C,-1);else return null;return[C,k]}function i(k,C){for(var R=k.length;R--;)for(var N=0;N<C.length;N++)if(!u(k[R],C[N])){for(;R<k.length;){for(;N--;)u(C[N],k[R]);N=C.length,R++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function c(k,C){var R=k.action=="insert",N=C.action=="insert";if(R&&N)h(k.start,C.start)<0?m(C,k,1):m(k,C,1);else if(R&&!N)h(k.start,C.end)>=0?m(k,C,-1):(h(k.start,C.start)<=0||m(k,b.fromPoints(C.start,k.start),-1),m(C,k,1));else if(!R&&N)h(C.start,k.end)>=0?m(C,k,-1):(h(C.start,k.start)<=0||m(C,b.fromPoints(k.start,C.start),-1),m(k,C,1));else if(!R&&!N)if(h(C.start,k.end)>=0)m(C,k,-1);else if(h(C.end,k.start)<=0)m(k,C,-1);else{var I,L;return h(k.start,C.start)<0&&(I=k,k=x(k,C.start)),h(k.end,C.end)>0&&(L=x(k,C.end)),w(C.end,k.start,k.end,-1),L&&!I&&(k.lines=L.lines,k.start=L.start,k.end=L.end,L=k),[C,I,L].filter(Boolean)}return[C,k]}function m(k,C,R){w(k.start,C.start,C.end,R),w(k.end,C.start,C.end,R)}function w(k,C,R,N){k.row==(N==1?C:R).row&&(k.column+=N*(R.column-C.column)),k.row+=N*(R.row-C.row)}function x(k,C){var R=k.lines,N=k.end;k.end=f(C);var I=k.end.row-k.start.row,L=R.splice(I,R.length),B=I?C.column:C.column-k.start.column;R.push(L[0].substring(0,B)),L[0]=L[0].substr(B);var P={start:f(C),end:N,lines:L,action:k.action};return P}function M(k,C){C=s(C);for(var R=k.length;R--;){for(var N=k[R],I=0;I<N.length;I++){var L=N[I],B=c(L,C);C=B[0],B.length!=2&&(B[2]?(N.splice(I+1,1,B[1],B[2]),I++):B[1]||(N.splice(I,1),I--))}N.length||k.splice(R,1)}return k}function $(k,C){for(var R=0;R<C.length;R++)for(var N=C[R],I=0;I<N.length;I++)M(k,N[I])}r.UndoManager=p}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,r,d){var p=t("../range").Range,g=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 p(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,l=this.folds,u,i,c,m=!0;f==null&&(f=this.end.row,s=this.end.column);for(var w=0;w<l.length;w++){if(u=l[w],i=u.range.compareStart(f,s),i==-1){h(null,f,s,a,m);return}if(c=h(null,u.start.row,u.start.column,a,m),c=!c&&h(u.placeholder,u.start.row,u.start.column,a),c||i===0)return;m=!u.sameRow,a=u.end.column}h(null,f,s,a,m)},b.prototype.getNextFoldTo=function(h,f){for(var s,a,l=0;l<this.folds.length;l++){if(s=this.folds[l],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),l,u;if(a){if(l=a.fold,a.kind=="inside"&&l.start.column!=f&&l.start.row!=h)window.console&&window.console.log(h,f,l);else if(l.start.row==h){u=this.folds;var i=u.indexOf(l);for(i===0&&(this.start.column+=s),i;i<u.length;i++){if(l=u[i],l.start.column+=s,!l.sameRow)return;l.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,l=this.folds,u=this.foldData,i=l.indexOf(a),c=l[i-1];this.end.row=c.end.row,this.end.column=c.end.column,l=l.splice(i,l.length-i);var m=new b(u,l);return u.splice(u.indexOf(this)+1,0,m),m},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=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(t,r,d){var p=t("./range").Range,g=p.comparePoints,b=function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(f,s,a){for(var l=this.ranges,u=a||0;u<l.length;u++){var i=l[u],c=g(f,i.end);if(!(c>0)){var m=g(f,i.start);return c===0?s&&m!==0?-u-2:u:m>0||m===0&&!s?u:-u-1}}return-u-1},h.prototype.add=function(f){var s=!f.isEmpty(),a=this.pointIndex(f.start,s);a<0&&(a=-a-1);var l=this.pointIndex(f.end,s,a);return l<0?l=-l-1:l++,this.ranges.splice(a,l-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(c,m){return g(c.start,m.start)});for(var a=s[0],l,u=1;u<s.length;u++){l=a,a=s[u];var i=g(l.end,a.start);i<0||i==0&&!l.isEmpty()&&!a.isEmpty()||(g(l.end,a.end)<0&&(l.end.row=a.end.row,l.end.column=a.end.column),s.splice(u,1),f.push(a),a=l,u--)}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 l=this.pointIndex({row:f,column:0});l<0&&(l=-l-1);var u=this.pointIndex({row:s,column:0},l);u<0&&(u=-u-1);for(var i=[],c=l;c<u;c++)i.push(a[c]);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,l=s.row,u=a.row,i=this.ranges,c=0,m=i.length;c<m;c++){var w=i[c];if(w.end.row>=l)break}if(f.action=="insert")for(var x=u-l,M=-s.column+a.column;c<m;c++){var w=i[c];if(w.start.row>l)break;if(w.start.row==l&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=M,w.start.row+=x)),w.end.row==l&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&M>0&&c<m-1&&w.end.column>w.start.column&&w.end.column==i[c+1].start.column&&(w.end.column-=M),w.end.column+=M,w.end.row+=x}}else for(var x=l-u,M=s.column-a.column;c<m;c++){var w=i[c];if(w.start.row>u)break;w.end.row<u&&(l<w.end.row||l==w.end.row&&s.column<w.end.column)?(w.end.row=l,w.end.column=s.column):w.end.row==u?w.end.column<=a.column?(x||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=M,w.end.row+=x):w.end.row>u&&(w.end.row+=x),w.start.row<u&&(l<w.start.row||l==w.start.row&&s.column<w.start.column)?(w.start.row=l,w.start.column=s.column):w.start.row==u?w.start.column<=a.column?(x||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=M,w.start.row+=x):w.start.row>u&&(w.start.row+=x)}if(x!=0&&c<m)for(;c<m;c++){var w=i[c];w.start.row+=x,w.end.row+=x}},h}();b.prototype.comparePoints=g,r.RangeList=b}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(t,r,d){var p=this&&this.__extends||function(){var l=function(u,i){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(c[w]=m[w])},l(u,i)};return function(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");l(u,i);function c(){this.constructor=u}u.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}(),g=t("../range_list").RangeList,b=function(l){p(u,l);function u(i,c){var m=l.call(this)||this;return m.foldLine=null,m.placeholder=c,m.range=i,m.start=i.start,m.end=i.end,m.sameRow=i.start.row==i.end.row,m.subFolds=m.ranges=[],m}return u.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},u.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(c){c.setFoldLine(i)})},u.prototype.clone=function(){var i=this.range.clone(),c=new u(i,this.placeholder);return this.subFolds.forEach(function(m){c.subFolds.push(m.clone())}),c.collapseChildren=this.collapseChildren,c},u.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){f(i,this.start);for(var c=i.start.row,m=i.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(c,m),x==1);w++);var M=this.subFolds[w],$=0;if(x==0){if(M.range.containsRange(i))return M.addSubFold(i);$=1}for(var c=i.range.end.row,m=i.range.end.column,k=w,x=-1;k<this.subFolds.length&&(x=this.subFolds[k].range.compare(c,m),x==1);k++);x==0&&k++;for(var C=this.subFolds.splice(w,k-w,i),R=x==0?C.length-1:C.length,N=$;N<R;N++)i.addSubFold(C[N]);return i.setFoldLine(this.foldLine),i}},u.prototype.restoreRange=function(i){return a(i,this.start)},u}(g);function h(l,u){l.row-=u.row,l.row==0&&(l.column-=u.column)}function f(l,u){h(l.start,u),h(l.end,u)}function s(l,u){l.row==0&&(l.column+=u.column),l.row+=u.row}function a(l,u){s(l.start,u),s(l.end,u)}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(t,r,d){var p=t("../range").Range,g=t("./fold_line").FoldLine,b=t("./fold").Fold,h=t("../token_iterator").TokenIterator,f=t("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(a,l,u){var i=this.getFoldLine(a);if(!i)return null;for(var c=i.folds,m=0;m<c.length;m++){var w=c[m].range;if(w.contains(a,l)){if(u==1&&w.isEnd(a,l)&&!w.isEmpty()||u==-1&&w.isStart(a,l)&&!w.isEmpty())continue;return c[m]}}},this.getFoldsInRange=function(a){var l=a.start,u=a.end,i=this.$foldData,c=[];l.column+=1,u.column-=1;for(var m=0;m<i.length;m++){var w=i[m].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=i[m].folds,M=0;M<x.length;M++){var $=x[M];if(w=$.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;c.push($)}}}}return l.column-=1,u.column+=1,c},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var l=[];a.forEach(function(i){l=l.concat(this.getFoldsInRange(i))},this)}else var l=this.getFoldsInRange(a);return l},this.getAllFolds=function(){for(var a=[],l=this.$foldData,u=0;u<l.length;u++)for(var i=0;i<l[u].folds.length;i++)a.push(l[u].folds[i]);return a},this.getFoldStringAt=function(a,l,u,i){if(i=i||this.getFoldLine(a),!i)return null;for(var c={end:{column:0}},m,w,x=0;x<i.folds.length;x++){w=i.folds[x];var M=w.range.compareEnd(a,l);if(M==-1){m=this.getLine(w.start.row).substring(c.end.column,w.start.column);break}else if(M===0)return null;c=w}return m||(m=this.getLine(w.start.row).substring(c.end.column)),u==-1?m.substring(0,l-c.end.column):u==1?m.substring(l-c.end.column):m},this.getFoldLine=function(a,l){var u=this.$foldData,i=0;for(l&&(i=u.indexOf(l)),i==-1&&(i=0),i;i<u.length;i++){var c=u[i];if(c.start.row<=a&&c.end.row>=a)return c;if(c.end.row>a)return null}return null},this.getNextFoldLine=function(a,l){var u=this.$foldData,i=0;for(l&&(i=u.indexOf(l)),i==-1&&(i=0),i;i<u.length;i++){var c=u[i];if(c.end.row>=a)return c}return null},this.getFoldedRowCount=function(a,l){for(var u=this.$foldData,i=l-a+1,c=0;c<u.length;c++){var m=u[c],w=m.end.row,x=m.start.row;if(w>=l){x<l&&(x>=a?i-=l-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(l,u){return l.start.row-u.start.row}),a},this.addFold=function(a,l){var u=this.$foldData,i=!1,c;a instanceof b?c=a:(c=new b(l,a),c.collapseChildren=l.collapseChildren),this.$clipRangeToDocument(c.range);var m=c.start.row,w=c.start.column,x=c.end.row,M=c.end.column,$=this.getFoldAt(m,w,1),k=this.getFoldAt(x,M,-1);if($&&k==$)return $.addSubFold(c);$&&!$.range.isStart(m,w)&&this.removeFold($),k&&!k.range.isEnd(x,M)&&this.removeFold(k);var C=this.getFoldsInRange(c.range);C.length>0&&(this.removeFolds(C),c.collapseChildren||C.forEach(function(L){c.addSubFold(L)}));for(var R=0;R<u.length;R++){var N=u[R];if(x==N.start.row){N.addFold(c),i=!0;break}else if(m==N.end.row){if(N.addFold(c),i=!0,!c.sameRow){var I=u[R+1];if(I&&I.start.row==x){N.merge(I);break}}break}else if(x<=N.start.row)break}return i||(N=this.$addFoldLine(new g(this.$foldData,c))),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:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(l){this.addFold(l)},this)},this.removeFold=function(a){var l=a.foldLine,u=l.start.row,i=l.end.row,c=this.$foldData,m=l.folds;if(m.length==1)c.splice(c.indexOf(l),1);else if(l.range.isEnd(a.end.row,a.end.column))m.pop(),l.end.row=m[m.length-1].end.row,l.end.column=m[m.length-1].end.column;else if(l.range.isStart(a.start.row,a.start.column))m.shift(),l.start.row=m[0].start.row,l.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var w=l.split(a.start.row,a.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(u,i):this.$updateRowLengthCache(u,i)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var l=[],u=0;u<a.length;u++)l.push(a[u]);l.forEach(function(i){this.removeFold(i)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(l){a.restoreRange(l),this.addFold(l)},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(l){this.expandFold(l)},this)},this.unfold=function(a,l){var u,i;if(a==null)u=new p(0,0,this.getLength(),0),l==null&&(l=!0);else if(typeof a=="number")u=new p(a,0,a,this.getLine(a).length);else if("row"in a)u=p.fromPoints(a,a);else{if(Array.isArray(a))return i=[],a.forEach(function(m){i=i.concat(this.unfold(m))},this),i;u=a}i=this.getFoldsInRangeList(u);for(var c=i;i.length==1&&p.comparePoints(i[0].start,u.start)<0&&p.comparePoints(i[0].end,u.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(u);if(l!=!1?this.removeFolds(i):this.expandFolds(i),c.length)return c},this.isRowFolded=function(a,l){return!!this.getFoldLine(a,l)},this.getRowFoldEnd=function(a,l){var u=this.getFoldLine(a,l);return u?u.end.row:a},this.getRowFoldStart=function(a,l){var u=this.getFoldLine(a,l);return u?u.start.row:a},this.getFoldDisplayLine=function(a,l,u,i,c){i==null&&(i=a.start.row),c==null&&(c=0),l==null&&(l=a.end.row),u==null&&(u=this.getLine(l).length);var m=this.doc,w="";return a.walk(function(x,M,$,k){if(!(M<i)){if(M==i){if($<c)return;k=Math.max(c,k)}x!=null?w+=x:w+=m.getLine(M).substring(k,$)}},l,u),w},this.getDisplayLine=function(a,l,u,i){var c=this.getFoldLine(a);if(c)return this.getFoldDisplayLine(c,a,l,u,i);var m;return m=this.doc.getLine(a),m.substring(i||0,l||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(l){var u=l.folds.map(function(i){return i.clone()});return new g(a,u)}),a},this.toggleFold=function(a){var l=this.selection,u=l.getRange(),i,c;if(u.isEmpty()){var m=u.start;if(i=this.getFoldAt(m.row,m.column),i){this.expandFold(i);return}else if(a){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(c=this.findMatchingBracket(m))?u.comparePoint(c)==1?u.end=c:(u.start=c,u.start.column++,u.end.column--):(c=this.findMatchingBracket({row:m.row,column:m.column+1}))?(u.comparePoint(c)==1?u.end=c:u.start=c,u.start.column++):u=this.getCommentFoldRange(m.row,m.column)||u}else{var x=this.getFoldsInRange(u);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(i=x[0])}if(i||(i=this.getFoldAt(u.start.row,u.start.column)),i&&i.range.toString()==u.toString()){this.expandFold(i);return}var M="...";if(!u.isMultiLine()){if(M=this.getTextRange(u),M.length<4)return;M=M.trim().substring(0,2)+".."}this.addFold(M,u)},this.getCommentFoldRange=function(a,l,u){var i=new h(this,a,l),c=i.getCurrentToken(),m=c&&c.type;if(c&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),x=new p;if(u!=1){do c=i.stepBackward();while(c&&w.test(c.type));c=i.stepForward()}x.start.row=i.getCurrentTokenRow(),x.start.column=i.getCurrentTokenColumn()+c.value.length,i=new h(this,a,l);var M=this.getState(i.$row);if(u!=-1){var $=-1;do if(c=i.stepForward(),$==-1){var k=this.getState(i.$row);M.toString()!==k.toString()&&($=i.$row)}else if(i.$row>$)break;while(c&&w.test(c.type));c=i.stepBackward()}else c=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,l,u,i){u==null&&(u=1e5);var c=this.foldWidgets;if(c){l=l||this.getLength(),a=a||0;for(var m=a;m<l;m++)if(c[m]==null&&(c[m]=this.getFoldWidget(m)),c[m]=="start"&&!(i&&!i(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=l&&w.start.row>=a&&(m=w.end.row,w.collapseChildren=u,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(l){for(var u=a.getTokens(l),i=0;i<u.length;i++){var c=u[i];if(!(c.type=="text"&&/^\s+$/.test(c.value)))return!!/comment/.test(c.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 l=this.$foldMode;this.$setFolding(null),this.$setFolding(l)}},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,l){var u=this.foldWidgets;if(!u||l&&u[a])return{};for(var i=a-1,c;i>=0;){var m=u[i];if(m==null&&(m=u[i]=this.getFoldWidget(i)),m=="start"){var w=this.getFoldWidgetRange(i);if(c||(c=w),w&&w.end.row>=a)break}i--}return{range:i!==-1&&w,firstRange:c}},this.onFoldWidgetClick=function(a,l){l instanceof f&&(l=l.domEvent);var u={children:l.shiftKey,all:l.ctrlKey||l.metaKey,siblings:l.altKey},i=this.$toggleFoldWidget(a,u);if(!i){var c=l.target||l.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,l){if(this.getFoldWidget){var u=this.getFoldWidget(a),i=this.getLine(a),c=u==="end"?-1:1,m=this.getFoldAt(a,c===-1?0:i.length,c);if(m)return l.children||l.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(l.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var M=x.range.start.row+1,$=x.range.end.row;this.foldAll(M,$,l.all?1e4:0)}else l.children?($=w?w.end.row:this.getLength(),this.foldAll(a+1,$,l.all?1e4:0)):w&&(l.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var l=this.selection.getCursor().row;l=this.getRowFoldStart(l);var u=this.$toggleFoldWidget(l,{});if(!u){var i=this.getParentFoldRangeData(l,!0);if(u=i.range||i.firstRange,u){l=u.start.row;var c=this.getFoldAt(l,this.getLine(l).length,1);c?this.removeFold(c):this.addFold("...",u)}}},this.updateFoldWidgets=function(a){var l=a.start.row,u=a.end.row-l;if(u===0)this.foldWidgets[l]=null;else if(a.action=="remove")this.foldWidgets.splice(l,u+1,null);else{var i=Array(u+1);i.unshift(l,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(a){var l=a.data;l.first!=l.last&&this.foldWidgets.length>l.first&&this.foldWidgets.splice(l.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,r,d){var p=t("../token_iterator").TokenIterator,g=t("../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,l=f.charAt(h.column-1),u=l&&l.match(/([\(\[\{])|([\)\]\}])/);if(u||(l=f.charAt(h.column),h={row:h.row,column:h.column+1},u=l&&l.match(/([\(\[\{])|([\)\]\}])/),s=!1),!u)return null;if(u[1]){var i=this.$findClosingBracket(u[1],h);if(!i)return null;a=g.fromPoints(h,i),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var i=this.$findOpeningBracket(u[2],h);if(!i)return null;a=g.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=/([\(\[\{])|([\)\]\}])/,l=!f&&s.charAt(h.column-1),u=l&&l.match(a);if(u||(l=(f===void 0||f)&&s.charAt(h.column),h={row:h.row,column:h.column+1},u=l&&l.match(a)),!u)return null;var i=new g(h.row,h.column-1,h.row,h.column),c=u[1]?this.$findClosingBracket(u[1],h):this.$findOpeningBracket(u[2],h);if(!c)return[i];var m=new g(c.row,c.column,c.row,c.column+1);return[i,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,f,s){var a=this.$brackets[h],l=1,u=new p(this,f.row,f.column),i=u.getCurrentToken();if(i||(i=u.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 c=f.column-u.getCurrentTokenColumn()-2,m=i.value;;){for(;c>=0;){var w=m.charAt(c);if(w==a){if(l-=1,l==0)return{row:u.getCurrentTokenRow(),column:c+u.getCurrentTokenColumn()}}else w==h&&(l+=1);c-=1}do i=u.stepBackward();while(i&&!s.test(i.type));if(i==null)break;m=i.value,c=m.length-1}return null}},this.$findClosingBracket=function(h,f,s){var a=this.$brackets[h],l=1,u=new p(this,f.row,f.column),i=u.getCurrentToken();if(i||(i=u.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 c=f.column-u.getCurrentTokenColumn();;){for(var m=i.value,w=m.length;c<w;){var x=m.charAt(c);if(x==a){if(l-=1,l==0)return{row:u.getCurrentTokenRow(),column:c+u.getCurrentTokenColumn()}}else x==h&&(l+=1);c+=1}do i=u.stepForward();while(i&&!s.test(i.type));if(i==null)break;c=0}return null}},this.getMatchingTags=function(h){var f=new p(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,l=f.value,u=0,i=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);f=h.stepForward();var c=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+f.value.length),m=!1;do{if(s=f,s.type.indexOf("tag-close")!==-1&&!m){var w=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);m=!0}if(f=h.stepForward(),f){if(f.value===">"&&!m){var w=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);m=!0}if(f.type.indexOf("tag-name")!==-1){if(a=f.value,l===a){if(s.value==="<")u++;else if(s.value==="</"&&(u--,u<0)){h.stepBackward();var x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);f=h.stepForward();var M=new g(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 g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(l===a&&f.value==="/>"&&(u--,u<0))var x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),M=x,$=M,w=new g(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(f&&u>=0);if(i&&w&&x&&$&&c&&M)return{openTag:new g(i.start.row,i.start.column,w.end.row,w.end.column),closeTag:new g(x.start.row,x.start.column,$.end.row,$.end.column),openTagName:c,closeTagName:M}},this.$findOpeningTag=function(h,f){var s=h.getCurrentToken(),a=f.value,l=0,u=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),c=i+2,m=new g(u,i,u,c);h.stepForward();var w=new g(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 g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(f=s,u=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),c=i+f.value.length,s=h.stepBackward(),f){if(f.type.indexOf("tag-name")!==-1){if(a===f.value)if(s.value==="<"){if(l++,l>0){var M=new g(u,i,u,c),$=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do f=h.stepForward();while(f&&f.value!==">");var k=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else s.value==="</"&&l--}else if(f.value==="/>"){for(var C=0,R=s;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===a){l--;break}else if(R.value==="<")break;R=h.stepBackward(),C++}for(var N=0;N<C;N++)h.stepForward()}}while(s&&l<=0);if($&&k&&m&&x&&M&&w)return{openTag:new g($.start.row,$.start.column,k.end.row,k.end.column),closeTag:new g(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:M,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(t,r,d){var p=t("./lib/oop"),g=t("./lib/lang"),b=t("./bidihandler").BidiHandler,h=t("./config"),f=t("./lib/event_emitter").EventEmitter,s=t("./selection").Selection,a=t("./mode/text").Mode,l=t("./range").Range,u=t("./line_widgets").LineWidgets,i=t("./document").Document,c=t("./background_tokenizer").BackgroundTokenizer,m=t("./search_highlight").SearchHighlight,w=t("./undomanager").UndoManager,x=function(){function P(O,A){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 c(new a().getTokenizer(),this);var S=this;this.bgTokenizer.on("update",function(D){S._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(A),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=g.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 A=this.selection.toJSON();this.curOp.selectionAfter=A,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(A),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 u(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 A=this.$docRowCache.length,S=this.$getRowCacheIndex(this.$docRowCache,O)+1;A>S&&(this.$docRowCache.splice(S,A),this.$screenRowCache.splice(S,A))},P.prototype.$getRowCacheIndex=function(O,A){for(var S=0,D=O.length-1;S<=D;){var z=S+D>>1,U=O[z];if(A>U)S=z+1;else if(A<U)D=z-1;else return z}return S-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 A=O.data;this.$resetRowCache(A.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var A=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(A&&A.length&&(this.$undoManager.add({action:"removeFolds",folds:A},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 A=new w;A.$undoStack=O.history.undo,A.$redoStack=O.history.redo,A.mark=O.history.mark,A.$rev=O.history.rev;var S=new P(O.value);return O.folds.forEach(function(D){S.addFold("...",l.fromPoints(D.start,D.end))}),S.setAnnotations(O.annotations),S.setBreakpoints(O.breakpoints),S.setMode(O.mode),S.setScrollLeft(O.scrollLeft),S.setScrollTop(O.scrollTop),S.setUndoManager(A),S.selection.fromJSON(O.selection),S},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,A){var S=this.bgTokenizer.getTokens(O),D,z=0;if(A==null){var U=S.length-1;z=this.getLine(O).length}else for(var U=0;U<S.length&&(z+=S[U].value.length,!(z>=A));U++);return D=S[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 A=this;O.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=g.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()?g.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,A){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+A,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(O){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(O)},P.prototype.addGutterCustomWidget=function(O,A){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(O,A)},P.prototype.removeGutterDecoration=function(O,A){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var A=0;A<O.length;A++)this.$breakpoints[O[A]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,A){A===void 0&&(A="ace_breakpoint"),A?this.$breakpoints[O]=A:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,A,S,D){var z=this.$markerId++,U={range:O,type:S||"line",renderer:typeof S=="function"?S:null,clazz:A,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,A){if(O.update){var S=this.$markerId++;return O.id=S,O.inFront=!!A,A?(this.$frontMarkers[S]=O,this._signal("changeFrontMarker")):(this.$backMarkers[S]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var A=this.$frontMarkers[O]||this.$backMarkers[O];if(A){var S=A.inFront?this.$frontMarkers:this.$backMarkers;delete S[O],this._signal(A.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var A=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(A)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,A,S,D){typeof A!="number"&&(S=A,A=O),S||(S="ace_step");var z=new l(O,0,A,1/0);return z.id=this.addMarker(z,S,"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 A=O.match(/^.*?(\r?\n)/m);A?this.$autoNewLine=A[1]:this.$autoNewLine=`
198
+ `},P.prototype.getWordRange=function(O,A){var S=this.getLine(O),D=!1;if(A>0&&(D=!!S.charAt(A-1).match(this.tokenRe)),D||(D=!!S.charAt(A).match(this.tokenRe)),D)var z=this.tokenRe;else if(/^\s+$/.test(S.slice(A-1,A+1)))var z=/\s/;else var z=this.nonTokenRe;var U=A;if(U>0){do U--;while(U>=0&&S.charAt(U).match(z));U++}for(var K=A;K<S.length&&S.charAt(K).match(z);)K++;return new l(O,U,O,K)},P.prototype.getAWordRange=function(O,A){for(var S=this.getWordRange(O,A),D=this.getLine(S.end.row);D.charAt(S.end.column).match(/[ \t]/);)S.end.column+=1;return S},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 A=O.data;this.bgTokenizer.start(A.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,A){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var S=O,D=S.path}else D=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[D]&&!S){this.$onChangeMode(this.$modes[D]),A&&A();return}this.$modeId=D,h.loadModule(["mode",D],(function(z){if(!this.destroyed){if(this.$modeId!==D)return A&&A();this.$modes[D]&&!S?this.$onChangeMode(this.$modes[D]):z&&z.Mode&&(z=new z.Mode(S),S||(this.$modes[D]=z,z.$id=D),this.$onChangeMode(z)),A&&A()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,A){if(A||(this.$modeId=O.$id),this.$mode!==O){var S=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,A||(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:S,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(A){A&&A.screenWidth>O&&(O=A.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 A=this.doc.getAllLines(),S=this.$rowLengthCache,D=0,z=0,U=this.$foldData[z],K=U?U.start.row:1/0,X=A.length,ee=0;ee<X;ee++){if(ee>K){if(ee=U.end.row+1,ee>=X)break;U=this.$foldData[z++],K=U?U.start.row:1/0}S[ee]==null&&(S[ee]=this.$getStringScreenWidth(A[ee])[0]),S[ee]>D&&(D=S[ee])}this.screenWidth=D}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,A){return this.doc.getLines(O,A)},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,A){return this.doc.insert(O,A)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,A){return this.doc.removeFullLines(O,A)},P.prototype.undoChanges=function(O,A){if(O.length){this.$fromUndo=!0;for(var S=O.length-1;S!=-1;S--){var D=O[S];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!A&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,A){if(O.length){this.$fromUndo=!0;for(var S=0;S<O.length;S++){var D=O[S];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!A&&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,A){function S(X){return A?X.action!=="insert":X.action==="insert"}for(var D,z,U=0;U<O.length;U++){var K=O[U];if(K.start){if(!D){S(K)?D=l.fromPoints(K.start,K.end):D=l.fromPoints(K.start,K.start);continue}S(K)?(z=K.start,D.compare(z.row,z.column)==-1&&D.setStart(z),z=K.end,D.compare(z.row,z.column)==1&&D.setEnd(z)):(z=K.start,D.compare(z.row,z.column)==-1&&(D=l.fromPoints(K.start,K.start)))}}return D},P.prototype.replace=function(O,A){return this.doc.replace(O,A)},P.prototype.moveText=function(O,A,S){var D=this.getTextRange(O),z=this.getFoldsInRange(O),U=l.fromPoints(A,A);if(!S){this.remove(O);var K=O.start.row-O.end.row,X=K?-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)),K&&U.start.row>=O.end.row&&(U.start.row+=K,U.end.row+=K)}if(U.end=this.insert(U.start,D),z.length){var ee=O.start,de=U.start,K=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+=K,se.end.row+=K,se}))}return U},P.prototype.indentRows=function(O,A,S){S=S.replace(/\t/g,this.getTabString());for(var D=O;D<=A;D++)this.doc.insertInLine({row:D,column:0},S)},P.prototype.outdentRows=function(O){for(var A=O.collapseRows(),S=new l(0,0,0,0),D=this.getTabSize(),z=A.start.row;z<=A.end.row;++z){var U=this.getLine(z);S.start.row=z,S.end.row=z;for(var K=0;K<D&&U.charAt(K)==" ";++K);K<D&&U.charAt(K)==" "?(S.start.column=K,S.end.column=K+1):(S.start.column=0,S.end.column=K),this.remove(S)}},P.prototype.$moveLines=function(O,A,S){if(O=this.getRowFoldStart(O),A=this.getRowFoldEnd(A),S<0){var D=this.getRowFoldStart(O+S);if(D<0)return 0;var z=D-O}else if(S>0){var D=this.getRowFoldEnd(A+S);if(D>this.doc.getLength()-1)return 0;var z=D-A}else{O=this.$clipRowToDocument(O),A=this.$clipRowToDocument(A);var z=A-O+1}var U=new l(O,0,A,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(ee){return ee=ee.clone(),ee.start.row+=z,ee.end.row+=z,ee}),X=S==0?this.doc.getLines(O,A):this.doc.removeFullLines(O,A);return this.doc.insertFullLines(O+z,X),K.length&&this.addFolds(K),z},P.prototype.moveLinesUp=function(O,A){return this.$moveLines(O,A,-1)},P.prototype.moveLinesDown=function(O,A){return this.$moveLines(O,A,1)},P.prototype.duplicateLines=function(O,A){return this.$moveLines(O,A,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,A){return A<0?0:Math.min(this.doc.getLine(O).length,A)},P.prototype.$clipPositionToDocument=function(O,A){if(A=Math.max(0,A),O<0)O=0,A=0;else{var S=this.doc.getLength();O>=S?(O=S-1,A=this.doc.getLine(S-1).length):A=Math.min(this.doc.getLine(O).length,A)}return{row:O,column:A}},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 A=this.doc.getLength()-1;return O.end.row>A?(O.end.row=A,O.end.column=this.doc.getLine(A).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 A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,A){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:O,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,A){var S=this.$wrapLimitRange;S.max<0&&(S={min:A,max:A});var D=this.$constrainWrapLimit(O,S.min,S.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,A,S){return A&&(O=Math.max(A,O)),S&&(O=Math.min(S,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 A=this.$useWrapMode,S=O.action,D=O.start,z=O.end,U=D.row,K=z.row,X=K-U,ee=null;if(this.$updating=!0,X!=0)if(S==="remove"){this[A?"$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)}K=U}else{var ue=Array(X);ue.unshift(U,0);var me=A?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,ue);var de=this.$foldData,te=this.getFoldLine(U),le=0;if(te){var Ae=te.range.compareInside(D.row,D.column);Ae==0?(te=te.split(D.row,D.column),te&&(te.shiftRow(X),te.addRemoveChars(K,0,z.column-D.column))):Ae==-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),S==="remove"&&(ee=this.getFoldsInRange(O),this.removeFolds(ee),X=-X);var te=this.getFoldLine(U);te&&te.addRemoveChars(U,D.column,X)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(U,K):this.$updateRowLengthCache(U,K),ee},P.prototype.$updateRowLengthCache=function(O,A){this.$rowLengthCache[O]=null,this.$rowLengthCache[A]=null},P.prototype.$updateWrapData=function(O,A){var S=this.doc.getAllLines(),D=this.getTabSize(),z=this.$wrapData,U=this.$wrapLimit,K,X,ee=O;for(A=Math.min(A,S.length-1);ee<=A;)X=this.getFoldLine(ee,X),X?(K=[],X.walk((function(de,te,le,se){var ue;if(de!=null){ue=this.$getDisplayTokens(de,K.length),ue[0]=k;for(var me=1;me<ue.length;me++)ue[me]=C}else ue=this.$getDisplayTokens(S[te].substring(se,le),K.length);K=K.concat(ue)}).bind(this),X.end.row,S[X.end.row].length+1),z[X.start.row]=this.$computeWrapSplits(K,U,D),ee=X.end.row+1):(K=this.$getDisplayTokens(S[ee]),z[ee]=this.$computeWrapSplits(K,U,D),ee++)},P.prototype.$computeWrapSplits=function(O,A,S){if(O.length==0)return[];var D=[],z=O.length,U=0,K=0,X=this.$wrapAsCode,ee=this.$indentedSoftWrap,de=A<=Math.max(2*S,8)||ee===!1?0:Math.floor(A/2);function te(){var Ae=0;if(de===0)return Ae;if(ee)for(var Te=0;Te<O.length;Te++){var Me=O[Te];if(Me==N)Ae+=1;else if(Me==I)Ae+=S;else{if(Me==L)continue;break}}return X&&ee!==!1&&(Ae+=S),Math.min(Ae,de)}function le(Ae){for(var Te=Ae-U,Me=U;Me<Ae;Me++){var Je=O[Me];(Je===12||Je===2)&&(Te-=1)}D.length||(se=te(),D.indent=se),K+=Te,D.push(K),U=Ae}for(var se=0;z-U>A-se;){var ue=U+A-se;if(O[ue-1]>=N&&O[ue]>=N){le(ue);continue}if(O[ue]==k||O[ue]==C){for(ue;ue!=U-1&&O[ue]!=k;ue--);if(ue>U){le(ue);continue}for(ue=U+A,ue;ue<O.length&&O[ue]==C;ue++);if(ue==O.length)break;le(ue);continue}for(var me=Math.max(ue-(A-(A>>2)),U-1);ue>me&&O[ue]<k;)ue--;if(X){for(;ue>me&&O[ue]<k;)ue--;for(;ue>me&&O[ue]==R;)ue--}else for(;ue>me&&O[ue]<N;)ue--;if(ue>me){le(++ue);continue}ue=U+A,O[ue]==$&&ue--,le(ue-se)}return D},P.prototype.$getDisplayTokens=function(O,A){var S=[],D;A=A||0;for(var z=0;z<O.length;z++){var U=O.charCodeAt(z);if(U==9){D=this.getScreenTabSize(S.length+A),S.push(I);for(var K=1;K<D;K++)S.push(L)}else U==32?S.push(N):U>39&&U<48||U>57&&U<64?S.push(R):U>=4352&&B(U)?S.push(M,$):S.push(M)}return S},P.prototype.$getStringScreenWidth=function(O,A,S){if(A==0)return[0,0];A==null&&(A=1/0),S=S||0;var D,z;for(z=0;z<O.length&&(D=O.charCodeAt(z),D==9?S+=this.getScreenTabSize(S):D>=4352&&B(D)?S+=2:S+=1,!(S>A));z++);return[S,z]},P.prototype.getRowLength=function(O){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?A:this.$wrapData[O].length+A},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 A=this.screenToDocumentPosition(O,Number.MAX_VALUE),S=this.$wrapData[A.row];return S.length&&S[0]<A.column?S.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var A=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(A.row,A.column)},P.prototype.getDocumentLastRowColumn=function(O,A){var S=this.documentToScreenRow(O,A);return this.getScreenLastRowColumn(S)},P.prototype.getDocumentLastRowColumnPosition=function(O,A){var S=this.documentToScreenRow(O,A);return this.screenToDocumentPosition(S,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,A){return this.screenToDocumentPosition(O,A).row},P.prototype.screenToDocumentColumn=function(O,A){return this.screenToDocumentPosition(O,A).column},P.prototype.screenToDocumentPosition=function(O,A,S){if(O<0)return{row:0,column:0};var D,le=0,z=0,U,te=0,K=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),Ae=me?me.start.row:1/0;te<=O&&(K=this.getRowLength(le),!(te+K>O||le>=ue));)te+=K,le++,le>Ae&&(le=me.end.row+1,me=this.getNextFoldLine(le,me),Ae=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+K<=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 Je=this.$wrapData[le];Je&&(U=Je[Me],Me>0&&Je.length&&(Te=Je.indent,z=Je[Me-1]||Je[Je.length-1],D=D.substring(z)))}return S!==void 0&&this.$bidiHandler.isBidiRow(te+Me,le,Me)&&(A=this.$bidiHandler.offsetToCol(S)),z+=this.$getStringScreenWidth(D,A-Te)[1],this.$useWrapMode&&z>=U&&(z=U-1),me?me.idxToPosition(z):{row:le,column:z}},P.prototype.documentToScreenPosition=function(O,A){if(typeof A>"u")var S=this.$clipPositionToDocument(O.row,O.column);else S=this.$clipPositionToDocument(O,A);O=S.row,A=S.column;var te=0,D=null,z=null;z=this.getFoldAt(O,A,1),z&&(O=z.start.row,A=z.start.column);var U,de=0,K=this.$docRowCache,X=this.$getRowCacheIndex(K,O),ee=K.length;if(ee&&X>=0)var de=K[X],te=this.$screenRowCache[X],le=O>K[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,A),D=se.start.row):(me=this.getLine(O).substring(0,A),D=O);var Ae=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),Ae=Me>0?Te.indent:0}}return this.lineWidgets&&this.lineWidgets[de]&&this.lineWidgets[de].rowsAbove&&(te+=this.lineWidgets[de].rowsAbove),{row:te,column:Ae+this.$getStringScreenWidth(me)[0]}},P.prototype.documentToScreenColumn=function(O,A){return this.documentToScreenPosition(O,A).column},P.prototype.documentToScreenRow=function(O,A){return this.documentToScreenPosition(O,A).row},P.prototype.getScreenLength=function(){var O=0,A=null;if(this.$useWrapMode)for(var S=this.$wrapData.length,D=0,z=0,A=this.$foldData[z++],U=A?A.start.row:1/0;D<S;){var K=this.$wrapData[D];O+=K?K.length+1:1,D++,D>U&&(D=A.end.row+1,A=this.$foldData[z++],U=A?A.start.row:1/0)}else{O=this.getLength();for(var X=this.$foldData,z=0;z<X.length;z++)A=X[z],O-=A.end.row-A.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(A,S,D){if(S===0)return[0,0];S||(S=1/0),D=D||0;var z,U;for(U=0;U<A.length&&(z=A.charAt(U),z===" "?D+=this.getScreenTabSize(D):D+=O.getCharacterWidth(z),!(D>S));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 A=this.getLine(O.row);return A[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,p.implement(x.prototype,f);var M=1,$=2,k=3,C=4,R=9,N=10,I=11,L=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}t("./edit_session/folding").Folding.call(x.prototype),t("./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(t,r,d){var p=t("./lib/lang"),g=t("./lib/oop"),b=t("./range").Range,h=function(){function l(){this.$options={}}return l.prototype.set=function(u){return g.mixin(this.$options,u),this},l.prototype.getOptions=function(){return p.copyObject(this.$options)},l.prototype.setOptions=function(u){this.$options=u},l.prototype.find=function(u){var i=this.$options,c=this.$matchIterator(u,i);if(!c)return!1;var m=null;return c.forEach(function(w,x,M,$){return m=new b(w,x,M,$),x==$&&i.start&&i.start.start&&i.skipCurrent!=!1&&m.isEqual(i.start)?(m=null,!1):!0}),m},l.prototype.findAll=function(u){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var c=i.range,m=c?u.getLines(c.start.row,c.end.row):u.doc.getAllLines(),w=[],x=i.re;if(i.$isMultiLine){var M=x.length,$=m.length-M,k;e:for(var C=x.offset||0;C<=$;C++){for(var R=0;R<M;R++)if(m[C+R].search(x[R])==-1)continue e;var N=m[C],I=m[C+M-1],L=N.length-N.match(x[0])[0].length,B=I.match(x[M-1])[0].length;k&&k.end.row===C&&k.end.column>L||(w.push(k=new b(C,L,C+M-1,B)),M>2&&(C=C+M-2))}}else for(var P,O=0;O<m.length;O++)if(this.$isMultilineSearch(i)){var A=m.length-1;if(P=this.$multiLineForward(u,x,O,A),P){var S=P.endRow<=A?P.endRow-1:A;S>O&&(O=S),w.push(new b(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=p.getMatchOffsets(m[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(c){for(var z=c.start.column,U=c.end.column,O=0,R=w.length-1;O<R&&w[O].start.column<z&&w[O].start.row==0;)O++;for(var K=c.end.row-c.start.row;O<R&&w[R].end.column>U&&w[R].end.row==K;)R--;for(w=w.slice(O,R+1),O=0,R=w.length;O<R;O++)w[O].start.row+=c.start.row,w[O].end.row+=c.start.row}return w},l.prototype.parseReplaceString=function(u){for(var i={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},c="",m=0,w=u.length;m<w;m++){var x=u.charCodeAt(m);if(x===i.Backslash){if(m++,m>=w){c+="\\";break}var M=u.charCodeAt(m);switch(M){case i.Backslash:c+="\\";break;case i.n:c+=`
199
+ `;break;case i.t:c+=" ";break}continue}if(x===i.DollarSign){if(m++,m>=w){c+="$";break}var $=u.charCodeAt(m);if($===i.DollarSign){c+="$$";continue}if($===i.Digit0||$===i.Ampersand){c+="$&";continue}if(i.Digit1<=$&&$<=i.Digit9){c+="$"+u[m];continue}}c+=u[m]}return c||u},l.prototype.replace=function(u,i){var c=this.$options,m=this.$assembleRegExp(c);if(c.$isMultiLine)return i;if(m){var w=this.$isMultilineSearch(c);w&&(u=u.replace(/\r\n|\r|\n/g,`
200
+ `));var x=m.exec(u);if(!x||!w&&x[0].length!=u.length)return null;if(i=c.regExp?this.parseReplaceString(i):i.replace(/\$/g,"$$$$"),i=u.replace(m,i),c.preserveCase){i=i.split("");for(var M=Math.min(u.length,u.length);M--;){var $=u[M];$&&$.toLowerCase()!=$?i[M]=i[M].toUpperCase():i[M]=i[M].toLowerCase()}i=i.join("")}return i}},l.prototype.$assembleRegExp=function(u,i){if(u.needle instanceof RegExp)return u.re=u.needle;var c=u.needle;if(!u.needle)return u.re=!1;u.regExp||(c=p.escapeRegExp(c));var m=u.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),u.$supportsUnicodeFlag=!0,m+="u"}catch{u.$supportsUnicodeFlag=!1}if(u.wholeWord&&(c=f(c,u)),u.$isMultiLine=!i&&/[\n\r]/.test(c),u.$isMultiLine)return u.re=this.$assembleMultilineRegExp(c,m);try{var w=new RegExp(c,m)}catch{w=!1}return u.re=w},l.prototype.$assembleMultilineRegExp=function(u,i){for(var c=u.replace(/\r\n|\r|\n/g,`$
201
+ ^`).split(`
202
+ `),m=[],w=0;w<c.length;w++)try{m.push(new RegExp(c[w],i))}catch{return!1}return m},l.prototype.$isMultilineSearch=function(u){return u.re&&/\\r\\n|\\r|\\n/.test(u.re.source)&&u.regExp&&!u.$isMultiLine},l.prototype.$multiLineForward=function(u,i,c,m){for(var w,x=a(u,c),M=c;M<=m;){for(var $=0;$<x&&!(M>m);$++){var k=u.getLine(M++);w=w==null?k:w+`
203
+ `+k}var C=i.exec(w);if(i.lastIndex=0,C){var R=w.slice(0,C.index).split(`
204
+ `),N=C[0].split(`
205
+ `),I=c+R.length-1,L=R[R.length-1].length,B=I+N.length-1,P=N.length==1?L+N[0].length:N[N.length-1].length;return{startRow:I,startCol:L,endRow:B,endCol:P}}}return null},l.prototype.$multiLineBackward=function(u,i,c,m,w){for(var x,M=a(u,m),$=u.getLine(m).length-c,k=m;k>=w;){for(var C=0;C<M&&k>=w;C++){var R=u.getLine(k--);x=x==null?R:R+`
206
+ `+x}var N=s(x,i,$);if(N){var I=x.slice(0,N.index).split(`
207
+ `),L=N[0].split(`
208
+ `),B=k+I.length,P=I[I.length-1].length,O=B+L.length-1,A=L.length==1?P+L[0].length:L[L.length-1].length;return{startRow:B,startCol:P,endRow:O,endCol:A}}}return null},l.prototype.$matchIterator=function(u,i){var c=this.$assembleRegExp(i);if(!c)return!1;var m=this.$isMultilineSearch(i),w=this.$multiLineForward,x=this.$multiLineBackward,M=i.backwards==!0,$=i.skipCurrent!=!1,k=c.unicode,C=i.range,R=i.start;R||(R=C?C[M?"end":"start"]:u.selection.getRange()),R.start&&(R=R[$!=M?"end":"start"]);var N=C?C.start.row:0,I=C?C.end.row:u.getLength()-1;if(M)var L=function(O){var A=R.row;if(!P(A,R.column,O)){for(A--;A>=N;A--)if(P(A,Number.MAX_VALUE,O))return;if(i.wrap!=!1){for(A=I,N=R.row;A>=N;A--)if(P(A,Number.MAX_VALUE,O))return}}};else var L=function(O){var A=R.row;if(!P(A,R.column,O)){for(A=A+1;A<=I;A++)if(P(A,0,O))return;if(i.wrap!=!1){for(A=N,I=R.row;A<=I;A++)if(P(A,0,O))return}}};if(i.$isMultiLine)var B=c.length,P=function(O,A,S){var D=M?O-B+1:O;if(!(D<0||D+B>u.getLength())){var z=u.getLine(D),U=z.search(c[0]);if(!(!M&&U<A||U===-1)){for(var K=1;K<B;K++)if(z=u.getLine(D+K),z.search(c[K])==-1)return;var X=z.match(c[B-1])[0].length;if(!(M&&X>A)&&S(D,U,D+B-1,X))return!0}}};else if(M)var P=function(O,A,S){if(m){var D=x(u,c,A,O,N);if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var z=u.getLine(O),U=[],K,X=0;for(c.lastIndex=0;K=c.exec(z);){var ee=K[0].length;if(X=K.index,!ee){if(X>=z.length)break;c.lastIndex=X+=p.skipEmptyMatch(z,X,k)}if(K.index+ee>A)break;U.push(K.index,ee)}for(var de=U.length-1;de>=0;de-=2){var te=U[de-1],ee=U[de];if(S(O,te,O,te+ee))return!0}}};else var P=function(O,A,S){if(c.lastIndex=A,m){var D=w(u,c,O,I);if(D){var z=D.endRow<=I?D.endRow-1:I;z>O&&(O=z)}if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=u.getLine(O),K,X;X=c.exec(U);){var ee=X[0].length;if(K=X.index,S(O,K,O,K+ee))return!0;if(!ee&&(c.lastIndex=K+=p.skipEmptyMatch(U,K,k),K>=U.length))return!1}};return{forEach:L}},l}();function f(l,u){var i=p.supportsLookbehind();function c(M,$){$===void 0&&($=!0);var k=i&&u.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(M)||u.regExp?i&&u.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(l),w=m[0],x=m[m.length-1];return c(w)+l+c(x,!1)}function s(l,u,i){for(var c=null,m=0;m<=l.length;){u.lastIndex=m;var w=u.exec(l);if(!w)break;var x=w.index+w[0].length;if(x>l.length-i)break;(!c||x>c.index+c[0].length)&&(c=w),m=w.index+1}return c}function a(l,u){var i=5e3,c={row:u,column:0},m=l.doc.positionToIndex(c),w=m+i,x=l.doc.indexToPosition(w),M=x.row;return M+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,d){var p=this&&this.__extends||function(){var l=function(u,i){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(c[w]=m[w])},l(u,i)};return function(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");l(u,i);function c(){this.constructor=u}u.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}(),g=t("../lib/keys"),b=t("../lib/useragent"),h=g.KEY_MODS,f=function(){function l(u,i){this.$init(u,i,!1)}return l.prototype.$init=function(u,i,c){this.platform=i||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(u),this.$singleCommand=c},l.prototype.addCommand=function(u){this.commands[u.name]&&this.removeCommand(u),this.commands[u.name]=u,u.bindKey&&this._buildKeyHash(u)},l.prototype.removeCommand=function(u,i){var c=u&&(typeof u=="string"?u:u.name);u=this.commands[c],i||delete this.commands[c];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==u)delete m[w];else if(Array.isArray(x)){var M=x.indexOf(u);M!=-1&&(x.splice(M,1),x.length==1&&(m[w]=x[0]))}}},l.prototype.bindKey=function(u,i,c){if(typeof u=="object"&&u&&(c==null&&(c=u.position),u=u[this.platform]),!!u){if(typeof i=="function")return this.addCommand({exec:i,bindKey:u,name:i.name||u});u.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(k){var C=this.parseKeys(k),R=h[C.hashId]+C.key;w+=(w?" ":"")+R,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var M=this.parseKeys(m),$=h[M.hashId]+M.key;this._addCommandToBinding(w+$,i,c)},this)}},l.prototype._addCommandToBinding=function(u,i,c){var m=this.commandKeyBinding,w;if(!i)delete m[u];else if(!m[u]||this.$singleCommand)m[u]=i;else{Array.isArray(m[u])?(w=m[u].indexOf(i))!=-1&&m[u].splice(w,1):m[u]=[m[u]],typeof c!="number"&&(c=s(i));var x=m[u];for(w=0;w<x.length;w++){var M=x[w],$=s(M);if($>c)break}x.splice(w,0,i)}},l.prototype.addCommands=function(u){u&&Object.keys(u).forEach(function(i){var c=u[i];if(c){if(typeof c=="string")return this.bindKey(c,i);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=i),this.addCommand(c))}},this)},l.prototype.removeCommands=function(u){Object.keys(u).forEach(function(i){this.removeCommand(u[i])},this)},l.prototype.bindKeys=function(u){Object.keys(u).forEach(function(i){this.bindKey(i,u[i])},this)},l.prototype._buildKeyHash=function(u){this.bindKey(u.bindKey,u)},l.prototype.parseKeys=function(u){var i=u.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),c=i.pop(),m=g[c];if(g.FUNCTION_KEYS[m])c=g.FUNCTION_KEYS[m].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var w=0,x=i.length;x--;){var M=g.KEY_MODS[i[x]];if(M==null)return typeof console<"u"&&console.error("invalid modifier "+i[x]+" in "+u),!1;w|=M}return{key:c,hashId:w}},l.prototype.findKeyCommand=function(u,i){var c=h[u]+i;return this.commandKeyBinding[c]},l.prototype.handleKeyboard=function(u,i,c,m){if(!(m<0)){var w=h[i]+c,x=this.commandKeyBinding[w];return u.$keyChain&&(u.$keyChain+=" "+w,x=this.commandKeyBinding[u.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(u.$keyChain=u.$keyChain||w,{command:"null"}):(u.$keyChain&&((!i||i==4)&&c.length==1?u.$keyChain=u.$keyChain.slice(0,-w.length-1):(i==-1||m>0)&&(u.$keyChain="")),{command:x})}},l.prototype.getStatusText=function(u,i){return i.$keyChain||""},l}();function s(l){return typeof l=="object"&&l.bindKey&&l.bindKey.position||(l.isDefault?-100:0)}var a=function(l){p(u,l);function u(i,c){var m=l.call(this,i,c)||this;return m.$singleCommand=!0,m}return u}(f);a.call=function(l,u,i){f.prototype.$init.call(l,u,i,!0)},f.call=function(l,u,i){f.prototype.$init.call(l,u,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(t,r,d){var p=this&&this.__extends||function(){var s=function(a,l){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,i){u.__proto__=i}||function(u,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(u[c]=i[c])},s(a,l)};return function(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");s(a,l);function u(){this.constructor=a}a.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}}(),g=t("../lib/oop"),b=t("../keyboard/hash_handler").MultiHashHandler,h=t("../lib/event_emitter").EventEmitter,f=function(s){p(a,s);function a(l,u){var i=s.call(this,u,l)||this;return i.byName=i.commands,i.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),i}return a.prototype.exec=function(l,u,i){if(Array.isArray(l)){for(var c=l.length;c--;)if(this.exec(l[c],u,i))return!0;return!1}typeof l=="string"&&(l=this.commands[l]);var m={editor:u,command:l,args:i};return this.canExecute(l,u)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(l,u){return typeof l=="string"&&(l=this.commands[l]),!(!l||u&&u.$readOnly&&!l.readOnly||this.$checkCommandState!=!1&&l.isAvailable&&!l.isAvailable(u))},a.prototype.toggleRecording=function(l){if(!this.$inReplay)return l&&l._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(u){this.macro.push([u.command,u.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(l){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(l);try{this.$inReplay=!0,this.macro.forEach(function(u){typeof u=="string"?this.exec(u,l):this.exec(u[0],l,u[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(l){return l.map(function(u){return typeof u[0]!="string"&&(u[0]=u[0].name),u[1]||(u=u[0]),u})},a}(b);g.implement(f.prototype,h),r.CommandManager=f}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,r,d){var p=t("../lib/lang"),g=t("../config"),b=t("../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){g.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){g.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){g.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){g.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(),l=a?s.selection.getLineRange():s.selection.getRange();s._emit("cut",l),l.isEmpty()||s.session.remove(l),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){g.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(p.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(),l=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),u=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),i=s.session.doc.getLine(l.row).length,c=s.session.doc.getTextRange(s.selection.getRange()),m=c.replace(/\n\s*/," ").length,w=s.session.doc.getLine(l.row),x=l.row+1;x<=u.row+1;x++){var M=p.stringTrimLeft(p.stringTrimRight(s.session.doc.getLine(x)));M.length!==0&&(M=" "+M),w+=M}u.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new b(l.row,0,u.row+2,0),w),m>0?(s.selection.moveCursorTo(l.row,l.column),s.selection.selectTo(l.row,l.column+m)):(i=s.session.doc.getLine(l.row).length>i?i+1:i,s.selection.moveCursorTo(l.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,l=s.session.doc.getLine(a).length,u=s.selection.rangeList.ranges,i=[];u.length<1&&(u=[s.selection.getRange()]);for(var c=0;c<u.length;c++)c==u.length-1&&(u[c].end.row===a&&u[c].end.column===l||i.push(new b(u[c].end.row,u[c].end.column,a,l))),c===0?u[c].start.row===0&&u[c].start.column===0||i.push(new b(0,0,u[c].start.row,u[c].start.column)):i.push(new b(u[c-1].end.row,u[c-1].end.column,u[c].start.row,u[c].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var c=0;c<i.length;c++)s.selection.addRange(i[c],!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(t,r,d){var p=t("../lib/keys"),g=t("../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 g(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===p.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=p.enter)return;s.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var l=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),u=this.$findNearestFoldLaneWidget(l),i=this.$findNearestAnnotation(l);if(!(u===null&&i===null)){var c=this.$findClosestNumber(u,i,l);if(c===u)if(this.activeLane="fold",this.activeRowIndex=u,this.$isCustomWidgetVisible(u)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=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===p.tab){s.preventDefault();return}if(s.keyCode===p.escape){s.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(s.keyCode===p.up){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(s.keyCode===p.down){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(s.keyCode===p.left){s.preventDefault(),this.$switchLane("annotation");return}if(s.keyCode===p.right){s.preventDefault(),this.$switchLane("fold");return}if(s.keyCode===p.enter||s.keyCode===p.space){switch(s.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),l=this.editor.session.$gutterCustomWidgets[a];if(l)l.callbacks&&l.callbacks.onClick&&l.callbacks.onClick(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 u=this.lines.cells[this.activeRowIndex].element.childNodes[2],i=u.getBoundingClientRect(),c=this.annotationTooltip.getElement().style;c.left=i.right+"px",c.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)),l=this.$getFoldWidget(s).style.display!=="none";return a&&l},f.prototype.$isCustomWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),l=!!this.$getCustomWidget(s);return a&&l},f.prototype.$isAnnotationVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),l=this.$getAnnotation(s).style.display!=="none";return a&&l},f.prototype.$getFoldWidget=function(s){var a=this.lines.get(s),l=a.element;return l.childNodes[1]},f.prototype.$getCustomWidget=function(s){var a=this.lines.get(s),l=a.element;return l.childNodes[3]},f.prototype.$getAnnotation=function(s){var a=this.lines.get(s),l=a.element;return l.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,l){return s===null?a:a===null||Math.abs(l-s)<=Math.abs(l-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 l=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(l===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$isCustomWidgetVisible(l)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},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 l=this.lines.get(a);if(l.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 p.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(t,r,d){var p=this&&this.__values||function(A){var S=typeof Symbol=="function"&&Symbol.iterator,D=S&&A[S],z=0;if(D)return D.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&z>=A.length&&(A=void 0),{value:A&&A[z++],done:!A}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/oop"),b=t("./lib/dom"),h=t("./lib/lang"),f=t("./lib/useragent"),s=t("./keyboard/textinput").TextInput,a=t("./mouse/mouse_handler").MouseHandler,l=t("./mouse/fold_handler").FoldHandler,u=t("./keyboard/keybinding").KeyBinding,i=t("./edit_session").EditSession,c=t("./search").Search,m=t("./range").Range,w=t("./lib/event_emitter").EventEmitter,x=t("./commands/command_manager").CommandManager,M=t("./commands/default_commands").commands,$=t("./config"),k=t("./token_iterator").TokenIterator,C=t("./keyboard/gutter_handler").GutterKeyboardHandler,R=t("./config").nls,N=t("./clipboard"),I=t("./lib/keys"),L=t("./lib/event"),B=t("./tooltip").HoverTooltip,P=function(){function A(S,D,z){this.id="editor"+ ++A.$uid,this.session,this.$toDestroy=[];var U=S.getContainerElement();this.container=U,this.renderer=S,this.commands=new x(f.isMac?"mac":"win",M),typeof document=="object"&&(this.textInput=new s(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new l(this)),this.keyBinding=new u(this),this.$search=new c().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=h.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(K,X){X._$emitInputEvent.schedule(31)}),this.setSession(D||z&&z.session||new i("")),$.resetOptions(this),z&&this.setOptions(z),$._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},A.prototype.startOperation=function(S){this.session.startOperation(S)},A.prototype.endOperation=function(S){this.session.endOperation(S)},A.prototype.onStartOperation=function(S){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,S||(this.previousCommand=null)},A.prototype.onEndOperation=function(S){if(this.curOp&&this.session){if(S&&S.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(),K=this.renderer.layerConfig;(U.start.row>=K.lastRow||U.end.row<=K.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}},A.prototype.$historyTracker=function(S){if(this.$mergeUndoDeltas){var D=this.prevOp,z=this.$mergeableCommands,U=D.command&&S.command.name==D.command.name;if(S.command.name=="insertstring"){var K=S.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(K)||/\s/.test(D.args)),this.mergeNextCommand=!0}else U=U&&z.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:z.indexOf(S.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(S,D){if(S&&typeof S=="string"&&S!="ace"){this.$keybindingId=S;var z=this;$.loadModule(["keybinding",S],function(U){z.$keybindingId==S&&z.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(S),D&&D()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(S){if(this.session!=S){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=S,S?(this.$onDocumentChange=this.onDocumentChange.bind(this),S.on("change",this.$onDocumentChange),this.renderer.setSession(S),this.$onChangeMode=this.onChangeMode.bind(this),S.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),S.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),S.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),S.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),S.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),S.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=S.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(S)),this._signal("changeSession",{session:S,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),S&&S._signal("changeEditor",{editor:this}),S&&(S.$editor=this),S&&!S.destroyed&&S.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(S,D){return this.session.doc.setValue(S),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),S},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(S){this.renderer.onResize(S)},A.prototype.setTheme=function(S,D){this.renderer.setTheme(S,D)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(S,D){this.renderer.setStyle(S,D)},A.prototype.unsetStyle=function(S){this.renderer.unsetStyle(S)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||b.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(S){this.setOption("fontSize",S)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var S=this;this.$highlightPending=!0,setTimeout(function(){S.$highlightPending=!1;var D=S.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(se){D.removeMarker(se)}),D.$bracketHighlight=null);var z=S.getCursorPosition(),U=S.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(S),X=D.getMatchingBracketRanges(z,K);if(!X){var ee=new k(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(S.session)),!X){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var le="ace_bracket";Array.isArray(X)?X.length==1&&(le="ace_error_bracket"):X=[X],X.length==2&&(m.comparePoints(X[0].end,X[1].start)==0?X=[m.fromPoints(X[0].start,X[1].end)]:m.comparePoints(X[0].start,X[1].end)==0&&(X=[m.fromPoints(X[1].start,X[0].end)])),D.$bracketHighlight={ranges:X,markerIds:X.map(function(se){return D.addMarker(se,le,"text")})},S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(S){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",S))},A.prototype.onBlur=function(S){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",S))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(S){var D=this.session.$useWrapMode,z=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,z,D),this._signal("change",S),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(S){var D=S.data;this.renderer.updateLines(D.first,D.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var S=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)),S.$highlightLineMarker&&!D)S.removeMarker(S.$highlightLineMarker.id),S.$highlightLineMarker=null;else if(!S.$highlightLineMarker&&D){var z=new m(D.row,D.column,D.row,1/0);z.id=S.addMarker(z,"ace_active-line","screenLine"),S.$highlightLineMarker=z}else D&&(S.$highlightLineMarker.start.row=D.row,S.$highlightLineMarker.end.row=D.row,S.$highlightLineMarker.start.column=D.column,S._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(S){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 K=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(K),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var S=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var z=D.start.column,U=D.end.column,K=S.getLine(D.start.row),X=K.substring(z,U);if(!(X.length>5e3||!/[\w\d]/.test(X))){var ee=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:X}),de=K.substring(z-1,U+1);if(ee.test(de))return ee}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(S){this.renderer.updateText(),this._emit("changeMode",S)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var S=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),z=!1;if(!S&&this.$copyWithEmptySelection){z=!0;for(var U=this.selection.getAllRanges(),K=0;K<U.length;K++){var X=U[K];K&&U[K-1].start.row==X.start.row||(S+=this.session.getLine(X.start.row)+D)}}var ee={text:S};return this._signal("copy",ee),N.lineMode=z?ee.text:!1,ee.text},A.prototype.onCopy=function(){this.commands.exec("copy",this)},A.prototype.onCut=function(){this.commands.exec("cut",this)},A.prototype.onPaste=function(S,D){var z={text:S,event:D};this.commands.exec("paste",this,z)},A.prototype.$handlePaste=function(S){typeof S=="string"&&(S={text:S}),this._signal("paste",S);var D=S.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 K=D.split(/\r\n|\r|\n/),X=this.selection.rangeList.ranges,ee=K.length==2&&(!K[0]||!K[1]);if(K.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,K[de])}}},A.prototype.execCommand=function(S,D){return this.commands.exec(S,this,D)},A.prototype.insert=function(S,D){var z=this.session,U=z.getMode(),K=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var X=U.transformAction(z.getState(K.row),"insertion",this,z,S);X&&(S!==X.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),S=X.text)}if(S==" "&&(S=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&S.indexOf(`
211
+ `)==-1){var ee=m.fromPoints(K,K);ee.end.column+=S.length,this.session.remove(ee)}}else{var ee=this.getSelectionRange();K=this.session.remove(ee),this.clearSelection()}if(S==`
212
+ `||S==`\r
213
+ `){var se=z.getLine(K.row);if(K.column>se.search(/\S|$/)){var de=se.substr(K.column).search(/\S|$/);z.doc.removeInLine(K.row,K.column,K.column+de)}}this.clearSelection();var te=K.column,le=z.getState(K.row),se=z.getLine(K.row),ue=U.checkOutdent(le,se,S);if(z.insert(K,S),X&&X.selection&&(X.selection.length==2?this.selection.setSelectionRange(new m(K.row,te+X.selection[0],K.row,te+X.selection[1])):this.selection.setSelectionRange(new m(K.row+X.selection[0],X.selection[1],K.row+X.selection[2],X.selection[3]))),this.$enableAutoIndent){if(z.getDocument().isNewLine(S)){var me=U.getNextLineIndent(le,se.slice(0,K.column),z.getTabString());z.insert({row:K.row+1,column:0},me)}ue&&U.autoOutdent(le,z,K.row)}},A.prototype.autoIndent=function(){for(var S=this.session,D=S.getMode(),z=this.selection.isEmpty()?[new m(0,0,S.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",X="",ee=S.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=S.getState(se-1),K=S.getLine(se-1),X=D.getNextLineIndent(U,K,ee));var ue=S.getLine(se),me=D.$getIndent(ue);if(X!==me){if(me.length>0){var Ae=new m(se,0,se,me.length);S.remove(Ae)}X.length>0&&S.insert({row:se,column:0},X)}D.autoOutdent(U,S,se)}},A.prototype.onTextInput=function(S,D){if(!D)return this.keyBinding.onTextInput(S);this.startOperation({command:{name:"insertstring"}});var z=this.applyComposition.bind(this,S,D);this.selection.rangeCount?this.forEachSelection(z):z(),this.endOperation()},A.prototype.applyComposition=function(S,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),!S&&!z.isEmpty()&&this.remove()}if((S||!this.selection.isEmpty())&&this.insert(S,!0),D.restoreStart||D.restoreEnd){var z=this.selection.getRange();z.start.column-=D.restoreStart,z.end.column-=D.restoreEnd,this.selection.setRange(z)}},A.prototype.onCommandKey=function(S,D,z){return this.keyBinding.onCommandKey(S,D,z)},A.prototype.setOverwrite=function(S){this.session.setOverwrite(S)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(S){this.setOption("scrollSpeed",S)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(S){this.setOption("dragDelay",S)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(S){this.setOption("selectionStyle",S)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(S){this.setOption("highlightActiveLine",S)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(S){this.setOption("highlightSelectedWord",S)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(S){this.renderer.setAnimatedScroll(S)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(S){this.renderer.setShowInvisibles(S)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(S){this.renderer.setDisplayIndentGuides(S)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(S){this.renderer.setHighlightIndentGuides(S)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(S){this.renderer.setShowPrintMargin(S)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(S){this.renderer.setPrintMarginColumn(S)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(S){this.setOption("readOnly",S)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(S){this.setOption("behavioursEnabled",S)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(S){this.setOption("wrapBehavioursEnabled",S)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(S){this.setOption("showFoldWidgets",S)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(S){this.selection.isEmpty()&&(S=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var z=this.session,U=z.getState(D.start.row),K=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)}}K&&(D=K)}this.session.remove(D),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var S=this.getSelectionRange();S.start.column==S.end.column&&S.start.row==S.end.row&&(S.end.column=0,S.end.row++),this.session.remove(S),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var S=this.getCursorPosition();this.insert(`
215
+ `),this.moveCursorToPosition(S)},A.prototype.setGhostText=function(S,D){this.renderer.setGhostText(S,D)},A.prototype.removeGhostText=function(){this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var S=this.getCursorPosition(),D=S.column;if(D!==0){var z=this.session.getLine(S.row),U,K;D<z.length?(U=z.charAt(D)+z.charAt(D-1),K=new m(S.row,D-1,S.row,D+1)):(U=z.charAt(D-1)+z.charAt(D-2),K=new m(S.row,D-2,S.row,D)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},A.prototype.toLowerCase=function(){var S=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(S)},A.prototype.toUpperCase=function(){var S=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(S)},A.prototype.indent=function(){var S=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var z=this.$getSelectedRows();S.indentRows(z.first,z.last," ");return}else if(D.start.column<D.end.column){var U=S.getTextRange(D);if(!/^\s+$/.test(U)){var z=this.$getSelectedRows();S.indentRows(z.first,z.last," ");return}}var K=S.getLine(D.start.row),X=D.start,ee=S.getTabSize(),de=S.documentToScreenColumn(X.row,X.column);if(this.session.getUseSoftTabs())var te=ee-de%ee,le=h.stringRepeat(" ",te);else{for(var te=de%ee;K[D.start.column-1]==" "&&te;)D.start.column--,te--;this.selection.setSelectionRange(D),le=" "}return this.insert(le)},A.prototype.blockIndent=function(){var S=this.$getSelectedRows();this.session.indentRows(S.first,S.last," ")},A.prototype.blockOutdent=function(){var S=this.session.getSelection();this.session.outdentRows(S.getRange())},A.prototype.sortLines=function(){for(var S=this.$getSelectedRows(),D=this.session,z=[],U=S.first;U<=S.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 K=new m(0,0,0,0),U=S.first;U<=S.last;U++){var X=D.getLine(U);K.start.row=U,K.end.row=U,K.end.column=X.length,D.replace(K,z[U-S.first])}},A.prototype.toggleCommentLines=function(){var S=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(S,this.session,D.first,D.last)},A.prototype.toggleBlockComment=function(){var S=this.getCursorPosition(),D=this.session.getState(S.row),z=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,z,S)},A.prototype.getNumberAt=function(S,D){var z=/[\-]?[0-9]+(?:\.[0-9]+)?/g;z.lastIndex=0;for(var U=this.session.getLine(S);z.lastIndex<D;){var K=z.exec(U);if(K.index<=D&&K.index+K[0].length>=D){var X={value:K[0],start:K.index,end:K.index+K[0].length};return X}}return null},A.prototype.modifyNumber=function(S){var D=this.selection.getCursor().row,z=this.selection.getCursor().column,U=new m(D,z-1,D,z),K=this.session.getTextRange(U);if(!isNaN(parseFloat(K))&&isFinite(K)){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?S*=Math.pow(10,X.end-z-1):S*=Math.pow(10,X.end-z),te+=S,te/=Math.pow(10,de);var le=te.toFixed(de),se=new m(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()},A.prototype.toggleWord=function(){var S=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var z=this.getSelectedText(),U=this.selection.getWordRange().start.column,K=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_]+/)&&K.forEach(function(qe,pt){de=ee+qe.length,X>=ee&&X<=de&&(z=qe,te.selection.clearSelection(),te.moveCursorTo(S,ee+U),te.selection.selectTo(S,de+U)),ee=de});for(var le=this.$toggleWordPairs,se,ue=0;ue<le.length;ue++)for(var me=le[ue],Ae=0;Ae<=1;Ae++){var Te=+!Ae,Me=z.match(new RegExp("^\\s?_?("+h.escapeRegExp(me[Ae])+")\\s?$","i"));if(Me){var Je=z.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Me[1])+")($|\\s)","g"));Je&&(se=z.replace(new RegExp(h.escapeRegExp(me[Ae]),"i"),function(qe){var pt=me[Te];return qe.toUpperCase()==qe?pt=pt.toUpperCase():qe.charAt(0).toUpperCase()==qe.charAt(0)&&(pt=pt.substr(0,0)+me[Te].charAt(0).toUpperCase()+pt.substr(1)),pt}),this.insert(se),se="")}}},A.prototype.findLinkAt=function(S,D){var z,U,K=this.session.getLine(S),X=K.split(/((?:https?|ftp):\/\/[\S]+)/),ee=D;ee<0&&(ee=0);var de=0,te=0,le;try{for(var se=p(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(Ae){z={error:Ae}}finally{try{ue&&!ue.done&&(U=se.return)&&U.call(se)}finally{if(z)throw z.error}}return le},A.prototype.openLink=function(){var S=this.selection.getCursor(),D=this.findLinkAt(S.row,S.column);return D&&window.open(D,"_blank"),D!=null},A.prototype.removeLines=function(){var S=this.$getSelectedRows();this.session.removeFullLines(S.first,S.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var S=this.selection,D=this.session,z=S.getRange(),U=S.isBackwards();if(z.isEmpty()){var K=z.start.row;D.duplicateLines(K,K)}else{var X=U?z.start:z.end,ee=D.insert(X,D.getTextRange(z));z.start=X,z.end=ee,S.setSelectionRange(z,U)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(S,D,z){return this.session.moveText(S,D,z)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(S,D){var z,U,K=this.selection;if(!K.inMultiSelectMode||this.inVirtualSelectionMode){var X=K.toOrientedRange();z=this.$getSelectedRows(X),U=this.session.$moveLines(z.first,z.last,D?0:S),D&&S==-1&&(U=0),X.moveBy(U,0),K.fromOrientedRange(X)}else{var ee=K.rangeList.ranges;K.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,Ae=z.last;++se<le;){te&&ee[se].moveBy(te,0);var Te=this.$getSelectedRows(ee[se]);if(D&&Te.first!=Ae||!D&&Te.first>Ae+1)break;Ae=Te.last}for(se--,de=this.session.$moveLines(me,Ae,D?0:S),D&&S==-1&&(ue=se+1);ue<=se;)ee[ue].moveBy(de,0),ue++;D||(de=0),te+=de}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(S){return S=(S||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(S.start.row),last:this.session.getRowFoldEnd(S.end.row)}},A.prototype.onCompositionStart=function(S){this.renderer.showComposition(S)},A.prototype.onCompositionUpdate=function(S){this.renderer.setCompositionText(S)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(S){return S>=this.getFirstVisibleRow()&&S<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(S){return S>=this.renderer.getFirstFullyVisibleRow()&&S<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(S,D){var z=this.renderer,U=this.renderer.layerConfig,K=S*Math.floor(U.height/U.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(K,0)}):D===!1&&(this.selection.moveCursorBy(K,0),this.selection.clearSelection());var X=z.scrollTop;z.scrollBy(0,K*U.lineHeight),D!=null&&z.scrollCursorIntoView(null,.5),z.animateScrolling(X)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(S){this.renderer.scrollToRow(S)},A.prototype.scrollToLine=function(S,D,z,U){this.renderer.scrollToLine(S,D,z,U)},A.prototype.centerSelection=function(){var S=this.getSelectionRange(),D={row:Math.floor(S.start.row+(S.end.row-S.start.row)/2),column:Math.floor(S.start.column+(S.end.column-S.start.column)/2)};this.renderer.alignCursor(D,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(S,D){this.selection.moveCursorTo(S,D)},A.prototype.moveCursorToPosition=function(S){this.selection.moveCursorToPosition(S)},A.prototype.jumpToMatching=function(S,D){var z=this.getCursorPosition(),U=new k(this.session,z.row,z.column),K=U.getCurrentToken(),X=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var ee=K||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),K.value==="<"&&X>1?le[ee.value]++:K.value==="</"&&le[ee.value]--,le[ee.value]===-1&&(de="tag",te=!0));te||(K=ee,X++,ee=U.stepForward(),se=0)}while(ee&&!te);if(de){var Ae,Te;if(de==="bracket")Ae=this.session.getBracketRange(z),Ae||(Ae=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+se-1),Te=Ae.start,(D||Te.row===z.row&&Math.abs(Te.column-z.column)<2)&&(Ae=this.session.getBracketRange(Te)));else if(de==="tag"){if(!ee||ee.type.indexOf("tag-name")===-1)return;if(Ae=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Ae.compare(z.row,z.column)===0){var Me=this.session.getMatchingTags(z);Me&&(Me.openTag.contains(z.row,z.column)?(Ae=Me.closeTag,Te=Ae.start):(Ae=Me.openTag,Me.closeTag.start.row===z.row&&Me.closeTag.start.column===z.column?Te=Ae.end:Te=Ae.start))}Te=Te||Ae.start}Te=Ae&&Ae.cursor||Te,Te&&(S?Ae&&D?this.selection.setRange(Ae):Ae&&Ae.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Te.row,Te.column):this.selection.moveTo(Te.row,Te.column))}}},A.prototype.gotoLine=function(S,D,z){this.selection.clearSelection(),this.session.unfold({row:S-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(S-1,D||0),this.isRowFullyVisible(S-1)||this.scrollToLine(S-1,!0,z)},A.prototype.navigateTo=function(S,D){this.selection.moveTo(S,D)},A.prototype.navigateUp=function(S){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-S||-1,0)},A.prototype.navigateDown=function(S){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(S||1,0)},A.prototype.navigateLeft=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},A.prototype.navigateRight=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},A.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},A.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},A.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},A.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},A.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},A.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},A.prototype.replace=function(S,D){D&&this.$search.set(D);var z=this.$search.find(this.session),U=0;return z&&(this.$tryReplace(z,S)&&(U=1),this.selection.setSelectionRange(z),this.renderer.scrollSelectionIntoView(z.start,z.end)),U},A.prototype.replaceAll=function(S,D){D&&this.$search.set(D);var z=this.$search.findAll(this.session),U=0;if(!z.length)return U;var K=this.getSelectionRange();this.selection.moveTo(0,0);for(var X=z.length-1;X>=0;--X)this.$tryReplace(z[X],S)&&U++;return this.selection.setSelectionRange(K),U},A.prototype.$tryReplace=function(S,D){var z=this.session.getTextRange(S);return D=this.$search.replace(z,D),D!==null?(S.end=this.session.replace(S,D),S):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(S,D,z){D||(D={}),typeof S=="string"||S instanceof RegExp?D.needle=S:typeof S=="object"&&g.mixin(D,S);var U=this.selection.getRange();D.needle==null&&(S=this.session.getTextRange(U)||this.$search.$options.needle,S||(U=this.session.getWordRange(U.start.row,U.start.column),S=this.session.getTextRange(U)),this.$search.set({needle:S})),this.$search.set(D),D.start||this.$search.set({start:U});var K=this.$search.find(this.session);if(D.preventScroll)return K;if(K)return this.revealRange(K,z),K;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},A.prototype.findNext=function(S,D){this.find({skipCurrent:!0,backwards:!1},S,D)},A.prototype.findPrevious=function(S,D){this.find(S,{skipCurrent:!0,backwards:!0},D)},A.prototype.revealRange=function(S,D){this.session.unfold(S),this.selection.setSelectionRange(S);var z=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),D!==!1&&this.renderer.animateScrolling(z)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(S){S.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()},A.prototype.setAutoScrollEditorIntoView=function(S){if(S){var D,z=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var K=this.$scrollAnchor;K.style.cssText="position:absolute",this.container.insertBefore(K,this.container.firstChild);var 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&&(K.style.top=ue+"px",K.style.left=le.left+"px",K.style.height=se.lineHeight+"px",K.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))}}},A.prototype.$resetCursorStyle=function(){var S=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(S)),D.isBlinking=!this.$readOnly&&S!="wide",b.setCssClass(D.element,"ace_slim-cursors",/slim/.test(S)))},A.prototype.prompt=function(S,D,z){var U=this;$.loadModule("ace/ext/prompt",function(K){K.prompt(U,S,D,z)})},A}();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"],["&&","||"],["==","!="]],g.implement(P.prototype,w),$.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){var S=this;if(this.textInput.setReadOnly(A),!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){S.hoverTooltip||(S.hoverTooltip=new B);var K=b.createElement("div");K.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),S.hoverTooltip.isOpen||S.hoverTooltip.showForRange(S,S.getSelectionRange(),K)}else S.hoverTooltip&&S.hoverTooltip.isOpen&&S.hoverTooltip.hide()});var D=this.textInput.getElement();A?(L.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(L.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(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){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(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?O.attach(this):O.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var S=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(S&&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(!S&&!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!S&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var S={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===I.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},z;A?(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(S),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(S),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(A){this.$textInputAriaLabel=A},initialValue:""},enableMobileMenu:{set:function(A){this.$enableMobileMenu=A},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(A,S){return(Math.abs(A.selection.lead.row-S)||S+1+(S<9?"·":""))+""},getWidth:function(A,S,D){return Math.max(S.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function(A,S){S.renderer.$loop.schedule(S.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,r,d){var p=t("../lib/dom"),g=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){p.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,l=Math.floor(a/this.canvasHeight),u=s.documentToScreenRow(h,0)*f.lineHeight;return u-l*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=p.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=p.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 l=this.cellCache.pop();if(!l){var u=p.createElement("div");a&&a(u),this.element.appendChild(u),l={element:u,text:"",row:h}}return l.row=h,l},b}();r.Lines=g}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(t,r,d){var p=t("../lib/dom"),g=t("../lib/oop"),b=t("../lib/lang"),h=t("../lib/event_emitter").EventEmitter,f=t("./lines").Lines,s=t("../config").nls,a=function(){function u(i){this.element=p.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 u.prototype.setSession=function(i){this.session&&this.session.off("change",this.$updateAnnotations),this.session=i,i&&i.on("change",this.$updateAnnotations)},u.prototype.addGutterDecoration=function(i,c){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(i,c)},u.prototype.removeGutterDecoration=function(i,c){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(i,c)},u.prototype.setAnnotations=function(i){this.$annotations=[];for(var c=0;c<i.length;c++){var m=i[c],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var M=m.text,$=m.text,k=m.type;M=M?b.escapeHTML(M):m.html||"",$=$||m.html||"",x.text.indexOf(M)===-1&&(x.text.push(M),x.type.push(k),x.displayText.push($));var C=m.className;C?x.className=C:k==="error"?x.className=" ace_error":k==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":k==="info"&&!x.className?x.className=" ace_info":k==="hint"&&!x.className&&(x.className=" ace_hint")}},u.prototype.$updateAnnotations=function(i){if(this.$annotations.length){var c=i.start.row,m=i.end.row-c;if(m!==0)if(i.action=="remove")this.$annotations.splice(c,m+1,null);else{var w=new Array(m+1);w.unshift(c,1),this.$annotations.splice.apply(this.$annotations,w)}}},u.prototype.update=function(i){this.config=i;var c=this.session,m=i.firstRow,w=Math.min(i.lastRow+i.gutterOffset,c.getLength()-1);this.oldLastRow=w,this.config=i,this.$lines.moveContainer(i),this.$updateCursorRow();for(var x=c.getNextFoldLine(m),M=x?x.start.row:1/0,$=null,k=-1,C=m;;){if(C>M&&(C=x.end.row+1,x=c.getNextFoldLine(C,x),M=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}$=this.$lines.get(++k),$?$.row=C:($=this.$lines.createCell(C,i,this.session,l),this.$lines.push($)),this.$renderCell($,i,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(i)},u.prototype.$updateGutterWidth=function(i){var c=this.session,m=c.gutterRenderer||this.$renderer,w=c.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(x=c.getLength()+w-1);var M=m?m.getWidth(c,x,i):x.toString().length*i.characterWidth,$=this.$padding||this.$computePadding();M+=$.left+$.right,M!==this.gutterWidth&&!isNaN(M)&&(this.gutterWidth=M,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",M))},u.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},u.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 c=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<c.length;m++){var w=c[m];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(m>0&&x&&x.start.row==c[m-1].row)w=c[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},u.prototype.scrollLines=function(i){var c=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(c,i))return this.update(i);this.$lines.moveContainer(i);var m=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!c||w<i.firstRow)return this.update(i);if(m<c.firstRow)return this.update(i);if(c.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(w>m)for(var x=this.session.getFoldedRowCount(m+1,w);x>0;x--)this.$lines.pop();i.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLines(i,i.firstRow,c.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(i,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},u.prototype.$renderLines=function(i,c,m){for(var w=[],x=c,M=this.session.getNextFoldLine(x),$=M?M.start.row:1/0;x>$&&(x=M.end.row+1,M=this.session.getNextFoldLine(x,M),$=M?M.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,i,this.session,l);this.$renderCell(k,i,M,x),w.push(k),x++}return w},u.prototype.$renderCell=function(i,c,m,w){var x=i.element,M=this.session,$=x.childNodes[0],k=x.childNodes[1],C=x.childNodes[2],R=x.childNodes[3],N=C.firstChild,I=M.$firstLineNumber,L=M.$breakpoints,B=M.$decorations,P=M.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&M.foldWidgets,A=m?m.start.row:Number.MAX_VALUE,S=c.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(M,w):w+I).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=A&&this.$cursorRow<=m.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)),L[w]&&(D+=L[w]),B[w]&&(D+=B[w]),this.$annotations[w]&&w!==A&&(D+=this.$annotations[w].className),O){var K=O[w];K==null&&(K=O[w]=M.getFoldWidget(w))}if(K){var X="ace_fold-widget ace_"+K,ee=K=="start"&&w==A&&w<m.end.row;if(ee){X+=" ace_closed";for(var de="",te=!1,le=w+1;le<=m.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";k.className!=X&&(k.className=X),p.setStyle(k.style,"height",S),p.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var se=M.getFoldWidgetRange(w);se?k.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])):m?k.setAttribute("aria-label",s("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):k.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),ee?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else k&&(p.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.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,p.setStyle(N.style,"height",S),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",S);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(" ","")),p.setStyle(N.style,"height",S),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",S);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 p.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),p.setStyle(i.element.style,"height",this.$lines.computeLineHeight(w,c,M)+"px"),p.setStyle(i.element.style,"top",this.$lines.computeLineTop(w,c,M)+"px"),i.text=U,C.style.display==="none"&&k.style.display==="none"&&!ue?i.element.setAttribute("aria-hidden",!0):i.element.setAttribute("aria-hidden",!1),i},u.prototype.setHighlightGutterLine=function(i){this.$highlightGutterLine=i},u.prototype.setShowLineNumbers=function(i){this.$renderer=!i&&{getWidth:function(){return 0},getText:function(){return""}}},u.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},u.prototype.setShowFoldWidgets=function(i){i?p.addCssClass(this.element,"ace_folding-enabled"):p.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=i,this.$padding=null},u.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},u.prototype.$hideFoldWidget=function(i,c){var m=c||this.$getGutterCell(i);if(m&&m.element){var w=m.element.childNodes[1];w&&p.setStyle(w.style,"display","none")}},u.prototype.$showFoldWidget=function(i,c){var m=c||this.$getGutterCell(i);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&p.setStyle(w.style,"display","inline-block")}},u.prototype.$getGutterCell=function(i){var c=this.$lines.cells,m=this.session.documentToScreenRow(i,0);return c[i-this.config.firstRowScreen-(i-m)]},u.prototype.$addCustomWidget=function(i,c,m){var w=c.className,x=c.label,M=c.title,$=c.callbacks;this.session.$gutterCustomWidgets[i]={className:w,label:x,title:M,callbacks:$},this.$hideFoldWidget(i,m);var k=m||this.$getGutterCell(i);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=p.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",M),p.setStyle(C.style,"display","inline-block"),p.setStyle(C.style,"height","inherit"),$&&$.onClick&&C.addEventListener("click",function(R){$.onClick(R,i),R.stopPropagation()}),k.element.appendChild(C)}},u.prototype.$removeCustomWidget=function(i,c){delete this.session.$gutterCustomWidgets[i],this.$showFoldWidget(i,c);var m=c||this.$getGutterCell(i);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},u.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var i=p.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},u.prototype.getRegion=function(i){var c=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(i.x<c.left+m.left)return"markers";if(this.$showFoldWidgets&&i.x>m.right-c.right)return"foldWidgets"},u}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,g.implement(a.prototype,h);function l(u){var i=document.createTextNode("");u.appendChild(i);var c=p.createElement("span");u.appendChild(c);var m=p.createElement("span");u.appendChild(m);var w=p.createElement("span");return m.appendChild(w),u}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,r,d){var p=t("../range").Range,g=t("../lib/dom"),b=function(){function f(s){this.element=g.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 l=this.i!=-1&&this.element.childNodes[this.i];l?this.i++:(l=document.createElement("div"),this.element.appendChild(l),this.i=-1),l.style.cssText=a,l.className=s},f.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var l in this.markers){var u=this.markers[l];if(!u.range){u.update(a,this,this.session,s);continue}var i=u.range.clipRows(s.firstRow,s.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),u.renderer){var c=this.$getTop(i.start.row,s),m=this.$padding+i.start.column*s.characterWidth;u.renderer(a,i,m,c,s)}else u.type=="fullLine"?this.drawFullLineMarker(a,i,u.clazz,s):u.type=="screenLine"?this.drawScreenLineMarker(a,i,u.clazz,s):i.isMultiLine()?u.type=="text"?this.drawTextMarker(a,i,u.clazz,s):this.drawMultiLineMarker(a,i,u.clazz,s):this.drawSingleLineMarker(a,i,u.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,l,u,i){for(var c=this.session,m=a.start.row,w=a.end.row,x=m,M=0,$=0,k=c.getScreenLastRowColumn(x),C=new p(x,a.start.column,x,$);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?a.start.column:c.getRowWrapIndent(x),C.end.column=k,M=$,$=k,k=x+1<w?c.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(s,C,l+(x==m?" ace_start":"")+" ace_br"+h(x==m||x==m+1&&a.start.column,M<$,$>k,x==w),u,x==w?0:1,i)},f.prototype.drawMultiLineMarker=function(s,a,l,u,i){var c=this.$padding,m=u.lineHeight,w=this.$getTop(a.start.row,u),x=c+a.start.column*u.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var M=a.clone();M.end.row=M.start.row,M.end.column=this.session.getLine(M.start.row).length,this.drawBidiSingleLineMarker(s,M,l+" ace_br1 ace_start",u,null,i)}else this.elt(l+" ace_br1 ace_start","height:"+m+"px;right:"+c+"px;top:"+w+"px;left:"+x+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var M=a.clone();M.start.row=M.end.row,M.start.column=0,this.drawBidiSingleLineMarker(s,M,l+" ace_br12",u,null,i)}else{w=this.$getTop(a.end.row,u);var $=a.end.column*u.characterWidth;this.elt(l+" ace_br12","height:"+m+"px;width:"+$+"px;top:"+w+"px;left:"+c+"px;"+(i||""))}if(m=(a.end.row-a.start.row-1)*u.lineHeight,!(m<=0)){w=this.$getTop(a.start.row+1,u);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(l+(k?" ace_br"+k:""),"height:"+m+"px;right:"+c+"px;top:"+w+"px;left:"+c+"px;"+(i||""))}},f.prototype.drawSingleLineMarker=function(s,a,l,u,i,c){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,l,u,i,c);var m=u.lineHeight,w=(a.end.column+(i||0)-a.start.column)*u.characterWidth,x=this.$getTop(a.start.row,u),M=this.$padding+a.start.column*u.characterWidth;this.elt(l,"height:"+m+"px;width:"+w+"px;top:"+x+"px;left:"+M+"px;"+(c||""))},f.prototype.drawBidiSingleLineMarker=function(s,a,l,u,i,c){var m=u.lineHeight,w=this.$getTop(a.start.row,u),x=this.$padding,M=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);M.forEach(function($){this.elt(l,"height:"+m+"px;width:"+($.width+(i||0))+"px;top:"+w+"px;left:"+(x+$.left)+"px;"+(c||""))},this)},f.prototype.drawFullLineMarker=function(s,a,l,u,i){var c=this.$getTop(a.start.row,u),m=u.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,u)-c),this.elt(l,"height:"+m+"px;top:"+c+"px;left:0;right:0;"+(i||""))},f.prototype.drawScreenLineMarker=function(s,a,l,u,i){var c=this.$getTop(a.start.row,u),m=u.lineHeight;this.elt(l,"height:"+m+"px;top:"+c+"px;left:0;right:0;"+(i||""))},f}();b.prototype.$padding=0;function h(f,s,a,l){return(f?1:0)|(s?2:0)|(a?4:0)|(l?8:0)}r.Marker=b}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,r,d){var p=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return p.has(g)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,r,d){var p=t("../lib/oop"),g=t("../lib/dom"),b=t("../lib/lang"),h=t("./lines").Lines,f=t("../lib/event_emitter").EventEmitter,s=t("../config").nls,a=t("./text_util").isTextToken,l=function(){function u(i){this.dom=g,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 u.prototype.$updateEolChar=function(){var i=this.session.doc,c=i.getNewLineCharacter()==`
216
+ `&&i.getNewLineMode()!="windows",m=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},u.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px"},u.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},u.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},u.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",(function(c){this._signal("changeCharacterSize",c)}).bind(this)),this.$pollSizeChanges()},u.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},u.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},u.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString()},u.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)},u.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},u.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},u.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var c=this.$tabStrings=[0],m=1;m<i+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=b.stringRepeat(this.TAB_CHAR,m),c.push(w)}else c.push(this.dom.createTextNode(b.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",M=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?b.stringRepeat(this.SPACE_CHAR,this.tabSize):b.stringRepeat(" ",this.tabSize),k=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+M,w.textContent=$,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+k,w.textContent=C,this.$tabStrings[" "]=w}},u.prototype.updateLines=function(i,c,m){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var w=Math.max(c,i.firstRow),x=Math.min(m,i.lastRow),M=this.element.childNodes,$=0,k=i.firstRow;k<w;k++){var C=this.session.getFoldLine(k);if(C)if(C.containsRow(w)){w=C.start.row;break}else k=C.end.row;$++}for(var R=!1,k=w,C=this.session.getNextFoldLine(k),N=C?C.start.row:1/0;k>N&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),N=C?C.start.row:1/0),!(k>x);){var I=M[$++];if(I){this.dom.removeChildren(I),this.$renderLine(I,k,k==N?C:!1),R&&(I.style.top=this.$lines.computeLineTop(k,i,this.session)+"px");var L=i.lineHeight*this.session.getRowLength(k)+"px";I.style.height!=L&&(R=!0,I.style.height=L)}k++}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"}},u.prototype.scrollLines=function(i){var c=this.config;if(this.config=i,this.$lines.pageChanged(c,i))return this.update(i);this.$lines.moveContainer(i);var m=i.lastRow,w=c?c.lastRow:-1;if(!c||w<i.firstRow)return this.update(i);if(m<c.firstRow)return this.update(i);if(!c||c.lastRow<i.firstRow)return this.update(i);if(i.lastRow<c.firstRow)return this.update(i);if(c.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(c.lastRow>i.lastRow)for(var x=this.session.getFoldedRowCount(i.lastRow+1,c.lastRow);x>0;x--)this.$lines.pop();i.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,c.firstRow-1)),i.lastRow>c.lastRow&&this.$lines.push(this.$renderLinesFragment(i,c.lastRow+1,i.lastRow)),this.$highlightIndentGuide()},u.prototype.$renderLinesFragment=function(i,c,m){for(var w=[],x=c,M=this.session.getNextFoldLine(x),$=M?M.start.row:1/0;x>$&&(x=M.end.row+1,M=this.session.getNextFoldLine(x,M),$=M?M.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,i,this.session),C=k.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,i,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,i,this.session)+"px"),this.$renderLine(C,x,x==$?M:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(k),x++}return w},u.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var c=i.firstRow,m=i.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(i,c,m))},u.prototype.$renderToken=function(i,c,m,w){for(var x=this,M=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,$=this.dom.createFragment(this.element),k,C=0;k=M.exec(w);){var R=k[1],N=k[2],I=k[3],L=k[4],B=k[5];if(!(!x.showSpaces&&N)){var P=C!=k.index?w.slice(C,k.index):"";if(C=k.index+k[0].length,P&&$.appendChild(this.dom.createTextNode(P,this.element)),R){var O=x.session.getScreenTabSize(c+k.index),A=x.$tabStrings[O].cloneNode(!0);A.charCount=1,$.appendChild(A),c+=O-1}else if(N)if(x.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=b.stringRepeat(x.SPACE_CHAR,N.length),$.appendChild(S)}else $.appendChild(this.dom.createTextNode(N,this.element));else if(I){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=b.stringRepeat(x.SPACE_CHAR,I.length),$.appendChild(S)}else if(L){c+=1;var S=this.dom.createElement("span");S.style.width=x.config.characterWidth*2+"px",S.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=x.showSpaces?x.SPACE_CHAR:L,$.appendChild(S)}else if(B){c+=1;var S=this.dom.createElement("span");S.style.width=x.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=B,$.appendChild(S)}}}if($.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(m.type))i.appendChild($);else{var D="ace_"+m.type.replace(/\./g," ace_"),S=this.dom.createElement("span");m.type=="fold"&&(S.style.width=m.value.length*this.config.characterWidth+"px",S.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),S.className=D,S.appendChild($),i.appendChild(S)}return c+w.length},u.prototype.renderIndentGuide=function(i,c,m){var w=c.search(this.$indentGuideRe);if(w<=0||w>=m)return c;if(c[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,M=0;M<x;M++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}else if(c[0]==" "){for(var M=0;M<w;M++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}return this.$highlightIndentGuide(),c},u.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 c=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(c.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:c.row};var x=this.session.$bracketHighlight;if(x){for(var M=this.session.$bracketHighlight.ranges,$=0;$<M.length;$++)if(c.row!==M[$].start.row){this.$highlightIndentGuideMarker.end=M[$].start.row+1,c.row>M[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[c.row]!==""&&c.column===i[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=c.row+1;$<i.length;$++){var k=i[$],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=$,C<=m))break}}this.$renderHighlightIndentGuide()}}},u.prototype.$clearActiveIndentGuide=function(){for(var i=this.element.querySelectorAll(".ace_indent-guide-active"),c=0;c<i.length;c++)i[c].classList.remove("ace_indent-guide-active")},u.prototype.$setIndentGuideActive=function(i,c){var m=this.session.doc.getLine(i.row);if(m!==""){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 M=x[c-1];M&&M.classList&&M.classList.contains("ace_indent-guide")&&M.classList.add("ace_indent-guide-active")}}},u.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<i.length;m++){var w=i[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}else for(var m=i.length-1;m>=0;m--){var w=i[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}}},u.prototype.$createLineElement=function(i){var c=this.dom.createElement("div");return c.className="ace_line",c.style.height=this.config.lineHeight+"px",c},u.prototype.$renderWrappedLine=function(i,c,m){var w=0,x=0,M=m[0],$=0,k=this.$createLineElement();i.appendChild(k);for(var C=0;C<c.length;C++){var R=c[C],N=R.value;if(C==0&&this.displayIndentGuides){if(w=N.length,N=this.renderIndentGuide(k,N,M),!N)continue;w-=N.length}if(w+N.length<M)$=this.$renderToken(k,$,R,N),w+=N.length;else{for(;w+N.length>=M;){$=this.$renderToken(k,$,R,N.substring(0,M-w)),N=N.substring(M-w),w=M,k=this.$createLineElement(),i.appendChild(k);var I=this.dom.createTextNode(b.stringRepeat(" ",m.indent),this.element);I.charCount=0,k.appendChild(I),x++,$=0,M=m[x]||Number.MAX_VALUE}N.length!=0&&(w+=N.length,$=this.$renderToken(k,$,R,N))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,$,null,"",!0)},u.prototype.$renderSimpleLine=function(i,c){for(var m=0,w=0;w<c.length;w++){var x=c[w],M=x.value;if(!(w==0&&this.displayIndentGuides&&(M=this.renderIndentGuide(i,M),!M))){if(m+M.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,m,x,M);m=this.$renderToken(i,m,x,M)}}},u.prototype.$renderOverflowMessage=function(i,c,m,w,x){m&&this.$renderToken(i,c,m,w.slice(0,this.MAX_LINE_LENGTH-c));var M=this.dom.createElement("span");M.className="ace_inline_button ace_keyword ace_toggle_wrap",M.textContent=x?"<hide>":"<click to see more...>",i.appendChild(M)},u.prototype.$renderLine=function(i,c,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(c)),m)var w=this.$getFoldLineTokens(c,m);else var w=this.session.getTokens(c);var x=i;if(w.length){var M=this.session.getRowSplitData(c);if(M&&M.length){this.$renderWrappedLine(i,w,M);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){m&&(c=m.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild($)}},u.prototype.$getFoldLineTokens=function(i,c){var m=this.session,w=[];function x($,k,C){for(var R=0,N=0;N+$[R].value.length<k;)if(N+=$[R].value.length,R++,R==$.length)return;if(N!=k){var I=$[R].value.substring(k-N);I.length>C-k&&(I=I.substring(0,C-k)),w.push({type:$[R].type,value:I}),N=k+I.length,R+=1}for(;N<C&&R<$.length;){var I=$[R].value;I.length+N>C?w.push({type:$[R].type,value:I.substring(0,C-N)}):w.push($[R]),N+=I.length,R+=1}}var M=m.getTokens(i);return c.walk(function($,k,C,R,N){$!=null?w.push({type:"fold",value:$}):(N&&(M=m.getTokens(k)),M.length&&x(M,R,C))},c.end.row,this.session.getLine(c.end.row).length),w},u.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},u}();l.prototype.EOF_CHAR="¶",l.prototype.EOL_CHAR_LF="¬",l.prototype.EOL_CHAR_CRLF="¤",l.prototype.EOL_CHAR=l.prototype.EOL_CHAR_LF,l.prototype.TAB_CHAR="—",l.prototype.SPACE_CHAR="·",l.prototype.$padding=0,l.prototype.MAX_LINE_LENGTH=1e4,l.prototype.showInvisibles=!1,l.prototype.showSpaces=!1,l.prototype.showTabs=!1,l.prototype.showEOL=!1,l.prototype.displayIndentGuides=!0,l.prototype.$highlightIndentGuides=!0,l.prototype.$tabStrings=[],l.prototype.destroy={},l.prototype.onChangeTabSize=l.prototype.$computeTabString,p.implement(l.prototype,f),r.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,r,d){var p=t("../lib/dom"),g=function(){function b(h){this.element=p.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(),p.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--;)p.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&&p.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},b.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,p.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,p.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},b.prototype.addCursor=function(){var h=p.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,p.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.showCursor=function(){this.isVisible=!0,p.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,p.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&&p.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),p.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),l=(s.row-(f?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:l}},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,l=f.length;s<l;s++){var u=this.getPixelPosition(f[s].cursor,!0);if(!((u.top>h.height+h.offset||u.top<0)&&s>1)){var i=this.cursors[a++]||this.addCursor(),c=i.style;this.drawCursor?this.drawCursor(i,u,h,f[s],this.session):this.isCursorInView(u,h)?(p.setStyle(c,"display","block"),p.translate(i,u.left,u.top),p.setStyle(c,"width",Math.round(h.characterWidth)+"px"),p.setStyle(c,"height",h.lineHeight+"px")):p.setStyle(c,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=u,this.restartTimer()},b.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?p.addCssClass(this.element,"ace_overwrite-cursors"):p.removeCssClass(this.element,"ace_overwrite-cursors"))},b.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},b}();g.prototype.$padding=0,g.prototype.drawCursor=null,r.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,d){var p=this&&this.__extends||function(){var i=function(c,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&(w[M]=x[M])},i(c,m)};return function(c,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(c,m);function w(){this.constructor=c}c.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}(),g=t("./lib/oop"),b=t("./lib/dom"),h=t("./lib/event"),f=t("./lib/event_emitter").EventEmitter,s=32768,a=function(){function i(c,m){this.element=b.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=b.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),c.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(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},i}();g.implement(a.prototype,f);var l=function(i){p(c,i);function c(m,w){var x=i.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=b.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return c.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(m){this.element.style.height=m+"px"},c.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>s?(this.coeff=s/m,m=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},c.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},c}(a);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var u=function(i){p(c,i);function c(m,w){var x=i.call(this,m,"-h")||this;return x.scrollLeft=0,x.height=w.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(m){this.element.style.width=m+"px"},c.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},c.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},c.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},c}(a);r.ScrollBar=l,r.ScrollBarV=l,r.ScrollBarH=u,r.VScrollBar=l,r.HScrollBar=u}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,d){var p=this&&this.__extends||function(){var u=function(i,c){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(m[x]=w[x])},u(i,c)};return function(i,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");u(i,c);function m(){this.constructor=i}i.prototype=c===null?Object.create(c):(m.prototype=c.prototype,new m)}}(),g=t("./lib/oop"),b=t("./lib/dom"),h=t("./lib/event"),f=t("./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 u(i,c){this.element=b.createElement("div"),this.element.className="ace_sb"+c,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 u.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},u}();g.implement(s.prototype,f);var a=function(u){p(i,u);function i(c,m){var w=u.call(this,c,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=c,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return i.prototype.onMouseDown=function(c,m){if(c==="mousedown"&&!(h.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,M=function(L){x=L.clientY},$=function(){clearInterval(N)},k=m.clientY,C=this.thumbTop,R=function(){if(x!==void 0){var L=w.scrollTopFromThumbTop(C+x-k);L!==w.scrollTop&&w._emit("scroll",{data:L})}};h.capture(this.inner,M,$);var N=setInterval(R,20);return h.preventDefault(m)}var I=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(I)}),h.preventDefault(m)}},i.prototype.getHeight=function(){return this.height},i.prototype.scrollTopFromThumbTop=function(c){var m=c*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},i.prototype.setScrollHeight=function(c,m){this.pageHeight===c&&!m||(this.pageHeight=c,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(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},i}(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var l=function(u){p(i,u);function i(c,m){var w=u.call(this,c,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=m,w}return i.prototype.onMouseDown=function(c,m){if(c==="mousedown"&&!(h.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,M=function(L){x=L.clientX},$=function(){clearInterval(N)},k=m.clientX,C=this.thumbLeft,R=function(){if(x!==void 0){var L=w.scrollLeftFromThumbLeft(C+x-k);L!==w.scrollLeft&&w._emit("scroll",{data:L})}};h.capture(this.inner,M,$);var N=setInterval(R,20);return h.preventDefault(m)}var I=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(I)}),h.preventDefault(m)}},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(c){var m=c*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},i.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},i.prototype.setScrollWidth=function(c,m){this.pageWidth===c&&!m||(this.pageWidth=c,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(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},i}(s);l.prototype.setInnerWidth=l.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=l,r.VScrollBar=a,r.HScrollBar=l}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,r,d){var p=t("./lib/event"),g=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 l=s.changes;if(l&&(p.blockIdle(100),s.changes=0,s.onRender(l)),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&&(p.nextFrame(this._flush),this.pending=!0)},b.prototype.clear=function(h){var f=this.changes;return this.changes=0,f},b}();r.RenderLoop=g}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,r,d){var p=t("../lib/oop"),g=t("../lib/dom"),b=t("../lib/lang"),h=t("../lib/event"),f=t("../lib/useragent"),s=t("../lib/event_emitter").EventEmitter,a=512,l=typeof ResizeObserver=="function",u=200,i=function(){function c(m){this.el=g.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=g.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=g.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=b.stringRepeat("X",a),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(m,w){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",f.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=w?"hidden":"visible"},c.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===m.width&&w.height===m.height,this._emit("changeCharacterSize",{data:m})}},c.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=h.onIdle(function w(){m.checkForSizeChanges(),h.onIdle(w,500)},500)},c.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.prototype.$measureSizes=function(m){var w={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/a};return w.width===0||w.height===0?null:w},c.prototype.$measureCharWidth=function(m){this.$main.textContent=b.stringRepeat(m,a);var w=this.$main.getBoundingClientRect();return w.width/a},c.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var m=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=g.buildDom([m(0,0),m(u,0),m(0,u),m(u,u)],this.el)},c.prototype.transformCoordinates=function(m,w){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function M(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 k(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]),I=R(this.els[1]),L=R(this.els[2]),B=R(this.els[3]),P=M($(B,I),$(B,L),$(k(I,L),k(B,N))),O=C(1+P[0],$(I,N)),A=C(1+P[1],$(L,N));if(w){var S=w,D=P[0]*S[0]/u+P[1]*S[1]/u+1,z=k(C(S[0],O),C(S[1],A));return k(C(1/D/u,z),N)}var U=$(m,N),K=M($(O,C(P[0],U)),$(A,C(P[1],U)),U);return C(u,K)},c}();i.prototype.$characterSize={width:0,height:0},p.implement(i.prototype,s),r.FontMetrics=i}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,r,d){d.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(t,r,d){var p=t("../lib/dom"),g=t("../lib/oop"),b=t("../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=p.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 l=this.canvas.getContext("2d");function u(O,A){return O.priority<A.priority?-1:O.priority>A.priority?1:0}var i=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),i){var c={info:1,warning:2,error:3};i.forEach(function(O){O.priority=c[O.type]||null}),i=i.sort(u);for(var m=0;m<i.length;m++){var w=i[m].row,x=this.getVerticalOffsetForRow(w),M=x+this.lineHeight,$=Math.round(this.heightRatio*x),k=Math.round(this.heightRatio*M),C=Math.round(($+k)/2),R=k-C;R<this.halfMinDecorationHeight&&(R=this.halfMinDecorationHeight),C-R<0&&(C=R),C+R>this.canvasHeight&&(C=this.canvasHeight-R);var N=C-R,I=C+R,L=I-N;l.fillStyle=a[i[m].type]||null,l.fillRect(0,N,Math.round(this.oneZoneWidth-1),L)}}var B=this.renderer.session.selection.getCursor();if(B){var P=Math.round(this.getVerticalOffsetForRow(B.row)*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.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}();g.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(t,r,d){var p=t("./lib/oop"),g=t("./lib/dom"),b=t("./lib/lang"),h=t("./config"),f=t("./layer/gutter").Gutter,s=t("./layer/marker").Marker,a=t("./layer/text").Text,l=t("./layer/cursor").Cursor,u=t("./scrollbar").HScrollBar,i=t("./scrollbar").VScrollBar,c=t("./scrollbar_custom").HScrollBar,m=t("./scrollbar_custom").VScrollBar,w=t("./renderloop").RenderLoop,x=t("./layer/font_metrics").FontMetrics,M=t("./lib/event_emitter").EventEmitter,$=t("./css/editor-css"),k=t("./layer/decorators").Decorator,C=t("./lib/useragent"),R=t("./layer/text_util").isTextToken;g.importCssString($,"ace_editor.css",!1);var N=function(){function I(L,B){var P=this;this.container=L||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(B),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new f(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var O=this.$textLayer=new a(this.content);this.canvas=O.element,this.$markerFront=new s(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new i(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",function(A){P.$scrollAnimation||P.session.setScrollTop(A.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){P.$scrollAnimation||P.session.setScrollLeft(A.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(A){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",A)}),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 I.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(L){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=L,L&&this.scrollMargin.top&&L.getScrollTop()<=0&&L.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(L),this.$markerBack.setSession(L),this.$markerFront.setSession(L),this.$gutterLayer.setSession(L),this.$textLayer.setSession(L),L&&(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))},I.prototype.updateLines=function(L,B,P){if(B===void 0&&(B=1/0),this.$changedLines?(this.$changedLines.firstRow>L&&(this.$changedLines.firstRow=L),this.$changedLines.lastRow<B&&(this.$changedLines.lastRow=B)):this.$changedLines={firstRow:L,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)},I.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},I.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},I.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},I.prototype.updateFull=function(L){L?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},I.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},I.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},I.prototype.onResize=function(L,B,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=L?1:0;var A=this.container;O||(O=A.clientHeight||A.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!A.style.height||A.style.height=="0px")&&(A.style.height="1px",O=A.clientHeight||A.scrollHeight),P||(P=A.clientWidth||A.scrollWidth);var S=this.$updateCachedSize(L,B,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;L&&(this.$gutterLayer.$padding=null),L?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},I.prototype.$updateCachedSize=function(L,B,P,O){O-=this.$extraHeight||0;var A=0,S=this.$size,D={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if(O&&(L||S.height!=O)&&(S.height=O,A|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),P&&(L||S.width!=P)){A|=this.CHANGE_SIZE,S.width=P,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,g.setStyle(this.scrollBarH.element.style,"left",B+"px"),g.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),S.scrollerWidth=Math.max(0,P-B-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var z=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",z),g.setStyle(this.scroller.style,"right",z),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||L)&&(A|=this.CHANGE_FULL)}return S.$dirty=!P||!O,A&&this._signal("resize",D),A},I.prototype.onGutterResize=function(L){var B=this.$showGutter?L: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()},I.prototype.adjustWrapLimit=function(){var L=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(L/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(L){this.setOption("animatedScroll",L)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(L){this.setOption("showInvisibles",L),this.session.$bidiHandler.setShowInvisibles(L)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(L){this.setOption("displayIndentGuides",L)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(L){this.setOption("highlightIndentGuides",L)},I.prototype.setShowPrintMargin=function(L){this.setOption("showPrintMargin",L)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(L){this.setOption("printMarginColumn",L)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(L){return this.setOption("showGutter",L)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(L){this.setOption("fadeFoldWidgets",L)},I.prototype.setHighlightGutterLine=function(L){this.setOption("highlightGutterLine",L)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var L=g.createElement("div");L.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",L.appendChild(this.$printMarginEl),this.content.insertBefore(L,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()}},I.prototype.getContainerElement=function(){return this.container},I.prototype.getMouseEventTarget=function(){return this.scroller},I.prototype.getTextAreaContainer=function(){return this.container},I.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var L=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){g.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,A=P.top,S=P.left;A-=O.offset;var D=B&&B.useTextareaForIME||C.isMobile?this.lineHeight:1;if(A<0||A>O.height-D){g.translate(this.textarea,0,0);return}var z=1,U=this.$size.height-D;if(!B)A+=this.lineHeight;else if(B.useTextareaForIME){var K=this.textarea.value;z=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else A+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-z&&(S=this.$size.scrollerWidth-z),S+=this.gutterWidth+this.margin.left,g.setStyle(L,"height",D+"px"),g.setStyle(L,"width",z+"px"),g.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-z),Math.min(A,U))}}},I.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},I.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},I.prototype.getLastFullyVisibleRow=function(){var L=this.layerConfig,B=L.lastRow,P=this.session.documentToScreenRow(B,0)*L.lineHeight;return P-this.session.getScrollTop()>L.height-L.lineHeight?B-1:B},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(L){this.$padding=L,this.$textLayer.setPadding(L),this.$cursorLayer.setPadding(L),this.$markerFront.setPadding(L),this.$markerBack.setPadding(L),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(L,B,P,O){var A=this.scrollMargin;A.top=L|0,A.bottom=B|0,A.right=O|0,A.left=P|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},I.prototype.setMargin=function(L,B,P,O){var A=this.margin;A.top=L|0,A.bottom=B|0,A.right=O|0,A.left=P|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(L){this.setOption("hScrollBarAlwaysVisible",L)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(L){this.setOption("vScrollBarAlwaysVisible",L)},I.prototype.$updateScrollBarV=function(){var L=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(L-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>L-B&&(L=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(L+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},I.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},I.prototype.freeze=function(){this.$frozen=!0},I.prototype.unfreeze=function(){this.$frozen=!1},I.prototype.$renderChanges=function(L,B){if(this.$changes&&(L|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!L&&!B){this.$changes|=L;return}if(this.$size.$dirty)return this.$changes|=L,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",L),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(L&this.CHANGE_FULL||L&this.CHANGE_SIZE||L&this.CHANGE_TEXT||L&this.CHANGE_LINES||L&this.CHANGE_SCROLL||L&this.CHANGE_H_SCROLL){if(L|=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,L=L|this.CHANGE_SCROLL,L|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),L&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-P.offset);var A=P.width+2*this.$padding+"px",S=P.minHeight+"px";g.setStyle(this.content.style,"width",A),g.setStyle(this.content.style,"height",S)}if(L&this.CHANGE_H_SCROLL&&(g.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)),L&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",L);return}if(L&this.CHANGE_SCROLL){this.$changedLines=null,L&this.CHANGE_TEXT||L&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(L&this.CHANGE_GUTTER||L&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",L);return}L&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):L&this.CHANGE_LINES?((this.$updateLines()||L&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):L&this.CHANGE_TEXT||L&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):L&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),L&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",L)},I.prototype.$autosize=function(){var L=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,P=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,L))+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,A=!O&&L>B;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var S=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,P),this.desiredHeight=P,this._signal("autosize")}},I.prototype.$computeLayerConfig=function(){var L=this.session,B=this.$size,P=B.height<=2*this.lineHeight,O=this.session.getScreenLength(),A=O*this.lineHeight,S=this.$getLongestLine(),D=!P&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-S-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 K=B.scrollerHeight+this.lineHeight,X=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=X;var ee=this.scrollMargin;this.session.setScrollTop(Math.max(-ee.top,Math.min(this.scrollTop,A-B.scrollerHeight+ee.bottom))),this.session.setScrollLeft(Math.max(-ee.left,Math.min(this.scrollLeft,S+2*this.$padding-B.scrollerWidth+ee.right)));var de=!P&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-A+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(K/this.lineHeight)-1,ue=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),me=ue+se,Ae,Te,Me=this.lineHeight;ue=L.screenToDocumentRow(ue,0);var Je=L.getFoldLine(ue);Je&&(ue=Je.start.row),Ae=L.documentToScreenRow(ue,0),Te=L.getRowLength(ue)*Me,me=Math.min(L.screenToDocumentRow(me,0),L.getLength()-1),K=B.scrollerHeight+L.getRowLength(me)*Me+Te,le=this.scrollTop-Ae*Me,le<0&&Ae>0&&(Ae=Math.max(0,Ae+Math.floor(le/Me)),le=this.scrollTop-Ae*Me);var qe=0;return(this.layerConfig.width!=S||z)&&(qe=this.CHANGE_H_SCROLL),(z||te)&&(qe|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),te&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:ue,firstRowScreen:Ae,lastRow:me,lineHeight:Me,characterWidth:this.characterWidth,minHeight:K,maxHeight:A,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(S-this.$padding),qe},I.prototype.$updateLines=function(){if(this.$changedLines){var L=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(L>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,L,B),!0}}},I.prototype.$getLongestLine=function(){var L=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(L+=1),this.$textLayer&&L>this.$textLayer.MAX_LINE_LENGTH&&(L=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(L*this.characterWidth))},I.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},I.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},I.prototype.addGutterDecoration=function(L,B){this.$gutterLayer.addGutterDecoration(L,B)},I.prototype.removeGutterDecoration=function(L,B){this.$gutterLayer.removeGutterDecoration(L,B)},I.prototype.updateBreakpoints=function(L){this._rows=L,this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(L){this.$gutterLayer.setAnnotations(L),this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},I.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},I.prototype.showCursor=function(){this.$cursorLayer.showCursor()},I.prototype.scrollSelectionIntoView=function(L,B,P){this.scrollCursorIntoView(L,P),this.scrollCursorIntoView(B,P)},I.prototype.scrollCursorIntoView=function(L,B,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(L),A=O.left,S=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>S?(B&&U+D>S+this.lineHeight&&(S-=B*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):U+this.$size.scrollerHeight-z<S+this.lineHeight&&(B&&U+this.$size.scrollerHeight-z<S-this.lineHeight&&(S+=B*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight+z-this.$size.scrollerHeight));var K=this.scrollLeft,X=2*this.layerConfig.characterWidth;A-X<K?(A-=X,A<this.$padding+X&&(A=-this.scrollMargin.left),this.session.setScrollLeft(A)):(A+=X,K+this.$size.scrollerWidth<A+this.characterWidth?this.session.setScrollLeft(Math.round(A+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&A-K<this.characterWidth&&this.session.setScrollLeft(0))}},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(L){this.session.setScrollTop(L*this.lineHeight)},I.prototype.alignCursor=function(L,B){typeof L=="number"&&(L={row:L,column:0});var P=this.$cursorLayer.getPixelPosition(L),O=this.$size.scrollerHeight-this.lineHeight,A=P.top-O*(B||0);return this.session.setScrollTop(A),A},I.prototype.$calcSteps=function(L,B){var P=0,O=this.STEPS,A=[],S=function(D,z,U){return U*(Math.pow(D-1,3)+1)+z};for(P=0;P<O;++P)A.push(S(P/this.STEPS,L,B-L));return A},I.prototype.scrollToLine=function(L,B,P,O){var A=this.$cursorLayer.getPixelPosition({row:L,column:0}),S=A.top;B&&(S-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(S),P!==!1&&this.animateScrolling(D,O)},I.prototype.animateScrolling=function(L,B){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(L==P)return;if(this.$scrollAnimation){var A=this.$scrollAnimation.steps;if(A.length&&(L=A[0],L==P))return}var S=O.$calcSteps(L,P);this.$scrollAnimation={from:L,to:P,steps:S},clearInterval(this.$timer),O.session.setScrollTop(S.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);S.length?(O.session.setScrollTop(S.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):D()},10)},I.prototype.scrollToY=function(L){this.scrollTop!==L&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=L)},I.prototype.scrollToX=function(L){this.scrollLeft!==L&&(this.scrollLeft=L),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(L,B){this.session.setScrollTop(B),this.session.setScrollLeft(L)},I.prototype.scrollBy=function(L,B){B&&this.session.setScrollTop(this.session.getScrollTop()+B),L&&this.session.setScrollLeft(this.session.getScrollLeft()+L)},I.prototype.isScrollableBy=function(L,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||L<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||L>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},I.prototype.pixelToScreenCoordinates=function(L,B){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([L,B]);L=O[1]-this.gutterWidth-this.margin.left,B=O[0]}else P=this.scroller.getBoundingClientRect();var A=L+this.scrollLeft-P.left-this.$padding,S=A/this.characterWidth,D=Math.floor((B+this.scrollTop-P.top)/this.lineHeight),z=this.$blockCursor?Math.floor(S):Math.round(S);return{row:D,column:z,side:S-z>0?1:-1,offsetX:A}},I.prototype.screenToTextCoordinates=function(L,B){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([L,B]);L=O[1]-this.gutterWidth-this.margin.left,B=O[0]}else P=this.scroller.getBoundingClientRect();var A=L+this.scrollLeft-P.left-this.$padding,S=A/this.characterWidth,D=this.$blockCursor?Math.floor(S):Math.round(S),z=Math.floor((B+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(z,Math.max(D,0),A)},I.prototype.textToScreenCoordinates=function(L,B){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(L,B),A=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,L)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),S=O.row*this.lineHeight;return{pageX:P.left+A-this.scrollLeft,pageY:P.top+S-this.scrollTop}},I.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(L){this.$composition=L,L.cssText||(L.cssText=this.textarea.style.cssText),L.useTextareaForIME==null&&(L.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):L.markerId=this.session.addMarker(L.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(L){var B=this.session.selection.cursor;this.addToken(L,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},I.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var L=this.session.selection.cursor;this.removeExtraToken(L.row,L.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},I.prototype.setGhostText=function(L,B){var P=this.session.selection.cursor,O=B||{row:P.row,column:P.column};this.removeGhostText();var A=this.$calculateWrappedTextChunks(L,O);this.addToken(A[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:L,position:{row:O.row,column:O.column}};var S=g.createElement("div");if(A.length>1){var D=this.hideTokensAfterPosition(O.row,O.column),z;A.slice(1).forEach(function(te){var le=g.createElement("div"),se=g.createElement("span");se.className="ace_ghost_text",te.wrapped&&(le.className="ghost_text_line_wrapped"),te.text.length===0&&(te.text=" "),se.appendChild(g.createTextNode(te.text)),le.appendChild(se),S.appendChild(le),z=le}),D.forEach(function(te){var le=g.createElement("span");R(te.type)||(le.className="ace_"+te.type.replace(/\./g," ace_")),le.appendChild(g.createTextNode(te.value)),z.appendChild(le)}),this.$ghostTextWidget={el:S,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(O,!0),K=this.container,X=K.getBoundingClientRect().height,ee=A.length*this.lineHeight,de=ee<X-U.top;if(de)return;ee<X?this.scrollBy(0,(A.length-1)*this.lineHeight):this.scrollToRow(O.row)}},I.prototype.$calculateWrappedTextChunks=function(L,B){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var A=L.split(/\r?\n/),S=[],D=0;D<A.length;D++){var z=this.session.$getDisplayTokens(A[D],B.column),U=this.session.$computeWrapSplits(z,O,this.session.$tabSize);if(U.length>0){var K=0;U.push(A[D].length);for(var X=0;X<U.length;X++){var ee=A[D].slice(K,U[X]);S.push({text:ee,wrapped:!0}),K=U[X]}}else S.push({text:A[D],wrapped:!1})}return S},I.prototype.removeGhostText=function(){if(this.$ghostText){var L=this.$ghostText.position;this.removeExtraToken(L.row,L.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},I.prototype.addToken=function(L,B,P,O){var A=this.session;A.bgTokenizer.lines[P]=null;var S={type:B,value:L},D=A.getTokens(P);if(O==null||!D.length)D.push(S);else for(var z=0,U=0;U<D.length;U++){var K=D[U];if(z+=K.value.length,O<=z){var X=K.value.length-(z-O),ee=K.value.slice(0,X),de=K.value.slice(X);D.splice(U,1,{type:K.type,value:ee},S,{type:K.type,value:de});break}}this.updateLines(P,P)},I.prototype.hideTokensAfterPosition=function(L,B){for(var P=this.session.getTokens(L),O=0,A=!1,S=[],D=0;D<P.length;D++){var z=P[D];if(O+=z.value.length,z.type!=="ghost_text"){if(A){S.push({type:z.type,value:z.value}),z.type="hidden_token";continue}O===B&&(A=!0)}}return this.updateLines(L,L),S},I.prototype.removeExtraToken=function(L,B){this.session.bgTokenizer.lines[L]=null,this.updateLines(L,L)},I.prototype.setTheme=function(L,B){var P=this;if(this.$themeId=L,P._dispatchEvent("themeChange",{theme:L}),!L||typeof L=="string"){var O=L||this.$options.theme.initialValue;h.loadModule(["theme",O],A)}else A(L);function A(S){if(P.$themeId!=L)return B&&B();if(!S||!S.cssClass)throw new Error("couldn't load module "+L+" or it didn't call define");S.$id&&(P.$themeId=S.$id),g.importCssString(S.cssText,S.cssClass,P.container),P.theme&&g.removeCssClass(P.container,P.theme.cssClass);var D="padding"in S?S.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&D!=P.$padding&&P.setPadding(D),P.$theme=S.cssClass,P.theme=S,g.addCssClass(P.container,S.cssClass),g.setCssClass(P.container,"ace_dark",S.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:S}),B&&B(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(L,B){g.setCssClass(this.container,L,B!==!1)},I.prototype.unsetStyle=function(L){g.removeCssClass(this.container,L)},I.prototype.setCursorStyle=function(L){g.setStyle(this.scroller.style,"cursor",L)},I.prototype.setMouseCursor=function(L){g.setStyle(this.scroller.style,"cursor",L)},I.prototype.attachToShadowRoot=function(){g.importCssString($,"ace_editor.css",this.container)},I.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},I.prototype.$updateCustomScrollbar=function(L){var B=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),L===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new c(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 k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new i(this.container,this),this.scrollBarH=new u(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)}))},I.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var L=this;this.$resizeTimer=b.delayedCall(function(){L.destroyed||L.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(B){var P=B[0].contentRect.width,O=B[0].contentRect.height;Math.abs(L.$size.width-P)>1||Math.abs(L.$size.height-O)>1?L.$resizeTimer.delay():L.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},I}();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,p.implement(N.prototype,M),h.defineOptions(N.prototype,"renderer",{useResizeObserver:{set:function(I){!I&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):I&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(I){this.$textLayer.setShowInvisibles(I)&&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(I){typeof I=="number"&&(this.$printMarginColumn=I),this.$showPrintMargin=!!I,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(I){this.$gutter.style.display=I?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(I){this.$gutterLayer.$useSvgGutterIcons=I},initialValue:!1},showFoldedAnnotations:{set:function(I){this.$gutterLayer.$showFoldedAnnotations=I},initialValue:!1},fadeFoldWidgets:{set:function(I){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",I)},initialValue:!1},showFoldWidgets:{set:function(I){this.$gutterLayer.setShowFoldWidgets(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(I){this.$textLayer.setDisplayIndentGuides(I)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(I){this.$textLayer.setHighlightIndentGuides(I)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(I){this.$gutterLayer.setHighlightGutterLine(I),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(I){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(I){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(I){typeof I=="number"&&(I=I+"px"),this.container.style.fontSize=I,this.updateFontSize()},initialValue:12},fontFamily:{set:function(I){this.container.style.fontFamily=I,this.updateFontSize()}},maxLines:{set:function(I){this.updateFull()}},minLines:{set:function(I){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(I){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(I){I=+I||0,this.$scrollPastEnd!=I&&(this.$scrollPastEnd=I,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(I){this.$gutterLayer.$fixedWidth=!!I,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(I){this.$updateCustomScrollbar(I)},initialValue:!1},theme:{set:function(I){this.setTheme(I)},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(t,r,d){var p=t("../lib/oop"),g=t("../lib/net"),b=t("../lib/event_emitter").EventEmitter,h=t("../config");function f(u){var i="importScripts('"+g.qualifyURL(u)+"');";try{return new Blob([i],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new c;return m.append(i),m.getBlob("application/javascript")}}function s(u){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var i=f(u),c=window.URL||window.webkitURL,m=c.createObjectURL(i);return new Worker(m)}return new Worker(u)}var a=function(u){u.postMessage||(u=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=u,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(){p.implement(this,b),this.$createWorkerFromOldConfig=function(u,i,c,m,w){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),h.get("packaged")||!t.toUrl)m=m||h.moduleUrl(i,"worker");else{var x=this.$normalizePath;m=m||x(t.toUrl("ace/worker/worker.js",null,"_"));var M={};u.forEach(function($){M[$]=x(t.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:M,module:i,classname:c}),this.$worker},this.onMessage=function(u){var i=u.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var c=this.callbacks[i.id];c&&(c(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(u){window.console&&console.error&&console.error(u)},this.$normalizePath=function(u){return g.qualifyURL(u)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(u){u.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(u,i){this.$worker.postMessage({command:u,args:i})},this.call=function(u,i,c){if(c){var m=this.callbackId++;this.callbacks[m]=c,i.push(m)}this.send(u,i)},this.emit=function(u,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:u,data:{data:i.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(u){this.$doc&&this.terminate(),this.$doc=u,this.call("setValue",[u.getValue()]),u.on("change",this.changeListener,!0)},this.changeListener=function(u){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),u.action=="insert"?this.deltaQueue.push(u.start,u.lines):this.deltaQueue.push(u.start,u.end)},this.$sendDeltaQueue=function(){var u=this.deltaQueue;u&&(this.deltaQueue=null,u.length>50&&u.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:u}))}}).call(a.prototype);var l=function(u,i,c){var m=null,w=!1,x=Object.create(b),M=[],$=new a({messageBuffer:M,terminate:function(){},postMessage:function(C){M.push(C),m&&(w?setTimeout(k):k())}});$.setEmitSync=function(C){w=C};var k=function(){var C=M.shift();C.command?m[C.command].apply(m,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(m=new C[c](x);M.length;)k()}),$};r.UIWorkerClient=l,r.WorkerClient=a,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,r,d){var p=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,b=t("./lib/oop"),h=function(){function f(s,a,l,u,i,c){var m=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=i,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=u,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=l;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,l=this.session;this.selectionBefore=l.selection.toJSON(),l.selection.inMultiSelectMode&&l.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var u=this.pos;u.$insertRight=!0,u.detach(),u.markerId=l.addMarker(new p(u.row,u.column,u.row,u.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var c=a.createAnchor(i.row,i.column);c.$insertRight=!0,c.detach(),s.others.push(c)}),l.setUndoSelect(!1)},f.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,a=this;this.othersActive=!0,this.others.forEach(function(l){l.markerId=s.addMarker(new p(l.row,l.column,l.row,l.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 l=s.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,u=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),u&&(this.length+=l),u&&!this.session.$fromUndo){if(s.action==="insert")for(var c=this.others.length-1;c>=0;c--){var m=this.others[c],w={row:m.row,column:m.column+i};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var c=this.others.length-1;c>=0;c--){var m=this.others[c],w={row:m.row,column:m.column+i};this.doc.remove(new p(w.row,w.column,w.row,w.column-l))}}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,l=function(i,c){a.removeMarker(i.markerId),i.markerId=a.addMarker(new p(i.row,i.column,i.row,i.column+s.length),c,null,!1)};l(this.pos,this.mainClass);for(var u=this.others.length;u--;)l(this.others[u],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,l=0;l<a;l++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},f}();b.implement(h.prototype,g),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,d){var p=t("../lib/event"),g=t("../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,l=s.shiftKey,u=s.ctrlKey,i=f.getAccelKey(),c=f.getButton();if(u&&g.isMac&&(c=s.button),f.editor.inMultiSelectMode&&c==2){f.editor.textInput.onContextMenu(f.domEvent);return}if(!u&&!a&&!i){c===0&&f.editor.inMultiSelectMode&&f.editor.exitMultiSelectMode();return}if(c===0){var m=f.editor,w=m.selection,x=m.inMultiSelectMode,M=f.getDocumentPosition(),$=w.getCursor(),k=f.inSelection()||w.isEmpty()&&b(M,$),C=f.x,R=f.y,N=function(ee){C=ee.clientX,R=ee.clientY},I=m.session,L=m.renderer.pixelToScreenCoordinates(C,R),B=L,P;if(m.$mouseHandler.$enableJumpToDef)u&&a||i&&a?P=l?"block":"add":a&&m.$blockSelectEnabled&&(P="block");else if(i&&!a){if(P="add",!x&&l)return}else a&&m.$blockSelectEnabled&&(P="block");if(P&&g.isMac&&s.ctrlKey&&m.$mouseHandler.cancelContextMenu(),P=="add"){if(!x&&k)return;if(!x){var O=w.toOrientedRange();m.addSelectionMarker(O)}var A=w.rangeList.rangeAtPoint(M);m.inVirtualSelectionMode=!0,l&&(A=null,O=w.ranges[0]||O,m.removeSelectionMarker(O)),m.once("mouseup",function(){var ee=w.toOrientedRange();A&&ee.isEmpty()&&b(A.cursor,ee.cursor)?w.substractPoint(ee.cursor):(l?w.substractPoint(O.cursor):O&&(m.removeSelectionMarker(O),w.addRange(O)),w.addRange(ee)),m.inVirtualSelectionMode=!1})}else if(P=="block"){f.stop(),m.inVirtualSelectionMode=!0;var S,D=[],z=function(){var ee=m.renderer.pixelToScreenCoordinates(C,R),de=I.screenToDocumentPosition(ee.row,ee.column,ee.offsetX);b(B,ee)&&b(de,w.lead)||(B=ee,m.selection.moveToPosition(de),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(D),D=w.rectangularRangeBlock(B,L),m.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=m.$mouseHandler.$clickSelection.clone()),D.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!i?w.toSingleRange():!x&&i&&(S=w.toOrientedRange(),m.addSelectionMarker(S)),l?L=I.documentToScreenPosition(w.lead):w.moveToPosition(M),B={row:-1,column:-1};var U=function(ee){z(),clearInterval(X),m.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),S&&(m.removeSelectionMarker(S),w.toSingleRange(S));for(var de=0;de<D.length;de++)w.addRange(D[de]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},K=z;p.capture(m.container,N,U);var X=setInterval(function(){K()},20);return f.preventDefault()}}}r.onMouseDown=h}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,r,d){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(g){g.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(g){g.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(g){g.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var p=t("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new p(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,r,d){var p=t("./range_list").RangeList,g=t("./range").Range,b=t("./selection").Selection,h=t("./mouse/multi_select_handler").onMouseDown,f=t("./lib/event"),s=t("./lib/lang"),a=t("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var l=t("./search").Search,u=new l;function i($,k,C){return u.$options.wrap=!0,u.$options.needle=k,u.$options.backwards=C==-1,u.find($)}var c=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,k){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var 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)),k||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),$&&this.fromOrientedRange($)},this.substractPoint=function($){var k=this.rangeList.substractPoint($);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();$.push(k),this.rangeCount=0}for(var C=$.length;C--;){var 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)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new p,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],k=[],C=0;C<$.length;C++){var R=$[C],N=R.start.row,I=R.end.row;if(N===I)k.push(R.clone());else{for(k.push(new g(N,R.start.column,N,this.session.getLine(N).length));++N<I;)k.push(this.getLineRange(N,!0));k.push(new g(I,0,I,R.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var $=this.rangeList.ranges,k=$[$.length-1],C=g.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,k=$[$.length-1],C=g.fromPoints($[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var R=this.session.documentToScreenPosition(this.cursor),N=this.session.documentToScreenPosition(this.anchor),I=this.rectangularRangeBlock(R,N);I.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,k,C){var R=[],N=$.column<k.column;if(N)var I=$.column,L=k.column,B=$.offsetX,P=k.offsetX;else var I=k.column,L=$.column,B=k.offsetX,P=$.offsetX;var O=$.row<k.row;if(O)var A=$.row,S=k.row;else var A=k.row,S=$.row;I<0&&(I=0),A<0&&(A=0),A==S&&(C=!0);for(var D,z=A;z<=S;z++){var U=g.fromPoints(this.session.screenToDocumentPosition(z,I,B),this.session.screenToDocumentPosition(z,L,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 K=R.length-1;R[K].isEmpty()&&K>0;)K--;if(K>0)for(var X=0;R[X].isEmpty();)X++;for(var ee=K;ee>=X;ee--)R[ee].isEmpty()&&R.splice(ee,1)}return R}}).call(b.prototype);var m=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var k=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",k),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var k=this.session.$selectionMarkers.indexOf($);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var k=this.session.$selectionMarkers,C=$.length;C--;){var R=$[C];if(R.marker){this.session.removeMarker(R.marker);var N=k.indexOf(R);N!=-1&&k.splice(N,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(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 k=$.command,C=$.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?R=C.forEachSelection(k,$.args):k.multiSelectAction=="forEachLine"?R=C.forEachSelection(k,$.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),R=k.exec(C,$.args||{})):R=k.multiSelectAction(C,$.args||{});else{var R=k.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function($,k,C){if(!this.inVirtualSelectionMode){var R=C&&C.keepOrder,N=C==!0||C&&C.$byLines,I=this.session,L=this.selection,B=L.rangeList,P=(R?L:B).ranges,O;if(!P.length)return $.exec?$.exec(this,k||{}):$(this,k||{});var A=L._eventRegistry;L._eventRegistry={};var S=new b(I);this.inVirtualSelectionMode=!0;for(var D=P.length;D--;){if(N)for(;D>0&&P[D].start.row==P[D-1].end.row;)D--;S.fromOrientedRange(P[D]),S.index=D,this.selection=I.selection=S;var z=$.exec?$.exec(this,k||{}):$(this,k||{});!O&&z!==void 0&&(O=z),S.toOrientedRange(P[D])}S.detach(),this.selection=I.selection=L,this.inVirtualSelectionMode=!1,L._eventRegistry=A,L.mergeOverlappingRanges(),L.ranges[0]&&L.fromOrientedRange(L.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],R=0;R<k.length;R++)C.push(this.session.getTextRange(k[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($,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var R=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;R.row!=k.row||this.session.$clipPositionToDocument(R.row,R.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,k,C){if(k=k||{},k.needle=$||k.needle,k.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(R)}this.$search.set(k);var N=this.$search.findAll(this.session);if(!N.length)return 0;var I=this.multiSelect;C||I.toSingleRange(N[0]);for(var L=N.length;L--;)I.addRange(N[L],!0);return R&&I.rangeList.rangeAtPoint(R.start)&&I.addRange(R,!0),N.length},this.selectMoreLines=function($,k){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 I=this.session.screenToDocumentPosition(N.row+$,N.column);if(C.isEmpty())var B=I;else var L=this.session.documentToScreenPosition(R?C.end:C.start),B=this.session.screenToDocumentPosition(L.row+$,L.column);if(R){var P=g.fromPoints(I,B);P.cursor=P.start}else{var P=g.fromPoints(B,I);P.cursor=P.end}if(P.desiredColumn=N.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var k=this.session,C=k.multiSelect,R=C.ranges,N=R.length;N--;){var I=R[N];if(I.isEmpty()){var L=k.getWordRange(I.start.row,I.start.column);I.start.row=L.start.row,I.start.column=L.start.column,I.end.row=L.end.row,I.end.column=L.end.column}}C.mergeOverlappingRanges();for(var B=[],N=R.length;N--;){var I=R[N];B.unshift(k.getTextRange(I))}$<0?B.unshift(B.pop()):B.push(B.shift());for(var N=R.length;N--;){var I=R[N],P=I.clone();k.replace(I,B[N]),I.start.row=P.start.row,I.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,k,C){var R=this.session,N=R.multiSelect,I=N.toOrientedRange();if(!(I.isEmpty()&&(I=R.getWordRange(I.start.row,I.start.column),I.cursor=$==-1?I.start:I.end,this.multiSelect.addRange(I),C))){var L=R.getTextRange(I),B=i(R,L,$);B&&(B.cursor=$==-1?B.start:B.end,this.session.unfold(B),this.multiSelect.addRange(B),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(I.cursor)}},this.alignCursors=function(){var $=this.session,k=$.multiSelect,C=k.ranges,R=-1,N=C.filter(function(K){if(K.cursor.row==R)return!0;R=K.cursor.row});if(!C.length||N.length==C.length-1){var I=this.selection.getRange(),L=I.start.row,B=I.end.row,P=L==B;if(P){var O=this.session.getLength(),A;do A=this.session.getLine(B);while(/[=:]/.test(A)&&++B<O);do A=this.session.getLine(L);while(/[=:]/.test(A)&&--L>0);L<0&&(L=0),B>=O&&(B=O-1)}var S=this.session.removeFullLines(L,B);S=this.$reAlignText(S,P),this.session.insert({row:L,column:0},S.join(`
951
+ `)+`
952
+ `),P||(I.start.column=0,I.end.column=S[S.length-1].length),this.selection.setRange(I)}else{N.forEach(function(K){k.substractPoint(K.cursor)});var D=0,z=1/0,U=C.map(function(K){var X=K.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(K,X){var ee=K.cursor,de=D-ee.column,te=U[X]-z;de>te?$.insert(ee,s.stringRepeat(" ",de-te)):$.remove(new g(ee.row,ee.column,ee.row,ee.column-de+te)),K.start.column=K.end.column=D,K.start.row=K.end.row=ee.row,K.cursor=K.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,k){var C=!0,R=!0,N,I,L;return $.map(function(S){var D=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?N==null?(N=D[1].length,I=D[2].length,L=D[3].length,D):(N+I+L!=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),I<D[2].length&&(I=D[2].length),L>D[3].length&&(L=D[3].length),D):[S]}).map(k?P:C?R?O:P:A);function B(S){return s.stringRepeat(" ",S)}function P(S){return S[2]?B(N)+S[2]+B(I-S[2].length+L)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function O(S){return S[2]?B(N+I-S[2].length)+S[2]+B(L)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function A(S){return S[2]?B(N)+S[2]+B(L)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(m.prototype);function w($,k){return $.row==k.row&&$.column==k.column}r.onSessionChange=function($){var k=$.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",h),$.commands.addCommands(a.defaultCommands),M($))}function M($){if(!$.textInput)return;var k=$.textInput.getElement(),C=!1;f.addListener(k,"keydown",function(N){var I=N.keyCode==18&&!(N.ctrlKey||N.shiftKey||N.metaKey);$.$blockSelectEnabled&&I?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&R()},$),f.addListener(k,"keyup",R,$),f.addListener(k,"blur",R,$);function R(N){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,t("./config").defineOptions(m.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(t,r,d){var p=t("../../range").Range,g=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),l=a.search(s);if(l!=-1){for(var u=f||a.length,i=b.getLength(),c=h,m=h;++h<i;){var w=b.getLine(h).search(s);if(w!=-1){if(w<=l){var x=b.getTokenAt(h,0);if(!x||x.type!=="string")break}m=h}}if(m>c){var M=b.getLine(m).length;return new p(c,u,m,M)}}},this.openingBracketBlock=function(b,h,f,s,a){var l={row:f,column:s+1},u=b.$findClosingBracket(h,l,a);if(u){var i=b.foldWidgets[u.row];return i==null&&(i=b.getFoldWidget(u.row)),i=="start"&&u.row>l.row&&(u.row--,u.column=b.getLine(u.row).length),p.fromPoints(l,u)}},this.closingBracketBlock=function(b,h,f,s,a){var l={row:f,column:s},u=b.$findOpeningBracket(h,l);if(u)return u.column++,l.column--,p.fromPoints(u,l)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,r,d){var p=t("../lib/dom"),g=t("../range").Range,b=t("../config").nls;function h(s,a,l){for(var u=0,i=s.length-1;u<=i;){var c=u+i>>1,m=l(a,s[c]);if(m>0)u=c+1;else if(m<0)i=c-1;else return c}return-(u+1)}function f(s,a,l){var u=s.getAnnotations().sort(g.comparePoints);if(u.length){var i=h(u,{row:a,column:-1},g.comparePoints);i<0&&(i=-i-1),i>=u.length?i=l>0?0:u.length-1:i===0&&l<0&&(i=u.length-1);var c=u[i];if(!(!c||!l)){if(c.row===a){do c=u[i+=l];while(c&&c.row===a);if(!c)return u.slice()}var m=[];a=c.row;do m[l<0?"unshift":"push"](c),c=u[i+=l];while(c&&c.row==a);return m.length&&m}}}r.showErrorMarker=function(s,a){var l=s.session,u=s.getCursorPosition(),i=u.row,c=l.widgetManager.getWidgetsAtRow(i).filter(function(N){return N.type=="errorMarker"})[0];c?c.destroy():i-=a;var m=f(l,i,a),w;if(m){var x=m[0];u.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,u.row=x.row,w=s.renderer.$gutterLayer.$annotations[u.row]}else{if(c)return;w={displayText:[b("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(u.row),s.selection.moveToPosition(u);var M={row:u.row,fixedWidth:!0,coverGutter:!0,el:p.createElement("div"),type:"errorMarker"},$=M.el.appendChild(p.createElement("div")),k=M.el.appendChild(p.createElement("div"));k.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(u).left;k.style.left=C+s.renderer.gutterWidth-5+"px",M.el.className="error_widget_wrapper",$.className="error_widget "+w.className,w.displayText.forEach(function(N,I){$.appendChild(p.createTextNode(N)),I<w.displayText.length-1&&$.appendChild(p.createElement("br"))}),$.appendChild(p.createElement("div"));var R=function(N,I,L){if(I===0&&(L==="esc"||L==="return"))return M.destroy(),{command:"null"}};M.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),l.widgetManager.removeLineWidget(M),s.off("changeSelection",M.destroy),s.off("changeSession",M.destroy),s.off("mouseup",M.destroy),s.off("change",M.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",M.destroy),s.on("changeSession",M.destroy),s.on("mouseup",M.destroy),s.on("change",M.destroy),s.session.widgetManager.addLineWidget(M),M.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:M.el.offsetHeight})},p.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(t,r,d){t("./loader_build")(r);var p=t("./lib/dom"),g=t("./range").Range,b=t("./editor").Editor,h=t("./edit_session").EditSession,f=t("./undomanager").UndoManager,s=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),r.config=t("./config"),r.edit=function(l,u){if(typeof l=="string"){var i=l;if(l=document.getElementById(i),!l)throw new Error("ace.edit can't find div #"+i)}if(l&&l.env&&l.env.editor instanceof b)return l.env.editor;var c="";if(l&&/input|textarea/i.test(l.tagName)){var m=l;c=m.value,l=p.createElement("pre"),m.parentNode.replaceChild(l,m)}else l&&(c=l.textContent,l.innerHTML="");var w=r.createEditSession(c),x=new b(new s(l),w,u),M={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(M.textarea=m),x.on("destroy",function(){M.editor.container.env=null}),x.container.env=x.env=M,x},r.createEditSession=function(l,u){var i=new h(l,u);return i.setUndoManager(new f),i},r.Range=g,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(t){t&&(t.config.init(!0),t.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=t);for(var d in t)t.hasOwnProperty(d)&&(r.ace[d]=t[d]);r.ace.default=r.ace,n&&(n.exports=r.ace)})}()}(_f)),_f.exports}var As=fr("w",k1()),$f={exports:{}},Tf;function S1(){return Tf||(Tf=1,function(n,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./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/},l=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},u=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"},c=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",x="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",M="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",k=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":M,"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,I,L){L.length&&(L=[]);var B=N[N.length-1];return L.unshift(B,I),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(N,I,L){L.length&&(L=[]);var B=N[N.length-1];return L.unshift(B,I),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(N,I,L){L.length&&(L=[]);var B=N[N.length-1];return L.unshift(B,I),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(N,I,L){L.length&&(L=[]);var B=N[N.length-1];return L.unshift(B,I),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(N,I,L){L.length&&(L=[]);var B=N[N.length-1];return L.unshift(B,I),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},c,{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:/\?(?=.+:)/},l,u,b,h,i,f,s,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(N,I,L){var B=N[2]=="-"||N[2]=="~"?"indentedHeredoc":"heredoc",P=N.split(this.splitRegex);return L.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,I,L){return N===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(N,I,L){return N===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(N,I){return I[0]==="heredoc"||I[0]==="indentedHeredoc"?I[0]:N}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(N,I,L){return this.next="",N=="}"&&L.length>1&&L[1]!="start"&&(L.shift(),this.next=L.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,I,L){return L.length&&N===L[0]?(L.unshift(N,I),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,I,L){return L.length&&N===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,I,L){return L.length&&N===L[0]?(L.unshift(N,I),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,I,L){return L.length&&N===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,I,L){return L.length&&N===L[0]?(L.unshift(N,I),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,I,L){return L.length&&N===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,I,L){return L.length&&N===L[0]?(L.unshift(N,I),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,I,L){return L.length&&N===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(N,I,L){return L.length&&N===L[0]?(L.unshift(N,I),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(N,I,L){return L.length&&N[0]===R[L[0]]?(L.shift(),this.next=L.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()};p.inherits(m,g),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,d){var p=t("../range").Range,g=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,l=b.findMatchingBracket({row:h,column:a});if(!l||l.row==h)return 0;var u=this.$getIndent(b.getLine(l.row));b.replace(new p(h,0,h,a-1),u)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(t,r,d){var p=t("../../lib/oop"),g=t("./fold_mode").FoldMode,b=t("../../range").Range,h=t("../../token_iterator").TokenIterator,f=r.FoldMode=function(){};p.inherits(f,g),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(s,a,l){var u=s.getLine(l),i=this.foldingStartMarker.test(u),c=this.foldingStopMarker.test(u);if(i&&!c){var m=u.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(u)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(u)===!1)||m[1]=="when"&&/\sthen\s/.test(u)===!0)return;if(s.getTokenAt(l,m.index+2).type==="keyword")return"start"}else if(!m[3]||s.getTokenAt(l,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!c||i&&c)return"";var m=u.match(this.foldingStopMarker);if(m[3]==="end"){if(s.getTokenAt(l,m.index+1).type==="keyword")return"end"}else if(!m[1]||s.getTokenAt(l,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,a,l){var u=s.doc.getLine(l),i=this.foldingStartMarker.exec(u);if(i)return i[1]||i[3]?this.rubyBlock(s,l,i.index+2):this.openingBracketBlock(s,"{",l,i.index);var i=this.foldingStopMarker.exec(u);if(i)return i[3]==="end"&&s.getTokenAt(l,i.index+1).type==="keyword"?this.rubyBlock(s,l,i.index+1):i[1]==="=end"&&s.getTokenAt(l,i.index+1).type==="comment.multiline"?this.rubyBlock(s,l,i.index+1):this.closingBracketBlock(s,"}",l,i.index+i[0].length)},this.rubyBlock=function(s,a,l,u){var i=new h(s,a,l),c=i.getCurrentToken();if(!(!c||c.type!="keyword"&&c.type!="comment.multiline")){var m=c.value,w=s.getLine(a);switch(c.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);if(!x.test(w))return;var M=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var M=1;break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");if(!x.test(w))return;var M=1;break;default:var M=this.indentKeywords[m]}var $=[m];if(M){var k=M===-1?s.getLine(a-1).length:s.getLine(a).length,C=a,R=[];if(R.push(i.getCurrentTokenRange()),i.step=M===-1?i.stepBackward:i.stepForward,c.type=="comment.multiline"){for(;c=i.step();)if(c.type==="comment.multiline"){if(M==1){if(k=6,c.value=="=end")break}else if(c.value=="=begin")break}}else for(;c=i.step();){var N=!1;if(c.type==="keyword"){var I=M*this.indentKeywords[c.value];switch(w=s.getLine(i.getCurrentTokenRow()),c.value){case"do":for(var L=i.$tokenIndex-1;L>=0;L--){var B=i.$rowTokens[L];if(B&&(B.value=="while"||B.value=="until"||B.value=="for")){I=0;break}}break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");(!x.test(w)||m=="case")&&(I=0,N=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);x.test(w)||(I=0,N=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(I=0,N=!0)}if(I>0)$.unshift(c.value);else if(I<=0&&N===!1){if($.shift(),!$.length&&((m=="while"||m=="until"||m=="for")&&c.value!="do"||c.value=="do"&&M==-1&&I!=0||c.value!="do"))break;I===0&&$.unshift(c.value)}}}if(!c)return null;if(u)return R.push(i.getCurrentTokenRange()),R;var a=i.getCurrentTokenRow();if(M===-1){if(c.type==="comment.multiline")var P=6;else var P=s.getLine(a).length;return new b(a,P,C-1,k)}return new b(C,k,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(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./ruby_highlight_rules").RubyHighlightRules,h=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../range").Range,s=t("./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};p.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(l,u,i){var c=this.$getIndent(u),m=this.getTokenizer().getLineTokens(u,l),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(l=="start"){var x=u.match(/^.*[\{\(\[]\s*$/),M=u.match(/^\s*(class|def|module)\s.*$/),$=u.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=u.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||M||$||k)&&(c+=i)}return c},this.checkOutdent=function(l,u,i){return/^\s+(end|else|rescue|ensure)$/.test(u+i)||this.$outdent.checkOutdent(u,i)},this.autoOutdent=function(l,u,i){var c=u.getLine(i);if(/}/.test(c))return this.$outdent.autoOutdent(u,i);var m=this.$getIndent(c),w=u.getLine(i-1),x=this.$getIndent(w),M=u.getTabString();x.length<=m.length&&m.slice(-M.length)==M&&u.remove(new f(i,m.length-M.length,i,m.length))},this.getMatching=function(l,u,i){if(u==null){var c=l.selection.lead;i=c.column,u=c.row}var m=l.getTokenAt(u,i);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(l,u,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(t){n&&(n.exports=t)})}()}($f)),$f.exports}S1();var Mf={exports:{}},Ef;function _1(){return Ef||(Ef=1,function(n,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./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"),l="[uU]?",u="[rR]",i="[fF]",c="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",M="(?:0[bB][01]+)",$="(?:"+m+"|"+w+"|"+x+"|"+M+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",R="(?:\\d+)",N="(?:(?:"+R+"?"+C+")|(?:"+R+"\\.))",I="(?:(?:"+N+"|"+R+")"+k+")",L="(?:"+I+"|"+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:l+'"{3}',next:"qqstring3"},{token:"string",regex:l+'"(?=.)',next:"qqstring"},{token:"string",regex:l+"'{3}",next:"qstring3"},{token:"string",regex:l+"'(?=.)",next:"qstring"},{token:"string",regex:u+'"{3}',next:"rawqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rawqqstring"},{token:"string",regex:u+"'{3}",next:"rawqstring3"},{token:"string",regex:u+"'(?=.)",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:c+'"{3}',next:"rfqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rfqqstring"},{token:"string",regex:c+"'{3}",next:"rfqstring3"},{token:"string",regex:c+"'(?=.)",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:"(?:"+L+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:L},{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()};p.inherits(b,g),r.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,d){var p=t("../../lib/oop"),g=t("./fold_mode").FoldMode,b=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};p.inherits(b,g),(function(){this.getFoldWidgetRange=function(h,f,s){var a=h.getLine(s),l=a.match(this.foldingStartMarker);if(l)return l[1]?this.openingBracketBlock(h,l[1],s,l.index):l[2]?this.indentationBlock(h,s,l.index+l[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(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./python_highlight_rules").PythonHighlightRules,h=t("./folding/pythonic").FoldMode,f=t("../range").Range,s=function(){this.HighlightRules=b,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};p.inherits(s,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(l,u,i){var c=this.$getIndent(u),m=this.getTokenizer().getLineTokens(u,l),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(l=="start"){var x=u.match(/^.*[\{\(\[:]\s*$/);x&&(c+=i)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(l,u,i){if(i!==`\r
986
+ `&&i!=="\r"&&i!==`
987
+ `)return!1;var c=this.getTokenizer().getLineTokens(u.trim(),l).tokens;if(!c)return!1;do var m=c.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(l,u,i){i+=1;var c=this.$getIndent(u.getLine(i)),m=u.getTabString();c.slice(-m.length)==m&&u.remove(new f(i,c.length-m.length,i,c.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/python"],function(t){n&&(n.exports=t)})}()}(Mf)),Mf.exports}_1();var Lf={exports:{}},If;function A1(){return If||(If=1,function(n,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./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"}]}};p.inherits(b,g),r.JsonHighlightRules=b}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,d){var p=t("../range").Range,g=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,l=b.findMatchingBracket({row:h,column:a});if(!l||l.row==h)return 0;var u=this.$getIndent(b.getLine(l.row));b.replace(new p(h,0,h,a-1),u)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,d){var p=t("../../lib/oop"),g=t("../../range").Range,b=t("./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)))};p.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 l=f.getLine(a);if(this.singleLineBlockCommentRe.test(l)&&!this.startRegionRe.test(l)&&!this.tripleStarBlockCommentRe.test(l))return"";var u=this._getFoldWidgetBase(f,s,a);return!u&&this.startRegionRe.test(l)?"start":u},this.getFoldWidgetRange=function(f,s,a,l){var u=f.getLine(a);if(this.startRegionRe.test(u))return this.getCommentRegionBlock(f,u,a);var i=u.match(this.foldingStartMarker);if(i){var c=i.index;if(i[1])return this.openingBracketBlock(f,i[1],a,c);var m=f.getCommentFoldRange(a,c+i[0].length,1);return m&&!m.isMultiLine()&&(l?m=this.getSectionRange(f,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var i=u.match(this.foldingStopMarker);if(i){var c=i.index+i[0].length;return i[1]?this.closingBracketBlock(f,i[1],a,c):f.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(f,s){var a=f.getLine(s),l=a.search(/\S/),u=s,i=a.length;s+=1;for(var c=s,m=f.getLength();++s<m;){a=f.getLine(s);var w=a.search(/\S/);if(w!==-1){if(l>w)break;var x=this.getFoldWidgetRange(f,"all",s);if(x){if(x.start.row<=u)break;if(x.isMultiLine())s=x.end.row;else if(l==w)break}c=s}}return new g(u,i,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,s,a){for(var l=s.search(/\s*$/),u=f.getLength(),i=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<u;){s=f.getLine(a);var w=c.exec(s);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>i)return new g(i,l,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(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./json_highlight_rules").JsonHighlightRules,h=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("./folding/cstyle").FoldMode,s=t("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new f};p.inherits(a,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(l,u,i){var c=this.$getIndent(u);if(l=="start"){var m=u.match(/^.*[\{\(\[]\s*$/);m&&(c+=i)}return c},this.checkOutdent=function(l,u,i){return this.$outdent.checkOutdent(u,i)},this.autoOutdent=function(l,u,i){this.$outdent.autoOutdent(u,i)},this.createWorker=function(l){var u=new s(["ace"],"ace/mode/json_worker","JsonWorker");return u.attachToDocument(l.getDocument()),u.on("annotate",function(i){l.setAnnotations(i.data)}),u.on("terminate",function(){l.clearAnnotations()}),u},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/json"],function(t){n&&(n.exports=t)})}()}(Lf)),Lf.exports}A1();var Rf={exports:{}},Of;function $1(){return Of||(Of=1,function(n,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop");t("../lib/lang");var g=t("./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",l=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",u=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",c=function(){var m=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:l},{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:"("+l+")(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:l},{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:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};p.inherits(c,g),r.CssHighlightRules=c}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./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()};p.inherits(b,g),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(t,r,d){function p(){var l=s.replace("\\d","\\d\\-"),u={onMatch:function(c,m,w){var x=c.charAt(1)=="/"?2:1;return x==1?(m!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):x==2&&m==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:c.slice(0,x)},{type:"meta.tag.tag-name.xml",value:c.substr(x)}]},regex:"</?(?:"+l+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(u);var i={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[i,u,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(c,m,w){return m==w[0]&&w.shift(),c.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:c}]},nextState:"jsx"},i,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:l},{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"}]},u],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(l){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:l||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:l||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=t("../lib/oop"),h=t("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,f=t("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(l){var u={"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(u,"identifier"),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(u).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),g("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:"(?:"+c+")\\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"),g("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{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:[g("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:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!l||!l.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(M,$,k){if(this.next=M=="{"?this.nextState:"",M=="{"&&k.length)k.unshift("start",$);else if(M=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return M=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+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"}),(!l||l.jsx!=0)&&p.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(t,r,d){var p=t("../lib/oop"),g=t("./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,l,u){return u.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(g.prototype),p.inherits(b,g),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(t,r,d){var p=t("../lib/oop"),g=t("../lib/lang"),b=t("./css_highlight_rules").CssHighlightRules,h=t("./javascript_highlight_rules").JavaScriptHighlightRules,f=t("./xml_highlight_rules").XmlHighlightRules,s=g.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),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(l,u){var i=s[u];return["meta.tag.punctuation."+(l=="<"?"":"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()};p.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(t,r,d){var p=t("../config").$modes,g=t("../lib/oop"),b=t("../lib/lang"),h=t("./text_highlight_rules").TextHighlightRules,f=t("./html_highlight_rules").HtmlHighlightRules,s=function(l){return"(?:[^"+b.escapeRegExp(l)+"\\\\]|\\\\.)*"},a=function(){f.call(this);var l={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(i,c,m,w){var x=i.match(/^(\s*)([`~]+)(.*)/),M=/[\w-]+|$/.exec(x[3])[0];return p[M]||(M=""),m.unshift("githubblock",[],[x[1],x[2],M],c),this.token},next:"githubblock"},u=[{token:"support.function",regex:".*",onMatch:function(i,c,m,w){var x=m[1],M=m[2][0],$=m[2][1],k=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(i);if(C&&C[1].length<M.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&p[k]){var R=p[k].getTokenizer().getLineTokens(i,x.slice(0));return m[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"},l,{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},l,{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:u}),this.normalizeRules()};g.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(t,r,d){var p=t("../../lib/oop"),g=t("./fold_mode").FoldMode,b=t("../../range").Range,h=r.FoldMode=function(){};p.inherits(h,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(f,s,a){var l=f.getLine(a);return this.foldingStartMarker.test(l)?l[0]=="`"&&f.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(f,s,a){function l(N){return M=f.getTokens(N)[0],M&&M.type.lastIndexOf($,0)===0}function u(){var N=M.value[0];return N=="="?6:N=="-"?5:7-M.value.search(/[^#]|$/)}var i=f.getLine(a),c=i.length,m=f.getLength(),w=a,x=a;if(i.match(this.foldingStartMarker)){if(i[0]=="`"){if(f.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(i=f.getLine(a),!(i[0]=="`"&i.substring(0,3)=="```")););return new b(w,c,a,0)}for(;a-- >0&&(i=f.getLine(a),!(i[0]=="`"&i.substring(0,3)=="```")););return new b(a,i.length,w,0)}var M,$="markup.heading";if(l(a)){for(var k=u();++a<m;)if(l(a)){var C=u();if(C>=k)break}if(x=a-(!M||["=","-"].indexOf(M.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,c,x,R)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,d){var p=t("../range").Range,g=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,l=b.findMatchingBracket({row:h,column:a});if(!l||l.row==h)return 0;var u=this.$getIndent(b.getLine(l.row));b.replace(new p(h,0,h,a-1),u)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(t,r,d){function p(s,a){return s&&s.type.lastIndexOf(a+".xml")>-1}var g=t("../../lib/oop"),b=t("../behaviour").Behaviour,h=t("../../token_iterator").TokenIterator,f=function(){this.add("string_dquotes","insertion",function(s,a,l,u,i){if(i=='"'||i=="'"){var c=i,m=u.doc.getTextRange(l.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&l.getWrapBehavioursEnabled())return{text:c+m+c,selection:!1};var w=l.getCursorPosition(),x=u.doc.getLine(w.row),M=x.substring(w.column,w.column+1),$=new h(u,w.row,w.column),k=$.getCurrentToken();if(M==c&&(p(k,"attribute-value")||p(k,"string")))return{text:"",selection:[1,1]};if(k||(k=$.stepBackward()),!k)return;for(;p(k,"tag-whitespace")||p(k,"whitespace");)k=$.stepBackward();var C=!M||M.match(/\s/);if(p(k,"attribute-equals")&&(C||M==">")||p(k,"decl-attribute-equals")&&(C||M=="?"))return{text:c+c,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,l,u,i){var c=u.doc.getTextRange(i);if(!i.isMultiLine()&&(c=='"'||c=="'")){var m=u.doc.getLine(i.start.row),w=m.substring(i.start.column+1,i.start.column+2);if(w==c)return i.end.column++,i}}),this.add("autoclosing","insertion",function(s,a,l,u,i){if(i==">"){var c=l.getSelectionRange().start,m=new h(u,c.row,c.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(p(w,"tag-name")||p(w,"tag-whitespace")||p(w,"attribute-name")||p(w,"attribute-equals")||p(w,"attribute-value"))||p(w,"reference.attribute-value"))return;if(p(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(c.column<x)return;if(c.column==x){var M=m.stepForward();if(M&&p(M,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(u.getLine(c.row).slice(c.column)))return;for(;!p(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var $=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(p(m.stepBackward(),"end-tag-open"))return;var C=w.value;return $==c.row&&(C=C.substring(0,c.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,l,u,i){if(i==`
988
+ `){var c=l.getCursorPosition(),m=u.getLine(c.row),w=new h(u,c.row,c.column),x=w.getCurrentToken();if(p(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 M=x.value,$=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[M]||!this.voidElements){var k=u.getTokenAt(c.row,c.column+1),m=u.getLine($),C=this.$getIndent(m),R=C+u.getTabString();return k&&k.value==="</"?{text:`
989
+ `+R+`
990
+ `+C,selection:[1,R.length,1,R.length]}:{text:`
991
+ `+R}}}}})};g.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(t,r,d){var p=t("../../lib/oop"),g=t("../../token_iterator").TokenIterator,b=t("../behaviour/cstyle").CstyleBehaviour,h=t("../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,l,u,i,c){if(c==">"){var m=u.getSelectionRange().start,w=new g(i,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};p.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(t,r,d){function p(a,l){return a&&a.type&&a.type.lastIndexOf(l+".xml")>-1}var g=t("../../lib/oop"),b=t("../../range").Range,h=t("./fold_mode").FoldMode,f=r.FoldMode=function(a,l){h.call(this),this.voidElements=a||{},this.optionalEndTags=g.mixin({},this.voidElements),l&&g.mixin(this.optionalEndTags,l)};g.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,l,u){var i=this._getFirstTagInLine(a,u);return i?i.closing||!i.tagName&&i.selfClosing?l==="markbeginend"?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())||this._findEndTagInLine(a,u,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(a,u)},this.getCommentFoldWidget=function(a,l){return/comment/.test(a.getState(l))&&/<!-/.test(a.getLine(l))?"start":""},this._getFirstTagInLine=function(a,l){for(var u=a.getTokens(l),i=new s,c=0;c<u.length;c++){var m=u[c];if(p(m,"tag-open")){if(i.end.column=i.start.column+m.value.length,i.closing=p(m,"end-tag-open"),m=u[++c],!m)return null;if(i.tagName=m.value,m.value===""){if(m=u[++c],!m)return null;i.tagName=m.value}for(i.end.column+=m.value.length,c++;c<u.length;c++)if(m=u[c],i.end.column+=m.value.length,p(m,"tag-close")){i.selfClosing=m.value=="/>";break}return i}if(p(m,"tag-close"))return i.selfClosing=m.value=="/>",i;i.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,l,u,i){for(var c=a.getTokens(l),m=0,w=0;w<c.length;w++){var x=c[w];if(m+=x.value.length,!(m<i-1)&&p(x,"end-tag-open")&&(x=c[w+1],p(x,"tag-name")&&x.value===""&&(x=c[w+2]),x&&x.value==u))return!0}return!1},this.getFoldWidgetRange=function(a,l,u){var i=this._getFirstTagInLine(a,u);if(!i)return this.getCommentFoldWidget(a,u)&&a.getCommentFoldRange(u,a.getLine(u).length);var c=a.getMatchingTags({row:u,column:0});if(c)return new b(c.openTag.end.row,c.openTag.end.column,c.closeTag.start.row,c.closeTag.start.column)}}).call(f.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,d){var p=t("../../lib/oop"),g=t("../../range").Range,b=t("./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)))};p.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 l=f.getLine(a);if(this.singleLineBlockCommentRe.test(l)&&!this.startRegionRe.test(l)&&!this.tripleStarBlockCommentRe.test(l))return"";var u=this._getFoldWidgetBase(f,s,a);return!u&&this.startRegionRe.test(l)?"start":u},this.getFoldWidgetRange=function(f,s,a,l){var u=f.getLine(a);if(this.startRegionRe.test(u))return this.getCommentRegionBlock(f,u,a);var i=u.match(this.foldingStartMarker);if(i){var c=i.index;if(i[1])return this.openingBracketBlock(f,i[1],a,c);var m=f.getCommentFoldRange(a,c+i[0].length,1);return m&&!m.isMultiLine()&&(l?m=this.getSectionRange(f,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var i=u.match(this.foldingStopMarker);if(i){var c=i.index+i[0].length;return i[1]?this.closingBracketBlock(f,i[1],a,c):f.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(f,s){var a=f.getLine(s),l=a.search(/\S/),u=s,i=a.length;s+=1;for(var c=s,m=f.getLength();++s<m;){a=f.getLine(s);var w=a.search(/\S/);if(w!==-1){if(l>w)break;var x=this.getFoldWidgetRange(f,"all",s);if(x){if(x.start.row<=u)break;if(x.isMultiLine())s=x.end.row;else if(l==w)break}c=s}}return new g(u,i,c,f.getLine(c).length)},this.getCommentRegionBlock=function(f,s,a){for(var l=s.search(/\s*$/),u=f.getLength(),i=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<u;){s=f.getLine(a);var w=c.exec(s);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>i)return new g(i,l,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(t,r,d){var p=t("../../lib/oop"),g=t("./xml").FoldMode,b=t("./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 g};p.inherits(h,b),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(f,s,a){var l=this.getFoldWidgetBase(f,s,a);return l||this.xmlFoldMode.getFoldWidget(f,s,a)},this.getFoldWidgetRange=function(f,s,a,l){var u=this.getFoldWidgetRangeBase(f,s,a,l);return u||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(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./javascript_highlight_rules").JavaScriptHighlightRules,h=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../worker/worker_client").WorkerClient,s=t("./behaviour/javascript").JavaScriptBehaviour,a=t("./folding/javascript").FoldMode,l=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new s,this.foldingRules=new a};p.inherits(l,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(u,i,c){var m=this.$getIndent(i),w=this.getTokenizer().getLineTokens(i,u),x=w.tokens,M=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(u=="start"||u=="no_regex"){var $=i.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(m+=c)}else if(u=="doc-start"&&(M=="start"||M=="no_regex"))return"";return m},this.checkOutdent=function(u,i,c){return this.$outdent.checkOutdent(i,c)},this.autoOutdent=function(u,i,c){this.$outdent.autoOutdent(i,c)},this.createWorker=function(u){var i=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return i.attachToDocument(u.getDocument()),i.on("annotate",function(c){u.setAnnotations(c.data)}),i.on("terminate",function(){u.clearAnnotations()}),i},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(l.prototype),r.Mode=l}),ace.define("ace/mode/css_completions",["require","exports","module"],function(t,r,d){var p={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},g=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var 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()});p.hasOwnProperty(f)||(p[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),l=/\([^)]*$/.test(a);return l&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(b,h,f,s):this.getPropertyCompletions(b,h,f,s,l)}return[]},this.getPropertyCompletions=function(b,h,f,s,a){a=a||!1;var l=Object.keys(p);return l.map(function(u){return{caption:u,snippet:u+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(b,h,f,s){var a=h.getLine(f.row).substr(0,f.column),l=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!l)return[];var u=[];return l in p&&typeof p[l]=="object"&&(u=Object.keys(p[l])),u.map(function(i){return{caption:i,snippet:i,meta:"property value",score:1e6}})}}).call(g.prototype),r.CssCompletions=g}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(t,r,d){var p=t("../../lib/oop");t("../behaviour").Behaviour;var g=t("./cstyle").CstyleBehaviour,b=t("../../token_iterator").TokenIterator,h=function(){this.inherit(g),this.add("colon","insertion",function(f,s,a,l,u){if(u===":"&&a.selection.isEmpty()){var i=a.getCursorPosition(),c=new b(l,i.row,i.column),m=c.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=c.stepBackward()),m&&m.type==="support.type"){var w=l.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,l,u){var i=l.doc.getTextRange(u);if(!u.isMultiLine()&&i===":"){var c=a.getCursorPosition(),m=new b(l,c.row,c.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=l.doc.getLine(u.start.row),M=x.substring(u.end.column,u.end.column+1);if(M===";")return u.end.column++,u}}}),this.add("semicolon","insertion",function(f,s,a,l,u){if(u===";"&&a.selection.isEmpty()){var i=a.getCursorPosition(),c=l.doc.getLine(i.row),m=c.substring(i.column,i.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(f,s,a,l,u){if(u==="!"&&a.selection.isEmpty()){var i=a.getCursorPosition(),c=l.doc.getLine(i.row);if(/^\s*(;|}|$)/.test(c.substring(i.column)))return{text:"!important",selection:[10,10]}}})};p.inherits(h,g),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(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./css_highlight_rules").CssHighlightRules,h=t("./matching_brace_outdent").MatchingBraceOutdent,f=t("../worker/worker_client").WorkerClient,s=t("./css_completions").CssCompletions,a=t("./behaviour/css").CssBehaviour,l=t("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new l};p.inherits(u,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(i,c,m){var w=this.$getIndent(c),x=this.getTokenizer().getLineTokens(c,i).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var M=c.match(/^.*\{\s*$/);return M&&(w+=m),w},this.checkOutdent=function(i,c,m){return this.$outdent.checkOutdent(c,m)},this.autoOutdent=function(i,c,m){this.$outdent.autoOutdent(c,m)},this.getCompletions=function(i,c,m,w){return this.$completer.getCompletions(i,c,m,w)},this.createWorker=function(i){var c=new f(["ace"],"ace/mode/css_worker","Worker");return c.attachToDocument(i.getDocument()),c.on("annotate",function(m){i.setAnnotations(m.data)}),c.on("terminate",function(){i.clearAnnotations()}),c},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,d){var p=t("../../lib/oop"),g=t("./fold_mode").FoldMode,b=r.FoldMode=function(h,f){this.defaultMode=h,this.subModes=f};p.inherits(b,g),(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 l=this.$getMode(h);return l?l.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(t,r,d){var p=t("../../lib/oop"),g=t("./mixed").FoldMode,b=t("./xml").FoldMode,h=t("./cstyle").FoldMode,f=r.FoldMode=function(s,a){g.call(this,new b(s,a),{"js-":new h,"css-":new h})};p.inherits(f,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(t,r,d){function p(c,m){return c.type.lastIndexOf(m+".xml")>-1}function g(c,m){for(var w=new h(c,m.row,m.column),x=w.getCurrentToken();x&&!p(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function b(c,m){for(var w=new h(c,m.row,m.column),x=w.getCurrentToken();x&&!p(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var h=t("../token_iterator").TokenIterator,f=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],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),l={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:{}},u=Object.keys(l),i=function(){};(function(){this.getCompletions=function(c,m,w,x){var M=m.getTokenAt(w.row,w.column);if(!M)return[];if(p(M,"tag-name")||p(M,"tag-open")||p(M,"end-tag-open"))return this.getTagCompletions(c,m,w,x);if(p(M,"tag-whitespace")||p(M,"attribute-name"))return this.getAttributeCompletions(c,m,w,x);if(p(M,"attribute-value"))return this.getAttributeValueCompletions(c,m,w,x);var $=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(c,m,w,x):[]},this.getTagCompletions=function(c,m,w,x){return u.map(function(M){return{value:M,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(c,m,w,x){var M=g(m,w);if(!M)return[];var $=a;return M in l&&($=$.concat(Object.keys(l[M]))),$.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(c,m,w,x){var M=g(m,w),$=b(m,w);if(!M)return[];var k=[];return M in l&&$ in l[M]&&typeof l[M][$]=="object"&&(k=Object.keys(l[M][$])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(c,m,w,x){var M=["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 M.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(t,r,d){var p=t("../lib/oop"),g=t("../lib/lang"),b=t("./text").Mode,h=t("./javascript").Mode,f=t("./css").Mode,s=t("./html_highlight_rules").HtmlHighlightRules,a=t("./behaviour/xml").XmlBehaviour,l=t("./folding/html").FoldMode,u=t("./html_completions").HtmlCompletions,i=t("../worker/worker_client").WorkerClient,c=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=s,this.$behaviour=new a,this.$completer=new u,this.createModeDelegates({"js-":h,"css-":f}),this.foldingRules=new l(this.voidElements,g.arrayToMap(m))};p.inherits(w,b),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(c),this.getNextLineIndent=function(x,M,$){return this.$getIndent(M)},this.checkOutdent=function(x,M,$){return!1},this.getCompletions=function(x,M,$,k){return this.$completer.getCompletions(x,M,$,k)},this.createWorker=function(x){if(this.constructor==w){var M=new i(["ace"],"ace/mode/html_worker","Worker");return M.attachToDocument(x.getDocument()),this.fragmentContext&&M.call("setOptions",[{context:this.fragmentContext}]),M.on("error",function($){x.setAnnotations($.data)}),M.on("terminate",function(){x.clearAnnotations()}),M}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,d){var p=t("../lib/oop"),g=t("./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))",l="(?:\\.\\d+)",u="(?:\\d+)",i="(?:(?:"+u+"?"+l+")|(?:"+u+"\\.))",c="(?:(?:"+i+"|"+u+"))",m="(?:"+c+"|"+i+")",w="(?:&"+u+")",x="[a-zA-Z_][a-zA-Z0-9_]*",M="(?:"+x+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,R,N){var I=C[2]=="-"?"indentedHeredoc":"heredoc",L=C.split(this.splitRegex);return N.push(I,L[4]),[{type:"constant",value:L[1]},{type:"text",value:L[2]},{type:"string",value:L[3]},{type:"support.class",value:L[4]},{type:"string",value:L[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:M},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{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()};p.inherits(f,g),r.ShHighlightRules=f}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(t,r,d){var p=t("../lib/oop"),g=t("./text").Mode,b=t("./sh_highlight_rules").ShHighlightRules,h=t("../range").Range,f=t("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=b,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};p.inherits(s,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(l,u,i){var c=this.$getIndent(u),m=this.getTokenizer().getLineTokens(u,l),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(l=="start"){var x=u.match(/^.*[\{\(\[:]\s*$/);x&&(c+=i)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(l,u,i){if(i!==`\r
992
+ `&&i!=="\r"&&i!==`
993
+ `)return!1;var c=this.getTokenizer().getLineTokens(u.trim(),l).tokens;if(!c)return!1;do var m=c.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(l,u,i){i+=1;var c=this.$getIndent(u.getLine(i)),m=u.getTabString();c.slice(-m.length)==m&&u.remove(new h(i,c.length-m.length,i,c.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(t,r,d){var p=t("../lib/oop"),g=t("../lib/lang"),b=t("./text").Mode,h=t("./xml_highlight_rules").XmlHighlightRules,f=t("./behaviour/xml").XmlBehaviour,s=t("./folding/xml").FoldMode,a=t("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=h,this.$behaviour=new f,this.foldingRules=new s};p.inherits(l,b),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(u){var i=new a(["ace"],"ace/mode/xml_worker","Worker");return i.attachToDocument(u.getDocument()),i.on("error",function(c){u.setAnnotations(c.data)}),i.on("terminate",function(){u.clearAnnotations()}),i},this.$id="ace/mode/xml"}).call(l.prototype),r.Mode=l}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(t,r,d){var p=t("../lib/oop"),g=t("./behaviour/cstyle").CstyleBehaviour,b=t("./text").Mode,h=t("./markdown_highlight_rules").MarkdownHighlightRules,f=t("./folding/markdown").FoldMode,s=function(){this.HighlightRules=h,this.createModeDelegates({javascript:t("./javascript").Mode,html:t("./html").Mode,bash:t("./sh").Mode,sh:t("./sh").Mode,xml:t("./xml").Mode,css:t("./css").Mode}),this.foldingRules=new f,this.$behaviour=new g({braces:!0})};p.inherits(s,b),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,l,u){if(a=="listblock"){var i=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(l);if(!i)return"";var c=i[2];return c||(c=parseInt(i[3],10)+1+"."),i[1]+c+i[4]}return this.$getIndent(l)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/markdown"],function(t){n&&(n.exports=t)})}()}(Rf)),Rf.exports}$1();var Nf={exports:{}},Df;function T1(){return Df||(Df=1,function(n,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(t,r,d){d.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(t,r,d){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=t("./twilight-css");var p=t("../lib/dom");p.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(t){n&&(n.exports=t)})}()}(Nf)),Nf.exports}T1();var Ff={exports:{}},Pf;function M1(){return Pf||(Pf=1,function(n,e){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(t,r,d){function p(C){var R=new Date().toLocaleString("en-us",C);return R.length==1?"0"+R:R}var g=t("./lib/dom"),b=t("./lib/oop"),h=t("./lib/event_emitter").EventEmitter,f=t("./lib/lang"),s=t("./range").Range,a=t("./range_list").RangeList,l=t("./keyboard/hash_handler").HashHandler,u=t("./tokenizer").Tokenizer,i=t("./clipboard"),c={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,R,N){var I=C.session.getTextRange();return N?I.replace(/\n\r?([ \t]*\S)/g,`
1124
+ `+N+"$1"):I},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:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};c.SELECTED_TEXT=c.SELECTION;var m=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function R(L){return L=L.substr(1),/^\d+$/.test(L)?[{tabstopId:parseInt(L,10)}]:[{text:L}]}function N(L){return"(?:[^\\\\"+L+"]|\\\\.)"}var I={regex:"/("+N("/")+"+)/",onMatch:function(L,B,P){var O=P[0];return O.fmtString=!0,O.guard=L.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new u({start:[{regex:/\\./,onMatch:function(L,B,P){var O=L[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(L=O),[L]}},{regex:/}/,onMatch:function(L,B,P){return[P.length?P.shift():L]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(L,B,P){var O=R(L.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+N("\\|")+"*\\|",onMatch:function(L,B,P){var O=L.slice(1,-1).replace(/\\[,|\\]|,/g,function(A){return A.length==2?A[1]:"\0"}).split("\0").map(function(A){return{value:A}});return P[0].choices=O,[O[0]]},next:"start"},I,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(L,B,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(L,B,P){var O=L[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?L=O:O=="n"?L=`
1125
+ `:O=="t"?L=" ":"ulULE".indexOf(O)!=-1&&(L={changeCase:O,local:O>"a"}),[L]}},{regex:"/\\w*}",onMatch:function(L,B,P){var O=P.shift();return O&&(O.flag=L.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||L]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(L,B,P){return[{text:L.slice(1)}]}},{regex:/\${\w+/,onMatch:function(L,B,P){var O={text:L.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(L,B,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||L]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(L,B,P){var O=P[0];return O.formatFunction=L.slice(2,-1),[P.shift()]},next:"formatString"},I,{regex:/:[\?\-+]?/,onMatch:function(L,B,P){L[1]=="+"&&(P[0].ifEnd=P[0]),L[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(I){return I.value||I})},C.prototype.getVariableValue=function(R,N,I){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 L=this.variables[N];return typeof L=="function"&&(L=this.variables[N](R,N,I)),L??""},C.prototype.tmStrFormat=function(R,N,I){if(!N.fmt)return R;var L=N.flag||"",B=N.guard;B=new RegExp(B,L.replace(/[^gim]/g,""));var P=typeof N.fmt=="string"?this.tokenizeTmSnippet(N.fmt,"formatString"):N.fmt,O=this,A=R.replace(B,function(){var S=O.variables.__;O.variables.__=[].slice.call(arguments);for(var D=O.resolveVariables(P,I),z="E",U=0;U<D.length;U++){var K=D[U];if(typeof K=="object")if(D[U]="",K.changeCase&&K.local){var X=D[U+1];X&&typeof X=="string"&&(K.changeCase=="u"?D[U]=X[0].toUpperCase():D[U]=X[0].toLowerCase(),D[U+1]=X.substr(1))}else K.changeCase&&(z=K.changeCase);else z=="U"?D[U]=K.toUpperCase():z=="L"&&(D[U]=K.toLowerCase())}return O.variables.__=S,D.join("")});return A},C.prototype.tmFormatFunction=function(R,N,I){return N.formatFunction=="upcase"?R.toUpperCase():N.formatFunction=="downcase"?R.toLowerCase():R},C.prototype.resolveVariables=function(R,N){function I(z){var U=R.indexOf(z,O+1);U!=-1&&(O=U)}for(var L=[],B="",P=!0,O=0;O<R.length;O++){var A=R[O];if(typeof A=="string"){L.push(A),A==`
1126
+ `?(P=!0,B=""):P&&(B=/^\t*/.exec(A)[0],P=/\S/.test(A));continue}if(A){if(P=!1,A.fmtString){var S=R.indexOf(A,O+1);S==-1&&(S=R.length),A.fmt=R.slice(O+1,S),O=S}if(A.text){var D=this.getVariableValue(N,A.text,B)+"";A.fmtString&&(D=this.tmStrFormat(D,A,N)),A.formatFunction&&(D=this.tmFormatFunction(D,A,N)),D&&!A.ifEnd?(L.push(D),I(A)):!D&&A.ifEnd&&I(A.ifEnd)}else A.elseEnd?I(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&L.push(A)}}return L},C.prototype.getDisplayTextForSnippet=function(R,N){var I=w.call(this,R,N);return I.text},C.prototype.insertSnippetForSelection=function(R,N,I){I===void 0&&(I={});var L=w.call(this,R,N,I),B=R.getSelectionRange(),P=R.session.replace(B,L.text),O=new x(R),A=R.inVirtualSelectionMode&&R.selection.index;O.addTabstops(L.tabstops,B.start,P,A)},C.prototype.insertSnippet=function(R,N,I){I===void 0&&(I={});var L=this;if(R.inVirtualSelectionMode)return L.insertSnippetForSelection(R,N,I);R.forEachSelection(function(){L.insertSnippetForSelection(R,N,I)},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 I=R.getCursorPosition(),L=R.session.getState(I.row);typeof L=="object"&&(L=L[0]),L.substring&&(L.substring(0,3)=="js-"?N="javascript":L.substring(0,4)=="css-"?N="css":L.substring(0,4)=="php-"&&(N="php"))}return N},C.prototype.getActiveScopes=function(R){var N=this.$getScope(R),I=[N],L=this.snippetMap;return L[N]&&L[N].includeScopes&&I.push.apply(I,L[N].includeScopes),I.push("_"),I},C.prototype.expandWithTab=function(R,N){var I=this,L=R.forEachSelection(function(){return I.expandSnippetForSelection(R,N)},null,{keepOrder:!0});return L&&R.tabstopManager&&R.tabstopManager.tabNext(),L},C.prototype.expandSnippetForSelection=function(R,N){var I=R.getCursorPosition(),L=R.session.getLine(I.row),B=L.substring(0,I.column),P=L.substr(I.column),O=this.snippetMap,A;return this.getActiveScopes(R).some(function(S){var D=O[S];return D&&(A=this.findMatchingSnippet(D,B,P)),!!A},this),A?(N&&N.dryRun||(R.session.doc.removeInLine(I.row,I.column-A.replaceBefore.length,I.column+A.replaceAfter.length),this.variables.M__=A.matchBefore,this.variables.T__=A.matchAfter,this.insertSnippetForSelection(R,A.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(R,N,I){for(var L=R.length;L--;){var B=R[L];if(!(B.startRe&&!B.startRe.test(N))&&!(B.endRe&&!B.endRe.test(I))&&!(!B.startRe&&!B.endRe))return B.matchBefore=B.startRe?B.startRe.exec(N):[""],B.matchAfter=B.endRe?B.endRe.exec(I):[""],B.replaceBefore=B.triggerRe?B.triggerRe.exec(N)[0]:"",B.replaceAfter=B.endTriggerRe?B.endTriggerRe.exec(I)[0]:"",B}},C.prototype.register=function(R,N){function I(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function L(S,D,z){return S=I(S),D=I(D),S=D+S,S&&S[S.length-1]!="$"&&(S+="$"),new RegExp(S)}function B(S){S.scope||(S.scope=N||"_"),N=S.scope,P[N]||(P[N]=[],O[N]={});var D=O[N];if(S.name){var z=D[S.name];z&&A.unregister(z),D[S.name]=S}P[N].push(S),S.prefix&&(S.tabTrigger=S.prefix),!S.content&&S.body&&(S.content=Array.isArray(S.body)?S.body.join(`
1127
+ `):S.body),S.tabTrigger&&!S.trigger&&(!S.guard&&/^\w/.test(S.tabTrigger)&&(S.guard="\\b"),S.trigger=f.escapeRegExp(S.tabTrigger)),!(!S.trigger&&!S.guard&&!S.endTrigger&&!S.endGuard)&&(S.startRe=L(S.trigger,S.guard),S.triggerRe=new RegExp(S.trigger),S.endRe=L(S.endTrigger,S.endGuard),S.endTriggerRe=new RegExp(S.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,A=this;R||(R=[]),Array.isArray(R)?R.forEach(B):Object.keys(R).forEach(function(S){B(R[S])}),this._signal("registerSnippets",{scope:N})},C.prototype.unregister=function(R,N){function I(P){var O=B[P.scope||N];if(O&&O[P.name]){delete O[P.name];var A=L[P.scope||N],S=A&&A.indexOf(P);S>=0&&A.splice(S,1)}}var L=this.snippetMap,B=this.snippetNameMap;R.content?I(R):Array.isArray(R)&&R.forEach(I)},C.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var N=[],I={},L=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,B;B=L.exec(R);){if(B[1])try{I=JSON.parse(B[1]),N.push(I)}catch{}if(B[4])I.content=B[4].replace(/^\t/gm,""),N.push(I),I={};else{var P=B[2],O=B[3];if(P=="regex"){var A=/\/((?:[^\/\\]|\\.)*)|$/g;I.guard=A.exec(O)[1],I.trigger=A.exec(O)[1],I.endTrigger=A.exec(O)[1],I.endGuard=A.exec(O)[1]}else P=="snippet"?(I.tabTrigger=O.match(/^\S*/)[0],I.name||(I.name=O)):P&&(I[P]=O)}}return N},C.prototype.getSnippetByName=function(R,N){var I=this.snippetNameMap,L;return this.getActiveScopes(N).some(function(B){var P=I[B];return P&&(L=P[R]),!!L},this),L},C}();b.implement(m.prototype,h);var w=function(C,R,N){function I(ue){for(var me=[],Ae=0;Ae<ue.length;Ae++){var Te=ue[Ae];if(typeof Te=="object"){if(D[Te.tabstopId])continue;var Me=ue.lastIndexOf(Te,Ae-1);Te=me[Me]||{tabstopId:Te.tabstopId}}me[Ae]=Te}return me}N===void 0&&(N={});var L=C.getCursorPosition(),B=C.session.getLine(L.row),P=C.session.getTabString(),O=B.match(/^\s*/)[0];L.column<O.length&&(O=O.slice(0,L.column)),R=R.replace(/\r/g,"");var A=this.tokenizeTmSnippet(R);A=this.resolveVariables(A,C),A=A.map(function(ue){return ue==`
1128
+ `&&!N.excludeExtraIndent?ue+O:typeof ue=="string"?ue.replace(/\t/g,P):ue});var S=[];A.forEach(function(ue,me){if(typeof ue=="object"){var Ae=ue.tabstopId,Te=S[Ae];if(Te||(Te=S[Ae]=[],Te.index=Ae,Te.value="",Te.parents={}),Te.indexOf(ue)===-1){ue.choices&&!Te.choices&&(Te.choices=ue.choices),Te.push(ue);var Me=A.indexOf(ue,me+1);if(Me!==-1){var Je=A.slice(me+1,Me),qe=Je.some(function(pt){return typeof pt=="object"});qe&&!Te.value?Te.value=Je:Je.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Je.join(""))}}}}),S.forEach(function(ue){ue.length=0});for(var D={},z=0;z<A.length;z++){var U=A[z];if(typeof U=="object"){var K=U.tabstopId,X=S[K],ee=A.indexOf(U,z+1);if(D[K]){D[K]===U&&(delete D[K],Object.keys(D).forEach(function(ue){X.parents[ue]=!0}));continue}D[K]=U;var de=X.value;typeof de!="string"?de=I(de):U.fmt&&(de=this.tmStrFormat(de,U,C)),A.splice.apply(A,[z+1,Math.max(0,ee-z)].concat(de,U)),X.indexOf(U)===-1&&X.push(U)}}var te=0,le=0,se="";return A.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:S,tokens:A}},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",I=this.selectedTabstop||{},L=I.parents||{},B=this.tabstops.slice(),P=0;P<B.length;P++){var O=B[P],A=O==I||L[O.index];if(O.rangeList.$bias=A?0:1,R.action=="remove"&&O!==I){var S=O.parents&&O.parents[I.index],D=O.rangeList.pointIndex(R.start,S);D=D<0?-D-1:D+1;var z=O.rangeList.pointIndex(R.end,S);z=z<0?-z-1:z-1;for(var U=O.rangeList.ranges.slice(D,z),K=0;K<U.length;K++)this.removeRange(U[K])}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,I=N.getTextRange(R.firstNonLinked),L=0;L<R.length;L++){var B=R[L];if(B.linked){var P=B.original,O=r.snippetManager.tmStrFormat(I,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,I=this.editor.selection.isEmpty(),L=0;L<this.ranges.length;L++)if(!this.ranges[L].linked){var B=this.ranges[L].contains(R.row,R.column),P=I||this.ranges[L].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,I=this.index+(R||1);I=Math.min(Math.max(I,1),N),I==N&&(I=0),this.selectTabstop(I),this.updateTabstopMarkers(),I===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 I=N.firstNonLinked||N;if(N.choices&&(I.cursor=I.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(I);else{var L=this.editor.multiSelect;L.toSingleRange(I);for(var B=0;B<N.length;B++)N.hasLinkedRanges&&N[B].linked||L.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,I){var L=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var B=s.fromPoints(I,I);$(B.start,N),$(B.end,N),R[0]=[B],R[0].index=0}var P=this.index,O=[P+1,0],A=this.ranges,S=this.snippetId=(this.snippetId||0)+1;R.forEach(function(D,z){var U=this.$openTabstops[z]||D;U.snippetId=S;for(var K=0;K<D.length;K++){var X=D[K],ee=s.fromPoints(X.start,X.end||X.start);M(ee.start,N),M(ee.end,N),ee.original=X,ee.tabstop=U,A.push(ee),U!=D?U.unshift(ee):U[K]=ee,X.fmtString||U.firstNonLinked&&L?(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(I){I.markerId||(I.markerId=N.addMarker(I,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(R){var N=this.session;R.forEach(function(I){N.removeMarker(I.markerId),I.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 l,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 M=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};g.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 m;var k=t("./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(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(t,r,d){var p=t("../virtual_renderer").VirtualRenderer,g=t("../editor").Editor,b=t("../range").Range,h=t("../lib/event"),f=t("../lib/lang"),s=t("../lib/dom"),a=t("../config").nls,l=t("./../lib/useragent"),u=function(M){return"suggest-aria-id:".concat(M)},i=l.isSafari?"menu":"listbox",c=l.isSafari?"menuitem":"option",m=l.isSafari?"aria-current":"aria-selected",w=function(M){var $=new p(M);$.$maxLines=4;var k=new g($);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},x=function(){function M($){var k=s.createElement("div"),C=w(k);$&&$.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",i),C.renderer.$textLayer.element.setAttribute("aria-roledescription",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(A){var S=A.getDocumentPosition();C.selection.moveToPosition(S),L.start.row=L.end.row=S.row,A.stop()});var N,I=new b(-1,0,-1,1/0),L=new b(-1,0,-1,1/0);L.id=C.session.addMarker(L,"ace_active-line","fullLine"),C.setSelectOnHover=function(A){A?I.id&&(C.session.removeMarker(I.id),I.id=null):I.id=C.session.addMarker(I,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(A){if(!N){N=A;return}if(!(N.x==A.x&&N.y==A.y)){N=A,N.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var S=N.getDocumentPosition().row;I.start.row!=S&&(I.id||C.setRow(S),P(S))}}),C.renderer.on("beforeRender",function(){if(N&&I.start.row!=-1){N.$pos=null;var A=N.getDocumentPosition().row;I.id||C.setRow(A),P(A,!0)}}),C.renderer.on("afterRender",function(){for(var A=C.renderer.$textLayer,S=A.config.firstRow,D=A.config.lastRow;S<=D;S++){var z=A.element.childNodes[S-A.config.firstRow];z.setAttribute("role",c),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",S+1);var U=C.getData(S);if(U){var K="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");z.setAttribute("aria-label",K)}var X=z.querySelectorAll(".ace_completion-highlight");X.forEach(function(ee){ee.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var A=C.getRow(),S=C.renderer.$textLayer,D=S.element.childNodes[A-S.config.firstRow],z=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),z.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=u(A);s.addCssClass(D,"ace_selected"),D.id=U,S.element.setAttribute("aria-activedescendant",U),z.setAttribute("aria-activedescendant",U),D.setAttribute(m,"true")}});var B=function(){P(-1)},P=function(A,S){A!==I.start.row&&(I.start.row=I.end.row=A,S||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return I.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(A){var S=C.data[A];return typeof S=="string"?S:S&&S.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(A){function S(ue,me){ue&&z.push({type:(D.className||"")+(me||""),value:ue})}var D=C.data[A],z=[];if(!D)return z;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,K=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=K.indexOf(le,ee);if(se==-1)continue;S(U.slice(ee,se),""),ee=se+le.length,S(U.slice(se,ee),"completion-highlight")}return S(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(A,S){C.filterText=S||"",C.setValue(f.stringRepeat(`
1137
+ `,A.length),-1),C.data=A||[],C.setRow(0)},C.getData=function(A){return C.data[A]},C.getRow=function(){return L.start.row},C.setRow=function(A){A=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,A)),L.start.row!=A&&(C.selection.clearSelection(),L.start.row=L.end.row=A||0,C.session._emit("changeBackMarker"),C.moveCursorTo(A||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(A,S,D,z){if(!z&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===A.top&&C.anchorPos.left===A.left&&C.anchor===D)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,X=window.innerHeight-K,ee=window.innerWidth-K,de=this.renderer,te=de.$maxLines*S*1.4,le={top:0,bottom:0},se=X-A.top-3*this.$borderSize-S,ue=A.top-3*this.$borderSize;D||(ue<=se||se>=te?D="bottom":D="top"),D==="top"?(le.bottom=A.top-this.$borderSize,le.top=le.bottom-te):D==="bottom"&&(le.top=A.top+S+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 Ae=U.offsetParent&&U.offsetParent.getBoundingClientRect();D==="top"?(U.style.top="",U.style.bottom=X+K-le.bottom-(Ae?X+K-Ae.bottom:0)+"px",C.isTopdown=!1):(U.style.top=le.top-(Ae?Ae.top:0)+"px",U.style.bottom="",C.isTopdown=!0);var Te=A.left;return Te+U.offsetWidth>ee&&(Te=ee-U.offsetWidth),U.style.left=Te-(Ae?Ae.left:0)+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),N=null),C.anchorPos=A,C.anchor=D,!0},C.show=function(A,S,D){this.tryShow(A,S,D?"bottom":void 0,!0)},C.goTo=function(A){var S=this.getRow(),D=this.session.getLength()-1;switch(A){case"up":S=S<=0?D:S-1;break;case"down":S=S>=D?-1:S+1;break;case"start":S=0;break;case"end":S=D}this.setRow(S)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return M}();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=u}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(t,r,d){var p=function(){function g(b){this.editor=b,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.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 l="doc-tooltip ",u=0;u<this._lines.length;u++)l+="ace-inline-screenreader-line-".concat(u," ");a.setAttribute("aria-describedby",l)}}).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)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.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},g}();r.AceInlineScreenReader=p}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(t,r,d){var p=t("../snippets").snippetManager,g=t("./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 g(f));var l=s.snippet?p.getDisplayTextForSnippet(f,s.snippet):s.value;return s.hideInlinePreview||!l||!l.startsWith(a)?!1:(this.editor=f,this.inlineScreenReader.setScreenReaderContent(l),l=l.slice(a.length),l===""?f.removeGhostText():f.setGhostText(l),!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(t,r,d){r.parForEach=function(g,b,h){var f=0,s=g.length;s===0&&h();for(var a=0;a<s;a++)b(g[a],function(l,u){f++,f===s&&h(l,u)})};var p=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,b,h){h=h||p;for(var f=[],s=b-1;s>=0&&h.test(g[s]);s--)f.push(g[s]);return f.reverse().join("")},r.retrieveFollowingIdentifier=function(g,b,h){h=h||p;for(var f=[],s=b;s<g.length&&h.test(g[s]);s++)f.push(g[s]);return f},r.getCompletionPrefix=function(g){var b=g.getCursorPosition(),h=g.session.getLine(b.row),f;return g.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(g,h){var h=h??g.session.getPrecedingCharacter();return g.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(t,r,d){var p=t("./keyboard/hash_handler").HashHandler,g=t("./autocomplete/popup").AcePopup,b=t("./autocomplete/inline").AceInline,h=t("./autocomplete/popup").getAriaId,f=t("./autocomplete/util"),s=t("./lib/lang"),a=t("./lib/dom"),l=t("./snippets").snippetManager,u=t("./config"),i=t("./lib/event"),c=t("./lib/scroll").preventParentScroll,m=function($,k){k.completer&&k.completer.destroy()},w=function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new p,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 k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new M($.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:u.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),i.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new 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(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},$.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var C=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(k){var C=this.base.row,R=this.base.column,N=this.editor.getCursorPosition().column,I=this.editor.session.getLine(C).slice(R,N);this.inlineRenderer.show(this.editor,k,I)?this.$seen(k):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var R=this.popup.getData(C);R&&(!k||R.hideInlinePreview)&&this.$seen(R)}},$.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,R=C.layerConfig.lineHeight,N=C.$cursorLayer.getPixelPosition(this.base,!0);N.left-=this.popup.getTextLeftOffset();var I=k.container.getBoundingClientRect();N.top+=I.top-C.layerConfig.offset,N.left+=I.left-k.renderer.scrollLeft,N.left+=C.gutterWidth;var L={top:N.top,left:N.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(L.top+=C.$ghostTextWidget.el.offsetHeight);var B=k.container.getBoundingClientRect().bottom-R,P=B<L.top?{top:B,left:L.left}:L;this.popup.tryShow(P,R,"bottom")||this.popup.tryShow(N,R,"top")||this.popup.show(N,R)},$.prototype.openPopup=function(k,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(),I=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}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var L;this.stickySelection&&(L=this.popup.data.indexOf(I)),(!L||L===-1)&&(L=0),this.popup.setRow(this.autoSelect?L:-1),L===N&&I!==this.completions.filtered[L]&&this.$onPopupChange();var B=this.inlineRenderer&&this.inlineEnabled;if(L===N&&B){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}R||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(k){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(k){var C=document.activeElement,R=this.editor.textInput.getElement(),N=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),I=this.popup&&this.popup.container;C!=R&&C.parentNode!=I&&!N&&C!=this.tooltipNode&&k.relatedTarget!=R&&this.detach()},$.prototype.mousedownListener=function(k){this.detach()},$.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(k){this.popup.goTo(k)},$.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var R=this.completions,N=this.getCompletionProvider().insertMatch(this.editor,k,R.filterText,C);return this.completions==R&&this.detach(),N},$.prototype.showPopup=function(k,C){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new x(k)),this.completionProvider},$.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},$.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var N=this.editor.getCursorPosition(),I=this.editor.session.getTextRange({start:this.base,end:N});if(I==this.completions.filterText)return;if(this.completions.setFilter(I),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==I&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,I,k);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 M(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var R=this.editor.getSession(),N=this.editor.getCursorPosition(),I=f.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(N.row,N.column-I.length),this.base.$insertRight=!0;var L={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:I,pos:N}).provideCompletions(this.editor,L,(function(B,P,O){var A=P.filtered,S=f.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!A.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(S)),D){var z=[{caption:D,value:""}];this.completions=new M(z),this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(A.length==1&&A[0].value==S&&!A[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&A.length==1)return this.insertMatch(A[0])}this.completions=!O&&this.showLoadingState?new M($.completionsForLoading.concat(A),P.filterText):P,this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var k=this.popup,C=this.completions&&this.completions.filtered,R=C&&(C[k.getHoveredRow()]||C[k.getRow()]),N=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var I=this.editor.completers.length,L=0;L<I;L++){var B=this.editor.completers[L];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(k){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",c));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var R=this.tooltipNode;k.docHTML?R.innerHTML=k.docHTML:k.docText&&(R.textContent=k.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var N=this.popup,I=N.container.getBoundingClientRect(),L=400,B=300,P=N.renderer.scrollBar.width||10,O=I.left,A=window.innerWidth-I.right-P,S=N.isTopdown?I.top:window.innerHeight-P-I.bottom,D=[Math.min(A/L,1),Math.min(O/L,1),Math.min(S/B*.9)],z=Math.max.apply(Math,D),U=R.style;U.display="block",z==D[0]?(U.left=I.right+1+"px",U.right="",U.maxWidth=L*z+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-I.top,B)+"px"):z==D[1]?(U.right=window.innerWidth-I.left+"px",U.left="",U.maxWidth=L*z+"px",U.top=I.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-I.top,B)+"px"):z==D[2]&&(U.left=window.innerWidth-I.left+"px",U.maxWidth=Math.min(L,window.innerWidth)+"px",N.isTopdown?(U.top=I.bottom+"px",U.left=I.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-I.bottom,B)+"px"):(U.top=N.container.offsetTop-R.offsetHeight+"px",U.left=I.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 k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},$.prototype.onTooltipClick=function(k){for(var C=k.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(k){return k.completer instanceof $||(k.completer&&(k.completer.destroy(),k.completer=null),u.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),k.completer=$.$sharedInstance):(k.completer=new $,k.once("destroy",m))),k.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 k=$.completer.insertMatch();if(k||$.tabstopManager)return k;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var k=f.getCompletionPrefix($);!k&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function($,k){var C=w.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=function(){function $(k){this.initialPosition=k,this.active=!0}return $.prototype.insertByIndex=function(k,C,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],R)},$.prototype.insertMatch=function(k,C,R){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var N=this.completions.filterText.length,I=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,I+=C.range.end.column-this.initialPosition.pos.column),N||I){var L;k.selection.getAllRanges?L=k.selection.getAllRanges():L=[k.getSelectionRange()];for(var B=0,P;P=L[B];B++)P.start.column-=N,P.end.column+=I,k.session.remove(P)}C.snippet?l.insertSnippet(k,C.snippet):this.$insertString(k,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(k,C),C.command&&C.command==="startAutocomplete"&&k.execCommand(C.command)}return k.endOperation(),!0},$.prototype.$insertString=function(k,C){var R=C.value||C;k.execCommand("insertstring",R)},$.prototype.gatherCompletions=function(k,C){var R=k.getSession(),N=k.getCursorPosition(),I=f.getCompletionPrefix(k),L=[];this.completers=k.completers;var B=k.completers.length;return k.completers.forEach(function(P,O){P.getCompletions(k,R,N,I,function(A,S){P.hideInlinePreview&&(S=S.map(function(D){return Object.assign(D,{hideInlinePreview:P.hideInlinePreview})})),!A&&S&&(L=L.concat(S)),C(null,{prefix:f.getCompletionPrefix(k),matches:L,finished:--B===0})})}),!0},$.prototype.provideCompletions=function(k,C,R){var N=(function(P){var O=P.prefix,A=P.matches;this.completions=new M(A),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),I=!0,L=null;if(this.gatherCompletions(k,(function(P,O){if(this.active){P&&(R(P,[],!0),this.detach());var A=O.prefix;if(A.indexOf(O.prefix)===0){if(I){L=O;return}N(O)}}}).bind(this)),I=!1,L){var B=L;L=null,N(B)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},$}(),M=function(){function $(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=k,C=this.filterCompletions(C,this.filterText),C=C.sort(function(N,I){return I.exactMatch-N.exactMatch||I.$score-N.$score||(N.caption||N.value).localeCompare(I.caption||I.value)});var R=null;C=C.filter(function(N){var I=N.snippet||N.caption||N.value;return I===R?!1:(R=I,!0)}),this.filtered=C},$.prototype.filterCompletions=function(k,C){var R=[],N=C.toUpperCase(),I=C.toLowerCase();e:for(var L=0,B;B=k[L];L++){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,A=0,S=0,D,z;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(I);if(U>-1)S=U;else for(var K=0;K<C.length;K++){var X=P.indexOf(I[K],O+1),ee=P.indexOf(N[K],O+1);if(D=X>=0&&(ee<0||X<ee)?X:ee,D<0)continue e;z=D-O-1,z>0&&(O===-1&&(S+=10),S+=z,A|=1<<K),O=D}}B.matchMask=A,B.exactMatch=S?0:1,B.$score=(B.score||0)-S,R.push(B)}}return R},$}();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=M}),ace.define("ace/marker_group",["require","exports","module"],function(t,r,d){var p=function(){function g(b,h){h&&(this.markerType=h.markerType),this.markers=[],this.session=b,b.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(b){return this.markers.find(function(h){return h.range.contains(b.row,b.column)})},g.prototype.markersComparator=function(b,h){return b.range.start.row-h.range.start.row},g.prototype.setMarkers=function(b){this.markers=b.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(b,h,f,s){if(!(!this.markers||!this.markers.length))for(var a=s.firstRow,l=s.lastRow,u,i=0,c=0,m=0;m<this.markers.length;m++){var w=this.markers[m];if(!(w.range.end.row<a)&&!(w.range.start.row>l)&&(w.range.start.row===c?i++:(c=w.range.start.row,i=0),!(i>200))){var x=w.range.clipRows(a,l);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var M=x.toScreenRange(f);if(M.isEmpty()){u=f.getNextFoldLine(x.end.row,u),u&&u.end.row>x.end.row&&(a=u.end.row);continue}this.markerType==="fullLine"?h.drawFullLineMarker(b,M,w.className,s):M.isMultiLine()?this.markerType==="line"?h.drawMultiLineMarker(b,M,w.className,s):h.drawTextMarker(b,M,w.className,s):h.drawSingleLineMarker(b,M,w.className+" ace_br15",s)}}}},g}();p.prototype.MAX_MARKERS=1e4,r.MarkerGroup=p}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(t,r,d){function p(f,s){var a=f.getTextRange(b.fromPoints({row:0,column:0},s));return a.split(h).length-1}function g(f,s){var a=p(f,s),l=f.getValue().split(h),u=Object.create(null),i=l[a];return l.forEach(function(c,m){if(!(!c||c===i)){var w=Math.abs(a-m),x=l.length-w;u[c]?u[c]=Math.max(x,u[c]):u[c]=x}}),u}var b=t("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(f,s,a,l,u){var i=g(s,a),c=Object.keys(i);u(null,c.map(function(m){return{caption:m,value:m,score:i[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(t,r,d){var p=t("../snippets").snippetManager,g=t("../autocomplete").Autocomplete,b=t("../config"),h=t("../lib/lang"),f=t("../autocomplete/util"),s=t("../marker_group").MarkerGroup,a=t("../autocomplete/text_completer"),l={getCompletions:function(I,L,B,P,O){if(L.$mode.completer)return L.$mode.completer.getCompletions(I,L,B,P,O);var A=I.session.getState(B.row),S=L.$mode.getCompletions(A,L,B,P);S=S.map(function(D){return D.completerId=l.id,D}),O(null,S)},id:"keywordCompleter"},u=function(I){var L={};return I.replace(/\${(\d+)(:(.*?))?}/g,function(B,P,O,A){return L[P]=A||""}).replace(/\$(\d+?)/g,function(B,P){return L[P]})},i={getCompletions:function(I,L,B,P,O){var A=[],S=L.getTokenAt(B.row,B.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?A.push("html-tag"):A=p.getActiveScopes(I);var D=p.snippetMap,z=[];A.forEach(function(U){for(var K=D[U]||[],X=K.length;X--;){var ee=K[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(I){I.snippet&&!I.docHTML&&(I.docHTML=["<b>",h.escapeHTML(I.caption),"</b>","<hr></hr>",h.escapeHTML(u(I.snippet))].join(""))},id:"snippetCompleter"},c=[i,a,l];r.setCompleters=function(I){c.length=0,I&&c.push.apply(c,I)},r.addCompleter=function(I){c.push(I)},r.textCompleter=a,r.keyWordCompleter=l,r.snippetCompleter=i;var m={name:"expandSnippet",exec:function(I){return p.expandWithTab(I)},bindKey:"Tab"},w=function(I,L){x(L.session.$mode)},x=function(I){typeof I=="string"&&(I=b.$modes[I]),I&&(p.files||(p.files={}),M(I.$id,I.snippetFileId),I.modes&&I.modes.forEach(x))},M=function(I,L){!L||!I||p.files[I]||(p.files[I]={},b.loadModule(L,function(B){B&&(p.files[I]=B,!B.snippets&&B.snippetText&&(B.snippets=p.parseSnippetFile(B.snippetText)),p.register(B.snippets||[],B.scope),B.includeScopes&&(p.snippetMap[B.scope].includeScopes=B.includeScopes,B.includeScopes.forEach(function(P){x("ace/mode/"+P)})))}))},$=function(I){var L=I.editor,B=L.completer&&L.completer.activated;if(I.command.name==="backspace")B&&!f.getCompletionPrefix(L)&&L.completer.detach();else if(I.command.name==="insertstring"&&!B){k=I;var P=I.editor.$liveAutocompletionDelay;P?C.delay(P):R(I)}},k,C=h.delayedCall(function(){R(k)},0),R=function(I){var L=I.editor,B=f.getCompletionPrefix(L),P=I.args,O=f.triggerAutocomplete(L,P);if(B&&B.length>=L.$liveAutocompletionThreshold||O){var A=g.for(L);A.autoShown=!0,A.showPopup(L)}},N=t("../editor").Editor;t("../config").defineOptions(N.prototype,"editor",{enableBasicAutocompletion:{set:function(I){I?(g.for(this),this.completers||(this.completers=Array.isArray(I)?I:c),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(I){I?(this.completers||(this.completers=Array.isArray(I)?I:c),this.commands.on("afterExec",$)):this.commands.off("afterExec",$)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(I){I?(this.commands.addCommand(m),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(m),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=s}),function(){ace.require(["ace/ext/language_tools"],function(t){n&&(n.exports=t)})}()}(Ff)),Ff.exports}M1();var Wf={exports:{}},Bf;function E1(){return Bf||(Bf=1,function(n,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(t,r,d){d.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(t,r,d){var p=t("../lib/dom"),g=t("../lib/lang"),b=t("../lib/event"),h=t("./searchbox-css"),f=t("../keyboard/hash_handler").HashHandler,s=t("../lib/keys"),a=t("../config").nls,l=999;p.importCssString(h,"ace_searchbox",!1);var u=function(){function m(w,x,M){this.activeInput,this.element=p.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),p.importCssString(h,"ace_searchbox",w.container),b.addListener(this.element,"touchstart",function($){$.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;b.addListener(w,"mousedown",function(M){setTimeout(function(){x.activeInput.focus()},0),b.stopPropagation(M)}),b.addListener(w,"click",function(M){var $=M.target||M.srcElement,k=$.getAttribute("action");k&&x[k]?x[k]():x.$searchBarKb.commands[k]&&x.$searchBarKb.commands[k].exec(x),b.stopPropagation(M)}),b.addCommandKeyListener(w,function(M,$,k){var C=s.keyCodeToString(k),R=x.$searchBarKb.findKeyCommand($,C);R&&R.exec&&(R.exec(x),b.stopEvent(M))}),this.$onChange=g.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()})},m.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(w){p.setCssClass(this.replaceOption,"checked",this.searchRange),p.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",p.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),p.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),p.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,w)},m.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(w,x,M){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:M,range:this.searchRange}),k=!$&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,M=x.unicode,$=0,k=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,I;(I=x.exec(C))&&($++,N=I.index,N<=R&&k++,!($>l||!I[0]&&(x.lastIndex=N+=g.skipEmptyMatch(C,N,M),N>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,$>l?l+"+":$])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},m.prototype.show=function(w,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(w=g.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m}(),i=new f;i.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},Tab:function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),i.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var c=new f([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);u.prototype.$searchBarKb=i,u.prototype.$closeSearchBarKb=c,r.SearchBox=u,r.Search=function(m,w){var x=m.searchBox||new u(m),M=m.session.selection.getRange(),$=M.isMultiLine()?"":m.session.getTextRange(M);x.show($,w)}}),function(){ace.require(["ace/ext/searchbox"],function(t){n&&(n.exports=t)})}()}(Wf)),Wf.exports}E1();var L1=Object.defineProperty,I1=(n,e,t)=>e in n?L1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fl=(n,e,t)=>I1(n,typeof e!="symbol"?e+"":e,t);function zf(n,e){return function(){return n.apply(e,arguments)}}const{toString:R1}=Object.prototype,{getPrototypeOf:Ru}=Object,{iterator:Pl,toStringTag:Hf}=Symbol,Wl=(n=>e=>{const t=R1.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),to=n=>(n=n.toLowerCase(),e=>Wl(e)===n),Bl=n=>e=>typeof e===n,{isArray:la}=Array,ca=Bl("undefined");function Ha(n){return n!==null&&!ca(n)&&n.constructor!==null&&!ca(n.constructor)&&si(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const jf=to("ArrayBuffer");function O1(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&jf(n.buffer),e}const N1=Bl("string"),si=Bl("function"),Uf=Bl("number"),ja=n=>n!==null&&typeof n=="object",D1=n=>n===!0||n===!1,zl=n=>{if(Wl(n)!=="object")return!1;const e=Ru(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Hf in n)&&!(Pl in n)},F1=n=>{if(!ja(n)||Ha(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},P1=to("Date"),W1=to("File"),B1=to("Blob"),z1=to("FileList"),H1=n=>ja(n)&&si(n.pipe),j1=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||si(n.append)&&((e=Wl(n))==="formdata"||e==="object"&&si(n.toString)&&n.toString()==="[object FormData]"))},U1=to("URLSearchParams"),[V1,G1,q1,K1]=["ReadableStream","Request","Response","Headers"].map(to),Y1=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ua(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),la(n))for(r=0,d=n.length;r<d;r++)e.call(null,n[r],r,n);else{if(Ha(n))return;const p=t?Object.getOwnPropertyNames(n):Object.keys(n),g=p.length;let b;for(r=0;r<g;r++)b=p[r],e.call(null,n[b],b,n)}}function Vf(n,e){if(Ha(n))return null;e=e.toLowerCase();const t=Object.keys(n);let r=t.length,d;for(;r-- >0;)if(d=t[r],e===d.toLowerCase())return d;return null}const $s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gf=n=>!ca(n)&&n!==$s;function Ou(){const{caseless:n,skipUndefined:e}=Gf(this)&&this||{},t={},r=(d,p)=>{const g=n&&Vf(t,p)||p;zl(t[g])&&zl(d)?t[g]=Ou(t[g],d):zl(d)?t[g]=Ou({},d):la(d)?t[g]=d.slice():(!e||!ca(d))&&(t[g]=d)};for(let d=0,p=arguments.length;d<p;d++)arguments[d]&&Ua(arguments[d],r);return t}const X1=(n,e,t,{allOwnKeys:r}={})=>(Ua(e,(d,p)=>{t&&si(d)?n[p]=zf(d,t):n[p]=d},{allOwnKeys:r}),n),Z1=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Q1=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},J1=(n,e,t,r)=>{let d,p,g;const b={};if(e=e||{},n==null)return e;do{for(d=Object.getOwnPropertyNames(n),p=d.length;p-- >0;)g=d[p],(!r||r(g,n,e))&&!b[g]&&(e[g]=n[g],b[g]=!0);n=t!==!1&&Ru(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},eC=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},tC=n=>{if(!n)return null;if(la(n))return n;let e=n.length;if(!Uf(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},nC=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Ru(Uint8Array)),rC=(n,e)=>{const t=(n&&n[Pl]).call(n);let r;for(;(r=t.next())&&!r.done;){const d=r.value;e.call(n,d[0],d[1])}},iC=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},oC=to("HTMLFormElement"),sC=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),qf=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),aC=to("RegExp"),Kf=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Ua(t,(d,p)=>{let g;(g=e(d,p,n))!==!1&&(r[p]=g||d)}),Object.defineProperties(n,r)},lC=n=>{Kf(n,(e,t)=>{if(si(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(si(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},cC=(n,e)=>{const t={},r=d=>{d.forEach(p=>{t[p]=!0})};return la(n)?r(n):r(String(n).split(e)),t},uC=()=>{},hC=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function dC(n){return!!(n&&si(n.append)&&n[Hf]==="FormData"&&n[Pl])}const pC=n=>{const e=new Array(10),t=(r,d)=>{if(ja(r)){if(e.indexOf(r)>=0)return;if(Ha(r))return r;if(!("toJSON"in r)){e[d]=r;const p=la(r)?[]:{};return Ua(r,(g,b)=>{const h=t(g,d+1);!ca(h)&&(p[b]=h)}),e[d]=void 0,p}}return r};return t(n,0)},fC=to("AsyncFunction"),gC=n=>n&&(ja(n)||si(n))&&si(n.then)&&si(n.catch),Yf=((n,e)=>n?setImmediate:e?((t,r)=>($s.addEventListener("message",({source:d,data:p})=>{d===$s&&p===t&&r.length&&r.shift()()},!1),d=>{r.push(d),$s.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",si($s.postMessage)),mC=typeof queueMicrotask<"u"?queueMicrotask.bind($s):typeof process<"u"&&process.nextTick||Yf,vC=n=>n!=null&&si(n[Pl]),Se={isArray:la,isArrayBuffer:jf,isBuffer:Ha,isFormData:j1,isArrayBufferView:O1,isString:N1,isNumber:Uf,isBoolean:D1,isObject:ja,isPlainObject:zl,isEmptyObject:F1,isReadableStream:V1,isRequest:G1,isResponse:q1,isHeaders:K1,isUndefined:ca,isDate:P1,isFile:W1,isBlob:B1,isRegExp:aC,isFunction:si,isStream:H1,isURLSearchParams:U1,isTypedArray:nC,isFileList:z1,forEach:Ua,merge:Ou,extend:X1,trim:Y1,stripBOM:Z1,inherits:Q1,toFlatObject:J1,kindOf:Wl,kindOfTest:to,endsWith:eC,toArray:tC,forEachEntry:rC,matchAll:iC,isHTMLForm:oC,hasOwnProperty:qf,hasOwnProp:qf,reduceDescriptors:Kf,freezeMethods:lC,toObjectSet:cC,toCamelCase:sC,noop:uC,toFiniteNumber:hC,findKey:Vf,global:$s,isContextDefined:Gf,isSpecCompliantForm:dC,toJSONObject:pC,isAsyncFn:fC,isThenable:gC,setImmediate:Yf,asap:mC,isIterable:vC};function $t(n,e,t,r,d){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),d&&(this.response=d,this.status=d.status?d.status:null)}Se.inherits($t,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 Xf=$t.prototype,Zf={};["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=>{Zf[n]={value:n}}),Object.defineProperties($t,Zf),Object.defineProperty(Xf,"isAxiosError",{value:!0}),$t.from=(n,e,t,r,d,p)=>{const g=Object.create(Xf);Se.toFlatObject(n,g,function(f){return f!==Error.prototype},f=>f!=="isAxiosError");const b=n&&n.message?n.message:"Error",h=e==null&&n?n.code:e;return $t.call(g,b,h,t,r,d),n&&g.cause==null&&Object.defineProperty(g,"cause",{value:n,configurable:!0}),g.name=n&&n.name||"Error",p&&Object.assign(g,p),g};const yC=null;function Nu(n){return Se.isPlainObject(n)||Se.isArray(n)}function Qf(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function Jf(n,e,t){return n?n.concat(e).map(function(r,d){return r=Qf(r),!t&&d?"["+r+"]":r}).join(t?".":""):e}function bC(n){return Se.isArray(n)&&!n.some(Nu)}const wC=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function Hl(n,e,t){if(!Se.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Se.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,i){return!Se.isUndefined(i[u])});const r=t.metaTokens,d=t.visitor||f,p=t.dots,g=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(d))throw new TypeError("visitor must be a function");function h(u){if(u===null)return"";if(Se.isDate(u))return u.toISOString();if(Se.isBoolean(u))return u.toString();if(!b&&Se.isBlob(u))throw new $t("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(u)||Se.isTypedArray(u)?b&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function f(u,i,c){let m=u;if(u&&!c&&typeof u=="object"){if(Se.endsWith(i,"{}"))i=r?i:i.slice(0,-2),u=JSON.stringify(u);else if(Se.isArray(u)&&bC(u)||(Se.isFileList(u)||Se.endsWith(i,"[]"))&&(m=Se.toArray(u)))return i=Qf(i),m.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&e.append(g===!0?Jf([i],x,p):g===null?i:i+"[]",h(w))}),!1}return Nu(u)?!0:(e.append(Jf(c,i,p),h(u)),!1)}const s=[],a=Object.assign(wC,{defaultVisitor:f,convertValue:h,isVisitable:Nu});function l(u,i){if(!Se.isUndefined(u)){if(s.indexOf(u)!==-1)throw Error("Circular reference detected in "+i.join("."));s.push(u),Se.forEach(u,function(c,m){(!(Se.isUndefined(c)||c===null)&&d.call(e,c,Se.isString(m)?m.trim():m,i,a))===!0&&l(c,i?i.concat(m):[m])}),s.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return l(n),e}function eg(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Du(n,e){this._pairs=[],n&&Hl(n,this,e)}const tg=Du.prototype;tg.append=function(n,e){this._pairs.push([n,e])},tg.toString=function(n){const e=n?function(t){return n.call(this,t,eg)}:eg;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function xC(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ng(n,e,t){if(!e)return n;const r=t&&t.encode||xC;Se.isFunction(t)&&(t={serialize:t});const d=t&&t.serialize;let p;if(d?p=d(e,t):p=Se.isURLSearchParams(e)?e.toString():new Du(e,t).toString(r),p){const g=n.indexOf("#");g!==-1&&(n=n.slice(0,g)),n+=(n.indexOf("?")===-1?"?":"&")+p}return n}class rg{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Se.forEach(this.handlers,function(t){t!==null&&e(t)})}}const ig={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},CC=typeof URLSearchParams<"u"?URLSearchParams:Du,kC=typeof FormData<"u"?FormData:null,SC=typeof Blob<"u"?Blob:null,_C={isBrowser:!0,classes:{URLSearchParams:CC,FormData:kC,Blob:SC},protocols:["http","https","file","blob","url","data"]},Fu=typeof window<"u"&&typeof document<"u",Pu=typeof navigator=="object"&&navigator||void 0,AC=Fu&&(!Pu||["ReactNative","NativeScript","NS"].indexOf(Pu.product)<0),$C=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",TC=Fu&&window.location.href||"http://localhost",MC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fu,hasStandardBrowserEnv:AC,hasStandardBrowserWebWorkerEnv:$C,navigator:Pu,origin:TC},Symbol.toStringTag,{value:"Module"})),Nr={...MC,..._C};function EC(n,e){return Hl(n,new Nr.classes.URLSearchParams,{visitor:function(t,r,d,p){return Nr.isNode&&Se.isBuffer(t)?(this.append(r,t.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)},...e})}function LC(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function IC(n){const e={},t=Object.keys(n);let r;const d=t.length;let p;for(r=0;r<d;r++)p=t[r],e[p]=n[p];return e}function og(n){function e(t,r,d,p){let g=t[p++];if(g==="__proto__")return!0;const b=Number.isFinite(+g),h=p>=t.length;return g=!g&&Se.isArray(d)?d.length:g,h?(Se.hasOwnProp(d,g)?d[g]=[d[g],r]:d[g]=r,!b):((!d[g]||!Se.isObject(d[g]))&&(d[g]=[]),e(t,r,d[g],p)&&Se.isArray(d[g])&&(d[g]=IC(d[g])),!b)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const t={};return Se.forEachEntry(n,(r,d)=>{e(LC(r),d,t,0)}),t}return null}function RC(n,e,t){if(Se.isString(n))try{return(e||JSON.parse)(n),Se.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const Va={transitional:ig,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,d=Se.isObject(n);if(d&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(og(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 e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let p;if(d){if(t.indexOf("application/x-www-form-urlencoded")>-1)return EC(n,this.formSerializer).toString();if((p=Se.isFileList(n))||t.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return Hl(p?{"files[]":n}:n,g&&new g,this.formSerializer)}}return d||r?(e.setContentType("application/json",!1),RC(n)):n}],transformResponse:[function(n){const e=this.transitional||Va.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(n)||Se.isReadableStream(n))return n;if(n&&Se.isString(n)&&(t&&!this.responseType||r)){const d=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(p){if(d)throw p.name==="SyntaxError"?$t.from(p,$t.ERR_BAD_RESPONSE,this,null,this.response):p}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nr.classes.FormData,Blob:Nr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],n=>{Va.headers[n]={}});const OC=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"]),NC=n=>{const e={};let t,r,d;return n&&n.split(`
1393
+ `).forEach(function(p){d=p.indexOf(":"),t=p.substring(0,d).trim().toLowerCase(),r=p.substring(d+1).trim(),!(!t||e[t]&&OC[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},sg=Symbol("internals");function Ga(n){return n&&String(n).trim().toLowerCase()}function jl(n){return n===!1||n==null?n:Se.isArray(n)?n.map(jl):String(n)}function DC(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const FC=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Wu(n,e,t,r,d){if(Se.isFunction(r))return r.call(this,e,t);if(d&&(e=t),!!Se.isString(e)){if(Se.isString(r))return e.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(e)}}function PC(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function WC(n,e){const t=Se.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(d,p,g){return this[r].call(this,e,d,p,g)},configurable:!0})})}let ai=class{constructor(n){n&&this.set(n)}set(n,e,t){const r=this;function d(g,b,h){const f=Ga(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]=jl(g))}const p=(g,b)=>Se.forEach(g,(h,f)=>d(h,f,b));if(Se.isPlainObject(n)||n instanceof this.constructor)p(n,e);else if(Se.isString(n)&&(n=n.trim())&&!FC(n))p(NC(n),e);else if(Se.isObject(n)&&Se.isIterable(n)){let g={},b,h;for(const f of n){if(!Se.isArray(f))throw TypeError("Object iterator must return a key-value pair");g[h=f[0]]=(b=g[h])?Se.isArray(b)?[...b,f[1]]:[b,f[1]]:f[1]}p(g,e)}else n!=null&&d(e,n,t);return this}get(n,e){if(n=Ga(n),n){const t=Se.findKey(this,n);if(t){const r=this[t];if(!e)return r;if(e===!0)return DC(r);if(Se.isFunction(e))return e.call(this,r,t);if(Se.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=Ga(n),n){const t=Se.findKey(this,n);return!!(t&&this[t]!==void 0&&(!e||Wu(this,this[t],t,e)))}return!1}delete(n,e){const t=this;let r=!1;function d(p){if(p=Ga(p),p){const g=Se.findKey(t,p);g&&(!e||Wu(t,t[g],g,e))&&(delete t[g],r=!0)}}return Se.isArray(n)?n.forEach(d):d(n),r}clear(n){const e=Object.keys(this);let t=e.length,r=!1;for(;t--;){const d=e[t];(!n||Wu(this,this[d],d,n,!0))&&(delete this[d],r=!0)}return r}normalize(n){const e=this,t={};return Se.forEach(this,(r,d)=>{const p=Se.findKey(t,d);if(p){e[p]=jl(r),delete e[d];return}const g=n?PC(d):String(d).trim();g!==d&&delete e[d],e[g]=jl(r),t[g]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return Se.forEach(this,(t,r)=>{t!=null&&t!==!1&&(e[r]=n&&Se.isArray(t)?t.join(", "):t)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).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,...e){const t=new this(n);return e.forEach(r=>t.set(r)),t}static accessor(n){const e=(this[sg]=this[sg]={accessors:{}}).accessors,t=this.prototype;function r(d){const p=Ga(d);e[p]||(WC(t,d),e[p]=!0)}return Se.isArray(n)?n.forEach(r):r(n),this}};ai.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(ai.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),Se.freezeMethods(ai);function Bu(n,e){const t=this||Va,r=e||t,d=ai.from(r.headers);let p=r.data;return Se.forEach(n,function(g){p=g.call(t,p,d.normalize(),e?e.status:void 0)}),d.normalize(),p}function ag(n){return!!(n&&n.__CANCEL__)}function ua(n,e,t){$t.call(this,n??"canceled",$t.ERR_CANCELED,e,t),this.name="CanceledError"}Se.inherits(ua,$t,{__CANCEL__:!0});function lg(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new $t("Request failed with status code "+t.status,[$t.ERR_BAD_REQUEST,$t.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function BC(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function zC(n,e){n=n||10;const t=new Array(n),r=new Array(n);let d=0,p=0,g;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),f=r[p];g||(g=h),t[d]=b,r[d]=h;let s=p,a=0;for(;s!==d;)a+=t[s++],s=s%n;if(d=(d+1)%n,d===p&&(p=(p+1)%n),h-g<e)return;const l=f&&h-f;return l?Math.round(a*1e3/l):void 0}}function HC(n,e){let t=0,r=1e3/e,d,p;const g=(b,h=Date.now())=>{t=h,d=null,p&&(clearTimeout(p),p=null),n(...b)};return[(...b)=>{const h=Date.now(),f=h-t;f>=r?g(b,h):(d=b,p||(p=setTimeout(()=>{p=null,g(d)},r-f)))},()=>d&&g(d)]}const Ul=(n,e,t=3)=>{let r=0;const d=zC(50,250);return HC(p=>{const g=p.loaded,b=p.lengthComputable?p.total:void 0,h=g-r,f=d(h),s=g<=b;r=g;const a={loaded:g,total:b,progress:b?g/b:void 0,bytes:h,rate:f||void 0,estimated:f&&b&&s?(b-g)/f:void 0,event:p,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(a)},t)},cg=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},ug=n=>(...e)=>Se.asap(()=>n(...e)),jC=Nr.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,Nr.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(Nr.origin),Nr.navigator&&/(msie|trident)/i.test(Nr.navigator.userAgent)):()=>!0,UC=Nr.hasStandardBrowserEnv?{write(n,e,t,r,d,p){const g=[n+"="+encodeURIComponent(e)];Se.isNumber(t)&&g.push("expires="+new Date(t).toGMTString()),Se.isString(r)&&g.push("path="+r),Se.isString(d)&&g.push("domain="+d),p===!0&&g.push("secure"),document.cookie=g.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function VC(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function GC(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function hg(n,e,t){let r=!VC(e);return n&&(r||t==!1)?GC(n,e):e}const dg=n=>n instanceof ai?{...n}:n;function Ts(n,e){e=e||{};const t={};function r(f,s,a,l){return Se.isPlainObject(f)&&Se.isPlainObject(s)?Se.merge.call({caseless:l},f,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function d(f,s,a,l){if(Se.isUndefined(s)){if(!Se.isUndefined(f))return r(void 0,f,a,l)}else return r(f,s,a,l)}function p(f,s){if(!Se.isUndefined(s))return r(void 0,s)}function g(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 e)return r(f,s);if(a in n)return r(void 0,f)}const h={url:p,method:p,data:p,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:b,headers:(f,s,a)=>d(dg(f),dg(s),a,!0)};return Se.forEach(Object.keys({...n,...e}),function(f){const s=h[f]||d,a=s(n[f],e[f],f);Se.isUndefined(a)&&s!==b||(t[f]=a)}),t}const pg=n=>{const e=Ts({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:d,xsrfCookieName:p,headers:g,auth:b}=e;if(e.headers=g=ai.from(g),e.url=ng(hg(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&g.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),Se.isFormData(t)){if(Nr.hasStandardBrowserEnv||Nr.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(Se.isFunction(t.getHeaders)){const h=t.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([s,a])=>{f.includes(s.toLowerCase())&&g.set(s,a)})}}if(Nr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(e)),r||r!==!1&&jC(e.url))){const h=d&&p&&UC.read(p);h&&g.set(d,h)}return e},qC=typeof XMLHttpRequest<"u",KC=qC&&function(n){return new Promise(function(e,t){const r=pg(n);let d=r.data;const p=ai.from(r.headers).normalize();let{responseType:g,onUploadProgress:b,onDownloadProgress:h}=r,f,s,a,l,u;function i(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function m(){if(!c)return;const x=ai.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),M={data:!g||g==="text"||g==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:n,request:c};lg(function($){e($),i()},function($){t($),i()},M),c=null}"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(m)},c.onabort=function(){c&&(t(new $t("Request aborted",$t.ECONNABORTED,n,c)),c=null)},c.onerror=function(x){const M=x&&x.message?x.message:"Network Error",$=new $t(M,$t.ERR_NETWORK,n,c);$.event=x||null,t($),c=null},c.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const M=r.transitional||ig;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new $t(x,M.clarifyTimeoutError?$t.ETIMEDOUT:$t.ECONNABORTED,n,c)),c=null},d===void 0&&p.setContentType(null),"setRequestHeader"in c&&Se.forEach(p.toJSON(),function(x,M){c.setRequestHeader(M,x)}),Se.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),g&&g!=="json"&&(c.responseType=r.responseType),h&&([a,u]=Ul(h,!0),c.addEventListener("progress",a)),b&&c.upload&&([s,l]=Ul(b),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(f=x=>{c&&(t(!x||x.type?new ua(null,n,c):x),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=BC(r.url);if(w&&Nr.protocols.indexOf(w)===-1){t(new $t("Unsupported protocol "+w+":",$t.ERR_BAD_REQUEST,n));return}c.send(d||null)})},YC=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,d;const p=function(f){if(!d){d=!0,b();const s=f instanceof Error?f:this.reason;r.abort(s instanceof $t?s:new ua(s instanceof Error?s.message:s))}};let g=e&&setTimeout(()=>{g=null,p(new $t(`timeout ${e} of ms exceeded`,$t.ETIMEDOUT))},e);const b=()=>{n&&(g&&clearTimeout(g),g=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(p):f.removeEventListener("abort",p)}),n=null)};n.forEach(f=>f.addEventListener("abort",p));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(b),h}},XC=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,d;for(;r<t;)d=r+e,yield n.slice(r,d),r=d},ZC=async function*(n,e){for await(const t of QC(n))yield*XC(t,e)},QC=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},fg=(n,e,t,r)=>{const d=ZC(n,e);let p=0,g,b=h=>{g||(g=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:f,value:s}=await d.next();if(f){b(),h.close();return}let a=s.byteLength;if(t){let l=p+=a;t(l)}h.enqueue(new Uint8Array(s))}catch(f){throw b(f),f}},cancel(h){return b(h),d.return()}},{highWaterMark:2})},gg=64*1024,{isFunction:Vl}=Se,mg=(({fetch:n,Request:e,Response:t})=>({fetch:n,Request:e,Response:t}))(Se.global),{ReadableStream:vg,TextEncoder:yg}=Se.global,bg=(n,...e)=>{try{return!!n(...e)}catch{return!1}},JC=n=>{const{fetch:e,Request:t,Response:r}=Object.assign({},mg,n),d=Vl(e),p=Vl(t),g=Vl(r);if(!d)return!1;const b=d&&Vl(vg),h=d&&(typeof yg=="function"?(i=>c=>i.encode(c))(new yg):async i=>new Uint8Array(await new t(i).arrayBuffer())),f=p&&b&&bg(()=>{let i=!1;const c=new t(Nr.origin,{body:new vg,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!c}),s=g&&b&&bg(()=>Se.isReadableStream(new r("").body)),a={stream:s&&(i=>i.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!a[i]&&(a[i]=(c,m)=>{let w=c&&c[i];if(w)return w.call(c);throw new $t(`Response type '${i}' is not supported`,$t.ERR_NOT_SUPPORT,m)})});const l=async i=>{if(i==null)return 0;if(Se.isBlob(i))return i.size;if(Se.isSpecCompliantForm(i))return(await new t(Nr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(i)||Se.isArrayBuffer(i))return i.byteLength;if(Se.isURLSearchParams(i)&&(i=i+""),Se.isString(i))return(await h(i)).byteLength},u=async(i,c)=>Se.toFiniteNumber(i.getContentLength())??l(c);return async i=>{let{url:c,method:m,data:w,signal:x,cancelToken:M,timeout:$,onDownloadProgress:k,onUploadProgress:C,responseType:R,headers:N,withCredentials:I="same-origin",fetchOptions:L}=pg(i);R=R?(R+"").toLowerCase():"text";let B=YC([x,M&&M.toAbortSignal()],$),P=null;const O=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let A;try{if(C&&f&&m!=="get"&&m!=="head"&&(A=await u(N,w))!==0){let X=new t(c,{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]=cg(A,Ul(ug(C)));w=fg(X.body,gg,de,te)}}Se.isString(I)||(I=I?"include":"omit");const S=p&&"credentials"in t.prototype,D={...L,signal:B,method:m.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:S?I:void 0};P=p&&new t(c,D);let z=await(p?e(P,L):e(c,D));const U=s&&(R==="stream"||R==="response");if(s&&(k||U&&O)){const X={};["status","statusText","headers"].forEach(le=>{X[le]=z[le]});const ee=Se.toFiniteNumber(z.headers.get("content-length")),[de,te]=k&&cg(ee,Ul(ug(k),!0))||[];z=new r(fg(z.body,gg,de,()=>{te&&te(),O&&O()}),X)}R=R||"text";let K=await a[Se.findKey(a,R)||"text"](z,i);return!U&&O&&O(),await new Promise((X,ee)=>{lg(X,ee,{data:K,headers:ai.from(z.headers),status:z.status,statusText:z.statusText,config:i,request:P})})}catch(S){throw O&&O(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new $t("Network Error",$t.ERR_NETWORK,i,P),{cause:S.cause||S}):$t.from(S,S&&S.code,i,P)}}},ek=new Map,wg=n=>{let e=Se.merge.call({skipUndefined:!0},mg,n?n.env:null);const{fetch:t,Request:r,Response:d}=e,p=[r,d,t];let g=p.length,b=g,h,f,s=ek;for(;b--;)h=p[b],f=s.get(h),f===void 0&&s.set(h,f=b?new Map:JC(e)),s=f;return f};wg();const zu={http:yC,xhr:KC,fetch:{get:wg}};Se.forEach(zu,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const xg=n=>`- ${n}`,tk=n=>Se.isFunction(n)||n===null||n===!1,Cg={getAdapter:(n,e)=>{n=Se.isArray(n)?n:[n];const{length:t}=n;let r,d;const p={};for(let g=0;g<t;g++){r=n[g];let b;if(d=r,!tk(r)&&(d=zu[(b=String(r)).toLowerCase()],d===void 0))throw new $t(`Unknown adapter '${b}'`);if(d&&(Se.isFunction(d)||(d=d.get(e))))break;p[b||"#"+g]=d}if(!d){const g=Object.entries(p).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let b=t?g.length>1?`since :
1395
+ `+g.map(xg).join(`
1396
+ `):" "+xg(g[0]):"as no adapter specified";throw new $t("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return d},adapters:zu};function Hu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ua(null,n)}function kg(n){return Hu(n),n.headers=ai.from(n.headers),n.data=Bu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Cg.getAdapter(n.adapter||Va.adapter,n)(n).then(function(e){return Hu(n),e.data=Bu.call(n,n.transformResponse,e),e.headers=ai.from(e.headers),e},function(e){return ag(e)||(Hu(n),e&&e.response&&(e.response.data=Bu.call(n,n.transformResponse,e.response),e.response.headers=ai.from(e.response.headers))),Promise.reject(e)})}const Sg="1.12.0",Gl={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Gl[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const _g={};Gl.transitional=function(n,e,t){function r(d,p){return"[Axios v"+Sg+"] Transitional option '"+d+"'"+p+(t?". "+t:"")}return(d,p,g)=>{if(n===!1)throw new $t(r(p," has been removed"+(e?" in "+e:"")),$t.ERR_DEPRECATED);return e&&!_g[p]&&(_g[p]=!0,console.warn(r(p," has been deprecated since v"+e+" and will be removed in the near future"))),n?n(d,p,g):!0}},Gl.spelling=function(n){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${n}`),!0)};function nk(n,e,t){if(typeof n!="object")throw new $t("options must be an object",$t.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const p=r[d],g=e[p];if(g){const b=n[p],h=b===void 0||g(b,p,n);if(h!==!0)throw new $t("option "+p+" must be "+h,$t.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new $t("Unknown option "+p,$t.ERR_BAD_OPTION)}}const ql={assertOptions:nk,validators:Gl},mo=ql.validators;let Ms=class{constructor(n){this.defaults=n||{},this.interceptors={request:new rg,response:new rg}}async request(n,e){try{return await this._request(n,e)}catch(t){if(t instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const d=r.stack?r.stack.replace(/^.+\n/,""):"";try{t.stack?d&&!String(t.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(t.stack+=`
1397
+ `+d):t.stack=d}catch{}}throw t}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=Ts(this.defaults,e);const{transitional:t,paramsSerializer:r,headers:d}=e;t!==void 0&&ql.assertOptions(t,{silentJSONParsing:mo.transitional(mo.boolean),forcedJSONParsing:mo.transitional(mo.boolean),clarifyTimeoutError:mo.transitional(mo.boolean)},!1),r!=null&&(Se.isFunction(r)?e.paramsSerializer={serialize:r}:ql.assertOptions(r,{encode:mo.function,serialize:mo.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ql.assertOptions(e,{baseUrl:mo.spelling("baseURL"),withXsrfToken:mo.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=d&&Se.merge(d.common,d[e.method]);d&&Se.forEach(["delete","get","head","post","put","patch","common"],u=>{delete d[u]}),e.headers=ai.concat(p,d);const g=[];let b=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(e)===!1||(b=b&&u.synchronous,g.unshift(u.fulfilled,u.rejected))});const h=[];this.interceptors.response.forEach(function(u){h.push(u.fulfilled,u.rejected)});let f,s=0,a;if(!b){const u=[kg.bind(this),void 0];for(u.unshift(...g),u.push(...h),a=u.length,f=Promise.resolve(e);s<a;)f=f.then(u[s++],u[s++]);return f}a=g.length;let l=e;for(s=0;s<a;){const u=g[s++],i=g[s++];try{l=u(l)}catch(c){i.call(this,c);break}}try{f=kg.call(this,l)}catch(u){return Promise.reject(u)}for(s=0,a=h.length;s<a;)f=f.then(h[s++],h[s++]);return f}getUri(n){n=Ts(this.defaults,n);const e=hg(n.baseURL,n.url,n.allowAbsoluteUrls);return ng(e,n.params,n.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(n){Ms.prototype[n]=function(e,t){return this.request(Ts(t||{},{method:n,url:e,data:(t||{}).data}))}}),Se.forEach(["post","put","patch"],function(n){function e(t){return function(r,d,p){return this.request(Ts(p||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}Ms.prototype[n]=e(),Ms.prototype[n+"Form"]=e(!0)});let rk=class sx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(d){t=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let p=r._listeners.length;for(;p-- >0;)r._listeners[p](d);r._listeners=null}),this.promise.then=d=>{let p;const g=new Promise(b=>{r.subscribe(b),p=b}).then(d);return g.cancel=function(){r.unsubscribe(p)},g},e(function(d,p,g){r.reason||(r.reason=new ua(d,p,g),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new sx(function(t){e=t}),cancel:e}}};function ik(n){return function(e){return n.apply(null,e)}}function ok(n){return Se.isObject(n)&&n.isAxiosError===!0}const ju={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(ju).forEach(([n,e])=>{ju[e]=n});function Ag(n){const e=new Ms(n),t=zf(Ms.prototype.request,e);return Se.extend(t,Ms.prototype,e,{allOwnKeys:!0}),Se.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Ag(Ts(n,r))},t}const Jn=Ag(Va);Jn.Axios=Ms,Jn.CanceledError=ua,Jn.CancelToken=rk,Jn.isCancel=ag,Jn.VERSION=Sg,Jn.toFormData=Hl,Jn.AxiosError=$t,Jn.Cancel=Jn.CanceledError,Jn.all=function(n){return Promise.all(n)},Jn.spread=ik,Jn.isAxiosError=ok,Jn.mergeConfig=Ts,Jn.AxiosHeaders=ai,Jn.formToJSON=n=>og(Se.isHTMLForm(n)?new FormData(n):n),Jn.getAdapter=Cg.getAdapter,Jn.HttpStatusCode=ju,Jn.default=Jn;const{Axios:HF,AxiosError:jF,CanceledError:UF,isCancel:VF,CancelToken:GF,VERSION:qF,all:KF,Cancel:YF,isAxiosError:XF,spread:ZF,toFormData:QF,AxiosHeaders:JF,HttpStatusCode:eP,formToJSON:tP,getAdapter:nP,mergeConfig:rP}=Jn,Uu=Jn.create({baseURL:location.origin,timeout:6e4,params:{}});Uu.interceptors.response.use(n=>n,n=>{var e,t,r,d,p,g,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 l=`HTTP ${n.response.status} - `;(e=n.response)!=null&&e.statusText&&(l+=`${n.response.statusText} `),(r=(t=n.response)==null?void 0:t.config)!=null&&r.data&&(l+=`${n.response.config.data} `),(p=(d=n.response)==null?void 0:d.data)!=null&&p.message?l+=`${n.response.data.message}`:(b=(g=n.response)==null?void 0:g.data)!=null&&b.exception?l+=`${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&&(l+=`${n.response.data.error.class} `),l+=`${n.response.data.error.message}`):l+=`${(a=n.response)==null?void 0:a.data}`;const{$cosmosNotify:u}=window;throw u&&u.serious({title:"Network error",body:l}),n}else throw n});const Kl=async function(n,e,{data:t,params:r={},headers:d,noAuth:p=!1,noScope:g=!1,onUploadProgress:b=!1}={}){if(!p){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}d.Authorization=localStorage.openc3Token}return d.manual=!0,!g&&!r.scope&&(r.scope=window.openc3Scope),Uu({method:n,url:e,data:t,params:r,headers:d,onUploadProgress:b})},Vu={Accept:"application/json"},$g={...Vu,"Content-Type":"application/json"},sk=fr("N",{get:function(n,{params:e,headers:t=Vu,noScope:r,noAuth:d,onUploadProgress:p}={}){return Kl("get",n,{params:e,headers:t,noScope:r,noAuth:d,onUploadProgress:p})},put:function(n,{data:e,params:t,headers:r=$g,noScope:d,noAuth:p,onUploadProgress:g}={}){return Kl("put",n,{data:e,params:t,headers:r,noScope:d,noAuth:p,onUploadProgress:g})},post:function(n,{data:e,params:t,headers:r=$g,noScope:d,noAuth:p,onUploadProgress:g}={}){return Kl("post",n,{data:e,params:t,headers:r,noScope:d,noAuth:p,onUploadProgress:g})},delete:function(n,{params:e,headers:t=Vu,noScope:r,noAuth:d,onUploadProgress:p}={}){return Kl("delete",n,{params:e,headers:t,noScope:r,noAuth:d,onUploadProgress:p})}});let Yl=()=>({emit(n,...e){for(let t=this.events[n]||[],r=0,d=t.length;r<d;r++)t[r](...e)},events:{},on(n,e){var t;return((t=this.events)[n]||(t[n]=[])).push(e),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(d=>e!==d)}}});class qa extends Error{constructor(e,t){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=t,this.name="ReasonError"}}class Gu extends qa{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class ak extends qa{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class no extends qa{constructor(e,t){t?super(e,t):super("Disconnected",e),this.name="DisconnectedError"}}class lk extends no{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Tg(n){return n?`{${Object.keys(n).sort().filter(e=>n[e]!==void 0).map(e=>{let t=JSON.stringify(n[e]);return`${JSON.stringify(e)}:${t}`}).join(",")}}`:""}class ck{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,t){if(!this._info)return this._info={id:e,info:t},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((t,{id:r,info:d})=>(t[r]=d,t),{})}}const Es=Symbol("state");class Mg{constructor(e={}){this.emitter=Yl(),this.params=Object.freeze(e),this.presence=new ck(this),this.initialConnect=!0,this[Es]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Tg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Es]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[Es]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Es]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[Es]="connected";let e=!0,t=!0;this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[Es]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[Es]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,t){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,t)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(t){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",t)}}receive(e,t){this.emit("message",e,t)}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...d)=>{r(),t(...d)});return r}emit(e,...t){return this.emitter.emit(e,...t)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,t)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(d=>d()),e()})),r.push(this.on("close",d=>{r.forEach(p=>p()),t(d||new qa("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class uk{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let t=this.channels.indexOf(e);t>-1&&this.channels.splice(t,1)}notify(e,...t){this.state=e==="restored"?"connected":e,t.length===1?this.channels.forEach(r=>r[e](t[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let t=this._pendings[0];return!t||t.intent!==e?Promise.resolve():t.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let t,r={promise:new Promise(p=>{t=p}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),t(r)},canceled:!1,acquired:!1},d=this._pendingTop;return this._pendings.push(r),d&&await d.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let t=this._pendingTop;return!t||t.acquired||t.intent!==e?!1:(this._pendings.pop(),t.canceled=!0,!0)}}class hk{constructor(){this.queue=[]}async acquire(e,t){t==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class dk{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new hk),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:t,unsubscribe:r}){let d=this._subscriptions[e]=new uk(e);return d.remoteId=this._localToRemote[e],d.subscriber=t,d.unsubscriber=r,d.gvl=this.glv,d}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,t){this._localToRemote[e]=t;let r=this.get(e);r&&(r.remoteId=t)}}class pk{constructor(e={}){this.subscriptions=new dk(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,t){this._remoteToLocal[t]=e,this.subscriptions.storeRemoteId(e,t),this.flush(t)}unsubscribe(e){let t=this.subscriptions.get(e);if(!t)return;let r=t.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,t,r){let d=this._remoteToLocal[e];if(!d){this._pendingMessages.push([e,t,r]);return}let p=this.subscriptions.get(d);p&&p.channels.forEach(g=>{g.receive(t,r)})}notify(e,t,r){let d=this._remoteToLocal[e];if(!d)return;let p=this.subscriptions.get(d);p&&p.channels.forEach(g=>g.emit(t,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let t=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):t.push(r);this._pendingMessages=t}}const Eg={debug:0,info:1,warn:2,error:3};class Lg{constructor(e){this.level=e||"warn"}log(e,t,r){Eg[e]<Eg[this.level]||this.writeLogEntry(e,t,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}}class Ka extends Lg{writeLogEntry(){}}class fk{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let gk=0;class Ig{constructor(e={}){let{logger:t}=e;this.logger=t||new Ka,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,t){let r={channel:e};t&&Object.assign(r,t);let d=Tg(r);if(this.pendingUnsubscriptions[d]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,d),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,t))},g)})}if(this.pendingSubscriptions[d])return this.logger.warn("subscription is already pending, skipping",d),Promise.reject(Error("Already subscribing"));let p=this.subscribeRetryInterval;return new Promise((g,b)=>{let h=++gk;this.pendingSubscriptions[d]={resolve:g,reject:b,id:h},this.cable.send(this.buildSubscribeRequest(d)),this.maybeRetrySubscribe(h,d,p)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,t,r){setTimeout(()=>{let d=this.pendingSubscriptions[t];d&&d.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,t),this.cable.send(this.buildSubscribeRequest(t)),this.maybeExpireSubscribe(e,t,r))},r)}maybeExpireSubscribe(e,t,r){setTimeout(()=>{let d=this.pendingSubscriptions[t];d&&d.id===e&&(delete this.pendingSubscriptions[t],d.reject(new ak(`Haven't received subscription ack in ${r*2}ms for ${t}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,t,r){return t==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=t,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,t){return this.cable.send({command:"whisper",identifier:e,data:t}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:t,identifier:r,message:d,reason:p,reconnect:g}=e;if(t==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),t==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(t==="disconnect"){let b=new no(p);this.reset(b),g===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(t==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:t,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(t==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new Gu)):this.logger.error("subscription not found",{type:t,identifier:r})}if(d)return{identifier:r,message:d};this.logger.warn(`unknown message type: ${t}`,{message:e})}reset(e){for(let t in this.pendingSubscriptions)this.pendingSubscriptions[t].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Rg=()=>Date.now()/1e3|0;class mk extends Ig{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Rg()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let t in this.pendingPresence)this.pendingPresence[t].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:t,identifier:r,message:d}=e;if(t==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(t==="reject_subscription")return super.receive(e);if(t==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(t==="ping")return this.restoreSince&&(this.restoreSince=Rg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),t==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(t==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(t==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let p=e.restored_ids||Object.keys(this.subscriptionStreams);for(let g of p)this.cable.send({identifier:g,command:"history",history:this.historyRequestFor(g)}),this.presenceInfo[g]&&this.cable.send({identifier:g,command:"join",presence:this.presenceInfo[g]});return this.cable.restored(p)}return this.cable.connected(this.sessionId)}if(t==="presence"){let p=d.type;if(p==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(d))}else if(p==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:t,identifier:r,message:d}}if(d){let p=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:d,meta:p}}this.logger.warn(`unknown message type: ${t}`,{message:e})}perform(e,t,r){switch(t){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,t,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let t=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(t.history=r,this.pendingHistory[e]=!0);let d=this.presenceInfo[e];return d&&(t.presence=d),t}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let t={},r=!1;if(this.subscriptionStreams[e])for(let d of this.subscriptionStreams[e]){let p=this.streamsPositions[d];p&&(r=!0,t[d]=p)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:t}}trackStreamPosition(e,t,r,d){if(!(!t||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(t),this.streamsPositions[t]={epoch:r,offset:d},{stream:t,epoch:r,offset:d}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,t){return this.presenceInfo[e]=t,this.cable.send({command:"join",identifier:e,presence:t}),Promise.resolve()}async leave(e,t){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:t}),Promise.resolve()}presence(e,t){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,d)=>{this.pendingPresence[e]={resolve:r,reject:d},this.cable.send({command:"presence",identifier:e,data:t})})}}class vk extends qa{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class qu extends Mg{constructor(e,t){super(t),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Fl(qu,"identifier","__ghost__");const yk="$pubsub";class Ku extends Mg{async perform(e,t){if(e.startsWith("$"))return super.perform(e,t);throw Error("not implemented")}}Fl(Ku,"identifier",yk);const Ls=Symbol("state");let bk=class{constructor({transport:n,protocol:e,encoder:t,logger:r,lazy:d,hubOptions:p,performFailures:g,transportConfigurator:b}){this.emitter=Yl(),this.transport=n,this.encoder=t,this.logger=r||new Ka,this.protocol=e,this.performFailures=g||"throw",this.protocol.attached(this),this.hub=new pk(p||{}),this[Ls]="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,d===!1&&this.connect().catch(()=>{})}get state(){return this[Ls]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[Ls]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(t){this.handleClose(t)}return e}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Ls]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new no("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));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[Ls]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new no("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,t=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}notify(n,e,t){e&&typeof e!="string"&&(t=e,e=void 0),e?this.hub.notify(e,"info",{type:n,data:t}):this.emit("info",{type:n,data:t})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new no(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[Ls]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.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 e;n&&(e=n instanceof no?n:new no(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[Ls]="closed";let t=e||new no("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",t)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(n);if(e===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",e);let t=this.protocol.receive(e);if(t){this.logger.debug("processed incoming message",t);let{type:r,identifier:d,message:p,meta:g}=t;r?this.hub.notify(d,r,p):this.hub.transmit(d,p,g)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(n);if(e===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(e)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let e=new Ku({stream_name:n});return this.subscribe(e)}streamFromSigned(n){let e=new Ku({signed_stream_name:n});return this.subscribe(e)}subscribeTo(n,e){let t,r;return typeof n=="string"&&(r=n,n=qu),t=r?new n(r,e):new n(e),this.subscribe(t)}subscribe(n){if(!n.attached(this))return n;let e=n.identifier;n.connecting();let t=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return t.add(n),t.intent==="subscribed"&&t.state==="connected"&&n.connected(),t.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,e,t){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 d=await n.acquire("subscribed");if(d.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),d.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),d.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),d.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),d.release();return}let p={identifier:e,params:t};this.logger.debug("subscribing",p);try{let g=await this.protocol.subscribe(e,t);this.hub.subscribe(r,g),this.logger.debug("subscribed",{...p,remoteId:g}),n.notify("connected")}catch(g){if(g){if(g instanceof Gu&&this.logger.warn("rejected",p),g instanceof no){this.logger.debug("disconnected during subscription; will retry on connect",p),d.release();return}this.logger.error("failed to subscribe",{error:g,...p})}n.close(g),this.hub.unsubscribe(r)}d.release()}unsubscribe(n){let e=n.identifier,t=this.hub.subscriptions.get(e);if(!t)throw Error(`Subscription not found: ${e}`);t.remove(n),n.closed(),t.maybeUnsubscribe()}async _unsubscribe(n){let e=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let t=await n.acquire("unsubscribed");if(t.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),t.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:n.intent}),t.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:e}),t.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:e}),n.close(),this.hub.unsubscribe(e),t.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(d){d&&(d instanceof no?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:d}):this.logger.error("unsubscribe failed",{id:e,error:d}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(e)):n.state="closed",t.release()}async perform(n,e,t){if(this.performFailures==="throw")return this._perform(n,e,t);try{return await this._perform(n,e,t)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,e,t){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new vk;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 d=r.remoteId,p={id:d,action:e,payload:t};this.logger.debug("perform",p);try{let g=await this.protocol.perform(d,e,t);return g&&this.logger.debug("perform result",{message:g,request:p}),g}catch(g){throw this.logger.error("perform failed",{error:g,request:p}),g}}on(n,e){return this.emitter.on(n,e)}once(n,e){let t=this.emitter.on(n,(...r)=>{t(),e(...r)});return t}emit(n,...e){return this.emitter.emit(n,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,e)=>{let t=[()=>delete this._pendingConnect];t.push(this.on("connect",()=>{t.forEach(r=>r()),n()})),t.push(this.on("close",r=>{t.forEach(d=>d()),e(r)})),t.push(this.on("disconnect",r=>{t.forEach(d=>d()),e(r)}))}),this._pendingConnect)}};const wk={maxMissingPings:2,maxReconnectAttempts:1/0},ha=()=>Date.now(),Og=(n,e)=>{e=e||{};let{backoffRate:t,jitterRatio:r,maxInterval:d}=e;return t=t||2,r===void 0&&(r=.5),p=>{let g=n*t**p,b=g*t,h=g+(b-g)*Math.random(),f=2*(Math.random()-.5)*r;return h=h*(1+f),d&&d<h&&(h=d),h}};let Ng=class{constructor({pingInterval:n,...e}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(e=Object.assign({},wk,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new Ka,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ha()}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=ha(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ha(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ha(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ha()})),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=ha()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new lk))}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 xk{constructor(e,t={}){this.transports=e,this.transport=null,this.emitter=Yl(),this.unbind=[],this.logger=t.logger||new Ka}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let t=this.transports[e];try{this.transport=t,this.resetListeners(),this.logger.debug(`Trying to connect via ${t.displayName()}`),await t.open(),this.logger.debug(`Connected via ${t.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${t.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}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(e,t){this.transports.forEach(r=>{r.setParam(e,t)})}setToken(e,t){this.transports.forEach(r=>{r.setToken(e,t)})}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...d)=>{r(),t(...d)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class Ck{constructor(e,t={}){this.url=e;let r=t.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Yl();let{format:d,subprotocol:p,authStrategy:g}=t;this.format=d||"text",this.connectionOptions=t.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=p}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((t,r)=>{let d=[];d.push(this.once("open",()=>{d.forEach(p=>p()),t()})),d.push(this.once("close",()=>{d.forEach(p=>p()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,t){let r=new URL(this.url);r.searchParams.set(e,t);let d=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(d)}setToken(e,t="jid"){if(this.authStrategy==="param")this.setParam(t,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${t}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(d=>d.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...d)=>{r(),t(...d)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let t=e.data;this.format==="binary"&&(t=new Uint8Array(t)),this.emitter.emit("data",t)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Dg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function kk(n,e){if(typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),e=e||{},!n&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Dg,e);let{protocol:t,websocketImplementation:r,websocketFormat:d,websocketOptions:p,websocketAuthStrategy:g,fallbacks:b,logLevel:h,logger:f,transport:s,encoder:a,lazy:l,monitor:u,pingInterval:i,reconnectStrategy:c,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:M,historyTimestamp:$,protocolOptions:k,concurrentSubscribes:C,performFailures:R,transportConfigurator:N,auth:I}=e;if(f=f||new Ka(h),typeof t=="string"){x=x||t;let P=t.substring(0,t.lastIndexOf("-")),O=t.substring(t.lastIndexOf("-")+1);if(k=k||{},P==="actioncable-v1")t=new Ig({logger:f,...k});else if(P==="actioncable-v1-ext")t=new mk({logger:f,historyTimestamp:$,...k});else throw Error(`Protocol is not supported yet: ${t}`);if(O==="json")a=a||new fk,d=d||"text";else if(O==="msgpack"){if(d="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(d=d||"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: ${t}`)}if(!t)throw Error("Protocol must be specified");s=s||new Ck(n,{websocketImplementation:r,websocketOptions:p,subprotocol:x,authStrategy:g,format:d}),b&&(s=new xk([s,...b],{logger:f})),I&&I.token&&s.setToken(I.token,I.param||"jid"),c=c||Og(i),u!==!1&&(u=u||new Ng({pingInterval:i,reconnectStrategy:c,maxMissingPings:m,maxReconnectAttempts:w,logger:f}));let L={concurrentSubscribes:C},B=new bk({protocol:t,transport:s,encoder:a,logger:f,lazy:l,hubOptions:L,performFailures:R,transportConfigurator:N});return u&&(u.watch(B),B.monitor=u),M&&Sk(B,async()=>{try{await M(s)}catch(P){return f.error("Failed to refresh authentication token: "+P),!1}return B.connect().catch(()=>{}),!0}),B}function Sk(n,e){let t=!1;n.on("connect",()=>t=!1),n.on("close",async r=>{if(r){if(t){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(t=!0,await e())}})}class _k{constructor(e){this.channel=e}notify(e,...t){typeof this[e]=="function"&&this[e](...t)}perform(e,t={}){this.channel.perform(e,t)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class Ak extends qu{constructor(e,t,r){super(e,t),this.subscription=new _k(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:d})=>this.subscription.notify("connected",{reconnected:d})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",d=>this.subscription.notify("received",d)),this.on("close",d=>{d&&d instanceof Gu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class $k{constructor(e){this.cable=e}create(e,t){let r,d;typeof e=="object"?(r=e.channel,delete e.channel,d=e):(r=e,d={});let p=new Ak(r,d,t);return p.subscription.notify("initialized"),this.cable.subscribe(p),p.subscription}findAll(e){return this.cable.hub.channels.filter(t=>t.identifier===e).map(t=>t.subscription)}}class Tk{constructor(e){this.cable=e,this.subscriptions=new $k(e)}}class Mk extends Lg{writeLogEntry(e,t,r){r?console[e](t,r):console[e](t)}}class Ek extends Ng{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},t=d=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:d})},r=()=>this.disconnect(new no("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",t,!1),window.addEventListener("resume",t,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",t,!1),window.removeEventListener("online",t,!1),window.removeEventListener("resume",t,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const Lk=["cable","action-cable"],Ik="/cable",Xl=(n,e)=>{for(let t of Lk){let r=n.head.querySelector(`meta[name='${t}-${e}']`);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,Rk=()=>{if(typeof document<"u"&&document.head){let n=Xl(document,"url");if(n)return Fg(n)}return Fg(Ik)},Ok=()=>{if(typeof document<"u"&&document.head){let n=Xl(document,"history-timestamp");if(n)return n|0}},Nk=()=>{if(typeof document<"u"&&document.head)return Xl(document,"token")},Dk=()=>{if(typeof document<"u"&&document.head)return Xl(document,"token-param")};function Fk(n,e){typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),n=n||Rk(),e=e||{},e.historyTimestamp||(e.historyTimestamp=Ok());let t=Nk();if(t){let f=Dk();e.auth=Object.assign({token:t,param:f},e.auth||{})}e=Object.assign({},Dg,e);let{logLevel:r,logger:d,pingInterval:p,reconnectStrategy:g,maxMissingPings:b,maxReconnectAttempts:h}=e;return d=e.logger=e.logger||new Mk(r),g=e.reconnectStrategy=e.reconnectStrategy||Og(p),e.monitor!==!1&&(e.monitor=e.monitor||new Ek({pingInterval:p,reconnectStrategy:g,maxMissingPings:b,maxReconnectAttempts:h,logger:d})),kk(n,e)}function Pk(n,e){let t=Fk(n,e);return new Tk(t)}class Wk{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,t,r={},d={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(p=>{if(p&&OpenC3Auth.setTokens(),this._cable==null){let g=this._url+"?scope="+encodeURIComponent(t)+"&authorization="+encodeURIComponent(localStorage.openc3Token);g=new URL(g,document.baseURI).href,this._cable=Pk(g)}return this._cable.subscriptions.create({channel:e,...d},r)})}recordPing(){}}fr("F",Wk);class Bk{constructor(e,t,r="",d=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=t,this.usage=r,this.url=d}}fr("k",Bk);function Ya(n){return zk.test(n)}const zk=/^-?[0-9]+$/;function Pg(n){return Hk.test(n)}const Hk=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Wg(n,e){if(Ya(n))return Number.isSafeInteger(Number.parseInt(n,10));const t=Number.parseFloat(n),r=String(t);if(n===r)return!0;const d=Bg(n),p=Bg(r);return!!(d===p||(e==null?void 0:e.approx)===!0&&!Ya(n)&&p.length>=14&&d.startsWith(p.substring(0,14)))}let Xa=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function jk(n){if(Wg(n,{approx:!1}))return;if(Ya(n))return Xa.truncate_integer;const e=Number.parseFloat(n);return Number.isFinite(e)?e===0?Xa.underflow:Xa.truncate_float:Xa.overflow}function Bg(n){const{start:e,end:t}=Uk(n),r=n.substring(e,t),d=r.indexOf(".");return d===-1?r:r.substring(0,d)+r.substring(d+1)}function Uk(n){let e=0;for(n[0]==="-"&&e++;n[e]==="0"||n[e]===".";)e++;let t=n.lastIndexOf("e");for(t===-1&&(t=n.lastIndexOf("E")),t===-1&&(t=n.length);(n[t-1]==="0"||n[t-1]===".")&&t>e;)t--;return{start:e,end:t}}class Vk{constructor(e){if(Fl(this,"isLosslessNumber",!0),!Pg(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=jk(this.value);if(e===void 0||e===Xa.truncate_float)return Number.parseFloat(this.value);if(Ya(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function Gk(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function qk(n){return new Vk(n)}function Kk(n,e){return Yu({"":n},"",n,e)}function Yu(n,e,t,r){return Array.isArray(t)?r.call(n,e,Xk(t,r)):t&&typeof t=="object"&&!Gk(t)?r.call(n,e,Yk(t,r)):r.call(n,e,t)}function Yk(n,e){for(const t of Object.keys(n)){const r=Yu(n,t,n[t],e);r!==void 0?n[t]=r:delete n[t]}return n}function Xk(n,e){for(let t=0;t<n.length;t++)n[t]=Yu(n,String(t),n[t],e);return n}function Zk(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:qk,r=0;const d=b();return i(d),m(),e?Kk(d,e):d;function p(){if(n.charCodeAt(r)===rS){r++,f();const A={};let S=!0;for(;r<n.length&&n.charCodeAt(r)!==Hg;){S?S=!1:(l(),f());const D=r,z=s();if(z===void 0){M();return}f(),u();const U=b();if(U===void 0){I();return}Object.prototype.hasOwnProperty.call(A,z)&&!Xu(U,A[z])&&$(z,D+1),A[z]=U}return n.charCodeAt(r)!==Hg&&k(),r++,A}}function g(){if(n.charCodeAt(r)===iS){r++,f();const A=[];let S=!0;for(;r<n.length&&n.charCodeAt(r)!==jg;){S?S=!1:l();const D=b();c(D),A.push(D)}return n.charCodeAt(r)!==jg&&C(),r++,A}}function b(){f();const A=s()??a()??p()??g()??h("true",!0)??h("false",!1)??h("null",null);return f(),A}function h(A,S){if(n.slice(r,r+A.length)===A)return r+=A.length,S}function f(){for(;Qk(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===Zu){r++;let A="";for(;r<n.length&&n.charCodeAt(r)!==Zu;){if(n.charCodeAt(r)===nS){const S=n[r+1],D=tS[S];D!==void 0?(A+=D,r++):S==="u"?Zl(n.charCodeAt(r+2))&&Zl(n.charCodeAt(r+3))&&Zl(n.charCodeAt(r+4))&&Zl(n.charCodeAt(r+5))?(A+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):L(r):N(r)}else eS(n.charCodeAt(r))?A+=n[r]:R(n[r]);r++}return x(),r++,A}}function a(){const A=r;if(n.charCodeAt(r)===Ug&&(r++,w(A)),n.charCodeAt(r)===Qu)r++;else if(Jk(n.charCodeAt(r)))for(r++;Ql(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===dS)for(r++,w(A);Ql(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===vS||n.charCodeAt(r)===mS)for(r++,(n.charCodeAt(r)===Ug||n.charCodeAt(r)===cS)&&r++,w(A);Ql(n.charCodeAt(r));)r++;if(r>A)return t(n.slice(A,r))}function l(){if(n.charCodeAt(r)!==hS)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function u(){if(n.charCodeAt(r)!==pS)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function i(A){if(A===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function c(A){if(A===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function m(){if(r<n.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(A){if(!Ql(n.charCodeAt(r))){const S=n.slice(A,r);throw new SyntaxError(`Invalid number '${S}', expecting a digit ${O()}`)}}function x(){if(n.charCodeAt(r)!==Zu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function M(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function $(A,S){throw new SyntaxError(`Duplicate key '${A}' encountered at position ${S}`)}function k(){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(A){throw new SyntaxError(`Invalid character '${A}' ${B()}`)}function N(A){const S=n.slice(A,A+2);throw new SyntaxError(`Invalid escape character '${S}' ${B()}`)}function I(){throw new SyntaxError(`Object value expected after ':' ${B()}`)}function L(A){const S=n.slice(A,A+6);throw new SyntaxError(`Invalid unicode character '${S}' ${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 Qk(n){return n===oS||n===sS||n===aS||n===lS}function Zl(n){return n>=Qu&&n<=Ju||n>=fS&&n<=yS||n>=gS&&n<=bS}function Ql(n){return n>=Qu&&n<=Ju}function Jk(n){return n>=uS&&n<=Ju}function eS(n){return n>=32&&n<=1114111}function Xu(n,e){return n===e?!0:Array.isArray(n)&&Array.isArray(e)?n.length===e.length&&n.every((t,r)=>Xu(t,e[r])):zg(n)&&zg(e)?[...new Set([...Object.keys(n),...Object.keys(e)])].every(t=>Xu(n[t],e[t])):!1}function zg(n){return typeof n=="object"&&n!==null}const tS={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1398
+ `,r:"\r",t:" "},nS=92,rS=123,Hg=125,iS=91,jg=93,oS=32,sS=10,aS=9,lS=13,Zu=34,cS=43,Ug=45,Qu=48,uS=49,Ju=57,hS=44,dS=46,pS=58,fS=65,gS=97,mS=69,vS=101,yS=70,bS=102;function Vg(n,e,t,r){return d(n);function d(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"||!Pg(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 p(h);if(h&&typeof h=="object")return g(h)}function p(h,f){if(h.length===0)return"[]";let s="[";for(let a=0;a<h.length;a++){const l=h[a];typeof l<"u"&&typeof l!="function"?s+=d(l):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function g(h,f){if(typeof h.toJSON=="function")return Vg(h.toJSON(),e,t,void 0);const s=Array.isArray(e)?e.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,l="{";for(const u of s){const i=h[u];if(b(u,i)){a?a=!1:l+=",";const c=JSON.stringify(u);l+=`${c}:`,l+=d(i)}}return l+="}",l}function b(h,f){return typeof f<"u"&&typeof f!="function"&&typeof f!="symbol"}}function wS(n){return Ya(n)&&!Wg(n)?BigInt(n):parseFloat(n)}class xS{constructor(){Fl(this,"id",1)}async exec(e,t,r={},d={},p=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,d.manual=!0,(await Uu.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...d},timeout:p,transformRequest:[(g,b)=>Vg(g)],transformResponse:[g=>Zk(g,void 0,wS)]})).data.result}catch(g){let b=new Error;throw g.response?(b.name=g.response.data.error.data.class,b.message=g.response.data.error.data.message,b.object=g.response.data.error):g.request?(b.name="Request error",b.message="Request error, no response received"):b=g,b}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(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(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,t,r,d,p){return this.exec("map_target_to_interface",[e,t],{cmd_only:r,tlm_only:d,unmap_old:p})}unmap_target_from_interface(e,t,r,d){return this.exec("unmap_target_from_interface",[e,t],{cmd_only:r,tlm_only:d})}connect_interface(e,...t){return t.length>0?this.exec("connect_interface",[e,...t]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,t,...r){return this.exec("interface_cmd",[e,t,...r])}interface_target_enable(e,t,r=!1,d=!1){return this.exec("interface_target_enable",[e,t],{cmd_only:r,tlm_only:d})}interface_target_disable(e,t,r=!1,d=!1){return this.exec("interface_target_disable",[e,t],{cmd_only:r,tlm_only:d})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,t,r,d,p){return this.exec("map_target_to_router",[e,t],{cmd_only:r,tlm_only:d,unmap_old:p})}unmap_target_from_router(e,t,r,d){return this.exec("unmap_target_from_router",[e,t],{cmd_only:r,tlm_only:d})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,t,r=!1,d=!1){return this.exec("router_target_enable",[e,t],{cmd_only:r,tlm_only:d})}router_target_disable(e,t,r=!1,d=!1){return this.exec("router_target_disable",[e,t],{cmd_only:r,tlm_only:d})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,t,r){return this.exec("get_item",[e,t,r])}get_param(e,t,r){return this.exec("get_param",[e,t,r])}get_parameter(e,t,r){return this.exec("get_param",[e,t,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,t){return this.exec("get_tlm",[e,t])}get_telemetry(e,t){return this.exec("get_tlm",[e,t])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,t=!1){return this.exec("get_all_tlm_names",[e],{hidden:t})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,t,r,d=30){const p=await this.exec("get_tlm_packet",[e,t],{type:r,stale_time:d});if(p!=null){let g=p.length,b=null;for(let h=0;h<g;h++)b=this.decode_openc3_type(p[h][1]),b!==null&&(p[h][1]=b)}return p}get_packet_derived_items(e,t){return this.exec("get_packet_derived_items",[e,t])}get_tlm_buffer(e,t){return this.exec("get_tlm_buffer",[e,t])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,t=30,r=null,d=null,p=null){let g={stale_time:t};r!==null&&(g.cache_timeout=r),d!==null&&(g.start_time=d.toISOString()),p!==null&&(g.end_time=p.toISOString());const b=await this.exec("get_tlm_values",[e],g,{},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(e,t,r){return this.exec("get_limits",[e,t,r])}async tlm(e,t,r,d="CONVERTED"){let p=null;if(t===void 0)p=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t))p=await this.exec("tlm",[e],{type:t});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else p=await this.exec("tlm",[e,t,r],{type:d});let g=this.decode_openc3_type(p);return g!==null&&(p=g),p}async inject_tlm(e,t,r=null,d="CONVERTED"){await this.exec("inject_tlm",[e,t,r],{type:d})}set_tlm(e,t,r,d){return this.exec("set_tlm",[e,t,r],{type:d})}override_tlm(e,t,r,d){return this.exec("override_tlm",[e,t,r],{type:d})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,t,r,d){return this.exec("normalize_tlm",[e,t,r],{type:d})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,t=!1){return this.exec("get_all_cmd_names",[e],{hidden:t})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,t){return this.exec("get_cmd",[e,t])}get_command(e,t){return this.exec("get_cmd",[e,t])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,t,r,d="CONVERTED"){return this.exec("get_cmd_value",[e,t,r,d])}get_cmd_buffer(e,t){return this.exec("get_cmd_buffer",[e,t])}_cmd(e,t,r,d,p,g={}){let b=null;for(let h in d)Object.prototype.hasOwnProperty.call(d,h)&&(b=this.encode_openc3_type(d[h]),b!==null&&(d[h]=b));return this.exec(e,[t,r,d],g,p)}get_cmd_hazardous(e,t,r,d={}){return t===void 0?this.exec("get_cmd_hazardous",e,{},d):this._cmd("get_cmd_hazardous",e,t,r,d)}cmd(e,t,r,d={},p={}){return t===void 0?this.exec("cmd",e,{},d):this._cmd("cmd",e,t,r,d,p)}cmd_no_range_check(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_no_range_check",e,{},d,p):this._cmd("cmd_no_range_check",e,t,r,d,p)}cmd_raw(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_raw",e,{},d,p):this._cmd("cmd_raw",e,t,r,d,p)}cmd_raw_no_range_check(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_raw_no_range_check",e,{},d,p):this._cmd("cmd_raw_no_range_check",e,t,r,d,p)}cmd_no_hazardous_check(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_no_hazardous_check",e,{},d,p):this._cmd("cmd_no_hazardous_check",e,t,r,d,p)}cmd_no_checks(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_no_checks",e,{},d,p):this._cmd("cmd_no_checks",e,t,r,d,p)}cmd_raw_no_hazardous_check(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},d,p):this._cmd("cmd_raw_no_hazardous_check",e,t,r,d,p)}cmd_raw_no_checks(e,t,r,d={},p={}){return t===void 0?this.exec("cmd_raw_no_checks",e,{},d,p):this._cmd("cmd_raw_no_checks",e,t,r,d,p)}build_cmd(e,t,r,d={},p={}){return t===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,t,r,d,p)}build_command(e,t,r,d={},p={}){return t===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,t,r,d,p)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,t){return this.exec("send_raw",[e,t])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,t){return this.exec("load_config",[e,t])}save_config(e,t,r){return this.exec("save_config",[e,t,r])}delete_config(e,t){return this.exec("delete_config",[e,t])}enable_limits(e,t,r){return this.exec("enable_limits",[e,t,r])}disable_limits(e,t,r){return this.exec("disable_limits",[e,t,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,t){return this.exec("get_setting",[e],t)}get_settings(e,t){return this.exec("get_settings",e,t)}set_setting(e,t){return this.exec("set_setting",[e,t])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,t){return this.exec("set_setting",[e,t])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",t),d=new Uint8Array(r);return Array.from(d).map(p=>p.toString(16).padStart(2,"0")).join("")}}}fr("W",xS);var Gg={exports:{}},qg;function CS(){return qg||(qg=1,function(n,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(t,r,d){function p(f,s){function a(I,L,B){if(!(I.length<L)){var P=I.slice(0,L),O=I.slice(L),A=/^(?:(\s+)|(\S+)(\s+))/.exec(O),S=/(?:(\s+)|(\s+)(\S+))$/.exec(P),D=0,z=0;if(S&&!S[2]&&(D=L-S[1].length,z=L),A&&!A[2]&&(D||(D=L),z=L+A[1].length),D)return{start:D,end:z};if(S&&S[2]&&S.index>B)return{start:S.index,end:S.index+S[2].length};if(A&&A[2])return D=L+A[2].length,{start:D,end:D+A[3].length}}}for(var l=s.column||f.getOption("printMarginColumn"),u=s.allowMerge!=0,i=Math.min(s.startRow,s.endRow),c=Math.max(s.startRow,s.endRow),m=f.session;i<=c;){var w=m.getLine(i);if(w.length>l){var x=a(w,l,5);if(x){var M=/^\s*/.exec(w)[0];m.replace(new b(i,x.start,i,x.end),`
1399
+ `+M)}c++}else if(u&&/\S/.test(w)&&i!=c){var $=m.getLine(i+1);if($&&/\S/.test($)){var k=w.replace(/\s+$/,""),C=$.replace(/^\s+/,""),R=k+" "+C,x=a(R,l,5);if(x&&x.start>k.length||R.length<l){var N=new b(i,k.length,i+1,$.length-C.length);m.replace(N," "),i--,c--}else k.length<w.length&&m.remove(new b(i,k.length,i,w.length))}}i++}}function g(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 l=s.session.$undoManager.$lastDelta;p(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),l!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var b=t("../range").Range,h=t("../editor").Editor;t("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(f){f?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=p}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(t,r,d){function p(y){return{row:y.line,column:y.ch}}function g(y){return new De(y.row,y.column)}function b(y,T,_){if(T.line===_.line&&T.ch>=_.ch-1){var F=y.getLine(T.line),W=F.charCodeAt(T.ch);55296<=W&&W<=55551&&(_.ch+=1)}return{start:T,end:_}}function h(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),Be.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",cs),R(y),Be.on(y.getInputField(),"paste",s(y))}function f(y){y.setOption("disableInput",!1),y.off("cursorActivity",cs),Be.off(y.getInputField(),"paste",s(y)),y.state.vim=null,Tr&&clearTimeout(Tr)}function s(y){var T=y.state.vim;return T.onPasteFn||(T.onPasteFn=function(){T.insertMode||(y.setCursor(me(y.getCursor(),0,1)),Xn.enterInsertMode(y,{},T))}),T.onPasteFn}function a(y,T){return T>=y.firstLine()&&T<=y.lastLine()}function l(y){return/^[a-z]$/.test(y)}function u(y){return"()[]{}".indexOf(y)!=-1}function i(y){return Ea.test(y)}function c(y){return cn.test(y)}function m(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,T){for(var _=0;_<T.length;_++)if(T[_]==y)return!0;return!1}function M(y,T,_,F,W){if(T===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(_||(_="string"),Vt[y]={type:_,defaultValue:T,callback:W},F)for(var H=0;H<F.length;H++)Vt[F[H]]=Vt[y];T&&$(y,T)}function $(y,T,_,F){var W=Vt[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"&&_&&W.callback(T,_)):(H!=="local"&&(W.value=W.type=="boolean"?!!T:T),H!=="global"&&_&&(_.state.vim.options[y]={value:T}))}function k(y,T,_){var F=Vt[y];_=_||{};var W=_.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=Kn()}function R(y){return y.state.vim||(y.state.vim={inputState:new A,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(){Ue={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Vi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new X,exCommandHistoryController:new X};for(var y in Vt){var T=Vt[y];T.value=T.defaultValue}}function I(y){function T(Y){typeof Y=="string"?En.value=Y:En=null}if(y[0]=="<"){var _=y.toLowerCase().slice(1,-1),F=_.split("-");if(_=F.pop()||"",_=="lt")y="<";else if(_=="space")y=" ";else if(_=="cr")y=`
1400
+ `;else if(Gi[_]){var W=En.value,H={key:Gi[_],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};En.onKeyDown&&En.onKeyDown(H,En.value,T),En&&En.onKeyUp&&En.onKeyUp(H,En.value,T);return}}if(y==`
1401
+ `){var G=En;En=null,G.onClose&&G.onClose(G.value)}else En.value=(En.value||"")+y}function L(y,T,_){var F=vn;if(_){if(Jr.indexOf(_)!=-1)return;Jr.push(_),vn=_.noremap!=0}try{for(var W=R(y),H=/<(?:[CSMA]-)*\w+>|./gi,G;G=H.exec(T);){var Y=G[0],Q=W.insertMode;if(En){I(Y);continue}var re=xt.handleKey(y,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var ae=Y.toLowerCase().slice(1,-1),be=ae.split("-");if(ae=be.pop()||"",ae=="lt")Y="<";else if(ae=="space")Y=" ";else if(ae=="cr")Y=`
1402
+ `;else{if(Gi.hasOwnProperty(ae)){Y=Gi[ae],hs(y,Y);continue}Y=Y[0],H.lastIndex=G.index+1}}y.replaceSelection(Y)}}}finally{if(Jr.pop(),vn=Jr.length?F:!1,!Jr.length&&En){var ke=En;En=null,he(y,ke)}}}function B(y,T){var _=y.key;if(!ei[_]){_.length>1&&_[0]=="n"&&(_=_.replace("Numpad","")),_=hr[_]||_;var F="";if(y.ctrlKey&&(F+="C-"),y.altKey&&(F+="A-"),y.metaKey&&(F+="M-"),Be.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(F=F.slice(2)),(F||_.length>1)&&y.shiftKey&&(F+="S-"),T&&!T.expectLiteralNext&&_.length==1){if(rr.keymap&&_ in rr.keymap)(rr.remapCtrl!=0||!F)&&(_=rr.keymap[_]);else if(_.charCodeAt(0)>255){var W=y.code&&y.code.slice(-1)||"";y.shiftKey||(W=W.toLowerCase()),W&&(_=W)}}return F+=_,F.length>1&&(F="<"+F+">"),F}}function P(y,T){rr.string!==y&&(rr=O(y)),rr.remapCtrl=T}function O(y){function T(F){return F.split(/\\?(.)/).filter(Boolean)}var _={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(F){if(F){var W=F.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var H=T(W[1]),G=T(W[2]);if(H.length!==G.length)return;for(var Y=0;Y<H.length;++Y)_[H[Y]]=G[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)_[Q[Y]]=Q[Y+1]}}}),{keymap:_,string:y}):{keymap:_,string:""}}function A(){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 S(y,T){y.state.vim.inputState=new A,y.state.vim.expectLiteralNext=!1,Be.signal(y,"vim-command-done",T)}function D(){this.removed=[],this.inserted=""}function z(y,T,_){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!T,this.blockwise=!!_}function U(y,T){var _=Ue.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");_[y]=T,ln.push(y)}function K(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){mi[y]=T}function de(y,T){for(var _=[],F=0;F<T;F++)_.push(y);return _}function te(y,T){gs[y]=T}function le(y,T){Xn[y]=T}function se(y,T,_){var F=y.state.vim,W=F.insertMode||F.visualMode,H=Math.min(Math.max(y.firstLine(),T.line),y.lastLine()),G=y.getLine(H),Y=G.length-1+ +!!W,Q=Math.min(Math.max(0,T.ch),Y),re=G.charCodeAt(Q);if(56320<=re&&re<=57343){var ae=1;_&&_.line==H&&_.ch>Q&&(ae=-1),Q+=ae,Q>Y&&(Q-=2)}return new De(H,Q)}function ue(y){var T={};for(var _ in y)y.hasOwnProperty(_)&&(T[_]=y[_]);return T}function me(y,T,_){return typeof T=="object"&&(_=T.ch,T=T.line),new De(y.line+T,y.ch+_)}function Ae(y,T,_,F){F.operator&&(_="operatorPending");for(var W,H=[],G=[],Y=vn?T.length-zo:0,Q=Y;Q<T.length;Q++){var re=T[Q];_=="insert"&&re.context!="insert"||re.context&&re.context!=_||F.operator&&re.type=="action"||!(W=Te(y,re.keys))||(W=="partial"&&H.push(re),W=="full"&&G.push(re))}return{partial:H.length&&H,full:G.length&&G}}function Te(y,T){var _=T.slice(-11)=="<character>",F=T.slice(-10)=="<register>";if(_||F){var W=T.length-(_?11:10),H=y.slice(0,W),G=T.slice(0,W);return H==G&&y.length>W?"full":G.indexOf(H)==0?"partial":!1}return y==T?"full":T.indexOf(y)==0?"partial":!1}function Me(y){var T=/^.*(<[^>]+>)$/.exec(y),_=T?T[1]:y.slice(-1);if(_.length>1)switch(_){case"<CR>":_=`
1403
+ `;break;case"<Space>":_=" ";break;default:_=""}return _}function Je(y,T,_){return function(){for(var F=0;F<_;F++)T(y)}}function qe(y){return new De(y.line,y.ch)}function pt(y,T){return y.ch==T.ch&&y.line==T.line}function ot(y,T){return y.line<T.line?!0:y.line==T.line&&y.ch<T.ch}function ft(y,T){return arguments.length>2&&(T=ft.apply(void 0,Array.prototype.slice.call(arguments,1))),ot(y,T)?y:T}function Zt(y,T){return arguments.length>2&&(T=Zt.apply(void 0,Array.prototype.slice.call(arguments,1))),ot(y,T)?T:y}function gn(y,T,_){var F=ot(y,T),W=ot(T,_);return F&&W}function Kt(y,T){return y.getLine(T).length}function Sr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function Sn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Pn(y,T,_){var F=Kt(y,T),W=new Array(_-F+1).join(" ");y.setCursor(new De(T,F)),y.replaceRange(W,y.getCursor())}function lr(y,T){var _=[],F=y.listSelections(),W=qe(y.clipPos(T)),H=!pt(T,W),G=y.getCursor("head"),Y=mt(F,G),Q=pt(F[Y].head,F[Y].anchor),re=F.length-1,ae=re-Y>Y?re:0,be=F[ae].anchor,ke=Math.min(be.line,W.line),ve=Math.max(be.line,W.line),we=be.ch,Oe=W.ch,Re=F[ae].head.ch-we,Ye=Oe-we;Re>0&&Ye<=0?(we++,H||Oe--):Re<0&&Ye>=0?(we--,Q||Oe++):Re<0&&Ye==-1&&(we--,Oe++);for(var ut=ke;ut<=ve;ut++){var et={anchor:new De(ut,we),head:new De(ut,Oe)};_.push(et)}return y.setSelections(_),T.ch=Oe,be.ch=we,be}function yr(y,T,_){for(var F=[],W=0;W<_;W++){var H=me(T,W,0);F.push({anchor:H,head:H})}y.setSelections(F,0)}function mt(y,T,_){for(var F=0;F<y.length;F++){var W=pt(y[F].anchor,T),H=pt(y[F].head,T);if(W||H)return F}return-1}function Ge(y,T){var _=T.lastSelection,F=function(){var H=y.listSelections(),G=H[0],Y=H[H.length-1],Q=ot(G.anchor,G.head)?G.anchor:G.head,re=ot(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var H=y.getCursor(),G=y.getCursor(),Y=_.visualBlock;if(Y){var Q=Y.width,re=Y.height;G=new De(H.line+re,H.ch+Q);for(var ae=[],be=H.line;be<G.line;be++){var ke=new De(be,H.ch),ve=new De(be,G.ch),we={anchor:ke,head:ve};ae.push(we)}y.setSelections(ae)}else{var Oe=_.anchorMark.find(),Re=_.headMark.find(),Ye=Re.line-Oe.line,ut=Re.ch-Oe.ch;G={line:G.line+Ye,ch:Ye?G.ch:ut+G.ch},_.visualLine&&(H=new De(H.line,0),G=new De(G.line,Kt(y,G.line))),y.setSelection(H,G)}return[H,G]};return T.visualMode?F():W()}function Nt(y,T){var _=T.sel.anchor,F=T.sel.head;T.lastPastedText&&(F=y.posFromIndex(y.indexFromPos(_)+T.lastPastedText.length),T.lastPastedText=null),T.lastSelection={anchorMark:y.setBookmark(_),headMark:y.setBookmark(F),anchor:qe(_),head:qe(F),visualMode:T.visualMode,visualLine:T.visualLine,visualBlock:T.visualBlock}}function mn(y,T,_,F){var W=y.state.vim.sel,H=F?T:W.head,G=F?T:W.anchor,Y;return ot(_,T)&&(Y=_,_=T,T=Y),ot(H,G)?(H=ft(T,H),G=Zt(G,_)):(G=ft(T,G),H=Zt(H,_),H=me(H,0,-1),H.ch==-1&&H.line!=y.firstLine()&&(H=new De(H.line-1,Kt(y,H.line-1)))),[G,H]}function Wn(y,T,W){var F=y.state.vim;T=T||F.sel;var W=W||F.visualLine?"line":F.visualBlock?"block":"char",H=_r(y,T,W);y.setSelections(H.ranges,H.primary)}function _r(y,T,_,F){var W=qe(T.head),H=qe(T.anchor);if(_=="char"){var G=!F&&!ot(T.head,T.anchor)?1:0,Y=ot(T.head,T.anchor)?1:0;return W=me(T.head,0,G),H=me(T.anchor,0,Y),{ranges:[{anchor:H,head:W}],primary:0}}if(_=="line"){if(ot(T.head,T.anchor))W.ch=0,H.ch=Kt(y,H.line);else{H.ch=0;var Q=y.lastLine();W.line>Q&&(W.line=Q),W.ch=Kt(y,W.line)}return{ranges:[{anchor:H,head:W}],primary:0}}if(_=="block"){var re=Math.min(H.line,W.line),ae=H.ch,be=Math.max(H.line,W.line),ke=W.ch;ae<ke?ke+=1:ae+=1;for(var ve=be-re+1,we=W.line==re?0:ve-1,Oe=[],Re=0;Re<ve;Re++)Oe.push({anchor:new De(re+Re,ae),head:new De(re+Re,ke)});return{ranges:Oe,primary:we}}}function cr(y){var T=y.getCursor("head");return y.getSelection().length==1&&(T=ft(T,y.getCursor("anchor"))),T}function _n(y,T){var _=y.state.vim;T!==!1&&y.setCursor(se(y,_.sel.head)),Nt(y,_),_.visualMode=!1,_.visualLine=!1,_.visualBlock=!1,_.insertMode||Be.signal(y,"vim-mode-change",{mode:"normal"})}function In(y,T,_){var F=y.getRange(T,_);if(/\n\s*$/.test(F)){var W=F.split(`
1404
+ `);W.pop();for(var H,H=W.pop();W.length>0&&H&&m(H);H=W.pop())_.line--,_.ch=0;H?(_.line--,_.ch=Kt(y,_.line)):_.ch=0}}function Bn(y,T,_){T.ch=0,_.ch=0,_.line++}function Dt(y){if(!y)return 0;var T=y.search(/\S/);return T==-1?y.length:T}function An(y,T,_){var F=T.inclusive,W=T.innerWord,H=T.bigWord,G=T.noSymbol,Y=T.multiline,Q=_||cr(y),re=y.getLine(Q.line),ae=re,be=Q.line,ke=be,ve=Q.ch,we,Oe=G?Ho[0]:Ui[0];if(W&&/\s/.test(re.charAt(ve)))Oe=function(Tn){return/\s/.test(Tn)};else{for(;!Oe(re.charAt(ve));)if(ve++,ve>=re.length){if(!Y)return null;ve--,we=hi(y,Q,!0,H,!0);break}H?Oe=Ui[0]:(Oe=Ho[0],Oe(re.charAt(ve))||(Oe=Ho[1]))}for(var Re=ve,Ye=ve;Oe(re.charAt(Ye))&&Ye>=0;)Ye--;if(Ye++,we)Re=we.to,ke=we.line,ae=y.getLine(ke),!ae&&Re==0&&Re++;else for(;Oe(re.charAt(Re))&&Re<re.length;)Re++;if(F){var ut=Re,et=Q.ch<=Ye&&/\s/.test(re.charAt(Q.ch));if(!et)for(;/\s/.test(ae.charAt(Re))&&Re<ae.length;)Re++;if(ut==Re||et){for(var at=Ye;/\s/.test(re.charAt(Ye-1))&&Ye>0;)Ye--;!Ye&&!et&&(Ye=at)}}return{start:new De(be,Ye),end:new De(ke,Re)}}function _i(y,T,_){var F=T;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:F,end:F};var W=Be.findMatchingTag(y,T)||Be.findEnclosingTag(y,T);return!W||!W.open||!W.close?{start:F,end:F}:_?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Yr(y,T,_){pt(T,_)||Ue.jumpList.add(y,T,_)}function Ai(y,T){Ue.lastCharacterSearch.increment=y,Ue.lastCharacterSearch.forward=T.forward,Ue.lastCharacterSearch.selectedCharacter=T.selectedCharacter}function Pr(y,T,_,F){var W=qe(y.getCursor()),H=_?1:-1,G=_?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:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[F],forward:_,depth:0,curMoveThrough:!1},be=Ei[F];if(!be)return W;var ke=Li[be].init,ve=Li[be].isComplete;for(ke&&ke(ae);Q!==G&&T;){if(ae.index+=H,ae.nextCh=ae.lineText.charAt(ae.index),!ae.nextCh){if(Q+=H,ae.lineText=y.getLine(Q)||"",H>0)ae.index=0;else{var we=ae.lineText.length;ae.index=we>0?we-1:0}ae.nextCh=ae.lineText.charAt(ae.index)}ve(ae)&&(W.line=Q,W.ch=ae.index,T--)}return ae.nextCh||ae.curMoveThrough?new De(Q,ae.index):W}function hi(y,T,_,F,W){var H=T.line,G=T.ch,Y=y.getLine(H),Q=_?1:-1,re=F?Ui:Ho;if(W&&Y==""){if(H+=Q,Y=y.getLine(H),!a(y,H))return null;G=_?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:H};for(var ae=Q>0?Y.length:-1,be=ae,ke=ae;G!=ae;){for(var ve=!1,we=0;we<re.length&&!ve;++we)if(re[we](Y.charAt(G))){for(be=G;G!=ae&&re[we](Y.charAt(G));)G+=Q;if(ke=G,ve=be!=ke,be==T.ch&&H==T.line&&ke==be+Q)continue;return{from:Math.min(be,ke+1),to:Math.max(be,ke),line:H}}ve||(G+=Q)}if(H+=Q,!a(y,H))return null;Y=y.getLine(H),G=Q>0?0:Y.length}}function br(y,T,_,F,W,H){var G=qe(T),Y=[];(F&&!W||!F&&W)&&_++;for(var Q=!F||!W,re=0;re<_;re++){var ae=hi(y,T,F,H,Q);if(!ae){var be=Kt(y,y.lastLine());Y.push(F?{line:y.lastLine(),from:be,to:be}:{line:0,from:0,to:0});break}Y.push(ae),T=new De(ae.line,F?ae.to-1:ae.from)}var ke=Y.length!=_,ve=Y[0],we=Y.pop();return F&&!W?(!ke&&(ve.from!=G.ch||ve.line!=G.line)&&(we=Y.pop()),new De(we.line,we.from)):F&&W?new De(we.line,we.to-1):!F&&W?(!ke&&(ve.to!=G.ch||ve.line!=G.line)&&(we=Y.pop()),new De(we.line,we.to)):new De(we.line,we.from)}function Xr(y,T,_,F,W){var H=T,G=new De(H.line+_.repeat-1,1/0),Y=y.clipPos(G);return Y.ch--,W||(F.lastHPos=1/0,F.lastHSPos=y.charCoords(Y,"div").left),G}function xo(y,T,_,F,W){for(var H=W||y.getCursor(),G=H.ch,Y,Q=0;Q<T;Q++){var re=y.getLine(H.line);if(Y=zi(G,re,F,_),Y==-1)return null;G=Y}return new De(y.getCursor().line,Y)}function Hs(y,T){var _=y.getCursor().line;return se(y,new De(_,T-1))}function en(y,T,_,F){!x(_,Ao)&&!tn.test(_)||(T.marks[_]&&T.marks[_].clear(),T.marks[_]=y.setBookmark(F))}function zi(y,T,_,F,W){var H;return F?(H=T.indexOf(_,y+1),H!=-1):(H=T.lastIndexOf(_,y-1),H!=-1),H}function Ro(y,T,_,F,W){function H(Ye){return!/\S/.test(y.getLine(Ye))}function G(Ye,ut,et){return et?H(Ye)!=H(Ye+ut):!H(Ye)&&H(Ye+ut)}function Y(Ye){F=F>0?1:-1;var ut=y.ace.session.getFoldLine(Ye);ut&&Ye+F>ut.start.row&&Ye+F<ut.end.row&&(F=(F>0?ut.end.row:ut.start.row)-Ye)}var Q=T.line,re=y.firstLine(),ae=y.lastLine(),be,ke,ve=Q;if(F){for(;re<=ve&&ve<=ae&&_>0;)Y(ve),G(ve,F)&&_--,ve+=F;return new De(ve,0)}var we=y.state.vim;if(we.visualLine&&G(Q,1,!0)){var Oe=we.sel.anchor;G(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Re=H(Q);for(ve=Q;ve<=ae&&_;ve++)G(ve,1,!0)&&(!W||H(ve)!=Re)&&_--;for(ke=new De(ve,0),ve>ae&&!Re?Re=!0:W=!1,ve=Q;ve>re&&!((!W||H(ve)==Re||ve==Q)&&G(ve,-1,!0));ve--);return be=new De(ve,0),{start:be,end:ke}}function Oo(y,T,_,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 G(re,ae,be,ke){var ve=re.getLine(ae),we={line:ve,ln:ae,pos:be,dir:ke};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(H(we);we.line!==null;){if(Oe=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(H(we);we.line!==null&&m(we.line[we.pos]);)Oe=we.pos,H(we);return{ln:we.ln,pos:Oe+1}}H(we)}return{ln:we.ln,pos:Oe+1}}function Y(re,ae,be,ke){var ve=re.getLine(ae),we={line:ve,ln:ae,pos:be,dir:ke};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(H(we);we.line!==null;){if(!m(we.line[we.pos])&&!w(we.line[we.pos]))Oe=we.pos;else if(w(we.line[we.pos]))return W?m(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};H(we)}return we.line=ve,W&&m(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:T.line,pos:T.ch};_>0;)F<0?Q=Y(y,Q.ln,Q.pos,F):Q=G(y,Q.ln,Q.pos,F),_--;return new De(Q.ln,Q.pos)}function Zr(y,T,_,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,be){var Re=Q.getLine(re),ke=Re==="",ve={line:Re,ln:re,pos:ae,dir:be},we={ln:ve.ln,pos:ve.pos},Oe=ve.line==="";for(W(Q,ve);ve.line!==null;){if(we.ln=ve.ln,we.pos=ve.pos,ve.line===""&&!Oe)return{ln:ve.ln,pos:ve.pos};if(ke&&ve.line!==""&&!m(ve.line[ve.pos]))return{ln:ve.ln,pos:ve.pos};w(ve.line[ve.pos])&&!ke&&(ve.pos===ve.line.length-1||m(ve.line[ve.pos+1]))&&(ke=!0),W(Q,ve)}var Re=Q.getLine(we.ln);we.pos=0;for(var Ye=Re.length-1;Ye>=0;--Ye)if(!m(Re[Ye])){we.pos=Ye;break}return we}function G(Q,re,ae,be){var Oe=Q.getLine(re),ke={line:Oe,ln:re,pos:ae,dir:be},ve={ln:ke.ln,pos:null},we=ke.line==="";for(W(Q,ke);ke.line!==null;){if(ke.line===""&&!we)return ve.pos!==null?ve:{ln:ke.ln,pos:ke.pos};if(!(!w(ke.line[ke.pos])||ve.pos===null||ke.ln===ve.ln&&ke.pos+1===ve.pos))return ve;ke.line!==""&&!m(ke.line[ke.pos])&&(we=!1,ve={ln:ke.ln,pos:ke.pos}),W(Q,ke)}var Oe=Q.getLine(ve.ln);ve.pos=0;for(var Re=0;Re<Oe.length;++Re)if(!m(Oe[Re])){ve.pos=Re;break}return ve}for(var Y={ln:T.line,pos:T.ch};_>0;)F<0?Y=G(y,Y.ln,Y.pos,F):Y=H(y,Y.ln,Y.pos,F),_--;return new De(Y.ln,Y.pos)}function Rn(y,T,_,F){var W=T,H,G,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],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}),G=y.scanForBracket(new De(W.line,W.ch+ae),1,void 0,{bracketRegex:Y}),!H||!G)return null;if(H=H.pos,G=G.pos,H.line==G.line&&H.ch>G.ch||H.line>G.line){var be=H;H=G,G=be}return F?G.ch+=1:H.ch+=1,{start:H,end:G}}function wr(y,T,_,F){var W=qe(T),H=y.getLine(W.line),G=H.split(""),Y,Q,re,ae,be=G.indexOf(_);if(W.ch<be)W.ch=be;else if(be<W.ch&&G[W.ch]==_){var ke=/string/.test(y.getTokenTypeAt(me(T,0,1))),ve=/string/.test(y.getTokenTypeAt(T)),we=ke&&!ve;we||(Q=W.ch,--W.ch)}if(G[W.ch]==_&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)G[re]==_&&(Y=re+1);if(Y&&!Q)for(re=Y,ae=G.length;re<ae&&!Q;re++)G[re]==_&&(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 $i(){}function sn(y){var T=y.state.vim;return T.searchState_||(T.searchState_=new $i)}function zn(y){return di(y,"/")}function Ti(y){return lo(y,"/")}function di(y,T){var _=lo(y,T)||[];if(!_.length)return[];var F=[];if(_[0]===0){for(var W=0;W<_.length;W++)typeof _[W]=="number"&&F.push(y.substring(_[W]+1,_[W+1]));return F}}function lo(y,T){T||(T="/");for(var _=!1,F=[],W=0;W<y.length;W++){var H=y.charAt(W);!_&&H==T&&F.push(W),_=!_&&H=="\\"}return F}function No(y){for(var T="|(){",_="}",F=!1,W=[],H=-1;H<y.length;H++){var G=y.charAt(H)||"",Y=y.charAt(H+1)||"",Q=Y&&T.indexOf(Y)!=-1;F?((G!=="\\"||!Q)&&W.push(G),F=!1):G==="\\"?(F=!0,Y&&_.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(G)):(W.push(G),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Qr(y){for(var T=!1,_=[],F=-1;F<y.length;F++){var W=y.charAt(F)||"",H=y.charAt(F+1)||"";qi[W+H]?(_.push(qi[W+H]),F++):T?(_.push(W),T=!1):W==="\\"?(T=!0,i(H)||H==="$"?_.push("$"):H!=="/"&&H!=="\\"&&_.push("\\")):(W==="$"&&_.push("$"),_.push(W),H==="/"&&_.push("\\"))}return _.join("")}function os(y){for(var T=new Be.StringStream(y),_=[];!T.eol();){for(;T.peek()&&T.peek()!="\\";)_.push(T.next());var F=!1;for(var W in $r)if(T.match(W,!0)){F=!0,_.push($r[W]);break}F||_.push(T.next())}return _.join("")}function pi(y,T,_){var F=Ue.registerController.getRegister("/");if(F.setText(y),y instanceof RegExp)return y;var W=Ti(y),H,G;if(!W.length)H=y;else{H=y.substring(0,W[0]);var Y=y.substring(W[0]);G=Y.indexOf("i")!=-1}if(!H)return null;k("pcre")||(H=No(H)),_&&(T=/^[^A-Z]*$/.test(H));var Q=new RegExp(H,T||G?"im":"m");return Q}function Wr(y){typeof y=="string"&&(y=document.createElement(y));for(var T,_=1;_<arguments.length;_++)if(T=arguments[_])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 Ft(y,T){var _=Wr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},T);y.openNotification?y.openNotification(_,{bottom:!0,duration:5e3}):alert(_.innerText)}function ss(y,T){return Wr("div",{$display:"flex"},Wr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,Wr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),T&&Wr("span",{$color:"#888"},T))}function he(y,T){if(Jr.length){T.value||(T.value=""),En=T;return}var _=ss(T.prefix,T.desc);if(y.openDialog)y.openDialog(_,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 je(y,T){if(y instanceof RegExp&&T instanceof RegExp){for(var _=["global","multiline","ignoreCase","source"],F=0;F<_.length;F++){var W=_[F];if(y[W]!==T[W])return!1}return!0}return!1}function Ne(y,T,_,F){if(T){var W=sn(y),H=pi(T,!!_,!!F);if(H)return hn(y,H),je(H,W.getQuery())||W.setQuery(H),H}}function gt(y){if(y.source.charAt(0)=="^")var T=!0;return{token:function(_){if(T&&!_.sol()){_.skipToEnd();return}var F=_.match(y,!1);if(F)return F[0].length==0?(_.next(),"searching"):!_.sol()&&(_.backUp(1),!y.exec(_.next()+F[0]))?(_.next(),null):(_.match(y),"searching");for(;!_.eol()&&(_.next(),!_.match(y,!1)););},query:y}}function hn(y,T){clearTimeout(Tr);var _=sn(y);_.highlightTimeout=Tr,Tr=setTimeout(function(){if(y.state.vim){var F=sn(y);F.highlightTimeout=null;var W=F.getOverlay();(!W||T!=W.query)&&(W&&y.removeOverlay(W),W=gt(T),y.addOverlay(W),y.showMatchesOnScrollbar&&(F.getScrollbarAnnotate()&&F.getScrollbarAnnotate().clear(),F.setScrollbarAnnotate(y.showMatchesOnScrollbar(T))),F.setOverlay(W))}},50)}function Pt(y,T,_,F){return F===void 0&&(F=1),y.operation(function(){for(var W=y.getCursor(),H=y.getSearchCursor(_,W),G=0;G<F;G++){var Y=H.find(T);if(G==0&&Y&&pt(H.from(),W)){var Q=T?H.from():H.to();Y=H.find(T),Y&&!Y[0]&&pt(H.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=H.find(T))}if(!Y&&(H=y.getSearchCursor(_,T?new De(y.lastLine()):new De(y.firstLine(),0)),!H.find(T)))return}return H.from()})}function qn(y,T,_,F,W){return F===void 0&&(F=1),y.operation(function(){var H=y.getCursor(),G=y.getSearchCursor(_,H),Y=G.find(!T);!W.visualMode&&Y&&pt(G.from(),H)&&G.find(!T);for(var Q=0;Q<F;Q++)if(Y=G.find(T),!Y&&(G=y.getSearchCursor(_,T?new De(y.lastLine()):new De(y.firstLine(),0)),!G.find(T)))return;return[G.from(),G.to()]})}function ur(y){var T=sn(y);T.highlightTimeout&&(clearTimeout(T.highlightTimeout),T.highlightTimeout=null),y.removeOverlay(sn(y).getOverlay()),T.setOverlay(null),T.getScrollbarAnnotate()&&(T.getScrollbarAnnotate().clear(),T.setScrollbarAnnotate(null))}function Ar(y,T,_){return typeof y!="number"&&(y=y.line),T instanceof Array?x(y,T):typeof _=="number"?y>=T&&y<=_:y==T}function fi(y){var T=y.ace.renderer;return{top:T.getFirstFullyVisibleRow(),bottom:T.getLastFullyVisibleRow()}}function an(y,T,_){if(_=="'"||_=="`")return Ue.jumpList.find(y,-1)||new De(0,0);if(_==".")return Hi(y);var F=T.marks[_];return F&&F.find()}function Hi(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var T=y.doc.history.done,_=T.length;_--;)if(T[_].changes)return qe(T[_].changes[0].to)}function Co(y,T,_,F,W,H,G,Y,Q){function re(){y.operation(function(){for(;!Oe;)ae(),ke();ve()})}function ae(){var et=y.getRange(H.from(),H.to()),at=et.replace(G,Y),Tn=H.to().line;H.replace(at),Ye=H.to().line,W+=Ye-Tn,ut=Ye<Tn}function be(){var et=Re&&qe(H.to()),at=H.findNext();return at&&!at[0]&&et&&pt(H.from(),et)&&(at=H.findNext()),at}function ke(){for(;be()&&Ar(H.from(),F,W);)if(!(!_&&H.from().line==Ye&&!ut)){y.scrollIntoView(H.from(),30),y.setSelection(H.from(),H.to()),Re=H.from(),Oe=!1;return}Oe=!0}function ve(et){if(et&&et(),y.focus(),Re){y.setCursor(Re);var at=y.state.vim;at.exMode=!1,at.lastHPos=at.lastHSPos=Re.ch}Q&&Q()}function we(et,at,Tn){Be.e_stop(et);var ht=B(et);switch(ht){case"y":ae(),ke();break;case"n":ke();break;case"a":var On=Q;Q=void 0,y.operation(re),Q=On;break;case"l":ae();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ve(Tn)}return Oe&&ve(Tn),!0}y.state.vim.exMode=!0;var Oe=!1,Re,Ye,ut;if(ke(),Oe){Ft(y,"No matches for "+G.source);return}if(!T){re(),Q&&Q();return}he(y,{prefix:Wr("span","replace with ",Wr("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function gi(y,T){var _=y.state.vim,F=Ue.macroModeState,W=Ue.registerController.getRegister("."),H=F.isPlaying,G=F.lastInsertModeChanges;H||(y.off("change",Do),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=null,Be.off(y.getInputField(),"keydown",Gs)),!H&&_.insertModeRepeat>1&&(Aa(y,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.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(G.changes.join("")),Be.signal(y,"vim-mode-change",{mode:"normal"}),F.isRecording&&xr(F)}function as(y){Hn.unshift(y)}function js(y,T,_,F,W){var H={keys:y,type:T};H[T]=_,H[T+"Args"]=F;for(var G in W)H[G]=W[G];as(H)}function Us(y,T,_,F){var W=Ue.registerController.getRegister(F);if(F==":"){W.keyBuffer[0]&&Rr.processCommand(y,W.keyBuffer[0]),_.isPlaying=!1;return}var H=W.keyBuffer,G=0;_.isPlaying=!0,_.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),xt.handleKey(y,ae,"macro"),T.insertMode){var be=W.insertModeChanges[G++].changes;Ue.macroModeState.lastInsertModeChanges.changes=be,ds(y,be,1),gi(y)}_.isPlaying=!1}function ls(y,T){if(!y.isPlaying){var _=y.latestRegister,F=Ue.registerController.getRegister(_);F&&F.pushText(T)}}function xr(y){if(!y.isPlaying){var T=y.latestRegister,_=Ue.registerController.getRegister(T);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(y.lastInsertModeChanges)}}function Vs(y,T){if(!y.isPlaying){var _=y.latestRegister,F=Ue.registerController.getRegister(_);F&&F.pushSearchQuery&&F.pushSearchQuery(T)}}function Do(y,T){var _=Ue.macroModeState,F=_.lastInsertModeChanges;if(!_.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 G=T.text.join(`
1405
+ `);if(F.maybeReset&&(F.changes=[],F.maybeReset=!1),G)if(y.state.overwrite&&!/\n/.test(G))F.changes.push([G]);else{if(G.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<G.length&&(F.changes.push([G,re]),G="")}}G&&F.changes.push(G)}}T=T.next}}function cs(y){var T=y.state.vim;if(T.insertMode){var _=Ue.macroModeState;if(_.isPlaying)return;var F=_.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||us(y,T)}function us(y,T,_){var F=y.getCursor("anchor"),W=y.getCursor("head");if(T.visualMode&&!y.somethingSelected()?_n(y,!1):!T.visualMode&&!T.insertMode&&y.somethingSelected()&&(T.visualMode=!0,T.visualLine=!1,Be.signal(y,"vim-mode-change",{mode:"visual"})),T.visualMode){var H=ot(W,F)?0:-1,G=ot(W,F)?-1:0;W=me(W,0,H),F=me(F,0,G),T.sel={anchor:F,head:W},en(y,T,"<",ft(W,F)),en(y,T,">",Zt(W,F))}else!T.insertMode&&!_&&(T.lastHPos=y.getCursor().ch)}function ko(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 Gs(y){var T=Ue.macroModeState,_=T.lastInsertModeChanges,F=Be.keyName?Be.keyName(y):y.key;F&&(F.indexOf("Delete")!=-1||F.indexOf("Backspace")!=-1)&&(_.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new ko(F,y)))}function Aa(y,T,_,F){function W(){Y?Yn.processAction(y,T,T.lastEditActionCommand):Yn.evalInput(y,T)}function H(ae){if(G.lastInsertModeChanges.changes.length>0){ae=T.lastEditActionCommand?ae:1;var be=G.lastInsertModeChanges;ds(y,be.changes,ae)}}var G=Ue.macroModeState;G.isPlaying=!0;var Y=!!T.lastEditActionCommand,Q=T.inputState;if(T.inputState=T.lastEditInputState,Y&&T.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<_;re++)W(),H(1);else F||W(),H(_);T.inputState=Q,T.insertMode&&!F&&gi(y),G.isPlaying=!1}function hs(y,T){Be.lookupKey(T,"vim-insert",function(_){return typeof _=="string"?Be.commands[_](y):_(y),!0})}function ds(y,T,_){var F=y.getCursor("head"),W=Ue.macroModeState.lastInsertModeChanges.visualBlock;W&&(yr(y,F,W+1),_=y.listSelections().length,y.setCursor(F));for(var H=0;H<_;H++){W&&y.setCursor(me(F,H,0));for(var G=0;G<T.length;G++){var Y=T[G];if(Y instanceof ko)hs(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 qs(y,T,_,F){T.length>1&&T[0]=="n"&&(T=T.replace("numpad","")),T=Br[T]||T;var W="";if(_.ctrlKey&&(W+="C-"),_.altKey&&(W+="A-"),(W||T.length>1)&&_.shiftKey&&(W+="S-"),F&&!F.expectLiteralNext&&T.length==1){if(rr.keymap&&T in rr.keymap)(rr.remapCtrl!==!1||!W)&&(T=rr.keymap[T]);else if(T.charCodeAt(0)>255){var H=_.code&&_.code.slice(-1)||"";_.shiftKey||(H=H.toLowerCase()),H&&(T=H)}}return W+=T,W.length>1&&(W="<"+W+">"),W}function ps(y){var T=new y.constructor;return Object.keys(y).forEach(function(_){if(_!="insertEnd"){var F=y[_];Array.isArray(F)?F=F.slice():F&&typeof F=="object"&&F.constructor!=Object&&(F=ps(F)),T[_]=F}}),y.sel&&(T.sel={head:y.sel.head&&qe(y.sel.head),anchor:y.sel.anchor&&qe(y.sel.anchor)}),T}function Fo(y,T,_){var F=!1,W=xt.maybeInitVimState_(y),H=W.visualBlock||W.wasInVisualBlock,G=y.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!G?W.wasInVisualBlock=!1:G&&W.visualBlock&&(W.wasInVisualBlock=!0),T=="<Esc>"&&!W.insertMode&&!W.visualMode&&G)y.ace.exitMultiSelectMode();else if(H||!G||y.ace.inVirtualSelectionMode)F=xt.handleKey(y,T,_);else{var Y=ps(W),Q=W.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var ae=y.ace.selection;y.state.vim.lastHPos=ae.$desiredColumn==null?ae.lead.column:ae.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var be=y.getCursor("head"),ke=y.getCursor("anchor"),ve=ot(be,ke)?0:-1,we=ot(be,ke)?-1:0;be=me(be,0,ve),ke=me(ke,0,we),y.state.vim.sel.head=be,y.state.vim.sel.anchor=ke,F=Ii(y,T,_),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=ps(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()&&us(y,W,!0),F}function ji(y,T){T.off("beforeEndOperation",ji);var _=T.state.cm.vimCmd;_&&T.execCommand(_.exec?_:_.name,_.args),T.curOp=T.prevOp}var Cr=t("../range").Range,So=t("../lib/event_emitter").EventEmitter,co=t("../lib/dom"),$a=t("../lib/oop"),yl=t("../lib/keys"),Po=t("../lib/event"),uo=t("../search").Search,Wo=t("../lib/useragent"),fs=t("../search_highlight").SearchHighlight,Bo=t("../commands/multi_select_commands"),Ta=t("../mode/text").Mode.prototype.tokenRe,_o=t("../ext/hardwrap").hardWrap;t("../multi_select");var Be=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)};Be.Pos=function(y,T){if(!(this instanceof De))return new De(y,T);this.line=y,this.ch=T},Be.defineOption=function(y,T,_){},Be.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()}},Be.keyMap={},Be.addClass=Be.rmClass=function(){},Be.e_stop=Be.e_preventDefault=Po.stopEvent,Be.keyName=function(y){var T=yl[y.keyCode]||y.key||"";return T.length==1&&(T=T.toUpperCase()),T=Po.getModifierString(y).replace(/(^|-)\w/g,function(_){return _.toUpperCase()})+T,T},Be.keyMap.default=function(y){return function(T){var _=T.ace.commands.commandKeyBinding[y.toLowerCase()];return _&&T.ace.execCommand(_)!==!1}},Be.lookupKey=function y(T,_,F){_||(_="default"),typeof _=="string"&&(_=Be.keyMap[_]||Be.keyMap.default);var W=typeof _=="function"?_(T):_[T];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&F(W))return"handled";if(_.fallthrough){if(!Array.isArray(_.fallthrough))return y(T,_.fallthrough,F);for(var H=0;H<_.fallthrough.length;H++){var G=y(T,_.fallthrough[H],F);if(G)return G}}},Be.findMatchingTag=function(y,T){return y.findMatchingTag(T)},Be.findEnclosingTag=function(y,T){},Be.signal=function(y,T,_){return y._signal(T,_)},Be.on=Po.addListener,Be.off=Po.removeListener,Be.isWordChar=function(y){return y<""?/^\w$/.test(y):(Ta.lastIndex=0,Ta.test(y))},(function(){$a.implement(Be.prototype,So),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(_){this.$lineHandleChanges&&this.$lineHandleChanges.push(_);var F={text:_.action[0]=="i"?_.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(_)},this.onSelectionChange=function(){var _=this.curOp=this.curOp||{};_.cursorActivityHandlers||(_.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Bo.keyboardHandler)},this.operation=function(_,F){if(!F&&this.curOp||F&&this.curOp&&this.curOp.force)return _();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 G=_();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(),G},this.onBeforeEndOperation=function(){var _=this.curOp;_&&(_.change&&this.signal("change",_.change,_),_&&_.cursorActivity&&this.signal("cursorActivity",null,_),this.curOp=null)},this.signal=function(_,F,W){var H=W?W[_+"Handlers"]:(this._eventRegistry||{})[_];if(H){H=H.slice();for(var G=0;G<H.length;G++)H[G](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(_,F){typeof _=="object"&&(F=_.ch,_=_.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:_,column:F}),this.ace.selection.moveTo(_,F),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(_){var F=this.ace.selection,W=_=="anchor"?F.isEmpty()?F.lead:F.anchor:_=="head"||!_?F.lead:F.getRange()[_];return g(W)},this.listSelections=function(_){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(g(W.cursor==W.end?W.start:W.end)),head:this.clipPos(g(W.cursor))}},this)},this.setSelections=function(_,F){var W=this.ace.multiSelect,H=_.map(function(re){var ae=p(re.anchor),be=p(re.head),ke=Cr.comparePoints(ae,be)<0?new Cr.fromPoints(ae,be):new Cr.fromPoints(be,ae);return ke.cursor=Cr.comparePoints(ke.start,be)?ke.end:ke.start,ke});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(H[0]);return}F?H[F]&&H.push(H.splice(F,1)[0]):H=H.reverse(),W.toSingleRange(H[0].clone());for(var G=this.ace.session,Y=0;Y<H.length;Y++){var Q=G.$clipRangeToDocument(H[Y]);W.addRange(Q)}},this.setSelection=function(_,F,W){var H=this.ace.selection;H.moveTo(_.line,_.ch),H.selectTo(F.line,F.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(_){return!this.ace.selection.isEmpty()},this.clipPos=function(_){var F=this.ace.session.$clipPositionToDocument(_.line,_.ch);return g(F)},this.foldCode=function(_){this.ace.session.$toggleFoldWidget(_.line,{})},this.markText=function(_){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(_){var F=_.action=="insert",W=_.start,H=_.end,G=(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=Cr.comparePoints(re,W);if(!(ae<0)){if(ae===0&&F)if(!re.$insertRight)ae=1;else{if(re.bias!=1){re.bias=-1;continue}ae=1}var be=F?ae:Cr.comparePoints(re,H);if(be>0){re.row+=G,re.column+=re.row==H.row?Y:0;continue}!F&&be<=0&&(re.row=W.row,re.column=W.column,be===0&&(re.bias=1))}}};var y=function(_,F,W,H){this.cm=_,this.id=F,this.row=W,this.column=H,_.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return g(this)},this.setBookmark=function(_,F){var W=new y(this,this.$uid++,_.line,_.ch);return(!F||!F.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(_,F){if(F=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,_)}},this.findPosV=function(_,F,W,H){if(W=="page"){var G=this.ace.renderer,Y=G.layerConfig;F*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(_.line,_.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 g(re)}debugger},this.charCoords=function(_,F){if(F=="div"||!F){var W=this.ace.session.documentToScreenPosition(_.line,_.ch);return{left:W.column,top:W.row}}if(F=="local"){var H=this.ace.renderer,W=this.ace.session.documentToScreenPosition(_.line,_.ch),G=H.layerConfig.lineHeight,Y=H.layerConfig.characterWidth,Q=G*W.row;return{left:W.column*Y,top:Q,bottom:Q+G}}},this.coordsChar=function(_,F){var W=this.ace.renderer;if(F=="local"){var H=Math.max(0,Math.floor(_.top/W.lineHeight)),G=Math.max(0,Math.floor(_.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(H,G);return g(Y)}if(F=="div")throw"not implemented"},this.getSearchCursor=function(_,F,W){var H=!1,G=!1;_ instanceof RegExp&&!_.global&&(H=!_.ignoreCase,_=_.source,G=!0),_=="\\n"&&(_=`
1407
+ `,G=!1);var Y=new uo;F.ch==null&&(F.ch=Number.MAX_VALUE);var Q={row:F.line,column:F.ch},re=this,ae=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(be){Y.setOptions({needle:_,caseSensitive:H,wrap:!1,backwards:be,regExp:G,start:ae||Q});var ke=Y.find(re.ace.session);return ae=ke,ae&&[!ae.isEmpty()]},from:function(){return ae&&g(ae.start)},to:function(){return ae&&g(ae.end)},replace:function(be){ae&&(ae.end=re.ace.session.doc.replace(ae,be))}}},this.scrollTo=function(_,F){var W=this.ace.renderer,H=W.layerConfig,G=H.maxHeight;G-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,F!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(F,G))),_!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(_,H.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(_,F){if(_){var W=this.ace.renderer,H={top:0,bottom:F};W.scrollCursorIntoView(p(_),W.lineHeight*2/W.$size.scrollerHeight,H)}},this.getLine=function(_){return this.ace.session.getLine(_)},this.getRange=function(_,F){return this.ace.session.getTextRange(new Cr(_.line,_.ch,F.line,F.ch))},this.replaceRange=function(_,F,W){W||(W=F);var H=new Cr(F.line,F.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(H),this.ace.session.replace(H,_)},this.replaceSelection=this.replaceSelections=function(_){var F=Array.isArray(_)&&_,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),F?_[0]||"":_);return}W.inVirtualSelectionMode=!0;var H=W.rangeList.ranges;H.length||(H=[this.ace.multiSelect.getRange()]);for(var G=H.length;G--;)this.ace.session.replace(H[G],F?_[G]||"":_);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(_){return this.getRange(_.anchor,_.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(_,F){switch(this.state[_]=F,_){case"indentWithTabs":_=T[_],F=!F;break;case"keyMap":this.state.$keyMap=F;return;default:_=T[_]}_&&this.ace.setOption(_,F)},this.getOption=function(_){var F,W=T[_];switch(W&&(F=this.ace.getOption(W)),_){case"indentWithTabs":return _=T[_],!F;case"keyMap":return this.state.$keyMap||"vim"}return W?F:this.state[_]},this.toggleOverwrite=function(_){return this.state.overwrite=_,this.ace.setOverwrite(_)},this.addOverlay=function(_){if(!this.$searchHighlight||!this.$searchHighlight.session){var F=new fs(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(F);F.id=W.id,F.session=this.ace.session,F.destroy=function(G){F.session.off("change",F.updateOnChange),F.session.off("changeEditor",F.destroy),F.session.removeMarker(F.id),F.session=null},F.updateOnChange=function(G){var Y=G.start.row;Y==G.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(_.query.source,"gmi");this.$searchHighlight=_.highlight=F,this.$searchHighlight.setRegexp(H),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(_){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var _=this.ace.renderer,F=_.layerConfig;return{left:_.scrollLeft,top:_.scrollTop,height:F.maxHeight,width:F.width,clientHeight:F.height,clientWidth:F.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(_){return this.ace.setValue(_,-1)},this.getTokenTypeAt=function(_){var F=this.ace.session.getTokenAt(_.line,_.ch);return F&&/comment|string/.test(F.type)?"string":""},this.findMatchingBracket=function(_){var F=this.ace.session.findMatchingBracket(p(_));return{to:F&&g(F)}},this.findMatchingTag=function(_){var F=this.ace.session.getMatchingTags(p(_));if(F)return{open:{from:g(F.openTag.start),to:g(F.openTag.end)},close:{from:g(F.closeTag.start),to:g(F.closeTag.end)}}},this.indentLine=function(_,F){F===!0?this.ace.session.indentRows(_,_," "):F===!1&&this.ace.session.outdentRows(new Cr(_,0,_,0))},this.indexFromPos=function(_){return this.ace.session.doc.positionToIndex(p(_))},this.posFromIndex=function(_){return g(this.ace.session.doc.indexToPosition(_))},this.focus=function(_){return this.ace.textInput.focus()},this.blur=function(_){return this.ace.blur()},this.defaultTextHeight=function(_){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(_,F,W,H){var G=H.bracketRegex.source,Y=/paren|text|operator|tag/;if(F==1)var Q=this.ace.session.$findClosingBracket(G.slice(1,2),p(_),Y);else{var Q=this.ace.session.$findOpeningBracket(G.slice(-2,-1),{row:_.line,column:_.ch+1},Y);!Q&&H.bracketRegex&&H.bracketRegex.test(this.getLine(_.line)[_.ch-1])&&(Q={row:_.line,column:_.ch-1})}return Q&&{pos:g(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(_){if(Be.commands.hasOwnProperty(_))return Be.commands[_](this);if(_=="indentAuto")return this.ace.execCommand("autoindent");console.log(_+" is not implemented")},this.getLineNumber=function(_){var F=this.$lineHandleChanges;if(!F)return null;for(var W=_.row,H=0;H<F.length;H++){var G=F[H];if(G.start.row!=G.end.row){if(G.action[0]=="i")G.start.row<W&&(W+=G.end.row-G.start.row);else if(G.start.row<W){if(W<G.end.row||W==G.end.row&&G.start.column>0)return null;W-=G.end.row-G.start.row}}}return W},this.getLineHandle=function(_){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(_),row:_}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var _=this.ace.session.$undoManager;if(_&&_.$lastDelta)return g(_.$lastDelta.end)}}).call(Be.prototype);var Ma=Be.StringStream=function(y,T){this.pos=this.start=0,this.string=y,this.tabSize=T||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Ma.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 _=T==y;else var _=T&&(y.test?y.test(T):y(T));if(_)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,_){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(G){return _?G.toLowerCase():G},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}}},Be.defineExtension=function(y,T){Be.prototype[y]=T},co.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(_,F,W){var H=_.ace.container,G;return G=H.appendChild(document.createElement("div")),W?G.className="ace_dialog ace_dialog-bottom":G.className="ace_dialog ace_dialog-top",typeof F=="string"?G.innerHTML=F:G.appendChild(F),G}function T(_,F){_.state.currentNotificationClose&&_.state.currentNotificationClose(),_.state.currentNotificationClose=F}Be.defineExtension("openDialog",function(_,F,W){function H(be){if(typeof be=="string")re.value=be;else{if(Y||be&&be.type=="blur"&&document.activeElement===re)return;Q.state.dialog==G&&(Q.state.dialog=null,Q.focus()),Y=!0,G.remove(),W.onClose&&W.onClose(G);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 G=y(this,_,W.bottom),Y=!1,Q=this;this.state.dialog=G;var re=G.getElementsByTagName("input")[0],ae;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Be.on(re,"input",function(be){W.onInput(be,re.value,H)}),W.onKeyUp&&Be.on(re,"keyup",function(be){W.onKeyUp(be,re.value,H)}),Be.on(re,"keydown",function(be){W&&W.onKeyDown&&W.onKeyDown(be,re.value,H)||(be.keyCode==13&&F(re.value),(be.keyCode==27||W.closeOnEnter!==!1&&be.keyCode==13)&&(Be.e_stop(be),H()))}),W.closeOnBlur!==!1&&Be.on(re,"blur",H),re.focus()):(ae=G.getElementsByTagName("button")[0])&&(Be.on(ae,"click",function(){H(),Q.focus()}),W.closeOnBlur!==!1&&Be.on(ae,"blur",H),ae.focus()),H}}),Be.defineExtension("openNotification",function(_,F){function W(){G||(G=!0,clearTimeout(Y),H.remove())}if(!this.virtualSelectionMode()){T(this,W);var H=y(this,_,F&&F.bottom),G=!1,Y,Q=F&&typeof F.duration<"u"?F.duration:5e3;return Be.on(H,"click",function(re){Be.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var De=Be.Pos,Hn=[{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"}],zo=Hn.length,Mi=[{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"}],rr=O(""),Ea=/[\d]/,Ho=[Be.isWordChar,function(y){return y&&!Be.isWordChar(y)&&!/\s/.test(y)}],Ui=[function(y){return/\S/.test(y)}],Ao=["<",">"],ln=["-",'"',".",":","_","/","+"],tn=/^\w$/,cn;try{cn=new RegExp("^[\\p{Lu}]$","u")}catch{cn=/^[A-Z]$/}var Vt={};M("filetype",void 0,"string",["ft"],function(y,T){if(T!==void 0){if(y===void 0){var _=T.getOption("mode");return _=="null"?"":_}var _=y==""?"null":y;T.setOption("mode",_)}}),M("textwidth",80,"number",["tw"],function(y,T){if(T!==void 0){if(y===void 0){var _=T.getOption("textwidth");return _}var F=Math.round(y);F>1&&T.setOption("textwidth",F)}});var Vi=function(){function y(Q,re,ae){function be(Oe){var Re=++W%F,Ye=Y[Re];Ye&&Ye.clear(),Y[Re]=Q.setBookmark(Oe)}var ke=W%F,ve=Y[ke];if(ve){var we=ve.find();we&&!pt(we,re)&&be(re)}else be(re);be(ae),H=W,G=W-F+1,G<0&&(G=0)}function T(Q,re){W+=re,W>H?W=H:W<G&&(W=G);var ae=Y[(F+W)%F];if(ae&&!ae.find()){var be=re>0?1:-1,ke,ve=Q.getCursor();do if(W+=be,ae=Y[(F+W)%F],ae&&(ke=ae.find())&&!pt(ve,ke))break;while(W<H&&W>G)}return ae}function _(Q,re){var ae=W,be=T(Q,re);return W=ae,be&&be.find()}var F=100,W=-1,H=0,G=0,Y=new Array(F);return{cachedCursor:void 0,add:y,find:_,move:T}},Kn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=Ue.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,T){var _=Ue.registerController.getRegister(T);if(_){if(_.clear(),this.latestRegister=T,y.openDialog){var F=Wr("span",{class:"cm-vim-message"},"recording @"+T);this.onRecordingDone=y.openDialog(F,null,{bottom:!0})}this.isRecording=!0}}};var Ue,$n,xt={enterVimMode:h,leaveVimMode:f,buildKeyMap:function(){},getRegisterController:function(){return Ue.registerController},resetVimGlobalState_:N,getVimGlobalState_:function(){return Ue},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:ko,map:function(y,T,_){Rr.map(y,T,_)},unmap:function(y,T){return Rr.unmap(y,T)},noremap:function(y,T,_){Rr.map(y,T,_,!0)},mapclear:function(y){var T=Hn.length,_=zo,F=Hn.slice(0,T-_);if(Hn=Hn.slice(T-_),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 G=["normal","insert","visual"];for(var Y in G)if(G[Y]!==y){var Q={};for(var re in H)Q[re]=H[re];Q.context=G[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:B,setOption:$,getOption:k,defineOption:M,defineEx:function(y,T,_){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');Ks[y]=_,Rr.commandMap_[T]={name:y,shortName:T,type:"api"}},handleKey:function(y,T,_){var F=this.findKey(y,T,_);if(typeof F=="function")return F()},multiSelectHandleKey:Fo,findKey:function(y,T,_){function F(){var re=Ue.macroModeState;if(re.isRecording){if(T=="q")return re.exitMacroRecordMode(),S(y),!0;_!="mapping"&&ls(re,T)}}function W(){if(T=="<Esc>"){if(Y.visualMode)_n(y);else{if(!Y.insertMode)return;gi(y)}return S(y),!0}}function H(){if(W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join(""),ae=T.length==1,be=Yn.matchCommand(re,Hn,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(be.type=="none")return S(y),!1;if(be.type=="partial"){if(be.expectLiteralNext&&(Y.expectLiteralNext=!0),$n&&window.clearTimeout($n),$n=ae&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(y)},k("insertModeEscKeysTimeout")),ae){var ve=y.listSelections();(!ke||ke.removed.length!=ve.length)&&(ke=Y.inputState.changeQueue=new D),ke.inserted+=T;for(var we=0;we<ve.length;we++){var Oe=ft(ve[we].anchor,ve[we].head),Re=Zt(ve[we].anchor,ve[we].head),Ye=y.getRange(Oe,y.state.overwrite?me(Re,0,1):Re);ke.removed[we]=(ke.removed[we]||"")+Ye}}return!ae}if(Y.expectLiteralNext=!1,$n&&window.clearTimeout($n),be.command&&ke){for(var ve=y.listSelections(),we=0;we<ve.length;we++){var ut=ve[we].head;y.replaceRange(ke.removed[we]||"",me(ut,0,-ke.inserted.length),ut,"+input")}Ue.macroModeState.lastInsertModeChanges.changes.pop()}return be.command||S(y),be.command}function G(){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 S(y),!1;var be=Y.visualMode?"visual":"normal",ke=ae[2]||ae[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var ve=Yn.matchCommand(ke,Hn,Y.inputState,be);return ve.type=="none"?(S(y),!1):ve.type=="partial"?(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):ve.type=="clear"?(S(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=G(),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"?L(y,Q.toKeys,Q):Yn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,R(y),xt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,T){Rr.processCommand(y,T)},defineMotion:ee,defineAction:le,defineOperator:te,mapCommand:js,_mapCommand:as,defineRegister:U,exitVisualMode:_n,exitInsertMode:gi},Jr=[],vn=!1,En,hr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},ei={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Gi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(hr)).forEach(function(y){Gi[(hr[y]||"").toLowerCase()]=Gi[y.toLowerCase()]=y}),M("langmap",void 0,"string",["lmap"],function(y,T){if(y===void 0)return rr.string;P(y)}),A.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},A.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,_){this.keyBuffer=[y||""],this.linewise=!!T,this.blockwise=!!_},pushText:function(y,T){T&&(this.linewise||this.keyBuffer.push(`
1441
+ `),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Kn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(y,T,_,F,W){if(y!=="_"){F&&_.charAt(_.length-1)!==`
1442
+ `&&(_+=`
1443
+ `);var H=this.isValidRegister(y)?this.getRegister(y):null;if(!H){switch(T){case"yank":this.registers[0]=new z(_,F,W);break;case"delete":case"change":_.indexOf(`
1444
+ `)==-1?this.registers["-"]=new z(_,F):(this.shiftNumericRegisters_(),this.registers[1]=new z(_,F))}this.unnamedRegister.setText(_,F,W);return}var G=c(y);G?H.pushText(_,F):H.setText(_,F,W),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(_),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,ln)||tn.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 _=this.historyBuffer,F=T?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var W=this.iterator+F;T?W>=0:W<_.length;W+=F)for(var H=_[W],G=0;G<=H.length;G++)if(this.initialPrefix==H.substring(0,G))return this.iterator=W,H;if(W>=_.length)return this.iterator=_.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 Yn={matchCommand:function(y,T,_,F){var W=Ae(y,T,F,_);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,G=0;G<W.full.length;G++){var Y=W.full[G];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"};_.selectedCharacter=Q}return{type:"full",command:H}},processCommand:function(y,T,_){switch(T.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(y,T,_);break;case"operator":this.processOperator(y,T,_);break;case"operatorMotion":this.processOperatorMotion(y,T,_);break;case"action":this.processAction(y,T,_);break;case"search":this.processSearch(y,T,_);break;case"ex":case"keyToEx":this.processEx(y,T,_);break}},processMotion:function(y,T,_){T.inputState.motion=_.motion,T.inputState.motionArgs=ue(_.motionArgs),this.evalInput(y,T)},processOperator:function(y,T,_){var F=T.inputState;if(F.operator){if(F.operator==_.operator){F.motion="expandToLine",F.motionArgs={linewise:!0},this.evalInput(y,T);return}S(y)}F.operator=_.operator,F.operatorArgs=ue(_.operatorArgs),_.keys.length>1&&(F.operatorShortcut=_.keys),_.exitVisualBlock&&(T.visualBlock=!1,Wn(y)),T.visualMode&&this.evalInput(y,T)},processOperatorMotion:function(y,T,_){var F=T.visualMode,W=ue(_.operatorMotionArgs);W&&F&&W.visualLine&&(T.visualLine=!0),this.processOperator(y,T,_),F||this.processMotion(y,T,_)},processAction:function(y,T,_){var F=T.inputState,W=F.getRepeat(),H=!!W,G=ue(_.actionArgs)||{};F.selectedCharacter&&(G.selectedCharacter=F.selectedCharacter),_.operator&&this.processOperator(y,T,_),_.motion&&this.processMotion(y,T,_),(_.motion||_.operator)&&this.evalInput(y,T),G.repeat=W||1,G.repeatIsExplicit=H,G.registerName=F.registerName,S(y),T.lastMotion=null,_.isEdit&&this.recordLastEdit(T,F,_),Xn[_.action](y,G,T)},processSearch:function(y,T,_){function F(Re,Ye,ut){Ue.searchHistoryController.pushInput(Re),Ue.searchHistoryController.reset();try{Ne(y,Re,Ye,ut)}catch{Ft(y,"Invalid regex: "+Re),S(y);return}Yn.processMotion(y,T,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function W(Re){F(Re,!0,!0);var Ye=Ue.macroModeState;Ye.isRecording&&Vs(Ye,Re)}function H(Re,Ye,ut){var et=B(Re),at,Tn;et=="<Up>"||et=="<Down>"?(at=et=="<Up>",Tn=Re.target?Re.target.selectionEnd:0,Ye=Ue.searchHistoryController.nextMatch(Ye,at)||"",ut(Ye),Tn&&Re.target&&(Re.target.selectionEnd=Re.target.selectionStart=Math.min(Tn,Re.target.value.length))):et&&et!="<Left>"&&et!="<Right>"&&Ue.searchHistoryController.reset();var ht;try{ht=Ne(y,Ye,!0,!0)}catch{}ht?y.scrollIntoView(Pt(y,!Y,ht),30):(ur(y),y.scrollTo(be.left,be.top))}function G(Re,Ye,ut){var et=B(Re);et=="<Esc>"||et=="<C-c>"||et=="<C-[>"||et=="<BS>"&&Ye==""?(Ue.searchHistoryController.pushInput(Ye),Ue.searchHistoryController.reset(),Ne(y,ae),ur(y),y.scrollTo(be.left,be.top),Be.e_stop(Re),S(y),ut(),y.focus()):et=="<Up>"||et=="<Down>"?Be.e_stop(Re):et=="<C-u>"&&(Be.e_stop(Re),ut(""))}if(y.getSearchCursor){var Y=_.searchArgs.forward,Q=_.searchArgs.wholeWordOnly;sn(y).setReversed(!Y);var re=Y?"/":"?",ae=sn(y).getQuery(),be=y.getScrollInfo();switch(_.searchArgs.querySrc){case"prompt":var ke=Ue.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:G});break;case"wordUnderCursor":var ve=An(y,{noSymbol:!0}),we=!0;if(ve||(ve=An(y,{noSymbol:!1}),we=!1),!ve){Ft(y,"No word under cursor"),S(y);return}var Oe=y.getLine(ve.start.line).substring(ve.start.ch,ve.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=Sn(Oe),Ue.jumpList.cachedCursor=y.getCursor(),y.setCursor(ve.start),F(Oe,!0,!1)}}},processEx:function(y,T,_){function F(H){Ue.exCommandHistoryController.pushInput(H),Ue.exCommandHistoryController.reset(),Rr.processCommand(y,H),y.state.vim&&S(y)}function W(H,G,Y){var Q=B(H),re,ae;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&G=="")&&(Ue.exCommandHistoryController.pushInput(G),Ue.exCommandHistoryController.reset(),Be.e_stop(H),S(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(Be.e_stop(H),re=Q=="<Up>",ae=H.target?H.target.selectionEnd:0,G=Ue.exCommandHistoryController.nextMatch(G,re)||"",Y(G),ae&&H.target&&(H.target.selectionEnd=H.target.selectionStart=Math.min(ae,H.target.value.length))):Q=="<C-u>"?(Be.e_stop(H),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Ue.exCommandHistoryController.reset()}_.type=="keyToEx"?Rr.processCommand(y,_.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 _=T.inputState,F=_.motion,W=_.motionArgs||{},H=_.operator,G=_.operatorArgs||{},Y=_.registerName,Q=T.sel,re=qe(T.visualMode?se(y,Q.head):y.getCursor("head")),ae=qe(T.visualMode?se(y,Q.anchor):y.getCursor("anchor")),be=qe(re),ke=qe(ae),ve,we,Oe;if(H&&this.recordLastEdit(T,_),_.repeatOverride!==void 0?Oe=_.repeatOverride:Oe=_.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),_.selectedCharacter&&(W.selectedCharacter=G.selectedCharacter=_.selectedCharacter),W.repeat=Oe,S(y),F){var Re=mi[F](y,re,W,T,_);if(T.lastMotion=mi[F],!Re)return;if(W.toJumplist){!H&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ye=Ue.jumpList,ut=Ye.cachedCursor;ut?(Yr(y,ut,Re),delete Ye.cachedCursor):Yr(y,re,Re)}Re instanceof Array?(we=Re[0],ve=Re[1]):ve=Re,ve||(ve=qe(re)),T.visualMode?((!T.visualBlock||ve.ch!==1/0)&&(ve=se(y,ve,be)),we&&(we=se(y,we)),we=we||ke,Q.anchor=we,Q.head=ve,Wn(y),en(y,T,"<",ot(we,ve)?we:ve),en(y,T,">",ot(we,ve)?ve:we)):H||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),ve=se(y,ve,be),y.setCursor(ve.line,ve.ch))}if(H){if(G.lastSel){we=ke;var et=G.lastSel,at=Math.abs(et.head.line-et.anchor.line),Tn=Math.abs(et.head.ch-et.anchor.ch);et.visualLine?ve=new De(ke.line+at,ke.ch):et.visualBlock?ve=new De(ke.line+at,ke.ch+Tn):et.head.line==et.anchor.line?ve=new De(ke.line,ke.ch+Tn):ve=new De(ke.line+at,ke.ch),T.visualMode=!0,T.visualLine=et.visualLine,T.visualBlock=et.visualBlock,Q=T.sel={anchor:we,head:ve},Wn(y)}else T.visualMode&&(G.lastSel={anchor:qe(Q.anchor),head:qe(Q.head),visualBlock:T.visualBlock,visualLine:T.visualLine});var ht,On,St,Mt,dr;if(T.visualMode){ht=ft(Q.head,Q.anchor),On=Zt(Q.head,Q.anchor),St=T.visualLine||G.linewise,Mt=T.visualBlock?"block":St?"line":"char";var Mr=b(y,ht,On);if(dr=_r(y,{anchor:Mr.start,head:Mr.end},Mt),St){var Nn=dr.ranges;if(Mt=="block")for(var V=0;V<Nn.length;V++)Nn[V].head.ch=Kt(y,Nn[V].head.line);else Mt=="line"&&(Nn[0].head=new De(Nn[0].head.line+1,0))}}else{if(ht=qe(we||ke),On=qe(ve||be),ot(On,ht)){var Z=ht;ht=On,On=Z}St=W.linewise||G.linewise,St?Bn(y,ht,On):W.forward&&In(y,ht,On),Mt="char";var ie=!W.inclusive||St,Mr=b(y,ht,On);dr=_r(y,{anchor:Mr.start,head:Mr.end},Mt,ie)}y.setSelections(dr.ranges,dr.primary),T.lastMotion=null,G.repeat=Oe,G.registerName=Y,G.linewise=St;var oe=gs[H](y,G,dr.ranges,ke,ve);T.visualMode&&_n(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,T,_){var F=Ue.macroModeState;F.isPlaying||(y.lastEditInputState=T,y.lastEditActionCommand=_,F.lastInsertModeChanges.changes=[],F.lastInsertModeChanges.expectCursorActivityForChange=!1,F.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},mi={moveToTopLine:function(y,T,_){var F=fi(y).top+_.repeat-1;return new De(F,Dt(y.getLine(F)))},moveToMiddleLine:function(y){var T=fi(y),_=Math.floor((T.top+T.bottom)*.5);return new De(_,Dt(y.getLine(_)))},moveToBottomLine:function(y,T,_){var F=fi(y).bottom-_.repeat+1;return new De(F,Dt(y.getLine(F)))},expandToLine:function(y,T,_){var F=T;return new De(F.line+_.repeat-1,1/0)},findNext:function(y,T,_){var F=sn(y),W=F.getQuery();if(W){var H=!_.forward;return H=F.isReversed()?!H:H,hn(y,W),Pt(y,H,W,_.repeat)}},findAndSelectNextInclusive:function(y,T,_,F,W){var H=sn(y),G=H.getQuery();if(G){var Y=!_.forward;Y=H.isReversed()?!Y:Y;var Q=qn(y,Y,G,_.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,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var be=F.sel.anchor;if(be)return H.isReversed()?_.forward?[be,re]:[be,ae]:_.forward?[be,ae]:[be,re]}else F.visualMode=!0,F.visualLine=!1,F.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ae,re]:[re,ae]}}},goToMark:function(y,T,_,F){var W=an(y,F,_.selectedCharacter);return W?_.linewise?{line:W.line,ch:Dt(y.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(y,T,_,F){if(F.visualBlock&&_.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,_,F){for(var W=T,H=0;H<_.repeat;H++){var G=W;for(var Y in F.marks)if(l(Y)){var Q=F.marks[Y].find(),re=_.forward?ot(Q,G):ot(G,Q);if(!re&&!(_.linewise&&Q.line==G.line)){var ae=pt(G,W),be=_.forward?gn(G,Q,W):gn(W,Q,G);(ae||be)&&(W=Q)}}}return _.linewise&&(W=new De(W.line,Dt(y.getLine(W.line)))),W},moveByCharacters:function(y,T,_){var F=T,W=_.repeat,H=_.forward?F.ch+W:F.ch-W;return new De(F.line,H)},moveByLines:function(y,T,_,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 G=_.repeat+(_.repeatOffset||0),Y=_.forward?W.line+G:W.line-G,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(y,T,_,F);if(Y>re&&W.line==re)return Xr(y,T,_,F,!0);var ae=y.ace.session.getFoldLine(Y);return ae&&(_.forward?Y>ae.start.row&&(Y=ae.end.row+1):Y=ae.start.row),_.toFirstChar&&(H=Dt(y.getLine(Y)),F.lastHPos=H),F.lastHSPos=y.charCoords(new De(Y,H),"div").left,new De(Y,H)},moveByDisplayLines:function(y,T,_,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=_.repeat,Q=y.findPosV(W,_.forward?H:-H,"line",F.lastHSPos);if(Q.hitSide)if(_.forward)var G=y.charCoords(Q,"div"),Y={top:G.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,_){var F=T,W=_.repeat;return y.findPosV(F,_.forward?W:-W,"page")},moveByParagraph:function(y,T,_){var F=_.forward?1:-1;return Ro(y,T,_.repeat,F)},moveBySentence:function(y,T,_){var F=_.forward?1:-1;return Zr(y,T,_.repeat,F)},moveByScroll:function(y,T,_,F){var W=y.getScrollInfo(),H=null,G=_.repeat;G||(G=W.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(T,"local");if(_.repeat=G,H=mi.moveByDisplayLines(y,T,_,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,_){return br(y,T,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(y,T,_){var F=_.repeat,W=xo(y,F,_.forward,_.selectedCharacter,T),H=_.forward?-1:1;return Ai(H,_),W?(W.ch+=H,W):null},moveToCharacter:function(y,T,_){var F=_.repeat;return Ai(0,_),xo(y,F,_.forward,_.selectedCharacter,T)||T},moveToSymbol:function(y,T,_){var F=_.repeat;return Pr(y,F,_.forward,_.selectedCharacter)||T},moveToColumn:function(y,T,_,F){var W=_.repeat;return F.lastHPos=W-1,F.lastHSPos=y.charCoords(T,"div").left,Hs(y,W)},moveToEol:function(y,T,_,F){return Xr(y,T,_,F,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,T){var _=T;return new De(_.line,Dt(y.getLine(_.line)))},moveToMatchedSymbol:function(y,T){for(var _=T,F=_.line,W=_.ch,H=y.getLine(F),G;W<H.length;W++)if(G=H.charAt(W),G&&u(G)){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 _},moveToStartOfLine:function(y,T){return new De(T.line,0)},moveToLineOrEdgeOfDocument:function(y,T,_){var F=_.forward?y.lastLine():y.firstLine();return _.repeatIsExplicit&&(F=_.repeat-y.getOption("firstLineNumber")),new De(F,Dt(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,_,F){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},H={"'":!0,'"':!0,"`":!0},G=_.selectedCharacter;G=="b"?G="(":G=="B"&&(G="{");var Y=!_.textObjectInner,Q,re;if(W[G]){if(re=!0,Q=Rn(y,T,G,Y),!Q){var ae=y.getSearchCursor(new RegExp("\\"+G,"g"),T);ae.find()&&(Q=Rn(y,ae.from(),G,Y))}}else if(H[G])re=!0,Q=wr(y,T,G,Y);else if(G==="W"||G==="w")for(var be=_.repeat||1;be-- >0;){var ke=An(y,{inclusive:Y,innerWord:!Y,bigWord:G==="W",noSymbol:G==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(G==="p")if(Q=Ro(y,T,_.repeat,0,Y),_.linewise=!0,F.visualMode)F.visualLine||(F.visualLine=!0);else{var ve=F.inputState.operatorArgs;ve&&(ve.linewise=!0),Q.end.line--}else if(G==="t")Q=_i(y,T,Y);else if(G==="s"){var we=y.getLine(T.line);T.ch>0&&w(we[T.ch])&&(T.ch-=1);var Oe=Oo(y,T,_.repeat,1,Y),Re=Oo(y,T,_.repeat,-1,Y);m(y.getLine(Re.line)[Re.ch])&&m(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?mn(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,T,_){var F=Ue.lastCharacterSearch,W=_.repeat,H=_.forward===F.forward,G=(F.increment?1:0)*(H?-1:1);y.moveH(-G,"char"),_.inclusive=!!H;var Y=xo(y,W,H,F.selectedCharacter);return Y?(Y.ch+=G,Y):(y.moveH(G,"char"),T)}},gs={change:function(y,T,_){var F,W,H=y.state.vim,G=_[0].anchor,Y=_[0].head;if(H.visualMode)if(T.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(G,Y),W=y.getSelection(),y.replaceSelection(""),F=G;else{W=y.getSelection();var Q=de("",_.length);y.replaceSelections(Q),F=ft(_[0].head,_[0].anchor)}else{W=y.getRange(G,Y);var re=H.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(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&&(G=new De(G.line,Dt(y.getLine(G.line))),Y.line>G.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",G,Y),F=G}Ue.registerController.pushText(T.registerName,"change",W,T.linewise,_.length>1),Xn.enterInsertMode(y,{head:F},y.state.vim)},delete:function(y,T,_){var F,W,H=y.state.vim;if(H.visualBlock){W=y.getSelection();var G=de("",_.length);y.replaceSelections(G),F=ft(_[0].head,_[0].anchor)}else{var Y=_[0].anchor,Q=_[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,Kt(y,Y.line-1))),W=y.getRange(Y,Q),y.replaceRange("",Y,Q),F=Y,T.linewise&&(F=mi.moveToFirstNonWhiteSpaceCharacter(y,Y))}return Ue.registerController.pushText(T.registerName,"delete",W,T.linewise,H.visualBlock),se(y,F)},indent:function(y,T,_){var F=y.state.vim,W=F.visualMode?T.repeat:1;if(F.visualBlock){for(var H=y.getOption("tabSize"),G=y.getOption("indentWithTabs")?" ":" ".repeat(H),Y,Q=_.length-1;Q>=0;Q--)if(Y=ft(_[Q].anchor,_[Q].head),T.indentRight)y.replaceRange(G.repeat(W),Y,Y);else{for(var re=y.getLine(Y.line),ae=0,be=0;be<W;be++){var ke=re[Y.ch+ae];if(ke==" ")ae++;else{if(ke!=" ")break;ae++;for(var ve=1;ve<G.length&&(ke=re[Y.ch+ae],ke===" ");ve++)ae++}}y.replaceRange("",Y,me(Y,0,ae))}return Y}if(y.indentMore)for(var be=0;be<W;be++)T.indentRight?y.indentMore():y.indentLess();else{var we=_[0].anchor.line,Oe=F.visualBlock?_[_.length-1].anchor.line:_[0].head.line;T.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var be=0;be<W;be++)y.indentLine(Q,T.indentRight)}return mi.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},indentAuto:function(y,T,_){return y.execCommand("indentAuto"),mi.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},hardWrap:function(y,T,_,F,W){if(y.hardWrap){var H=_[0].anchor.line,G=_[0].head.line;T.linewise&&G--;var Y=y.hardWrap({from:H,to:G});return Y>H&&T.linewise&&Y--,T.keepCursor?F:new De(Y,0)}},changeCase:function(y,T,_,F,W){for(var H=y.getSelections(),G=[],Y=T.toLower,Q=0;Q<H.length;Q++){var re=H[Q],ae="";if(Y===!0)ae=re.toLowerCase();else if(Y===!1)ae=re.toUpperCase();else for(var be=0;be<re.length;be++){var ke=re.charAt(be);ae+=c(ke)?ke.toLowerCase():ke.toUpperCase()}G.push(ae)}return y.replaceSelections(G),T.shouldMoveCursor?W:!y.state.vim.visualMode&&T.linewise&&_[0].anchor.line+1==_[0].head.line?mi.moveToFirstNonWhiteSpaceCharacter(y,F):T.linewise?F:ft(_[0].anchor,_[0].head)},yank:function(y,T,_,F){var W=y.state.vim,H=y.getSelection(),G=W.visualMode?ft(W.sel.anchor,W.sel.head,_[0].head,_[0].anchor):F;return Ue.registerController.pushText(T.registerName,"yank",H,T.linewise,W.visualBlock),G}},Xn={jumpListWalk:function(y,T,_){if(!_.visualMode){var F=T.repeat,W=T.forward,H=Ue.jumpList,G=H.move(y,W?F:-F),Y=G?G.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,T,_){if(!_.visualMode){var F=T.repeat||1,W=y.defaultTextHeight(),H=y.getScrollInfo().top,G=W*F,Y=T.forward?H+G:H-G,Q=qe(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 _=y.getCursor().line,F=y.charCoords(new De(_,0),"local"),W=y.getScrollInfo().clientHeight,H=F.top;switch(T.position){case"center":H=F.bottom-W/2;break;case"bottom":var G=new De(_,y.getLine(_).length-1),Y=y.charCoords(G,"local"),Q=Y.bottom-H;H=H-W+Q}y.scrollTo(null,H)},replayMacro:function(y,T,_){var F=T.selectedCharacter,W=T.repeat,H=Ue.macroModeState;for(F=="@"?F=H.latestRegister:H.latestRegister=F;W--;)Us(y,_,H,F)},enterMacroRecordMode:function(y,T){var _=Ue.macroModeState,F=T.selectedCharacter;Ue.registerController.isValidRegister(F)&&_.enterMacroRecordMode(y,F)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),Be.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),Be.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,T,_){if(!y.getOption("readOnly")){_.insertMode=!0,_.insertModeRepeat=T&&T.repeat||1;var F=T?T.insertAt:null,W=_.sel,H=T.head||y.getCursor("head"),G=y.listSelections().length;if(F=="eol")H=new De(H.line,Kt(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,mi.moveToFirstNonWhiteSpaceCharacter(y,H));H=Y.end}else if(F=="startOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(H=new De(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),G=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(!_.visualMode)return;_.visualBlock?(H=new De(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),G=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(_.visualMode)return}else F=="lastEdit"&&(H=Hi(y)||H);y.setOption("disableInput",!1),T&&T.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),Be.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),Be.signal(y,"vim-mode-change",{mode:"insert"})),Ue.macroModeState.isPlaying||(y.on("change",Do),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=y.setBookmark(H,{insertLeft:!0}),Be.on(y.getInputField(),"keydown",Gs)),_.visualMode&&_n(y),yr(y,H,G)}},toggleVisualMode:function(y,T,_){var F=T.repeat,W=y.getCursor(),H;if(_.visualMode)_.visualLine^T.linewise||_.visualBlock^T.blockwise?(_.visualLine=!!T.linewise,_.visualBlock=!!T.blockwise,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Wn(y)):_n(y);else{_.visualMode=!0,_.visualLine=!!T.linewise,_.visualBlock=!!T.blockwise,H=se(y,new De(W.line,W.ch+F-1));var G=b(y,W,H);_.sel={anchor:G.start,head:G.end},Be.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Wn(y),en(y,_,"<",ft(W,H)),en(y,_,">",Zt(W,H))}},reselectLastSelection:function(y,T,_){var F=_.lastSelection;if(_.visualMode&&Nt(y,_),F){var W=F.anchorMark.find(),H=F.headMark.find();if(!W||!H)return;_.sel={anchor:W,head:H},_.visualMode=!0,_.visualLine=F.visualLine,_.visualBlock=F.visualBlock,Wn(y),en(y,_,"<",ft(W,H)),en(y,_,">",Zt(W,H)),Be.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(y,T,_){var F,W;if(_.visualMode){if(F=y.getCursor("anchor"),W=y.getCursor("head"),ot(W,F)){var H=W;W=F,F=H}W.ch=Kt(y,W.line)-1}else{var G=Math.max(T.repeat,2);F=y.getCursor(),W=se(y,new De(F.line+G-1,1/0))}for(var Y=0,Q=F.line;Q<W.line;Q++){Y=Kt(y,F.line);var re="",ae=0;if(!T.keepSpaces){var be=y.getLine(F.line+1);ae=be.search(/\S/),ae==-1?ae=be.length:re=" "}y.replaceRange(re,new De(F.line,Y),new De(F.line+1,ae))}var ke=se(y,new De(F.line,Y));_.visualMode&&_n(y,!1),y.setCursor(ke)},newLineAndEnterInsertMode:function(y,T,_){_.insertMode=!0;var F=qe(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=Kt(y,F.line),y.setCursor(F);var W=Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent;W(y)}this.enterInsertMode(y,{repeat:T.repeat},_)},paste:function(y,T,_){var F=this,W=Ue.registerController.getRegister(T.registerName),H=function(){var G=W.toString();F.continuePaste(y,T,_,G,W)};T.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(G){F.continuePaste(y,T,_,G,W)},function(){H()}):H()},continuePaste:function(y,T,_,F,W){var H=qe(y.getCursor());if(F){if(T.matchIndent){var G=y.getOption("tabSize"),Y=function(Nn){var V=Nn.split(" ").length-1,Z=Nn.split(" ").length-1;return V*G+Z*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),ae=F.replace(/\n$/,""),be=F!==ae,ke=Y(F.match(/^\s*/)[0]),F=ae.replace(/^\s*/gm,function(Nn){var V=re+(Y(Nn)-ke);if(V<0)return"";if(y.getOption("indentWithTabs")){var Z=Math.floor(V/G);return Array(Z+1).join(" ")}return Array(V+1).join(" ")});F+=be?`
1446
+ `:""}if(T.repeat>1)var F=Array(T.repeat+1).join(F);var ve=W.linewise,we=W.blockwise;if(we){F=F.split(`
1447
+ `),ve&&F.pop();for(var Oe=0;Oe<F.length;Oe++)F[Oe]=F[Oe]==""?" ":F[Oe];H.ch+=T.after?1:0,H.ch=Math.min(Kt(y,H.line),H.ch)}else ve?_.visualMode?F=_.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=Kt(y,H.line)):H.ch=0:H.ch+=T.after?1:0;var Re;if(_.visualMode){_.lastPastedText=F;var Ye,ut=Ge(y,_),et=ut[0],at=ut[1],Tn=y.getSelection(),ht=y.listSelections(),On=new Array(ht.length).join("1").split("1");_.lastSelection&&(Ye=_.lastSelection.headMark.find()),Ue.registerController.unnamedRegister.setText(Tn),we?(y.replaceSelections(On),at=new De(et.line+F.length-1,et.ch),y.setCursor(et),lr(y,at),y.replaceSelections(F),Re=et):_.visualBlock?(y.replaceSelections(On),y.setCursor(et),y.replaceRange(F,et,et),Re=et):(y.replaceRange(F,et,at),Re=y.posFromIndex(y.indexFromPos(et)+F.length-1)),Ye&&(_.lastSelection.headMark=y.setBookmark(Ye)),ve&&(Re.ch=0)}else if(we){y.setCursor(H);for(var Oe=0;Oe<F.length;Oe++){var St=H.line+Oe;St>y.lastLine()&&y.replaceRange(`
1451
+ `,new De(St,0));var Mt=Kt(y,St);Mt<H.ch&&Pn(y,St,H.ch)}y.setCursor(H),lr(y,new De(H.line+F.length-1,H.ch)),y.replaceSelections(F),Re=H}else if(y.replaceRange(F,H),ve){var St=T.after?H.line+1:H.line;Re=new De(St,Dt(y.getLine(St)))}else Re=qe(H),/\n/.test(F)||(Re.ch+=F.length-(T.after?1:0));_.visualMode&&_n(y,!1),y.setCursor(Re)}},undo:function(y,T){y.operation(function(){Je(y,Be.commands.undo,T.repeat)(),y.setCursor(se(y,y.getCursor("start")))})},redo:function(y,T){Je(y,Be.commands.redo,T.repeat)()},setRegister:function(y,T,_){_.inputState.registerName=T.selectedCharacter},insertRegister:function(y,T,_){var F=T.selectedCharacter,W=Ue.registerController.getRegister(F),H=W&&W.toString();H&&y.replaceSelection(H)},oneNormalCommand:function(y,T,_){gi(y,!0),_.insertModeReturn=!0,Be.on(y,"vim-command-done",function F(){_.visualMode||(_.insertModeReturn&&(_.insertModeReturn=!1,_.insertMode||Xn.enterInsertMode(y,{},_)),Be.off(y,"vim-command-done",F))})},setMark:function(y,T,_){var F=T.selectedCharacter;en(y,_,F,y.getCursor())},replace:function(y,T,_){var F=T.selectedCharacter,W=y.getCursor(),H,G,Y=y.listSelections();if(_.visualMode)W=y.getCursor("start"),G=y.getCursor("end");else{var Q=y.getLine(W.line);H=W.ch+T.repeat,H>Q.length&&(H=Q.length),G=new De(W.line,H)}var re=b(y,W,G);if(W=re.start,G=re.end,F==`
1452
+ `)_.visualMode||y.replaceRange("",W,G),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(y);else{var ae=y.getRange(W,G);if(ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),ae=ae.replace(/[^\n]/g,F),_.visualBlock){var be=new Array(y.getOption("tabSize")+1).join(" ");ae=y.getSelection(),ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),ae=ae.replace(/\t/g,be).replace(/[^\n]/g,F).split(`
1453
+ `),y.replaceSelections(ae)}else y.replaceRange(ae,W,G);_.visualMode?(W=ot(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(W),_n(y,!1)):y.setCursor(me(G,0,-1))}},incrementNumberToken:function(y,T){for(var _=y.getCursor(),F=y.getLine(_.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,H,G,Y,Q;(H=W.exec(F))!==null&&(G=H.index,Y=G+H[0].length,!(_.ch<Y)););if(!(!T.backtrack&&Y<=_.ch)&&H){var re=H[2]||H[4],ae=H[3]||H[5],be=T.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ve=parseInt(H[1]+ae,ke)+be*T.repeat;Q=ve.toString(ke);var we=re?new Array(ae.length-Q.length+1+H[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Oe=new De(_.line,G),Re=new De(_.line,Y);y.replaceRange(Q,Oe,Re),y.setCursor(new De(_.line,G+Q.length-1))}},repeatLastEdit:function(y,T,_){var F=_.lastEditInputState;if(F){var W=T.repeat;W&&T.repeatIsExplicit?_.lastEditInputState.repeatOverride=W:W=_.lastEditInputState.repeatOverride||W,Aa(y,_,W,!1)}},indent:function(y,T){y.indentLine(y.getCursor().line,T.indentRight)},exitInsertMode:gi},Ei={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Li={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}}};M("pcre",!0,"boolean"),$i.prototype={getQuery:function(){return Ue.query},setQuery:function(y){Ue.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return Ue.isReversed},setReversed:function(y){Ue.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var qi={"\\n":`
1454
+ `,"\\r":"\r","\\t":" "},$r={"\\/":"/","\\\\":"\\","\\n":`
1455
+ `,"\\r":"\r","\\t":" ","\\&":"&"},Tr=0,Ir=function(){this.buildCommandMap_()};Ir.prototype={processCommand:function(y,T,_){var F=this;y.operation(function(){y.curOp.isVimOp=!0,F._processCommand(y,T,_)})},_processCommand:function(y,T,_){var F=y.state.vim,W=Ue.registerController.getRegister(":"),H=W.toString(),G=new Be.StringStream(T);W.setText(T);var Y=_||{};Y.input=T;try{this.parseInput_(y,G,Y)}catch(ae){throw Ft(y,ae.toString()),ae}F.visualMode&&_n(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_(G,Y,Q),Q.type=="exToKey"){L(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){Ft(y,'Not an editor command ":'+T+'"');return}try{Ks[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(ae){throw Ft(y,ae.toString()),ae}},parseInput_:function(y,T,_){if(T.eatWhile(":"),T.eat("%")?(_.line=y.firstLine(),_.lineEnd=y.lastLine()):(_.line=this.parseLineSpec_(y,T),_.line!==void 0&&T.eat(",")&&(_.lineEnd=this.parseLineSpec_(y,T))),_.line==null)if(y.state.vim.visualMode){var F=an(y,y.state.vim,"<");_.selectionLine=F&&F.line,F=an(y,y.state.vim,">"),_.selectionLineEnd=F&&F.line}else _.selectionLine=y.getCursor().line;else _.selectionLine=_.line,_.selectionLineEnd=_.lineEnd;var W=T.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?_.commandName=W[1]:_.commandName=T.match(/.*/)[0],_},parseLineSpec_:function(y,T){var _=T.match(/^(\d+)/);if(_)return parseInt(_[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=an(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 _=y.match(/^([+-])?(\d+)/);if(_){var F=parseInt(_[2],10);_[1]=="-"?T-=F:T+=F}return T},parseCommandArgs_:function(y,T,_){if(!y.eol()){T.argString=y.match(/.*/)[0];var F=_.argDelimiter||/\s+/,W=Sr(T.argString).split(F);W.length&&W[0]&&(T.args=W)}},matchCommand_:function(y){for(var T=y.length;T>0;T--){var _=y.substring(0,T);if(this.commandMap_[_]){var F=this.commandMap_[_];if(F.name.indexOf(y)===0)return F}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<Mi.length;y++){var T=Mi[y],_=T.shortName||T.name;this.commandMap_[_]=T}},map:function(y,T,_,F){if(y!=":"&&y.charAt(0)==":"){if(_)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};_&&(H.context=_),Hn.unshift(H)}},unmap:function(y,T){if(y!=":"&&y.charAt(0)==":"){if(T)throw Error("Mode not supported for ex mappings");var _=y.substring(1);if(this.commandMap_[_]&&this.commandMap_[_].user)return delete this.commandMap_[_],!0}else for(var F=y,W=0;W<Hn.length;W++)if(F==Hn[W].keys&&Hn[W].context===T)return Hn.splice(W,1),!0}};var Ks={colorscheme:function(y,T){if(!T.args||T.args.length<1){Ft(y,y.getOption("theme"));return}y.setOption("theme",T.args[0])},map:function(y,T,_,F){var W=T.args;if(!W||W.length<2){y&&Ft(y,"Invalid mapping: "+T.input);return}Rr.map(W[0],W[1],_,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,_){var F=T.args;(!F||F.length<1||!Rr.unmap(F[0],_))&&y&&Ft(y,"No such mapping: "+T.input)},mapclear:function(y,T){xt.mapclear()},imapclear:function(y,T){xt.mapclear("insert")},nmapclear:function(y,T){xt.mapclear("normal")},vmapclear:function(y,T){xt.mapclear("visual")},omapclear:function(y,T){xt.mapclear("operatorPending")},move:function(y,T){Yn.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 _=T.args,F=T.setCfg||{};if(!_||_.length<1){y&&Ft(y,"Invalid mapping: "+T.input);return}var W=_[0].split("="),H=W[0],G=W[1],Y=!1,Q=!1;if(H.charAt(H.length-1)=="?"){if(G)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);G===void 0&&H.substring(0,2)=="no"&&(H=H.substring(2),G=!1);var re=Vt[H]&&Vt[H].type=="boolean";if(re&&(Q?G=!k(H,y,F):G==null&&(G=!0)),!re&&G===void 0||Y){var ae=k(H,y,F);ae instanceof Error?Ft(y,ae.message):ae===!0||ae===!1?Ft(y," "+(ae?"":"no")+H):Ft(y," "+H+"="+ae)}else{var be=$(H,G,y,F);be instanceof Error&&Ft(y,be.message)}},setlocal:function(y,T){T.setCfg={scope:"local"},this.set(y,T)},setglobal:function(y,T){T.setCfg={scope:"global"},this.set(y,T)},registers:function(y,T){var _=T.args,F=Ue.registerController.registers,W=`----------Registers----------
1456
+
1457
+ `;if(_){var H;_=_.join("");for(var G=0;G<_.length;G++)if(H=_.charAt(G),!!Ue.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
+ `)}Ft(y,W)},sort:function(y,T){function _(){if(T.argString){var St=new Be.StringStream(T.argString);if(St.eat("!")&&(H=!0),St.eol())return;if(!St.eatSpace())return"Invalid arguments";var Mt=St.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Mt&&!St.eol())return"Invalid arguments";if(Mt[1]){G=Mt[1].indexOf("i")!=-1,Y=Mt[1].indexOf("u")!=-1;var dr=Mt[1].indexOf("d")!=-1||Mt[1].indexOf("n")!=-1&&1,Mr=Mt[1].indexOf("x")!=-1&&1,Nn=Mt[1].indexOf("o")!=-1&&1;if(dr+Mr+Nn>1)return"Invalid arguments";Q=dr&&"decimal"||Mr&&"hex"||Nn&&"octal"}Mt[2]&&(re=new RegExp(Mt[2].substr(1,Mt[2].length-2),G?"i":""))}}function F(St,Mt){if(H){var dr;dr=St,St=Mt,Mt=dr}G&&(St=St.toLowerCase(),Mt=Mt.toLowerCase());var Mr=Q&&Re.exec(St),Nn=Q&&Re.exec(Mt);return Mr?(Mr=parseInt((Mr[1]+Mr[2]).toLowerCase(),Ye),Nn=parseInt((Nn[1]+Nn[2]).toLowerCase(),Ye),Mr-Nn):St<Mt?-1:1}function W(St,Mt){if(H){var dr;dr=St,St=Mt,Mt=dr}return G&&(St[0]=St[0].toLowerCase(),Mt[0]=Mt[0].toLowerCase()),St[0]<Mt[0]?-1:1}var H,G,Y,Q,re,ae=_();if(ae){Ft(y,ae+": "+T.argString);return}var be=T.line||y.firstLine(),ke=T.lineEnd||T.line||y.lastLine();if(be!=ke){var ve=new De(be,0),we=new De(ke,Kt(y,ke)),Oe=y.getRange(ve,we).split(`
1460
+ `),Re=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ye=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,ut=[],et=[];if(Q||re)for(var at=0;at<Oe.length;at++){var Tn=re?Oe[at].match(re):null;Tn&&Tn[0]!=""?ut.push(Tn):!re&&Re.exec(Oe[at])?ut.push(Oe[at]):et.push(Oe[at])}else et=Oe;if(ut.sort(re?W:F),re)for(var at=0;at<ut.length;at++)ut[at]=ut[at].input;else Q||et.sort(F);if(Oe=H?ut.concat(et):et.concat(ut),Y){var ht=Oe,On;Oe=[];for(var at=0;at<ht.length;at++)ht[at]!=On&&Oe.push(ht[at]),On=ht[at]}y.replaceRange(Oe.join(`
1461
+ `),ve,we)}},vglobal:function(y,T){this.global(y,T)},normal:function(y,T){var _=T.argString;if(_&&_[0]=="!"&&(_=_.slice(1),vn=!0),_=_.trimStart(),!_){Ft(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),L(y,T.argString.trimStart()),y.state.vim.insertMode&&gi(y,!0);else L(y,T.argString.trimStart()),y.state.vim.insertMode&&gi(y,!0)},global:function(y,T){var _=T.argString;if(!_){Ft(y,"Regular Expression missing from global");return}var F=T.commandName[0]==="v";_[0]==="!"&&T.commandName[0]==="g"&&(F=!0,_=_.slice(1));var W=T.line!==void 0?T.line:y.firstLine(),H=T.lineEnd||T.line||y.lastLine(),G=zn(_),Y=_,Q;if(G.length&&(Y=G[0],Q=G.slice(1,G.length).join("/")),Y)try{Ne(y,Y,!0,!0)}catch{Ft(y,"Invalid regex: "+Y);return}for(var re=sn(y).getQuery(),ae=[],be=W;be<=H;be++){var ke=y.getLine(be),ve=re.test(ke);ve!==F&&ae.push(Q?y.getLineHandle(be):ke)}if(!Q){Ft(y,ae.join(`
1462
+ `));return}var we=0,Oe=function(){if(we<ae.length){var Re=ae[we++],Ye=y.getLineNumber(Re);if(Ye==null){Oe();return}var ut=Ye+1+Q;Rr.processCommand(y,ut,{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 _=T.argString,F=_?di(_,_[0]):[],W,H="",G,Y,Q,re=!1,ae=!1;if(F.length)W=F[0],k("pcre")&&W!==""&&(W=new RegExp(W).source),H=F[1],H!==void 0&&(k("pcre")?H=os(H.replace(/([^\\])&/g,"$1$$&")):H=Qr(H),Ue.lastSubstituteReplacePart=H),G=F[2]?F[2].split(" "):[];else if(_&&_.length){Ft(y,"Substitutions should be of the form :s/pattern/replace/");return}if(G&&(Y=G[0],Q=parseInt(G[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(ae=!0),k("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{Ne(y,W,!0,!0)}catch{Ft(y,"Invalid regex: "+W);return}if(H=H||Ue.lastSubstituteReplacePart,H===void 0){Ft(y,"No previous substitute regular expression");return}var be=sn(y),ke=be.getQuery(),ve=T.line!==void 0?T.line:y.getCursor().line,we=T.lineEnd||ve;ve==y.firstLine()&&we==y.lastLine()&&(we=1/0),Q&&(ve=we,we=ve+Q-1);var Oe=se(y,new De(ve,0)),Re=y.getSearchCursor(ke,Oe);Co(y,re,ae,ve,we,Re,ke,H,T.callback)},startinsert:function(y,T){L(y,T.argString=="!"?"A":"i",{})},redo:Be.commands.redo,undo:Be.commands.undo,write:function(y){Be.commands.save?Be.commands.save(y):y.save&&y.save()},nohlsearch:function(y){ur(y)},yank:function(y){var T=qe(y.getCursor()),_=T.line,F=y.getLine(_);Ue.registerController.pushText("0","yank",F,!0,!0)},delete:function(y,T){var _=T.selectionLine,F=isNaN(T.selectionLineEnd)?_:T.selectionLineEnd;gs.delete(y,{linewise:!0},[{anchor:new De(_,0),head:new De(F+1,0)}])},join:function(y,T){var _=T.selectionLine,F=isNaN(T.selectionLineEnd)?_:T.selectionLineEnd;y.setCursor(new De(_,0)),Xn.joinLines(y,{repeat:F-_},y.state.vim)},delmarks:function(y,T){if(!T.argString||!Sr(T.argString)){Ft(y,"Argument required");return}for(var _=y.state.vim,F=new Be.StringStream(Sr(T.argString));!F.eol();){F.eatSpace();var W=F.pos;if(!F.match(/[a-zA-Z]/,!1)){Ft(y,"Invalid argument: "+T.argString.substring(W));return}var H=F.next();if(F.match("-",!0)){if(!F.match(/[a-zA-Z]/,!1)){Ft(y,"Invalid argument: "+T.argString.substring(W));return}var G=H,Y=F.next();if(!(l(G)&&l(Y)||c(G)&&c(Y))){Ft(y,"Invalid argument: "+G+"-");return}var Q=G.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Ft(y,"Invalid argument: "+T.argString.substring(W));return}for(var ae=0;ae<=re-Q;ae++){var be=String.fromCharCode(Q+ae);delete _.marks[be]}}else delete _.marks[H]}}},Rr=new Ir;M("insertModeEscKeysTimeout",200,"number"),Be.Vim=xt;var Br={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"},Ii=xt.handleKey.bind(xt);xt.handleKey=function(y,T,_){return y.operation(function(){return Ii(y,T,_)},!0)},N(),r.CodeMirror=Be;var Ri=xt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,T,_,F,W){var H=this.state.vim||{},G=_.characterWidth,Y=_.lineHeight,Q=T.top,re=T.left;if(!H.insertMode){var ae=F.cursor?Cr.comparePoints(F.cursor,F.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!ae&&re>G&&(re-=G)}!H.insertMode&&H.status&&(Y/=2,Q+=Y),co.translate(y,re,Q),co.setStyle(y.style,"width",G+"px"),co.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var T=y.state.cm,_=Ri(T);if(!_.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,T,_,F,W){var H=y.editor,G=H.state.cm,Y=Ri(G);if(F!=-1){if(Y.insertMode||(T==-1?(_.charCodeAt(0)>255&&y.inputKey&&(_=y.inputKey,_&&y.inputHash==4&&(_=_.toUpperCase())),y.inputChar=_):T==4||T==0?y.inputKey==_&&y.inputHash==T&&y.inputChar?(_=y.inputChar,T=-1):(y.inputChar=null,y.inputKey=_,y.inputHash=T):y.inputChar=y.inputKey=null),G.state.overwrite&&Y.insertMode&&_=="backspace"&&T==0)return{command:"gotoleft"};if(_=="c"&&T==1&&!Wo.isMac&&H.getCopyText())return H.once("copy",function(){Y.insertMode?H.selection.clearSelection():G.operation(function(){_n(G)})}),{command:"null",passEvent:!0};if(_=="esc"&&!Y.insertMode&&!Y.visualMode&&!G.ace.inMultiSelectMode){var Q=sn(G),re=Q.getOverlay();re&&G.removeOverlay(re)}if(T==-1||T&1||T===0&&_.length>1){var ae=Y.insertMode,be=qs(T,_,W||{},Y);Y.status==null&&(Y.status="");var ke=Fo(G,be,"user");return Y=Ri(G),ke&&Y.status!=null?Y.status+=be:Y.status==null&&(Y.status=""),G._signal("changeStatus"),!ke&&(T!=-1||ae)?void 0:{command:"null",passEvent:!ke}}}},attach:function(y){function T(){var F=Ri(_).insertMode;_.ace.renderer.setStyle("normal-mode",!F),y.textInput.setCommandMode(!F),y.renderer.$keepTextAreaAtCursor=F,y.renderer.$blockCursor=!F}y.state||(y.state={});var _=new Be(y);y.state.cm=_,y.$vimModeHandler=this,h(_),Ri(_).status=null,_.on("vim-command-done",function(){_.virtualSelectionMode()||(Ri(_).status=null,_.ace._signal("changeStatus"),_.ace.session.markUndoGroup())}),_.on("changeStatus",function(){_.ace.renderer.updateCursor(),_.ace._signal("changeStatus")}),_.on("vim-mode-change",function(){_.virtualSelectionMode()||(T(),_._signal("changeStatus"))}),T(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(_)},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,_=Ri(T);if(_.insertMode)return"INSERT";var F="";return _.visualMode&&(F+="VISUAL",_.visualLine&&(F+=" LINE"),_.visualBlock&&(F+=" BLOCK")),_.status&&(F+=(F?" ":"")+_.status),F}},xt.defineOption({name:"wrap",set:function(y,T){T&&T.ace.setOption("wrap",y)},type:"boolean"},!1),xt.defineEx("write","w",function(){console.log(":write is not implemented")}),Hn.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"}}),Hn.push({keys:"gq",type:"operator",operator:"hardWrap"}),xt.defineOperator("hardWrap",function(y,T,_,F,W){var H=_[0].anchor.line,G=_[0].head.line;return T.linewise&&G--,_o(y.ace,{startRow:H,endRow:G}),De(G,0)}),M("textwidth",void 0,"number",["tw"],function(y,T){if(T!==void 0){if(y===void 0){var _=T.ace.getOption("printMarginColumn");return _}var F=Math.round(y);F>1&&T.ace.setOption("printMarginColumn",F)}}),Xn.aceCommand=function(y,T,_){y.vimCmd=T,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",ji):ji(null,y.ace)},Xn.fold=function(y,T,_){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(T.all?2:0)+(T.open?1:0)])},zo=Hn.length,r.handler.defaultKeymap=Hn,r.handler.actions=Xn,r.Vim=xt}),function(){ace.require(["ace/keyboard/vim"],function(t){n&&(n.exports=t)})}()}(Gg)),Gg.exports}CS();var Kg={},Yg;function kS(){return Yg||(Yg=1,function(n){(function(){var e={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(b){return d(g(b),arguments)}function r(b,h){return t.apply(null,[b].concat(h||[]))}function d(b,h){var f=1,s=b.length,a,l="",u,i,c,m,w,x,M,$;for(u=0;u<s;u++)if(typeof b[u]=="string")l+=b[u];else if(typeof b[u]=="object"){if(c=b[u],c.keys)for(a=h[f],i=0;i<c.keys.length;i++){if(a==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',c.keys[i],c.keys[i-1]));a=a[c.keys[i]]}else c.param_no?a=h[c.param_no]:a=h[f++];if(e.not_type.test(c.type)&&e.not_primitive.test(c.type)&&a instanceof Function&&(a=a()),e.numeric_arg.test(c.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(t("[sprintf] expecting number but found %T",a));switch(e.number.test(c.type)&&(M=a>=0),c.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,c.width?parseInt(c.width):0);break;case"e":a=c.precision?parseFloat(a).toExponential(c.precision):parseFloat(a).toExponential();break;case"f":a=c.precision?parseFloat(a).toFixed(c.precision):parseFloat(a);break;case"g":a=c.precision?String(Number(a.toPrecision(c.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=c.precision?a.substring(0,c.precision):a;break;case"t":a=String(!!a),a=c.precision?a.substring(0,c.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=c.precision?a.substring(0,c.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=c.precision?a.substring(0,c.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}e.json.test(c.type)?l+=a:(e.number.test(c.type)&&(!M||c.sign)?($=M?"+":"-",a=a.toString().replace(e.sign,"")):$="",w=c.pad_char?c.pad_char==="0"?"0":c.pad_char.charAt(1):" ",x=c.width-($+a).length,m=c.width&&x>0?w.repeat(x):"",l+=c.align?$+a+m:w==="0"?$+m+a:m+$+a)}return l}var p=Object.create(null);function g(b){if(p[b])return p[b];for(var h=b,f,s=[],a=0;h;){if((f=e.text.exec(h))!==null)s.push(f[0]);else if((f=e.modulo.exec(h))!==null)s.push("%");else if((f=e.placeholder.exec(h))!==null){if(f[2]){a|=1;var l=[],u=f[2],i=[];if((i=e.key.exec(u))!==null)for(l.push(i[1]);(u=u.substring(i[0].length))!=="";)if((i=e.key_access.exec(u))!==null)l.push(i[1]);else if((i=e.index_access.exec(u))!==null)l.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]=l}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 p[b]=s}n.sprintf=t,n.vsprintf=r,typeof window<"u"&&(window.sprintf=t,window.vsprintf=r)})()}(Kg)),Kg}kS();var Jl={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 SS=Jl.exports,Xg;function _S(){return Xg||(Xg=1,function(n,e){(function(){var t,r="4.17.21",d=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",b="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",f=500,s="__lodash_placeholder__",a=1,l=2,u=4,i=1,c=2,m=1,w=2,x=4,M=8,$=16,k=32,C=64,R=128,N=256,I=512,L=30,B="...",P=800,O=16,A=1,S=2,D=3,z=1/0,U=9007199254740991,K=17976931348623157e292,X=NaN,ee=4294967295,de=ee-1,te=ee>>>1,le=[["ary",R],["bind",m],["bindKey",w],["curry",M],["curryRight",$],["flip",I],["partial",k],["partialRight",C],["rearg",N]],se="[object Arguments]",ue="[object Array]",me="[object AsyncFunction]",Ae="[object Boolean]",Te="[object Date]",Me="[object DOMException]",Je="[object Error]",qe="[object Function]",pt="[object GeneratorFunction]",ot="[object Map]",ft="[object Number]",Zt="[object Null]",gn="[object Object]",Kt="[object Promise]",Sr="[object Proxy]",Sn="[object RegExp]",Pn="[object Set]",lr="[object String]",yr="[object Symbol]",mt="[object Undefined]",Ge="[object WeakMap]",Nt="[object WeakSet]",mn="[object ArrayBuffer]",Wn="[object DataView]",_r="[object Float32Array]",cr="[object Float64Array]",_n="[object Int8Array]",In="[object Int16Array]",Bn="[object Int32Array]",Dt="[object Uint8Array]",An="[object Uint8ClampedArray]",_i="[object Uint16Array]",Yr="[object Uint32Array]",Ai=/\b__p \+= '';/g,Pr=/\b(__p \+=) '' \+/g,hi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,br=/&(?:amp|lt|gt|quot|#39);/g,Xr=/[&<>"']/g,xo=RegExp(br.source),Hs=RegExp(Xr.source),en=/<%-([\s\S]+?)%>/g,zi=/<%([\s\S]+?)%>/g,Ro=/<%=([\s\S]+?)%>/g,Oo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zr=/^\w*$/,Rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wr=/[\\^$.*+?()[\]{}|]/g,$i=RegExp(wr.source),sn=/^\s+/,zn=/\s/,Ti=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,di=/\{\n\/\* \[wrapped with (.+)\] \*/,lo=/,? & /,No=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qr=/[()=,{}\[\]\/\s]/,os=/\\(\\)?/g,pi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wr=/\w*$/,Ft=/^[-+]0x[0-9a-f]+$/i,ss=/^0b[01]+$/i,he=/^\[object .+?Constructor\]$/,je=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hn=/($^)/,Pt=/['\n\r\u2028\u2029\\]/g,qn="\\ud800-\\udfff",ur="\\u0300-\\u036f",Ar="\\ufe20-\\ufe2f",fi="\\u20d0-\\u20ff",an=ur+Ar+fi,Hi="\\u2700-\\u27bf",Co="a-z\\xdf-\\xf6\\xf8-\\xff",gi="\\xac\\xb1\\xd7\\xf7",as="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",js="\\u2000-\\u206f",Us=" \\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",ls="A-Z\\xc0-\\xd6\\xd8-\\xde",xr="\\ufe0e\\ufe0f",Vs=gi+as+js+Us,Do="['’]",cs="["+qn+"]",us="["+Vs+"]",ko="["+an+"]",Gs="\\d+",Aa="["+Hi+"]",hs="["+Co+"]",ds="[^"+qn+Vs+Gs+Hi+Co+ls+"]",qs="\\ud83c[\\udffb-\\udfff]",ps="(?:"+ko+"|"+qs+")",Fo="[^"+qn+"]",ji="(?:\\ud83c[\\udde6-\\uddff]){2}",Cr="[\\ud800-\\udbff][\\udc00-\\udfff]",So="["+ls+"]",co="\\u200d",$a="(?:"+hs+"|"+ds+")",yl="(?:"+So+"|"+ds+")",Po="(?:"+Do+"(?:d|ll|m|re|s|t|ve))?",uo="(?:"+Do+"(?:D|LL|M|RE|S|T|VE))?",Wo=ps+"?",fs="["+xr+"]?",Bo="(?:"+co+"(?:"+[Fo,ji,Cr].join("|")+")"+fs+Wo+")*",Ta="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_o="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=fs+Wo+Bo,Ma="(?:"+[Aa,ji,Cr].join("|")+")"+Be,De="(?:"+[Fo+ko+"?",ko,ji,Cr,cs].join("|")+")",Hn=RegExp(Do,"g"),zo=RegExp(ko,"g"),Mi=RegExp(qs+"(?="+qs+")|"+De+Be,"g"),rr=RegExp([So+"?"+hs+"+"+Po+"(?="+[us,So,"$"].join("|")+")",yl+"+"+uo+"(?="+[us,So+$a,"$"].join("|")+")",So+"?"+$a+"+"+Po,So+"+"+uo,_o,Ta,Gs,Ma].join("|"),"g"),Ea=RegExp("["+co+qn+an+xr+"]"),Ho=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ui=["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"],Ao=-1,ln={};ln[_r]=ln[cr]=ln[_n]=ln[In]=ln[Bn]=ln[Dt]=ln[An]=ln[_i]=ln[Yr]=!0,ln[se]=ln[ue]=ln[mn]=ln[Ae]=ln[Wn]=ln[Te]=ln[Je]=ln[qe]=ln[ot]=ln[ft]=ln[gn]=ln[Sn]=ln[Pn]=ln[lr]=ln[Ge]=!1;var tn={};tn[se]=tn[ue]=tn[mn]=tn[Wn]=tn[Ae]=tn[Te]=tn[_r]=tn[cr]=tn[_n]=tn[In]=tn[Bn]=tn[ot]=tn[ft]=tn[gn]=tn[Sn]=tn[Pn]=tn[lr]=tn[yr]=tn[Dt]=tn[An]=tn[_i]=tn[Yr]=!0,tn[Je]=tn[qe]=tn[Ge]=!1;var cn={À:"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"},Vt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vi={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Kn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,$n=parseInt,xt=typeof ns=="object"&&ns&&ns.Object===Object&&ns,Jr=typeof self=="object"&&self&&self.Object===Object&&self,vn=xt||Jr||Function("return this")(),En=e&&!e.nodeType&&e,hr=En&&!0&&n&&!n.nodeType&&n,ei=hr&&hr.exports===En,Gi=ei&&xt.process,Yn=function(){try{var fe=hr&&hr.require&&hr.require("util").types;return fe||Gi&&Gi.binding&&Gi.binding("util")}catch{}}(),mi=Yn&&Yn.isArrayBuffer,gs=Yn&&Yn.isDate,Xn=Yn&&Yn.isMap,Ei=Yn&&Yn.isRegExp,Li=Yn&&Yn.isSet,qi=Yn&&Yn.isTypedArray;function $r(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 Tr(fe,$e,Ce,Ke){for(var dt=-1,Et=fe==null?0:fe.length;++dt<Et;){var Qt=fe[dt];$e(Ke,Qt,Ce(Qt),fe)}return Ke}function Ir(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length;++Ce<Ke&&$e(fe[Ce],Ce,fe)!==!1;);return fe}function Ks(fe,$e){for(var Ce=fe==null?0:fe.length;Ce--&&$e(fe[Ce],Ce,fe)!==!1;);return fe}function Rr(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length;++Ce<Ke;)if(!$e(fe[Ce],Ce,fe))return!1;return!0}function Br(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length,dt=0,Et=[];++Ce<Ke;){var Qt=fe[Ce];$e(Qt,Ce,fe)&&(Et[dt++]=Qt)}return Et}function Ii(fe,$e){var Ce=fe==null?0:fe.length;return!!Ce&&ae(fe,$e,0)>-1}function Ri(fe,$e,Ce){for(var Ke=-1,dt=fe==null?0:fe.length;++Ke<dt;)if(Ce($e,fe[Ke]))return!0;return!1}function y(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length,dt=Array(Ke);++Ce<Ke;)dt[Ce]=$e(fe[Ce],Ce,fe);return dt}function T(fe,$e){for(var Ce=-1,Ke=$e.length,dt=fe.length;++Ce<Ke;)fe[dt+Ce]=$e[Ce];return fe}function _(fe,$e,Ce,Ke){var dt=-1,Et=fe==null?0:fe.length;for(Ke&&Et&&(Ce=fe[++dt]);++dt<Et;)Ce=$e(Ce,fe[dt],dt,fe);return Ce}function F(fe,$e,Ce,Ke){var dt=fe==null?0:fe.length;for(Ke&&dt&&(Ce=fe[--dt]);dt--;)Ce=$e(Ce,fe[dt],dt,fe);return Ce}function W(fe,$e){for(var Ce=-1,Ke=fe==null?0:fe.length;++Ce<Ke;)if($e(fe[Ce],Ce,fe))return!0;return!1}var H=we("length");function G(fe){return fe.split("")}function Y(fe){return fe.match(No)||[]}function Q(fe,$e,Ce){var Ke;return Ce(fe,function(dt,Et,Qt){if($e(dt,Et,Qt))return Ke=Et,!1}),Ke}function re(fe,$e,Ce,Ke){for(var dt=fe.length,Et=Ce+(Ke?1:-1);Ke?Et--:++Et<dt;)if($e(fe[Et],Et,fe))return Et;return-1}function ae(fe,$e,Ce){return $e===$e?tt(fe,$e,Ce):re(fe,ke,Ce)}function be(fe,$e,Ce,Ke){for(var dt=Ce-1,Et=fe.length;++dt<Et;)if(Ke(fe[dt],$e))return dt;return-1}function ke(fe){return fe!==fe}function ve(fe,$e){var Ce=fe==null?0:fe.length;return Ce?ut(fe,$e)/Ce:X}function we(fe){return function($e){return $e==null?t:$e[fe]}}function Oe(fe){return function($e){return fe==null?t:fe[$e]}}function Re(fe,$e,Ce,Ke,dt){return dt(fe,function(Et,Qt,Rt){Ce=Ke?(Ke=!1,Et):$e(Ce,Et,Qt,Rt)}),Ce}function Ye(fe,$e){var Ce=fe.length;for(fe.sort($e);Ce--;)fe[Ce]=fe[Ce].value;return fe}function ut(fe,$e){for(var Ce,Ke=-1,dt=fe.length;++Ke<dt;){var Et=$e(fe[Ke]);Et!==t&&(Ce=Ce===t?Et:Ce+Et)}return Ce}function et(fe,$e){for(var Ce=-1,Ke=Array(fe);++Ce<fe;)Ke[Ce]=$e(Ce);return Ke}function at(fe,$e){return y($e,function(Ce){return[Ce,fe[Ce]]})}function Tn(fe){return fe&&fe.slice(0,Wt(fe)+1).replace(sn,"")}function ht(fe){return function($e){return fe($e)}}function On(fe,$e){return y($e,function(Ce){return fe[Ce]})}function St(fe,$e){return fe.has($e)}function Mt(fe,$e){for(var Ce=-1,Ke=fe.length;++Ce<Ke&&ae($e,fe[Ce],0)>-1;);return Ce}function dr(fe,$e){for(var Ce=fe.length;Ce--&&ae($e,fe[Ce],0)>-1;);return Ce}function Mr(fe,$e){for(var Ce=fe.length,Ke=0;Ce--;)fe[Ce]===$e&&++Ke;return Ke}var Nn=Oe(cn),V=Oe(Vt);function Z(fe){return"\\"+Kn[fe]}function ie(fe,$e){return fe==null?t:fe[$e]}function oe(fe){return Ea.test(fe)}function ge(fe){return Ho.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(Ke,dt){Ce[++$e]=[dt,Ke]}),Ce}function We(fe,$e){return function(Ce){return fe($e(Ce))}}function ze(fe,$e){for(var Ce=-1,Ke=fe.length,dt=0,Et=[];++Ce<Ke;){var Qt=fe[Ce];(Qt===$e||Qt===s)&&(fe[Ce]=s,Et[dt++]=Ce)}return Et}function Xe(fe){var $e=-1,Ce=Array(fe.size);return fe.forEach(function(Ke){Ce[++$e]=Ke}),Ce}function Qe(fe){var $e=-1,Ce=Array(fe.size);return fe.forEach(function(Ke){Ce[++$e]=[Ke,Ke]}),Ce}function tt(fe,$e,Ce){for(var Ke=Ce-1,dt=fe.length;++Ke<dt;)if(fe[Ke]===$e)return Ke;return-1}function Ct(fe,$e,Ce){for(var Ke=Ce+1;Ke--;)if(fe[Ke]===$e)return Ke;return Ke}function zt(fe){return oe(fe)?ct(fe):H(fe)}function _t(fe){return oe(fe)?xn(fe):G(fe)}function Wt(fe){for(var $e=fe.length;$e--&&zn.test(fe.charAt($e)););return $e}var vt=Oe(Vi);function ct(fe){for(var $e=Mi.lastIndex=0;Mi.test(fe);)++$e;return $e}function xn(fe){return fe.match(Mi)||[]}function Dn(fe){return fe.match(rr)||[]}var pr=function fe($e){$e=$e==null?vn:Yt.defaults(vn.Object(),$e,Yt.pick(vn,Ui));var Ce=$e.Array,Ke=$e.Date,dt=$e.Error,Et=$e.Function,Qt=$e.Math,Rt=$e.Object,ti=$e.RegExp,Ki=$e.String,yn=$e.TypeError,Er=Ce.prototype,jo=Et.prototype,Zn=Rt.prototype,Ys=$e["__core-js_shared__"],jc=jo.toString,fn=Zn.hasOwnProperty,OI=0,v0=function(){var o=/[^.]+$/.exec(Ys&&Ys.keys&&Ys.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Uc=Zn.toString,NI=jc.call(Rt),DI=vn._,FI=ti("^"+jc.call(fn).replace(wr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vc=ei?$e.Buffer:t,ms=$e.Symbol,Gc=$e.Uint8Array,y0=Vc?Vc.allocUnsafe:t,qc=We(Rt.getPrototypeOf,Rt),b0=Rt.create,w0=Zn.propertyIsEnumerable,Kc=Er.splice,x0=ms?ms.isConcatSpreadable:t,bl=ms?ms.iterator:t,Xs=ms?ms.toStringTag:t,Yc=function(){try{var o=ta(Rt,"defineProperty");return o({},"",{}),o}catch{}}(),PI=$e.clearTimeout!==vn.clearTimeout&&$e.clearTimeout,WI=Ke&&Ke.now!==vn.Date.now&&Ke.now,BI=$e.setTimeout!==vn.setTimeout&&$e.setTimeout,Xc=Qt.ceil,Zc=Qt.floor,Yd=Rt.getOwnPropertySymbols,zI=Vc?Vc.isBuffer:t,C0=$e.isFinite,HI=Er.join,jI=We(Rt.keys,Rt),kr=Qt.max,zr=Qt.min,UI=Ke.now,VI=$e.parseInt,k0=Qt.random,GI=Er.reverse,Xd=ta($e,"DataView"),wl=ta($e,"Map"),Zd=ta($e,"Promise"),La=ta($e,"Set"),xl=ta($e,"WeakMap"),Cl=ta(Rt,"create"),Qc=xl&&new xl,Ia={},qI=na(Xd),KI=na(wl),YI=na(Zd),XI=na(La),ZI=na(xl),Jc=ms?ms.prototype:t,kl=Jc?Jc.valueOf:t,S0=Jc?Jc.toString:t;function J(o){if(Qn(o)&&!At(o)&&!(o instanceof Gt)){if(o instanceof Yi)return o;if(fn.call(o,"__wrapped__"))return _w(o)}return new Yi(o)}var Ra=function(){function o(){}return function(v){if(!jn(v))return{};if(b0)return b0(v);o.prototype=v;var E=new o;return o.prototype=t,E}}();function eu(){}function Yi(o,v){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=t}J.templateSettings={escape:en,evaluate:zi,interpolate:Ro,variable:"",imports:{_:J}},J.prototype=eu.prototype,J.prototype.constructor=J,Yi.prototype=Ra(eu.prototype),Yi.prototype.constructor=Yi;function Gt(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function QI(){var o=new Gt(this.__wrapped__);return o.__actions__=vi(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=vi(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=vi(this.__views__),o}function JI(){if(this.__filtered__){var o=new Gt(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function eR(){var o=this.__wrapped__.value(),v=this.__dir__,E=At(o),j=v<0,q=E?o.length:0,ne=dO(0,q,this.__views__),ce=ne.start,pe=ne.end,ye=pe-ce,Le=j?pe:ce-1,Ie=this.__iteratees__,Fe=Ie.length,Ze=0,lt=zr(ye,this.__takeCount__);if(!E||!j&&q==ye&&lt==ye)return K0(o,this.__actions__);var bt=[];e:for(;ye--&&Ze<lt;){Le+=v;for(var Ot=-1,wt=o[Le];++Ot<Fe;){var jt=Ie[Ot],Xt=jt.iteratee,Di=jt.type,ii=Xt(wt);if(Di==S)wt=ii;else if(!ii){if(Di==A)continue e;break e}}bt[Ze++]=wt}return bt}Gt.prototype=Ra(eu.prototype),Gt.prototype.constructor=Gt;function Zs(o){var v=-1,E=o==null?0:o.length;for(this.clear();++v<E;){var j=o[v];this.set(j[0],j[1])}}function tR(){this.__data__=Cl?Cl(null):{},this.size=0}function nR(o){var v=this.has(o)&&delete this.__data__[o];return this.size-=v?1:0,v}function rR(o){var v=this.__data__;if(Cl){var E=v[o];return E===h?t:E}return fn.call(v,o)?v[o]:t}function iR(o){var v=this.__data__;return Cl?v[o]!==t:fn.call(v,o)}function oR(o,v){var E=this.__data__;return this.size+=this.has(o)?0:1,E[o]=Cl&&v===t?h:v,this}Zs.prototype.clear=tR,Zs.prototype.delete=nR,Zs.prototype.get=rR,Zs.prototype.has=iR,Zs.prototype.set=oR;function Uo(o){var v=-1,E=o==null?0:o.length;for(this.clear();++v<E;){var j=o[v];this.set(j[0],j[1])}}function sR(){this.__data__=[],this.size=0}function aR(o){var v=this.__data__,E=tu(v,o);if(E<0)return!1;var j=v.length-1;return E==j?v.pop():Kc.call(v,E,1),--this.size,!0}function lR(o){var v=this.__data__,E=tu(v,o);return E<0?t:v[E][1]}function cR(o){return tu(this.__data__,o)>-1}function uR(o,v){var E=this.__data__,j=tu(E,o);return j<0?(++this.size,E.push([o,v])):E[j][1]=v,this}Uo.prototype.clear=sR,Uo.prototype.delete=aR,Uo.prototype.get=lR,Uo.prototype.has=cR,Uo.prototype.set=uR;function Vo(o){var v=-1,E=o==null?0:o.length;for(this.clear();++v<E;){var j=o[v];this.set(j[0],j[1])}}function hR(){this.size=0,this.__data__={hash:new Zs,map:new(wl||Uo),string:new Zs}}function dR(o){var v=pu(this,o).delete(o);return this.size-=v?1:0,v}function pR(o){return pu(this,o).get(o)}function fR(o){return pu(this,o).has(o)}function gR(o,v){var E=pu(this,o),j=E.size;return E.set(o,v),this.size+=E.size==j?0:1,this}Vo.prototype.clear=hR,Vo.prototype.delete=dR,Vo.prototype.get=pR,Vo.prototype.has=fR,Vo.prototype.set=gR;function Qs(o){var v=-1,E=o==null?0:o.length;for(this.__data__=new Vo;++v<E;)this.add(o[v])}function mR(o){return this.__data__.set(o,h),this}function vR(o){return this.__data__.has(o)}Qs.prototype.add=Qs.prototype.push=mR,Qs.prototype.has=vR;function ho(o){var v=this.__data__=new Uo(o);this.size=v.size}function yR(){this.__data__=new Uo,this.size=0}function bR(o){var v=this.__data__,E=v.delete(o);return this.size=v.size,E}function wR(o){return this.__data__.get(o)}function xR(o){return this.__data__.has(o)}function CR(o,v){var E=this.__data__;if(E instanceof Uo){var j=E.__data__;if(!wl||j.length<d-1)return j.push([o,v]),this.size=++E.size,this;E=this.__data__=new Vo(j)}return E.set(o,v),this.size=E.size,this}ho.prototype.clear=yR,ho.prototype.delete=bR,ho.prototype.get=wR,ho.prototype.has=xR,ho.prototype.set=CR;function _0(o,v){var E=At(o),j=!E&&ra(o),q=!E&&!j&&xs(o),ne=!E&&!j&&!q&&Fa(o),ce=E||j||q||ne,pe=ce?et(o.length,Ki):[],ye=pe.length;for(var Le in o)(v||fn.call(o,Le))&&!(ce&&(Le=="length"||q&&(Le=="offset"||Le=="parent")||ne&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||Yo(Le,ye)))&&pe.push(Le);return pe}function A0(o){var v=o.length;return v?o[lp(0,v-1)]:t}function kR(o,v){return fu(vi(o),Js(v,0,o.length))}function SR(o){return fu(vi(o))}function Qd(o,v,E){(E!==t&&!po(o[v],E)||E===t&&!(v in o))&&Go(o,v,E)}function Sl(o,v,E){var j=o[v];(!(fn.call(o,v)&&po(j,E))||E===t&&!(v in o))&&Go(o,v,E)}function tu(o,v){for(var E=o.length;E--;)if(po(o[E][0],v))return E;return-1}function _R(o,v,E,j){return vs(o,function(q,ne,ce){v(j,q,E(q),ce)}),j}function $0(o,v){return o&&To(v,Lr(v),o)}function AR(o,v){return o&&To(v,bi(v),o)}function Go(o,v,E){v=="__proto__"&&Yc?Yc(o,v,{configurable:!0,enumerable:!0,value:E,writable:!0}):o[v]=E}function Jd(o,v){for(var E=-1,j=v.length,q=Ce(j),ne=o==null;++E<j;)q[E]=ne?t:Rp(o,v[E]);return q}function Js(o,v,E){return o===o&&(E!==t&&(o=o<=E?o:E),v!==t&&(o=o>=v?o:v)),o}function Xi(o,v,E,j,q,ne){var ce,pe=v&a,ye=v&l,Le=v&u;if(E&&(ce=q?E(o,j,q,ne):E(o)),ce!==t)return ce;if(!jn(o))return o;var Ie=At(o);if(Ie){if(ce=fO(o),!pe)return vi(o,ce)}else{var Fe=Hr(o),Ze=Fe==qe||Fe==pt;if(xs(o))return Z0(o,pe);if(Fe==gn||Fe==se||Ze&&!q){if(ce=ye||Ze?{}:mw(o),!pe)return ye?rO(o,AR(ce,o)):nO(o,$0(ce,o))}else{if(!tn[Fe])return q?o:{};ce=gO(o,Fe,pe)}}ne||(ne=new ho);var lt=ne.get(o);if(lt)return lt;ne.set(o,ce),Vw(o)?o.forEach(function(wt){ce.add(Xi(wt,v,E,wt,o,ne))}):jw(o)&&o.forEach(function(wt,jt){ce.set(jt,Xi(wt,v,E,jt,o,ne))});var bt=Le?ye?bp:yp:ye?bi:Lr,Ot=Ie?t:bt(o);return Ir(Ot||o,function(wt,jt){Ot&&(jt=wt,wt=o[jt]),Sl(ce,jt,Xi(wt,v,E,jt,o,ne))}),ce}function $R(o){var v=Lr(o);return function(E){return T0(E,o,v)}}function T0(o,v,E){var j=E.length;if(o==null)return!j;for(o=Rt(o);j--;){var q=E[j],ne=v[q],ce=o[q];if(ce===t&&!(q in o)||!ne(ce))return!1}return!0}function M0(o,v,E){if(typeof o!="function")throw new yn(g);return Ll(function(){o.apply(t,E)},v)}function _l(o,v,E,j){var q=-1,ne=Ii,ce=!0,pe=o.length,ye=[],Le=v.length;if(!pe)return ye;E&&(v=y(v,ht(E))),j?(ne=Ri,ce=!1):v.length>=d&&(ne=St,ce=!1,v=new Qs(v));e:for(;++q<pe;){var Ie=o[q],Fe=E==null?Ie:E(Ie);if(Ie=j||Ie!==0?Ie:0,ce&&Fe===Fe){for(var Ze=Le;Ze--;)if(v[Ze]===Fe)continue e;ye.push(Ie)}else ne(v,Fe,j)||ye.push(Ie)}return ye}var vs=nw($o),E0=nw(tp,!0);function TR(o,v){var E=!0;return vs(o,function(j,q,ne){return E=!!v(j,q,ne),E}),E}function nu(o,v,E){for(var j=-1,q=o.length;++j<q;){var ne=o[j],ce=v(ne);if(ce!=null&&(pe===t?ce===ce&&!Ni(ce):E(ce,pe)))var pe=ce,ye=ne}return ye}function MR(o,v,E,j){var q=o.length;for(E=Lt(E),E<0&&(E=-E>q?0:q+E),j=j===t||j>q?q:Lt(j),j<0&&(j+=q),j=E>j?0:qw(j);E<j;)o[E++]=v;return o}function L0(o,v){var E=[];return vs(o,function(j,q,ne){v(j,q,ne)&&E.push(j)}),E}function Or(o,v,E,j,q){var ne=-1,ce=o.length;for(E||(E=vO),q||(q=[]);++ne<ce;){var pe=o[ne];v>0&&E(pe)?v>1?Or(pe,v-1,E,j,q):T(q,pe):j||(q[q.length]=pe)}return q}var ep=rw(),I0=rw(!0);function $o(o,v){return o&&ep(o,v,Lr)}function tp(o,v){return o&&I0(o,v,Lr)}function ru(o,v){return Br(v,function(E){return Xo(o[E])})}function ea(o,v){v=bs(v,o);for(var E=0,j=v.length;o!=null&&E<j;)o=o[Mo(v[E++])];return E&&E==j?o:t}function R0(o,v,E){var j=v(o);return At(o)?j:T(j,E(o))}function ni(o){return o==null?o===t?mt:Zt:Xs&&Xs in Rt(o)?hO(o):SO(o)}function np(o,v){return o>v}function ER(o,v){return o!=null&&fn.call(o,v)}function LR(o,v){return o!=null&&v in Rt(o)}function IR(o,v,E){return o>=zr(v,E)&&o<kr(v,E)}function rp(o,v,E){for(var j=E?Ri:Ii,q=o[0].length,ne=o.length,ce=ne,pe=Ce(ne),ye=1/0,Le=[];ce--;){var Ie=o[ce];ce&&v&&(Ie=y(Ie,ht(v))),ye=zr(Ie.length,ye),pe[ce]=!E&&(v||q>=120&&Ie.length>=120)?new Qs(ce&&Ie):t}Ie=o[0];var Fe=-1,Ze=pe[0];e:for(;++Fe<q&&Le.length<ye;){var lt=Ie[Fe],bt=v?v(lt):lt;if(lt=E||lt!==0?lt:0,!(Ze?St(Ze,bt):j(Le,bt,E))){for(ce=ne;--ce;){var Ot=pe[ce];if(!(Ot?St(Ot,bt):j(o[ce],bt,E)))continue e}Ze&&Ze.push(bt),Le.push(lt)}}return Le}function RR(o,v,E,j){return $o(o,function(q,ne,ce){v(j,E(q),ne,ce)}),j}function Al(o,v,E){v=bs(v,o),o=ww(o,v);var j=o==null?o:o[Mo(Qi(v))];return j==null?t:$r(j,o,E)}function O0(o){return Qn(o)&&ni(o)==se}function OR(o){return Qn(o)&&ni(o)==mn}function NR(o){return Qn(o)&&ni(o)==Te}function $l(o,v,E,j,q){return o===v?!0:o==null||v==null||!Qn(o)&&!Qn(v)?o!==o&&v!==v:DR(o,v,E,j,$l,q)}function DR(o,v,E,j,q,ne){var ce=At(o),pe=At(v),ye=ce?ue:Hr(o),Le=pe?ue:Hr(v);ye=ye==se?gn:ye,Le=Le==se?gn:Le;var Ie=ye==gn,Fe=Le==gn,Ze=ye==Le;if(Ze&&xs(o)){if(!xs(v))return!1;ce=!0,Ie=!1}if(Ze&&!Ie)return ne||(ne=new ho),ce||Fa(o)?pw(o,v,E,j,q,ne):cO(o,v,ye,E,j,q,ne);if(!(E&i)){var lt=Ie&&fn.call(o,"__wrapped__"),bt=Fe&&fn.call(v,"__wrapped__");if(lt||bt){var Ot=lt?o.value():o,wt=bt?v.value():v;return ne||(ne=new ho),q(Ot,wt,E,j,ne)}}return Ze?(ne||(ne=new ho),uO(o,v,E,j,q,ne)):!1}function FR(o){return Qn(o)&&Hr(o)==ot}function ip(o,v,E,j){var q=E.length,ne=q,ce=!j;if(o==null)return!ne;for(o=Rt(o);q--;){var pe=E[q];if(ce&&pe[2]?pe[1]!==o[pe[0]]:!(pe[0]in o))return!1}for(;++q<ne;){pe=E[q];var ye=pe[0],Le=o[ye],Ie=pe[1];if(ce&&pe[2]){if(Le===t&&!(ye in o))return!1}else{var Fe=new ho;if(j)var Ze=j(Le,Ie,ye,o,v,Fe);if(!(Ze===t?$l(Ie,Le,i|c,j,Fe):Ze))return!1}}return!0}function N0(o){if(!jn(o)||bO(o))return!1;var v=Xo(o)?FI:he;return v.test(na(o))}function PR(o){return Qn(o)&&ni(o)==Sn}function WR(o){return Qn(o)&&Hr(o)==Pn}function BR(o){return Qn(o)&&wu(o.length)&&!!ln[ni(o)]}function D0(o){return typeof o=="function"?o:o==null?wi:typeof o=="object"?At(o)?W0(o[0],o[1]):P0(o):ix(o)}function op(o){if(!El(o))return jI(o);var v=[];for(var E in Rt(o))fn.call(o,E)&&E!="constructor"&&v.push(E);return v}function zR(o){if(!jn(o))return kO(o);var v=El(o),E=[];for(var j in o)j=="constructor"&&(v||!fn.call(o,j))||E.push(j);return E}function sp(o,v){return o<v}function F0(o,v){var E=-1,j=yi(o)?Ce(o.length):[];return vs(o,function(q,ne,ce){j[++E]=v(q,ne,ce)}),j}function P0(o){var v=xp(o);return v.length==1&&v[0][2]?yw(v[0][0],v[0][1]):function(E){return E===o||ip(E,o,v)}}function W0(o,v){return kp(o)&&vw(v)?yw(Mo(o),v):function(E){var j=Rp(E,o);return j===t&&j===v?Op(E,o):$l(v,j,i|c)}}function iu(o,v,E,j,q){o!==v&&ep(v,function(ne,ce){if(q||(q=new ho),jn(ne))HR(o,v,ce,E,iu,j,q);else{var pe=j?j(_p(o,ce),ne,ce+"",o,v,q):t;pe===t&&(pe=ne),Qd(o,ce,pe)}},bi)}function HR(o,v,E,j,q,ne,ce){var pe=_p(o,E),ye=_p(v,E),Le=ce.get(ye);if(Le){Qd(o,E,Le);return}var Ie=ne?ne(pe,ye,E+"",o,v,ce):t,Fe=Ie===t;if(Fe){var Ze=At(ye),lt=!Ze&&xs(ye),bt=!Ze&&!lt&&Fa(ye);Ie=ye,Ze||lt||bt?At(pe)?Ie=pe:ir(pe)?Ie=vi(pe):lt?(Fe=!1,Ie=Z0(ye,!0)):bt?(Fe=!1,Ie=Q0(ye,!0)):Ie=[]:Il(ye)||ra(ye)?(Ie=pe,ra(pe)?Ie=Kw(pe):(!jn(pe)||Xo(pe))&&(Ie=mw(ye))):Fe=!1}Fe&&(ce.set(ye,Ie),q(Ie,ye,j,ne,ce),ce.delete(ye)),Qd(o,E,Ie)}function B0(o,v){var E=o.length;if(E)return v+=v<0?E:0,Yo(v,E)?o[v]:t}function z0(o,v,E){v.length?v=y(v,function(ne){return At(ne)?function(ce){return ea(ce,ne.length===1?ne[0]:ne)}:ne}):v=[wi];var j=-1;v=y(v,ht(yt()));var q=F0(o,function(ne,ce,pe){var ye=y(v,function(Le){return Le(ne)});return{criteria:ye,index:++j,value:ne}});return Ye(q,function(ne,ce){return tO(ne,ce,E)})}function jR(o,v){return H0(o,v,function(E,j){return Op(o,j)})}function H0(o,v,E){for(var j=-1,q=v.length,ne={};++j<q;){var ce=v[j],pe=ea(o,ce);E(pe,ce)&&Tl(ne,bs(ce,o),pe)}return ne}function UR(o){return function(v){return ea(v,o)}}function ap(o,v,E,j){var q=j?be:ae,ne=-1,ce=v.length,pe=o;for(o===v&&(v=vi(v)),E&&(pe=y(o,ht(E)));++ne<ce;)for(var ye=0,Le=v[ne],Ie=E?E(Le):Le;(ye=q(pe,Ie,ye,j))>-1;)pe!==o&&Kc.call(pe,ye,1),Kc.call(o,ye,1);return o}function j0(o,v){for(var E=o?v.length:0,j=E-1;E--;){var q=v[E];if(E==j||q!==ne){var ne=q;Yo(q)?Kc.call(o,q,1):hp(o,q)}}return o}function lp(o,v){return o+Zc(k0()*(v-o+1))}function VR(o,v,E,j){for(var q=-1,ne=kr(Xc((v-o)/(E||1)),0),ce=Ce(ne);ne--;)ce[j?ne:++q]=o,o+=E;return ce}function cp(o,v){var E="";if(!o||v<1||v>U)return E;do v%2&&(E+=o),v=Zc(v/2),v&&(o+=o);while(v);return E}function Bt(o,v){return Ap(bw(o,v,wi),o+"")}function GR(o){return A0(Pa(o))}function qR(o,v){var E=Pa(o);return fu(E,Js(v,0,E.length))}function Tl(o,v,E,j){if(!jn(o))return o;v=bs(v,o);for(var q=-1,ne=v.length,ce=ne-1,pe=o;pe!=null&&++q<ne;){var ye=Mo(v[q]),Le=E;if(ye==="__proto__"||ye==="constructor"||ye==="prototype")return o;if(q!=ce){var Ie=pe[ye];Le=j?j(Ie,ye,pe):t,Le===t&&(Le=jn(Ie)?Ie:Yo(v[q+1])?[]:{})}Sl(pe,ye,Le),pe=pe[ye]}return o}var U0=Qc?function(o,v){return Qc.set(o,v),o}:wi,KR=Yc?function(o,v){return Yc(o,"toString",{configurable:!0,enumerable:!1,value:Dp(v),writable:!0})}:wi;function YR(o){return fu(Pa(o))}function Zi(o,v,E){var j=-1,q=o.length;v<0&&(v=-v>q?0:q+v),E=E>q?q:E,E<0&&(E+=q),q=v>E?0:E-v>>>0,v>>>=0;for(var ne=Ce(q);++j<q;)ne[j]=o[j+v];return ne}function XR(o,v){var E;return vs(o,function(j,q,ne){return E=v(j,q,ne),!E}),!!E}function ou(o,v,E){var j=0,q=o==null?j:o.length;if(typeof v=="number"&&v===v&&q<=te){for(;j<q;){var ne=j+q>>>1,ce=o[ne];ce!==null&&!Ni(ce)&&(E?ce<=v:ce<v)?j=ne+1:q=ne}return q}return up(o,v,wi,E)}function up(o,v,E,j){var q=0,ne=o==null?0:o.length;if(ne===0)return 0;v=E(v);for(var ce=v!==v,pe=v===null,ye=Ni(v),Le=v===t;q<ne;){var Ie=Zc((q+ne)/2),Fe=E(o[Ie]),Ze=Fe!==t,lt=Fe===null,bt=Fe===Fe,Ot=Ni(Fe);if(ce)var wt=j||bt;else Le?wt=bt&&(j||Ze):pe?wt=bt&&Ze&&(j||!lt):ye?wt=bt&&Ze&&!lt&&(j||!Ot):lt||Ot?wt=!1:wt=j?Fe<=v:Fe<v;wt?q=Ie+1:ne=Ie}return zr(ne,de)}function V0(o,v){for(var E=-1,j=o.length,q=0,ne=[];++E<j;){var ce=o[E],pe=v?v(ce):ce;if(!E||!po(pe,ye)){var ye=pe;ne[q++]=ce===0?0:ce}}return ne}function G0(o){return typeof o=="number"?o:Ni(o)?X:+o}function Oi(o){if(typeof o=="string")return o;if(At(o))return y(o,Oi)+"";if(Ni(o))return S0?S0.call(o):"";var v=o+"";return v=="0"&&1/o==-z?"-0":v}function ys(o,v,E){var j=-1,q=Ii,ne=o.length,ce=!0,pe=[],ye=pe;if(E)ce=!1,q=Ri;else if(ne>=d){var Le=v?null:aO(o);if(Le)return Xe(Le);ce=!1,q=St,ye=new Qs}else ye=v?[]:pe;e:for(;++j<ne;){var Ie=o[j],Fe=v?v(Ie):Ie;if(Ie=E||Ie!==0?Ie:0,ce&&Fe===Fe){for(var Ze=ye.length;Ze--;)if(ye[Ze]===Fe)continue e;v&&ye.push(Fe),pe.push(Ie)}else q(ye,Fe,E)||(ye!==pe&&ye.push(Fe),pe.push(Ie))}return pe}function hp(o,v){return v=bs(v,o),o=ww(o,v),o==null||delete o[Mo(Qi(v))]}function q0(o,v,E,j){return Tl(o,v,E(ea(o,v)),j)}function su(o,v,E,j){for(var q=o.length,ne=j?q:-1;(j?ne--:++ne<q)&&v(o[ne],ne,o););return E?Zi(o,j?0:ne,j?ne+1:q):Zi(o,j?ne+1:0,j?q:ne)}function K0(o,v){var E=o;return E instanceof Gt&&(E=E.value()),_(v,function(j,q){return q.func.apply(q.thisArg,T([j],q.args))},E)}function dp(o,v,E){var j=o.length;if(j<2)return j?ys(o[0]):[];for(var q=-1,ne=Ce(j);++q<j;)for(var ce=o[q],pe=-1;++pe<j;)pe!=q&&(ne[q]=_l(ne[q]||ce,o[pe],v,E));return ys(Or(ne,1),v,E)}function Y0(o,v,E){for(var j=-1,q=o.length,ne=v.length,ce={};++j<q;){var pe=j<ne?v[j]:t;E(ce,o[j],pe)}return ce}function pp(o){return ir(o)?o:[]}function fp(o){return typeof o=="function"?o:wi}function bs(o,v){return At(o)?o:kp(o,v)?[o]:Sw(dn(o))}var ZR=Bt;function ws(o,v,E){var j=o.length;return E=E===t?j:E,!v&&E>=j?o:Zi(o,v,E)}var X0=PI||function(o){return vn.clearTimeout(o)};function Z0(o,v){if(v)return o.slice();var E=o.length,j=y0?y0(E):new o.constructor(E);return o.copy(j),j}function gp(o){var v=new o.constructor(o.byteLength);return new Gc(v).set(new Gc(o)),v}function QR(o,v){var E=v?gp(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.byteLength)}function JR(o){var v=new o.constructor(o.source,Wr.exec(o));return v.lastIndex=o.lastIndex,v}function eO(o){return kl?Rt(kl.call(o)):{}}function Q0(o,v){var E=v?gp(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.length)}function J0(o,v){if(o!==v){var E=o!==t,j=o===null,q=o===o,ne=Ni(o),ce=v!==t,pe=v===null,ye=v===v,Le=Ni(v);if(!pe&&!Le&&!ne&&o>v||ne&&ce&&ye&&!pe&&!Le||j&&ce&&ye||!E&&ye||!q)return 1;if(!j&&!ne&&!Le&&o<v||Le&&E&&q&&!j&&!ne||pe&&E&&q||!ce&&q||!ye)return-1}return 0}function tO(o,v,E){for(var j=-1,q=o.criteria,ne=v.criteria,ce=q.length,pe=E.length;++j<ce;){var ye=J0(q[j],ne[j]);if(ye){if(j>=pe)return ye;var Le=E[j];return ye*(Le=="desc"?-1:1)}}return o.index-v.index}function ew(o,v,E,j){for(var q=-1,ne=o.length,ce=E.length,pe=-1,ye=v.length,Le=kr(ne-ce,0),Ie=Ce(ye+Le),Fe=!j;++pe<ye;)Ie[pe]=v[pe];for(;++q<ce;)(Fe||q<ne)&&(Ie[E[q]]=o[q]);for(;Le--;)Ie[pe++]=o[q++];return Ie}function tw(o,v,E,j){for(var q=-1,ne=o.length,ce=-1,pe=E.length,ye=-1,Le=v.length,Ie=kr(ne-pe,0),Fe=Ce(Ie+Le),Ze=!j;++q<Ie;)Fe[q]=o[q];for(var lt=q;++ye<Le;)Fe[lt+ye]=v[ye];for(;++ce<pe;)(Ze||q<ne)&&(Fe[lt+E[ce]]=o[q++]);return Fe}function vi(o,v){var E=-1,j=o.length;for(v||(v=Ce(j));++E<j;)v[E]=o[E];return v}function To(o,v,E,j){var q=!E;E||(E={});for(var ne=-1,ce=v.length;++ne<ce;){var pe=v[ne],ye=j?j(E[pe],o[pe],pe,E,o):t;ye===t&&(ye=o[pe]),q?Go(E,pe,ye):Sl(E,pe,ye)}return E}function nO(o,v){return To(o,Cp(o),v)}function rO(o,v){return To(o,fw(o),v)}function au(o,v){return function(E,j){var q=At(E)?Tr:_R,ne=v?v():{};return q(E,o,yt(j,2),ne)}}function Oa(o){return Bt(function(v,E){var j=-1,q=E.length,ne=q>1?E[q-1]:t,ce=q>2?E[2]:t;for(ne=o.length>3&&typeof ne=="function"?(q--,ne):t,ce&&ri(E[0],E[1],ce)&&(ne=q<3?t:ne,q=1),v=Rt(v);++j<q;){var pe=E[j];pe&&o(v,pe,j,ne)}return v})}function nw(o,v){return function(E,j){if(E==null)return E;if(!yi(E))return o(E,j);for(var q=E.length,ne=v?q:-1,ce=Rt(E);(v?ne--:++ne<q)&&j(ce[ne],ne,ce)!==!1;);return E}}function rw(o){return function(v,E,j){for(var q=-1,ne=Rt(v),ce=j(v),pe=ce.length;pe--;){var ye=ce[o?pe:++q];if(E(ne[ye],ye,ne)===!1)break}return v}}function iO(o,v,E){var j=v&m,q=Ml(o);function ne(){var ce=this&&this!==vn&&this instanceof ne?q:o;return ce.apply(j?E:this,arguments)}return ne}function iw(o){return function(v){v=dn(v);var E=oe(v)?_t(v):t,j=E?E[0]:v.charAt(0),q=E?ws(E,1).join(""):v.slice(1);return j[o]()+q}}function Na(o){return function(v){return _(nx(tx(v).replace(Hn,"")),o,"")}}function Ml(o){return function(){var v=arguments;switch(v.length){case 0:return new o;case 1:return new o(v[0]);case 2:return new o(v[0],v[1]);case 3:return new o(v[0],v[1],v[2]);case 4:return new o(v[0],v[1],v[2],v[3]);case 5:return new o(v[0],v[1],v[2],v[3],v[4]);case 6:return new o(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new o(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var E=Ra(o.prototype),j=o.apply(E,v);return jn(j)?j:E}}function oO(o,v,E){var j=Ml(o);function q(){for(var ne=arguments.length,ce=Ce(ne),pe=ne,ye=Da(q);pe--;)ce[pe]=arguments[pe];var Le=ne<3&&ce[0]!==ye&&ce[ne-1]!==ye?[]:ze(ce,ye);if(ne-=Le.length,ne<E)return cw(o,v,lu,q.placeholder,t,ce,Le,t,t,E-ne);var Ie=this&&this!==vn&&this instanceof q?j:o;return $r(Ie,this,ce)}return q}function ow(o){return function(v,E,j){var q=Rt(v);if(!yi(v)){var ne=yt(E,3);v=Lr(v),E=function(pe){return ne(q[pe],pe,q)}}var ce=o(v,E,j);return ce>-1?q[ne?v[ce]:ce]:t}}function sw(o){return Ko(function(v){var E=v.length,j=E,q=Yi.prototype.thru;for(o&&v.reverse();j--;){var ne=v[j];if(typeof ne!="function")throw new yn(g);if(q&&!ce&&du(ne)=="wrapper")var ce=new Yi([],!0)}for(j=ce?j:E;++j<E;){ne=v[j];var pe=du(ne),ye=pe=="wrapper"?wp(ne):t;ye&&Sp(ye[0])&&ye[1]==(R|M|k|N)&&!ye[4].length&&ye[9]==1?ce=ce[du(ye[0])].apply(ce,ye[3]):ce=ne.length==1&&Sp(ne)?ce[pe]():ce.thru(ne)}return function(){var Le=arguments,Ie=Le[0];if(ce&&Le.length==1&&At(Ie))return ce.plant(Ie).value();for(var Fe=0,Ze=E?v[Fe].apply(this,Le):Ie;++Fe<E;)Ze=v[Fe].call(this,Ze);return Ze}})}function lu(o,v,E,j,q,ne,ce,pe,ye,Le){var Ie=v&R,Fe=v&m,Ze=v&w,lt=v&(M|$),bt=v&I,Ot=Ze?t:Ml(o);function wt(){for(var jt=arguments.length,Xt=Ce(jt),Di=jt;Di--;)Xt[Di]=arguments[Di];if(lt)var ii=Da(wt),Fi=Mr(Xt,ii);if(j&&(Xt=ew(Xt,j,q,lt)),ne&&(Xt=tw(Xt,ne,ce,lt)),jt-=Fi,lt&&jt<Le){var or=ze(Xt,ii);return cw(o,v,lu,wt.placeholder,E,Xt,or,pe,ye,Le-jt)}var fo=Fe?E:this,Qo=Ze?fo[o]:o;return jt=Xt.length,pe?Xt=_O(Xt,pe):bt&&jt>1&&Xt.reverse(),Ie&&ye<jt&&(Xt.length=ye),this&&this!==vn&&this instanceof wt&&(Qo=Ot||Ml(Qo)),Qo.apply(fo,Xt)}return wt}function aw(o,v){return function(E,j){return RR(E,o,v(j),{})}}function cu(o,v){return function(E,j){var q;if(E===t&&j===t)return v;if(E!==t&&(q=E),j!==t){if(q===t)return j;typeof E=="string"||typeof j=="string"?(E=Oi(E),j=Oi(j)):(E=G0(E),j=G0(j)),q=o(E,j)}return q}}function mp(o){return Ko(function(v){return v=y(v,ht(yt())),Bt(function(E){var j=this;return o(v,function(q){return $r(q,j,E)})})})}function uu(o,v){v=v===t?" ":Oi(v);var E=v.length;if(E<2)return E?cp(v,o):v;var j=cp(v,Xc(o/zt(v)));return oe(v)?ws(_t(j),0,o).join(""):j.slice(0,o)}function sO(o,v,E,j){var q=v&m,ne=Ml(o);function ce(){for(var pe=-1,ye=arguments.length,Le=-1,Ie=j.length,Fe=Ce(Ie+ye),Ze=this&&this!==vn&&this instanceof ce?ne:o;++Le<Ie;)Fe[Le]=j[Le];for(;ye--;)Fe[Le++]=arguments[++pe];return $r(Ze,q?E:this,Fe)}return ce}function lw(o){return function(v,E,j){return j&&typeof j!="number"&&ri(v,E,j)&&(E=j=t),v=Zo(v),E===t?(E=v,v=0):E=Zo(E),j=j===t?v<E?1:-1:Zo(j),VR(v,E,j,o)}}function hu(o){return function(v,E){return typeof v=="string"&&typeof E=="string"||(v=Ji(v),E=Ji(E)),o(v,E)}}function cw(o,v,E,j,q,ne,ce,pe,ye,Le){var Ie=v&M,Fe=Ie?ce:t,Ze=Ie?t:ce,lt=Ie?ne:t,bt=Ie?t:ne;v|=Ie?k:C,v&=~(Ie?C:k),v&x||(v&=-4);var Ot=[o,v,q,lt,Fe,bt,Ze,pe,ye,Le],wt=E.apply(t,Ot);return Sp(o)&&xw(wt,Ot),wt.placeholder=j,Cw(wt,o,v)}function vp(o){var v=Qt[o];return function(E,j){if(E=Ji(E),j=j==null?0:zr(Lt(j),292),j&&C0(E)){var q=(dn(E)+"e").split("e"),ne=v(q[0]+"e"+(+q[1]+j));return q=(dn(ne)+"e").split("e"),+(q[0]+"e"+(+q[1]-j))}return v(E)}}var aO=La&&1/Xe(new La([,-0]))[1]==z?function(o){return new La(o)}:Wp;function uw(o){return function(v){var E=Hr(v);return E==ot?Ee(v):E==Pn?Qe(v):at(v,o(v))}}function qo(o,v,E,j,q,ne,ce,pe){var ye=v&w;if(!ye&&typeof o!="function")throw new yn(g);var Le=j?j.length:0;if(Le||(v&=-97,j=q=t),ce=ce===t?ce:kr(Lt(ce),0),pe=pe===t?pe:Lt(pe),Le-=q?q.length:0,v&C){var Ie=j,Fe=q;j=q=t}var Ze=ye?t:wp(o),lt=[o,v,E,j,q,Ie,Fe,ne,ce,pe];if(Ze&&CO(lt,Ze),o=lt[0],v=lt[1],E=lt[2],j=lt[3],q=lt[4],pe=lt[9]=lt[9]===t?ye?0:o.length:kr(lt[9]-Le,0),!pe&&v&(M|$)&&(v&=-25),!v||v==m)var bt=iO(o,v,E);else v==M||v==$?bt=oO(o,v,pe):(v==k||v==(m|k))&&!q.length?bt=sO(o,v,E,j):bt=lu.apply(t,lt);var Ot=Ze?U0:xw;return Cw(Ot(bt,lt),o,v)}function hw(o,v,E,j){return o===t||po(o,Zn[E])&&!fn.call(j,E)?v:o}function dw(o,v,E,j,q,ne){return jn(o)&&jn(v)&&(ne.set(v,o),iu(o,v,t,dw,ne),ne.delete(v)),o}function lO(o){return Il(o)?t:o}function pw(o,v,E,j,q,ne){var ce=E&i,pe=o.length,ye=v.length;if(pe!=ye&&!(ce&&ye>pe))return!1;var Le=ne.get(o),Ie=ne.get(v);if(Le&&Ie)return Le==v&&Ie==o;var Fe=-1,Ze=!0,lt=E&c?new Qs:t;for(ne.set(o,v),ne.set(v,o);++Fe<pe;){var bt=o[Fe],Ot=v[Fe];if(j)var wt=ce?j(Ot,bt,Fe,v,o,ne):j(bt,Ot,Fe,o,v,ne);if(wt!==t){if(wt)continue;Ze=!1;break}if(lt){if(!W(v,function(jt,Xt){if(!St(lt,Xt)&&(bt===jt||q(bt,jt,E,j,ne)))return lt.push(Xt)})){Ze=!1;break}}else if(!(bt===Ot||q(bt,Ot,E,j,ne))){Ze=!1;break}}return ne.delete(o),ne.delete(v),Ze}function cO(o,v,E,j,q,ne,ce){switch(E){case Wn:if(o.byteLength!=v.byteLength||o.byteOffset!=v.byteOffset)return!1;o=o.buffer,v=v.buffer;case mn:return!(o.byteLength!=v.byteLength||!ne(new Gc(o),new Gc(v)));case Ae:case Te:case ft:return po(+o,+v);case Je:return o.name==v.name&&o.message==v.message;case Sn:case lr:return o==v+"";case ot:var pe=Ee;case Pn:var ye=j&i;if(pe||(pe=Xe),o.size!=v.size&&!ye)return!1;var Le=ce.get(o);if(Le)return Le==v;j|=c,ce.set(o,v);var Ie=pw(pe(o),pe(v),j,q,ne,ce);return ce.delete(o),Ie;case yr:if(kl)return kl.call(o)==kl.call(v)}return!1}function uO(o,v,E,j,q,ne){var ce=E&i,pe=yp(o),ye=pe.length,Le=yp(v),Ie=Le.length;if(ye!=Ie&&!ce)return!1;for(var Fe=ye;Fe--;){var Ze=pe[Fe];if(!(ce?Ze in v:fn.call(v,Ze)))return!1}var lt=ne.get(o),bt=ne.get(v);if(lt&&bt)return lt==v&&bt==o;var Ot=!0;ne.set(o,v),ne.set(v,o);for(var wt=ce;++Fe<ye;){Ze=pe[Fe];var jt=o[Ze],Xt=v[Ze];if(j)var Di=ce?j(Xt,jt,Ze,v,o,ne):j(jt,Xt,Ze,o,v,ne);if(!(Di===t?jt===Xt||q(jt,Xt,E,j,ne):Di)){Ot=!1;break}wt||(wt=Ze=="constructor")}if(Ot&&!wt){var ii=o.constructor,Fi=v.constructor;ii!=Fi&&"constructor"in o&&"constructor"in v&&!(typeof ii=="function"&&ii instanceof ii&&typeof Fi=="function"&&Fi instanceof Fi)&&(Ot=!1)}return ne.delete(o),ne.delete(v),Ot}function Ko(o){return Ap(bw(o,t,Tw),o+"")}function yp(o){return R0(o,Lr,Cp)}function bp(o){return R0(o,bi,fw)}var wp=Qc?function(o){return Qc.get(o)}:Wp;function du(o){for(var v=o.name+"",E=Ia[v],j=fn.call(Ia,v)?E.length:0;j--;){var q=E[j],ne=q.func;if(ne==null||ne==o)return q.name}return v}function Da(o){var v=fn.call(J,"placeholder")?J:o;return v.placeholder}function yt(){var o=J.iteratee||Fp;return o=o===Fp?D0:o,arguments.length?o(arguments[0],arguments[1]):o}function pu(o,v){var E=o.__data__;return yO(v)?E[typeof v=="string"?"string":"hash"]:E.map}function xp(o){for(var v=Lr(o),E=v.length;E--;){var j=v[E],q=o[j];v[E]=[j,q,vw(q)]}return v}function ta(o,v){var E=ie(o,v);return N0(E)?E:t}function hO(o){var v=fn.call(o,Xs),E=o[Xs];try{o[Xs]=t;var j=!0}catch{}var q=Uc.call(o);return j&&(v?o[Xs]=E:delete o[Xs]),q}var Cp=Yd?function(o){return o==null?[]:(o=Rt(o),Br(Yd(o),function(v){return w0.call(o,v)}))}:Bp,fw=Yd?function(o){for(var v=[];o;)T(v,Cp(o)),o=qc(o);return v}:Bp,Hr=ni;(Xd&&Hr(new Xd(new ArrayBuffer(1)))!=Wn||wl&&Hr(new wl)!=ot||Zd&&Hr(Zd.resolve())!=Kt||La&&Hr(new La)!=Pn||xl&&Hr(new xl)!=Ge)&&(Hr=function(o){var v=ni(o),E=v==gn?o.constructor:t,j=E?na(E):"";if(j)switch(j){case qI:return Wn;case KI:return ot;case YI:return Kt;case XI:return Pn;case ZI:return Ge}return v});function dO(o,v,E){for(var j=-1,q=E.length;++j<q;){var ne=E[j],ce=ne.size;switch(ne.type){case"drop":o+=ce;break;case"dropRight":v-=ce;break;case"take":v=zr(v,o+ce);break;case"takeRight":o=kr(o,v-ce);break}}return{start:o,end:v}}function pO(o){var v=o.match(di);return v?v[1].split(lo):[]}function gw(o,v,E){v=bs(v,o);for(var j=-1,q=v.length,ne=!1;++j<q;){var ce=Mo(v[j]);if(!(ne=o!=null&&E(o,ce)))break;o=o[ce]}return ne||++j!=q?ne:(q=o==null?0:o.length,!!q&&wu(q)&&Yo(ce,q)&&(At(o)||ra(o)))}function fO(o){var v=o.length,E=new o.constructor(v);return v&&typeof o[0]=="string"&&fn.call(o,"index")&&(E.index=o.index,E.input=o.input),E}function mw(o){return typeof o.constructor=="function"&&!El(o)?Ra(qc(o)):{}}function gO(o,v,E){var j=o.constructor;switch(v){case mn:return gp(o);case Ae:case Te:return new j(+o);case Wn:return QR(o,E);case _r:case cr:case _n:case In:case Bn:case Dt:case An:case _i:case Yr:return Q0(o,E);case ot:return new j;case ft:case lr:return new j(o);case Sn:return JR(o);case Pn:return new j;case yr:return eO(o)}}function mO(o,v){var E=v.length;if(!E)return o;var j=E-1;return v[j]=(E>1?"& ":"")+v[j],v=v.join(E>2?", ":" "),o.replace(Ti,`{
1470
+ /* [wrapped with `+v+`] */
1471
+ `)}function vO(o){return At(o)||ra(o)||!!(x0&&o&&o[x0])}function Yo(o,v){var E=typeof o;return v=v??U,!!v&&(E=="number"||E!="symbol"&&Ne.test(o))&&o>-1&&o%1==0&&o<v}function ri(o,v,E){if(!jn(E))return!1;var j=typeof v;return(j=="number"?yi(E)&&Yo(v,E.length):j=="string"&&v in E)?po(E[v],o):!1}function kp(o,v){if(At(o))return!1;var E=typeof o;return E=="number"||E=="symbol"||E=="boolean"||o==null||Ni(o)?!0:Zr.test(o)||!Oo.test(o)||v!=null&&o in Rt(v)}function yO(o){var v=typeof o;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?o!=="__proto__":o===null}function Sp(o){var v=du(o),E=J[v];if(typeof E!="function"||!(v in Gt.prototype))return!1;if(o===E)return!0;var j=wp(E);return!!j&&o===j[0]}function bO(o){return!!v0&&v0 in o}var wO=Ys?Xo:zp;function El(o){var v=o&&o.constructor,E=typeof v=="function"&&v.prototype||Zn;return o===E}function vw(o){return o===o&&!jn(o)}function yw(o,v){return function(E){return E==null?!1:E[o]===v&&(v!==t||o in Rt(E))}}function xO(o){var v=yu(o,function(j){return E.size===f&&E.clear(),j}),E=v.cache;return v}function CO(o,v){var E=o[1],j=v[1],q=E|j,ne=q<(m|w|R),ce=j==R&&E==M||j==R&&E==N&&o[7].length<=v[8]||j==(R|N)&&v[7].length<=v[8]&&E==M;if(!(ne||ce))return o;j&m&&(o[2]=v[2],q|=E&m?0:x);var pe=v[3];if(pe){var ye=o[3];o[3]=ye?ew(ye,pe,v[4]):pe,o[4]=ye?ze(o[3],s):v[4]}return pe=v[5],pe&&(ye=o[5],o[5]=ye?tw(ye,pe,v[6]):pe,o[6]=ye?ze(o[5],s):v[6]),pe=v[7],pe&&(o[7]=pe),j&R&&(o[8]=o[8]==null?v[8]:zr(o[8],v[8])),o[9]==null&&(o[9]=v[9]),o[0]=v[0],o[1]=q,o}function kO(o){var v=[];if(o!=null)for(var E in Rt(o))v.push(E);return v}function SO(o){return Uc.call(o)}function bw(o,v,E){return v=kr(v===t?o.length-1:v,0),function(){for(var j=arguments,q=-1,ne=kr(j.length-v,0),ce=Ce(ne);++q<ne;)ce[q]=j[v+q];q=-1;for(var pe=Ce(v+1);++q<v;)pe[q]=j[q];return pe[v]=E(ce),$r(o,this,pe)}}function ww(o,v){return v.length<2?o:ea(o,Zi(v,0,-1))}function _O(o,v){for(var E=o.length,j=zr(v.length,E),q=vi(o);j--;){var ne=v[j];o[j]=Yo(ne,E)?q[ne]:t}return o}function _p(o,v){if(!(v==="constructor"&&typeof o[v]=="function")&&v!="__proto__")return o[v]}var xw=kw(U0),Ll=BI||function(o,v){return vn.setTimeout(o,v)},Ap=kw(KR);function Cw(o,v,E){var j=v+"";return Ap(o,mO(j,AO(pO(j),E)))}function kw(o){var v=0,E=0;return function(){var j=UI(),q=O-(j-E);if(E=j,q>0){if(++v>=P)return arguments[0]}else v=0;return o.apply(t,arguments)}}function fu(o,v){var E=-1,j=o.length,q=j-1;for(v=v===t?j:v;++E<v;){var ne=lp(E,q),ce=o[ne];o[ne]=o[E],o[E]=ce}return o.length=v,o}var Sw=xO(function(o){var v=[];return o.charCodeAt(0)===46&&v.push(""),o.replace(Rn,function(E,j,q,ne){v.push(q?ne.replace(os,"$1"):j||E)}),v});function Mo(o){if(typeof o=="string"||Ni(o))return o;var v=o+"";return v=="0"&&1/o==-z?"-0":v}function na(o){if(o!=null){try{return jc.call(o)}catch{}try{return o+""}catch{}}return""}function AO(o,v){return Ir(le,function(E){var j="_."+E[0];v&E[1]&&!Ii(o,j)&&o.push(j)}),o.sort()}function _w(o){if(o instanceof Gt)return o.clone();var v=new Yi(o.__wrapped__,o.__chain__);return v.__actions__=vi(o.__actions__),v.__index__=o.__index__,v.__values__=o.__values__,v}function $O(o,v,E){(E?ri(o,v,E):v===t)?v=1:v=kr(Lt(v),0);var j=o==null?0:o.length;if(!j||v<1)return[];for(var q=0,ne=0,ce=Ce(Xc(j/v));q<j;)ce[ne++]=Zi(o,q,q+=v);return ce}function TO(o){for(var v=-1,E=o==null?0:o.length,j=0,q=[];++v<E;){var ne=o[v];ne&&(q[j++]=ne)}return q}function MO(){var o=arguments.length;if(!o)return[];for(var v=Ce(o-1),E=arguments[0],j=o;j--;)v[j-1]=arguments[j];return T(At(E)?vi(E):[E],Or(v,1))}var EO=Bt(function(o,v){return ir(o)?_l(o,Or(v,1,ir,!0)):[]}),LO=Bt(function(o,v){var E=Qi(v);return ir(E)&&(E=t),ir(o)?_l(o,Or(v,1,ir,!0),yt(E,2)):[]}),IO=Bt(function(o,v){var E=Qi(v);return ir(E)&&(E=t),ir(o)?_l(o,Or(v,1,ir,!0),t,E):[]});function RO(o,v,E){var j=o==null?0:o.length;return j?(v=E||v===t?1:Lt(v),Zi(o,v<0?0:v,j)):[]}function OO(o,v,E){var j=o==null?0:o.length;return j?(v=E||v===t?1:Lt(v),v=j-v,Zi(o,0,v<0?0:v)):[]}function NO(o,v){return o&&o.length?su(o,yt(v,3),!0,!0):[]}function DO(o,v){return o&&o.length?su(o,yt(v,3),!0):[]}function FO(o,v,E,j){var q=o==null?0:o.length;return q?(E&&typeof E!="number"&&ri(o,v,E)&&(E=0,j=q),MR(o,v,E,j)):[]}function Aw(o,v,E){var j=o==null?0:o.length;if(!j)return-1;var q=E==null?0:Lt(E);return q<0&&(q=kr(j+q,0)),re(o,yt(v,3),q)}function $w(o,v,E){var j=o==null?0:o.length;if(!j)return-1;var q=j-1;return E!==t&&(q=Lt(E),q=E<0?kr(j+q,0):zr(q,j-1)),re(o,yt(v,3),q,!0)}function Tw(o){var v=o==null?0:o.length;return v?Or(o,1):[]}function PO(o){var v=o==null?0:o.length;return v?Or(o,z):[]}function WO(o,v){var E=o==null?0:o.length;return E?(v=v===t?1:Lt(v),Or(o,v)):[]}function BO(o){for(var v=-1,E=o==null?0:o.length,j={};++v<E;){var q=o[v];j[q[0]]=q[1]}return j}function Mw(o){return o&&o.length?o[0]:t}function zO(o,v,E){var j=o==null?0:o.length;if(!j)return-1;var q=E==null?0:Lt(E);return q<0&&(q=kr(j+q,0)),ae(o,v,q)}function HO(o){var v=o==null?0:o.length;return v?Zi(o,0,-1):[]}var jO=Bt(function(o){var v=y(o,pp);return v.length&&v[0]===o[0]?rp(v):[]}),UO=Bt(function(o){var v=Qi(o),E=y(o,pp);return v===Qi(E)?v=t:E.pop(),E.length&&E[0]===o[0]?rp(E,yt(v,2)):[]}),VO=Bt(function(o){var v=Qi(o),E=y(o,pp);return v=typeof v=="function"?v:t,v&&E.pop(),E.length&&E[0]===o[0]?rp(E,t,v):[]});function GO(o,v){return o==null?"":HI.call(o,v)}function Qi(o){var v=o==null?0:o.length;return v?o[v-1]:t}function qO(o,v,E){var j=o==null?0:o.length;if(!j)return-1;var q=j;return E!==t&&(q=Lt(E),q=q<0?kr(j+q,0):zr(q,j-1)),v===v?Ct(o,v,q):re(o,ke,q,!0)}function KO(o,v){return o&&o.length?B0(o,Lt(v)):t}var YO=Bt(Ew);function Ew(o,v){return o&&o.length&&v&&v.length?ap(o,v):o}function XO(o,v,E){return o&&o.length&&v&&v.length?ap(o,v,yt(E,2)):o}function ZO(o,v,E){return o&&o.length&&v&&v.length?ap(o,v,t,E):o}var QO=Ko(function(o,v){var E=o==null?0:o.length,j=Jd(o,v);return j0(o,y(v,function(q){return Yo(q,E)?+q:q}).sort(J0)),j});function JO(o,v){var E=[];if(!(o&&o.length))return E;var j=-1,q=[],ne=o.length;for(v=yt(v,3);++j<ne;){var ce=o[j];v(ce,j,o)&&(E.push(ce),q.push(j))}return j0(o,q),E}function $p(o){return o==null?o:GI.call(o)}function e2(o,v,E){var j=o==null?0:o.length;return j?(E&&typeof E!="number"&&ri(o,v,E)?(v=0,E=j):(v=v==null?0:Lt(v),E=E===t?j:Lt(E)),Zi(o,v,E)):[]}function t2(o,v){return ou(o,v)}function n2(o,v,E){return up(o,v,yt(E,2))}function r2(o,v){var E=o==null?0:o.length;if(E){var j=ou(o,v);if(j<E&&po(o[j],v))return j}return-1}function i2(o,v){return ou(o,v,!0)}function o2(o,v,E){return up(o,v,yt(E,2),!0)}function s2(o,v){var E=o==null?0:o.length;if(E){var j=ou(o,v,!0)-1;if(po(o[j],v))return j}return-1}function a2(o){return o&&o.length?V0(o):[]}function l2(o,v){return o&&o.length?V0(o,yt(v,2)):[]}function c2(o){var v=o==null?0:o.length;return v?Zi(o,1,v):[]}function u2(o,v,E){return o&&o.length?(v=E||v===t?1:Lt(v),Zi(o,0,v<0?0:v)):[]}function h2(o,v,E){var j=o==null?0:o.length;return j?(v=E||v===t?1:Lt(v),v=j-v,Zi(o,v<0?0:v,j)):[]}function d2(o,v){return o&&o.length?su(o,yt(v,3),!1,!0):[]}function p2(o,v){return o&&o.length?su(o,yt(v,3)):[]}var f2=Bt(function(o){return ys(Or(o,1,ir,!0))}),g2=Bt(function(o){var v=Qi(o);return ir(v)&&(v=t),ys(Or(o,1,ir,!0),yt(v,2))}),m2=Bt(function(o){var v=Qi(o);return v=typeof v=="function"?v:t,ys(Or(o,1,ir,!0),t,v)});function v2(o){return o&&o.length?ys(o):[]}function y2(o,v){return o&&o.length?ys(o,yt(v,2)):[]}function b2(o,v){return v=typeof v=="function"?v:t,o&&o.length?ys(o,t,v):[]}function Tp(o){if(!(o&&o.length))return[];var v=0;return o=Br(o,function(E){if(ir(E))return v=kr(E.length,v),!0}),et(v,function(E){return y(o,we(E))})}function Lw(o,v){if(!(o&&o.length))return[];var E=Tp(o);return v==null?E:y(E,function(j){return $r(v,t,j)})}var w2=Bt(function(o,v){return ir(o)?_l(o,v):[]}),x2=Bt(function(o){return dp(Br(o,ir))}),C2=Bt(function(o){var v=Qi(o);return ir(v)&&(v=t),dp(Br(o,ir),yt(v,2))}),k2=Bt(function(o){var v=Qi(o);return v=typeof v=="function"?v:t,dp(Br(o,ir),t,v)}),S2=Bt(Tp);function _2(o,v){return Y0(o||[],v||[],Sl)}function A2(o,v){return Y0(o||[],v||[],Tl)}var $2=Bt(function(o){var v=o.length,E=v>1?o[v-1]:t;return E=typeof E=="function"?(o.pop(),E):t,Lw(o,E)});function Iw(o){var v=J(o);return v.__chain__=!0,v}function T2(o,v){return v(o),o}function gu(o,v){return v(o)}var M2=Ko(function(o){var v=o.length,E=v?o[0]:0,j=this.__wrapped__,q=function(ne){return Jd(ne,o)};return v>1||this.__actions__.length||!(j instanceof Gt)||!Yo(E)?this.thru(q):(j=j.slice(E,+E+(v?1:0)),j.__actions__.push({func:gu,args:[q],thisArg:t}),new Yi(j,this.__chain__).thru(function(ne){return v&&!ne.length&&ne.push(t),ne}))});function E2(){return Iw(this)}function L2(){return new Yi(this.value(),this.__chain__)}function I2(){this.__values__===t&&(this.__values__=Gw(this.value()));var o=this.__index__>=this.__values__.length,v=o?t:this.__values__[this.__index__++];return{done:o,value:v}}function R2(){return this}function O2(o){for(var v,E=this;E instanceof eu;){var j=_w(E);j.__index__=0,j.__values__=t,v?q.__wrapped__=j:v=j;var q=j;E=E.__wrapped__}return q.__wrapped__=o,v}function N2(){var o=this.__wrapped__;if(o instanceof Gt){var v=o;return this.__actions__.length&&(v=new Gt(this)),v=v.reverse(),v.__actions__.push({func:gu,args:[$p],thisArg:t}),new Yi(v,this.__chain__)}return this.thru($p)}function D2(){return K0(this.__wrapped__,this.__actions__)}var F2=au(function(o,v,E){fn.call(o,E)?++o[E]:Go(o,E,1)});function P2(o,v,E){var j=At(o)?Rr:TR;return E&&ri(o,v,E)&&(v=t),j(o,yt(v,3))}function W2(o,v){var E=At(o)?Br:L0;return E(o,yt(v,3))}var B2=ow(Aw),z2=ow($w);function H2(o,v){return Or(mu(o,v),1)}function j2(o,v){return Or(mu(o,v),z)}function U2(o,v,E){return E=E===t?1:Lt(E),Or(mu(o,v),E)}function Rw(o,v){var E=At(o)?Ir:vs;return E(o,yt(v,3))}function Ow(o,v){var E=At(o)?Ks:E0;return E(o,yt(v,3))}var V2=au(function(o,v,E){fn.call(o,E)?o[E].push(v):Go(o,E,[v])});function G2(o,v,E,j){o=yi(o)?o:Pa(o),E=E&&!j?Lt(E):0;var q=o.length;return E<0&&(E=kr(q+E,0)),xu(o)?E<=q&&o.indexOf(v,E)>-1:!!q&&ae(o,v,E)>-1}var q2=Bt(function(o,v,E){var j=-1,q=typeof v=="function",ne=yi(o)?Ce(o.length):[];return vs(o,function(ce){ne[++j]=q?$r(v,ce,E):Al(ce,v,E)}),ne}),K2=au(function(o,v,E){Go(o,E,v)});function mu(o,v){var E=At(o)?y:F0;return E(o,yt(v,3))}function Y2(o,v,E,j){return o==null?[]:(At(v)||(v=v==null?[]:[v]),E=j?t:E,At(E)||(E=E==null?[]:[E]),z0(o,v,E))}var X2=au(function(o,v,E){o[E?0:1].push(v)},function(){return[[],[]]});function Z2(o,v,E){var j=At(o)?_:Re,q=arguments.length<3;return j(o,yt(v,4),E,q,vs)}function Q2(o,v,E){var j=At(o)?F:Re,q=arguments.length<3;return j(o,yt(v,4),E,q,E0)}function J2(o,v){var E=At(o)?Br:L0;return E(o,bu(yt(v,3)))}function eN(o){var v=At(o)?A0:GR;return v(o)}function tN(o,v,E){(E?ri(o,v,E):v===t)?v=1:v=Lt(v);var j=At(o)?kR:qR;return j(o,v)}function nN(o){var v=At(o)?SR:YR;return v(o)}function rN(o){if(o==null)return 0;if(yi(o))return xu(o)?zt(o):o.length;var v=Hr(o);return v==ot||v==Pn?o.size:op(o).length}function iN(o,v,E){var j=At(o)?W:XR;return E&&ri(o,v,E)&&(v=t),j(o,yt(v,3))}var oN=Bt(function(o,v){if(o==null)return[];var E=v.length;return E>1&&ri(o,v[0],v[1])?v=[]:E>2&&ri(v[0],v[1],v[2])&&(v=[v[0]]),z0(o,Or(v,1),[])}),vu=WI||function(){return vn.Date.now()};function sN(o,v){if(typeof v!="function")throw new yn(g);return o=Lt(o),function(){if(--o<1)return v.apply(this,arguments)}}function Nw(o,v,E){return v=E?t:v,v=o&&v==null?o.length:v,qo(o,R,t,t,t,t,v)}function Dw(o,v){var E;if(typeof v!="function")throw new yn(g);return o=Lt(o),function(){return--o>0&&(E=v.apply(this,arguments)),o<=1&&(v=t),E}}var Mp=Bt(function(o,v,E){var j=m;if(E.length){var q=ze(E,Da(Mp));j|=k}return qo(o,j,v,E,q)}),Fw=Bt(function(o,v,E){var j=m|w;if(E.length){var q=ze(E,Da(Fw));j|=k}return qo(v,j,o,E,q)});function Pw(o,v,E){v=E?t:v;var j=qo(o,M,t,t,t,t,t,v);return j.placeholder=Pw.placeholder,j}function Ww(o,v,E){v=E?t:v;var j=qo(o,$,t,t,t,t,t,v);return j.placeholder=Ww.placeholder,j}function Bw(o,v,E){var j,q,ne,ce,pe,ye,Le=0,Ie=!1,Fe=!1,Ze=!0;if(typeof o!="function")throw new yn(g);v=Ji(v)||0,jn(E)&&(Ie=!!E.leading,Fe="maxWait"in E,ne=Fe?kr(Ji(E.maxWait)||0,v):ne,Ze="trailing"in E?!!E.trailing:Ze);function lt(or){var fo=j,Qo=q;return j=q=t,Le=or,ce=o.apply(Qo,fo),ce}function bt(or){return Le=or,pe=Ll(jt,v),Ie?lt(or):ce}function Ot(or){var fo=or-ye,Qo=or-Le,ox=v-fo;return Fe?zr(ox,ne-Qo):ox}function wt(or){var fo=or-ye,Qo=or-Le;return ye===t||fo>=v||fo<0||Fe&&Qo>=ne}function jt(){var or=vu();if(wt(or))return Xt(or);pe=Ll(jt,Ot(or))}function Xt(or){return pe=t,Ze&&j?lt(or):(j=q=t,ce)}function Di(){pe!==t&&X0(pe),Le=0,j=ye=q=pe=t}function ii(){return pe===t?ce:Xt(vu())}function Fi(){var or=vu(),fo=wt(or);if(j=arguments,q=this,ye=or,fo){if(pe===t)return bt(ye);if(Fe)return X0(pe),pe=Ll(jt,v),lt(ye)}return pe===t&&(pe=Ll(jt,v)),ce}return Fi.cancel=Di,Fi.flush=ii,Fi}var aN=Bt(function(o,v){return M0(o,1,v)}),lN=Bt(function(o,v,E){return M0(o,Ji(v)||0,E)});function cN(o){return qo(o,I)}function yu(o,v){if(typeof o!="function"||v!=null&&typeof v!="function")throw new yn(g);var E=function(){var j=arguments,q=v?v.apply(this,j):j[0],ne=E.cache;if(ne.has(q))return ne.get(q);var ce=o.apply(this,j);return E.cache=ne.set(q,ce)||ne,ce};return E.cache=new(yu.Cache||Vo),E}yu.Cache=Vo;function bu(o){if(typeof o!="function")throw new yn(g);return function(){var v=arguments;switch(v.length){case 0:return!o.call(this);case 1:return!o.call(this,v[0]);case 2:return!o.call(this,v[0],v[1]);case 3:return!o.call(this,v[0],v[1],v[2])}return!o.apply(this,v)}}function uN(o){return Dw(2,o)}var hN=ZR(function(o,v){v=v.length==1&&At(v[0])?y(v[0],ht(yt())):y(Or(v,1),ht(yt()));var E=v.length;return Bt(function(j){for(var q=-1,ne=zr(j.length,E);++q<ne;)j[q]=v[q].call(this,j[q]);return $r(o,this,j)})}),Ep=Bt(function(o,v){var E=ze(v,Da(Ep));return qo(o,k,t,v,E)}),zw=Bt(function(o,v){var E=ze(v,Da(zw));return qo(o,C,t,v,E)}),dN=Ko(function(o,v){return qo(o,N,t,t,t,v)});function pN(o,v){if(typeof o!="function")throw new yn(g);return v=v===t?v:Lt(v),Bt(o,v)}function fN(o,v){if(typeof o!="function")throw new yn(g);return v=v==null?0:kr(Lt(v),0),Bt(function(E){var j=E[v],q=ws(E,0,v);return j&&T(q,j),$r(o,this,q)})}function gN(o,v,E){var j=!0,q=!0;if(typeof o!="function")throw new yn(g);return jn(E)&&(j="leading"in E?!!E.leading:j,q="trailing"in E?!!E.trailing:q),Bw(o,v,{leading:j,maxWait:v,trailing:q})}function mN(o){return Nw(o,1)}function vN(o,v){return Ep(fp(v),o)}function yN(){if(!arguments.length)return[];var o=arguments[0];return At(o)?o:[o]}function bN(o){return Xi(o,u)}function wN(o,v){return v=typeof v=="function"?v:t,Xi(o,u,v)}function xN(o){return Xi(o,a|u)}function CN(o,v){return v=typeof v=="function"?v:t,Xi(o,a|u,v)}function kN(o,v){return v==null||T0(o,v,Lr(v))}function po(o,v){return o===v||o!==o&&v!==v}var SN=hu(np),_N=hu(function(o,v){return o>=v}),ra=O0(function(){return arguments}())?O0:function(o){return Qn(o)&&fn.call(o,"callee")&&!w0.call(o,"callee")},At=Ce.isArray,AN=mi?ht(mi):OR;function yi(o){return o!=null&&wu(o.length)&&!Xo(o)}function ir(o){return Qn(o)&&yi(o)}function $N(o){return o===!0||o===!1||Qn(o)&&ni(o)==Ae}var xs=zI||zp,TN=gs?ht(gs):NR;function MN(o){return Qn(o)&&o.nodeType===1&&!Il(o)}function EN(o){if(o==null)return!0;if(yi(o)&&(At(o)||typeof o=="string"||typeof o.splice=="function"||xs(o)||Fa(o)||ra(o)))return!o.length;var v=Hr(o);if(v==ot||v==Pn)return!o.size;if(El(o))return!op(o).length;for(var E in o)if(fn.call(o,E))return!1;return!0}function LN(o,v){return $l(o,v)}function IN(o,v,E){E=typeof E=="function"?E:t;var j=E?E(o,v):t;return j===t?$l(o,v,t,E):!!j}function Lp(o){if(!Qn(o))return!1;var v=ni(o);return v==Je||v==Me||typeof o.message=="string"&&typeof o.name=="string"&&!Il(o)}function RN(o){return typeof o=="number"&&C0(o)}function Xo(o){if(!jn(o))return!1;var v=ni(o);return v==qe||v==pt||v==me||v==Sr}function Hw(o){return typeof o=="number"&&o==Lt(o)}function wu(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=U}function jn(o){var v=typeof o;return o!=null&&(v=="object"||v=="function")}function Qn(o){return o!=null&&typeof o=="object"}var jw=Xn?ht(Xn):FR;function ON(o,v){return o===v||ip(o,v,xp(v))}function NN(o,v,E){return E=typeof E=="function"?E:t,ip(o,v,xp(v),E)}function DN(o){return Uw(o)&&o!=+o}function FN(o){if(wO(o))throw new dt(p);return N0(o)}function PN(o){return o===null}function WN(o){return o==null}function Uw(o){return typeof o=="number"||Qn(o)&&ni(o)==ft}function Il(o){if(!Qn(o)||ni(o)!=gn)return!1;var v=qc(o);if(v===null)return!0;var E=fn.call(v,"constructor")&&v.constructor;return typeof E=="function"&&E instanceof E&&jc.call(E)==NI}var Ip=Ei?ht(Ei):PR;function BN(o){return Hw(o)&&o>=-U&&o<=U}var Vw=Li?ht(Li):WR;function xu(o){return typeof o=="string"||!At(o)&&Qn(o)&&ni(o)==lr}function Ni(o){return typeof o=="symbol"||Qn(o)&&ni(o)==yr}var Fa=qi?ht(qi):BR;function zN(o){return o===t}function HN(o){return Qn(o)&&Hr(o)==Ge}function jN(o){return Qn(o)&&ni(o)==Nt}var UN=hu(sp),VN=hu(function(o,v){return o<=v});function Gw(o){if(!o)return[];if(yi(o))return xu(o)?_t(o):vi(o);if(bl&&o[bl])return xe(o[bl]());var v=Hr(o),E=v==ot?Ee:v==Pn?Xe:Pa;return E(o)}function Zo(o){if(!o)return o===0?o:0;if(o=Ji(o),o===z||o===-z){var v=o<0?-1:1;return v*K}return o===o?o:0}function Lt(o){var v=Zo(o),E=v%1;return v===v?E?v-E:v:0}function qw(o){return o?Js(Lt(o),0,ee):0}function Ji(o){if(typeof o=="number")return o;if(Ni(o))return X;if(jn(o)){var v=typeof o.valueOf=="function"?o.valueOf():o;o=jn(v)?v+"":v}if(typeof o!="string")return o===0?o:+o;o=Tn(o);var E=ss.test(o);return E||je.test(o)?$n(o.slice(2),E?2:8):Ft.test(o)?X:+o}function Kw(o){return To(o,bi(o))}function GN(o){return o?Js(Lt(o),-U,U):o===0?o:0}function dn(o){return o==null?"":Oi(o)}var qN=Oa(function(o,v){if(El(v)||yi(v)){To(v,Lr(v),o);return}for(var E in v)fn.call(v,E)&&Sl(o,E,v[E])}),Yw=Oa(function(o,v){To(v,bi(v),o)}),Cu=Oa(function(o,v,E,j){To(v,bi(v),o,j)}),KN=Oa(function(o,v,E,j){To(v,Lr(v),o,j)}),YN=Ko(Jd);function XN(o,v){var E=Ra(o);return v==null?E:$0(E,v)}var ZN=Bt(function(o,v){o=Rt(o);var E=-1,j=v.length,q=j>2?v[2]:t;for(q&&ri(v[0],v[1],q)&&(j=1);++E<j;)for(var ne=v[E],ce=bi(ne),pe=-1,ye=ce.length;++pe<ye;){var Le=ce[pe],Ie=o[Le];(Ie===t||po(Ie,Zn[Le])&&!fn.call(o,Le))&&(o[Le]=ne[Le])}return o}),QN=Bt(function(o){return o.push(t,dw),$r(Xw,t,o)});function JN(o,v){return Q(o,yt(v,3),$o)}function eD(o,v){return Q(o,yt(v,3),tp)}function tD(o,v){return o==null?o:ep(o,yt(v,3),bi)}function nD(o,v){return o==null?o:I0(o,yt(v,3),bi)}function rD(o,v){return o&&$o(o,yt(v,3))}function iD(o,v){return o&&tp(o,yt(v,3))}function oD(o){return o==null?[]:ru(o,Lr(o))}function sD(o){return o==null?[]:ru(o,bi(o))}function Rp(o,v,E){var j=o==null?t:ea(o,v);return j===t?E:j}function aD(o,v){return o!=null&&gw(o,v,ER)}function Op(o,v){return o!=null&&gw(o,v,LR)}var lD=aw(function(o,v,E){v!=null&&typeof v.toString!="function"&&(v=Uc.call(v)),o[v]=E},Dp(wi)),cD=aw(function(o,v,E){v!=null&&typeof v.toString!="function"&&(v=Uc.call(v)),fn.call(o,v)?o[v].push(E):o[v]=[E]},yt),uD=Bt(Al);function Lr(o){return yi(o)?_0(o):op(o)}function bi(o){return yi(o)?_0(o,!0):zR(o)}function hD(o,v){var E={};return v=yt(v,3),$o(o,function(j,q,ne){Go(E,v(j,q,ne),j)}),E}function dD(o,v){var E={};return v=yt(v,3),$o(o,function(j,q,ne){Go(E,q,v(j,q,ne))}),E}var pD=Oa(function(o,v,E){iu(o,v,E)}),Xw=Oa(function(o,v,E,j){iu(o,v,E,j)}),fD=Ko(function(o,v){var E={};if(o==null)return E;var j=!1;v=y(v,function(ne){return ne=bs(ne,o),j||(j=ne.length>1),ne}),To(o,bp(o),E),j&&(E=Xi(E,a|l|u,lO));for(var q=v.length;q--;)hp(E,v[q]);return E});function gD(o,v){return Zw(o,bu(yt(v)))}var mD=Ko(function(o,v){return o==null?{}:jR(o,v)});function Zw(o,v){if(o==null)return{};var E=y(bp(o),function(j){return[j]});return v=yt(v),H0(o,E,function(j,q){return v(j,q[0])})}function vD(o,v,E){v=bs(v,o);var j=-1,q=v.length;for(q||(q=1,o=t);++j<q;){var ne=o==null?t:o[Mo(v[j])];ne===t&&(j=q,ne=E),o=Xo(ne)?ne.call(o):ne}return o}function yD(o,v,E){return o==null?o:Tl(o,v,E)}function bD(o,v,E,j){return j=typeof j=="function"?j:t,o==null?o:Tl(o,v,E,j)}var Qw=uw(Lr),Jw=uw(bi);function wD(o,v,E){var j=At(o),q=j||xs(o)||Fa(o);if(v=yt(v,4),E==null){var ne=o&&o.constructor;q?E=j?new ne:[]:jn(o)?E=Xo(ne)?Ra(qc(o)):{}:E={}}return(q?Ir:$o)(o,function(ce,pe,ye){return v(E,ce,pe,ye)}),E}function xD(o,v){return o==null?!0:hp(o,v)}function CD(o,v,E){return o==null?o:q0(o,v,fp(E))}function kD(o,v,E,j){return j=typeof j=="function"?j:t,o==null?o:q0(o,v,fp(E),j)}function Pa(o){return o==null?[]:On(o,Lr(o))}function SD(o){return o==null?[]:On(o,bi(o))}function _D(o,v,E){return E===t&&(E=v,v=t),E!==t&&(E=Ji(E),E=E===E?E:0),v!==t&&(v=Ji(v),v=v===v?v:0),Js(Ji(o),v,E)}function AD(o,v,E){return v=Zo(v),E===t?(E=v,v=0):E=Zo(E),o=Ji(o),IR(o,v,E)}function $D(o,v,E){if(E&&typeof E!="boolean"&&ri(o,v,E)&&(v=E=t),E===t&&(typeof v=="boolean"?(E=v,v=t):typeof o=="boolean"&&(E=o,o=t)),o===t&&v===t?(o=0,v=1):(o=Zo(o),v===t?(v=o,o=0):v=Zo(v)),o>v){var j=o;o=v,v=j}if(E||o%1||v%1){var q=k0();return zr(o+q*(v-o+Ue("1e-"+((q+"").length-1))),v)}return lp(o,v)}var TD=Na(function(o,v,E){return v=v.toLowerCase(),o+(E?ex(v):v)});function ex(o){return Np(dn(o).toLowerCase())}function tx(o){return o=dn(o),o&&o.replace(gt,Nn).replace(zo,"")}function MD(o,v,E){o=dn(o),v=Oi(v);var j=o.length;E=E===t?j:Js(Lt(E),0,j);var q=E;return E-=v.length,E>=0&&o.slice(E,q)==v}function ED(o){return o=dn(o),o&&Hs.test(o)?o.replace(Xr,V):o}function LD(o){return o=dn(o),o&&$i.test(o)?o.replace(wr,"\\$&"):o}var ID=Na(function(o,v,E){return o+(E?"-":"")+v.toLowerCase()}),RD=Na(function(o,v,E){return o+(E?" ":"")+v.toLowerCase()}),OD=iw("toLowerCase");function ND(o,v,E){o=dn(o),v=Lt(v);var j=v?zt(o):0;if(!v||j>=v)return o;var q=(v-j)/2;return uu(Zc(q),E)+o+uu(Xc(q),E)}function DD(o,v,E){o=dn(o),v=Lt(v);var j=v?zt(o):0;return v&&j<v?o+uu(v-j,E):o}function FD(o,v,E){o=dn(o),v=Lt(v);var j=v?zt(o):0;return v&&j<v?uu(v-j,E)+o:o}function PD(o,v,E){return E||v==null?v=0:v&&(v=+v),VI(dn(o).replace(sn,""),v||0)}function WD(o,v,E){return(E?ri(o,v,E):v===t)?v=1:v=Lt(v),cp(dn(o),v)}function BD(){var o=arguments,v=dn(o[0]);return o.length<3?v:v.replace(o[1],o[2])}var zD=Na(function(o,v,E){return o+(E?"_":"")+v.toLowerCase()});function HD(o,v,E){return E&&typeof E!="number"&&ri(o,v,E)&&(v=E=t),E=E===t?ee:E>>>0,E?(o=dn(o),o&&(typeof v=="string"||v!=null&&!Ip(v))&&(v=Oi(v),!v&&oe(o))?ws(_t(o),0,E):o.split(v,E)):[]}var jD=Na(function(o,v,E){return o+(E?" ":"")+Np(v)});function UD(o,v,E){return o=dn(o),E=E==null?0:Js(Lt(E),0,o.length),v=Oi(v),o.slice(E,E+v.length)==v}function VD(o,v,E){var j=J.templateSettings;E&&ri(o,v,E)&&(v=t),o=dn(o),v=Cu({},v,j,hw);var q=Cu({},v.imports,j.imports,hw),ne=Lr(q),ce=On(q,ne),pe,ye,Le=0,Ie=v.interpolate||hn,Fe="__p += '",Ze=ti((v.escape||hn).source+"|"+Ie.source+"|"+(Ie===Ro?pi:hn).source+"|"+(v.evaluate||hn).source+"|$","g"),lt="//# sourceURL="+(fn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ao+"]")+`
1472
+ `;o.replace(Ze,function(wt,jt,Xt,Di,ii,Fi){return Xt||(Xt=Di),Fe+=o.slice(Le,Fi).replace(Pt,Z),jt&&(pe=!0,Fe+=`' +
1473
+ __e(`+jt+`) +
1474
+ '`),ii&&(ye=!0,Fe+=`';
1475
+ `+ii+`;
1476
+ __p += '`),Xt&&(Fe+=`' +
1477
+ ((__t = (`+Xt+`)) == null ? '' : __t) +
1478
+ '`),Le=Fi+wt.length,wt}),Fe+=`';
1479
+ `;var bt=fn.call(v,"variable")&&v.variable;if(!bt)Fe=`with (obj) {
1480
+ `+Fe+`
1481
+ }
1482
+ `;else if(Qr.test(bt))throw new dt(b);Fe=(ye?Fe.replace(Ai,""):Fe).replace(Pr,"$1").replace(hi,"$1;"),Fe="function("+(bt||"obj")+`) {
1483
+ `+(bt?"":`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 Ot=rx(function(){return Et(ne,lt+"return "+Fe).apply(t,ce)});if(Ot.source=Fe,Lp(Ot))throw Ot;return Ot}function GD(o){return dn(o).toLowerCase()}function qD(o){return dn(o).toUpperCase()}function KD(o,v,E){if(o=dn(o),o&&(E||v===t))return Tn(o);if(!o||!(v=Oi(v)))return o;var j=_t(o),q=_t(v),ne=Mt(j,q),ce=dr(j,q)+1;return ws(j,ne,ce).join("")}function YD(o,v,E){if(o=dn(o),o&&(E||v===t))return o.slice(0,Wt(o)+1);if(!o||!(v=Oi(v)))return o;var j=_t(o),q=dr(j,_t(v))+1;return ws(j,0,q).join("")}function XD(o,v,E){if(o=dn(o),o&&(E||v===t))return o.replace(sn,"");if(!o||!(v=Oi(v)))return o;var j=_t(o),q=Mt(j,_t(v));return ws(j,q).join("")}function ZD(o,v){var E=L,j=B;if(jn(v)){var q="separator"in v?v.separator:q;E="length"in v?Lt(v.length):E,j="omission"in v?Oi(v.omission):j}o=dn(o);var ne=o.length;if(oe(o)){var ce=_t(o);ne=ce.length}if(E>=ne)return o;var pe=E-zt(j);if(pe<1)return j;var ye=ce?ws(ce,0,pe).join(""):o.slice(0,pe);if(q===t)return ye+j;if(ce&&(pe+=ye.length-pe),Ip(q)){if(o.slice(pe).search(q)){var Le,Ie=ye;for(q.global||(q=ti(q.source,dn(Wr.exec(q))+"g")),q.lastIndex=0;Le=q.exec(Ie);)var Fe=Le.index;ye=ye.slice(0,Fe===t?pe:Fe)}}else if(o.indexOf(Oi(q),pe)!=pe){var Ze=ye.lastIndexOf(q);Ze>-1&&(ye=ye.slice(0,Ze))}return ye+j}function QD(o){return o=dn(o),o&&xo.test(o)?o.replace(br,vt):o}var JD=Na(function(o,v,E){return o+(E?" ":"")+v.toUpperCase()}),Np=iw("toUpperCase");function nx(o,v,E){return o=dn(o),v=E?t:v,v===t?ge(o)?Dn(o):Y(o):o.match(v)||[]}var rx=Bt(function(o,v){try{return $r(o,t,v)}catch(E){return Lp(E)?E:new dt(E)}}),eF=Ko(function(o,v){return Ir(v,function(E){E=Mo(E),Go(o,E,Mp(o[E],o))}),o});function tF(o){var v=o==null?0:o.length,E=yt();return o=v?y(o,function(j){if(typeof j[1]!="function")throw new yn(g);return[E(j[0]),j[1]]}):[],Bt(function(j){for(var q=-1;++q<v;){var ne=o[q];if($r(ne[0],this,j))return $r(ne[1],this,j)}})}function nF(o){return $R(Xi(o,a))}function Dp(o){return function(){return o}}function rF(o,v){return o==null||o!==o?v:o}var iF=sw(),oF=sw(!0);function wi(o){return o}function Fp(o){return D0(typeof o=="function"?o:Xi(o,a))}function sF(o){return P0(Xi(o,a))}function aF(o,v){return W0(o,Xi(v,a))}var lF=Bt(function(o,v){return function(E){return Al(E,o,v)}}),cF=Bt(function(o,v){return function(E){return Al(o,E,v)}});function Pp(o,v,E){var j=Lr(v),q=ru(v,j);E==null&&!(jn(v)&&(q.length||!j.length))&&(E=v,v=o,o=this,q=ru(v,Lr(v)));var ne=!(jn(E)&&"chain"in E)||!!E.chain,ce=Xo(o);return Ir(q,function(pe){var ye=v[pe];o[pe]=ye,ce&&(o.prototype[pe]=function(){var Le=this.__chain__;if(ne||Le){var Ie=o(this.__wrapped__),Fe=Ie.__actions__=vi(this.__actions__);return Fe.push({func:ye,args:arguments,thisArg:o}),Ie.__chain__=Le,Ie}return ye.apply(o,T([this.value()],arguments))})}),o}function uF(){return vn._===this&&(vn._=DI),this}function Wp(){}function hF(o){return o=Lt(o),Bt(function(v){return B0(v,o)})}var dF=mp(y),pF=mp(Rr),fF=mp(W);function ix(o){return kp(o)?we(Mo(o)):UR(o)}function gF(o){return function(v){return o==null?t:ea(o,v)}}var mF=lw(),vF=lw(!0);function Bp(){return[]}function zp(){return!1}function yF(){return{}}function bF(){return""}function wF(){return!0}function xF(o,v){if(o=Lt(o),o<1||o>U)return[];var E=ee,j=zr(o,ee);v=yt(v),o-=ee;for(var q=et(j,v);++E<o;)v(E);return q}function CF(o){return At(o)?y(o,Mo):Ni(o)?[o]:vi(Sw(dn(o)))}function kF(o){var v=++OI;return dn(o)+v}var SF=cu(function(o,v){return o+v},0),_F=vp("ceil"),AF=cu(function(o,v){return o/v},1),$F=vp("floor");function TF(o){return o&&o.length?nu(o,wi,np):t}function MF(o,v){return o&&o.length?nu(o,yt(v,2),np):t}function EF(o){return ve(o,wi)}function LF(o,v){return ve(o,yt(v,2))}function IF(o){return o&&o.length?nu(o,wi,sp):t}function RF(o,v){return o&&o.length?nu(o,yt(v,2),sp):t}var OF=cu(function(o,v){return o*v},1),NF=vp("round"),DF=cu(function(o,v){return o-v},0);function FF(o){return o&&o.length?ut(o,wi):0}function PF(o,v){return o&&o.length?ut(o,yt(v,2)):0}return J.after=sN,J.ary=Nw,J.assign=qN,J.assignIn=Yw,J.assignInWith=Cu,J.assignWith=KN,J.at=YN,J.before=Dw,J.bind=Mp,J.bindAll=eF,J.bindKey=Fw,J.castArray=yN,J.chain=Iw,J.chunk=$O,J.compact=TO,J.concat=MO,J.cond=tF,J.conforms=nF,J.constant=Dp,J.countBy=F2,J.create=XN,J.curry=Pw,J.curryRight=Ww,J.debounce=Bw,J.defaults=ZN,J.defaultsDeep=QN,J.defer=aN,J.delay=lN,J.difference=EO,J.differenceBy=LO,J.differenceWith=IO,J.drop=RO,J.dropRight=OO,J.dropRightWhile=NO,J.dropWhile=DO,J.fill=FO,J.filter=W2,J.flatMap=H2,J.flatMapDeep=j2,J.flatMapDepth=U2,J.flatten=Tw,J.flattenDeep=PO,J.flattenDepth=WO,J.flip=cN,J.flow=iF,J.flowRight=oF,J.fromPairs=BO,J.functions=oD,J.functionsIn=sD,J.groupBy=V2,J.initial=HO,J.intersection=jO,J.intersectionBy=UO,J.intersectionWith=VO,J.invert=lD,J.invertBy=cD,J.invokeMap=q2,J.iteratee=Fp,J.keyBy=K2,J.keys=Lr,J.keysIn=bi,J.map=mu,J.mapKeys=hD,J.mapValues=dD,J.matches=sF,J.matchesProperty=aF,J.memoize=yu,J.merge=pD,J.mergeWith=Xw,J.method=lF,J.methodOf=cF,J.mixin=Pp,J.negate=bu,J.nthArg=hF,J.omit=fD,J.omitBy=gD,J.once=uN,J.orderBy=Y2,J.over=dF,J.overArgs=hN,J.overEvery=pF,J.overSome=fF,J.partial=Ep,J.partialRight=zw,J.partition=X2,J.pick=mD,J.pickBy=Zw,J.property=ix,J.propertyOf=gF,J.pull=YO,J.pullAll=Ew,J.pullAllBy=XO,J.pullAllWith=ZO,J.pullAt=QO,J.range=mF,J.rangeRight=vF,J.rearg=dN,J.reject=J2,J.remove=JO,J.rest=pN,J.reverse=$p,J.sampleSize=tN,J.set=yD,J.setWith=bD,J.shuffle=nN,J.slice=e2,J.sortBy=oN,J.sortedUniq=a2,J.sortedUniqBy=l2,J.split=HD,J.spread=fN,J.tail=c2,J.take=u2,J.takeRight=h2,J.takeRightWhile=d2,J.takeWhile=p2,J.tap=T2,J.throttle=gN,J.thru=gu,J.toArray=Gw,J.toPairs=Qw,J.toPairsIn=Jw,J.toPath=CF,J.toPlainObject=Kw,J.transform=wD,J.unary=mN,J.union=f2,J.unionBy=g2,J.unionWith=m2,J.uniq=v2,J.uniqBy=y2,J.uniqWith=b2,J.unset=xD,J.unzip=Tp,J.unzipWith=Lw,J.update=CD,J.updateWith=kD,J.values=Pa,J.valuesIn=SD,J.without=w2,J.words=nx,J.wrap=vN,J.xor=x2,J.xorBy=C2,J.xorWith=k2,J.zip=S2,J.zipObject=_2,J.zipObjectDeep=A2,J.zipWith=$2,J.entries=Qw,J.entriesIn=Jw,J.extend=Yw,J.extendWith=Cu,Pp(J,J),J.add=SF,J.attempt=rx,J.camelCase=TD,J.capitalize=ex,J.ceil=_F,J.clamp=_D,J.clone=bN,J.cloneDeep=xN,J.cloneDeepWith=CN,J.cloneWith=wN,J.conformsTo=kN,J.deburr=tx,J.defaultTo=rF,J.divide=AF,J.endsWith=MD,J.eq=po,J.escape=ED,J.escapeRegExp=LD,J.every=P2,J.find=B2,J.findIndex=Aw,J.findKey=JN,J.findLast=z2,J.findLastIndex=$w,J.findLastKey=eD,J.floor=$F,J.forEach=Rw,J.forEachRight=Ow,J.forIn=tD,J.forInRight=nD,J.forOwn=rD,J.forOwnRight=iD,J.get=Rp,J.gt=SN,J.gte=_N,J.has=aD,J.hasIn=Op,J.head=Mw,J.identity=wi,J.includes=G2,J.indexOf=zO,J.inRange=AD,J.invoke=uD,J.isArguments=ra,J.isArray=At,J.isArrayBuffer=AN,J.isArrayLike=yi,J.isArrayLikeObject=ir,J.isBoolean=$N,J.isBuffer=xs,J.isDate=TN,J.isElement=MN,J.isEmpty=EN,J.isEqual=LN,J.isEqualWith=IN,J.isError=Lp,J.isFinite=RN,J.isFunction=Xo,J.isInteger=Hw,J.isLength=wu,J.isMap=jw,J.isMatch=ON,J.isMatchWith=NN,J.isNaN=DN,J.isNative=FN,J.isNil=WN,J.isNull=PN,J.isNumber=Uw,J.isObject=jn,J.isObjectLike=Qn,J.isPlainObject=Il,J.isRegExp=Ip,J.isSafeInteger=BN,J.isSet=Vw,J.isString=xu,J.isSymbol=Ni,J.isTypedArray=Fa,J.isUndefined=zN,J.isWeakMap=HN,J.isWeakSet=jN,J.join=GO,J.kebabCase=ID,J.last=Qi,J.lastIndexOf=qO,J.lowerCase=RD,J.lowerFirst=OD,J.lt=UN,J.lte=VN,J.max=TF,J.maxBy=MF,J.mean=EF,J.meanBy=LF,J.min=IF,J.minBy=RF,J.stubArray=Bp,J.stubFalse=zp,J.stubObject=yF,J.stubString=bF,J.stubTrue=wF,J.multiply=OF,J.nth=KO,J.noConflict=uF,J.noop=Wp,J.now=vu,J.pad=ND,J.padEnd=DD,J.padStart=FD,J.parseInt=PD,J.random=$D,J.reduce=Z2,J.reduceRight=Q2,J.repeat=WD,J.replace=BD,J.result=vD,J.round=NF,J.runInContext=fe,J.sample=eN,J.size=rN,J.snakeCase=zD,J.some=iN,J.sortedIndex=t2,J.sortedIndexBy=n2,J.sortedIndexOf=r2,J.sortedLastIndex=i2,J.sortedLastIndexBy=o2,J.sortedLastIndexOf=s2,J.startCase=jD,J.startsWith=UD,J.subtract=DF,J.sum=FF,J.sumBy=PF,J.template=VD,J.times=xF,J.toFinite=Zo,J.toInteger=Lt,J.toLength=qw,J.toLower=GD,J.toNumber=Ji,J.toSafeInteger=GN,J.toString=dn,J.toUpper=qD,J.trim=KD,J.trimEnd=YD,J.trimStart=XD,J.truncate=ZD,J.unescape=QD,J.uniqueId=kF,J.upperCase=JD,J.upperFirst=Np,J.each=Rw,J.eachRight=Ow,J.first=Mw,Pp(J,function(){var o={};return $o(J,function(v,E){fn.call(J.prototype,E)||(o[E]=v)}),o}(),{chain:!1}),J.VERSION=r,Ir(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){J[o].placeholder=J}),Ir(["drop","take"],function(o,v){Gt.prototype[o]=function(E){E=E===t?1:kr(Lt(E),0);var j=this.__filtered__&&!v?new Gt(this):this.clone();return j.__filtered__?j.__takeCount__=zr(E,j.__takeCount__):j.__views__.push({size:zr(E,ee),type:o+(j.__dir__<0?"Right":"")}),j},Gt.prototype[o+"Right"]=function(E){return this.reverse()[o](E).reverse()}}),Ir(["filter","map","takeWhile"],function(o,v){var E=v+1,j=E==A||E==D;Gt.prototype[o]=function(q){var ne=this.clone();return ne.__iteratees__.push({iteratee:yt(q,3),type:E}),ne.__filtered__=ne.__filtered__||j,ne}}),Ir(["head","last"],function(o,v){var E="take"+(v?"Right":"");Gt.prototype[o]=function(){return this[E](1).value()[0]}}),Ir(["initial","tail"],function(o,v){var E="drop"+(v?"":"Right");Gt.prototype[o]=function(){return this.__filtered__?new Gt(this):this[E](1)}}),Gt.prototype.compact=function(){return this.filter(wi)},Gt.prototype.find=function(o){return this.filter(o).head()},Gt.prototype.findLast=function(o){return this.reverse().find(o)},Gt.prototype.invokeMap=Bt(function(o,v){return typeof o=="function"?new Gt(this):this.map(function(E){return Al(E,o,v)})}),Gt.prototype.reject=function(o){return this.filter(bu(yt(o)))},Gt.prototype.slice=function(o,v){o=Lt(o);var E=this;return E.__filtered__&&(o>0||v<0)?new Gt(E):(o<0?E=E.takeRight(-o):o&&(E=E.drop(o)),v!==t&&(v=Lt(v),E=v<0?E.dropRight(-v):E.take(v-o)),E)},Gt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Gt.prototype.toArray=function(){return this.take(ee)},$o(Gt.prototype,function(o,v){var E=/^(?:filter|find|map|reject)|While$/.test(v),j=/^(?:head|last)$/.test(v),q=J[j?"take"+(v=="last"?"Right":""):v],ne=j||/^find/.test(v);q&&(J.prototype[v]=function(){var ce=this.__wrapped__,pe=j?[1]:arguments,ye=ce instanceof Gt,Le=pe[0],Ie=ye||At(ce),Fe=function(jt){var Xt=q.apply(J,T([jt],pe));return j&&Ze?Xt[0]:Xt};Ie&&E&&typeof Le=="function"&&Le.length!=1&&(ye=Ie=!1);var Ze=this.__chain__,lt=!!this.__actions__.length,bt=ne&&!Ze,Ot=ye&&!lt;if(!ne&&Ie){ce=Ot?ce:new Gt(this);var wt=o.apply(ce,pe);return wt.__actions__.push({func:gu,args:[Fe],thisArg:t}),new Yi(wt,Ze)}return bt&&Ot?o.apply(this,pe):(wt=this.thru(Fe),bt?j?wt.value()[0]:wt.value():wt)})}),Ir(["pop","push","shift","sort","splice","unshift"],function(o){var v=Er[o],E=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",j=/^(?:pop|shift)$/.test(o);J.prototype[o]=function(){var q=arguments;if(j&&!this.__chain__){var ne=this.value();return v.apply(At(ne)?ne:[],q)}return this[E](function(ce){return v.apply(At(ce)?ce:[],q)})}}),$o(Gt.prototype,function(o,v){var E=J[v];if(E){var j=E.name+"";fn.call(Ia,j)||(Ia[j]=[]),Ia[j].push({name:v,func:E})}}),Ia[lu(t,w).name]=[{name:"wrapper",func:t}],Gt.prototype.clone=QI,Gt.prototype.reverse=JI,Gt.prototype.value=eR,J.prototype.at=M2,J.prototype.chain=E2,J.prototype.commit=L2,J.prototype.next=I2,J.prototype.plant=O2,J.prototype.reverse=N2,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=D2,J.prototype.first=J.prototype.head,bl&&(J.prototype[bl]=R2),J},Yt=pr();hr?((hr.exports=Yt)._=Yt,En._=Yt):vn._=Yt}).call(SS)}(Jl,Jl.exports)),Jl.exports}var AS=_S();fr("I",Dl(AS)).debounce(function(){this.rebuildDisplayText()},300);var Zg={exports:{}},Qg;function $S(){return Qg||(Qg=1,function(n,e){(function(){ace.require(["ace/mode/text"],function(t){n&&(n.exports=t)})})()}(Zg)),Zg.exports}$S();const TS=!0,gr="u-",MS="uplot",ES=gr+"hz",LS=gr+"vt",IS=gr+"title",RS=gr+"wrap",OS=gr+"under",NS=gr+"over",DS=gr+"axis",Is=gr+"off",FS=gr+"select",PS=gr+"cursor-x",WS=gr+"cursor-y",BS=gr+"cursor-pt",zS=gr+"legend",HS=gr+"live",jS=gr+"inline",US=gr+"series",VS=gr+"marker",Jg=gr+"label",GS=gr+"value",Za="width",Qa="height",Ja="top",em="bottom",da="left",eh="right",th="#000",tm=th+"0",nh="mousemove",nm="mousedown",rh="mouseup",rm="mouseenter",im="mouseleave",om="dblclick",qS="resize",KS="scroll",sm="change",ec="dppxchange",ih="--",pa=typeof window<"u",oh=pa?document:null,fa=pa?window:null,YS=pa?navigator:null;let rn,tc;function sh(){let n=devicePixelRatio;rn!=n&&(rn=n,tc&&ch(sm,tc,sh),tc=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),Rs(sm,tc,sh),fa.dispatchEvent(new CustomEvent(ec)))}function xi(n,e){if(e!=null){let t=n.classList;!t.contains(e)&&t.add(e)}}function ah(n,e){let t=n.classList;t.contains(e)&&t.remove(e)}function Mn(n,e,t){n.style[e]=t+"px"}function ro(n,e,t,r){let d=oh.createElement(n);return e!=null&&xi(d,e),t!=null&&t.insertBefore(d,r),d}function Pi(n,e){return ro("div",n,e)}const am=new WeakMap;function vo(n,e,t,r,d){let p="translate("+e+"px,"+t+"px)",g=am.get(n);p!=g&&(n.style.transform=p,am.set(n,p),e<0||t<0||e>r||t>d?xi(n,Is):ah(n,Is))}const lm=new WeakMap;function cm(n,e,t){let r=e+t,d=lm.get(n);r!=d&&(lm.set(n,r),n.style.background=e,n.style.borderColor=t)}const um=new WeakMap;function hm(n,e,t,r){let d=e+""+t,p=um.get(n);d!=p&&(um.set(n,d),n.style.height=t+"px",n.style.width=e+"px",n.style.marginLeft=r?-e/2+"px":0,n.style.marginTop=r?-t/2+"px":0)}const lh={passive:!0},XS={...lh,capture:!0};function Rs(n,e,t,r){e.addEventListener(n,t,r?XS:lh)}function ch(n,e,t,r){e.removeEventListener(n,t,lh)}pa&&sh();function io(n,e,t,r){let d;t=t||0,r=r||e.length-1;let p=r<=2147483647;for(;r-t>1;)d=p?t+r>>1:ki((t+r)/2),e[d]<n?t=d:r=d;return n-e[t]<=e[r]-n?t:r}function dm(n){return(e,t,r)=>{let d=-1,p=-1;for(let g=t;g<=r;g++)if(n(e[g])){d=g;break}for(let g=r;g>=t;g--)if(n(e[g])){p=g;break}return[d,p]}}const pm=n=>n!=null,fm=n=>n!=null&&n>0,nc=dm(pm),ZS=dm(fm);function QS(n,e,t,r=0,d=!1){let p=d?ZS:nc,g=d?fm:pm;[e,t]=p(n,e,t);let b=n[e],h=n[e];if(e>-1)if(r==1)b=n[e],h=n[t];else if(r==-1)b=n[t],h=n[e];else for(let f=e;f<=t;f++){let s=n[f];g(s)&&(s<b?b=s:s>h&&(h=s))}return[b??bn,h??-bn]}function rc(n,e,t,r){let d=vm(n),p=vm(e);n==e&&(d==-1?(n*=t,e/=t):(n/=t,e*=t));let g=t==10?Eo:ym,b=d==1?ki:Wi,h=p==1?Wi:ki,f=b(g(mr(n))),s=h(g(mr(e))),a=ga(t,f),l=ga(t,s);return t==10&&(f<0&&(a=wn(a,-f)),s<0&&(l=wn(l,-s))),r||t==2?(n=a*d,e=l*p):(n=_m(n,a),e=sc(e,l)),[n,e]}function uh(n,e,t,r){let d=rc(n,e,t,r);return n==0&&(d[0]=0),e==0&&(d[1]=0),d}const hh=.1,gm={mode:3,pad:hh},el={pad:0,soft:null,mode:0},JS={min:el,max:el};function ic(n,e,t,r){return ac(t)?mm(n,e,t):(el.pad=t,el.soft=r?0:null,el.mode=r?3:0,mm(n,e,JS))}function Jt(n,e){return n??e}function e_(n,e,t){for(e=Jt(e,0),t=Jt(t,n.length-1);e<=t;){if(n[e]!=null)return!0;e++}return!1}function mm(n,e,t){let r=t.min,d=t.max,p=Jt(r.pad,0),g=Jt(d.pad,0),b=Jt(r.hard,-bn),h=Jt(d.hard,bn),f=Jt(r.soft,bn),s=Jt(d.soft,-bn),a=Jt(r.mode,0),l=Jt(d.mode,0),u=e-n,i=Eo(u),c=Ur(mr(n),mr(e)),m=Eo(c),w=mr(m-i);(u<1e-24||w>10)&&(u=0,(n==0||e==0)&&(u=1e-24,a==2&&f!=bn&&(p=0),l==2&&s!=-bn&&(g=0)));let x=u||c||1e3,M=Eo(x),$=ga(10,ki(M)),k=x*(u==0?n==0?.1:1:p),C=wn(_m(n-k,$/10),24),R=n>=f&&(a==1||a==3&&C<=f||a==2&&C>=f)?f:bn,N=Ur(b,C<R&&n>=R?R:oo(R,C)),I=x*(u==0?e==0?.1:1:g),L=wn(sc(e+I,$/10),24),B=e<=s&&(l==1||l==3&&L>=s||l==2&&L<=s)?s:-bn,P=oo(h,L>B&&e<=B?B:Ur(B,L));return N==P&&N==0&&(P=100),[N,P]}const t_=new Intl.NumberFormat(pa?YS.language:"en-US"),dh=n=>t_.format(n),Ci=Math,oc=Ci.PI,mr=Ci.abs,ki=Ci.floor,vr=Ci.round,Wi=Ci.ceil,oo=Ci.min,Ur=Ci.max,ga=Ci.pow,vm=Ci.sign,Eo=Ci.log10,ym=Ci.log2,n_=(n,e=1)=>Ci.sinh(n)*e,ph=(n,e=1)=>Ci.asinh(n/e),bn=1/0;function bm(n){return(Eo((n^n>>31)-(n>>31))|0)+1}function fh(n,e,t){return oo(Ur(n,e),t)}function wm(n){return typeof n=="function"}function Ut(n){return wm(n)?n:()=>n}const r_=()=>{},xm=n=>n,Cm=(n,e)=>e,i_=n=>null,km=n=>!0,Sm=(n,e)=>n==e,o_=/\.\d*?(?=9{6,}|0{6,})/gm,Os=n=>{if($m(n)||rs.has(n))return n;const e=`${n}`,t=e.match(o_);if(t==null)return n;let r=t[0].length-1;if(e.indexOf("e-")!=-1){let[d,p]=e.split("e");return+`${Os(d)}e${p}`}return wn(n,r)};function Ns(n,e){return Os(wn(Os(n/e))*e)}function sc(n,e){return Os(Wi(Os(n/e))*e)}function _m(n,e){return Os(ki(Os(n/e))*e)}function wn(n,e=0){if($m(n))return n;let t=10**e,r=n*t*(1+Number.EPSILON);return vr(r)/t}const rs=new Map;function Am(n){return((""+n).split(".")[1]||"").length}function tl(n,e,t,r){let d=[],p=r.map(Am);for(let g=e;g<t;g++){let b=mr(g),h=wn(ga(n,g),b);for(let f=0;f<r.length;f++){let s=n==10?+`${r[f]}e${g}`:r[f]*h,a=(g>=0?0:b)+(g>=p[f]?0:p[f]),l=n==10?s:wn(s,a);d.push(l),rs.set(l,a)}}return d}const nl={},gh=[],ma=[null,null],is=Array.isArray,$m=Number.isInteger,s_=n=>n===void 0;function Tm(n){return typeof n=="string"}function ac(n){let e=!1;if(n!=null){let t=n.constructor;e=t==null||t==Object}return e}function a_(n){return n!=null&&typeof n=="object"}const l_=Object.getPrototypeOf(Uint8Array),Mm="__proto__";function va(n,e=ac){let t;if(is(n)){let r=n.find(d=>d!=null);if(is(r)||e(r)){t=Array(n.length);for(let d=0;d<n.length;d++)t[d]=va(n[d],e)}else t=n.slice()}else if(n instanceof l_)t=n.slice();else if(e(n)){t={};for(let r in n)r!=Mm&&(t[r]=va(n[r],e))}else t=n;return t}function ar(n){let e=arguments;for(let t=1;t<e.length;t++){let r=e[t];for(let d in r)d!=Mm&&(ac(n[d])?ar(n[d],va(r[d])):n[d]=va(r[d]))}return n}const c_=0,u_=1,h_=2;function d_(n,e,t){for(let r=0,d,p=-1;r<e.length;r++){let g=e[r];if(g>p){for(d=g-1;d>=0&&n[d]==null;)n[d--]=null;for(d=g+1;d<t&&n[d]==null;)n[p=d++]=null}}}function p_(n,e){if(m_(n)){let g=n[0].slice();for(let b=1;b<n.length;b++)g.push(...n[b].slice(1));return v_(g[0])||(g=g_(g)),g}let t=new Set;for(let g=0;g<n.length;g++){let b=n[g][0],h=b.length;for(let f=0;f<h;f++)t.add(b[f])}let r=[Array.from(t).sort((g,b)=>g-b)],d=r[0].length,p=new Map;for(let g=0;g<d;g++)p.set(r[0][g],g);for(let g=0;g<n.length;g++){let b=n[g],h=b[0];for(let f=1;f<b.length;f++){let s=b[f],a=Array(d).fill(void 0),l=e?e[g][f]:u_,u=[];for(let i=0;i<s.length;i++){let c=s[i],m=p.get(h[i]);c===null?l!=c_&&(a[m]=c,l==h_&&u.push(m)):a[m]=c}d_(a,u,d),r.push(a)}}return r}const f_=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function g_(n){let e=n[0],t=e.length,r=Array(t);for(let p=0;p<r.length;p++)r[p]=p;r.sort((p,g)=>e[p]-e[g]);let d=[];for(let p=0;p<n.length;p++){let g=n[p],b=Array(t);for(let h=0;h<t;h++)b[h]=g[r[h]];d.push(b)}return d}function m_(n){let e=n[0][0],t=e.length;for(let r=1;r<n.length;r++){let d=n[r][0];if(d.length!=t)return!1;if(d!=e){for(let p=0;p<t;p++)if(d[p]!=e[p])return!1}}return!0}function v_(n,e=100){const t=n.length;if(t<=1)return!0;let r=0,d=t-1;for(;r<=d&&n[r]==null;)r++;for(;d>=r&&n[d]==null;)d--;if(d<=r)return!0;const p=Ur(1,ki((d-r+1)/e));for(let g=n[r],b=r+p;b<=d;b+=p){const h=n[b];if(h!=null){if(h<=g)return!1;g=h}}return!0}const Em=["January","February","March","April","May","June","July","August","September","October","November","December"],Lm=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Im(n){return n.slice(0,3)}const y_=Lm.map(Im),b_=Em.map(Im),w_={MMMM:Em,MMM:b_,WWWW:Lm,WWW:y_};function rl(n){return(n<10?"0":"")+n}function x_(n){return(n<10?"00":n<100?"0":"")+n}const C_={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,e)=>e.MMMM[n.getMonth()],MMM:(n,e)=>e.MMM[n.getMonth()],MM:n=>rl(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>rl(n.getDate()),D:n=>n.getDate(),WWWW:(n,e)=>e.WWWW[n.getDay()],WWW:(n,e)=>e.WWW[n.getDay()],HH:n=>rl(n.getHours()),H:n=>n.getHours(),h:n=>{let e=n.getHours();return e==0?12:e>12?e-12:e},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>rl(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>rl(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>x_(n.getMilliseconds())};function mh(n,e){e=e||w_;let t=[],r=/\{([a-z]+)\}|[^{]+/gi,d;for(;d=r.exec(n);)t.push(d[0][0]=="{"?C_[d[1]]:d[0]);return p=>{let g="";for(let b=0;b<t.length;b++)g+=typeof t[b]=="string"?t[b]:t[b](p,e);return g}}const k_=new Intl.DateTimeFormat().resolvedOptions().timeZone;function S_(n,e){let t;return e=="UTC"||e=="Etc/UTC"?t=new Date(+n+n.getTimezoneOffset()*6e4):e==k_?t=n:(t=new Date(n.toLocaleString("en-US",{timeZone:e})),t.setMilliseconds(n.getMilliseconds())),t}const Rm=n=>n%1==0,lc=[1,2,2.5,5],__=tl(10,-32,0,lc),Om=tl(10,0,32,lc),A_=Om.filter(Rm),Ds=__.concat(Om),vh=`
1489
+ `,Nm="{YYYY}",Dm=vh+Nm,Fm="{M}/{D}",il=vh+Fm,cc=il+"/{YY}",Pm="{aa}",$_="{h}:{mm}",ya=$_+Pm,Wm=vh+ya,Bm=":{ss}",un=null;function zm(n){let e=n*1e3,t=e*60,r=t*60,d=r*24,p=d*30,g=d*365,b=(n==1?tl(10,0,3,lc).filter(Rm):tl(10,-3,0,lc)).concat([e,e*5,e*10,e*15,e*30,t,t*5,t*10,t*15,t*30,r,r*2,r*3,r*4,r*6,r*8,r*12,d,d*2,d*3,d*4,d*5,d*6,d*7,d*8,d*9,d*10,d*15,p,p*2,p*3,p*4,p*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const h=[[g,Nm,un,un,un,un,un,un,1],[d*28,"{MMM}",Dm,un,un,un,un,un,1],[d,Fm,Dm,un,un,un,un,un,1],[r,"{h}"+Pm,cc,un,il,un,un,un,1],[t,ya,cc,un,il,un,un,un,1],[e,Bm,cc+" "+ya,un,il+" "+ya,un,Wm,un,1],[n,Bm+".{fff}",cc+" "+ya,un,il+" "+ya,un,Wm,un,1]];function f(s){return(a,l,u,i,c,m)=>{let w=[],x=c>=g,M=c>=p&&c<g,$=s(u),k=wn($*n,3),C=yh($.getFullYear(),x?0:$.getMonth(),M||x?1:$.getDate()),R=wn(C*n,3);if(M||x){let N=M?c/p:0,I=x?c/g:0,L=k==R?k:wn(yh(C.getFullYear()+I,C.getMonth()+N,1)*n,3),B=new Date(vr(L/n)),P=B.getFullYear(),O=B.getMonth();for(let A=0;L<=i;A++){let S=yh(P+I*A,O+N*A,1),D=S-s(wn(S*n,3));L=wn((+S+D)*n,3),L<=i&&w.push(L)}}else{let N=c>=d?d:c,I=ki(u)-ki(k),L=R+I+sc(k-R,N);w.push(L);let B=s(L),P=B.getHours()+B.getMinutes()/t+B.getSeconds()/r,O=c/r,A=a.axes[l]._space,S=m/A;for(;L=wn(L+c,n==1?0:3),!(L>i);)if(O>1){let D=ki(wn(P+O,6))%24,z=s(L).getHours()-D;z>1&&(z=-1),L-=z*r,P=(P+O)%24;let U=w[w.length-1];wn((L-U)/c,3)*S>=.7&&w.push(L)}else w.push(L)}return w}}return[b,h,f]}const[T_,M_,E_]=zm(1),[L_,I_,R_]=zm(.001);tl(2,-53,53,[1]);function Hm(n,e){return n.map(t=>t.map((r,d)=>d==0||d==8||r==null?r:e(d==1||t[8]==0?r:t[1]+r)))}function jm(n,e){return(t,r,d,p,g)=>{let b=e.find(i=>g>=i[0])||e[e.length-1],h,f,s,a,l,u;return r.map(i=>{let c=n(i),m=c.getFullYear(),w=c.getMonth(),x=c.getDate(),M=c.getHours(),$=c.getMinutes(),k=c.getSeconds(),C=m!=h&&b[2]||w!=f&&b[3]||x!=s&&b[4]||M!=a&&b[5]||$!=l&&b[6]||k!=u&&b[7]||b[1];return h=m,f=w,s=x,a=M,l=$,u=k,C(c)})}}function O_(n,e){let t=mh(e);return(r,d,p,g,b)=>d.map(h=>t(n(h)))}function yh(n,e,t){return new Date(n,e,t)}function Um(n,e){return e(n)}const N_="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Vm(n,e){return(t,r,d,p)=>p==null?ih:e(n(r))}function D_(n,e){let t=n.series[e];return t.width?t.stroke(n,e):t.points.width?t.points.stroke(n,e):null}function F_(n,e){return n.series[e].fill(n,e)}const P_={show:!0,live:!0,isolate:!1,mount:r_,markers:{show:!0,width:2,stroke:D_,fill:F_,dash:"solid"},idx:null,idxs:null,values:[]};function W_(n,e){let t=n.cursor.points,r=Pi(),d=t.size(n,e);Mn(r,Za,d),Mn(r,Qa,d);let p=d/-2;Mn(r,"marginLeft",p),Mn(r,"marginTop",p);let g=t.width(n,e,d);return g&&Mn(r,"borderWidth",g),r}function B_(n,e){let t=n.series[e].points;return t._fill||t._stroke}function z_(n,e){let t=n.series[e].points;return t._stroke||t._fill}function H_(n,e){return n.series[e].points.size}const bh=[0,0];function j_(n,e,t){return bh[0]=e,bh[1]=t,bh}function uc(n,e,t,r=!0){return d=>{d.button==0&&(!r||d.target==e)&&t(d)}}function wh(n,e,t,r=!0){return d=>{(!r||d.target==e)&&t(d)}}const U_={show:!0,x:!0,y:!0,lock:!1,move:j_,points:{one:!1,show:W_,size:H_,width:0,stroke:z_,fill:B_},bind:{mousedown:uc,mouseup:uc,click:uc,dblclick:uc,mousemove:wh,mouseleave:wh,mouseenter:wh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,e,t,r,d)=>r-d,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Gm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},xh=ar({},Gm,{filter:Cm}),qm=ar({},xh,{size:10}),Km=ar({},Gm,{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"',Ym="bold "+Ch,Xm=1.5,Zm={show:!0,scale:"x",stroke:th,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Ym,side:2,grid:xh,ticks:qm,border:Km,font:Ch,lineGap:Xm,rotate:0},V_="Value",G_="Time",Qm={show:!0,scale:"x",auto:!1,sorted:1,min:bn,max:-bn,idxs:[]};function q_(n,e,t,r,d){return e.map(p=>p==null?"":dh(p))}function K_(n,e,t,r,d,p,g){let b=[],h=rs.get(d)||0;t=g?t:wn(sc(t,d),h);for(let f=t;f<=r;f=wn(f+d,h))b.push(Object.is(f,-0)?0:f);return b}function kh(n,e,t,r,d,p,g){const b=[],h=n.scales[n.axes[e].scale].log,f=h==10?Eo:ym,s=ki(f(t));d=ga(h,s),h==10&&(d=Ds[io(d,Ds)]);let a=t,l=d*h;h==10&&(l=Ds[io(l,Ds)]);do b.push(a),a=a+d,h==10&&!rs.has(a)&&(a=wn(a,rs.get(d))),a>=l&&(d=a,l=d*h,h==10&&(l=Ds[io(l,Ds)]));while(a<=r);return b}function Y_(n,e,t,r,d,p,g){let b=n.scales[n.axes[e].scale].asinh,h=r>b?kh(n,e,Ur(b,t),r,d):[b],f=r>=0&&t<=0?[0]:[];return(t<-b?kh(n,e,Ur(b,-r),-t,d):[b]).reverse().map(s=>-s).concat(f,h)}const Jm=/./,X_=/[12357]/,Z_=/[125]/,ev=/1/,Sh=(n,e,t,r)=>n.map((d,p)=>e==4&&d==0||p%r==0&&t.test(d.toExponential()[d<0?1:0])?d:null);function Q_(n,e,t,r,d){let p=n.axes[t],g=p.scale,b=n.scales[g],h=n.valToPos,f=p._space,s=h(10,g),a=h(9,g)-s>=f?Jm:h(7,g)-s>=f?X_:h(5,g)-s>=f?Z_:ev;if(a==ev){let l=mr(h(1,g)-s);if(l<f)return Sh(e.slice().reverse(),b.distr,a,Wi(f/l)).reverse()}return Sh(e,b.distr,a,1)}function J_(n,e,t,r,d){let p=n.axes[t],g=p.scale,b=p._space,h=n.valToPos,f=mr(h(1,g)-h(2,g));return f<b?Sh(e.slice().reverse(),3,Jm,Wi(b/f)).reverse():e}function eA(n,e,t,r){return r==null?ih:e==null?"":dh(e)}const tv={show:!0,scale:"y",stroke:th,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Ym,side:3,grid:xh,ticks:qm,border:Km,font:Ch,lineGap:Xm,rotate:0};function tA(n,e){let t=3+(n||1)*2;return wn(t*e,3)}function nA(n,e){let{scale:t,idxs:r}=n.series[0],d=n._data[0],p=n.valToPos(d[r[0]],t,!0),g=n.valToPos(d[r[1]],t,!0),b=mr(g-p),h=n.series[e],f=b/(h.points.space*rn);return r[1]-r[0]<=f}const nv={scale:null,auto:!0,sorted:0,min:bn,max:-bn},rv=(n,e,t,r,d)=>d,iv={show:!0,auto:!0,sorted:0,gaps:rv,alpha:1,facets:[ar({},nv,{scale:"x"}),ar({},nv,{scale:"y"})]},ov={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:rv,alpha:1,points:{show:nA,filter:null},values:null,min:bn,max:-bn,idxs:[],path:null,clip:null};function rA(n,e,t,r,d){return t/10}const sv={time:TS,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},iA=ar({},sv,{time:!1,ori:1}),av={};function lv(n,e){let t=av[n];return t||(t={key:n,plots:[],sub(r){t.plots.push(r)},unsub(r){t.plots=t.plots.filter(d=>d!=r)},pub(r,d,p,g,b,h,f){for(let s=0;s<t.plots.length;s++)t.plots[s]!=d&&t.plots[s].pub(r,d,p,g,b,h,f)}},n!=null&&(av[n]=t)),t}const ba=1,_h=2;function Fs(n,e,t){const r=n.mode,d=n.series[e],p=r==2?n._data[e]:n._data,g=n.scales,b=n.bbox;let h=p[0],f=r==2?p[1]:p[e],s=r==2?g[d.facets[0].scale]:g[n.series[0].scale],a=r==2?g[d.facets[1].scale]:g[d.scale],l=b.left,u=b.top,i=b.width,c=b.height,m=n.valToPosH,w=n.valToPosV;return s.ori==0?t(d,h,f,s,a,m,w,l,u,i,c,dc,wa,fc,hv,pv):t(d,h,f,s,a,w,m,u,l,c,i,pc,xa,Th,dv,fv)}function Ah(n,e){let t=0,r=0,d=Jt(n.bands,gh);for(let p=0;p<d.length;p++){let g=d[p];g.series[0]==e?t=g.dir:g.series[1]==e&&(g.dir==1?r|=1:r|=2)}return[t,r==1?-1:r==2?1:r==3?2:0]}function oA(n,e,t,r,d){let p=n.mode,g=n.series[e],b=p==2?g.facets[1].scale:g.scale,h=n.scales[b];return d==-1?h.min:d==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function Lo(n,e,t,r,d,p){return Fs(n,e,(g,b,h,f,s,a,l,u,i,c,m)=>{let w=g.pxRound;const x=f.dir*(f.ori==0?1:-1),M=f.ori==0?wa:xa;let $,k;x==1?($=t,k=r):($=r,k=t);let C=w(a(b[$],f,c,u)),R=w(l(h[$],s,m,i)),N=w(a(b[k],f,c,u)),I=w(l(p==1?s.max:s.min,s,m,i)),L=new Path2D(d);return M(L,N,I),M(L,C,I),M(L,C,R),L})}function hc(n,e,t,r,d,p){let g=null;if(n.length>0){g=new Path2D;const b=e==0?fc:Th;let h=t;for(let a=0;a<n.length;a++){let l=n[a];if(l[1]>l[0]){let u=l[0]-h;u>0&&b(g,h,r,u,r+p),h=l[1]}}let f=t+d-h,s=10;f>0&&b(g,h,r-s/2,f,r+p+s)}return g}function sA(n,e,t){let r=n[n.length-1];r&&r[0]==e?r[1]=t:n.push([e,t])}function $h(n,e,t,r,d,p,g){let b=[],h=n.length;for(let f=d==1?t:r;f>=t&&f<=r;f+=d)if(e[f]===null){let s=f,a=f;if(d==1)for(;++f<=r&&e[f]===null;)a=f;else for(;--f>=t&&e[f]===null;)a=f;let l=p(n[s]),u=a==s?l:p(n[a]),i=s-d;l=g<=0&&i>=0&&i<h?p(n[i]):l;let c=a+d;u=g>=0&&c>=0&&c<h?p(n[c]):u,u>=l&&b.push([l,u])}return b}function cv(n){return n==0?xm:n==1?vr:e=>Ns(e,n)}function uv(n){let e=n==0?dc:pc,t=n==0?(d,p,g,b,h,f)=>{d.arcTo(p,g,b,h,f)}:(d,p,g,b,h,f)=>{d.arcTo(g,p,h,b,f)},r=n==0?(d,p,g,b,h)=>{d.rect(p,g,b,h)}:(d,p,g,b,h)=>{d.rect(g,p,h,b)};return(d,p,g,b,h,f=0,s=0)=>{f==0&&s==0?r(d,p,g,b,h):(f=oo(f,b/2,h/2),s=oo(s,b/2,h/2),e(d,p+f,g),t(d,p+b,g,p+b,g+h,f),t(d,p+b,g+h,p,g+h,s),t(d,p,g+h,p,g,s),t(d,p,g,p+b,g,f),d.closePath())}}const dc=(n,e,t)=>{n.moveTo(e,t)},pc=(n,e,t)=>{n.moveTo(t,e)},wa=(n,e,t)=>{n.lineTo(e,t)},xa=(n,e,t)=>{n.lineTo(t,e)},fc=uv(0),Th=uv(1),hv=(n,e,t,r,d,p)=>{n.arc(e,t,r,d,p)},dv=(n,e,t,r,d,p)=>{n.arc(t,e,r,d,p)},pv=(n,e,t,r,d,p,g)=>{n.bezierCurveTo(e,t,r,d,p,g)},fv=(n,e,t,r,d,p,g)=>{n.bezierCurveTo(t,e,d,r,g,p)};function gv(n){return(e,t,r,d,p)=>Fs(e,t,(g,b,h,f,s,a,l,u,i,c,m)=>{let{pxRound:w,points:x}=g,M,$;f.ori==0?(M=dc,$=hv):(M=pc,$=dv);const k=wn(x.width*rn,3);let C=(x.size-x.width)/2*rn,R=wn(C*2,3),N=new Path2D,I=new Path2D,{left:L,top:B,width:P,height:O}=e.bbox;fc(I,L-R,B-R,P+R*2,O+R*2);const A=S=>{if(h[S]!=null){let D=w(a(b[S],f,c,u)),z=w(l(h[S],s,m,i));M(N,D+C,z),$(N,D,z,C,0,oc*2)}};if(p)p.forEach(A);else for(let S=r;S<=d;S++)A(S);return{stroke:k>0?N:null,fill:N,clip:I,flags:ba|_h}})}function mv(n){return(e,t,r,d,p,g)=>{r!=d&&(p!=r&&g!=r&&n(e,t,r),p!=d&&g!=d&&n(e,t,d),n(e,t,g))}}const aA=mv(wa),lA=mv(xa);function vv(n){const e=Jt(n==null?void 0:n.alignGaps,0);return(t,r,d,p)=>Fs(t,r,(g,b,h,f,s,a,l,u,i,c,m)=>{[d,p]=nc(h,d,p);let w=g.pxRound,x=P=>w(a(P,f,c,u)),M=P=>w(l(P,s,m,i)),$,k;f.ori==0?($=wa,k=aA):($=xa,k=lA);const C=f.dir*(f.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ba},N=R.stroke;let I=!1;if(p-d>=c*4){let P=de=>t.posToVal(de,f.key,!0),O=null,A=null,S,D,z,U=x(b[C==1?d:p]),K=x(b[d]),X=x(b[p]),ee=P(C==1?K+1:X-1);for(let de=C==1?d:p;de>=d&&de<=p;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,M(D)),S=O=A=D):D<O?O=D:D>A&&(A=D)):se===null&&(I=!0):(O!=null&&k(N,U,M(O),M(A),M(S),M(D)),se!=null?(D=se,$(N,le,M(D)),O=A=S=D):(O=A=null,se===null&&(I=!0)),U=le,ee=P(U+C))}O!=null&&O!=A&&z!=U&&k(N,U,M(O),M(A),M(S),M(D))}else for(let P=C==1?d:p;P>=d&&P<=p;P+=C){let O=h[P];O===null?I=!0:O!=null&&$(N,x(b[P]),M(O))}let[L,B]=Ah(t,r);if(g.fill!=null||L!=0){let P=R.fill=new Path2D(N),O=g.fillTo(t,r,g.min,g.max,L),A=M(O),S=x(b[d]),D=x(b[p]);C==-1&&([D,S]=[S,D]),$(P,D,A),$(P,S,A)}if(!g.spanGaps){let P=[];I&&P.push(...$h(b,h,d,p,C,x,e)),R.gaps=P=g.gaps(t,r,d,p,P),R.clip=hc(P,f.ori,u,i,c,m)}return B!=0&&(R.band=B==2?[Lo(t,r,d,p,N,-1),Lo(t,r,d,p,N,1)]:Lo(t,r,d,p,N,B)),R})}function cA(n){const e=Jt(n.align,1),t=Jt(n.ascDesc,!1),r=Jt(n.alignGaps,0),d=Jt(n.extend,!1);return(p,g,b,h)=>Fs(p,g,(f,s,a,l,u,i,c,m,w,x,M)=>{[b,h]=nc(a,b,h);let $=f.pxRound,{left:k,width:C}=p.bbox,R=X=>$(i(X,l,x,m)),N=X=>$(c(X,u,M,w)),I=l.ori==0?wa:xa;const L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ba},B=L.stroke,P=l.dir*(l.ori==0?1:-1);let O=N(a[P==1?b:h]),A=R(s[P==1?b:h]),S=A,D=A;d&&e==-1&&(D=k,I(B,D,O)),I(B,A,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);e==1?I(B,de,O):I(B,S,te),I(B,de,te),O=te,S=de}let z=S;d&&e==1&&(z=k+C,I(B,z,O));let[U,K]=Ah(p,g);if(f.fill!=null||U!=0){let X=L.fill=new Path2D(B),ee=f.fillTo(p,g,f.min,f.max,U),de=N(ee);I(X,z,de),I(X,D,de)}if(!f.spanGaps){let X=[];X.push(...$h(s,a,b,h,P,R,r));let ee=f.width*rn/2,de=t||e==1?ee:-ee,te=t||e==-1?-ee:ee;X.forEach(le=>{le[0]+=de,le[1]+=te}),L.gaps=X=f.gaps(p,g,b,h,X),L.clip=hc(X,l.ori,m,w,x,M)}return K!=0&&(L.band=K==2?[Lo(p,g,b,h,B,-1),Lo(p,g,b,h,B,1)]:Lo(p,g,b,h,B,K)),L})}function yv(n,e,t,r,d,p,g=bn){if(n.length>1){let b=null;for(let h=0,f=1/0;h<n.length;h++)if(e[h]!==void 0){if(b!=null){let s=mr(n[h]-n[b]);s<f&&(f=s,g=mr(t(n[h],r,d,p)-t(n[b],r,d,p)))}b=h}}return g}function uA(n){n=n||nl;const e=Jt(n.size,[.6,bn,1]),t=n.align||0,r=n.gap||0;let d=n.radius;d=d==null?[0,0]:typeof d=="number"?[d,0]:d;const p=Ut(d),g=1-e[0],b=Jt(e[1],bn),h=Jt(e[2],1),f=Jt(n.disp,nl),s=Jt(n.each,u=>{}),{fill:a,stroke:l}=f;return(u,i,c,m)=>Fs(u,i,(w,x,M,$,k,C,R,N,I,L,B)=>{let P=w.pxRound,O=t,A=r*rn,S=b*rn,D=h*rn,z,U;$.ori==0?[z,U]=p(u,i):[U,z]=p(u,i);const K=$.dir*($.ori==0?1:-1);let X=$.ori==0?fc:Th,ee=$.ori==0?s:(Ge,Nt,mn,Wn,_r,cr,_n)=>{s(Ge,Nt,mn,_r,Wn,_n,cr)},de=Jt(u.bands,gh).find(Ge=>Ge.series[0]==i),te=de!=null?de.dir:0,le=w.fillTo(u,i,w.min,w.max,te),se=P(R(le,k,B,I)),ue,me,Ae,Te=L,Me=P(w.width*rn),Je=!1,qe=null,pt=null,ot=null,ft=null;a!=null&&(Me==0||l!=null)&&(Je=!0,qe=a.values(u,i,c,m),pt=new Map,new Set(qe).forEach(Ge=>{Ge!=null&&pt.set(Ge,new Path2D)}),Me>0&&(ot=l.values(u,i,c,m),ft=new Map,new Set(ot).forEach(Ge=>{Ge!=null&&ft.set(Ge,new Path2D)})));let{x0:Zt,size:gn}=f;if(Zt!=null&&gn!=null){O=1,x=Zt.values(u,i,c,m),Zt.unit==2&&(x=x.map(Nt=>u.posToVal(N+Nt*L,$.key,!0)));let Ge=gn.values(u,i,c,m);gn.unit==2?me=Ge[0]*L:me=C(Ge[0],$,L,N)-C(0,$,L,N),Te=yv(x,M,C,$,L,N,Te),Ae=Te-me+A}else Te=yv(x,M,C,$,L,N,Te),Ae=Te*g+A,me=Te-Ae;Ae<1&&(Ae=0),Me>=me/2&&(Me=0),Ae<5&&(P=xm);let Kt=Ae>0,Sr=Te-Ae-(Kt?Me:0);me=P(fh(Sr,D,S)),ue=(O==0?me/2:O==K?0:me)-O*K*((O==0?A/2:0)+(Kt?Me/2:0));const Sn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Pn=Je?null:new Path2D;let lr=null;if(de!=null)lr=u.data[de.series[1]];else{let{y0:Ge,y1:Nt}=f;Ge!=null&&Nt!=null&&(M=Nt.values(u,i,c,m),lr=Ge.values(u,i,c,m))}let yr=z*me,mt=U*me;for(let Ge=K==1?c:m;Ge>=c&&Ge<=m;Ge+=K){let Nt=M[Ge];if(Nt==null)continue;if(lr!=null){let Dt=lr[Ge]??0;if(Nt-Dt==0)continue;se=R(Dt,k,B,I)}let mn=$.distr!=2||f!=null?x[Ge]:Ge,Wn=C(mn,$,L,N),_r=R(Jt(Nt,le),k,B,I),cr=P(Wn-ue),_n=P(Ur(_r,se)),In=P(oo(_r,se)),Bn=_n-In;if(Nt!=null){let Dt=Nt<0?mt:yr,An=Nt<0?yr:mt;Je?(Me>0&&ot[Ge]!=null&&X(ft.get(ot[Ge]),cr,In+ki(Me/2),me,Ur(0,Bn-Me),Dt,An),qe[Ge]!=null&&X(pt.get(qe[Ge]),cr,In+ki(Me/2),me,Ur(0,Bn-Me),Dt,An)):X(Pn,cr,In+ki(Me/2),me,Ur(0,Bn-Me),Dt,An),ee(u,i,Ge,cr-Me/2,In,me+Me,Bn)}}return Me>0?Sn.stroke=Je?ft:Pn:Je||(Sn._fill=w.width==0?w._fill:w._stroke??w._fill,Sn.width=0),Sn.fill=Je?pt:Pn,Sn})}function hA(n,e){const t=Jt(e==null?void 0:e.alignGaps,0);return(r,d,p,g)=>Fs(r,d,(b,h,f,s,a,l,u,i,c,m,w)=>{[p,g]=nc(f,p,g);let x=b.pxRound,M=z=>x(l(z,s,m,i)),$=z=>x(u(z,a,w,c)),k,C,R;s.ori==0?(k=dc,R=wa,C=pv):(k=pc,R=xa,C=fv);const N=s.dir*(s.ori==0?1:-1);let I=M(h[N==1?p:g]),L=I,B=[],P=[];for(let z=N==1?p:g;z>=p&&z<=g;z+=N)if(f[z]!=null){let U=h[z],K=M(U);B.push(L=K),P.push($(f[z]))}const O={stroke:n(B,P,k,R,C,x),fill:null,clip:null,band:null,gaps:null,flags:ba},A=O.stroke;let[S,D]=Ah(r,d);if(b.fill!=null||S!=0){let z=O.fill=new Path2D(A),U=b.fillTo(r,d,b.min,b.max,S),K=$(U);R(z,L,K),R(z,I,K)}if(!b.spanGaps){let z=[];z.push(...$h(h,f,p,g,N,M,t)),O.gaps=z=b.gaps(r,d,p,g,z),O.clip=hc(z,s.ori,i,c,m,w)}return D!=0&&(O.band=D==2?[Lo(r,d,p,g,A,-1),Lo(r,d,p,g,A,1)]:Lo(r,d,p,g,A,D)),O})}function dA(n){return hA(pA,n)}function pA(n,e,t,r,d,p){const g=n.length;if(g<2)return null;const b=new Path2D;if(t(b,n[0],e[0]),g==2)r(b,n[1],e[1]);else{let h=Array(g),f=Array(g-1),s=Array(g-1),a=Array(g-1);for(let l=0;l<g-1;l++)s[l]=e[l+1]-e[l],a[l]=n[l+1]-n[l],f[l]=s[l]/a[l];h[0]=f[0];for(let l=1;l<g-1;l++)f[l]===0||f[l-1]===0||f[l-1]>0!=f[l]>0?h[l]=0:(h[l]=3*(a[l-1]+a[l])/((2*a[l]+a[l-1])/f[l-1]+(a[l]+2*a[l-1])/f[l]),isFinite(h[l])||(h[l]=0));h[g-1]=f[g-2];for(let l=0;l<g-1;l++)d(b,n[l]+a[l]/3,e[l]+h[l]*a[l]/3,n[l+1]-a[l]/3,e[l+1]-h[l+1]*a[l]/3,n[l+1],e[l+1])}return b}const Mh=new Set;function bv(){for(let n of Mh)n.syncRect(!0)}pa&&(Rs(qS,fa,bv),Rs(KS,fa,bv,!0),Rs(ec,fa,()=>{Dr.pxRatio=rn}));const fA=vv(),gA=gv();function wv(n,e,t,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((d,p)=>Eh(d,p,e,t))}function mA(n,e){return n.map((t,r)=>r==0?{}:ar({},e,t))}function Eh(n,e,t,r){return ar({},e==0?t:r,n)}function xv(n,e,t){return e==null?ma:[e,t]}const vA=xv;function yA(n,e,t){return e==null?ma:ic(e,t,hh,!0)}function Cv(n,e,t,r){return e==null?ma:rc(e,t,n.scales[r].log,!1)}const bA=Cv;function kv(n,e,t,r){return e==null?ma:uh(e,t,n.scales[r].log,!1)}const wA=kv;function xA(n,e,t,r,d){let p=Ur(bm(n),bm(e)),g=e-n,b=io(d/r*g,t);do{let h=t[b],f=r*h/g;if(f>=d&&p+(h<5?rs.get(h):0)<=17)return[h,f]}while(++b<t.length);return[0,0]}function Sv(n){let e,t;return n=n.replace(/(\d+)px/,(r,d)=>(e=vr((t=+d)*rn))+"px"),[n,e,t]}function CA(n){n.show&&[n.font,n.labelFont].forEach(e=>{let t=wn(e[2]*rn,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t})}function Dr(n,e,t){const r={mode:Jt(n.mode,1)},d=r.mode;function p(V,Z,ie,oe){let ge=Z.valToPct(V);return oe+ie*(Z.dir==-1?1-ge:ge)}function g(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?p(V,Z,ie,oe):g(V,Z,ie,oe)}r.valToPosH=p,r.valToPosV=g;let h=!1;r.status=0;const f=r.root=Pi(MS);if(n.id!=null&&(f.id=n.id),xi(f,n.class),n.title){let V=Pi(IS,f);V.textContent=n.title}const s=ro("canvas"),a=r.ctx=s.getContext("2d"),l=Pi(RS,f);Rs("click",l,V=>{V.target===i&&(cn!=Ui||Vt!=Ao)&&Kn.click(r,V)},!0);const u=r.under=Pi(OS,l);l.appendChild(s);const i=r.over=Pi(NS,l);n=va(n);const c=+Jt(n.pxAlign,1),m=cv(c);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,x=r.series=d==1?wv(n.series||[],Qm,ov,!1):mA(n.series||[null],iv),M=r.axes=wv(n.axes||[],Zm,tv,!0),$=r.scales={},k=r.bands=n.bands||[];k.forEach(V=>{V.fill=Ut(V.fill||null),V.dir=Jt(V.dir,-1)});const C=d==2?x[1].facets[0].scale:x[0].scale,R={axes:Po,series:Aa},N=(n.drawOrder||["axes","series"]).map(V=>R[V]);function I(V){const Z=V.distr==3?ie=>Eo(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>ph(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 L(V){let Z=$[V];if(Z==null){let ie=(n.scales||nl)[V]||nl;if(ie.from!=null){L(ie.from);let oe=ar({},$[ie.from],ie,{key:V});oe.valToPct=I(oe),$[V]=oe}else{Z=$[V]=ar({},V==C?sv:iA,ie),Z.key=V;let oe=Z.time,ge=Z.range,xe=is(ge);if((V!=C||d==2&&!oe)&&(xe&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?gm:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?gm:{mode:1,hard:ge[1],soft:ge[1]}},xe=!1),!xe&&ac(ge))){let Ee=ge;ge=(We,ze,Xe)=>ze==null?ma:ic(ze,Xe,Ee)}Z.range=Ut(ge||(oe?vA:V==C?Z.distr==3?bA:Z.distr==4?wA:xv:Z.distr==3?Cv:Z.distr==4?kv:yA)),Z.auto=Ut(xe?!1:Z.auto),Z.clamp=Ut(Z.clamp||rA),Z._min=Z._max=null,Z.valToPct=I(Z)}}}L("x"),L("y"),d==1&&x.forEach(V=>{L(V.scale)}),M.forEach(V=>{L(V.scale)});for(let V in n.scales)L(V);const B=$[C],P=B.distr;let O,A;B.ori==0?(xi(f,ES),O=p,A=g):(xi(f,LS),O=g,A=p);const S={};for(let V in $){let Z=$[V];(Z.min!=null||Z.max!=null)&&(S[V]={min:Z.min,max:Z.max},Z.min=Z.max=null)}const D=n.tzDate||(V=>new Date(vr(V/w))),z=n.fmtDate||mh,U=w==1?E_(D):R_(D),K=jm(D,Hm(w==1?M_:I_,z)),X=Vm(D,Um(N_,z)),ee=[],de=r.legend=ar({},P_,n.legend),te=r.cursor=ar({},U_,{drag:{y:d==2}},n.cursor),le=de.show,se=te.show,ue=de.markers;de.idxs=ee,ue.width=Ut(ue.width),ue.dash=Ut(ue.dash),ue.stroke=Ut(ue.stroke),ue.fill=Ut(ue.fill);let me,Ae,Te,Me=[],Je=[],qe,pt=!1,ot={};if(de.live){const V=x[1]?x[1].values:null;pt=V!=null,qe=pt?V(r,1,0):{_:0};for(let Z in qe)ot[Z]=ih}if(le)if(me=ro("table",zS,f),Te=ro("tbody",null,me),de.mount(r,me),pt){Ae=ro("thead",null,me,Te);let V=ro("tr",null,Ae);ro("th",null,V);for(var ft in qe)ro("th",Jg,V).textContent=ft}else xi(me,jS),de.live&&xi(me,HS);const Zt={show:!0},gn={show:!1};function Kt(V,Z){if(Z==0&&(pt||!de.live||d==2))return ma;let ie=[],oe=ro("tr",US,Te,Te.childNodes[Z]);xi(oe,V.class),V.show||xi(oe,Is);let ge=ro("th",null,oe);if(ue.show){let We=Pi(VS,ge);if(Z>0){let ze=ue.width(r,Z);ze&&(We.style.border=ze+"px "+ue.dash(r,Z)+" "+ue.stroke(r,Z)),We.style.background=ue.fill(r,Z)}}let xe=Pi(Jg,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)),Sn("click",ge,We=>{if(te._lock)return;Zr(We);let ze=x.indexOf(V);if((We.ctrlKey||We.metaKey)!=de.isolate){let Xe=x.some((Qe,tt)=>tt>0&&tt!=ze&&Qe.show);x.forEach((Qe,tt)=>{tt>0&&ei(tt,Xe?tt==ze?Zt:gn:Zt,!0,ht.setSeries)})}else ei(ze,{show:!V.show},!0,ht.setSeries)},!1),$i&&Sn(rm,ge,We=>{te._lock||(Zr(We),ei(x.indexOf(V),qi,!0,ht.setSeries))},!1));for(var Ee in qe){let We=ro("td",GS,oe);We.textContent="--",ie.push(We)}return[oe,ie]}const Sr=new Map;function Sn(V,Z,ie,oe=!0){const ge=Sr.get(Z)||{},xe=te.bind[V](r,Z,ie,oe);xe&&(Rs(V,Z,ge[V]=xe),Sr.set(Z,ge))}function Pn(V,Z,ie){const oe=Sr.get(Z)||{};for(let ge in oe)(V==null||ge==V)&&(ch(ge,Z,oe[ge]),delete oe[ge]);V==null&&Sr.delete(Z)}let lr=0,yr=0,mt=0,Ge=0,Nt=0,mn=0,Wn=Nt,_r=mn,cr=mt,_n=Ge,In=0,Bn=0,Dt=0,An=0;r.bbox={};let _i=!1,Yr=!1,Ai=!1,Pr=!1,hi=!1,br=!1;function Xr(V,Z,ie){(ie||V!=r.width||Z!=r.height)&&xo(V,Z),uo(!1),Ai=!0,Yr=!0,_o()}function xo(V,Z){r.width=lr=mt=V,r.height=yr=Ge=Z,Nt=mn=0,Ro(),Oo();let ie=r.bbox;In=ie.left=Ns(Nt*rn,.5),Bn=ie.top=Ns(mn*rn,.5),Dt=ie.width=Ns(mt*rn,.5),An=ie.height=Ns(Ge*rn,.5)}const Hs=3;function en(){let V=!1,Z=0;for(;!V;){Z++;let ie=$a(Z),oe=yl(Z);V=Z==Hs||ie&&oe,V||(xo(r.width,r.height),Yr=!0)}}function zi({width:V,height:Z}){Xr(V,Z)}r.setSize=zi;function Ro(){let V=!1,Z=!1,ie=!1,oe=!1;M.forEach((ge,xe)=>{if(ge.show&&ge._show){let{side:Ee,_size:We}=ge,ze=Ee%2,Xe=ge.label!=null?ge.labelSize:0,Qe=We+Xe;Qe>0&&(ze?(mt-=Qe,Ee==3?(Nt+=Qe,oe=!0):ie=!0):(Ge-=Qe,Ee==0?(mn+=Qe,V=!0):Z=!0))}}),pi[0]=V,pi[1]=ie,pi[2]=Z,pi[3]=oe,mt-=he[1]+he[3],Nt+=he[3],Ge-=he[2]+he[0],mn+=he[0]}function Oo(){let V=Nt+mt,Z=mn+Ge,ie=Nt,oe=mn;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}}M.forEach((xe,Ee)=>{if(xe.show&&xe._show){let We=xe.side;xe._pos=ge(We,xe._size),xe.label!=null&&(xe._lpos=ge(We,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=Ut(V.prox),oe=V.bias??(V.bias=0);te.dataIdx=(ge,xe,Ee,We)=>{if(xe==0)return Ee;let ze=Ee,Xe=ie(ge,xe,Ee,We)??bn,Qe=Xe>=0&&Xe<bn,tt=B.ori==0?mt:Ge,Ct=te.left,zt=e[0],_t=e[xe];if(Z.has(_t[Ee])){ze=null;let Wt=null,vt=null,ct;if(oe==0||oe==-1)for(ct=Ee;Wt==null&&ct-- >0;)Z.has(_t[ct])||(Wt=ct);if(oe==0||oe==1)for(ct=Ee;vt==null&&ct++<_t.length;)Z.has(_t[ct])||(vt=ct);if(Wt!=null||vt!=null)if(Qe){let xn=Wt==null?-1/0:O(zt[Wt],B,tt,0),Dn=vt==null?1/0:O(zt[vt],B,tt,0),pr=Ct-xn,Yt=Dn-Ct;pr<=Yt?pr<=Xe&&(ze=Wt):Yt<=Xe&&(ze=vt)}else ze=vt==null?Wt:Wt==null?vt:Ee-Wt<=vt-Ee?Wt:vt}else Qe&&mr(Ct-O(zt[Ee],B,tt,0))>Xe&&(ze=null);return ze}}const Zr=V=>{te.event=V};te.idxs=ee,te._lock=!1;let Rn=te.points;Rn.show=Ut(Rn.show),Rn.size=Ut(Rn.size),Rn.stroke=Ut(Rn.stroke),Rn.width=Ut(Rn.width),Rn.fill=Ut(Rn.fill);const wr=r.focus=ar({},n.focus||{alpha:.3},te.focus),$i=wr.prox>=0,sn=$i&&Rn.one;let zn=[],Ti=[],di=[];function lo(V,Z){let ie=Rn.show(r,Z);if(ie instanceof HTMLElement)return xi(ie,BS),xi(ie,V.class),vo(ie,-10,-10,mt,Ge),i.insertBefore(ie,zn[Z]),ie}function No(V,Z){if(d==1||Z>0){let ie=d==1&&$[V.scale].time,oe=V.value;V.value=ie?Tm(oe)?Vm(D,Um(oe,z)):oe||X:oe||eA,V.label=V.label||(ie?G_:V_)}if(sn||Z>0){V.width=V.width==null?1:V.width,V.paths=V.paths||fA||i_,V.fillTo=Ut(V.fillTo||oA),V.pxAlign=+Jt(V.pxAlign,c),V.pxRound=cv(V.pxAlign),V.stroke=Ut(V.stroke||null),V.fill=Ut(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=tA(Ur(1,V.width),1),oe=V.points=ar({},{size:ie,width:Ur(1,ie*.2),stroke:V.stroke,space:ie*2,paths:gA,_stroke:null,_fill:null},V.points);oe.show=Ut(oe.show),oe.filter=Ut(oe.filter),oe.fill=Ut(oe.fill),oe.stroke=Ut(oe.stroke),oe.paths=Ut(oe.paths),oe.pxAlign=V.pxAlign}if(le){let ie=Kt(V,Z);Me.splice(Z,0,ie[0]),Je.splice(Z,0,ie[1]),de.values.push(null)}if(se){ee.splice(Z,0,null);let ie=null;sn?Z==0&&(ie=lo(V,Z)):Z>0&&(ie=lo(V,Z)),zn.splice(Z,0,ie),Ti.splice(Z,0,0),di.splice(Z,0,0)}at("addSeries",Z)}function Qr(V,Z){Z=Z??x.length,V=d==1?Eh(V,Z,Qm,ov):Eh(V,Z,{},iv),x.splice(Z,0,V),No(x[Z],Z)}r.addSeries=Qr;function os(V){if(x.splice(V,1),le){de.values.splice(V,1),Je.splice(V,1);let Z=Me.splice(V,1)[0];Pn(null,Z.firstChild),Z.remove()}se&&(ee.splice(V,1),zn.splice(V,1)[0].remove(),Ti.splice(V,1),di.splice(V,1)),at("delSeries",V)}r.delSeries=os;const pi=[!1,!1,!1,!1];function Wr(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=Ut(V.size),V.space=Ut(V.space),V.rotate=Ut(V.rotate),is(V.incrs)&&V.incrs.forEach(Ee=>{!rs.has(Ee)&&rs.set(Ee,Am(Ee))}),V.incrs=Ut(V.incrs||(oe.distr==2?A_:ge?w==1?T_:L_:Ds)),V.splits=Ut(V.splits||(ge&&oe.distr==1?U:oe.distr==3?kh:oe.distr==4?Y_:K_)),V.stroke=Ut(V.stroke),V.grid.stroke=Ut(V.grid.stroke),V.ticks.stroke=Ut(V.ticks.stroke),V.border.stroke=Ut(V.border.stroke);let xe=V.values;V.values=is(xe)&&!is(xe[0])?Ut(xe):ge?is(xe)?jm(D,Hm(xe,z)):Tm(xe)?O_(D,xe):xe||K:xe||q_,V.filter=Ut(V.filter||(oe.distr>=3&&oe.log==10?Q_:oe.distr==3&&oe.log==2?J_:Cm)),V.font=Sv(V.font),V.labelFont=Sv(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&&(pi[Z]=!0,V._el=Pi(DS,l))}}function Ft(V,Z,ie,oe){let[ge,xe,Ee,We]=ie,ze=Z%2,Xe=0;return ze==0&&(We||xe)&&(Xe=Z==0&&!ge||Z==2&&!Ee?vr(Zm.size/3):0),ze==1&&(ge||Ee)&&(Xe=Z==1&&!xe||Z==3&&!We?vr(tv.size/2):0),Xe}const ss=r.padding=(n.padding||[Ft,Ft,Ft,Ft]).map(V=>Ut(Jt(V,Ft))),he=r._padding=ss.map((V,Z)=>V(r,Z,pi,0));let je,Ne=null,gt=null;const hn=d==1?x[0].idxs:null;let Pt=null,qn=!1;function ur(V,Z){if(e=V??[],r.data=r._data=e,d==2){je=0;for(let ie=1;ie<x.length;ie++)je+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Pt=e[0],je=Pt.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(je);for(let ge=0;ge<je;ge++)oe[ge]=ge}r._data=e=ie}if(uo(!0),at("setData"),P==2&&(Ai=!0),Z!==!1){let ie=B;ie.auto(r,qn)?Ar():hr(C,ie.min,ie.max),Pr=Pr||te.left>=0,br=!0,_o()}}r.setData=ur;function Ar(){qn=!0;let V,Z;d==1&&(je>0?(Ne=hn[0]=0,gt=hn[1]=je-1,V=e[0][Ne],Z=e[0][gt],P==2?(V=Ne,Z=gt):V==Z&&(P==3?[V,Z]=rc(V,V,B.log,!1):P==4?[V,Z]=uh(V,V,B.log,!1):B.time?Z=V+vr(86400/w):[V,Z]=ic(V,Z,hh,!0))):(Ne=hn[0]=V=null,gt=hn[1]=Z=null)),hr(C,V,Z)}let fi,an,Hi,Co,gi,as,js,Us,ls,xr;function Vs(V,Z,ie,oe,ge,xe){V??(V=tm),ie??(ie=gh),oe??(oe="butt"),ge??(ge=tm),xe??(xe="round"),V!=fi&&(a.strokeStyle=fi=V),ge!=an&&(a.fillStyle=an=ge),Z!=Hi&&(a.lineWidth=Hi=Z),xe!=gi&&(a.lineJoin=gi=xe),oe!=as&&(a.lineCap=as=oe),ie!=Co&&a.setLineDash(Co=ie)}function Do(V,Z,ie,oe){Z!=an&&(a.fillStyle=an=Z),V!=js&&(a.font=js=V),ie!=Us&&(a.textAlign=Us=ie),oe!=ls&&(a.textBaseline=ls=oe)}function cs(V,Z,ie,oe,ge=0){if(oe.length>0&&V.auto(r,qn)&&(Z==null||Z.min==null)){let xe=Jt(Ne,0),Ee=Jt(gt,oe.length-1),We=ie.min==null?QS(oe,xe,Ee,ge,V.distr==3):[ie.min,ie.max];V.min=oo(V.min,ie.min=We[0]),V.max=Ur(V.max,ie.max=We[1])}}const us={min:null,max:null};function ko(){for(let oe in $){let ge=$[oe];S[oe]==null&&(ge.min==null||S[C]!=null&&ge.auto(r,qn))&&(S[oe]=us)}for(let oe in $){let ge=$[oe];S[oe]==null&&ge.from!=null&&S[ge.from]!=null&&(S[oe]=us)}S[C]!=null&&uo(!0);let V={};for(let oe in S){let ge=S[oe];if(ge!=null){let xe=V[oe]=va($[oe],a_);if(ge.min!=null)ar(xe,ge);else if(oe!=C||d==2)if(je==0&&xe.from==null){let Ee=xe.range(r,null,null,oe);xe.min=Ee[0],xe.max=Ee[1]}else xe.min=bn,xe.max=-bn}}if(je>0){x.forEach((oe,ge)=>{if(d==1){let xe=oe.scale,Ee=S[xe];if(Ee==null)return;let We=V[xe];if(ge==0){let ze=We.range(r,We.min,We.max,xe);We.min=ze[0],We.max=ze[1],Ne=io(We.min,e[0]),gt=io(We.max,e[0]),gt-Ne>1&&(e[0][Ne]<We.min&&Ne++,e[0][gt]>We.max&&gt--),oe.min=Pt[Ne],oe.max=Pt[gt]}else oe.show&&oe.auto&&cs(We,Ee,oe,e[ge],oe.sorted);oe.idxs[0]=Ne,oe.idxs[1]=gt}else if(ge>0&&oe.show&&oe.auto){let[xe,Ee]=oe.facets,We=xe.scale,ze=Ee.scale,[Xe,Qe]=e[ge],tt=V[We],Ct=V[ze];tt!=null&&cs(tt,S[We],xe,Xe,xe.sorted),Ct!=null&&cs(Ct,S[ze],Ee,Qe,Ee.sorted),oe.min=Ee.min,oe.max=Ee.max}});for(let oe in V){let ge=V[oe],xe=S[oe];if(ge.from==null&&(xe==null||xe.min==null)){let Ee=ge.range(r,ge.min==bn?null:ge.min,ge.max==-bn?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?Eo(xe.min):Ee==4?ph(xe.min,xe.asinh):Ee==100?xe.fwd(xe.min):xe.min,xe._max=Ee==3?Eo(xe.max):Ee==4?ph(xe.max,xe.asinh):Ee==100?xe.fwd(xe.max):xe.max,Z[oe]=ie=!0}}if(ie){x.forEach((oe,ge)=>{d==2?ge>0&&Z.y&&(oe._paths=null):Z[oe.scale]&&(oe._paths=null)});for(let oe in Z)Ai=!0,at("setScale",oe);se&&te.left>=0&&(Pr=br=!0)}for(let oe in S)S[oe]=null}function Gs(V){let Z=fh(Ne-1,0,je-1),ie=fh(gt+1,0,je-1);for(;V[Z]==null&&Z>0;)Z--;for(;V[ie]==null&&ie<je-1;)ie++;return[Z,ie]}function Aa(){if(je>0){let V=x.some(Z=>Z._focus)&&xr!=wr.alpha;V&&(a.globalAlpha=xr=wr.alpha),x.forEach((Z,ie)=>{if(ie>0&&Z.show&&(hs(ie,!1),hs(ie,!0),Z._paths==null)){let oe=xr;xr!=Z.alpha&&(a.globalAlpha=xr=Z.alpha);let ge=d==2?[0,e[ie][0].length-1]:Gs(e[ie]);Z._paths=Z.paths(r,ie,ge[0],ge[1]),xr!=oe&&(a.globalAlpha=xr=oe)}}),x.forEach((Z,ie)=>{if(ie>0&&Z.show){let oe=xr;xr!=Z.alpha&&(a.globalAlpha=xr=Z.alpha),Z._paths!=null&&ds(ie,!1);{let ge=Z._paths!=null?Z._paths.gaps:null,xe=Z.points.show(r,ie,Ne,gt,ge),Ee=Z.points.filter(r,ie,xe,ge);(xe||Ee)&&(Z.points._paths=Z.points.paths(r,ie,Ne,gt,Ee),ds(ie,!0))}xr!=oe&&(a.globalAlpha=xr=oe),at("drawSeries",ie)}}),V&&(a.globalAlpha=xr=1)}}function hs(V,Z){let ie=Z?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function ds(V,Z){let ie=Z?x[V].points:x[V],{stroke:oe,fill:ge,clip:xe,flags:Ee,_stroke:We=ie._stroke,_fill:ze=ie._fill,_width:Xe=ie.width}=ie._paths;Xe=wn(Xe*rn,3);let Qe=null,tt=Xe%2/2;Z&&ze==null&&(ze=Xe>0?"#fff":We);let Ct=ie.pxAlign==1&&tt>0;if(Ct&&a.translate(tt,tt),!Z){let zt=In-Xe/2,_t=Bn-Xe/2,Wt=Dt+Xe,vt=An+Xe;Qe=new Path2D,Qe.rect(zt,_t,Wt,vt)}Z?Fo(We,Xe,ie.dash,ie.cap,ze,oe,ge,Ee,xe):qs(V,We,Xe,ie.dash,ie.cap,ze,oe,ge,Ee,Qe,xe),Ct&&a.translate(-tt,-tt)}function qs(V,Z,ie,oe,ge,xe,Ee,We,ze,Xe,Qe){let tt=!1;ze!=0&&k.forEach((Ct,zt)=>{if(Ct.series[0]==V){let _t=x[Ct.series[1]],Wt=e[Ct.series[1]],vt=(_t._paths||nl).band;is(vt)&&(vt=Ct.dir==1?vt[0]:vt[1]);let ct,xn=null;_t.show&&vt&&e_(Wt,Ne,gt)?(xn=Ct.fill(r,zt)||xe,ct=_t._paths.clip):vt=null,Fo(Z,ie,oe,ge,xn,Ee,We,ze,Xe,Qe,ct,vt),tt=!0}}),tt||Fo(Z,ie,oe,ge,xe,Ee,We,ze,Xe,Qe)}const ps=ba|_h;function Fo(V,Z,ie,oe,ge,xe,Ee,We,ze,Xe,Qe,tt){Vs(V,Z,ie,oe,ge),(ze||Xe||tt)&&(a.save(),ze&&a.clip(ze),Xe&&a.clip(Xe)),tt?(We&ps)==ps?(a.clip(tt),Qe&&a.clip(Qe),Cr(ge,Ee),ji(V,xe,Z)):We&_h?(Cr(ge,Ee),a.clip(tt),ji(V,xe,Z)):We&ba&&(a.save(),a.clip(tt),Qe&&a.clip(Qe),Cr(ge,Ee),a.restore(),ji(V,xe,Z)):(Cr(ge,Ee),ji(V,xe,Z)),(ze||Xe||tt)&&a.restore()}function ji(V,Z,ie){ie>0&&(Z instanceof Map?Z.forEach((oe,ge)=>{a.strokeStyle=fi=ge,a.stroke(oe)}):Z!=null&&V&&a.stroke(Z))}function Cr(V,Z){Z instanceof Map?Z.forEach((ie,oe)=>{a.fillStyle=an=oe,a.fill(ie)}):Z!=null&&V&&a.fill(Z)}function So(V,Z,ie,oe){let ge=M[V],xe;if(oe<=0)xe=[0,0];else{let Ee=ge._space=ge.space(r,V,Z,ie,oe),We=ge._incrs=ge.incrs(r,V,Z,ie,oe,Ee);xe=xA(Z,ie,We,oe,Ee)}return ge._found=xe}function co(V,Z,ie,oe,ge,xe,Ee,We,ze,Xe){let Qe=Ee%2/2;c==1&&a.translate(Qe,Qe),Vs(We,Ee,ze,Xe,We),a.beginPath();let tt,Ct,zt,_t,Wt=ge+(oe==0||oe==3?-xe:xe);ie==0?(Ct=ge,_t=Wt):(tt=ge,zt=Wt);for(let vt=0;vt<V.length;vt++)Z[vt]!=null&&(ie==0?tt=zt=V[vt]:Ct=_t=V[vt],a.moveTo(tt,Ct),a.lineTo(zt,_t));a.stroke(),c==1&&a.translate(-Qe,-Qe)}function $a(V){let Z=!0;return M.forEach((ie,oe)=>{if(!ie.show)return;let ge=$[ie.scale];if(ge.min==null){ie._show&&(Z=!1,ie._show=!1,uo(!1));return}else ie._show||(Z=!1,ie._show=!0,uo(!1));let xe=ie.side,Ee=xe%2,{min:We,max:ze}=ge,[Xe,Qe]=So(oe,We,ze,Ee==0?mt:Ge);if(Qe==0)return;let tt=ge.distr==2,Ct=ie._splits=ie.splits(r,oe,We,ze,Xe,Qe,tt),zt=ge.distr==2?Ct.map(ct=>Pt[ct]):Ct,_t=ge.distr==2?Pt[Ct[1]]-Pt[Ct[0]]:Xe,Wt=ie._values=ie.values(r,ie.filter(r,zt,oe,Qe,_t),oe,Qe,_t);ie._rotate=xe==2?ie.rotate(r,Wt,oe,Qe):0;let vt=ie._size;ie._size=Wi(ie.size(r,Wt,oe,V)),vt!=null&&ie._size!=vt&&(Z=!1)}),Z}function yl(V){let Z=!0;return ss.forEach((ie,oe)=>{let ge=ie(r,oe,pi,V);ge!=he[oe]&&(Z=!1),he[oe]=ge}),Z}function Po(){for(let V=0;V<M.length;V++){let Z=M[V];if(!Z.show||!Z._show)continue;let ie=Z.side,oe=ie%2,ge,xe,Ee=Z.stroke(r,V),We=ie==0||ie==3?-1:1,[ze,Xe]=Z._found;if(Z.label!=null){let yn=Z.labelGap*We,Er=vr((Z._lpos+yn)*rn);Do(Z.labelFont[0],Ee,"center",ie==2?Ja:em),a.save(),oe==1?(ge=xe=0,a.translate(Er,vr(Bn+An/2)),a.rotate((ie==3?-oc:oc)/2)):(ge=vr(In+Dt/2),xe=Er);let jo=wm(Z.label)?Z.label(r,V,ze,Xe):Z.label;a.fillText(jo,ge,xe),a.restore()}if(Xe==0)continue;let Qe=$[Z.scale],tt=oe==0?Dt:An,Ct=oe==0?In:Bn,zt=Z._splits,_t=Qe.distr==2?zt.map(yn=>Pt[yn]):zt,Wt=Qe.distr==2?Pt[zt[1]]-Pt[zt[0]]:ze,vt=Z.ticks,ct=Z.border,xn=vt.show?vt.size:0,Dn=vr(xn*rn),pr=vr((Z.alignTo==2?Z._size-xn-Z.gap:Z.gap)*rn),Yt=Z._rotate*-oc/180,fe=m(Z._pos*rn),$e=(Dn+pr)*We,Ce=fe+$e;xe=oe==0?Ce:0,ge=oe==1?Ce:0;let Ke=Z.font[0],dt=Z.align==1?da:Z.align==2?eh:Yt>0?da:Yt<0?eh:oe==0?"center":ie==3?eh:da,Et=Yt||oe==1?"middle":ie==2?Ja:em;Do(Ke,Ee,dt,Et);let Qt=Z.font[1]*Z.lineGap,Rt=zt.map(yn=>m(b(yn,Qe,tt,Ct))),ti=Z._values;for(let yn=0;yn<ti.length;yn++){let Er=ti[yn];if(Er!=null){oe==0?ge=Rt[yn]:xe=Rt[yn],Er=""+Er;let jo=Er.indexOf(`
1490
+ `)==-1?[Er]:Er.split(/\n/gm);for(let Zn=0;Zn<jo.length;Zn++){let Ys=jo[Zn];Yt?(a.save(),a.translate(ge,xe+Zn*Qt),a.rotate(Yt),a.fillText(Ys,0,0),a.restore()):a.fillText(Ys,ge,xe+Zn*Qt)}}}vt.show&&co(Rt,vt.filter(r,_t,V,Xe,Wt),oe,ie,fe,Dn,wn(vt.width*rn,3),vt.stroke(r,V),vt.dash,vt.cap);let Ki=Z.grid;Ki.show&&co(Rt,Ki.filter(r,_t,V,Xe,Wt),oe,oe==0?2:1,oe==0?Bn:In,oe==0?An:Dt,wn(Ki.width*rn,3),Ki.stroke(r,V),Ki.dash,Ki.cap),ct.show&&co([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?Bn:In,oe==1?An:Dt,wn(ct.width*rn,3),ct.stroke(r,V),ct.dash,ct.cap)}at("drawAxes")}function uo(V){x.forEach((Z,ie)=>{ie>0&&(Z._paths=null,V&&(d==1?(Z.min=null,Z.max=null):Z.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Wo=!1,fs=!1,Bo=[];function Ta(){fs=!1;for(let V=0;V<Bo.length;V++)at(...Bo[V]);Bo.length=0}function _o(){Wo||(f_(Ma),Wo=!0)}function Be(V,Z=!1){Wo=!0,fs=Z,V(r),Ma(),Z&&Bo.length>0&&queueMicrotask(Ta)}r.batch=Be;function Ma(){if(_i&&(ko(),_i=!1),Ai&&(en(),Ai=!1),Yr){if(Mn(u,da,Nt),Mn(u,Ja,mn),Mn(u,Za,mt),Mn(u,Qa,Ge),Mn(i,da,Nt),Mn(i,Ja,mn),Mn(i,Za,mt),Mn(i,Qa,Ge),Mn(l,Za,lr),Mn(l,Qa,yr),s.width=vr(lr*rn),s.height=vr(yr*rn),M.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;Mn(V,Ee?"left":"top",oe-xe),Mn(V,Ee?"width":"height",ie),Mn(V,Ee?"top":"left",Ee?mn:Nt),Mn(V,Ee?"height":"width",Ee?Ge:mt),ah(V,Is)}else xi(V,Is)}),fi=an=Hi=gi=as=js=Us=ls=Co=null,xr=1,W(!0),Nt!=Wn||mn!=_r||mt!=cr||Ge!=_n){uo(!1);let V=mt/cr,Z=Ge/_n;if(se&&!Pr&&te.left>=0){te.left*=V,te.top*=Z,Mi&&vo(Mi,vr(te.left),0,mt,Ge),rr&&vo(rr,0,vr(te.top),mt,Ge);for(let ie=0;ie<zn.length;ie++){let oe=zn[ie];oe!=null&&(Ti[ie]*=V,di[ie]*=Z,vo(oe,Wi(Ti[ie]),Wi(di[ie]),mt,Ge))}}if(xt.show&&!hi&&xt.left>=0&&xt.width>0){xt.left*=V,xt.width*=V,xt.top*=Z,xt.height*=Z;for(let ie in Y)Mn(Jr,ie,xt[ie])}Wn=Nt,_r=mn,cr=mt,_n=Ge}at("setSize"),Yr=!1}lr>0&&yr>0&&(a.clearRect(0,0,s.width,s.height),at("drawClear"),N.forEach(V=>V()),at("draw")),xt.show&&hi&&(vn(xt),hi=!1),se&&Pr&&(_(null,!0,!1),Pr=!1),de.show&&de.live&&br&&(y(),br=!1),h||(h=!0,r.status=1,at("ready")),qn=!1,Wo=!1}r.redraw=(V,Z)=>{Ai=Z||!1,V!==!1?hr(C,B.min,B.max):_o()};function De(V,Z){let ie=$[V];if(ie.from==null){if(je==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(je>1&&Z.min!=null&&Z.max!=null&&Z.max-Z.min<1e-16)return;V==C&&ie.distr==2&&je>0&&(Z.min=io(Z.min,e[0]),Z.max=io(Z.max,e[0]),Z.min==Z.max&&Z.max++),S[V]=Z,_i=!0,_o()}}r.setScale=De;let Hn,zo,Mi,rr,Ea,Ho,Ui,Ao,ln,tn,cn,Vt,Vi=!1;const Kn=te.drag;let Ue=Kn.x,$n=Kn.y;se&&(te.x&&(Hn=Pi(PS,i)),te.y&&(zo=Pi(WS,i)),B.ori==0?(Mi=Hn,rr=zo):(Mi=zo,rr=Hn),cn=te.left,Vt=te.top);const xt=r.select=ar({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Jr=xt.show?Pi(FS,xt.over?i:u):null;function vn(V,Z){if(xt.show){for(let ie in V)xt[ie]=V[ie],ie in Y&&Mn(Jr,ie,V[ie]);Z!==!1&&at("setSelect")}}r.setSelect=vn;function En(V){if(x[V].show)le&&ah(Me[V],Is);else if(le&&xi(Me[V],Is),se){let Z=sn?zn[0]:zn[V];Z!=null&&vo(Z,-10,-10,mt,Ge)}}function hr(V,Z,ie){De(V,{min:Z,max:ie})}function ei(V,Z,ie,oe){Z.focus!=null&&$r(V),Z.show!=null&&x.forEach((ge,xe)=>{xe>0&&(V==xe||V==null)&&(ge.show=Z.show,En(xe),d==2?(hr(ge.facets[0].scale,null,null),hr(ge.facets[1].scale,null,null)):hr(ge.scale,null,null),_o())}),ie!==!1&&at("setSeries",V,Z),oe&&Mt("setSeries",r,V,Z)}r.setSeries=ei;function Gi(V,Z){ar(k[V],Z)}function Yn(V,Z){V.fill=Ut(V.fill||null),V.dir=Jt(V.dir,-1),Z=Z??k.length,k.splice(Z,0,V)}function mi(V){V==null?k.length=0:k.splice(V,1)}r.addBand=Yn,r.setBand=Gi,r.delBand=mi;function gs(V,Z){x[V].alpha=Z,se&&zn[V]!=null&&(zn[V].style.opacity=Z),le&&Me[V]&&(Me[V].style.opacity=Z)}let Xn,Ei,Li;const qi={focus:!0};function $r(V){if(V!=Li){let Z=V==null,ie=wr.alpha!=1;x.forEach((oe,ge)=>{if(d==1||ge>0){let xe=Z||ge==0||ge==V;oe._focus=Z?null:xe,ie&&gs(ge,xe?1:wr.alpha)}}),Li=V,ie&&_o()}}le&&$i&&Sn(im,me,V=>{te._lock||(Zr(V),Li!=null&&ei(null,qi,!0,ht.setSeries))});function Tr(V,Z,ie){let oe=$[Z];ie&&(V=V/rn-(oe.ori==1?mn:Nt));let ge=mt;oe.ori==1&&(ge=Ge,V=ge-V),oe.dir==-1&&(V=ge-V);let xe=oe._min,Ee=oe._max,We=V/ge,ze=xe+(Ee-xe)*We,Xe=oe.distr;return Xe==3?ga(10,ze):Xe==4?n_(ze,oe.asinh):Xe==100?oe.bwd(ze):ze}function Ir(V,Z){let ie=Tr(V,C,Z);return io(ie,e[0],Ne,gt)}r.valToIdx=V=>io(V,e[0]),r.posToIdx=Ir,r.posToVal=Tr,r.valToPos=(V,Z,ie)=>$[Z].ori==0?p(V,$[Z],ie?Dt:mt,ie?In:0):g(V,$[Z],ie?An:Ge,ie?Bn:0),r.setCursor=(V,Z,ie)=>{cn=V.left,Vt=V.top,_(null,Z,ie)};function Ks(V,Z){Mn(Jr,da,xt.left=V),Mn(Jr,Za,xt.width=Z)}function Rr(V,Z){Mn(Jr,Ja,xt.top=V),Mn(Jr,Qa,xt.height=Z)}let Br=B.ori==0?Ks:Rr,Ii=B.ori==1?Ks:Rr;function Ri(){if(le&&de.live)for(let V=d==2?1:0;V<x.length;V++){if(V==0&&pt)continue;let Z=de.values[V],ie=0;for(let oe in Z)Je[V][ie++].firstChild.nodeValue=Z[oe]}}function y(V,Z){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{ee[oe]=ie}):s_(V.idx)||ee.fill(V.idx),de.idx=ee[0]),le&&de.live){for(let ie=0;ie<x.length;ie++)(ie>0||d==1&&!pt)&&T(ie,ee[ie]);Ri()}br=!1,Z!==!1&&at("setLegend")}r.setLegend=y;function T(V,Z){let ie=x[V],oe=V==0&&P==2?Pt:e[V],ge;pt?ge=ie.values(r,V,Z)??ot:(ge=ie.value(r,Z==null?null:oe[Z],V,Z),ge=ge==null?ot:{_:ge}),de.values[V]=ge}function _(V,Z,ie){ln=cn,tn=Vt,[cn,Vt]=te.move(r,cn,Vt),te.left=cn,te.top=Vt,se&&(Mi&&vo(Mi,vr(cn),0,mt,Ge),rr&&vo(rr,0,vr(Vt),mt,Ge));let oe,ge=Ne>gt;Xn=bn,Ei=null;let xe=B.ori==0?mt:Ge,Ee=B.ori==1?mt:Ge;if(cn<0||je==0||ge){oe=te.idx=null;for(let We=0;We<x.length;We++){let ze=zn[We];ze!=null&&vo(ze,-10,-10,mt,Ge)}$i&&ei(null,qi,!0,V==null&&ht.setSeries),de.live&&(ee.fill(oe),br=!0)}else{let We,ze,Xe;d==1&&(We=B.ori==0?cn:Vt,ze=Tr(We,C),oe=te.idx=io(ze,e[0],Ne,gt),Xe=O(e[0][oe],B,xe,0));let Qe=-10,tt=-10,Ct=0,zt=0,_t=!0,Wt="",vt="";for(let ct=d==2?1:0;ct<x.length;ct++){let xn=x[ct],Dn=ee[ct],pr=Dn==null?null:d==1?e[ct][Dn]:e[ct][1][Dn],Yt=te.dataIdx(r,ct,oe,ze),fe=Yt==null?null:d==1?e[ct][Yt]:e[ct][1][Yt];if(br=br||fe!=pr||Yt!=Dn,ee[ct]=Yt,ct>0&&xn.show){let $e=Yt==null?-10:Yt==oe?Xe:O(d==1?e[0][Yt]:e[ct][0][Yt],B,xe,0),Ce=fe==null?-10:A(fe,d==1?$[xn.scale]:$[xn.facets[1].scale],Ee,0);if($i&&fe!=null){let Ke=B.ori==1?cn:Vt,dt=mr(wr.dist(r,ct,Yt,Ce,Ke));if(dt<Xn){let Et=wr.bias;if(Et!=0){let Qt=Tr(Ke,xn.scale),Rt=fe>=0?1:-1,ti=Qt>=0?1:-1;ti==Rt&&(ti==1?Et==1?fe>=Qt:fe<=Qt:Et==1?fe<=Qt:fe>=Qt)&&(Xn=dt,Ei=ct)}else Xn=dt,Ei=ct}}if(br||sn){let Ke,dt;B.ori==0?(Ke=$e,dt=Ce):(Ke=Ce,dt=$e);let Et,Qt,Rt,ti,Ki,yn,Er=!0,jo=Rn.bbox;if(jo!=null){Er=!1;let Zn=jo(r,ct);Rt=Zn.left,ti=Zn.top,Et=Zn.width,Qt=Zn.height}else Rt=Ke,ti=dt,Et=Qt=Rn.size(r,ct);if(yn=Rn.fill(r,ct),Ki=Rn.stroke(r,ct),sn)ct==Ei&&Xn<=wr.prox&&(Qe=Rt,tt=ti,Ct=Et,zt=Qt,_t=Er,Wt=yn,vt=Ki);else{let Zn=zn[ct];Zn!=null&&(Ti[ct]=Rt,di[ct]=ti,hm(Zn,Et,Qt,Er),cm(Zn,yn,Ki),vo(Zn,Wi(Rt),Wi(ti),mt,Ge))}}}}if(sn){let ct=wr.prox,xn=Li==null?Xn<=ct:Xn>ct||Ei!=Li;if(br||xn){let Dn=zn[0];Dn!=null&&(Ti[0]=Qe,di[0]=tt,hm(Dn,Ct,zt,_t),cm(Dn,Wt,vt),vo(Dn,Wi(Qe),Wi(tt),mt,Ge))}}}if(xt.show&&Vi)if(V!=null){let[We,ze]=ht.scales,[Xe,Qe]=ht.match,[tt,Ct]=V.cursor.sync.scales,zt=V.cursor.drag;if(Ue=zt._x,$n=zt._y,Ue||$n){let{left:_t,top:Wt,width:vt,height:ct}=V.select,xn=V.scales[tt].ori,Dn=V.posToVal,pr,Yt,fe,$e,Ce,Ke=We!=null&&Xe(We,tt),dt=ze!=null&&Qe(ze,Ct);Ke&&Ue?(xn==0?(pr=_t,Yt=vt):(pr=Wt,Yt=ct),fe=$[We],$e=O(Dn(pr,tt),fe,xe,0),Ce=O(Dn(pr+Yt,tt),fe,xe,0),Br(oo($e,Ce),mr(Ce-$e))):Br(0,xe),dt&&$n?(xn==1?(pr=_t,Yt=vt):(pr=Wt,Yt=ct),fe=$[ze],$e=A(Dn(pr,Ct),fe,Ee,0),Ce=A(Dn(pr+Yt,Ct),fe,Ee,0),Ii(oo($e,Ce),mr(Ce-$e))):Ii(0,Ee)}else Q()}else{let We=mr(ln-Ea),ze=mr(tn-Ho);if(B.ori==1){let Ct=We;We=ze,ze=Ct}Ue=Kn.x&&We>=Kn.dist,$n=Kn.y&&ze>=Kn.dist;let Xe=Kn.uni;Xe!=null?Ue&&$n&&(Ue=We>=Xe,$n=ze>=Xe,!Ue&&!$n&&(ze>We?$n=!0:Ue=!0)):Kn.x&&Kn.y&&(Ue||$n)&&(Ue=$n=!0);let Qe,tt;Ue&&(B.ori==0?(Qe=Ui,tt=cn):(Qe=Ao,tt=Vt),Br(oo(Qe,tt),mr(tt-Qe)),$n||Ii(0,Ee)),$n&&(B.ori==1?(Qe=Ui,tt=cn):(Qe=Ao,tt=Vt),Ii(oo(Qe,tt),mr(tt-Qe)),Ue||Br(0,xe)),!Ue&&!$n&&(Br(0,0),Ii(0,0))}if(Kn._x=Ue,Kn._y=$n,V==null){if(ie){if(On!=null){let[We,ze]=ht.scales;ht.values[0]=We!=null?Tr(B.ori==0?cn:Vt,We):null,ht.values[1]=ze!=null?Tr(B.ori==1?cn:Vt,ze):null}Mt(nh,r,cn,Vt,mt,Ge,oe)}if($i){let We=ie&&ht.setSeries,ze=wr.prox;Li==null?Xn<=ze&&ei(Ei,qi,!0,We):Xn>ze?ei(null,qi,!0,We):Ei!=Li&&ei(Ei,qi,!0,We)}}br&&(de.idx=oe,y()),Z!==!1&&at("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(),at("syncRect",F))}function H(V,Z,ie,oe,ge,xe,Ee){te._lock||Vi&&V!=null&&V.movementX==0&&V.movementY==0||(G(V,Z,ie,oe,ge,xe,Ee,!1,V!=null),V!=null?_(null,!0,!0):_(Z,!0,!1))}function G(V,Z,ie,oe,ge,xe,Ee,We,ze){if(F==null&&W(!1),Zr(V),V!=null)ie=V.clientX-F.left,oe=V.clientY-F.top;else{if(ie<0||oe<0){cn=-10,Vt=-10;return}let[Xe,Qe]=ht.scales,tt=Z.cursor.sync,[Ct,zt]=tt.values,[_t,Wt]=tt.scales,[vt,ct]=ht.match,xn=Z.axes[0].side%2==1,Dn=B.ori==0?mt:Ge,pr=B.ori==1?mt:Ge,Yt=xn?xe:ge,fe=xn?ge:xe,$e=xn?oe:ie,Ce=xn?ie:oe;if(_t!=null?ie=vt(Xe,_t)?b(Ct,$[Xe],Dn,0):-10:ie=Dn*($e/Yt),Wt!=null?oe=ct(Qe,Wt)?b(zt,$[Qe],pr,0):-10:oe=pr*(Ce/fe),B.ori==1){let Ke=ie;ie=oe,oe=Ke}}ze&&(Z==null||Z.cursor.event.type==nh)&&((ie<=1||ie>=mt-1)&&(ie=Ns(ie,mt)),(oe<=1||oe>=Ge-1)&&(oe=Ns(oe,Ge))),We?(Ea=ie,Ho=oe,[Ui,Ao]=te.move(r,ie,oe)):(cn=ie,Vt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){vn(Y,!1)}let re,ae,be,ke;function ve(V,Z,ie,oe,ge,xe,Ee){Vi=!0,Ue=$n=Kn._x=Kn._y=!1,G(V,Z,ie,oe,ge,xe,Ee,!0,!1),V!=null&&(Sn(rh,oh,we,!1),Mt(nm,r,Ui,Ao,mt,Ge,null));let{left:We,top:ze,width:Xe,height:Qe}=xt;re=We,ae=ze,be=Xe,ke=Qe}function we(V,Z,ie,oe,ge,xe,Ee){Vi=Kn._x=Kn._y=!1,G(V,Z,ie,oe,ge,xe,Ee,!1,!0);let{left:We,top:ze,width:Xe,height:Qe}=xt,tt=Xe>0||Qe>0,Ct=re!=We||ae!=ze||be!=Xe||ke!=Qe;if(tt&&Ct&&vn(xt),Kn.setScale&&tt&&Ct){let zt=We,_t=Xe,Wt=ze,vt=Qe;if(B.ori==1&&(zt=ze,_t=Qe,Wt=We,vt=Xe),Ue&&hr(C,Tr(zt,C),Tr(zt+_t,C)),$n)for(let ct in $){let xn=$[ct];ct!=C&&xn.from==null&&xn.min!=bn&&hr(ct,Tr(Wt+vt,ct),Tr(Wt,ct))}Q()}else te.lock&&(te._lock=!te._lock,_(Z,!0,V!=null));V!=null&&(Pn(rh,oh),Mt(rh,r,cn,Vt,mt,Ge,null))}function Oe(V,Z,ie,oe,ge,xe,Ee){if(te._lock)return;Zr(V);let We=Vi;if(Vi){let ze=!0,Xe=!0,Qe=10,tt,Ct;B.ori==0?(tt=Ue,Ct=$n):(tt=$n,Ct=Ue),tt&&Ct&&(ze=cn<=Qe||cn>=mt-Qe,Xe=Vt<=Qe||Vt>=Ge-Qe),tt&&ze&&(cn=cn<Ui?0:mt),Ct&&Xe&&(Vt=Vt<Ao?0:Ge),_(null,!0,!0),Vi=!1}cn=-10,Vt=-10,ee.fill(null),_(null,!0,!0),We&&(Vi=We)}function Re(V,Z,ie,oe,ge,xe,Ee){te._lock||(Zr(V),Ar(),Q(),V!=null&&Mt(om,r,cn,Vt,mt,Ge,null))}function Ye(){M.forEach(CA),Xr(r.width,r.height,!0)}Rs(ec,fa,Ye);const ut={};ut.mousedown=ve,ut.mousemove=H,ut.mouseup=we,ut.dblclick=Re,ut.setSeries=(V,Z,ie,oe)=>{let ge=ht.match[2];ie=ge(r,Z,ie),ie!=-1&&ei(ie,oe,!0,!1)},se&&(Sn(nm,i,ve),Sn(nh,i,H),Sn(rm,i,V=>{Zr(V),W(!1)}),Sn(im,i,Oe),Sn(om,i,Re),Mh.add(r),r.syncRect=W);const et=r.hooks=n.hooks||{};function at(V,Z,ie){fs?Bo.push([V,Z,ie]):V in et&&et[V].forEach(oe=>{oe.call(null,r,Z,ie)})}(n.plugins||[]).forEach(V=>{for(let Z in V.hooks)et[Z]=(et[Z]||[]).concat(V.hooks[Z])});const Tn=(V,Z,ie)=>ie,ht=ar({key:null,setSeries:!1,filters:{pub:km,sub:km},scales:[C,x[1]?x[1].scale:null],match:[Sm,Sm,Tn],values:[null,null]},te.sync);ht.match.length==2&&ht.match.push(Tn),te.sync=ht;const On=ht.key,St=lv(On);function Mt(V,Z,ie,oe,ge,xe,Ee){ht.filters.pub(V,Z,ie,oe,ge,xe,Ee)&&St.pub(V,Z,ie,oe,ge,xe,Ee)}St.sub(r);function dr(V,Z,ie,oe,ge,xe,Ee){ht.filters.sub(V,Z,ie,oe,ge,xe,Ee)&&ut[V](null,Z,ie,oe,ge,xe,Ee)}r.pub=dr;function Mr(){St.unsub(r),Mh.delete(r),Sr.clear(),ch(ec,fa,Ye),f.remove(),me==null||me.remove(),at("destroy")}r.destroy=Mr;function Nn(){at("init",n,e),ur(e||n.data,!1),S[C]?De(C,S[C]):Ar(),hi=xt.show&&(xt.width>0||xt.height>0),Pr=br=!0,Xr(n.width,n.height)}return x.forEach(No),M.forEach(Wr),t?t instanceof HTMLElement?(t.appendChild(f),Nn()):t(r,Nn):Nn(),r}Dr.assign=ar,Dr.fmtNum=dh,Dr.rangeNum=ic,Dr.rangeLog=rc,Dr.rangeAsinh=uh,Dr.orient=Fs,Dr.pxRatio=rn,Dr.join=p_,Dr.fmtDate=mh,Dr.tzDate=S_,Dr.sync=lv;{Dr.addGap=sA,Dr.clipGaps=hc;let n=Dr.paths={points:gv};n.linear=vv,n.stepped=cA,n.bars=uA,n.spline=dA}var _v,Av;function kA(){return Av||(Av=1,_v=function(n,e,t,r,d){var p,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(d===void 0)d=n.length-1;else if(d=d|0,d<r||d>=n.length)throw new RangeError("invalid upper bound");for(;r<=d;)if(p=r+(d-r>>>1),g=+t(n[p],e,p,n),g<0)r=p+1;else if(g>0)d=p-1;else return p;return~r}),_v}var SA=kA();const oP=fr("H",Dl(SA));var Lh,$v;function _A(){if($v)return Lh;$v=1;function n(e,t,r){var d=-1,p=e.length;t<0&&(t=-t>p?0:p+t),r=r>p?p:r,r<0&&(r+=p),p=t>r?0:r-t>>>0,t>>>=0;for(var g=Array(p);++d<p;)g[d]=e[d+t];return g}return Lh=n,Lh}var Ih,Tv;function AA(){if(Tv)return Ih;Tv=1;var n=_A();function e(t,r,d){var p=t.length;return d=d===void 0?p:d,!r&&d>=p?t:n(t,r,d)}return Ih=e,Ih}var Rh,Mv;function Ev(){if(Mv)return Rh;Mv=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=e+t+r,p="\\ufe0e\\ufe0f",g="\\u200d",b=RegExp("["+g+n+d+p+"]");function h(f){return b.test(f)}return Rh=h,Rh}var Oh,Lv;function $A(){if(Lv)return Oh;Lv=1;function n(e){return e.split("")}return Oh=n,Oh}var Nh,Iv;function TA(){if(Iv)return Nh;Iv=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=e+t+r,p="\\ufe0e\\ufe0f",g="["+n+"]",b="["+d+"]",h="\\ud83c[\\udffb-\\udfff]",f="(?:"+b+"|"+h+")",s="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",u="\\u200d",i=f+"?",c="["+p+"]?",m="(?:"+u+"(?:"+[s,a,l].join("|")+")"+c+i+")*",w=c+i+m,x="(?:"+[s+b+"?",b,a,l,g].join("|")+")",M=RegExp(h+"(?="+h+")|"+x+w,"g");function $(k){return k.match(M)||[]}return Nh=$,Nh}var Dh,Rv;function MA(){if(Rv)return Dh;Rv=1;var n=$A(),e=Ev(),t=TA();function r(d){return e(d)?t(d):n(d)}return Dh=r,Dh}var Fh,Ov;function EA(){if(Ov)return Fh;Ov=1;var n=typeof ns=="object"&&ns&&ns.Object===Object&&ns;return Fh=n,Fh}var Ph,Nv;function LA(){if(Nv)return Ph;Nv=1;var n=EA(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return Ph=t,Ph}var Wh,Dv;function Bh(){if(Dv)return Wh;Dv=1;var n=LA(),e=n.Symbol;return Wh=e,Wh}var zh,Fv;function IA(){if(Fv)return zh;Fv=1;function n(e,t){for(var r=-1,d=e==null?0:e.length,p=Array(d);++r<d;)p[r]=t(e[r],r,e);return p}return zh=n,zh}var Hh,Pv;function RA(){if(Pv)return Hh;Pv=1;var n=Array.isArray;return Hh=n,Hh}var jh,Wv;function OA(){if(Wv)return jh;Wv=1;var n=Bh(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,d=n?n.toStringTag:void 0;function p(g){var b=t.call(g,d),h=g[d];try{g[d]=void 0;var f=!0}catch{}var s=r.call(g);return f&&(b?g[d]=h:delete g[d]),s}return jh=p,jh}var Uh,Bv;function NA(){if(Bv)return Uh;Bv=1;var n=Object.prototype,e=n.toString;function t(r){return e.call(r)}return Uh=t,Uh}var Vh,zv;function DA(){if(zv)return Vh;zv=1;var n=Bh(),e=OA(),t=NA(),r="[object Null]",d="[object Undefined]",p=n?n.toStringTag:void 0;function g(b){return b==null?b===void 0?d:r:p&&p in Object(b)?e(b):t(b)}return Vh=g,Vh}var Gh,Hv;function FA(){if(Hv)return Gh;Hv=1;function n(e){return e!=null&&typeof e=="object"}return Gh=n,Gh}var qh,jv;function PA(){if(jv)return qh;jv=1;var n=DA(),e=FA(),t="[object Symbol]";function r(d){return typeof d=="symbol"||e(d)&&n(d)==t}return qh=r,qh}var Kh,Uv;function WA(){if(Uv)return Kh;Uv=1;var n=Bh(),e=IA(),t=RA(),r=PA(),d=n?n.prototype:void 0,p=d?d.toString:void 0;function g(b){if(typeof b=="string")return b;if(t(b))return e(b,g)+"";if(r(b))return p?p.call(b):"";var h=b+"";return h=="0"&&1/b==-1/0?"-0":h}return Kh=g,Kh}var Yh,Vv;function gc(){if(Vv)return Yh;Vv=1;var n=WA();function e(t){return t==null?"":n(t)}return Yh=e,Yh}var Xh,Gv;function BA(){if(Gv)return Xh;Gv=1;var n=AA(),e=Ev(),t=MA(),r=gc();function d(p){return function(g){g=r(g);var b=e(g)?t(g):void 0,h=b?b[0]:g.charAt(0),f=b?n(b,1).join(""):g.slice(1);return h[p]()+f}}return Xh=d,Xh}var Zh,qv;function Kv(){if(qv)return Zh;qv=1;var n=BA(),e=n("toUpperCase");return Zh=e,Zh}var zA=Kv();const HA=Dl(zA);var Qh,Yv;function jA(){if(Yv)return Qh;Yv=1;var n=gc(),e=Kv();function t(r){return e(n(r).toLowerCase())}return Qh=t,Qh}var Jh,Xv;function UA(){if(Xv)return Jh;Xv=1;function n(e,t,r,d){var p=-1,g=e==null?0:e.length;for(d&&g&&(r=e[++p]);++p<g;)r=t(r,e[p],p,e);return r}return Jh=n,Jh}var ed,Zv;function VA(){if(Zv)return ed;Zv=1;function n(e){return function(t){return e==null?void 0:e[t]}}return ed=n,ed}var td,Qv;function GA(){if(Qv)return td;Qv=1;var n=VA(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},t=n(e);return td=t,td}var nd,Jv;function qA(){if(Jv)return nd;Jv=1;var n=GA(),e=gc(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",d="\\ufe20-\\ufe2f",p="\\u20d0-\\u20ff",g=r+d+p,b="["+g+"]",h=RegExp(b,"g");function f(s){return s=e(s),s&&s.replace(t,n).replace(h,"")}return nd=f,nd}var rd,ey;function KA(){if(ey)return rd;ey=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(t){return t.match(n)||[]}return rd=e,rd}var id,ty;function YA(){if(ty)return id;ty=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 e(t){return n.test(t)}return id=e,id}var od,ny;function XA(){if(ny)return od;ny=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=e+t+r,p="\\u2700-\\u27bf",g="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",l="\\ufe0e\\ufe0f",u=b+h+f+s,i="['’]",c="["+u+"]",m="["+d+"]",w="\\d+",x="["+p+"]",M="["+g+"]",$="[^"+n+u+w+p+g+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+k+")",R="[^"+n+"]",N="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",B="\\u200d",P="(?:"+M+"|"+$+")",O="(?:"+L+"|"+$+")",A="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",z="["+l+"]?",U="(?:"+B+"(?:"+[R,N,I].join("|")+")"+z+D+")*",K="\\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,I].join("|")+")"+ee,te=RegExp([L+"?"+M+"+"+A+"(?="+[c,L,"$"].join("|")+")",O+"+"+S+"(?="+[c,L+P,"$"].join("|")+")",L+"?"+P+"+"+A,L+"+"+S,X,K,w,de].join("|"),"g");function le(se){return se.match(te)||[]}return od=le,od}var sd,ry;function ZA(){if(ry)return sd;ry=1;var n=KA(),e=YA(),t=gc(),r=XA();function d(p,g,b){return p=t(p),g=b?void 0:g,g===void 0?e(p)?r(p):n(p):p.match(g)||[]}return sd=d,sd}var ad,iy;function QA(){if(iy)return ad;iy=1;var n=UA(),e=qA(),t=ZA(),r="['’]",d=RegExp(r,"g");function p(g){return function(b){return n(t(e(b).replace(d,"")),g,"")}}return ad=p,ad}var ld,oy;function JA(){if(oy)return ld;oy=1;var n=jA(),e=QA(),t=e(function(r,d,p){return d=d.toLowerCase(),r+(p?n(d):d)});return ld=t,ld}var e$=JA();const t$=Dl(e$),n$=Object.assign({"./ArrayWidget.vue":()=>rt(()=>nt.import("./ArrayWidget-DLfNWDzN-e5dda102920cdc58df21.js"),void 0),"./ArrayplotWidget.vue":()=>rt(()=>nt.import("./ArrayplotWidget-CoRsUxHG-9f96a78d35484babbcc2.js"),void 0),"./BlockWidget.vue":()=>rt(()=>nt.import("./BlockWidget-BmHSFvOq-1d1d3a1a21d0232d3d25.js"),void 0),"./ButtonWidget.vue":()=>rt(()=>nt.import("./ButtonWidget-C3ZWRjZZ-cb9cd7aecb9f8bb23ec8.js"),void 0),"./CanvasWidget.vue":()=>rt(()=>nt.import("./CanvasWidget-CL-XzPF4-2fbb6ee544800ad39962.js"),void 0),"./CanvasdotWidget.vue":()=>rt(()=>nt.import("./CanvasdotWidget-D8Y9DgVE-ca03cd798c694a9f76da.js"),void 0),"./CanvasimageWidget.vue":()=>rt(()=>nt.import("./CanvasimageWidget-DHSGK_tD-958e8d8c0d7a25a9a931.js"),void 0),"./CanvasimagevalueWidget.vue":()=>rt(()=>nt.import("./CanvasimagevalueWidget-Btt_fQfC-2c7d4bdcfc3c850193d5.js"),void 0),"./CanvaslabelWidget.vue":()=>rt(()=>nt.import("./CanvaslabelWidget-BF_8RTjv-988781975173716c6752.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>rt(()=>nt.import("./CanvaslabelvalueWidget-scbwaujI-5e58478e5cd3f15189a1.js"),void 0),"./CanvaslineWidget.vue":()=>rt(()=>nt.import("./CanvaslineWidget-gRvm_-TT-8463efc10e7e5f475e6d.js"),void 0),"./CanvaslinevalueWidget.vue":()=>rt(()=>nt.import("./CanvaslinevalueWidget-CljziRek-3f688369236ad348e0d7.js"),void 0),"./CheckbuttonWidget.vue":()=>rt(()=>nt.import("./CheckbuttonWidget-BOabI_jE-f9701442b0a6ee763674.js"),void 0),"./ComboboxWidget.vue":()=>rt(()=>nt.import("./ComboboxWidget-BLXNYFiY-fb0d798e48d988bfc2fa.js"),void 0),"./DateWidget.vue":()=>rt(()=>nt.import("./DateWidget-BTqLCtLS-485bd9a637881db50566.js"),void 0),"./DynamicWidget.vue":()=>rt(()=>nt.import("./DynamicWidget-CfMtj7H8-adb5c16912a8cc73444e.js"),void 0),"./FormatvalueWidget.vue":()=>rt(()=>nt.import("./FormatvalueWidget-CLYx8qbg-7c96f196e42c1f3467cd.js"),void 0),"./HorizontalWidget.vue":()=>rt(()=>nt.import("./HorizontalWidget-AY2M01qP-dcb248d4557a94df6bc9.js"),void 0),"./HorizontalboxWidget.vue":()=>rt(()=>nt.import("./HorizontalboxWidget-2MEKvq_C-3f613b3bc4a7e73b0016.js"),void 0),"./HorizontallineWidget.vue":()=>rt(()=>nt.import("./HorizontallineWidget-DgpOPA7q-9990fdf6559340723255.js"),void 0),"./IframeWidget.vue":()=>rt(()=>nt.import("./IframeWidget-UKKUl7k5-327adf87e2effc5fe229.js"),void 0),"./ImageviewerWidget.vue":()=>rt(()=>nt.import("./ImageviewerWidget-DhuQH5Io-201c0147cfdd171f8fb0.js"),void 0),"./LabelWidget.vue":()=>rt(()=>nt.import("./LabelWidget-SO9zqcNN-42beb86aa876f0d83fa6.js"),void 0),"./LabelledWidget.vue":()=>rt(()=>nt.import("./LabelledWidget-DWoM5AJ5-a7ceb818d3ba46de3cc3.js"),void 0),"./LabelprogressbarWidget.vue":()=>rt(()=>nt.import("./LabelprogressbarWidget-D3vnkvQZ-b33a1b6faa99b0af5ace.js"),void 0),"./LabelsparklineWidget.vue":()=>rt(()=>nt.import("./LabelsparklineWidget-DO0T-Jot-577ba59d876076f4fdff.js"),void 0),"./LabelvalueWidget.vue":()=>rt(()=>nt.import("./LabelvalueWidget-B6BbNFnk-51a0aef39666ca5f3c98.js"),void 0),"./LabelvaluedescWidget.vue":()=>rt(()=>nt.import("./LabelvaluedescWidget-CxfL-H9C-956accb49897f765ab83.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>rt(()=>nt.import("./LabelvaluelimitsbarWidget-BT5k9mHv-1275978c2fd98de217d7.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>rt(()=>nt.import("./LabelvaluelimitscolumnWidget-DUbmxh4p-45ec5740e448af4235c3.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>rt(()=>nt.import("./LabelvaluerangebarWidget-DexAc2UB-4d48398c0e41cbb046a8.js"),void 0),"./LedWidget.vue":()=>rt(()=>nt.import("./LedWidget-D1RwHb_V-a9b7d3265fd1aee98578.js"),void 0),"./LimitsbarWidget.vue":()=>rt(()=>nt.import("./LimitsbarWidget-ClOmoV50-61ed5764d851e804cace.js"),void 0),"./LimitscolorWidget.vue":()=>rt(()=>nt.import("./LimitscolorWidget-CBUoEYKp-e993ee30cabee34bbdd0.js"),void 0),"./LimitscolumnWidget.vue":()=>rt(()=>nt.import("./LimitscolumnWidget-hsHkmY-_-c48e5f428df7da0bed22.js"),void 0),"./LinegraphWidget.vue":()=>rt(()=>nt.import("./LinegraphWidget-CXrKtxOo-b365bcb5db673346c905.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>rt(()=>nt.import("./MatrixbycolumnsWidget-CsogVU9c-6ed1a295d7136445b9eb.js"),void 0),"./ProgressbarWidget.vue":()=>rt(()=>nt.import("./ProgressbarWidget-CO6CEkxP-aa9097ef0634366583d6.js"),void 0),"./RadiobuttonWidget.vue":()=>rt(()=>nt.import("./RadiobuttonWidget-DrxUclws-14e36b68c13972132456.js"),void 0),"./RadiogroupWidget.vue":()=>rt(()=>nt.import("./RadiogroupWidget-DN9C38cg-b40b88eb8f6a001bf8eb.js"),void 0),"./RangebarWidget.vue":()=>rt(()=>nt.import("./RangebarWidget-5uQTfLMP-a066e0c203198215bb39.js"),void 0),"./RollupWidget.vue":()=>rt(()=>nt.import("./RollupWidget-B0DCULnu-ae9320088f6cc1bd019b.js"),void 0),"./ScrollwindowWidget.vue":()=>rt(()=>nt.import("./ScrollwindowWidget-BOkZQgtf-5238338c7af7cf429b07.js"),void 0),"./SignalWidget.vue":()=>rt(()=>nt.import("./SignalWidget-Cis0Xkea-ca8be270511647909b11.js"),void 0),"./SpacerWidget.vue":()=>rt(()=>nt.import("./SpacerWidget-CLcqC2Qk-7a5e4b687c662cd5cfaf.js"),void 0),"./SparklineWidget.vue":()=>rt(()=>nt.import("./SparklineWidget-CTp83eZ--ce6ee4faac034e6b5e14.js"),void 0),"./TabbookWidget.vue":()=>rt(()=>nt.import("./TabbookWidget-uucd-zsX-d82ce4e8e40e83291fd6.js"),void 0),"./TextboxWidget.vue":()=>rt(()=>nt.import("./TextboxWidget-C2n38ti5-785c5c28db2a8d1f7a43.js"),void 0),"./TextfieldWidget.vue":()=>rt(()=>nt.import("./TextfieldWidget--HTv9ddk-e21c35eaf43cbc82e6c6.js"),void 0),"./TimeWidget.vue":()=>rt(()=>nt.import("./TimeWidget-CPNVZaUM-642993622fb28ab114da.js"),void 0),"./TitleWidget.vue":()=>rt(()=>nt.import("./TitleWidget-Cp0cb6V8-dd7a7125d73e92b9445e.js"),void 0),"./ValueWidget.vue":()=>rt(()=>nt.import("./ValueWidget-Bk1RFjks-cf3eac099ae59ca39db8.js"),void 0),"./ValuelimitsbarWidget.vue":()=>rt(()=>nt.import("./ValuelimitsbarWidget-C0HIBYh2-8b1d7333204dfad9047b.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>rt(()=>nt.import("./ValuelimitscolumnWidget-BTT90uyX-a30c6d2f4086e52a477f.js"),void 0),"./ValuerangebarWidget.vue":()=>rt(()=>nt.import("./ValuerangebarWidget-CcQw_XK9-ad2b7851b35260b5e13d.js"),void 0),"./VerticalWidget.vue":()=>rt(()=>nt.import("./VerticalWidget-CNtFQv3R-60f2084f54c114d2945a.js"),void 0),"./VerticalboxWidget.vue":()=>rt(()=>nt.import("./VerticalboxWidget-Yxmz1SnU-aeee73a1a8be56267bcb.js"),void 0)}),r$=Object.entries(n$).reduce((n,[e,t])=>{e=e.split("/").pop();const r=HA(t$(e.replace(/\.\w+$/,"")));return{...n,[r]:jp(t)}},{}),sP=fr("z",{components:r$}),sy="openc3-ace-vim-mode-enabled",cd="ace/keyboard/vim",ay="openc3-ace-default-scripting-language",mc=fr("a",{isVimModeEnabled(){return localStorage.getItem(sy)==="true"},setVimMode(n){localStorage.setItem(sy,JSON.stringify(!!n))},toggleVimMode(n){this.isVimModeEnabled()?(n.setKeyboardHandler(null),this.setVimMode(!1)):(n.setKeyboardHandler(cd),this.setVimMode(!0)),n.focus()},applyVimModeIfEnabled(n,{saveFn:e}={}){this.isVimModeEnabled()?(n.setKeyboardHandler(cd),ace.config.loadModule(cd,t=>{t.CodeMirror.Vim.defineEx("write","w",r=>{typeof e=="function"?e():r.ace.execCommand("save")})})):n.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(ay)||"python"},setDefaultScriptingLanguage(n){(n==="ruby"||n==="python")&&localStorage.setItem(ay,n)}}),i$={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(n){return n.replaceAll(" ","-").toLowerCase()},subMenuClick(n){n.command(n),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},o$={class:"app-title mr-2"};function s$(n,e,t,r,d,p){const g=Ve("v-col"),b=Ve("v-row"),h=Ve("v-icon"),f=Ve("v-btn"),s=Ve("v-divider"),a=Ve("v-list-item-title"),l=Ve("v-list-item"),u=Ve("v-list"),i=Ve("v-menu"),c=Ve("v-radio"),m=Ve("v-list-item-action"),w=Ve("v-radio-group"),x=Ve("v-checkbox");return st(),qt(Up,{to:"#openc3-menu"},[He(b,{"no-gutters":""},{default:Pe(()=>[He(g,{"align-self":"end"},{default:Pe(()=>[Un("span",o$,Cn(t.title),1)]),_:1})]),_:1}),He(b,{dense:"",class:"flex-nowrap"},{default:Pe(()=>[(st(!0),nn(oi,null,go(t.menus,(M,$)=>(st(),qt(i,{ref_for:!0,ref:"topmenu",key:$},{activator:Pe(({props:k})=>[He(f,Rl({ref_for:!0},k,{variant:"outlined",class:"mx-1 menu-button",text:M.label,"data-test":p.formatDT(`${t.title} ${M.label}`)}),{append:Pe(()=>[He(h,{class:"menu-button-icon"},{default:Pe(()=>[...e[0]||(e[0]=[It(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:Pe(()=>[He(u,null,{default:Pe(()=>[(st(!0),nn(oi,null,go(M.items,(k,C)=>(st(),nn(oi,null,[k.divider?(st(),qt(s,{key:C+"-divider"})):k.subMenu&&k.subMenu.length>0?(st(),nn("div",{key:C+"-submenu"},[(st(),qt(i,{"open-on-hover":"",location:"right",key:C},{activator:Pe(({props:R})=>[(st(),qt(l,Rl({ref_for:!0},R,{disabled:k.disabled,key:C}),ku({append:Pe(()=>[He(h,null,{default:Pe(()=>[...e[1]||(e[1]=[It(" mdi-chevron-right ",-1)])]),_:1})]),default:Pe(()=>[!k.radio&&!k.checkbox?(st(),qt(a,{key:0,style:Cs("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Pe(()=>[It(Cn(k.label),1)]),_:2},1032,["style"])):jr("",!0)]),_:2},[k.icon?{name:"prepend",fn:Pe(()=>[He(h,{disabled:k.disabled},{default:Pe(()=>[It(Cn(k.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Pe(()=>[He(u,null,{default:Pe(()=>[(st(!0),nn(oi,null,go(k.subMenu,(R,N)=>(st(),qt(l,{key:N,"prepend-icon":R.icon,onClick:I=>p.subMenuClick(R)},{default:Pe(()=>[He(a,null,{default:Pe(()=>[It(Cn(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):k.radioGroup?(st(),qt(w,{"model-value":k.value,"onUpdate:modelValue":k.command,key:C+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:Pe(()=>[(st(!0),nn(oi,null,go(k.choices,(R,N)=>(st(),qt(l,{key:N+"-choice"},{default:Pe(()=>[He(m,{class:"list-action"},{default:Pe(()=>[He(c,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(st(),qt(l,{onClick:R=>k.command(k),disabled:k.disabled,"data-test":p.formatDT(`${t.title} ${M.label} ${k.label}`),key:C+"-list"},ku({default:Pe(()=>[k.checkbox?(st(),qt(m,{key:0,class:"list-action"},{default:Pe(()=>[He(x,{modelValue:k.checked,"onUpdate:modelValue":R=>k.checked=R,label:k.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):jr("",!0),!k.radio&&!k.checkbox?(st(),qt(a,{key:1,style:Cs("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Pe(()=>[It(Cn(k.label),1)]),_:2},1032,["style"])):jr("",!0)]),_:2},[k.icon?{name:"prepend",fn:Pe(()=>[He(h,{icon:k.icon,disabled:k.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const a$=eo(i$,[["render",s$],["__scopeId","data-v-4d454b93"]]);function ly(n,e){return function(){return n.apply(e,arguments)}}const{toString:l$}=Object.prototype,{getPrototypeOf:ud}=Object,{iterator:vc,toStringTag:cy}=Symbol,yc=(n=>e=>{const t=l$.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),so=n=>(n=n.toLowerCase(),e=>yc(e)===n),bc=n=>e=>typeof e===n,{isArray:Ca}=Array,ka=bc("undefined");function ol(n){return n!==null&&!ka(n)&&n.constructor!==null&&!ka(n.constructor)&&li(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const uy=so("ArrayBuffer");function c$(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&uy(n.buffer),e}const u$=bc("string"),li=bc("function"),hy=bc("number"),sl=n=>n!==null&&typeof n=="object",h$=n=>n===!0||n===!1,wc=n=>{if(yc(n)!=="object")return!1;const e=ud(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(cy in n)&&!(vc in n)},d$=n=>{if(!sl(n)||ol(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},p$=so("Date"),f$=so("File"),g$=so("Blob"),m$=so("FileList"),v$=n=>sl(n)&&li(n.pipe),y$=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||li(n.append)&&((e=yc(n))==="formdata"||e==="object"&&li(n.toString)&&n.toString()==="[object FormData]"))},b$=so("URLSearchParams"),[w$,x$,C$,k$]=["ReadableStream","Request","Response","Headers"].map(so),S$=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function al(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),Ca(n))for(r=0,d=n.length;r<d;r++)e.call(null,n[r],r,n);else{if(ol(n))return;const p=t?Object.getOwnPropertyNames(n):Object.keys(n),g=p.length;let b;for(r=0;r<g;r++)b=p[r],e.call(null,n[b],b,n)}}function dy(n,e){if(ol(n))return null;e=e.toLowerCase();const t=Object.keys(n);let r=t.length,d;for(;r-- >0;)if(d=t[r],e===d.toLowerCase())return d;return null}const Ps=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,py=n=>!ka(n)&&n!==Ps;function hd(){const{caseless:n,skipUndefined:e}=py(this)&&this||{},t={},r=(d,p)=>{const g=n&&dy(t,p)||p;wc(t[g])&&wc(d)?t[g]=hd(t[g],d):wc(d)?t[g]=hd({},d):Ca(d)?t[g]=d.slice():(!e||!ka(d))&&(t[g]=d)};for(let d=0,p=arguments.length;d<p;d++)arguments[d]&&al(arguments[d],r);return t}const _$=(n,e,t,{allOwnKeys:r}={})=>(al(e,(d,p)=>{t&&li(d)?n[p]=ly(d,t):n[p]=d},{allOwnKeys:r}),n),A$=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),$$=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},T$=(n,e,t,r)=>{let d,p,g;const b={};if(e=e||{},n==null)return e;do{for(d=Object.getOwnPropertyNames(n),p=d.length;p-- >0;)g=d[p],(!r||r(g,n,e))&&!b[g]&&(e[g]=n[g],b[g]=!0);n=t!==!1&&ud(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},M$=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},E$=n=>{if(!n)return null;if(Ca(n))return n;let e=n.length;if(!hy(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},L$=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&ud(Uint8Array)),I$=(n,e)=>{const t=(n&&n[vc]).call(n);let r;for(;(r=t.next())&&!r.done;){const d=r.value;e.call(n,d[0],d[1])}},R$=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},O$=so("HTMLFormElement"),N$=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),fy=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),D$=so("RegExp"),gy=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};al(t,(d,p)=>{let g;(g=e(d,p,n))!==!1&&(r[p]=g||d)}),Object.defineProperties(n,r)},F$=n=>{gy(n,(e,t)=>{if(li(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(li(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},P$=(n,e)=>{const t={},r=d=>{d.forEach(p=>{t[p]=!0})};return Ca(n)?r(n):r(String(n).split(e)),t},W$=()=>{},B$=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function z$(n){return!!(n&&li(n.append)&&n[cy]==="FormData"&&n[vc])}const H$=n=>{const e=new Array(10),t=(r,d)=>{if(sl(r)){if(e.indexOf(r)>=0)return;if(ol(r))return r;if(!("toJSON"in r)){e[d]=r;const p=Ca(r)?[]:{};return al(r,(g,b)=>{const h=t(g,d+1);!ka(h)&&(p[b]=h)}),e[d]=void 0,p}}return r};return t(n,0)},j$=so("AsyncFunction"),U$=n=>n&&(sl(n)||li(n))&&li(n.then)&&li(n.catch),my=((n,e)=>n?setImmediate:e?((t,r)=>(Ps.addEventListener("message",({source:d,data:p})=>{d===Ps&&p===t&&r.length&&r.shift()()},!1),d=>{r.push(d),Ps.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",li(Ps.postMessage)),V$=typeof queueMicrotask<"u"?queueMicrotask.bind(Ps):typeof process<"u"&&process.nextTick||my,G$=n=>n!=null&&li(n[vc]),_e={isArray:Ca,isArrayBuffer:uy,isBuffer:ol,isFormData:y$,isArrayBufferView:c$,isString:u$,isNumber:hy,isBoolean:h$,isObject:sl,isPlainObject:wc,isEmptyObject:d$,isReadableStream:w$,isRequest:x$,isResponse:C$,isHeaders:k$,isUndefined:ka,isDate:p$,isFile:f$,isBlob:g$,isRegExp:D$,isFunction:li,isStream:v$,isURLSearchParams:b$,isTypedArray:L$,isFileList:m$,forEach:al,merge:hd,extend:_$,trim:S$,stripBOM:A$,inherits:$$,toFlatObject:T$,kindOf:yc,kindOfTest:so,endsWith:M$,toArray:E$,forEachEntry:I$,matchAll:R$,isHTMLForm:O$,hasOwnProperty:fy,hasOwnProp:fy,reduceDescriptors:gy,freezeMethods:F$,toObjectSet:P$,toCamelCase:N$,noop:W$,toFiniteNumber:B$,findKey:dy,global:Ps,isContextDefined:py,isSpecCompliantForm:z$,toJSONObject:H$,isAsyncFn:j$,isThenable:U$,setImmediate:my,asap:V$,isIterable:G$};function Tt(n,e,t,r,d){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),d&&(this.response=d,this.status=d.status?d.status:null)}_e.inherits(Tt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const vy=Tt.prototype,yy={};["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=>{yy[n]={value:n}}),Object.defineProperties(Tt,yy),Object.defineProperty(vy,"isAxiosError",{value:!0}),Tt.from=(n,e,t,r,d,p)=>{const g=Object.create(vy);_e.toFlatObject(n,g,function(f){return f!==Error.prototype},f=>f!=="isAxiosError");const b=n&&n.message?n.message:"Error",h=e==null&&n?n.code:e;return Tt.call(g,b,h,t,r,d),n&&g.cause==null&&Object.defineProperty(g,"cause",{value:n,configurable:!0}),g.name=n&&n.name||"Error",p&&Object.assign(g,p),g};const q$=null;function dd(n){return _e.isPlainObject(n)||_e.isArray(n)}function by(n){return _e.endsWith(n,"[]")?n.slice(0,-2):n}function wy(n,e,t){return n?n.concat(e).map(function(r,d){return r=by(r),!t&&d?"["+r+"]":r}).join(t?".":""):e}function K$(n){return _e.isArray(n)&&!n.some(dd)}const Y$=_e.toFlatObject(_e,{},null,function(n){return/^is[A-Z]/.test(n)});function xc(n,e,t){if(!_e.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=_e.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,i){return!_e.isUndefined(i[u])});const r=t.metaTokens,d=t.visitor||f,p=t.dots,g=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(d))throw new TypeError("visitor must be a function");function h(u){if(u===null)return"";if(_e.isDate(u))return u.toISOString();if(_e.isBoolean(u))return u.toString();if(!b&&_e.isBlob(u))throw new Tt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(u)||_e.isTypedArray(u)?b&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function f(u,i,c){let m=u;if(u&&!c&&typeof u=="object"){if(_e.endsWith(i,"{}"))i=r?i:i.slice(0,-2),u=JSON.stringify(u);else if(_e.isArray(u)&&K$(u)||(_e.isFileList(u)||_e.endsWith(i,"[]"))&&(m=_e.toArray(u)))return i=by(i),m.forEach(function(w,x){!(_e.isUndefined(w)||w===null)&&e.append(g===!0?wy([i],x,p):g===null?i:i+"[]",h(w))}),!1}return dd(u)?!0:(e.append(wy(c,i,p),h(u)),!1)}const s=[],a=Object.assign(Y$,{defaultVisitor:f,convertValue:h,isVisitable:dd});function l(u,i){if(!_e.isUndefined(u)){if(s.indexOf(u)!==-1)throw Error("Circular reference detected in "+i.join("."));s.push(u),_e.forEach(u,function(c,m){(!(_e.isUndefined(c)||c===null)&&d.call(e,c,_e.isString(m)?m.trim():m,i,a))===!0&&l(c,i?i.concat(m):[m])}),s.pop()}}if(!_e.isObject(n))throw new TypeError("data must be an object");return l(n),e}function xy(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function pd(n,e){this._pairs=[],n&&xc(n,this,e)}const Cy=pd.prototype;Cy.append=function(n,e){this._pairs.push([n,e])},Cy.toString=function(n){const e=n?function(t){return n.call(this,t,xy)}:xy;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function X$(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ky(n,e,t){if(!e)return n;const r=t&&t.encode||X$;_e.isFunction(t)&&(t={serialize:t});const d=t&&t.serialize;let p;if(d?p=d(e,t):p=_e.isURLSearchParams(e)?e.toString():new pd(e,t).toString(r),p){const g=n.indexOf("#");g!==-1&&(n=n.slice(0,g)),n+=(n.indexOf("?")===-1?"?":"&")+p}return n}let Sy=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_e.forEach(this.handlers,function(t){t!==null&&e(t)})}};const _y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z$=typeof URLSearchParams<"u"?URLSearchParams:pd,Q$=typeof FormData<"u"?FormData:null,J$=typeof Blob<"u"?Blob:null,eT={isBrowser:!0,classes:{URLSearchParams:Z$,FormData:Q$,Blob:J$},protocols:["http","https","file","blob","url","data"]},fd=typeof window<"u"&&typeof document<"u",gd=typeof navigator=="object"&&navigator||void 0,tT=fd&&(!gd||["ReactNative","NativeScript","NS"].indexOf(gd.product)<0),nT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",rT=fd&&window.location.href||"http://localhost",iT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fd,hasStandardBrowserEnv:tT,hasStandardBrowserWebWorkerEnv:nT,navigator:gd,origin:rT},Symbol.toStringTag,{value:"Module"})),Fr={...iT,...eT};function oT(n,e){return xc(n,new Fr.classes.URLSearchParams,{visitor:function(t,r,d,p){return Fr.isNode&&_e.isBuffer(t)?(this.append(r,t.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)},...e})}function sT(n){return _e.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function aT(n){const e={},t=Object.keys(n);let r;const d=t.length;let p;for(r=0;r<d;r++)p=t[r],e[p]=n[p];return e}function Ay(n){function e(t,r,d,p){let g=t[p++];if(g==="__proto__")return!0;const b=Number.isFinite(+g),h=p>=t.length;return g=!g&&_e.isArray(d)?d.length:g,h?(_e.hasOwnProp(d,g)?d[g]=[d[g],r]:d[g]=r,!b):((!d[g]||!_e.isObject(d[g]))&&(d[g]=[]),e(t,r,d[g],p)&&_e.isArray(d[g])&&(d[g]=aT(d[g])),!b)}if(_e.isFormData(n)&&_e.isFunction(n.entries)){const t={};return _e.forEachEntry(n,(r,d)=>{e(sT(r),d,t,0)}),t}return null}function lT(n,e,t){if(_e.isString(n))try{return(e||JSON.parse)(n),_e.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const ll={transitional:_y,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,d=_e.isObject(n);if(d&&_e.isHTMLForm(n)&&(n=new FormData(n)),_e.isFormData(n))return r?JSON.stringify(Ay(n)):n;if(_e.isArrayBuffer(n)||_e.isBuffer(n)||_e.isStream(n)||_e.isFile(n)||_e.isBlob(n)||_e.isReadableStream(n))return n;if(_e.isArrayBufferView(n))return n.buffer;if(_e.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let p;if(d){if(t.indexOf("application/x-www-form-urlencoded")>-1)return oT(n,this.formSerializer).toString();if((p=_e.isFileList(n))||t.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return xc(p?{"files[]":n}:n,g&&new g,this.formSerializer)}}return d||r?(e.setContentType("application/json",!1),lT(n)):n}],transformResponse:[function(n){const e=this.transitional||ll.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(_e.isResponse(n)||_e.isReadableStream(n))return n;if(n&&_e.isString(n)&&(t&&!this.responseType||r)){const d=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(p){if(d)throw p.name==="SyntaxError"?Tt.from(p,Tt.ERR_BAD_RESPONSE,this,null,this.response):p}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fr.classes.FormData,Blob:Fr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],n=>{ll.headers[n]={}});const cT=_e.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"]),uT=n=>{const e={};let t,r,d;return n&&n.split(`
1491
+ `).forEach(function(p){d=p.indexOf(":"),t=p.substring(0,d).trim().toLowerCase(),r=p.substring(d+1).trim(),!(!t||e[t]&&cT[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},$y=Symbol("internals");function cl(n){return n&&String(n).trim().toLowerCase()}function Cc(n){return n===!1||n==null?n:_e.isArray(n)?n.map(Cc):String(n)}function hT(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const dT=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function md(n,e,t,r,d){if(_e.isFunction(r))return r.call(this,e,t);if(d&&(e=t),!!_e.isString(e)){if(_e.isString(r))return e.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(e)}}function pT(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function fT(n,e){const t=_e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(d,p,g){return this[r].call(this,e,d,p,g)},configurable:!0})})}let ci=class{constructor(e){e&&this.set(e)}set(e,t,r){const d=this;function p(b,h,f){const s=cl(h);if(!s)throw new Error("header name must be a non-empty string");const a=_e.findKey(d,s);(!a||d[a]===void 0||f===!0||f===void 0&&d[a]!==!1)&&(d[a||h]=Cc(b))}const g=(b,h)=>_e.forEach(b,(f,s)=>p(f,s,h));if(_e.isPlainObject(e)||e instanceof this.constructor)g(e,t);else if(_e.isString(e)&&(e=e.trim())&&!dT(e))g(uT(e),t);else if(_e.isObject(e)&&_e.isIterable(e)){let b={},h,f;for(const s of e){if(!_e.isArray(s))throw TypeError("Object iterator must return a key-value pair");b[f=s[0]]=(h=b[f])?_e.isArray(h)?[...h,s[1]]:[h,s[1]]:s[1]}g(b,t)}else e!=null&&p(t,e,r);return this}get(e,t){if(e=cl(e),e){const r=_e.findKey(this,e);if(r){const d=this[r];if(!t)return d;if(t===!0)return hT(d);if(_e.isFunction(t))return t.call(this,d,r);if(_e.isRegExp(t))return t.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=cl(e),e){const r=_e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||md(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let d=!1;function p(g){if(g=cl(g),g){const b=_e.findKey(r,g);b&&(!t||md(r,r[b],b,t))&&(delete r[b],d=!0)}}return _e.isArray(e)?e.forEach(p):p(e),d}clear(e){const t=Object.keys(this);let r=t.length,d=!1;for(;r--;){const p=t[r];(!e||md(this,this[p],p,e,!0))&&(delete this[p],d=!0)}return d}normalize(e){const t=this,r={};return _e.forEach(this,(d,p)=>{const g=_e.findKey(r,p);if(g){t[g]=Cc(d),delete t[p];return}const b=e?pT(p):String(p).trim();b!==p&&delete t[p],t[b]=Cc(d),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _e.forEach(this,(r,d)=>{r!=null&&r!==!1&&(t[d]=e&&_e.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
1492
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(d=>r.set(d)),r}static accessor(e){const t=(this[$y]=this[$y]={accessors:{}}).accessors,r=this.prototype;function d(p){const g=cl(p);t[g]||(fT(r,p),t[g]=!0)}return _e.isArray(e)?e.forEach(d):d(e),this}};ci.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(ci.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),_e.freezeMethods(ci);function vd(n,e){const t=this||ll,r=e||t,d=ci.from(r.headers);let p=r.data;return _e.forEach(n,function(g){p=g.call(t,p,d.normalize(),e?e.status:void 0)}),d.normalize(),p}function Ty(n){return!!(n&&n.__CANCEL__)}function Sa(n,e,t){Tt.call(this,n??"canceled",Tt.ERR_CANCELED,e,t),this.name="CanceledError"}_e.inherits(Sa,Tt,{__CANCEL__:!0});function My(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new Tt("Request failed with status code "+t.status,[Tt.ERR_BAD_REQUEST,Tt.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function gT(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function mT(n,e){n=n||10;const t=new Array(n),r=new Array(n);let d=0,p=0,g;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),f=r[p];g||(g=h),t[d]=b,r[d]=h;let s=p,a=0;for(;s!==d;)a+=t[s++],s=s%n;if(d=(d+1)%n,d===p&&(p=(p+1)%n),h-g<e)return;const l=f&&h-f;return l?Math.round(a*1e3/l):void 0}}function vT(n,e){let t=0,r=1e3/e,d,p;const g=(b,h=Date.now())=>{t=h,d=null,p&&(clearTimeout(p),p=null),n(...b)};return[(...b)=>{const h=Date.now(),f=h-t;f>=r?g(b,h):(d=b,p||(p=setTimeout(()=>{p=null,g(d)},r-f)))},()=>d&&g(d)]}const kc=(n,e,t=3)=>{let r=0;const d=mT(50,250);return vT(p=>{const g=p.loaded,b=p.lengthComputable?p.total:void 0,h=g-r,f=d(h),s=g<=b;r=g;const a={loaded:g,total:b,progress:b?g/b:void 0,bytes:h,rate:f||void 0,estimated:f&&b&&s?(b-g)/f:void 0,event:p,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(a)},t)},Ey=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},Ly=n=>(...e)=>_e.asap(()=>n(...e)),yT=Fr.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,Fr.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(Fr.origin),Fr.navigator&&/(msie|trident)/i.test(Fr.navigator.userAgent)):()=>!0,bT=Fr.hasStandardBrowserEnv?{write(n,e,t,r,d,p){const g=[n+"="+encodeURIComponent(e)];_e.isNumber(t)&&g.push("expires="+new Date(t).toGMTString()),_e.isString(r)&&g.push("path="+r),_e.isString(d)&&g.push("domain="+d),p===!0&&g.push("secure"),document.cookie=g.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wT(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function xT(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Iy(n,e,t){let r=!wT(e);return n&&(r||t==!1)?xT(n,e):e}const Ry=n=>n instanceof ci?{...n}:n;function Ws(n,e){e=e||{};const t={};function r(f,s,a,l){return _e.isPlainObject(f)&&_e.isPlainObject(s)?_e.merge.call({caseless:l},f,s):_e.isPlainObject(s)?_e.merge({},s):_e.isArray(s)?s.slice():s}function d(f,s,a,l){if(_e.isUndefined(s)){if(!_e.isUndefined(f))return r(void 0,f,a,l)}else return r(f,s,a,l)}function p(f,s){if(!_e.isUndefined(s))return r(void 0,s)}function g(f,s){if(_e.isUndefined(s)){if(!_e.isUndefined(f))return r(void 0,f)}else return r(void 0,s)}function b(f,s,a){if(a in e)return r(f,s);if(a in n)return r(void 0,f)}const h={url:p,method:p,data:p,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:b,headers:(f,s,a)=>d(Ry(f),Ry(s),a,!0)};return _e.forEach(Object.keys({...n,...e}),function(f){const s=h[f]||d,a=s(n[f],e[f],f);_e.isUndefined(a)&&s!==b||(t[f]=a)}),t}const Oy=n=>{const e=Ws({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:d,xsrfCookieName:p,headers:g,auth:b}=e;if(e.headers=g=ci.from(g),e.url=ky(Iy(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&g.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),_e.isFormData(t)){if(Fr.hasStandardBrowserEnv||Fr.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(_e.isFunction(t.getHeaders)){const h=t.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([s,a])=>{f.includes(s.toLowerCase())&&g.set(s,a)})}}if(Fr.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&yT(e.url))){const h=d&&p&&bT.read(p);h&&g.set(d,h)}return e},CT=typeof XMLHttpRequest<"u",kT=CT&&function(n){return new Promise(function(e,t){const r=Oy(n);let d=r.data;const p=ci.from(r.headers).normalize();let{responseType:g,onUploadProgress:b,onDownloadProgress:h}=r,f,s,a,l,u;function i(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function m(){if(!c)return;const x=ci.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),M={data:!g||g==="text"||g==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:n,request:c};My(function($){e($),i()},function($){t($),i()},M),c=null}"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(m)},c.onabort=function(){c&&(t(new Tt("Request aborted",Tt.ECONNABORTED,n,c)),c=null)},c.onerror=function(x){const M=x&&x.message?x.message:"Network Error",$=new Tt(M,Tt.ERR_NETWORK,n,c);$.event=x||null,t($),c=null},c.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const M=r.transitional||_y;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new Tt(x,M.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,n,c)),c=null},d===void 0&&p.setContentType(null),"setRequestHeader"in c&&_e.forEach(p.toJSON(),function(x,M){c.setRequestHeader(M,x)}),_e.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),g&&g!=="json"&&(c.responseType=r.responseType),h&&([a,u]=kc(h,!0),c.addEventListener("progress",a)),b&&c.upload&&([s,l]=kc(b),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(f=x=>{c&&(t(!x||x.type?new Sa(null,n,c):x),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const w=gT(r.url);if(w&&Fr.protocols.indexOf(w)===-1){t(new Tt("Unsupported protocol "+w+":",Tt.ERR_BAD_REQUEST,n));return}c.send(d||null)})},ST=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,d;const p=function(f){if(!d){d=!0,b();const s=f instanceof Error?f:this.reason;r.abort(s instanceof Tt?s:new Sa(s instanceof Error?s.message:s))}};let g=e&&setTimeout(()=>{g=null,p(new Tt(`timeout ${e} of ms exceeded`,Tt.ETIMEDOUT))},e);const b=()=>{n&&(g&&clearTimeout(g),g=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(p):f.removeEventListener("abort",p)}),n=null)};n.forEach(f=>f.addEventListener("abort",p));const{signal:h}=r;return h.unsubscribe=()=>_e.asap(b),h}},_T=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,d;for(;r<t;)d=r+e,yield n.slice(r,d),r=d},AT=async function*(n,e){for await(const t of $T(n))yield*_T(t,e)},$T=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Ny=(n,e,t,r)=>{const d=AT(n,e);let p=0,g,b=h=>{g||(g=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:f,value:s}=await d.next();if(f){b(),h.close();return}let a=s.byteLength;if(t){let l=p+=a;t(l)}h.enqueue(new Uint8Array(s))}catch(f){throw b(f),f}},cancel(h){return b(h),d.return()}},{highWaterMark:2})},Dy=64*1024,{isFunction:Sc}=_e,Fy=(({fetch:n,Request:e,Response:t})=>({fetch:n,Request:e,Response:t}))(_e.global),{ReadableStream:Py,TextEncoder:Wy}=_e.global,By=(n,...e)=>{try{return!!n(...e)}catch{return!1}},TT=n=>{const{fetch:e,Request:t,Response:r}=Object.assign({},Fy,n),d=Sc(e),p=Sc(t),g=Sc(r);if(!d)return!1;const b=d&&Sc(Py),h=d&&(typeof Wy=="function"?(i=>c=>i.encode(c))(new Wy):async i=>new Uint8Array(await new t(i).arrayBuffer())),f=p&&b&&By(()=>{let i=!1;const c=new t(Fr.origin,{body:new Py,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!c}),s=g&&b&&By(()=>_e.isReadableStream(new r("").body)),a={stream:s&&(i=>i.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!a[i]&&(a[i]=(c,m)=>{let w=c&&c[i];if(w)return w.call(c);throw new Tt(`Response type '${i}' is not supported`,Tt.ERR_NOT_SUPPORT,m)})});const l=async i=>{if(i==null)return 0;if(_e.isBlob(i))return i.size;if(_e.isSpecCompliantForm(i))return(await new t(Fr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(i)||_e.isArrayBuffer(i))return i.byteLength;if(_e.isURLSearchParams(i)&&(i=i+""),_e.isString(i))return(await h(i)).byteLength},u=async(i,c)=>_e.toFiniteNumber(i.getContentLength())??l(c);return async i=>{let{url:c,method:m,data:w,signal:x,cancelToken:M,timeout:$,onDownloadProgress:k,onUploadProgress:C,responseType:R,headers:N,withCredentials:I="same-origin",fetchOptions:L}=Oy(i);R=R?(R+"").toLowerCase():"text";let B=ST([x,M&&M.toAbortSignal()],$),P=null;const O=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let A;try{if(C&&f&&m!=="get"&&m!=="head"&&(A=await u(N,w))!==0){let X=new t(c,{method:"POST",body:w,duplex:"half"}),ee;if(_e.isFormData(w)&&(ee=X.headers.get("content-type"))&&N.setContentType(ee),X.body){const[de,te]=Ey(A,kc(Ly(C)));w=Ny(X.body,Dy,de,te)}}_e.isString(I)||(I=I?"include":"omit");const S=p&&"credentials"in t.prototype,D={...L,signal:B,method:m.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:S?I:void 0};P=p&&new t(c,D);let z=await(p?e(P,L):e(c,D));const U=s&&(R==="stream"||R==="response");if(s&&(k||U&&O)){const X={};["status","statusText","headers"].forEach(le=>{X[le]=z[le]});const ee=_e.toFiniteNumber(z.headers.get("content-length")),[de,te]=k&&Ey(ee,kc(Ly(k),!0))||[];z=new r(Ny(z.body,Dy,de,()=>{te&&te(),O&&O()}),X)}R=R||"text";let K=await a[_e.findKey(a,R)||"text"](z,i);return!U&&O&&O(),await new Promise((X,ee)=>{My(X,ee,{data:K,headers:ci.from(z.headers),status:z.status,statusText:z.statusText,config:i,request:P})})}catch(S){throw O&&O(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new Tt("Network Error",Tt.ERR_NETWORK,i,P),{cause:S.cause||S}):Tt.from(S,S&&S.code,i,P)}}},MT=new Map,zy=n=>{let e=_e.merge.call({skipUndefined:!0},Fy,n?n.env:null);const{fetch:t,Request:r,Response:d}=e,p=[r,d,t];let g=p.length,b=g,h,f,s=MT;for(;b--;)h=p[b],f=s.get(h),f===void 0&&s.set(h,f=b?new Map:TT(e)),s=f;return f};zy();const yd={http:q$,xhr:kT,fetch:{get:zy}};_e.forEach(yd,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Hy=n=>`- ${n}`,ET=n=>_e.isFunction(n)||n===null||n===!1,jy={getAdapter:(n,e)=>{n=_e.isArray(n)?n:[n];const{length:t}=n;let r,d;const p={};for(let g=0;g<t;g++){r=n[g];let b;if(d=r,!ET(r)&&(d=yd[(b=String(r)).toLowerCase()],d===void 0))throw new Tt(`Unknown adapter '${b}'`);if(d&&(_e.isFunction(d)||(d=d.get(e))))break;p[b||"#"+g]=d}if(!d){const g=Object.entries(p).map(([h,f])=>`adapter ${h} `+(f===!1?"is not supported by the environment":"is not available in the build"));let b=t?g.length>1?`since :
1493
+ `+g.map(Hy).join(`
1494
+ `):" "+Hy(g[0]):"as no adapter specified";throw new Tt("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return d},adapters:yd};function bd(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Sa(null,n)}function Uy(n){return bd(n),n.headers=ci.from(n.headers),n.data=vd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),jy.getAdapter(n.adapter||ll.adapter,n)(n).then(function(e){return bd(n),e.data=vd.call(n,n.transformResponse,e),e.headers=ci.from(e.headers),e},function(e){return Ty(e)||(bd(n),e&&e.response&&(e.response.data=vd.call(n,n.transformResponse,e.response),e.response.headers=ci.from(e.response.headers))),Promise.reject(e)})}const Vy="1.12.0",_c={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{_c[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const Gy={};_c.transitional=function(n,e,t){function r(d,p){return"[Axios v"+Vy+"] Transitional option '"+d+"'"+p+(t?". "+t:"")}return(d,p,g)=>{if(n===!1)throw new Tt(r(p," has been removed"+(e?" in "+e:"")),Tt.ERR_DEPRECATED);return e&&!Gy[p]&&(Gy[p]=!0,console.warn(r(p," has been deprecated since v"+e+" and will be removed in the near future"))),n?n(d,p,g):!0}},_c.spelling=function(n){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${n}`),!0)};function LT(n,e,t){if(typeof n!="object")throw new Tt("options must be an object",Tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const p=r[d],g=e[p];if(g){const b=n[p],h=b===void 0||g(b,p,n);if(h!==!0)throw new Tt("option "+p+" must be "+h,Tt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Tt("Unknown option "+p,Tt.ERR_BAD_OPTION)}}const Ac={assertOptions:LT,validators:_c},yo=Ac.validators;let Bs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Sy,response:new Sy}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const p=d.stack?d.stack.replace(/^.+\n/,""):"";try{r.stack?p&&!String(r.stack).endsWith(p.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1495
+ `+p):r.stack=p}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Ws(this.defaults,t);const{transitional:r,paramsSerializer:d,headers:p}=t;r!==void 0&&Ac.assertOptions(r,{silentJSONParsing:yo.transitional(yo.boolean),forcedJSONParsing:yo.transitional(yo.boolean),clarifyTimeoutError:yo.transitional(yo.boolean)},!1),d!=null&&(_e.isFunction(d)?t.paramsSerializer={serialize:d}:Ac.assertOptions(d,{encode:yo.function,serialize:yo.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ac.assertOptions(t,{baseUrl:yo.spelling("baseURL"),withXsrfToken:yo.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=p&&_e.merge(p.common,p[t.method]);p&&_e.forEach(["delete","get","head","post","put","patch","common"],i=>{delete p[i]}),t.headers=ci.concat(g,p);const b=[];let h=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(t)===!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,l;if(!h){const i=[Uy.bind(this),void 0];for(i.unshift(...b),i.push(...f),l=i.length,s=Promise.resolve(t);a<l;)s=s.then(i[a++],i[a++]);return s}l=b.length;let u=t;for(a=0;a<l;){const i=b[a++],c=b[a++];try{u=i(u)}catch(m){c.call(this,m);break}}try{s=Uy.call(this,u)}catch(i){return Promise.reject(i)}for(a=0,l=f.length;a<l;)s=s.then(f[a++],f[a++]);return s}getUri(e){e=Ws(this.defaults,e);const t=Iy(e.baseURL,e.url,e.allowAbsoluteUrls);return ky(t,e.params,e.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(n){Bs.prototype[n]=function(e,t){return this.request(Ws(t||{},{method:n,url:e,data:(t||{}).data}))}}),_e.forEach(["post","put","patch"],function(n){function e(t){return function(r,d,p){return this.request(Ws(p||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}Bs.prototype[n]=e(),Bs.prototype[n+"Form"]=e(!0)});let IT=class ax{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(d){t=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let p=r._listeners.length;for(;p-- >0;)r._listeners[p](d);r._listeners=null}),this.promise.then=d=>{let p;const g=new Promise(b=>{r.subscribe(b),p=b}).then(d);return g.cancel=function(){r.unsubscribe(p)},g},e(function(d,p,g){r.reason||(r.reason=new Sa(d,p,g),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ax(function(t){e=t}),cancel:e}}};function RT(n){return function(e){return n.apply(null,e)}}function OT(n){return _e.isObject(n)&&n.isAxiosError===!0}const wd={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(wd).forEach(([n,e])=>{wd[e]=n});function qy(n){const e=new Bs(n),t=ly(Bs.prototype.request,e);return _e.extend(t,Bs.prototype,e,{allOwnKeys:!0}),_e.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return qy(Ws(n,r))},t}const er=fr("b",qy(ll));er.Axios=Bs,er.CanceledError=Sa,er.CancelToken=IT,er.isCancel=Ty,er.VERSION=Vy,er.toFormData=xc,er.AxiosError=Tt,er.Cancel=er.CanceledError,er.all=function(n){return Promise.all(n)},er.spread=RT,er.isAxiosError=OT,er.mergeConfig=Ws,er.AxiosHeaders=ci,er.formToJSON=n=>Ay(_e.isHTMLForm(n)?new FormData(n):n),er.getAdapter=jy.getAdapter,er.HttpStatusCode=wd,er.default=er;const{Axios:aP,AxiosError:lP,CanceledError:cP,isCancel:uP,CancelToken:hP,VERSION:dP,all:pP,Cancel:fP,isAxiosError:gP,spread:mP,toFormData:vP,AxiosHeaders:yP,HttpStatusCode:bP,formToJSON:wP,getAdapter:xP,mergeConfig:CP}=er;function Ky(){return Object.assign({},oa())}function NT(n,e,t){const r=Ln(n,void 0);return r.setTime(r.getTime()+e*Ol),r}function DT(n,e){const t=()=>sr(void 0,NaN),r=BT(n);let d;if(r.date){const h=zT(r.date,2);d=HT(h.restDateString,h.year)}if(!d||isNaN(+d))return t();const p=+d;let g=0,b;if(r.time&&(g=jT(r.time),isNaN(g)))return t();if(r.timezone){if(b=UT(r.timezone),isNaN(b))return t()}else{const h=new Date(p+g),f=Ln(0,void 0);return f.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),f.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),f}return Ln(p+g+b,void 0)}const $c={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},FT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,PT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,WT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function BT(n){const e={},t=n.split($c.dateTimeDelimiter);let r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],$c.timeZoneDelimiter.test(e.date)&&(e.date=n.split($c.timeZoneDelimiter)[0],r=n.substr(e.date.length,n.length))),r){const d=$c.timezone.exec(r);d?(e.time=r.replace(d[1],""),e.timezone=d[1]):e.time=r}return e}function zT(n,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=n.match(t);if(!r)return{year:NaN,restDateString:""};const d=r[1]?parseInt(r[1]):null,p=r[2]?parseInt(r[2]):null;return{year:p===null?d:p*100,restDateString:n.slice((r[1]||r[2]).length)}}function HT(n,e){if(e===null)return new Date(NaN);const t=n.match(FT);if(!t)return new Date(NaN);const r=!!t[4],d=ul(t[1]),p=ul(t[2])-1,g=ul(t[3]),b=ul(t[4]),h=ul(t[5])-1;if(r)return YT(e,b,h)?VT(e,b,h):new Date(NaN);{const f=new Date(0);return!qT(e,p,g)||!KT(e,d)?new Date(NaN):(f.setUTCFullYear(e,p,Math.max(d,g)),f)}}function ul(n){return n?parseInt(n):1}function jT(n){const e=n.match(PT);if(!e)return NaN;const t=xd(e[1]),r=xd(e[2]),d=xd(e[3]);return XT(t,r,d)?t*Tu+r*Ol+d*1e3:NaN}function xd(n){return n&&parseFloat(n.replace(",","."))||0}function UT(n){if(n==="Z")return 0;const e=n.match(WT);if(!e)return 0;const t=e[1]==="+"?-1:1,r=parseInt(e[2]),d=e[3]&&parseInt(e[3])||0;return ZT(r,d)?t*(r*Tu+d*Ol):NaN}function VT(n,e,t){const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,p=(e-1)*7+t+1-d;return r.setUTCDate(r.getUTCDate()+p),r}const GT=[31,null,31,30,31,30,31,31,30,31,30,31];function Yy(n){return n%400===0||n%4===0&&n%100!==0}function qT(n,e,t){return e>=0&&e<=11&&t>=1&&t<=(GT[e]||(Yy(n)?29:28))}function KT(n,e){return e>=1&&e<=(Yy(n)?366:365)}function YT(n,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function XT(n,e,t){return n===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&n>=0&&n<25}function ZT(n,e){return e>=0&&e<=59}function QT(n,e,t){return NT(n,-e)}function Xy(n,e,t){const r=Ky(),d=tM(n,t.timeZone,t.locale??r.locale);return"formatToParts"in d?JT(d,e):eM(d,e)}function JT(n,e){const t=n.formatToParts(e);for(let r=t.length-1;r>=0;--r)if(t[r].type==="timeZoneName")return t[r].value}function eM(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(t);return r?r[0].substr(1):""}function tM(n,e,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:e,timeZoneName:n})}function nM(n,e){const t=aM(e);return"formatToParts"in t?iM(t,n):oM(t,n)}const rM={year:0,month:1,day:2,hour:3,minute:4,second:5};function iM(n,e){try{const t=n.formatToParts(e),r=[];for(let d=0;d<t.length;d++){const p=rM[t[d].type];p!==void 0&&(r[p]=parseInt(t[d].value,10))}return r}catch(t){if(t instanceof RangeError)return[NaN];throw t}}function oM(n,e){const t=n.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Cd={},Zy=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")),sM=Zy==="06/25/2014, 00:00:00"||Zy==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function aM(n){return Cd[n]||(Cd[n]=sM?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"})),Cd[n]}function Qy(n,e,t,r,d,p,g){const b=new Date(0);return b.setUTCFullYear(n,e,t),b.setUTCHours(r,d,p,g),b}const Jy=36e5,lM=6e4,kd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Sd(n,e,t){if(!n)return 0;let r=kd.timezoneZ.exec(n);if(r)return 0;let d,p;if(r=kd.timezoneHH.exec(n),r)return d=parseInt(r[1],10),eb(d)?-(d*Jy):NaN;if(r=kd.timezoneHHMM.exec(n),r){d=parseInt(r[2],10);const g=parseInt(r[3],10);return eb(d,g)?(p=Math.abs(d)*Jy+g*lM,r[1]==="+"?-p:p):NaN}if(hM(n)){e=new Date(e||Date.now());const g=t?e:cM(e),b=_d(g,n);return-(t?b:uM(e,b,n))}return NaN}function cM(n){return Qy(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function _d(n,e){const t=nM(n,e),r=Qy(t[0],t[1]-1,t[2],t[3]%24,t[4],t[5],0).getTime();let d=n.getTime();const p=d%1e3;return d-=p>=0?p:1e3+p,r-d}function uM(n,e,t){let r=n.getTime()-e;const d=_d(new Date(r),t);if(e===d)return e;r-=d-e;const p=_d(new Date(r),t);return d===p?d:Math.max(d,p)}function eb(n,e){return-23<=n&&n<=23&&(e==null||0<=e&&e<=59)}const tb={};function hM(n){if(tb[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),tb[n]=!0,!0}catch{return!1}}const dM=60*1e3,pM={X:function(n,e,t){const r=Ad(t.timeZone,n);if(r===0)return"Z";switch(e){case"X":return nb(r);case"XXXX":case"XX":return _a(r);case"XXXXX":case"XXX":default:return _a(r,":")}},x:function(n,e,t){const r=Ad(t.timeZone,n);switch(e){case"x":return nb(r);case"xxxx":case"xx":return _a(r);case"xxxxx":case"xxx":default:return _a(r,":")}},O:function(n,e,t){const r=Ad(t.timeZone,n);switch(e){case"O":case"OO":case"OOO":return"GMT"+fM(r,":");case"OOOO":default:return"GMT"+_a(r,":")}},z:function(n,e,t){switch(e){case"z":case"zz":case"zzz":return Xy("short",n,t);case"zzzz":default:return Xy("long",n,t)}}};function Ad(n,e){const t=n?Sd(n,e,!0)/dM:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+n);return t}function Tc(n,e){const t=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<e;)r="0"+r;return t+r}function _a(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),d=Tc(Math.floor(r/60),2),p=Tc(Math.floor(r%60),2);return t+d+e+p}function nb(n,e){return n%60===0?(n>0?"-":"+")+Tc(Math.abs(n)/60,2):_a(n,e)}function fM(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),d=Math.floor(r/60),p=r%60;return p===0?t+String(d):t+String(d)+e+Tc(p,2)}function rb(n){const e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+n-+e}const gM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,$d=36e5,ib=6e4,mM=2,Vr={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:gM};function ob(n,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const t=e.additionalDigits==null?mM:Number(e.additionalDigits);if(t!==2&&t!==1&&t!==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=vM(n),{year:d,restDateString:p}=yM(r.date,t),g=bM(p,d);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const b=g.getTime();let h=0,f;if(r.time&&(h=wM(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||e.timeZone){if(f=Sd(r.timeZone||e.timeZone,new Date(b+h)),isNaN(f))return new Date(NaN)}else f=rb(new Date(b+h)),f=rb(new Date(b+h+f));return new Date(b+h+f)}else return new Date(NaN)}function vM(n){const e={};let t=Vr.dateTimePattern.exec(n),r;if(t?(e.date=t[1],r=t[3]):(t=Vr.datePattern.exec(n),t?(e.date=t[1],r=t[2]):(e.date=null,r=n)),r){const d=Vr.timeZone.exec(r);d?(e.time=r.replace(d[1],""),e.timeZone=d[1].trim()):e.time=r}return e}function yM(n,e){if(n){const t=Vr.YYY[e],r=Vr.YYYYY[e];let d=Vr.YYYY.exec(n)||r.exec(n);if(d){const p=d[1];return{year:parseInt(p,10),restDateString:n.slice(p.length)}}if(d=Vr.YY.exec(n)||t.exec(n),d){const p=d[1];return{year:parseInt(p,10)*100,restDateString:n.slice(p.length)}}}return{year:null}}function bM(n,e){if(e===null)return null;let t,r,d;if(!n||!n.length)return t=new Date(0),t.setUTCFullYear(e),t;let p=Vr.MM.exec(n);if(p)return t=new Date(0),r=parseInt(p[1],10)-1,lb(e,r)?(t.setUTCFullYear(e,r),t):new Date(NaN);if(p=Vr.DDD.exec(n),p){t=new Date(0);const g=parseInt(p[1],10);return kM(e,g)?(t.setUTCFullYear(e,0,g),t):new Date(NaN)}if(p=Vr.MMDD.exec(n),p){t=new Date(0),r=parseInt(p[1],10)-1;const g=parseInt(p[2],10);return lb(e,r,g)?(t.setUTCFullYear(e,r,g),t):new Date(NaN)}if(p=Vr.Www.exec(n),p)return d=parseInt(p[1],10)-1,cb(d)?sb(e,d):new Date(NaN);if(p=Vr.WwwD.exec(n),p){d=parseInt(p[1],10)-1;const g=parseInt(p[2],10)-1;return cb(d,g)?sb(e,d,g):new Date(NaN)}return null}function wM(n){let e,t,r=Vr.HH.exec(n);if(r)return e=parseFloat(r[1].replace(",",".")),Td(e)?e%24*$d:NaN;if(r=Vr.HHMM.exec(n),r)return e=parseInt(r[1],10),t=parseFloat(r[2].replace(",",".")),Td(e,t)?e%24*$d+t*ib:NaN;if(r=Vr.HHMMSS.exec(n),r){e=parseInt(r[1],10),t=parseInt(r[2],10);const d=parseFloat(r[3].replace(",","."));return Td(e,t,d)?e%24*$d+t*ib+d*1e3:NaN}return null}function sb(n,e,t){e=e||0,t=t||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,p=e*7+t+1-d;return r.setUTCDate(r.getUTCDate()+p),r}const xM=[31,28,31,30,31,30,31,31,30,31,30,31],CM=[31,29,31,30,31,30,31,31,30,31,30,31];function ab(n){return n%400===0||n%4===0&&n%100!==0}function lb(n,e,t){if(e<0||e>11)return!1;if(t!=null){if(t<1)return!1;const r=ab(n);if(r&&t>CM[e]||!r&&t>xM[e])return!1}return!0}function kM(n,e){if(e<1)return!1;const t=ab(n);return!(t&&e>366||!t&&e>365)}function cb(n,e){return!(n<0||n>52||e!=null&&(e<0||e>6))}function Td(n,e,t){return!(n<0||n>=25||e!=null&&(e<0||e>=60)||t!=null&&(t<0||t>=60))}const SM=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function _M(n,e,t={}){e=String(e);const r=e.match(SM);if(r){const d=ob(t.originalDate||n,t);e=r.reduce(function(p,g){if(g[0]==="'")return p;const b=p.indexOf(g),h=p[b-1]==="'",f=p.replace(g,"'"+pM[g[0]](d,g,t)+"'");return h?f.substring(0,b-1)+f.substring(b+1):f},e)}return ts(n,e,t)}function AM(n,e,t){n=ob(n,t);const r=Sd(e,n,!0),d=new Date(n.getTime()-r),p=new Date(0);return p.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),p.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),p}function Mc(n,e,t,r){return r={...r,timeZone:e,originalDate:n},_M(AM(n,e,{timeZone:r.timeZone}),t,r)}const Ec="yyyy-MM-dd",ub="HH:mm:ss.SSS",hb="HH:mm:ss",Lc=`${Ec} ${ub}`,db=`${Ec} ${hb}`,kP=fr("R",{methods:{parseDateTime(n,e){return n.includes(" ")&&(n=n.replace(" ","T")),e&&e==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,e){return ts(!e||e==="local"?QT(n,n.getTimezoneOffset()):n,Lc)},formatDateTime(n,e){return!e||e==="local"?ts(n,Lc):Mc(n,e,Lc)},formatDateTimeHMS(n,e){return!e||e==="local"?ts(n,db):Mc(n,e,db)},formatDate:function(n,e){return!e||e==="local"?ts(n,Ec):Mc(n,this.timeZone,Ec)},formatTime:function(n,e,t=ub){return!e||e==="local"?ts(n,t):Mc(n,this.timeZone,t)},formatTimeHMS:function(n,e){return this.formatTime(n,e,hb)},formatTimestamp(n,e){return this.formatDateTime(DT(n),e)},formatSeconds(n,e){return this.formatDateTime(new Date(n*1e3),e)},formatNanoseconds(n,e){return this.formatDateTime(new Date(parseInt(n)/1e6),e)}}});var $M=Object.defineProperty,TM=(n,e,t)=>e in n?$M(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,it=(n,e,t)=>TM(n,typeof e!="symbol"?e+"":e,t);function Md(n,e,t){const r=Ln(n,t==null?void 0:t.in);return isNaN(e)?sr((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}function MM(n,e){const t=Ln(n,void 0).getDay();return t===0?7:t}function EM(n,e){const t=LM(e)?new e(0):sr(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function LM(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const IM=10;let pb=class{constructor(){it(this,"subPriority",0)}validate(e,t){return!0}},RM=class extends pb{constructor(e,t,r,d,p){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=d,p&&(this.subPriority=p)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}},OM=class extends pb{constructor(e,t){super(),it(this,"priority",IM),it(this,"subPriority",-1),this.context=e||(r=>sr(t,r))}set(e,t){return t.timestampIsSet?e:sr(e,EM(e,this.context))}};class on{run(e,t,r,d){const p=this.parse(e,t,r,d);return p?{setter:new RM(p.value,this.validate,this.set,this.priority,this.subPriority),rest:p.rest}:null}validate(e,t,r){return!0}}let NM=class extends on{constructor(){super(...arguments),it(this,"priority",140),it(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,r){switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,t,r){return t.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}};const tr={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}/},bo={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 nr(n,e){return n&&{value:e(n.value),rest:n.rest}}function Fn(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function wo(n,e){const t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const r=t[1]==="+"?1:-1,d=t[2]?parseInt(t[2],10):0,p=t[3]?parseInt(t[3],10):0,g=t[5]?parseInt(t[5],10):0;return{value:r*(d*Tu+p*Ol+g*_x),rest:e.slice(t[0].length)}}function fb(n){return Fn(tr.anyDigitsSigned,n)}function Vn(n,e){switch(n){case 1:return Fn(tr.singleDigit,e);case 2:return Fn(tr.twoDigits,e);case 3:return Fn(tr.threeDigits,e);case 4:return Fn(tr.fourDigits,e);default:return Fn(new RegExp("^\\d{1,"+n+"}"),e)}}function gb(n,e){switch(n){case 1:return Fn(tr.singleDigitSigned,e);case 2:return Fn(tr.twoDigitsSigned,e);case 3:return Fn(tr.threeDigitsSigned,e);case 4:return Fn(tr.fourDigitsSigned,e);default:return Fn(new RegExp("^-?\\d{1,"+n+"}"),e)}}function Ed(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 mb(n,e){const t=e>0,r=t?e:1-e;let d;if(r<=50)d=n||100;else{const p=r+50,g=Math.trunc(p/100)*100,b=n>=p%100;d=n+g-(b?100:0)}return t?d:1-d}function vb(n){return n%400===0||n%4===0&&n%100!==0}let DM=class extends on{constructor(){super(...arguments),it(this,"priority",130),it(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,r){const d=p=>({year:p,isTwoDigitYear:t==="yy"});switch(t){case"y":return nr(Vn(4,e),d);case"yo":return nr(r.ordinalNumber(e,{unit:"year"}),d);default:return nr(Vn(t.length,e),d)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){const d=e.getFullYear();if(r.isTwoDigitYear){const g=mb(r.year,d);return e.setFullYear(g,0,1),e.setHours(0,0,0,0),e}const p=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(p,0,1),e.setHours(0,0,0,0),e}},FM=class extends on{constructor(){super(...arguments),it(this,"priority",130),it(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,r){const d=p=>({year:p,isTwoDigitYear:t==="YY"});switch(t){case"Y":return nr(Vn(4,e),d);case"Yo":return nr(r.ordinalNumber(e,{unit:"year"}),d);default:return nr(Vn(t.length,e),d)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,d){const p=Eu(e,d);if(r.isTwoDigitYear){const b=mb(r.year,p);return e.setFullYear(b,0,d.firstWeekContainsDate),e.setHours(0,0,0,0),Jo(e,d)}const g=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(g,0,d.firstWeekContainsDate),e.setHours(0,0,0,0),Jo(e,d)}},PM=class extends on{constructor(){super(...arguments),it(this,"priority",130),it(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return gb(t==="R"?4:t.length,e)}set(e,t,r){const d=sr(e,0);return d.setFullYear(r,0,4),d.setHours(0,0,0,0),sa(d)}},WM=class extends on{constructor(){super(...arguments),it(this,"priority",130),it(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return gb(t==="u"?4:t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},BM=class extends on{constructor(){super(...arguments),it(this,"priority",120),it(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"Q":case"QQ":return Vn(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},zM=class extends on{constructor(){super(...arguments),it(this,"priority",120),it(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"q":case"qq":return Vn(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},HM=class extends on{constructor(){super(...arguments),it(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),it(this,"priority",110)}parse(e,t,r){const d=p=>p-1;switch(t){case"M":return nr(Fn(tr.month,e),d);case"MM":return nr(Vn(2,e),d);case"Mo":return nr(r.ordinalNumber(e,{unit:"month"}),d);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},jM=class extends on{constructor(){super(...arguments),it(this,"priority",110),it(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,r){const d=p=>p-1;switch(t){case"L":return nr(Fn(tr.month,e),d);case"LL":return nr(Vn(2,e),d);case"Lo":return nr(r.ordinalNumber(e,{unit:"month"}),d);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}};function UM(n,e,t){const r=Ln(n,t==null?void 0:t.in),d=vf(r,t)-e;return r.setDate(r.getDate()-d*7),Ln(r,t==null?void 0:t.in)}let VM=class extends on{constructor(){super(...arguments),it(this,"priority",100),it(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,r){switch(t){case"w":return Fn(tr.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Vn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,d){return Jo(UM(e,r,d),d)}};function GM(n,e,t){const r=Ln(n,void 0),d=mf(r)-e;return r.setDate(r.getDate()-d*7),r}let qM=class extends on{constructor(){super(...arguments),it(this,"priority",100),it(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,r){switch(t){case"I":return Fn(tr.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Vn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){return sa(GM(e,r))}};const KM=[31,28,31,30,31,30,31,31,30,31,30,31],YM=[31,29,31,30,31,30,31,31,30,31,30,31];class XM extends on{constructor(){super(...arguments),it(this,"priority",90),it(this,"subPriority",1),it(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"d":return Fn(tr.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Vn(t.length,e)}}validate(e,t){const r=e.getFullYear(),d=vb(r),p=e.getMonth();return d?t>=1&&t<=YM[p]:t>=1&&t<=KM[p]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}}let ZM=class extends on{constructor(){super(...arguments),it(this,"priority",90),it(this,"subpriority",1),it(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,r){switch(t){case"D":case"DD":return Fn(tr.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Vn(t.length,e)}}validate(e,t){const r=e.getFullYear();return vb(r)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}};function Ld(n,e,t){var r,d,p,g;const b=oa(),h=(t==null?void 0:t.weekStartsOn)??((d=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:d.weekStartsOn)??b.weekStartsOn??((g=(p=b.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??0,f=Ln(n,t==null?void 0:t.in),s=f.getDay(),a=(e%7+7)%7,l=7-h,u=e<0||e>6?e-(s+l)%7:(a+l)%7-(s+l)%7;return Md(f,u,t)}let QM=class extends on{constructor(){super(...arguments),it(this,"priority",90),it(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,d){return e=Ld(e,r,d),e.setHours(0,0,0,0),e}},JM=class extends on{constructor(){super(...arguments),it(this,"priority",90),it(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,r,d){const p=g=>{const b=Math.floor((g-1)/7)*7;return(g+d.weekStartsOn+6)%7+b};switch(t){case"e":case"ee":return nr(Vn(t.length,e),p);case"eo":return nr(r.ordinalNumber(e,{unit:"day"}),p);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,d){return e=Ld(e,r,d),e.setHours(0,0,0,0),e}},eE=class extends on{constructor(){super(...arguments),it(this,"priority",90),it(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,r,d){const p=g=>{const b=Math.floor((g-1)/7)*7;return(g+d.weekStartsOn+6)%7+b};switch(t){case"c":case"cc":return nr(Vn(t.length,e),p);case"co":return nr(r.ordinalNumber(e,{unit:"day"}),p);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,d){return e=Ld(e,r,d),e.setHours(0,0,0,0),e}};function tE(n,e,t){const r=Ln(n,void 0),d=MM(r),p=e-d;return Md(r,p,t)}let nE=class extends on{constructor(){super(...arguments),it(this,"priority",90),it(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,r){const d=p=>p===0?7:p;switch(t){case"i":case"ii":return Vn(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return nr(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),d);case"iiiii":return nr(r.day(e,{width:"narrow",context:"formatting"}),d);case"iiiiii":return nr(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),d);case"iiii":default:return nr(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),d)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){return e=tE(e,r),e.setHours(0,0,0,0),e}};class rE extends on{constructor(){super(...arguments),it(this,"priority",80),it(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,r){switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Ed(r),0,0,0),e}}let iE=class extends on{constructor(){super(...arguments),it(this,"priority",80),it(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,r){switch(t){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Ed(r),0,0,0),e}},oE=class extends on{constructor(){super(...arguments),it(this,"priority",80),it(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,r){switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Ed(r),0,0,0),e}};class sE extends on{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,r){switch(t){case"h":return Fn(tr.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Vn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){const d=e.getHours()>=12;return d&&r<12?e.setHours(r+12,0,0,0):!d&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class aE extends on{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,r){switch(t){case"H":return Fn(tr.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Vn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}}class lE extends on{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,r){switch(t){case"K":return Fn(tr.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Vn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}}class cE extends on{constructor(){super(...arguments),it(this,"priority",70),it(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,r){switch(t){case"k":return Fn(tr.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Vn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){const d=r<=24?r%24:r;return e.setHours(d,0,0,0),e}}class uE extends on{constructor(){super(...arguments),it(this,"priority",60),it(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"m":return Fn(tr.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Vn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}}let hE=class extends on{constructor(){super(...arguments),it(this,"priority",50),it(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"s":return Fn(tr.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Vn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}};class dE extends on{constructor(){super(...arguments),it(this,"priority",30),it(this,"incompatibleTokens",["t","T"])}parse(e,t){const r=d=>Math.trunc(d*Math.pow(10,-t.length+3));return nr(Vn(t.length,e),r)}set(e,t,r){return e.setMilliseconds(r),e}}class pE extends on{constructor(){super(...arguments),it(this,"priority",10),it(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return wo(bo.basicOptionalMinutes,e);case"XX":return wo(bo.basic,e);case"XXXX":return wo(bo.basicOptionalSeconds,e);case"XXXXX":return wo(bo.extendedOptionalSeconds,e);case"XXX":default:return wo(bo.extended,e)}}set(e,t,r){return t.timestampIsSet?e:sr(e,e.getTime()-Nl(e)-r)}}let fE=class extends on{constructor(){super(...arguments),it(this,"priority",10),it(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return wo(bo.basicOptionalMinutes,e);case"xx":return wo(bo.basic,e);case"xxxx":return wo(bo.basicOptionalSeconds,e);case"xxxxx":return wo(bo.extendedOptionalSeconds,e);case"xxx":default:return wo(bo.extended,e)}}set(e,t,r){return t.timestampIsSet?e:sr(e,e.getTime()-Nl(e)-r)}},gE=class extends on{constructor(){super(...arguments),it(this,"priority",40),it(this,"incompatibleTokens","*")}parse(e){return fb(e)}set(e,t,r){return[sr(e,r*1e3),{timestampIsSet:!0}]}},mE=class extends on{constructor(){super(...arguments),it(this,"priority",20),it(this,"incompatibleTokens","*")}parse(e){return fb(e)}set(e,t,r){return[sr(e,r),{timestampIsSet:!0}]}};const vE={G:new NM,y:new DM,Y:new FM,R:new PM,u:new WM,Q:new BM,q:new zM,M:new HM,L:new jM,w:new VM,I:new qM,d:new XM,D:new ZM,E:new QM,e:new JM,c:new eE,i:new nE,a:new rE,b:new iE,B:new oE,h:new sE,H:new aE,K:new lE,k:new cE,m:new uE,s:new hE,S:new dE,X:new pE,x:new fE,t:new gE,T:new mE},yE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wE=/^'([^]*?)'?$/,xE=/''/g,CE=/\S/,kE=/[a-zA-Z]/;function SE(n,e,t,r){var d,p,g,b;const h=()=>sr(t,NaN),f=Ky(),s=f.locale??gf,a=f.firstWeekContainsDate??((p=(d=f.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,l=f.weekStartsOn??((b=(g=f.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0;if(!e)return n?h():Ln(t,void 0);const u={firstWeekContainsDate:a,weekStartsOn:l,locale:s},i=[new OM(void 0,t)],c=e.match(bE).map($=>{const k=$[0];if(k in Lu){const C=Lu[k];return C($,s.formatLong)}return $}).join("").match(yE),m=[];for(let $ of c){Sf($)&&Iu($,e,n),kf($)&&Iu($,e,n);const k=$[0],C=vE[k];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const I=m.find(L=>R.includes(L.token)||L.token===k);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${$}\` at the same time`)}else if(C.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${$}\` and any other token at the same time`);m.push({token:k,fullToken:$});const N=C.run(n,$,s.match,u);if(!N)return h();i.push(N.setter),n=N.rest}else{if(k.match(kE))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if($==="''"?$="'":k==="'"&&($=_E($)),n.indexOf($)===0)n=n.slice($.length);else return h()}}if(n.length>0&&CE.test(n))return h();const w=i.map($=>$.priority).sort(($,k)=>k-$).filter(($,k,C)=>C.indexOf($)===k).map($=>i.filter(k=>k.priority===$).sort((k,C)=>C.subPriority-k.subPriority)).map($=>$[0]);let x=Ln(t,void 0);if(isNaN(+x))return h();const M={};for(const $ of w){if(!$.validate(x,u))return h();const k=$.set(x,M,u);Array.isArray(k)?(x=k[0],Object.assign(M,k[1])):x=k}return x}function _E(n){return n.match(wE)[1].replace(xE,"'")}const AE="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=",$E={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return AE},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=OE.indexOf(yb[this.status]),e=1-(n-1)*.05,t=224*this.scaleFactor*e,r=32*this.scaleFactor*e,d=32*this.scaleFactor*e;return[`background-image: url(${this.icons});`,`background-position-x: -${n*d}px;`,`background-size: ${t}px ${r}px;`,`height: ${d}px;`,`width: ${d}px;`,`padding-top: ${n-1}px;`].join("")}}};function TE(n,e,t,r,d,p){return st(),nn("div",{style:Cs(p.iconStyle)},null,4)}const ME=eo($E,[["render",TE]]),EE={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function LE(n,e,t,r,d,p){const g=Ve("rux-icon");return st(),qt(g,{size:t.size,icon:t.icon,style:Cs(p.colorStyle)},null,8,["size","icon","style"])}const IE=eo(EE,[["render",LE],["__scopeId","data-v-9af48e85"]]),yb={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"},Id={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},RE=function(n){const e="#000000",t="#ffffff",r=Id[yb[n]];if(r){const d=+`0x${r.slice(1,3)}`,p=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((d*299+p*587+g*114)/1e3>128)return e}return t},OE=Object.keys(Id),NE={astro:{component:n=>ia(IE,{...n})},"astro-status":{component:n=>ia(ME,{...n,status:n.icon})}},DE={extras:{component:n=>ia(Sx,{...n})}},FE=50,PE=2e3,bb="single-spa:app-change",WE={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(bb,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},PE)},unmounted(){window.removeEventListener(bb,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=Au().length>0,Au().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},FE)}}},BE={class:"mx-1"},zE={key:1,class:"d-flex justify-center align-center"};function HE(n,e,t,r,d,p){const g=Ve("v-card-title"),b=Ve("v-card-text"),h=Ve("v-card"),f=Ve("v-progress-circular");return st(),nn(oi,null,[d.show?(st(),qt(h,{key:0},{default:Pe(()=>[He(g,null,{default:Pe(()=>[...e[0]||(e[0]=[It(" 404 Not Found ",-1)])]),_:1}),He(b,{class:"d-flex align-center mt-3"},{default:Pe(()=>[e[1]||(e[1]=It(" The requested URL ",-1)),Un("code",BE,Cn(n.$route.fullPath),1),e[2]||(e[2]=It(" was not routable. ",-1)),e[3]||(e[3]=Un("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):jr("",!0),p.showSpinner?(st(),nn("div",zE,[He(f,{indeterminate:""})])):jr("",!0)],64)}const jE=eo(WE,[["render",HE]]),UE={props:{modelValue:Boolean},data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const n=/\w+.gem/;return this.response.tree.filter(e=>n.exec(e.path)).map(e=>({name:e.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${e.path}`}))},getResponse:function(){this.disableSearch=!0,er.get(this.url).then(n=>{this.response=n.data}),setTimeout(()=>{this.disableSearch=!1},1e4)},searchGithub:function(){this.type="github",this.url="https://api.github.com/repos/OpenC3/openc3-tools/git/trees/main?recursive=1",this.getResponse()},downloadGem:function(n){const e=document.createElement("a");e.href=n.url,e.setAttribute("download",n.name),e.click(),e.remove()}}},VE={class:"pa-3"},GE={class:"px-2"},qE={key:0,class:"mt-4"},KE={key:1,class:"mt-4"};function YE(n,e,t,r,d,p){const g=Ve("v-spacer"),b=Ve("v-toolbar"),h=Ve("v-row"),f=Ve("v-icon"),s=Ve("v-btn"),a=Ve("v-col"),l=Ve("v-list-item-title"),u=Ve("v-progress-circular"),i=Ve("v-list-item"),c=Ve("v-divider"),m=Ve("v-card-text"),w=Ve("v-card"),x=Ve("v-dialog");return st(),qt(x,{modelValue:p.show,"onUpdate:modelValue":e[0]||(e[0]=M=>p.show=M),width:"600"},{default:Pe(()=>[He(w,null,{default:Pe(()=>[He(b,{height:"24"},{default:Pe(()=>[He(g),e[1]||(e[1]=Un("span",null," Download Gems ",-1)),He(g)]),_:1}),He(m,null,{default:Pe(()=>[Un("div",VE,[He(h,{class:"my-2"},{default:Pe(()=>[...e[2]||(e[2]=[It(" Select a download option ",-1)])]),_:1}),He(h,null,{default:Pe(()=>[He(a,null,{default:Pe(()=>[Un("div",GE,[He(s,{block:"","data-test":"searchGithub",color:"primary",disabled:d.disableSearch,onClick:p.searchGithub},{default:Pe(()=>[e[4]||(e[4]=It(" Github ",-1)),He(f,{end:"",theme:"dark"},{default:Pe(()=>[...e[3]||(e[3]=[It(" mdi-github ",-1)])]),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),He(h,{class:"mt-5"},{default:Pe(()=>[...e[5]||(e[5]=[It(" Community Gems ",-1)])]),_:1}),p.listData.length<1?(st(),nn("div",qE,[He(h,{class:"mx-2"},{default:Pe(()=>[...e[6]||(e[6]=[Un("span",null," I’m sorry, Dave. No gems available.... ",-1)])]),_:1})])):(st(),nn("div",KE,[(st(!0),nn(oi,null,go(p.listData,(M,$)=>(st(),nn("div",{key:$},[He(i,null,{default:Pe(()=>[He(l,null,{default:Pe(()=>[It(Cn(M.name),1)]),_:2},1024),He(i,{icon:""},{default:Pe(()=>[d.activeDownload?(st(),qt(u,{key:0,indeterminate:"",color:"primary"})):(st(),qt(s,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:d.activeDownload,onClick:k=>p.downloadGem(M)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),$<p.listData.length-1?(st(),qt(c,{key:$})):jr("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const SP=fr("K",eo(UE,[["render",YE]])),XE={props:{modelValue:Boolean,plugin:String,targets:Array,pluginDelete:Boolean},data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},created(){for(const n of this.targets)sk.get(`/openc3-api/targets/${n.name}/modified_files`).then(e=>{e.data.length!==0&&this.modifiedTargets.push({name:n.name,files:e.data})})}};function ZE(n,e,t,r,d,p){const g=Ve("v-spacer"),b=Ve("v-toolbar"),h=Ve("v-list-item-title"),f=Ve("v-list-item-subtitle"),s=Ve("v-list-item"),a=Ve("v-checkbox"),l=Ve("v-card-text"),u=Ve("v-btn"),i=Ve("v-card-actions"),c=Ve("v-card"),m=Ve("v-dialog");return st(),qt(m,{modelValue:p.show,"onUpdate:modelValue":e[3]||(e[3]=w=>p.show=w),width:"600"},{default:Pe(()=>[He(c,null,{default:Pe(()=>[He(b,{height:"24"},{default:Pe(()=>[He(g),e[4]||(e[4]=Un("span",null," Modified Plugin ",-1)),He(g)]),_:1}),He(l,{class:"pa-3"},{default:Pe(()=>[Un("div",null," Plugin "+Cn(t.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(st(!0),nn(oi,null,go(d.modifiedTargets,(w,x)=>(st(),qt(s,{key:x,lines:"two"},{default:Pe(()=>[He(h,null,{default:Pe(()=>[It(Cn(w.name),1)]),_:2},1024),(st(!0),nn(oi,null,go(w.files,(M,$)=>(st(),qt(f,{key:$},{default:Pe(()=>[It(Cn(M),1)]),_:2},1024))),128))]),_:2},1024))),128)),He(a,{modelValue:d.deleteModified,"onUpdate:modelValue":e[0]||(e[0]=w=>d.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),He(i,{class:"px-2"},{default:Pe(()=>[He(g),He(u,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:e[1]||(e[1]=()=>{p.show=!1,n.$emit("cancel")})},{default:Pe(()=>[...e[5]||(e[5]=[It(" Cancel ",-1)])]),_:1}),He(u,{variant:"flat","data-test":"modified-plugin-submit",onClick:e[2]||(e[2]=()=>{p.show=!1,n.$emit("submit",d.deleteModified)})},{default:Pe(()=>[...e[6]||(e[6]=[It(" Confirm ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const _P=fr("J",eo(XE,[["render",ZE]])),Rd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>rt(()=>nt.import("./PluginsTab-C7PH2Wym-860a289fc08b19a3a34a.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>rt(()=>nt.import("./TargetsTab-CM4ABe5y-afd5cde7a2299325b130.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>rt(()=>nt.import("./InterfacesTab-Dq3oAKqz-f2fd85c98880ee9ace58.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>rt(()=>nt.import("./RoutersTab-BAfpG8k3-9e3ada931881ddb91d96.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>rt(()=>nt.import("./MicroservicesTab-DzEvbxlM-d1318f6aefa06ed61d37.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>rt(()=>nt.import("./PackagesTab-N4SD1Pxj-58779e5bc07cf0321e09.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>rt(()=>nt.import("./ToolsTab-DGjyBWkp-78afb2c1f2a66aacb366.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>rt(()=>nt.import("./RedisTab-Cyrr_g9k-71dde9352231b057d343.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>rt(()=>nt.import("./SecretsTab-D5RxHYVp-85d671ddd7e3c3854aff.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>rt(()=>nt.import("./SettingsTab-CKGQEwd_-4bb1f250c177aef622b1.js"),void 0)}],QE={components:{TopBar:a$},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return Rd.map(n=>({displayName:n.displayName,path:{name:n.name}}))}}};function JE(n,e,t,r,d,p){const g=Ve("top-bar"),b=Ve("v-tab"),h=Ve("v-tabs"),f=Ve("router-view"),s=Ve("v-card");return st(),nn("div",null,[He(g,{title:d.title},null,8,["title"]),He(s,null,{default:Pe(()=>[He(h,{modelValue:d.curTab,"onUpdate:modelValue":e[0]||(e[0]=a=>d.curTab=a),"fixed-tabs":""},{default:Pe(()=>[(st(!0),nn(oi,null,go(p.tabs,(a,l)=>(st(),qt(b,{key:l,to:a.path},{default:Pe(()=>[It(Cn(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),He(f)]),_:1})])}const eL=eo(QE,[["render",JE]]);function Od(n){const[e,t]=n;return[e,t]}function wb(n,e){let t=n,r=e;const d=t.length,p=r.length;if(d===0||p===0)return 0;d>p?t=t.substring(d-p):d<p&&(r=r.substring(0,d));const g=Math.min(d,p);if(t===r)return g;let b=0,h=1;for(let f=0;f!==-1;){const s=t.substring(g-h);if(f=r.indexOf(s),f===-1)return b;h+=f,(f===0||t.substring(g-h)===r.substring(0,h))&&(b=h,h++)}return b}function Nd(n,e){if(!n||!e||n[0]!==e[0])return 0;let t=0,r=Math.min(n.length,e.length),d=r,p=0;for(;t<d;)n.substring(p,d)===e.substring(p,d)?(t=d,p=t):r=d,d=Math.floor((r-t)/2+t);return d}function Ic(n,e){if(!n||!e||n[n.length-1]!==e[e.length-1])return 0;let t=0,r=Math.min(n.length,e.length),d=r,p=0;for(;t<d;)n.substring(n.length-d,n.length-p)===e.substring(e.length-d,e.length-p)?(t=d,p=t):r=d,d=Math.floor((r-t)/2+t);return d}function tL(n){const e=n.charCodeAt(0);return e>=55296&&e<=56319}function nL(n){const e=n.charCodeAt(0);return e>=56320&&e<=57343}function rL(n,e,t){const r=n.length,d=e.length,p=Math.ceil((r+d)/2),g=p,b=2*p,h=new Array(b),f=new Array(b);for(let m=0;m<b;m++)h[m]=-1,f[m]=-1;h[g+1]=0,f[g+1]=0;const s=r-d,a=s%2!==0;let l=0,u=0,i=0,c=0;for(let m=0;m<p&&!(Date.now()>t);m++){for(let w=-m+l;w<=m-u;w+=2){const x=g+w;let M;w===-m||w!==m&&h[x-1]<h[x+1]?M=h[x+1]:M=h[x-1]+1;let $=M-w;for(;M<r&&$<d&&n.charAt(M)===e.charAt($);)M++,$++;if(h[x]=M,M>r)u+=2;else if($>d)l+=2;else if(a){const k=g+s-w;if(k>=0&&k<b&&f[k]!==-1){const C=r-f[k];if(M>=C)return xb(n,e,M,$,t)}}}for(let w=-m+i;w<=m-c;w+=2){const x=g+w;let M;w===-m||w!==m&&f[x-1]<f[x+1]?M=f[x+1]:M=f[x-1]+1;let $=M-w;for(;M<r&&$<d&&n.charAt(r-M-1)===e.charAt(d-$-1);)M++,$++;if(f[x]=M,M>r)c+=2;else if($>d)i+=2;else if(!a){const k=g+s-w;if(k>=0&&k<b&&h[k]!==-1){const C=h[k],R=g+C-k;if(M=r-M,C>=M)return xb(n,e,C,R,t)}}}}return[[Si,n],[ui,e]]}function xb(n,e,t,r,d){const p=n.substring(0,t),g=e.substring(0,r),b=n.substring(t),h=e.substring(r),f=zs(p,g,{checkLines:!1,deadline:d}),s=zs(b,h,{checkLines:!1,deadline:d});return f.concat(s)}function iL(n,e,t=1){if(t<=0)return null;const r=n.length>e.length?n:e,d=n.length>e.length?e:n;if(r.length<4||d.length*2<r.length)return null;const p=Cb(r,d,Math.ceil(r.length/4)),g=Cb(r,d,Math.ceil(r.length/2));let b;if(p&&g)b=p[4].length>g[4].length?p:g;else{if(!p&&!g)return null;g?p||(b=g):b=p}if(!b)throw new Error("Unable to find a half match.");let h,f,s,a;n.length>e.length?(h=b[0],f=b[1],s=b[2],a=b[3]):(s=b[0],a=b[1],h=b[2],f=b[3]);const l=b[4];return[h,f,s,a,l]}function Cb(n,e,t){const r=n.slice(t,t+Math.floor(n.length/4));let d=-1,p="",g,b,h,f;for(;(d=e.indexOf(r,d+1))!==-1;){const s=Nd(n.slice(t),e.slice(d)),a=Ic(n.slice(0,t),e.slice(0,d));p.length<a+s&&(p=e.slice(d-a,d)+e.slice(d,d+s),g=n.slice(0,t-a),b=n.slice(t+s),h=e.slice(0,d-a),f=e.slice(d+s))}return p.length*2>=n.length?[g||"",b||"",h||"",f||"",p||""]:null}function oL(n,e){for(let t=0;t<n.length;t++){const r=n[t][1],d=[];for(let p=0;p<r.length;p++)d[p]=e[r.charCodeAt(p)];n[t][1]=d.join("")}}function sL(n,e){const t=[],r={};t[0]="";function d(h){let f="",s=0,a=-1,l=t.length;for(;a<h.length-1;){a=h.indexOf(`
1496
+ `,s),a===-1&&(a=h.length-1);let u=h.slice(s,a+1);(r.hasOwnProperty?r.hasOwnProperty(u):r[u]!==void 0)?f+=String.fromCharCode(r[u]):(l===p&&(u=h.slice(s),a=h.length),f+=String.fromCharCode(l),r[u]=l,t[l++]=u),s=a+1}return f}let p=4e4;const g=d(n);p=65535;const b=d(e);return{chars1:g,chars2:b,lineArray:t}}function aL(n,e,t){let r=n,d=e;const p=sL(r,d);r=p.chars1,d=p.chars2;const g=p.lineArray;let b=zs(r,d,{checkLines:!1,deadline:t.deadline});oL(b,g),b=Ab(b),b.push([Gn,""]);let h=0,f=0,s=0,a="",l="";for(;h<b.length;){switch(b[h][0]){case ui:s++,l+=b[h][1];break;case Si:f++,a+=b[h][1];break;case Gn:if(f>=1&&s>=1){b.splice(h-f-s,f+s),h=h-f-s;const u=zs(a,l,{checkLines:!1,deadline:t.deadline});for(let i=u.length-1;i>=0;i--)b.splice(h,0,u[i]);h+=u.length}s=0,f=0,a="",l="";break;default:throw new Error("Unknown diff operation.")}h++}return b.pop(),b}function lL(n,e,t){let r;if(!n)return[[ui,e]];if(!e)return[[Si,n]];const d=n.length>e.length?n:e,p=n.length>e.length?e:n,g=d.indexOf(p);if(g!==-1)return r=[[ui,d.substring(0,g)],[Gn,p],[ui,d.substring(g+p.length)]],n.length>e.length&&(r[0][0]=Si,r[2][0]=Si),r;if(p.length===1)return[[Si,n],[ui,e]];const b=iL(n,e);if(b){const h=b[0],f=b[1],s=b[2],a=b[3],l=b[4],u=zs(h,s,t),i=zs(f,a,t);return u.concat([[Gn,l]],i)}return t.checkLines&&n.length>100&&e.length>100?aL(n,e,t):rL(n,e,t.deadline)}var cL=Object.defineProperty,kb=Object.getOwnPropertySymbols,uL=Object.prototype.hasOwnProperty,hL=Object.prototype.propertyIsEnumerable,Sb=(n,e,t)=>e in n?cL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,dL=(n,e)=>{for(var t in e||(e={}))uL.call(e,t)&&Sb(n,t,e[t]);if(kb)for(var t of kb(e))hL.call(e,t)&&Sb(n,t,e[t]);return n};const Si=-1,ui=1,Gn=0;function pL(n,e,t){if(n===null||e===null)throw new Error("Null input. (diff)");const r=zs(n,e,gL({}));return vL(r),r}function zs(n,e,t){let r=n,d=e;if(r===d)return r?[[Gn,r]]:[];let p=Nd(r,d);const g=r.substring(0,p);r=r.substring(p),d=d.substring(p),p=Ic(r,d);const b=r.substring(r.length-p);r=r.substring(0,r.length-p),d=d.substring(0,d.length-p);let h=lL(r,d,t);return g&&h.unshift([Gn,g]),b&&h.push([Gn,b]),h=Dd(h),h}function fL(n){let e=1;return typeof n<"u"&&(e=n<=0?Number.MAX_VALUE:n),Date.now()+e*1e3}function gL(n){return dL({checkLines:!0,deadline:fL(n.timeout||1)},n)}function Rc(n,e,t){return t===1?n+e:e+n}function Oc(n,e){return e===1?[n.substring(0,n.length-1),n[n.length-1]]:[n.substring(1),n[0]]}function mL(n,e,t,r){return r===1?n[e][1][n[e][1].length-1]===n[t][1][n[t][1].length-1]:n[e][1][0]===n[t][1][0]}function _b(n,e,t){const r=t===1?-1:1;let d=null,p=null,g=e+t;for(;g>=0&&g<n.length&&(d===null||p===null);g+=t){const[f,s]=n[g];if(s.length!==0){if(f===ui){d===null&&(d=g);continue}else if(f===Si){p===null&&(p=g);continue}else if(f===Gn){if(d===null&&p===null){const[a,l]=Oc(n[e][1],t);n[e][1]=a,n[g][1]=Rc(n[g][1],l,r);return}break}}}if(d!==null&&p!==null&&mL(n,d,p,t)){const[f,s]=Oc(n[d][1],r),[a]=Oc(n[p][1],r);n[d][1]=f,n[p][1]=a,n[e][1]=Rc(n[e][1],s,t);return}const[b,h]=Oc(n[e][1],t);n[e][1]=b,d===null?(n.splice(g,0,[ui,h]),p!==null&&p>=g&&p++):n[d][1]=Rc(n[d][1],h,r),p===null?n.splice(g,0,[Si,h]):n[p][1]=Rc(n[p][1],h,r)}function vL(n){for(let e=0;e<n.length;e++){const[t,r]=n[e];if(r.length===0)continue;const d=r[0],p=r[r.length-1];tL(p)&&t===Gn&&_b(n,e,1),nL(d)&&t===Gn&&_b(n,e,-1)}for(let e=0;e<n.length;e++)n[e][1].length===0&&n.splice(e,1)}function Ab(n){let e=n.map(a=>Od(a)),t=!1;const r=[];let d=0,p=null,g=0,b=0,h=0,f=0,s=0;for(;g<e.length;)e[g][0]===Gn?(r[d++]=g,b=f,h=s,f=0,s=0,p=e[g][1]):(e[g][0]===ui?f+=e[g][1].length:s+=e[g][1].length,p&&p.length<=Math.max(b,h)&&p.length<=Math.max(f,s)&&(e.splice(r[d-1],0,[Si,p]),e[r[d-1]+1][0]=ui,d--,d--,g=d>0?r[d-1]:-1,b=0,h=0,f=0,s=0,p=null,t=!0)),g++;for(t&&(e=Dd(e)),e=wL(e),g=1;g<e.length;){if(e[g-1][0]===Si&&e[g][0]===ui){const a=e[g-1][1],l=e[g][1],u=wb(a,l),i=wb(l,a);u>=i?(u>=a.length/2||u>=l.length/2)&&(e.splice(g,0,[Gn,l.substring(0,u)]),e[g-1][1]=a.substring(0,a.length-u),e[g+1][1]=l.substring(u),g++):(i>=a.length/2||i>=l.length/2)&&(e.splice(g,0,[Gn,a.substring(0,i)]),e[g-1][0]=ui,e[g-1][1]=l.substring(0,l.length-i),e[g+1][0]=Si,e[g+1][1]=a.substring(i),g++),g++}g++}return e}const $b=/[^a-zA-Z0-9]/,Tb=/\s/,Mb=/[\r\n]/,yL=/\n\r?\n$/,bL=/^\r?\n\r?\n/;function wL(n){const e=n.map(d=>Od(d));function t(d,p){if(!d||!p)return 6;const g=d.charAt(d.length-1),b=p.charAt(0),h=g.match($b),f=b.match($b),s=h&&g.match(Tb),a=f&&b.match(Tb),l=s&&g.match(Mb),u=a&&b.match(Mb),i=l&&d.match(yL),c=u&&p.match(bL);return i||c?5:l||u?4:h&&!s&&a?3:s||a?2:h||f?1:0}let r=1;for(;r<e.length-1;){if(e[r-1][0]===Gn&&e[r+1][0]===Gn){let d=e[r-1][1],p=e[r][1],g=e[r+1][1];const b=Ic(d,p);if(b){const l=p.substring(p.length-b);d=d.substring(0,d.length-b),p=l+p.substring(0,p.length-b),g=l+g}let h=d,f=p,s=g,a=t(d,p)+t(p,g);for(;p.charAt(0)===g.charAt(0);){d+=p.charAt(0),p=p.substring(1)+g.charAt(0),g=g.substring(1);const l=t(d,p)+t(p,g);l>=a&&(a=l,h=d,f=p,s=g)}e[r-1][1]!==h&&(h?e[r-1][1]=h:(e.splice(r-1,1),r--),e[r][1]=f,s?e[r+1][1]=s:(e.splice(r+1,1),r--))}r++}return e}function Dd(n){let e=n.map(f=>Od(f));e.push([Gn,""]);let t=0,r=0,d=0,p="",g="",b;for(;t<e.length;)switch(e[t][0]){case ui:d++,g+=e[t][1],t++;break;case Si:r++,p+=e[t][1],t++;break;case Gn:r+d>1?(r!==0&&d!==0&&(b=Nd(g,p),b!==0&&(t-r-d>0&&e[t-r-d-1][0]===Gn?e[t-r-d-1][1]+=g.substring(0,b):(e.splice(0,0,[Gn,g.substring(0,b)]),t++),g=g.substring(b),p=p.substring(b)),b=Ic(g,p),b!==0&&(e[t][1]=g.substring(g.length-b)+e[t][1],g=g.substring(0,g.length-b),p=p.substring(0,p.length-b))),t-=r+d,e.splice(t,r+d),p.length&&(e.splice(t,0,[Si,p]),t++),g.length&&(e.splice(t,0,[ui,g]),t++),t++):t!==0&&e[t-1][0]===Gn?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,d=0,r=0,p="",g="";break;default:throw new Error("Unknown diff operation")}e[e.length-1][1]===""&&e.pop();let h=!1;for(t=1;t<e.length-1;)e[t-1][0]===Gn&&e[t+1][0]===Gn&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),h=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),h=!0)),t++;return h&&(e=Dd(e)),e}function Nc(n){return n&&typeof n=="object"&&!Array.isArray(n)&&n!==null}function Fd(n,e){return Nc(n)&&Nc(e)&&Object.keys(e).forEach(t=>{t==="__proto__"||t==="constructor"||(Nc(e[t])?((!n[t]||!Nc(n[t]))&&(n[t]=e[t]),Fd(n[t],e[t])):Object.assign(n,{[t]:e[t]}))}),n}function Eb(n,e,t=!1){let r=null,d=!0;return(...p)=>{const g=t&&d,b=()=>{n.apply(this,p),r=null};g&&(d=!1,b()),r||(r=setTimeout(b,e))}}function xL(n,e){let t;return(...r)=>{const d=this;clearTimeout(t),t=setTimeout(()=>n.apply(d,r),e)}}function Lb(n=""){return n.replace(/\r\n/g,`
1497
+ `)}function Ib(n,e,t,r){const d=t-n,p=n+d/2;return`M ${n} ${e} C ${p},${e} ${p},${r} ${t},${r}`}var kn={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1,EDITOR_RIGHT:"right",EDITOR_LEFT:"left",RTL:"rtl",LTR:"ltr",SVG_NS:"http://www.w3.org/2000/svg",DIFF_GRANULARITY_SPECIFIC:"specific",DIFF_GRANULARITY_BROAD:"broad"};function Rb(n,e){let{mode:t}=n.options;return e===kn.EDITOR_LEFT&&n.options.left.mode!==null&&(t=n.options.left.mode),e===kn.EDITOR_RIGHT&&n.options.right.mode!==null&&(t=n.options.right.mode),t}function Ob(n,e){let{theme:t}=n.options;return e===kn.EDITOR_LEFT&&n.options.left.theme!==null&&(t=n.options.left.theme),e===kn.EDITOR_RIGHT&&n.options.right.theme!==null&&(t=n.options.right.theme),t}function Nb(n,e){return n.ace.getSession().doc.getLine(e)}function CL(n){return document.getElementById(n.options.left.id).offsetHeight}function Db(n){const e=document.createElement("div"),t={class:n.className,style:`top:${n.topOffset}px`,title:n.tooltip,"data-diff-index":n.diffIndex};for(const r in t)e.setAttribute(r,t[r]);return e.innerHTML=n.arrowContent,e}function Pd(n,e){const t=Math.random().toString(36).substr(2,5),r=`js-${e}-${t}`,d=n.querySelector(`.${e}`);if(d)return d.id=d.id||r,d.id;const p=document.createElement("div");return n.appendChild(p),p.className=e,p.id=r,p.id}function Fb(n,e,t,r){const d=n==="document"?document:document.querySelector(n);d.addEventListener(e,p=>{const g=d.querySelectorAll(t),{target:b}=p;for(let h=0,f=g.length;h<f;h+=1){let s=b;const a=g[h];for(;s&&s!==d;)s===a&&r.call(a,p),s=s.parentNode}})}let Dc;function kL(n){if(n.Range)return n.Range;const e=n.acequire||n.require;return e?e("ace/range"):!1}function Fc(n={}){if(!(this instanceof Fc))return new Fc(n);const e=this,t=()=>window?window.ace:void 0;e.options=Fd({ace:t(),mode:null,theme:null,element:null,diffGranularity:kn.DIFF_GRANULARITY_BROAD,lockScrolling:!1,showDiffs:!0,showConnectors:!0,maxDiffs:5e3,left:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},right:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},classes:{gutterID:"acediff__gutter",diff:"acediff__diffLine",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"&#8594;",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"&#8592;",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0},n);const{ace:r}=e.options;if(!r){const d="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";return console.error(d),new Error(d)}if(Dc=kL(r),!Dc){const d="Could not require Range module for Ace. Depends on your bundling strategy, but it usually comes with Ace itself. See https://ace.c9.io/api/range.html, open an issue on GitHub ace-diff/ace-diff";return console.error(d),new Error(d)}if(e.options.element===null){const d="You need to specify an element for Ace-diff - `options.element` is missing";return console.error(d),new Error(d)}if(e.options.element instanceof HTMLElement?e.el=e.options.element:e.el=document.body.querySelector(e.options.element),!e.el){const d=`Can't find the specified element ${e.options.element}`;return console.error(d),new Error(d)}e.options.left.id=Pd(e.el,"acediff__left"),e.options.classes.gutterID=Pd(e.el,"acediff__gutter"),e.options.right.id=Pd(e.el,"acediff__right"),e.el.innerHTML=`<div class="acediff__wrap">${e.el.innerHTML}</div>`,e.editors={left:{ace:r.edit(e.options.left.id),markers:[],lineLengths:[]},right:{ace:r.edit(e.options.right.id),markers:[],lineLengths:[]},editorHeight:null},e.editors.left.ace.getSession().setMode(Rb(e,kn.EDITOR_LEFT)),e.editors.right.ace.getSession().setMode(Rb(e,kn.EDITOR_RIGHT)),e.editors.left.ace.setReadOnly(!e.options.left.editable),e.editors.right.ace.setReadOnly(!e.options.right.editable),e.editors.left.ace.setTheme(Ob(e,kn.EDITOR_LEFT)),e.editors.right.ace.setTheme(Ob(e,kn.EDITOR_RIGHT)),e.editors.left.ace.setValue(Lb(e.options.left.content),-1),e.editors.right.ace.setValue(Lb(e.options.right.content),-1),e.editors.editorHeight=CL(e),setTimeout(()=>{e.lineHeight=e.editors.left.ace.renderer.lineHeight,SL(e),TL(e),Gb(e),e.diff()},1)}Fc.prototype={setOptions(n){Fd(this.options,n),this.diff()},getNumDiffs(){return this.diffs.length},getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff(){const n=this.editors.left.ace.getSession().getValue(),e=this.editors.right.ace.getSession().getValue(),t=Ab(pL(e,n));this.editors.left.lineLengths=Wb(this.editors.left),this.editors.right.lineLengths=Wb(this.editors.right);const r=[],d={left:0,right:0};t.forEach(p=>{const g=p[0];let b=p[1];b.length!==0&&(g===kn.DIFF_EQUAL?(d.left+=b.length,d.right+=b.length):g===kn.DIFF_DELETE?(r.push(jb(this,kn.DIFF_DELETE,d.left,d.right,b)),d.right+=b.length):g===kn.DIFF_INSERT&&(r.push(jb(this,kn.DIFF_INSERT,d.left,d.right,b)),d.left+=b.length))},this),this.diffs=LL(this,r),!(this.diffs.length>this.options.maxDiffs)&&(Hb(this),Kb(this))},destroy(){const n=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let e=this.editors.left.ace.container,t=e.cloneNode(!1);t.textContent=n,e.parentNode.replaceChild(t,e);const r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),e=this.editors.right.ace.container,t=e.cloneNode(!1),t.textContent=r,e.parentNode.replaceChild(t,e);const d=document.getElementById(this.options.classes.gutterID);d&&(d.innerHTML=""),this.removeEventHandlers()}};function SL(n){n.editors.left.ace.getSession().on("changeScrollTop",Eb(()=>{zb(n)},16)),n.editors.right.ace.getSession().on("changeScrollTop",Eb(()=>{zb(n)},16));const e=n.diff.bind(n);n.editors.left.ace.on("change",e),n.editors.right.ace.on("change",e),n.options.left.copyLinkEnabled&&Fb(`#${n.options.classes.gutterID}`,"click",`.${n.options.classes.newCodeConnectorLink}`,r=>{Pb(n,r,kn.LTR)}),n.options.right.copyLinkEnabled&&Fb(`#${n.options.classes.gutterID}`,"click",`.${n.options.classes.deletedCodeConnectorLink}`,r=>{Pb(n,r,kn.RTL)});const t=xL(()=>{n.editors.availableHeight=document.getElementById(n.options.left.id).offsetHeight,n.diff()},250);window.addEventListener("resize",t),n.removeEventHandlers=()=>{window.removeEventListener("resize",t)}}function Pb(n,e,t){const r=parseInt(e.target.getAttribute("data-diff-index"),10),d=n.diffs[r];let p,g,b,h,f,s;t===kn.LTR?(p=n.editors.left,g=n.editors.right,b=d.leftStartLine,h=d.leftEndLine,f=d.rightStartLine,s=d.rightEndLine):(p=n.editors.right,g=n.editors.left,b=d.rightStartLine,h=d.rightEndLine,f=d.leftStartLine,s=d.leftEndLine);let a="";for(let u=b;u<h;u+=1)a+=Nb(p,u),u<p.ace.getSession().getLength()-1&&(a+=`
1498
+ `);const l=g.ace.getSession().getScrollTop();g.ace.getSession().replace(new Dc(f,0,s,0),a),g.ace.getSession().setScrollTop(parseInt(l,10)),n.diff()}function Wb(n){const e=n.ace.getSession().doc.getAllLines(),t=[];return e.forEach(r=>{t.push(r.length+1)}),t}function Bb(n,e,t,r,d){const p=n.editors[e];r<t&&(r=t);const g=`${d} ${r>t?"lines":"targetOnly"}`;r>t&&(r-=1),p.markers.push(p.ace.session.addMarker(new Dc(t,0,r,1),g,"fullLine"))}function zb(n){Hb(n),Kb(n),$L(n)}function Hb(n){n.editors.left.markers.forEach(e=>{n.editors.left.ace.getSession().removeMarker(e)},n),n.editors.right.markers.forEach(e=>{n.editors.right.ace.getSession().removeMarker(e)},n)}function _L(n,e,t,r,d){const p=n.editors.left.ace.getSession().getScrollTop(),g=n.editors.right.ace.getSession().getScrollTop();n.connectorYOffset=1;const b=-1,h=e*n.lineHeight-p+.5,f=n.gutterWidth+1,s=r*n.lineHeight-g+.5,a=-1,l=t*n.lineHeight-p+n.connectorYOffset+.5,u=n.gutterWidth+1,i=d*n.lineHeight-g+n.connectorYOffset+.5,c=Ib(b,h,f,s),m=Ib(u,i,a,l),w=`L${f},${s} ${u},${i}`,x=`L${a},${l} ${b},${h}`,M=`${c} ${w} ${m} ${x}`,$=document.createElementNS(kn.SVG_NS,"path");$.setAttribute("d",M),$.setAttribute("class",n.options.classes.connector),n.gutterSVG.appendChild($)}function AL(n,e,t){if(e.leftEndLine>e.leftStartLine&&n.options.left.copyLinkEnabled){const r=Db({className:n.options.classes.newCodeConnectorLink,topOffset:e.leftStartLine*n.lineHeight,tooltip:"Copy to right",diffIndex:t,arrowContent:n.options.classes.newCodeConnectorLinkContent});n.copyRightContainer.appendChild(r)}if(e.rightEndLine>e.rightStartLine&&n.options.right.copyLinkEnabled){const r=Db({className:n.options.classes.deletedCodeConnectorLink,topOffset:e.rightStartLine*n.lineHeight,tooltip:"Copy to left",diffIndex:t,arrowContent:n.options.classes.deletedCodeConnectorLinkContent});n.copyLeftContainer.appendChild(r)}}function $L(n){const e=n.editors.left.ace.getSession().getScrollTop(),t=n.editors.right.ace.getSession().getScrollTop();n.copyRightContainer.style.cssText=`top: ${-e}px`,n.copyLeftContainer.style.cssText=`top: ${-t}px`}function jb(n,e,t,r,d){let p={};if(e===kn.DIFF_INSERT){let g=Ub(n.editors.left,t,d),b=Vb(n.editors.right,r),h=hl(n.editors.right,b);const f=hl(n.editors.left,g.startLine);let s=b,a=g.startLine===g.endLine,l=0;(g.startChar>0||a&&d.length<f)&&h>0&&g.startChar<f&&l++,p={leftStartLine:g.startLine,leftEndLine:g.endLine+1,rightStartLine:s,rightEndLine:s+l}}else{let g=Ub(n.editors.right,r,d),b=Vb(n.editors.left,t),h=hl(n.editors.left,b);const f=hl(n.editors.right,g.startLine);let s=b,a=g.startLine===g.endLine,l=0;(g.startChar>0||a&&d.length<f)&&h>0&&g.startChar<f&&l++,p={leftStartLine:s,leftEndLine:s+l,rightStartLine:g.startLine,rightEndLine:g.endLine+1}}return p}function Ub(n,e,t){const r={startLine:0,startChar:0,endLine:0,endChar:0},d=e+t.length;let p=0,g=!1,b=!1;n.lineLengths.forEach((f,s)=>{p+=f,!g&&e<p&&(r.startLine=s,r.startChar=e-p+f,g=!0),!b&&d<=p&&(r.endLine=s,r.endChar=d-p+f,b=!0)}),r.startChar>0&&hl(n,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;const h=/\n$/.test(t);return r.startChar>0&&h&&r.endLine++,r}function hl(n,e){return Nb(n,e).length}function Vb(n,e){const t=n.ace.getSession().doc.getAllLines();let r=0,d=0;for(let p=0;p<t.length;p+=1)if(d+=t[p].length+1,e<=d){r=p,e===d&&p<t.length-1&&(r+=1);break}return d>=n.ace.getSession().getValue().length&&(r+=1),r}function Gb(n){n.gutterHeight=document.getElementById(n.options.classes.gutterID).clientHeight,n.gutterWidth=document.getElementById(n.options.classes.gutterID).clientWidth;const e=qb(n,kn.EDITOR_LEFT),t=qb(n,kn.EDITOR_RIGHT),r=Math.max(e,t,n.gutterHeight);n.gutterSVG=document.createElementNS(kn.SVG_NS,"svg"),n.gutterSVG.setAttribute("width",n.gutterWidth),n.gutterSVG.setAttribute("height",r),document.getElementById(n.options.classes.gutterID).appendChild(n.gutterSVG)}function qb(n,e){return(e===kn.EDITOR_LEFT?n.editors.left:n.editors.right).ace.getSession().getLength()*n.lineHeight}function TL(n){n.copyRightContainer=document.createElement("div"),n.copyRightContainer.setAttribute("class",n.options.classes.copyRightContainer),n.copyLeftContainer=document.createElement("div"),n.copyLeftContainer.setAttribute("class",n.options.classes.copyLeftContainer),document.getElementById(n.options.classes.gutterID).appendChild(n.copyRightContainer),document.getElementById(n.options.classes.gutterID).appendChild(n.copyLeftContainer)}function ML(n){document.getElementById(n.options.classes.gutterID).removeChild(n.gutterSVG),Gb(n)}function EL(n){n.copyLeftContainer.innerHTML="",n.copyRightContainer.innerHTML=""}function LL(n,e){const t=[];function r(p){return n.options.diffGranularity===kn.DIFF_GRANULARITY_SPECIFIC?p<1:p<=1}e.forEach((p,g)=>{if(g===0){t.push(p);return}let b=!1;for(let h=0;h<t.length;h+=1)if(r(Math.abs(p.leftStartLine-t[h].leftEndLine))&&r(Math.abs(p.rightStartLine-t[h].rightEndLine))){t[h].leftStartLine=Math.min(p.leftStartLine,t[h].leftStartLine),t[h].rightStartLine=Math.min(p.rightStartLine,t[h].rightStartLine),t[h].leftEndLine=Math.max(p.leftEndLine,t[h].leftEndLine),t[h].rightEndLine=Math.max(p.rightEndLine,t[h].rightEndLine),b=!0;break}b||t.push(p)});const d=[];return t.forEach(p=>{p.leftStartLine===p.leftEndLine&&p.rightStartLine===p.rightEndLine||d.push(p)}),d}function Kb(n){ML(n),EL(n),n.diffs.forEach((e,t)=>{n.options.showDiffs&&(Bb(n,kn.EDITOR_LEFT,e.leftStartLine,e.leftEndLine,n.options.classes.diff),Bb(n,kn.EDITOR_RIGHT,e.rightStartLine,e.rightEndLine,n.options.classes.diff),n.options.showConnectors&&_L(n,e.leftStartLine,e.leftEndLine,e.rightStartLine,e.rightEndLine),AL(n,e,t))},n)}const IL={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1,default:null},storeId:{type:Number,required:!1,default:null},modelValue:Boolean},emits:["callback","update:modelValue"],data(){return{tab:0,localVariables:[],localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{value:{immediate:!0,handler:function(){this.localVariables=JSON.parse(JSON.stringify(this.variables)),this.localPluginTxt=this.pluginTxt.slice(),this.existingPluginTxt!==null&&(this.localExistingPluginTxt=this.existingPluginTxt.slice())}}},mounted(){const n=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=As.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new n),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.localPluginTxt),this.editor.clearSelection(),mc.applyVimModeIfEnabled(this.editor),this.editor.focus()):(this.tab=1,this.differ=new Fc({element:this.$refs.editor,mode:new n,theme:"ace/theme/twilight",left:{content:this.localExistingPluginTxt,copyLinkEnabled:!1},right:{content:this.localPluginTxt,editable:!1}}),this.differ.getEditors().left.setFontSize(16),this.differ.getEditors().right.setFontSize(16),mc.applyVimModeIfEnabled(this.differ.getEditors().left),mc.applyVimModeIfEnabled(this.differ.getEditors().right),this.curDiff=-1)},beforeUnmount(){this.editor&&this.editor.destroy(),this.differ&&this.differ.destroy()},methods:{previousDiff(){this.curDiff--,this.curDiff<0&&(this.curDiff=this.differ.diffs.length-1),this.scrollToCurDiff()},nextDiff(){this.curDiff++,this.curDiff>=this.differ.diffs.length&&(this.curDiff=0),this.scrollToCurDiff()},scrollToCurDiff(){if(this.differ.diffs.length===0)return;let n=this.differ.diffs[this.curDiff].leftStartLine,e=this.differ.diffs[this.curDiff].rightStartLine;n>5&&(n-=5),e>5&&(e-=5),this.differ.getEditors().left.scrollToLine(n),this.differ.getEditors().right.scrollToLine(e)},buildPluginMode(){let n=As.require("ace/lib/oop"),e=As.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,t=["VARIABLE"],r=new RegExp(`(\\b${t.join("\\b|\\b")}\\b)`),d=function(){e.call(this);for(let s in this.$rules)this.$rules[s].unshift({regex:r,token:"support.function"})};n.inherits(d,e);let p=As.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,g=As.require("ace/mode/behaviour/cstyle").CstyleBehaviour,b=As.require("ace/mode/folding/ruby").FoldMode,h=function(){this.HighlightRules=d,this.$outdent=new p,this.$behaviour=new g,this.foldingRules=new b,this.indentKeywords=this.foldingRules.indentKeywords},f=As.require("ace/mode/ruby").Mode;return n.inherits(h,f),(function(){this.$id="ace/mode/openc3"}).call(h.prototype),h},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
1499
+ `)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1500
+ `)):this.$dialog.confirm("Diffs still detected! Install using 'Existing plugin.txt' (left) and ignore additional changes in the new plugin.txt (right)?",{okText:"Install",cancelText:"Cancel"}).then(n=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1501
+ `))}).catch(n=>{})},emitSubmit(n){let e={name:this.pluginName,variables:Vp(this.localVariables),plugin_txt_lines:n,store_id:this.storeId};this.$emit("callback",e)},close:function(){this.show=!this.show},showContextMenu:function(n){this.menuX=n.pageX,this.menuY=n.pageY;let e=this.editor.getCursorPosition(),t=this.editor.session.getTokenAt(e.row,e.column);if(t){let r=t.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&mc.toggleVimMode(this.editor)}}},RL={style:{flex:"1"}},OL={class:"pa-3"},NL={ref:"editor",class:"editor"},DL={key:0};function FL(n,e,t,r,d,p){const g=Ve("v-card-title"),b=Ve("v-icon"),h=Ve("v-row"),f=Ve("v-tab"),s=Ve("v-tabs"),a=Ve("v-text-field"),l=Ve("v-col"),u=Ve("v-window-item"),i=Ve("v-list-item-title"),c=Ve("v-list-item"),m=Ve("v-divider"),w=Ve("v-list"),x=Ve("v-menu"),M=Ve("v-window"),$=Ve("v-btn"),k=Ve("v-spacer"),C=Ve("v-card-actions"),R=Ve("v-card-text"),N=Ve("v-card"),I=Ve("v-dialog");return st(),qt(I,{modelValue:p.show,"onUpdate:modelValue":e[5]||(e[5]=L=>p.show=L),persistent:"",width:"80vw"},{default:Pe(()=>[He(N,null,{default:Pe(()=>[He(R,null,{default:Pe(()=>[He(g,null,{default:Pe(()=>[It(Cn(t.pluginName),1)]),_:1}),t.existingPluginTxt!==null?(st(),qt(h,{key:0,class:"notice d-flex flex-row"},{default:Pe(()=>[He(b,{size:"x-large",start:"",color:"yellow"},{default:Pe(()=>[...e[6]||(e[6]=[It(" mdi-alert-box ",-1)])]),_:1}),Un("div",RL," The existing plugin.txt is different from the "+Cn(t.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+Cn(t.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):jr("",!0),He(h,{class:"pb-3 pr-3"},{default:Pe(()=>[He(s,{modelValue:d.tab,"onUpdate:modelValue":e[0]||(e[0]=L=>d.tab=L),class:"ml-3"},{default:Pe(()=>[(st(),qt(f,{key:0},{default:Pe(()=>[...e[7]||(e[7]=[It(" Variables ",-1)])]),_:1})),(st(),qt(f,{key:1},{default:Pe(()=>[...e[8]||(e[8]=[It(" plugin.txt ",-1)])]),_:1}))]),_:1},8,["modelValue"])]),_:1}),Un("form",{onSubmit:e[4]||(e[4]=Wa((...L)=>n.onSubmit&&n.onSubmit(...L),["prevent"]))},[He(M,{modelValue:d.tab,"onUpdate:modelValue":e[3]||(e[3]=L=>d.tab=L)},{default:Pe(()=>[(st(),qt(u,{key:0,eager:"true",class:"tab"},{default:Pe(()=>[Un("div",OL,[He(h,{class:"mt-3"},{default:Pe(()=>[(st(!0),nn(oi,null,go(d.localVariables,(L,B)=>(st(),nn("div",{key:B},[He(l,{style:{width:"220px"}},{default:Pe(()=>[He(a,{modelValue:d.localVariables[B],"onUpdate:modelValue":P=>d.localVariables[B]=P,clearable:"",type:"text",label:B},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)]))),128))]),_:1})])]),_:1})),t.existingPluginTxt===null?(st(),qt(u,{key:"1-new",eager:"true",class:"tab"},{default:Pe(()=>[He(h,{class:"pa-3"},{default:Pe(()=>[He(l,null,{default:Pe(()=>[...e[9]||(e[9]=[It(" This can be edited before installation. ",-1)])]),_:1})]),_:1}),Un("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=Wa((...L)=>p.showContextMenu&&p.showContextMenu(...L),["prevent"]))},null,544),He(x,{modelValue:d.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=L=>d.contextMenu=L),target:[d.menuX,d.menuY]},{default:Pe(()=>[He(w,null,{default:Pe(()=>[He(c,{link:""},{default:Pe(()=>[He(i,{onClick:n.openDocumentation},{default:Pe(()=>[It(Cn(n.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),He(m),He(c,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:p.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(st(),qt(u,{key:"1-existing",eager:"true",class:"tab"},{default:Pe(()=>[He(h,{class:"pa-3"},{default:Pe(()=>[He(l,null,{default:Pe(()=>[...e[10]||(e[10]=[It(" Existing plugin.txt. This can be edited before installation. ",-1)])]),_:1}),He(l,{class:"ml-6"},{default:Pe(()=>[...e[11]||(e[11]=[It(" Uneditable plugin.txt from the new plugin. ",-1)])]),_:1})]),_:1}),Un("pre",NL,null,512)]),_:1}))]),_:1},8,["modelValue"]),He(C,{class:"px-2 mt-2"},{default:Pe(()=>[t.existingPluginTxt!==null?(st(),nn("div",DL,[He($,{variant:"text",onClick:p.nextDiff},{default:Pe(()=>[...e[12]||(e[12]=[It(" Next Diff ",-1)])]),_:1},8,["onClick"]),He($,{variant:"text",onClick:p.previousDiff},{default:Pe(()=>[...e[13]||(e[13]=[It(" Previous Diff ",-1)])]),_:1},8,["onClick"])])):jr("",!0),He(k),He($,{variant:"outlined","data-test":"edit-cancel",onClick:Wa(p.close,["prevent"])},{default:Pe(()=>[...e[14]||(e[14]=[It(" Cancel ",-1)])]),_:1},8,["onClick"]),He($,{variant:"flat","data-test":"edit-submit",onClick:p.submit},{default:Pe(()=>[...e[15]||(e[15]=[It(" Install ",-1)])]),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const AP=fr("Z",eo(IL,[["render",FL],["__scopeId","data-v-fa08022c"]])),PL=Rd.find(n=>n.name==="PluginsTab"),Yb=[{path:"/",component:eL,children:[{component:PL.component,path:""},...Rd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:jE}];Yb.forEach(lf);const WL=nf({history:rf(),routes:Yb});/*! @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:Xb,setPrototypeOf:Zb,isFrozen:BL,getPrototypeOf:zL,getOwnPropertyDescriptor:HL}=Object;let{freeze:Gr,seal:Bi,create:Qb}=Object,{apply:Wd,construct:Bd}=typeof Reflect<"u"&&Reflect;Gr||(Gr=function(n){return n}),Bi||(Bi=function(n){return n}),Wd||(Wd=function(n,e,t){return n.apply(e,t)}),Bd||(Bd=function(n,e){return new n(...e)});const Pc=Kr(Array.prototype.forEach),jL=Kr(Array.prototype.lastIndexOf),Jb=Kr(Array.prototype.pop),dl=Kr(Array.prototype.push),UL=Kr(Array.prototype.splice),Wc=Kr(String.prototype.toLowerCase),zd=Kr(String.prototype.toString),e0=Kr(String.prototype.match),pl=Kr(String.prototype.replace),VL=Kr(String.prototype.indexOf),GL=Kr(String.prototype.trim),ao=Kr(Object.prototype.hasOwnProperty),qr=Kr(RegExp.prototype.test),fl=qL(TypeError);function Kr(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),d=1;d<t;d++)r[d-1]=arguments[d];return Wd(n,e,r)}}function qL(n){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Bd(n,t)}}function Ht(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wc;Zb&&Zb(n,null);let r=e.length;for(;r--;){let d=e[r];if(typeof d=="string"){const p=t(d);p!==d&&(BL(e)||(e[r]=p),d=p)}n[d]=!0}return n}function KL(n){for(let e=0;e<n.length;e++)ao(n,e)||(n[e]=null);return n}function Io(n){const e=Qb(null);for(const[t,r]of Xb(n))ao(n,t)&&(Array.isArray(r)?e[t]=KL(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=Io(r):e[t]=r);return e}function gl(n,e){for(;n!==null;){const r=HL(n,e);if(r){if(r.get)return Kr(r.get);if(typeof r.value=="function")return Kr(r.value)}n=zL(n)}function t(){return null}return t}const t0=Gr(["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"]),Hd=Gr(["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"]),jd=Gr(["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"]),YL=Gr(["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"]),Ud=Gr(["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"]),XL=Gr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),n0=Gr(["#text"]),r0=Gr(["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"]),Vd=Gr(["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"]),i0=Gr(["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"]),Bc=Gr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ZL=Bi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),QL=Bi(/<%[\w\W]*|[\w\W]*%>/gm),JL=Bi(/\$\{[\w\W]*/gm),eI=Bi(/^data-[\-\w.\u00B7-\uFFFF]+$/),tI=Bi(/^aria-[\-\w]+$/),o0=Bi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nI=Bi(/^(?:\w+script|data):/i),rI=Bi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),s0=Bi(/^html$/i),iI=Bi(/^[a-z][.\w]*(-[.\w]+)+$/i);var a0=Object.freeze({__proto__:null,ARIA_ATTR:tI,ATTR_WHITESPACE:rI,CUSTOM_ELEMENT:iI,DATA_ATTR:eI,DOCTYPE_NAME:s0,ERB_EXPR:QL,IS_ALLOWED_URI:o0,IS_SCRIPT_OR_DATA:nI,MUSTACHE_EXPR:ZL,TMPLIT_EXPR:JL});const ml={element:1,text:3,progressingInstruction:7,comment:8,document:9},oI=function(){return typeof window>"u"?null:window},sI=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let t=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(t=e.getAttribute(r));const d="dompurify"+(t?"#"+t:"");try{return n.createPolicy(d,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},l0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function c0(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oI();const e=he=>c0(he);if(e.version="3.2.6",e.removed=[],!n||!n.document||n.document.nodeType!==ml.document||!n.Element)return e.isSupported=!1,e;let{document:t}=n;const r=t,d=r.currentScript,{DocumentFragment:p,HTMLTemplateElement:g,Node:b,Element:h,NodeFilter:f,NamedNodeMap:s=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:a,DOMParser:l,trustedTypes:u}=n,i=h.prototype,c=gl(i,"cloneNode"),m=gl(i,"remove"),w=gl(i,"nextSibling"),x=gl(i,"childNodes"),M=gl(i,"parentNode");if(typeof g=="function"){const he=t.createElement("template");he.content&&he.content.ownerDocument&&(t=he.content.ownerDocument)}let $,k="";const{implementation:C,createNodeIterator:R,createDocumentFragment:N,getElementsByTagName:I}=t,{importNode:L}=r;let B=l0();e.isSupported=typeof Xb=="function"&&typeof M=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:O,TMPLIT_EXPR:A,DATA_ATTR:S,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:K}=a0;let{IS_ALLOWED_URI:X}=a0,ee=null;const de=Ht({},[...t0,...Hd,...jd,...Ud,...n0]);let te=null;const le=Ht({},[...r0,...Vd,...i0,...Bc]);let se=Object.seal(Qb(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,Ae=!0,Te=!0,Me=!1,Je=!0,qe=!1,pt=!0,ot=!1,ft=!1,Zt=!1,gn=!1,Kt=!1,Sr=!1,Sn=!0,Pn=!1;const lr="user-content-";let yr=!0,mt=!1,Ge={},Nt=null;const mn=Ht({},["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 Wn=null;const _r=Ht({},["audio","video","img","source","image","track"]);let cr=null;const _n=Ht({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),In="http://www.w3.org/1998/Math/MathML",Bn="http://www.w3.org/2000/svg",Dt="http://www.w3.org/1999/xhtml";let An=Dt,_i=!1,Yr=null;const Ai=Ht({},[In,Bn,Dt],zd);let Pr=Ht({},["mi","mo","mn","ms","mtext"]),hi=Ht({},["annotation-xml"]);const br=Ht({},["title","style","font","a","script"]);let Xr=null;const xo=["application/xhtml+xml","text/html"],Hs="text/html";let en=null,zi=null;const Ro=t.createElement("form"),Oo=function(he){return he instanceof RegExp||he instanceof Function},Zr=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(zi&&zi===he)){if((!he||typeof he!="object")&&(he={}),he=Io(he),Xr=xo.indexOf(he.PARSER_MEDIA_TYPE)===-1?Hs:he.PARSER_MEDIA_TYPE,en=Xr==="application/xhtml+xml"?zd:Wc,ee=ao(he,"ALLOWED_TAGS")?Ht({},he.ALLOWED_TAGS,en):de,te=ao(he,"ALLOWED_ATTR")?Ht({},he.ALLOWED_ATTR,en):le,Yr=ao(he,"ALLOWED_NAMESPACES")?Ht({},he.ALLOWED_NAMESPACES,zd):Ai,cr=ao(he,"ADD_URI_SAFE_ATTR")?Ht(Io(_n),he.ADD_URI_SAFE_ATTR,en):_n,Wn=ao(he,"ADD_DATA_URI_TAGS")?Ht(Io(_r),he.ADD_DATA_URI_TAGS,en):_r,Nt=ao(he,"FORBID_CONTENTS")?Ht({},he.FORBID_CONTENTS,en):mn,ue=ao(he,"FORBID_TAGS")?Ht({},he.FORBID_TAGS,en):Io({}),me=ao(he,"FORBID_ATTR")?Ht({},he.FORBID_ATTR,en):Io({}),Ge=ao(he,"USE_PROFILES")?he.USE_PROFILES:!1,Ae=he.ALLOW_ARIA_ATTR!==!1,Te=he.ALLOW_DATA_ATTR!==!1,Me=he.ALLOW_UNKNOWN_PROTOCOLS||!1,Je=he.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qe=he.SAFE_FOR_TEMPLATES||!1,pt=he.SAFE_FOR_XML!==!1,ot=he.WHOLE_DOCUMENT||!1,gn=he.RETURN_DOM||!1,Kt=he.RETURN_DOM_FRAGMENT||!1,Sr=he.RETURN_TRUSTED_TYPE||!1,Zt=he.FORCE_BODY||!1,Sn=he.SANITIZE_DOM!==!1,Pn=he.SANITIZE_NAMED_PROPS||!1,yr=he.KEEP_CONTENT!==!1,mt=he.IN_PLACE||!1,X=he.ALLOWED_URI_REGEXP||o0,An=he.NAMESPACE||Dt,Pr=he.MATHML_TEXT_INTEGRATION_POINTS||Pr,hi=he.HTML_INTEGRATION_POINTS||hi,se=he.CUSTOM_ELEMENT_HANDLING||{},he.CUSTOM_ELEMENT_HANDLING&&Oo(he.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=he.CUSTOM_ELEMENT_HANDLING.tagNameCheck),he.CUSTOM_ELEMENT_HANDLING&&Oo(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),qe&&(Te=!1),Kt&&(gn=!0),Ge&&(ee=Ht({},n0),te=[],Ge.html===!0&&(Ht(ee,t0),Ht(te,r0)),Ge.svg===!0&&(Ht(ee,Hd),Ht(te,Vd),Ht(te,Bc)),Ge.svgFilters===!0&&(Ht(ee,jd),Ht(te,Vd),Ht(te,Bc)),Ge.mathMl===!0&&(Ht(ee,Ud),Ht(te,i0),Ht(te,Bc))),he.ADD_TAGS&&(ee===de&&(ee=Io(ee)),Ht(ee,he.ADD_TAGS,en)),he.ADD_ATTR&&(te===le&&(te=Io(te)),Ht(te,he.ADD_ATTR,en)),he.ADD_URI_SAFE_ATTR&&Ht(cr,he.ADD_URI_SAFE_ATTR,en),he.FORBID_CONTENTS&&(Nt===mn&&(Nt=Io(Nt)),Ht(Nt,he.FORBID_CONTENTS,en)),yr&&(ee["#text"]=!0),ot&&Ht(ee,["html","head","body"]),ee.table&&(Ht(ee,["tbody"]),delete ue.tbody),he.TRUSTED_TYPES_POLICY){if(typeof he.TRUSTED_TYPES_POLICY.createHTML!="function")throw fl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof he.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=he.TRUSTED_TYPES_POLICY,k=$.createHTML("")}else $===void 0&&($=sI(u,d)),$!==null&&typeof k=="string"&&(k=$.createHTML(""));Gr&&Gr(he),zi=he}},Rn=Ht({},[...Hd,...jd,...YL]),wr=Ht({},[...Ud,...XL]),$i=function(he){let je=M(he);(!je||!je.tagName)&&(je={namespaceURI:An,tagName:"template"});const Ne=Wc(he.tagName),gt=Wc(je.tagName);return Yr[he.namespaceURI]?he.namespaceURI===Bn?je.namespaceURI===Dt?Ne==="svg":je.namespaceURI===In?Ne==="svg"&&(gt==="annotation-xml"||Pr[gt]):!!Rn[Ne]:he.namespaceURI===In?je.namespaceURI===Dt?Ne==="math":je.namespaceURI===Bn?Ne==="math"&&hi[gt]:!!wr[Ne]:he.namespaceURI===Dt?je.namespaceURI===Bn&&!hi[gt]||je.namespaceURI===In&&!Pr[gt]?!1:!wr[Ne]&&(br[Ne]||!Rn[Ne]):!!(Xr==="application/xhtml+xml"&&Yr[he.namespaceURI]):!1},sn=function(he){dl(e.removed,{element:he});try{M(he).removeChild(he)}catch{m(he)}},zn=function(he,je){try{dl(e.removed,{attribute:je.getAttributeNode(he),from:je})}catch{dl(e.removed,{attribute:null,from:je})}if(je.removeAttribute(he),he==="is")if(gn||Kt)try{sn(je)}catch{}else try{je.setAttribute(he,"")}catch{}},Ti=function(he){let je=null,Ne=null;if(Zt)he="<remove></remove>"+he;else{const Pt=e0(he,/^[\r\n\t ]+/);Ne=Pt&&Pt[0]}Xr==="application/xhtml+xml"&&An===Dt&&(he='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+he+"</body></html>");const gt=$?$.createHTML(he):he;if(An===Dt)try{je=new l().parseFromString(gt,Xr)}catch{}if(!je||!je.documentElement){je=C.createDocument(An,"template",null);try{je.documentElement.innerHTML=_i?k:gt}catch{}}const hn=je.body||je.documentElement;return he&&Ne&&hn.insertBefore(t.createTextNode(Ne),hn.childNodes[0]||null),An===Dt?I.call(je,ot?"html":"body")[0]:ot?je.documentElement:hn},di=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)},lo=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")},No=function(he){return typeof b=="function"&&he instanceof b};function Qr(he,je,Ne){Pc(he,gt=>{gt.call(e,je,Ne,zi)})}const os=function(he){let je=null;if(Qr(B.beforeSanitizeElements,he,null),lo(he))return sn(he),!0;const Ne=en(he.nodeName);if(Qr(B.uponSanitizeElement,he,{tagName:Ne,allowedTags:ee}),pt&&he.hasChildNodes()&&!No(he.firstElementChild)&&qr(/<[/\w!]/g,he.innerHTML)&&qr(/<[/\w!]/g,he.textContent)||he.nodeType===ml.progressingInstruction||pt&&he.nodeType===ml.comment&&qr(/<[/\w]/g,he.data))return sn(he),!0;if(!ee[Ne]||ue[Ne]){if(!ue[Ne]&&Wr(Ne)&&(se.tagNameCheck instanceof RegExp&&qr(se.tagNameCheck,Ne)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Ne)))return!1;if(yr&&!Nt[Ne]){const gt=M(he)||he.parentNode,hn=x(he)||he.childNodes;if(hn&&gt){const Pt=hn.length;for(let qn=Pt-1;qn>=0;--qn){const ur=c(hn[qn],!0);ur.__removalCount=(he.__removalCount||0)+1,gt.insertBefore(ur,w(he))}}}return sn(he),!0}return he instanceof h&&!$i(he)||(Ne==="noscript"||Ne==="noembed"||Ne==="noframes")&&qr(/<\/no(script|embed|frames)/i,he.innerHTML)?(sn(he),!0):(qe&&he.nodeType===ml.text&&(je=he.textContent,Pc([P,O,A],gt=>{je=pl(je,gt," ")}),he.textContent!==je&&(dl(e.removed,{element:he.cloneNode()}),he.textContent=je)),Qr(B.afterSanitizeElements,he,null),!1)},pi=function(he,je,Ne){if(Sn&&(je==="id"||je==="name")&&(Ne in t||Ne in Ro))return!1;if(!(Te&&!me[je]&&qr(S,je))&&!(Ae&&qr(D,je))){if(!te[je]||me[je]){if(!(Wr(he)&&(se.tagNameCheck instanceof RegExp&&qr(se.tagNameCheck,he)||se.tagNameCheck instanceof Function&&se.tagNameCheck(he))&&(se.attributeNameCheck instanceof RegExp&&qr(se.attributeNameCheck,je)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(je))||je==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&qr(se.tagNameCheck,Ne)||se.tagNameCheck instanceof Function&&se.tagNameCheck(Ne))))return!1}else if(!cr[je]&&!qr(X,pl(Ne,U,""))&&!((je==="src"||je==="xlink:href"||je==="href")&&he!=="script"&&VL(Ne,"data:")===0&&Wn[he])&&!(Me&&!qr(z,pl(Ne,U,"")))&&Ne)return!1}return!0},Wr=function(he){return he!=="annotation-xml"&&e0(he,K)},Ft=function(he){Qr(B.beforeSanitizeAttributes,he,null);const{attributes:je}=he;if(!je||lo(he))return;const Ne={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0};let gt=je.length;for(;gt--;){const hn=je[gt],{name:Pt,namespaceURI:qn,value:ur}=hn,Ar=en(Pt),fi=ur;let an=Pt==="value"?fi:GL(fi);if(Ne.attrName=Ar,Ne.attrValue=an,Ne.keepAttr=!0,Ne.forceKeepAttr=void 0,Qr(B.uponSanitizeAttribute,he,Ne),an=Ne.attrValue,Pn&&(Ar==="id"||Ar==="name")&&(zn(Pt,he),an=lr+an),pt&&qr(/((--!?|])>)|<\/(style|title)/i,an)){zn(Pt,he);continue}if(Ne.forceKeepAttr)continue;if(!Ne.keepAttr){zn(Pt,he);continue}if(!Je&&qr(/\/>/i,an)){zn(Pt,he);continue}qe&&Pc([P,O,A],Co=>{an=pl(an,Co," ")});const Hi=en(he.nodeName);if(!pi(Hi,Ar,an)){zn(Pt,he);continue}if($&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!qn)switch(u.getAttributeType(Hi,Ar)){case"TrustedHTML":{an=$.createHTML(an);break}case"TrustedScriptURL":{an=$.createScriptURL(an);break}}if(an!==fi)try{qn?he.setAttributeNS(qn,Pt,an):he.setAttribute(Pt,an),lo(he)?sn(he):Jb(e.removed)}catch{zn(Pt,he)}}Qr(B.afterSanitizeAttributes,he,null)},ss=function he(je){let Ne=null;const gt=di(je);for(Qr(B.beforeSanitizeShadowDOM,je,null);Ne=gt.nextNode();)Qr(B.uponSanitizeShadowNode,Ne,null),os(Ne),Ft(Ne),Ne.content instanceof p&&he(Ne.content);Qr(B.afterSanitizeShadowDOM,je,null)};return e.sanitize=function(he){let je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ne=null,gt=null,hn=null,Pt=null;if(_i=!he,_i&&(he="<!-->"),typeof he!="string"&&!No(he))if(typeof he.toString=="function"){if(he=he.toString(),typeof he!="string")throw fl("dirty is not a string, aborting")}else throw fl("toString is not a function");if(!e.isSupported)return he;if(ft||Zr(je),e.removed=[],typeof he=="string"&&(mt=!1),mt){if(he.nodeName){const Ar=en(he.nodeName);if(!ee[Ar]||ue[Ar])throw fl("root node is forbidden and cannot be sanitized in-place")}}else if(he instanceof b)Ne=Ti("<!---->"),gt=Ne.ownerDocument.importNode(he,!0),gt.nodeType===ml.element&&gt.nodeName==="BODY"||gt.nodeName==="HTML"?Ne=gt:Ne.appendChild(gt);else{if(!gn&&!qe&&!ot&&he.indexOf("<")===-1)return $&&Sr?$.createHTML(he):he;if(Ne=Ti(he),!Ne)return gn?null:Sr?k:""}Ne&&Zt&&sn(Ne.firstChild);const qn=di(mt?he:Ne);for(;hn=qn.nextNode();)os(hn),Ft(hn),hn.content instanceof p&&ss(hn.content);if(mt)return he;if(gn){if(Kt)for(Pt=N.call(Ne.ownerDocument);Ne.firstChild;)Pt.appendChild(Ne.firstChild);else Pt=Ne;return(te.shadowroot||te.shadowrootmode)&&(Pt=L.call(r,Pt,!0)),Pt}let ur=ot?Ne.outerHTML:Ne.innerHTML;return ot&&ee["!doctype"]&&Ne.ownerDocument&&Ne.ownerDocument.doctype&&Ne.ownerDocument.doctype.name&&qr(s0,Ne.ownerDocument.doctype.name)&&(ur="<!DOCTYPE "+Ne.ownerDocument.doctype.name+`>
1502
+ `+ur),qe&&Pc([P,O,A],Ar=>{ur=pl(ur,Ar," ")}),$&&Sr?$.createHTML(ur):ur},e.setConfig=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zr(he),ft=!0},e.clearConfig=function(){zi=null,ft=!1},e.isValidAttribute=function(he,je,Ne){zi||Zr({});const gt=en(he),hn=en(je);return pi(gt,hn,Ne)},e.addHook=function(he,je){typeof je=="function"&&dl(B[he],je)},e.removeHook=function(he,je){if(je!==void 0){const Ne=jL(B[he],je);return Ne===-1?void 0:UL(B[he],Ne,1)[0]}return Jb(B[he])},e.removeHooks=function(he){B[he]=[]},e.removeAllHooks=function(){B=l0()},e}var aI=c0();const lI={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"}},cI={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 aI.sanitize(this.params.text)}},methods:{dialog:function(n,e,t){this.params=n,this.show=!0,this.resolve=e,this.reject=t},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},uI=["innerHTML"],hI={key:2},dI={key:3,class:"validate mt-4"};function pI(n,e,t,r,d,p){const g=Ve("v-spacer"),b=Ve("v-toolbar"),h=Ve("v-icon"),f=Ve("v-text-field"),s=Ve("v-card-text"),a=Ve("v-btn"),l=Ve("v-card-actions"),u=Ve("v-card"),i=Ve("v-dialog"),c=Ve("v-app");return st(),qt(c,null,{default:Pe(()=>[He(i,{modelValue:n.show,"onUpdate:modelValue":e[1]||(e[1]=m=>n.show=m),width:"600"},{default:Pe(()=>[He(u,null,{default:Pe(()=>[He(b,{height:"24"},{default:Pe(()=>[He(g),Un("span",null,Cn(n.params.title),1),He(g)]),_:1}),He(s,{class:"mt-4 pa-3"},{default:Pe(()=>[n.params.validateText?(st(),qt(h,{key:0,class:"mr-2"},{default:Pe(()=>[...e[2]||(e[2]=[It(" mdi-alert ",-1)])]),_:1})):jr("",!0),n.params.html?(st(),nn("span",{key:1,innerHTML:p.sanitizedText},null,8,uI)):(st(),nn("span",hI,Cn(p.sanitizedText),1)),n.params.validateText?(st(),nn("div",dI,[It(" Enter "+Cn(n.params.validateText)+" to confirm! ",1),He(f,{modelValue:n.validationText,"onUpdate:modelValue":e[0]||(e[0]=m=>n.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):jr("",!0)]),_:1}),He(l,{class:"px-2"},{default:Pe(()=>[He(g),n.params.cancelText?(st(),qt(a,{key:0,variant:"outlined","data-test":p.dataTestCancel,onClick:p.cancel},{default:Pe(()=>[It(Cn(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):jr("",!0),He(a,{variant:"flat",color:n.params.okClass,"data-test":p.dataTestOk,onClick:p.ok},{default:Pe(()=>[It(Cn(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const fI=eo(cI,[["render",pI],["__scopeId","data-v-36e9f721"]]);class gI{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const e=window.Vue.createApp(fI);e.use(qd);const t=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(t),this.$root=e.mount(t),this.mounted=!0}open({title:e,text:t,okText:r,okClass:d,validateText:p,cancelText:g,html:b}){return this.mount(),new Promise((h,f)=>{this.$root.dialog({title:e,text:t,okText:r,okClass:d,validateText:p,cancelText:g,html:b},h,f)})}confirm(e,{okText:t="Ok",cancelText:r="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:e,okText:t,okClass:d,validateText:null,cancelText:r,html:!1})}alert(e,{okText:t="Ok",html:r=!1,okClass:d="primary"}){return this.open({title:"Alert",text:e,okText:t,okClass:d,validateText:null,cancelText:null,html:r})}validate(e,{okText:t="Ok",validateText:r="CONFIRM",cancelText:d="Cancel",okClass:p="primary"}){return this.open({title:"Confirm",text:e,okText:t,okClass:p,validateText:r,cancelText:d,html:!1})}}const mI={install(n,e){const t=new gI;n.provide("dialog",t),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=t)}},vI={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`
1503
+ --toast-bg-color:${Id[this.toastNotification.level]};
1504
+ --toast-fg-color:${RE(this.toastNotification.level)};
1505
+ `},contentStyle:function(){return`
1506
+ white-space: ${this.expanded?"normal":"nowrap"};
1507
+ overflow-x: ${this.expanded?"visible":"hidden"};
1508
+ text-overflow: ${this.expanded?"unset":"ellipsis"};
1509
+ `}},methods:{toast:function(n,e){this.noToastPaths.includes(window.location.pathname)||(e===void 0&&(e=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),e&&(this.timeout=setTimeout(()=>{this.hide()},e)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},yI={key:0,class:"text-subtitle-1 mr-1 notification-text"},bI={key:1,class:"text-body-2 notification-text"},wI={key:2,class:"text-body-2 notification-text"};function xI(n,e,t,r,d,p){const g=Ve("v-icon"),b=Ve("v-spacer"),h=Ve("v-btn"),f=Ve("v-sheet"),s=Ve("v-slide-y-transition");return st(),qt(s,null,{default:Pe(()=>[ef(He(f,{style:Cs(p.toastStyle),class:"toast-notification",onClick:p.expand},{default:Pe(()=>[He(g,{class:"mr-1 notification-text"},{default:Pe(()=>[It(Cn(p.toastNotificationIcon),1)]),_:1}),Un("div",{class:"toast-content",style:Cs(p.contentStyle)},[n.toastNotification.title?(st(),nn("span",yI,[n.toastNotification.body||n.toastNotification.message?(st(),nn(oi,{key:0},[It(Cn(n.toastNotification.title)+": ",1)],64)):(st(),nn(oi,{key:1},[It(Cn(n.toastNotification.title),1)],64))])):jr("",!0),n.toastNotification.body?(st(),nn("span",bI,Cn(n.toastNotification.body),1)):jr("",!0),n.toastNotification.message?(st(),nn("span",wI,Cn(n.toastNotification.message),1)):jr("",!0)],4),He(b),He(h,{variant:"text",class:"notification-text",onClick:Wa(p.hide,["stop"])},{default:Pe(()=>[...e[0]||(e[0]=[It(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[tf,n.showToast]])]),_:1})}const CI=eo(vI,[["render",xI],["__scopeId","data-v-84833581"]]);class kI{constructor(e={}){var t;this.$store=e.store,this.mounted=!1,this.$root=null,(t=window.$cosmosNotify)!=null&&t.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const e=_u(CI);e.use(qd);const t=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(t),this.$root=e.mount(t),this.mounted=!0}open({method:e,title:t,body:r,message:d,level:p,duration:g,type:b="alert",logToConsole:h=!1,saveToHistory:f=!0}){this.mount(),h&&console.log(d?`${p.toUpperCase()} - ${d}`:`${p.toUpperCase()} - ${t}: ${r}`),f&&this.$store.commit("notifyAddHistory",{title:t,body:r,message:d,level:p}),this[e]({title:t,body:r,message:d,level:p,duration:g,type:b})}toast({title:e,body:t,message:r,level:d,duration:p,type:g}){this.$root.toast({title:e,body:t,message:r,level:d,type:g},p)}critical({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"critical",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}FATAL(e){this.critical(e)}ERROR(e){this.critical(e)}serious({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"serious",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}caution({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"caution",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}WARN(e){this.caution(e)}normal({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"normal",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}INFO(e){this.normal(e)}DEBUG(e){this.normal(e)}standby({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"standby",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}off({title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b}){this.open({method:"toast",level:"off",title:e,body:t,message:r,type:d,duration:p,logToConsole:g,saveToHistory:b})}}const SI={install(n,e){const t=new kI(e);n.provide("notify",t),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=t)}},u0=100,h0=of({state(){return{notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1}}},getters:{namedWidget:n=>e=>n.namedWidgets[e]},mutations:{notifyAddHistory(n,e){n.notifyHistory.length>=u0&&(n.notifyHistory.length=u0-1),n.notifyHistory.unshift(e)},notifyClearHistory(n){n.notifyHistory=[]},setNamedWidget(n,e){Object.assign(n.namedWidgets,e)},clearNamedWidget(n,e){delete n.namedWidgets[e]},playback(n,e){Object.assign(n.playback,e)}},modules:{}});function d0(n){let e;return n!==null&&typeof n=="object"&&((e=Object.getPrototypeOf(n))===Object.prototype||e===null)}function _I(n,e){const t={};for(const r of e)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}function p0(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const r={};for(const d in n)r[d]=n[d];for(const d in e){const p=n[d],g=e[d];if(d0(p)&&d0(g)){r[d]=p0(p,g,t);continue}if(t&&Array.isArray(p)&&Array.isArray(g)){r[d]=t(p,g);continue}r[d]=g}return r}function vl(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(vl.cache.has(n))return vl.cache.get(n);const e=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return vl.cache.set(n,e),e}vl.cache=new Map;function AI(n){qp(`Vuetify: ${n}`)}function f0(n,e){return t=>Object.keys(n).reduce((r,d)=>{const p=typeof n[d]=="object"&&n[d]!=null&&!Array.isArray(n[d])?n[d]:{type:n[d]};return t&&d in t?r[d]={...p,default:t[d]}:r[d]=p,e&&!r[d].source&&(r[d].source=e),r},{})}function g0(n,e){const t=Qp();if(!t)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return t}function $I(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:g0("injectSelf");const{provides:t}=e;if(t&&n in t)return t[n]}const Gd=Symbol.for("vuetify:defaults");function m0(){const n=Kp(Gd);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function TI(n,e){return n.props&&(typeof n.props[e]<"u"||typeof n.props[vl(e)]<"u")}function MI(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m0();const r=g0("useDefaults");if(e=e??r.type.name??r.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const d=Su(()=>{var h;return(h=t.value)==null?void 0:h[n._as??e]}),p=new Proxy(n,{get(h,f){var s,a,l,u;const i=Reflect.get(h,f);if(f==="class"||f==="style")return[(s=d.value)==null?void 0:s[f],i].filter(w=>w!=null);if(TI(r.vnode,f))return i;const c=(a=d.value)==null?void 0:a[f];if(c!==void 0)return c;const m=(u=(l=t.value)==null?void 0:l.global)==null?void 0:u[f];return m!==void 0?m:i}}),g=Yp();Xp(()=>{if(d.value){const h=Object.entries(d.value).filter(f=>{let[s]=f;return s.startsWith(s[0].toUpperCase())});g.value=h.length?Object.fromEntries(h):void 0}else g.value=void 0});function b(){const h=$I(Gd,r);Jp(Gd,Su(()=>g.value?p0((h==null?void 0:h.value)??{},g.value):h==null?void 0:h.value))}return{props:p,provideSubDefaults:b}}function zc(n){if(n._setup=n._setup??n.setup,!n.name)return AI("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=f0(n.props??{},n.name)();const e=Object.keys(n.props).filter(t=>t!=="class"&&t!=="style");n.filterProps=function(t){return _I(t,e)},n.props._as=String,n.setup=function(t,r){const d=m0();if(!d.value)return n._setup(t,r);const{props:p,provideSubDefaults:g}=MI(t,t._as??n.name,d),b=n._setup(p,r);return g(),b}}return n}function EI(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(n?zc:Gp)(e)}const LI=[String,Function,Object,Array],Hc=f0({icon:{type:LI},tag:{type:[String,Object,Function],required:!0}},"icon");EI()({name:"VComponentIcon",props:Hc(),setup(n,e){let{slots:t}=e;return()=>{const r=n.icon;return He(n.tag,null,{default:()=>{var d;return[n.icon?He(r,null,null):(d=t.default)==null?void 0:d.call(t)]}})}}}),zc({name:"VSvgIcon",inheritAttrs:!1,props:Hc(),setup(n,e){let{attrs:t}=e;return()=>He(n.tag,Rl(t,{style:null}),{default:()=>[Un("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)?Un("path",{d:r[0],"fill-opacity":r[1]},null):Un("path",{d:r},null)):Un("path",{d:n.icon},null)])]})}}),zc({name:"VLigatureIcon",props:Hc(),setup(n){return()=>He(n.tag,null,{default:()=>[n.icon]})}});const II=zc({name:"VClassIcon",props:Hc(),setup(n){return()=>He(n.tag,{class:Zp(n.icon)},null)}}),RI={component:n=>ia(II,{...n,class:"mdi"})},qd=sf({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:lI}},icons:{defaultSet:"mdi",sets:{mdi:RI,...NE,...DE}}}),Kd=ux({createApp:_u,appOptions:{render(){return ia(yx,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(WL),n.use(h0),n.use(qd),n.use(mI),n.use(SI,{store:h0})}}),$P=fr("g",Kd.bootstrap),TP=fr("m",Kd.mount),MP=fr("u",Kd.unmount)}}});