openc3-cosmos-tool-admin 6.2.1 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/tools/admin/ArrayWidget-DAZApfkV-278468a53d6dcd290939.js +2 -0
  3. data/tools/admin/{ArrayplotWidget-B_VPoV4v-4c480a3fcc426de0cb30.js → ArrayplotWidget-BfsxDplv-e75768e19a78a755021f.js} +1 -1
  4. data/tools/admin/{BarColumn-C9dkpg2O-e489648e1026c2be35d5.js → BarColumn-q0nAsvrd-83b968497a97f5a12a7a.js} +1 -1
  5. data/tools/admin/{BlockWidget-CuefOin6-b962c353c9f0eebc7117.js → BlockWidget-SDCUWcMQ-2bc1ff795dd9b8289734.js} +2 -2
  6. data/tools/admin/{ButtonWidget-B6HM0Doo-668706e3573526170916.js → ButtonWidget-BVMjwC19-21d6311409e6295e5ff1.js} +2 -2
  7. data/tools/admin/CanvasWidget-bVkufjRQ-67d07bc7c7e068b64f55.js +1 -0
  8. data/tools/admin/CanvasdotWidget-DpniFfca-45fb1bde56856286c38d.js +1 -0
  9. data/tools/admin/{CanvasimageWidget-mhcPpAuN-524715bd9e4a9c84bf1a.js → CanvasimageWidget-DHOSz-dJ-de800e86e1bee6f5a0ff.js} +1 -1
  10. data/tools/admin/{CanvasimagevalueWidget-Cx-dH8Gc-127608d7211ba8c85eee.js → CanvasimagevalueWidget-zrURWWUL-17057ebfab0467f8b7f5.js} +1 -1
  11. data/tools/admin/CanvaslabelWidget-D-XAMifp-41af33bdafdfcfaeca35.js +1 -0
  12. data/tools/admin/{CanvaslabelvalueWidget-CwmYDCjr-50109c3b06e5e4acd0e2.js → CanvaslabelvalueWidget-BsIdBtEb-963e3f40288b9cc769c9.js} +1 -1
  13. data/tools/admin/CanvaslineWidget-CA2aPGRg-176c5b3f1d9009c13ce0.js +1 -0
  14. data/tools/admin/{CanvaslinevalueWidget-C3sJnjLQ-ffa8ee418ab1756d7518.js → CanvaslinevalueWidget-J7epKRlo-c968b8847757e14bfb1c.js} +1 -1
  15. data/tools/admin/CheckbuttonWidget-ByH-PDRG-626ee1d1d84173983d50.js +1 -0
  16. data/tools/admin/ComboboxWidget-Bdm_fMzW-cab3c8e434fe2c88bab1.js +1 -0
  17. data/tools/admin/DateWidget-BaQqthC7-3d8a26b6aafc6de1b56a.js +1 -0
  18. data/tools/admin/{DetailsDialog-BvbziA7Y-ee21a12298c291aba619.js → DetailsDialog-C5jf8o0K-618733616700caa427d3.js} +1 -1
  19. data/tools/admin/{DynamicWidget-gFSYxzvT-1236326c70d40ef4d209.js → DynamicWidget-CfMtj7H8-28b5c02a544a8b721b2d.js} +1 -1
  20. data/tools/admin/FormatvalueWidget--H5B9i_Y-cca10587c6e1ab5b71a6.js +1 -0
  21. data/tools/admin/Graph-M382Zo8o-749b759d928f020bf06b.js +1 -0
  22. data/tools/admin/{GraphWidget-Dycey-mj-a42606ece40c58355625.js → GraphWidget-_YOGDD1U-16510f2fb4ff72f50671.js} +1 -1
  23. data/tools/admin/{HorizontalWidget-D31NRWy5-f726d836b7dd777022b8.js → HorizontalWidget-D_gzrOWs-bd70f9d52446f354a3ed.js} +1 -1
  24. data/tools/admin/HorizontalboxWidget-GDcjO-UB-e7a5b1d2df595dfa8528.js +1 -0
  25. data/tools/admin/HorizontallineWidget-DZvOYFxf-5f8d348b3e905046cbc4.js +1 -0
  26. data/tools/admin/{IframeWidget-Ctj8OIcG-cc657bab62ca5f6f87d1.js → IframeWidget-CuUav9b3-4b58f427f7c7c3b092bc.js} +1 -1
  27. data/tools/admin/{ImageLoader-BrNrCBvi-2b1da3a869462ca330c6.js → ImageLoader-3KLKJ5mV-6e47a29f0a6ec0e7517b.js} +1 -1
  28. data/tools/admin/ImageviewerWidget-BMZ6REN4-99508d60b2bf097a6732.js +1 -0
  29. data/tools/admin/InterfacesTab-DTixVrGo-d1c54d784fb72d35a760.js +1 -0
  30. data/tools/admin/{LabelWidget-t7I87dp7-152d5a9b96441cbd8510.js → LabelWidget-oh6FIG6s-d868fb2bd26ce6d2f3d6.js} +1 -1
  31. data/tools/admin/LabelledWidget-Bic36les-b854193849403490d15f.js +1 -0
  32. data/tools/admin/{LabelprogressbarWidget-wwLURt1u-a3f647cb3382587c6885.js → LabelprogressbarWidget-CqIiGoDb-3253bfa6f16674c0a578.js} +1 -1
  33. data/tools/admin/{LabelsparklineWidget-B3awLUyP-ef73c33807cdf20c1632.js → LabelsparklineWidget-DLhmqO02-5615de2dfe11c3bc1e0e.js} +1 -1
  34. data/tools/admin/{LabelvalueWidget-Zx_yHCtl-381f386667d56a433fb9.js → LabelvalueWidget-BefwSSVq-80d87143686ab5e22873.js} +1 -1
  35. data/tools/admin/{LabelvaluedescWidget-BBSBh4vI-f245b73d7fee8fc3c134.js → LabelvaluedescWidget-NxrCzznm-1abe6e80871d0a1d3f62.js} +1 -1
  36. data/tools/admin/LabelvaluelimitsbarWidget-pq7qoolL-799f04ee161ac207990e.js +1 -0
  37. data/tools/admin/LabelvaluelimitscolumnWidget-edkpogsl-cc8cb37331d149620877.js +1 -0
  38. data/tools/admin/{LabelvaluerangebarWidget-BhYTBgDq-7f89e5b9ff7b9b67c0f1.js → LabelvaluerangebarWidget-DpJNv9dh-69d6c63a5b945223a268.js} +1 -1
  39. data/tools/admin/{Layout-Bh7VzCZd-e80015c167b538416f2a.js → Layout-B0hvhBQO-e6d9491c66fb7999ee9f.js} +1 -1
  40. data/tools/admin/LedWidget--4eSxBnn-b23e9dba9fe8083fa005.js +1 -0
  41. data/tools/admin/LimitsbarWidget-BQaumgRt-83eeb25d4b6e4e99b119.js +1 -0
  42. data/tools/admin/{LimitscolorWidget-DdmvKzmx-65f584394050c5139c9d.js → LimitscolorWidget-BBF9sRtF-62a27f46ce7c054d150f.js} +1 -1
  43. data/tools/admin/{LimitscolumnWidget-Cc19IEjq-f2597f39e20f5fa18747.js → LimitscolumnWidget-DZZtSoXw-425281a88105e20ed3ba.js} +1 -1
  44. data/tools/admin/LinegraphWidget-DTLZmyWs-72c6387f595a0a4013be.js +1 -0
  45. data/tools/admin/{MatrixbycolumnsWidget-DnExVRF8-b4be1b437c0b336a1e23.js → MatrixbycolumnsWidget-dpgZz4wR-f0f3fdf10d49af904bf5.js} +1 -1
  46. data/tools/admin/MicroservicesTab-DbL48MBc-484871d8f774092c18ce.js +1 -0
  47. data/tools/admin/OutputDialog-B5qHVyck-5685928991e632d92ddf.js +1 -0
  48. data/tools/admin/PackagesTab-Bw34RkLc-a8bd901d60023aea57d0.js +1 -0
  49. data/tools/admin/PluginsTab-C9t0-QVm-6573a228c03271a9a721.js +5 -0
  50. data/tools/admin/{ProgressbarWidget-DIfqhHRE-2775a9cde5a45b0de086.js → ProgressbarWidget-7cYr8136-1c12582ce9d4ff413a55.js} +1 -1
  51. data/tools/admin/RadiobuttonWidget-DTfn-7F2-2fdf40f484b98c933b8e.js +1 -0
  52. data/tools/admin/{RadiogroupWidget-Ci9sCX39-e97afc1a22909e8b2b26.js → RadiogroupWidget-DWvTpw94-72c898511170802d814f.js} +1 -1
  53. data/tools/admin/{RangebarWidget-CN0YuHqy-e1cb05b7f6b1118dd2d0.js → RangebarWidget-CG2Y7eYp-376805c2784826569f50.js} +1 -1
  54. data/tools/admin/{RedisTab-CVimDkIE-975b87301f5a5bcafa9c.js → RedisTab-CvPLS0Qe-5d4a932e4970ba3ca803.js} +1 -1
  55. data/tools/admin/{RollupWidget-y4jBtJB2-bab638d154a5f2fd2c1e.js → RollupWidget-C6HKTfCR-2fee2f5abf13112784d3.js} +1 -1
  56. data/tools/admin/RoutersTab-D-ex_yMO-5fc215e92e7302a8075a.js +1 -0
  57. data/tools/admin/ScrollwindowWidget-DvhBCYd2-1ca5ef1549a42b7ea26c.js +1 -0
  58. data/tools/admin/SecretsTab-CLkJfzf--d880a0e1441849be64f2.js +1 -0
  59. data/tools/admin/SettingsTab-CysOMBFu-96c27242035cd5ef53f0.js +2 -0
  60. data/tools/admin/SignalWidget-BZIoGjam-517ce457178e055a0785.js +1 -0
  61. data/tools/admin/SimpleTextDialog-CGStqYvO-a8fcf03f2e92086fa44a.js +1 -0
  62. data/tools/admin/{SpacerWidget-6rsc_dSM-5d0821a4a5e5cc101d3a.js → SpacerWidget-YBS8RZIE-6f604070f76233e8abf6.js} +1 -1
  63. data/tools/admin/{SparklineWidget-CZtvu2ss-588212b5617f199fcd2e.js → SparklineWidget-BMhY9vYe-330a5e7e3db2907e0b78.js} +1 -1
  64. data/tools/admin/TabbookWidget-RfET19pq-f131be0ee6a50775a079.js +1 -0
  65. data/tools/admin/TargetsTab-CfBt-dZW-af29d3abcec34f39d21d.js +1 -0
  66. data/tools/admin/TextboxWidget-M8vFBSxS-8d0b53e2f7eebf969abb.js +1 -0
  67. data/tools/admin/{TextfieldWidget-Df0ANSiU-766eb0d82b44a91ec200.js → TextfieldWidget-Dev7lCsT-b4e43b129c8b8b194dba.js} +1 -1
  68. data/tools/admin/TimeWidget-CQzn13rQ-dde78e9108545bc47090.js +1 -0
  69. data/tools/admin/{TitleWidget-B9SPUlbW-d60e09a2b1e080a21e01.js → TitleWidget-C4zbSian-f6fd7ad5542875ddd1c9.js} +1 -1
  70. data/tools/admin/ToolsTab-CnhhRS3J-57d6ddffd01325622abb.js +6 -0
  71. data/tools/admin/{VWidget-C4spAawK-c884f9cea073da6d8ce9.js → VWidget-iASFPjdx-14bb7ec00b6bb0823126.js} +1 -1
  72. data/tools/admin/ValueWidget-BVI6uUVX-3d7edd0290c877d1cbb8.js +1 -0
  73. data/tools/admin/ValuelimitsbarWidget-BiIcery0-86e4d3b97524111adad6.js +1 -0
  74. data/tools/admin/ValuelimitscolumnWidget-BiRI8GbI-2b9bd816bf467264a76d.js +1 -0
  75. data/tools/admin/{ValuerangebarWidget-CecQRIok-c389d01eb001b34d9382.js → ValuerangebarWidget-CtMFQu9--3192b0e9ed894b0a92c2.js} +1 -1
  76. data/tools/admin/{VerticalWidget-D8jUFxjS-264cdd61b0515fa3092c.js → VerticalWidget-CRmcpQBn-52ff42eb62875348fc5a.js} +1 -1
  77. data/tools/admin/VerticalboxWidget-C-qChjug-a7cdc3ed315048ef8b50.js +1 -0
  78. data/tools/admin/Widget-CFEnOKms-b56cb1cdd01a85ba35b8.js +1 -0
  79. data/tools/admin/main-261a03f701466d100c9b.js +1512 -0
  80. data/tools/admin/main.js +1 -1
  81. metadata +81 -84
  82. data/tools/admin/ArrayWidget-BxEO5hEG-5c784cf69c59ef56f770.js +0 -2
  83. data/tools/admin/CanvasWidget-DZQGG-yQ-9208dd10b8d9bf8fa386.js +0 -1
  84. data/tools/admin/CanvasdotWidget-6wuCSnw_-7a088d1c0dab274586f1.js +0 -1
  85. data/tools/admin/CanvaslabelWidget-CQZCeohU-e4296f8d11d95bf27acd.js +0 -1
  86. data/tools/admin/CanvaslineWidget-nTP3fJB4-9766cead6e6c429a7994.js +0 -1
  87. data/tools/admin/CheckbuttonWidget-5-8YDsQL-66299903b9cda3bd6623.js +0 -1
  88. data/tools/admin/ComboboxWidget-DzBL8h9f-f7b29907644dd0f506de.js +0 -1
  89. data/tools/admin/DateWidget-CW7Od7lB-adfa70f44dccea31a863.js +0 -1
  90. data/tools/admin/FormatvalueWidget-CGpnTqVH-1965b1425ac5713160a7.js +0 -1
  91. data/tools/admin/Graph-3rkhFP3G-6869b66611e6318604a7.js +0 -1
  92. data/tools/admin/HorizontalboxWidget-Br8dSVHD-d4aab2761ca77fa24390.js +0 -1
  93. data/tools/admin/HorizontallineWidget-CbxREBYI-ba4ec78147ff36e4335d.js +0 -1
  94. data/tools/admin/ImageviewerWidget-XrsqxmLo-9d5e7238e3c5ecd8748c.js +0 -1
  95. data/tools/admin/InterfacesTab-DAeNlGlB-e1c02697b38318186672.js +0 -1
  96. data/tools/admin/LabelledWidget-C7TDf92M-b20b3274d1d4e3403870.js +0 -1
  97. data/tools/admin/LabelvaluelimitsbarWidget-CZueHYWG-ae89b48f0240d8c4b536.js +0 -1
  98. data/tools/admin/LabelvaluelimitscolumnWidget-BTvzyQMq-4ee9e762abc78c9e5e22.js +0 -1
  99. data/tools/admin/LedWidget-CxJjJBBS-956a4190d5e60484cfa9.js +0 -1
  100. data/tools/admin/LimitsbarWidget-Djui0IpK-424433c6317281d1676d.js +0 -1
  101. data/tools/admin/LinegraphWidget-BtieJxeL-a423148ceca6c5ff74e5.js +0 -1
  102. data/tools/admin/MicroservicesTab-IbTmbPxO-69cd3eeece33f36c8a8f.js +0 -1
  103. data/tools/admin/OutputDialog-Ci5OT_fH-68240dca0ee2eb272d32.js +0 -1
  104. data/tools/admin/PackagesTab-BX8YP3H1-72f20ce8b559d7fcc13a.js +0 -1
  105. data/tools/admin/PluginsTab-Ds3jk64b-831383858209ff2c2d5e.js +0 -5
  106. data/tools/admin/RadiobuttonWidget-QzIkNP7m-959594855f51f05f1572.js +0 -1
  107. data/tools/admin/RoutersTab-Dki_66av-ce7a2a94f241858d86d6.js +0 -1
  108. data/tools/admin/ScrollwindowWidget-CBzYk4Y3-20a2b344d6594be94af9.js +0 -1
  109. data/tools/admin/SecretsTab-BjviaTxh-33a36e028d57e1378d98.js +0 -1
  110. data/tools/admin/SettingsTab-Bo_dYXgb-b0ac92a82847e85fa46f.js +0 -2
  111. data/tools/admin/SignalWidget-DQ5Uc2uV-1e83f917599853ee7901.js +0 -1
  112. data/tools/admin/SimpleTextDialog-CheuP_ls-d5f5a08e31cdf07b9a61.js +0 -1
  113. data/tools/admin/TabbookWidget-DNALU0jl-cc4c87c03bc6b35b8920.js +0 -1
  114. data/tools/admin/TargetsTab-Cd8U1aN_-968369f75aa684d02f9b.js +0 -1
  115. data/tools/admin/TextboxWidget-5hqPj74D-603dfe11a4dc847120f1.js +0 -1
  116. data/tools/admin/TimeWidget-C6XQMUG2-3bd332a4cb0aac40e4ec.js +0 -1
  117. data/tools/admin/ToolsTab-Cgpb2nAW-5b5a3d23a36b0fdcce3c.js +0 -6
  118. data/tools/admin/ValueWidget-D4RrYVEK-c14156e71f8c70447418.js +0 -1
  119. data/tools/admin/ValuelimitsbarWidget-Bc9_Vj_f-5cefd3afaa0f3983b22f.js +0 -1
  120. data/tools/admin/ValuelimitscolumnWidget-DHKIL7sf-5f23f60b788a106ce9ac.js +0 -1
  121. data/tools/admin/VerticalboxWidget-B4eGUSYH-8e7497fac1b85d79028a.js +0 -1
  122. data/tools/admin/Widget-fRCERxGf-f53f0043a8d9f927971c.js +0 -1
  123. data/tools/admin/main-89bee744bbd6e4811043.js +0 -1432
@@ -0,0 +1,1512 @@
1
+ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(sr,rt){"use strict";var Ue,Xt,lt,Fe,We,gn,fr,ff,pf,gf,_n,Li,Xi,Ht,fl,tu,Ur,is,js,ka,mf,vf,yf,bf,nu,wf,xf,Cf,kf,ru,_f,Sf,Af,Tf,$f,Mf,Ef;return{setters:[Et=>{Ue=Et.resolveComponent,Xt=Et.createBlock,lt=Et.openBlock,Fe=Et.withCtx,We=Et.createVNode,gn=Et.createElementBlock,fr=Et.createElementVNode,ff=Et.useCssVars,pf=Et.defineAsyncComponent,gf=Et.Teleport,_n=Et.toDisplayString,Li=Et.Fragment,Xi=Et.renderList,Ht=Et.createTextVNode,fl=Et.mergeProps,tu=Et.createSlots,Ur=Et.createCommentVNode,is=Et.normalizeStyle,js=Et.h,ka=Et.withModifiers,mf=Et.toRaw,vf=Et.defineComponent,yf=Et.warn,bf=Et.inject,nu=Et.computed,wf=Et.shallowRef,xf=Et.watchEffect,Cf=Et.getCurrentInstance,kf=Et.provide,ru=Et.createApp,_f=Et.withDirectives,Sf=Et.vShow},Et=>{Af=Et.createRouter,Tf=Et.createWebHistory},Et=>{$f=Et.getMountedApps},Et=>{Mf=Et.createStore},Et=>{Ef=Et.createVuetify}],execute:function(){sr({$:Pf,a:No,f:_M,l:Tn,m:Ar,y:er,z:cd});var Et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function If(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(f){return Object.getOwnPropertyDescriptor(t,f).enumerable})),n.push.apply(n,r)}return n}function os(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?If(Object(n),!0).forEach(function(r){ew(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ew(t,e,n){return(e=function(r){var f=function(d,p){if(ss(d)!=="object"||d===null)return d;var b=d[Symbol.toPrimitive];if(b!==void 0){var h=b.call(d,p);if(ss(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(d)}(r,"string");return ss(f)==="symbol"?f:String(f)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ss(t){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(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var e=function(n){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,f=String(n),d=f.length,p=-1,b="",h=f.charCodeAt(0);++p<d;)(r=f.charCodeAt(p))!=0?b+=r>=1&&r<=31||r==127||p==0&&r>=48&&r<=57||p==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":p==0&&d==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+f.charAt(p):f.charAt(p):b+="�";return b};t.CSS||(t.CSS={}),t.CSS.escape=e})(Et);var tw={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function nw(t){if(ss(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var e=os(os({},tw),t);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 n={};return{bootstrap:rw.bind(null,e,n),mount:iw.bind(null,e,n),unmount:sw.bind(null,e,n),update:ow.bind(null,e,n)}}function rw(t){return t.loadRootComponent?t.loadRootComponent().then(function(e){return t.rootComponent=e}):Promise.resolve()}function iw(t,e,n){var r={};return Promise.resolve().then(function(){return function(f,d){return typeof f.appOptions=="function"?f.appOptions(d):Promise.resolve(os({},f.appOptions))}(t,n).then(function(f){var d;if(n.domElement&&!f.el&&(f.el=n.domElement),f.el)if(typeof f.el=="string"){if(!(d=document.querySelector(f.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(f.el))}else(d=f.el).id||(d.id="single-spa-application:".concat(n.name)),f.el="#".concat(CSS.escape(d.id));else{var p="single-spa-application:".concat(n.name);f.el="#".concat(CSS.escape(p)),(d=document.getElementById(p))||((d=document.createElement("div")).id=p,document.body.appendChild(d))}if(!t.replaceMode&&(f.el=f.el+" .single-spa-container",!d.querySelector(".single-spa-container"))){var b=document.createElement("div");b.className="single-spa-container",d.appendChild(b)}r.domEl=d,f.render||f.template||!t.rootComponent||(f.render=function(g){return g(t.rootComponent)}),f.data||(f.data={});var h=f.data;if(f.data=function(){return os(os({},typeof h=="function"?h.call(this,this):h),n)},t.createApp){if(r.vueInstance=t.createApp(f),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,n)).then(function(){return r.root=r.vueInstance.mount(f.el),e[n.name]=r,r.vueInstance});r.root=r.vueInstance.mount(f.el)}else if(r.vueInstance=new t.Vue(f),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,n)).then(function(){return e[n.name]=r,r.vueInstance});return e[n.name]=r,r.vueInstance})})}function ow(t,e,n){return Promise.resolve().then(function(){var r=e[n.name],f=os(os({},t.appOptions.data||{}),n),d=r.root||r.vueInstance;for(var p in f)d[p]=f[p]})}function sw(t,e,n){return Promise.resolve().then(function(){var r=e[n.name];t.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 aw=(t,e)=>{const n=t.__vccOpts||t;for(const[r,f]of e)n[r]=f;return n},lw={};function cw(t,e){const n=Ue("router-view"),r=Ue("v-app");return lt(),Xt(r,{id:"innerapp"},{default:Fe(()=>[We(n)]),_:1})}const uw=aw(lw,[["render",cw]]),Lf=function(t){var e;!t.name!=="NotFound"&&(t.path=`/tools/admin/${t.path.replace(/^\//,"")}`),(e=t.children)==null||e.forEach(Lf)},GD="modulepreload",YD=function(t){return"/"+t},XD={},it=function(e,n,r){let f=Promise.resolve();function d(p){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=p,window.dispatchEvent(b),!b.defaultPrevented)throw p}return f.then(p=>{for(const b of p||[])b.status==="rejected"&&d(b.reason);return e().catch(d)})},Ri=sr("d",(t,e)=>{const n=t.__vccOpts||t;for(const[r,f]of e)n[r]=f;return n}),hw="/icons/customIcons.svg",iu={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return hw+"#"+this.icon}}},Rf=()=>{ff(t=>({"259824e2":t.color}))},Of=iu.setup;iu.setup=Of?(t,e)=>(Rf(),Of(t,e)):Rf;const dw={class:"cosmos-custom-icon"},fw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},pw=["href"];function gw(t,e,n,r,f,d){return lt(),gn("span",dw,[(lt(),gn("svg",fw,[fr("use",{href:d.iconSrc},null,8,pw)]))])}const mw=Ri(iu,[["render",gw],["__scopeId","data-v-4b6f1199"]]),pl=6e4,ou=36e5,vw=1e3,Df=Symbol.for("constructDateFrom");function er(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Df in t?t[Df](e):t instanceof Date?new t.constructor(e):new Date(e)}function Tn(t,e){return er(e||t,t)}let yw={};function zs(){return yw}function Oo(t,e){var n,r,f,d;const p=zs(),b=(e==null?void 0:e.weekStartsOn)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??p.weekStartsOn??((d=(f=p.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??0,h=Tn(t,e==null?void 0:e.in),g=h.getDay(),s=(g<b?7:0)+g-b;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Hs(t,e){return Oo(t,{...e,weekStartsOn:1})}function Nf(t,e){const n=Tn(t,void 0),r=n.getFullYear(),f=er(n,0);f.setFullYear(r+1,0,4),f.setHours(0,0,0,0);const d=Hs(f),p=er(n,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const b=Hs(p);return n.getTime()>=d.getTime()?r+1:n.getTime()>=b.getTime()?r:r-1}function gl(t){const e=Tn(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function bw(t,...e){const n=er.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function Ff(t,e){const n=Tn(t,void 0);return n.setHours(0,0,0,0),n}function ww(t,e,n){const[r,f]=bw(void 0,t,e),d=Ff(r),p=Ff(f),b=+d-gl(d),h=+p-gl(p);return Math.round((b-h)/864e5)}function xw(t,e){const n=Nf(t),r=er(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Hs(r)}function Cw(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Pf(t){return!(!Cw(t)&&typeof t!="number"||isNaN(+Tn(t)))}function kw(t,e){const n=Tn(t,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _w={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"}},Sw=(t,e,n)=>{let r;const f=_w[t];return typeof f=="string"?r=f:e===1?r=f.one:r=f.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function su(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Aw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$w={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mw={date:su({formats:Aw,defaultWidth:"full"}),time:su({formats:Tw,defaultWidth:"full"}),dateTime:su({formats:$w,defaultWidth:"full"})},Ew={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Iw=(t,e,n,r)=>Ew[t];function _a(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let f;if(r==="formatting"&&t.formattingValues){const p=t.defaultFormattingWidth||t.defaultWidth,b=n!=null&&n.width?String(n.width):p;f=t.formattingValues[b]||t.formattingValues[p]}else{const p=t.defaultWidth,b=n!=null&&n.width?String(n.width):t.defaultWidth;f=t.values[b]||t.values[p]}const d=t.argumentCallback?t.argumentCallback(e):e;return f[d]}}const Lw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ow={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"]},Dw={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"]},Nw={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"}},Fw={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"}},Pw=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Bw={ordinalNumber:Pw,era:_a({values:Lw,defaultWidth:"wide"}),quarter:_a({values:Rw,defaultWidth:"wide",argumentCallback:t=>t-1}),month:_a({values:Ow,defaultWidth:"wide"}),day:_a({values:Dw,defaultWidth:"wide"}),dayPeriod:_a({values:Nw,defaultWidth:"wide",formattingValues:Fw,defaultFormattingWidth:"wide"})};function Sa(t){return(e,n={})=>{const r=n.width,f=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],d=e.match(f);if(!d)return null;const p=d[0],b=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(b)?jw(b,a=>a.test(p)):Ww(b,a=>a.test(p));let g;g=t.valueCallback?t.valueCallback(h):h,g=n.valueCallback?n.valueCallback(g):g;const s=e.slice(p.length);return{value:g,rest:s}}}function Ww(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function jw(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function zw(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const f=r[0],d=e.match(t.parsePattern);if(!d)return null;let p=t.valueCallback?t.valueCallback(d[0]):d[0];p=n.valueCallback?n.valueCallback(p):p;const b=e.slice(f.length);return{value:p,rest:b}}}const Hw=/^(\d+)(th|st|nd|rd)?/i,Uw=/\d+/i,Vw={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},qw={any:[/^b/i,/^(a|c)/i]},Kw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gw={any:[/1/i,/2/i,/3/i,/4/i]},Yw={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},Xw={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]},Qw={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},Zw={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]},Jw={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},e1={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}},t1={ordinalNumber:zw({matchPattern:Hw,parsePattern:Uw,valueCallback:t=>parseInt(t,10)}),era:Sa({matchPatterns:Vw,defaultMatchWidth:"wide",parsePatterns:qw,defaultParseWidth:"any"}),quarter:Sa({matchPatterns:Kw,defaultMatchWidth:"wide",parsePatterns:Gw,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Sa({matchPatterns:Yw,defaultMatchWidth:"wide",parsePatterns:Xw,defaultParseWidth:"any"}),day:Sa({matchPatterns:Qw,defaultMatchWidth:"wide",parsePatterns:Zw,defaultParseWidth:"any"}),dayPeriod:Sa({matchPatterns:Jw,defaultMatchWidth:"any",parsePatterns:e1,defaultParseWidth:"any"})},Bf={code:"en-US",formatDistance:Sw,formatLong:Mw,formatRelative:Iw,localize:Bw,match:t1,options:{weekStartsOn:0,firstWeekContainsDate:1}};function n1(t,e){const n=Tn(t,void 0);return ww(n,kw(n))+1}function Wf(t,e){const n=Tn(t,void 0),r=+Hs(n)-+xw(n);return Math.round(r/6048e5)+1}function au(t,e){var n,r,f,d;const p=Tn(t,e==null?void 0:e.in),b=p.getFullYear(),h=zs(),g=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((d=(f=h.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,s=er((e==null?void 0:e.in)||t,0);s.setFullYear(b+1,0,g),s.setHours(0,0,0,0);const a=Oo(s,e),c=er((e==null?void 0:e.in)||t,0);c.setFullYear(b,0,g),c.setHours(0,0,0,0);const l=Oo(c,e);return+p>=+a?b+1:+p>=+l?b:b-1}function r1(t,e){var n,r,f,d;const p=zs(),b=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??p.firstWeekContainsDate??((d=(f=p.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,h=au(t,e),g=er((e==null?void 0:e.in)||t,0);return g.setFullYear(h,0,b),g.setHours(0,0,0,0),Oo(g,e)}function jf(t,e){const n=Tn(t,e==null?void 0:e.in),r=+Oo(n,e)-+r1(n,e);return Math.round(r/6048e5)+1}function hn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Do={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return hn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):hn(n+1,2)},d(t,e){return hn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return hn(t.getHours()%12||12,e.length)},H(t,e){return hn(t.getHours(),e.length)},m(t,e){return hn(t.getMinutes(),e.length)},s(t,e){return hn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),f=Math.trunc(r*Math.pow(10,n-3));return hn(f,e.length)}},Us={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zf={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),f=r>0?r:1-r;return n.ordinalNumber(f,{unit:"year"})}return Do.y(t,e)},Y:function(t,e,n,r){const f=au(t,r),d=f>0?f:1-f;if(e==="YY"){const p=d%100;return hn(p,2)}return e==="Yo"?n.ordinalNumber(d,{unit:"year"}):hn(d,e.length)},R:function(t,e){const n=Nf(t);return hn(n,e.length)},u:function(t,e){const n=t.getFullYear();return hn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return hn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return hn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Do.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return hn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const f=jf(t,r);return e==="wo"?n.ordinalNumber(f,{unit:"week"}):hn(f,e.length)},I:function(t,e,n){const r=Wf(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):hn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Do.d(t,e)},D:function(t,e,n){const r=n1(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):hn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const f=t.getDay(),d=(f-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(d);case"ee":return hn(d,2);case"eo":return n.ordinalNumber(d,{unit:"day"});case"eee":return n.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(f,{width:"short",context:"formatting"});case"eeee":default:return n.day(f,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const f=t.getDay(),d=(f-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(d);case"cc":return hn(d,e.length);case"co":return n.ordinalNumber(d,{unit:"day"});case"ccc":return n.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(f,{width:"narrow",context:"standalone"});case"cccccc":return n.day(f,{width:"short",context:"standalone"});case"cccc":default:return n.day(f,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),f=r===0?7:r;switch(e){case"i":return String(f);case"ii":return hn(f,e.length);case"io":return n.ordinalNumber(f,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let f;switch(r===12?f=Us.noon:r===0?f=Us.midnight:f=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let f;switch(r>=17?f=Us.evening:r>=12?f=Us.afternoon:r>=4?f=Us.morning:f=Us.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Do.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Do.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):hn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):hn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Do.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Do.s(t,e)},S:function(t,e){return Do.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Uf(r);case"XXXX":case"XX":return as(r);case"XXXXX":case"XXX":default:return as(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Uf(r);case"xxxx":case"xx":return as(r);case"xxxxx":case"xxx":default:return as(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Hf(r,":");case"OOOO":default:return"GMT"+as(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Hf(r,":");case"zzzz":default:return"GMT"+as(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return hn(r,e.length)},T:function(t,e,n){return hn(+t,e.length)}};function Hf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=Math.trunc(r/60),d=r%60;return d===0?n+String(f):n+String(f)+e+hn(d,2)}function Uf(t,e){return t%60===0?(t>0?"-":"+")+hn(Math.abs(t)/60,2):as(t,e)}function as(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=hn(Math.trunc(r/60),2),d=hn(r%60,2);return n+f+e+d}const Vf=(t,e)=>{switch(t){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"})}},qf=(t,e)=>{switch(t){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"})}},i1=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],f=n[2];if(!f)return Vf(t,e);let d;switch(r){case"P":d=e.dateTime({width:"short"});break;case"PP":d=e.dateTime({width:"medium"});break;case"PPP":d=e.dateTime({width:"long"});break;case"PPPP":default:d=e.dateTime({width:"full"});break}return d.replace("{{date}}",Vf(r,e)).replace("{{time}}",qf(f,e))},lu={p:qf,P:i1},o1=/^D+$/,s1=/^Y+$/,a1=["D","DD","YY","YYYY"];function Kf(t){return o1.test(t)}function Gf(t){return s1.test(t)}function cu(t,e,n){const r=l1(t,e,n);if(console.warn(r),a1.includes(t))throw new RangeError(r)}function l1(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const c1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,u1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,h1=/^'([^]*?)'?$/,d1=/''/g,f1=/[a-zA-Z]/;function No(t,e,n){var r,f,d,p,b,h,g,s;const a=zs(),c=(n==null?void 0:n.locale)??a.locale??Bf,l=(n==null?void 0:n.firstWeekContainsDate)??((f=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(d=a.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((h=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((s=(g=a.locale)==null?void 0:g.options)==null?void 0:s.weekStartsOn)??0,u=Tn(t,n==null?void 0:n.in);if(!Pf(u))throw new RangeError("Invalid time value");let m=e.match(u1).map(x=>{const E=x[0];if(E==="p"||E==="P"){const T=lu[E];return T(x,c.formatLong)}return x}).join("").match(c1).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const E=x[0];if(E==="'")return{isToken:!1,value:p1(x)};if(zf[E])return{isToken:!0,value:x};if(E.match(f1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:x}});c.localize.preprocessor&&(m=c.localize.preprocessor(u,m));const w={firstWeekContainsDate:l,weekStartsOn:o,locale:c};return m.map(x=>{if(!x.isToken)return x.value;const E=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Gf(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kf(E))&&cu(E,e,String(t));const T=zf[E[0]];return T(u,E,c.localize,w)}).join("")}function p1(t){const e=t.match(h1);return e?e[1].replace(d1,"'"):t}var Fo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ml(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yf={exports:{}},Xf;function g1(){return Xf||(Xf=1,function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var f=function(s,a,c){if(typeof s!="string"){f.original?f.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=a),f.modules[s]||(f.payloads[s]=c,f.modules[s]=null)};f.modules={},f.payloads={};var d=function(s,a,c){if(typeof a=="string"){var l=h(s,a);if(l!=null)return c&&c(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],u=0,m=a.length;u<m;++u){var w=h(s,a[u]);if(w==null&&p.original)return;o.push(w)}return c&&c.apply(null,o)||!0}},p=function(s,a){var c=d("",s,a);return c==null&&p.original?p.original.apply(this,arguments):c},b=function(s,a){if(a.indexOf("!")!==-1){var c=a.split("!");return b(s,c[0])+"!"+b(s,c[1])}if(a.charAt(0)=="."){var l=s.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=b(s,a);var c=f.modules[a];if(!c){if(c=f.payloads[a],typeof c=="function"){var l={},o={id:a,uri:"",exports:l,packaged:!0},u=function(w,x){return d(a,w,x)},m=c(u,l,o);l=m||o.exports,f.modules[a]=l,delete f.payloads[a]}c=f.modules[a]=l||c}return c};function g(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(f.original=a.define,a.define=f,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(p.original=a.require,a.require=p,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,f){function d(p,b,h){Object.defineProperty(p,b,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(p,b){return b=b||0,this.lastIndexOf(p,b)===b}),String.prototype.endsWith||d(String.prototype,"endsWith",function(p,b){var h=this;(b===void 0||b>h.length)&&(b=h.length),b-=p.length;var g=h.indexOf(p,b);return g!==-1&&g===b}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var b="",h=this;p>0;)p&1&&(b+=h),(p>>=1)&&(h+=h);return b}),String.prototype.includes||d(String.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(p),h=1;h<arguments.length;h++){var g=arguments[h];g!=null&&Object.keys(g).forEach(function(s){b[s]=g[s]})}return b}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(b){return p[b]})}),Array.prototype.find||d(Array.prototype,"find",function(p){for(var b=this.length,h=arguments[1],g=0;g<b;g++){var s=this[g];if(p.call(h,s,g,this))return s}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(p){for(var b=this.length,h=arguments[1],g=0;g<b;g++){var s=this[g];if(p.call(h,s,g,this))return g}}),Array.prototype.includes||d(Array.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(p){for(var b=this,h=b.length>>>0,g=arguments[1],s=g>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),c=arguments[2],l=c===void 0?h:c>>0,o=l<0?Math.max(h+l,0):Math.min(l,h);a<o;)b[a]=p,a++;return b}),Array.of||d(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,f){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,f){r.deepCopy=function d(p){if(typeof p!="object"||!p)return p;var b;if(Array.isArray(p)){b=[];for(var h=0;h<p.length;h++)b[h]=d(p[h]);return b}if(Object.prototype.toString.call(p)!=="[object Object]")return p;b={};for(var h in p)b[h]=d(p[h]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){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 g="";h>0;)h&1&&(g+=b),(h>>=1)&&(b+=b);return g};var d=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(d,"")},r.stringTrimRight=function(b){return b.replace(p,"")},r.copyObject=function(b){var h={};for(var g in b)h[g]=b[g];return h},r.copyArray=function(b){for(var h=[],g=0,s=b.length;g<s;g++)b[g]&&typeof b[g]=="object"?h[g]=this.copyObject(b[g]):h[g]=b[g];return h},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var h={},g=0;g<b.length;g++)h[b[g]]=1;return h},r.createMap=function(b){var h=Object.create(null);for(var g in b)h[g]=b[g];return h},r.arrayRemove=function(b,h){for(var g=0;g<=b.length;g++)h===b[g]&&b.splice(g,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 g=[];return b.replace(h,function(s){g.push({offset:arguments[arguments.length-2],length:s.length})}),g},r.deferredCall=function(b){var h=null,g=function(){h=null,b()},s=function(a){return s.cancel(),h=setTimeout(g,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 g=null,s=function(){g=null,b()},a=function(c){g==null&&(g=setTimeout(s,c||h))};return a.delay=function(c){g&&clearTimeout(g),g=setTimeout(s,c||h)},a.schedule=a,a.call=function(){this.cancel(),b()},a.cancel=function(){g&&clearTimeout(g),g=null},a.isPending=function(){return g},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(b,h,g){return g&&b.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,f){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),b=d.userAgent||"",h=d.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="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(n,r,f){var d=n("./useragent"),p="http://www.w3.org/1999/xhtml";r.buildDom=function c(l,o,u){if(typeof l=="string"&&l){var m=document.createTextNode(l);return o&&o.appendChild(m),m}if(!Array.isArray(l))return l&&l.appendChild&&o&&o.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],x=0;x<l.length;x++){var E=c(l[x],o,u);E&&w.push(E)}return w}var T=document.createElement(l[0]),k=l[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<l.length;x++)c(l[x],T,u);return C==2&&Object.keys(k).forEach(function(L){var R=k[L];L==="class"?T.className=Array.isArray(R)?R.join(" "):R:typeof R=="function"||L=="value"||L[0]=="$"?T[L]=R:L==="ref"?u&&(u[R]=T):L==="style"?typeof R=="string"&&(T.style.cssText=R):R!=null&&T.setAttribute(L,R)}),o&&o.appendChild(T),T},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,l){return document.createElementNS?document.createElementNS(l||p,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,l){var o=l?l.ownerDocument:document;return o.createTextNode(c)},r.createFragment=function(c){var l=c?c.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(c,l){var o=(c.className+"").split(/\s+/g);return o.indexOf(l)!==-1},r.addCssClass=function(c,l){r.hasCssClass(c,l)||(c.className+=" "+l)},r.removeCssClass=function(c,l){for(var o=c.className.split(/\s+/g);;){var u=o.indexOf(l);if(u==-1)break;o.splice(u,1)}c.className=o.join(" ")},r.toggleCssClass=function(c,l){for(var o=c.className.split(/\s+/g),u=!0;;){var m=o.indexOf(l);if(m==-1)break;u=!1,o.splice(m,1)}return u&&o.push(l),c.className=o.join(" "),u},r.setCssClass=function(c,l,o){o?r.addCssClass(c,l):r.removeCssClass(c,l)},r.hasCssString=function(c,l){var o=0,u;if(l=l||document,u=l.querySelectorAll("style")){for(;o<u.length;)if(u[o++].id===c)return!0}},r.removeElementById=function(c,l){l=l||document,l.getElementById(c)&&l.getElementById(c).remove()};var b,h=[];r.useStrictCSP=function(c){b=c,c==!1?g():h||(h=[])};function g(){var c=h;h=null,c&&c.forEach(function(l){s(l[0],l[1])})}function s(c,l,o){if(!(typeof document>"u")){if(h){if(o)g();else if(o===!1)return h.push([c,l])}if(!b){var u=o;!o||!o.getRootNode?u=document:(u=o.getRootNode(),(!u||u==o)&&(u=document));var m=u.ownerDocument||u;if(l&&r.hasCssString(l,u))return null;l&&(c+=`
2
+ /*# sourceURL=ace/css/`+l+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(c)),l&&(w.id=l),u==m&&(u=r.getDocumentHead(m)),u.insertBefore(w,u.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(c,l){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(l))},r.scrollbarWidth=function(c){var l=r.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var o=r.createElement("ace_outer"),u=o.style;u.position="absolute",u.left="-10000px",u.overflow="hidden",u.width="200px",u.minWidth="0px",u.height="150px",u.display="block",o.appendChild(l);var m=c&&c.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var w=l.offsetWidth;u.overflow="scroll";var x=l.offsetWidth;return w===x&&(x=o.clientWidth),m.removeChild(o),w-x},r.computedStyle=function(c,l){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,l,o){c[l]!==o&&(c[l]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.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),!d.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,l,o){c.style.transform="translate("+Math.round(l)+"px, "+Math.round(o)+"px)"}:r.translate=function(c,l,o){c.style.top=Math.round(o)+"px",c.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,f){/*
3
+ * based on code from:
4
+ *
5
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
6
+ * Available via the MIT or new BSD license.
7
+ * see: http://github.com/jrburke/requirejs for details
8
+ */var d=n("./dom");r.get=function(p,b){var h=new XMLHttpRequest;h.open("GET",p,!0),h.onreadystatechange=function(){h.readyState===4&&b(h.responseText)},h.send(null)},r.loadScript=function(p,b){var h=d.getDocumentHead(),g=document.createElement("script");g.src=p,h.appendChild(g),g.onload=g.onreadystatechange=function(s,a){(a||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,a||b())}},r.qualifyURL=function(p){var b=document.createElement("a");return b.href=p,b.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,f){r.inherits=function(d,p){d.super_=p,d.prototype=Object.create(p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(d,p){for(var b in p)d[b]=p[b];return d},r.implement=function(d,p){r.mixin(d,p)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,f){var d={},p=function(){this.propagationStopped=!0},b=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(h,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[h]||[],a=this._defaultHandlers[h];if(!(!s.length&&!a)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=h),g.stopPropagation||(g.stopPropagation=p),g.preventDefault||(g.preventDefault=b),s=s.slice();for(var c=0;c<s.length&&(s[c](g,this),!g.propagationStopped);c++);if(a&&!g.defaultPrevented)return a(g,this)}},d._signal=function(h,g){var s=(this._eventRegistry||{})[h];if(s){s=s.slice();for(var a=0;a<s.length;a++)s[a](g,this)}},d.once=function(h,g){var s=this;if(this.on(h,function a(){s.off(h,a),g.apply(null,arguments)}),!g)return new Promise(function(a){g=a})},d.setDefaultHandler=function(h,g){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[h]){var a=s[h],c=s._disabled_[h];c||(s._disabled_[h]=c=[]),c.push(a);var l=c.indexOf(g);l!=-1&&c.splice(l,1)}s[h]=g},d.removeDefaultHandler=function(h,g){var s=this._defaultHandlers;if(s){var a=s._disabled_[h];if(s[h]==g)a&&this.setDefaultHandler(h,a.pop());else if(a){var c=a.indexOf(g);c!=-1&&a.splice(c,1)}}},d.on=d.addEventListener=function(h,g,s){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[h];return a||(a=this._eventRegistry[h]=[]),a.indexOf(g)==-1&&a[s?"unshift":"push"](g),g},d.off=d.removeListener=d.removeEventListener=function(h,g){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[h];if(s){var a=s.indexOf(g);a!==-1&&s.splice(a,1)}},d.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=d}),ace.define("ace/lib/report_error",["require","exports","module"],function(n,r,f){r.reportError=function(d,p){var b=new Error(d);b.data=p,typeof console=="object"&&console.error&&console.error(b),setTimeout(function(){throw b})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(n,r,f){var d={"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=d}),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(n,r,f){"no use strict";var d=n("./oop"),p=n("./event_emitter").EventEmitter,b=n("./report_error").reportError,h=n("./default_english_messages").defaultEnglishMessages,g={setOptions:function(o){Object.keys(o).forEach(function(u){this.setOption(u,o[u])},this)},getOptions:function(o){var u={};if(o)Array.isArray(o)||(u=o,o=Object.keys(u));else{var m=this.$options;o=Object.keys(m).filter(function(w){return!m[w].hidden})}return o.forEach(function(w){u[w]=this.getOption(w)},this),u},setOption:function(o,u){if(this["$"+o]!==u){var m=this.$options[o];if(!m)return s('misspelled option "'+o+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(o,u);m.handlesSet||(this["$"+o]=u),m&&m.set&&m.set.call(this,u)}},getOption:function(o){var u=this.$options[o];return u?u.forwardTo?this[u.forwardTo]&&this[u.forwardTo].getOption(o):u&&u.get?u.get.call(this):this["$"+o]:s('misspelled option "'+o+'"')}};function s(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,c,l=function(){function o(){this.$defaultOptions={},a=h,c="dollarSigns"}return o.prototype.defineOptions=function(u,m,w){return u.$options||(this.$defaultOptions[m]=u.$options={}),Object.keys(w).forEach(function(x){var E=w[x];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=x),u.$options[E.name]=E,"initialValue"in E&&(u["$"+E.name]=E.initialValue)}),d.implement(u,g),this},o.prototype.resetOptions=function(u){Object.keys(u.$options).forEach(function(m){var w=u.$options[m];"value"in w&&u.setOption(m,w.value)})},o.prototype.setDefaultValue=function(u,m,w){if(!u){for(u in this.$defaultOptions)if(this.$defaultOptions[u][m])break;if(!this.$defaultOptions[u][m])return!1}var x=this.$defaultOptions[u]||(this.$defaultOptions[u]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},o.prototype.setDefaultValues=function(u,m){Object.keys(m).forEach(function(w){this.setDefaultValue(u,w,m[w])},this)},o.prototype.setMessages=function(u,m){a=u,m&&m.placeholders&&(c=m.placeholders)},o.prototype.nls=function(u,m,w){a[u]||(s("No message found for the key '"+u+"' 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[u]||a[m]||m;return w&&(c==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(E,T){return T=="$"?"$":w[T]})),c==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(E,T){return w[T]}))),x},o}();l.prototype.warn=s,l.prototype.reportError=b,d.implement(l.prototype,p),r.AppConfig=l}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(n,r,f){f.exports=`.ace-tm .ace_gutter {
9
+ background: #f0f0f0;
10
+ color: #333;
11
+ }
12
+
13
+ .ace-tm .ace_print-margin {
14
+ width: 1px;
15
+ background: #e8e8e8;
16
+ }
17
+
18
+ .ace-tm .ace_fold {
19
+ background-color: #6B72E6;
20
+ }
21
+
22
+ .ace-tm {
23
+ background-color: #FFFFFF;
24
+ color: black;
25
+ }
26
+
27
+ .ace-tm .ace_cursor {
28
+ color: black;
29
+ }
30
+
31
+ .ace-tm .ace_invisible {
32
+ color: rgb(191, 191, 191);
33
+ }
34
+
35
+ .ace-tm .ace_storage,
36
+ .ace-tm .ace_keyword {
37
+ color: blue;
38
+ }
39
+
40
+ .ace-tm .ace_constant {
41
+ color: rgb(197, 6, 11);
42
+ }
43
+
44
+ .ace-tm .ace_constant.ace_buildin {
45
+ color: rgb(88, 72, 246);
46
+ }
47
+
48
+ .ace-tm .ace_constant.ace_language {
49
+ color: rgb(88, 92, 246);
50
+ }
51
+
52
+ .ace-tm .ace_constant.ace_library {
53
+ color: rgb(6, 150, 14);
54
+ }
55
+
56
+ .ace-tm .ace_invalid {
57
+ background-color: rgba(255, 0, 0, 0.1);
58
+ color: red;
59
+ }
60
+
61
+ .ace-tm .ace_support.ace_function {
62
+ color: rgb(60, 76, 114);
63
+ }
64
+
65
+ .ace-tm .ace_support.ace_constant {
66
+ color: rgb(6, 150, 14);
67
+ }
68
+
69
+ .ace-tm .ace_support.ace_type,
70
+ .ace-tm .ace_support.ace_class {
71
+ color: rgb(109, 121, 222);
72
+ }
73
+
74
+ .ace-tm .ace_keyword.ace_operator {
75
+ color: rgb(104, 118, 135);
76
+ }
77
+
78
+ .ace-tm .ace_string {
79
+ color: rgb(3, 106, 7);
80
+ }
81
+
82
+ .ace-tm .ace_comment {
83
+ color: rgb(76, 136, 107);
84
+ }
85
+
86
+ .ace-tm .ace_comment.ace_doc {
87
+ color: rgb(0, 102, 255);
88
+ }
89
+
90
+ .ace-tm .ace_comment.ace_doc.ace_tag {
91
+ color: rgb(128, 159, 191);
92
+ }
93
+
94
+ .ace-tm .ace_constant.ace_numeric {
95
+ color: rgb(0, 0, 205);
96
+ }
97
+
98
+ .ace-tm .ace_variable {
99
+ color: rgb(49, 132, 149);
100
+ }
101
+
102
+ .ace-tm .ace_xml-pe {
103
+ color: rgb(104, 104, 91);
104
+ }
105
+
106
+ .ace-tm .ace_entity.ace_name.ace_function {
107
+ color: #0000A2;
108
+ }
109
+
110
+
111
+ .ace-tm .ace_heading {
112
+ color: rgb(12, 7, 255);
113
+ }
114
+
115
+ .ace-tm .ace_list {
116
+ color:rgb(185, 6, 144);
117
+ }
118
+
119
+ .ace-tm .ace_meta.ace_tag {
120
+ color:rgb(0, 22, 142);
121
+ }
122
+
123
+ .ace-tm .ace_string.ace_regex {
124
+ color: rgb(255, 0, 0)
125
+ }
126
+
127
+ .ace-tm .ace_marker-layer .ace_selection {
128
+ background: rgb(181, 213, 255);
129
+ }
130
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
131
+ box-shadow: 0 0 3px 0px white;
132
+ }
133
+ .ace-tm .ace_marker-layer .ace_step {
134
+ background: rgb(252, 255, 0);
135
+ }
136
+
137
+ .ace-tm .ace_marker-layer .ace_stack {
138
+ background: rgb(164, 229, 101);
139
+ }
140
+
141
+ .ace-tm .ace_marker-layer .ace_bracket {
142
+ margin: -1px 0 0 -1px;
143
+ border: 1px solid rgb(192, 192, 192);
144
+ }
145
+
146
+ .ace-tm .ace_marker-layer .ace_active-line {
147
+ background: rgba(0, 0, 0, 0.07);
148
+ }
149
+
150
+ .ace-tm .ace_gutter-active-line {
151
+ background-color : #dcdcdc;
152
+ }
153
+
154
+ .ace-tm .ace_marker-layer .ace_selected-word {
155
+ background: rgb(250, 250, 255);
156
+ border: 1px solid rgb(200, 200, 250);
157
+ }
158
+
159
+ .ace-tm .ace_indent-guide {
160
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
161
+ }
162
+
163
+ .ace-tm .ace_indent-guide-active {
164
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
165
+ }
166
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(n,r,f){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate-css"),r.$id="ace/theme/textmate";var d=n("../lib/dom");d.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(n,r,f){"no use strict";var d=n("./lib/lang"),p=n("./lib/net"),b=n("./lib/dom"),h=n("./lib/app_config").AppConfig;f.exports=r=new h;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(l){if(!g.hasOwnProperty(l))throw new Error("Unknown config key: "+l);return g[l]},r.set=function(l,o){if(g.hasOwnProperty(l))g[l]=o;else if(this.setDefaultValue("",l,o)==!1)throw new Error("Unknown config key: "+l);l=="useStrictCSP"&&b.useStrictCSP(o)},r.all=function(){return d.copyObject(g)},r.$modes={},r.moduleUrl=function(l,o){if(g.$moduleUrls[l])return g.$moduleUrls[l];var u=l.split("/");o=o||u[u.length-2]||"";var m=o=="snippets"?"/":"-",w=u[u.length-1];if(o=="worker"&&m=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(x,"")}(!w||w==o)&&u.length>1&&(w=u[u.length-2]);var E=g[o+"Path"];return E==null?E=g.basePath:m=="/"&&(o=m=""),E&&E.slice(-1)!="/"&&(E+="/"),E+o+m+w+this.get("suffix")},r.setModuleUrl=function(l,o){return g.$moduleUrls[l]=o};var s=function(l,o){if(l==="ace/theme/textmate"||l==="./theme/textmate")return o(null,n("./theme/textmate"));if(a)return a(l,o);console.error("loader is not configured")},a;r.setLoader=function(l){a=l},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(l,o){var u;if(Array.isArray(l))var m=l[0],w=l[1];else if(typeof l=="string")var w=l;var x=function(E){if(E&&!r.$loading[w])return o&&o(E);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var T=function(){s(w,function(k,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var L=r.$loading[w];r.$loading[w]=null,L.forEach(function(R){R&&R(C)})})};if(!r.get("packaged"))return T();p.loadScript(r.moduleUrl(w,m),T),c()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(E){E.default?x(E.default):x(E)});else{try{u=this.$require(w)}catch{}x(u||r.$loaded[w])}},r.$require=function(l){if(typeof f.require=="function"){var o="require";return f[o](l)}},r.setModuleLoader=function(l,o){r.dynamicModules[l]=o};var c=function(){!g.basePath&&!g.workerPath&&!g.modePath&&!g.themePath&&!Object.keys(g.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};r.version="1.40.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,f){n("./lib/fixoldbrowsers");var d=n("./config");d.setLoader(function(g,s){n([g],function(a){s(null,a)})});var p=function(){return this||typeof window<"u"&&window}();f.exports=function(g){d.init=b,d.$require=n,g.require=n},b(!0);function b(g){if(!(!p||!p.document)){d.set("packaged",g||n.packaged||f.packaged||p.define&&(void 0).packaged);var s={},a="",c=document.currentScript||document._currentScript,l=c&&c.ownerDocument||document;c&&c.src&&(a=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=l.getElementsByTagName("script"),u=0;u<o.length;u++){var m=o[u],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,E=0,T=x.length;E<T;E++){var k=x[E];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 L in s)typeof s[L]<"u"&&d.set(L,s[L])}}function h(g){return g.replace(/-(.)/g,function(s,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,f){var d=function(){function p(b,h,g,s){this.start={row:b,column:h},this.end={row:g,column:s}}return p.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},p.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(b,h){return this.compare(b,h)==0},p.prototype.compareRange=function(b){var h,g=b.end,s=b.start;return h=this.compare(g.row,g.column),h==1?(h=this.compare(s.row,s.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(s.row,s.column),h==-1?-1:h==1?42:0)},p.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},p.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},p.prototype.intersects=function(b){var h=this.compareRange(b);return h==-1||h==0||h==1},p.prototype.isEnd=function(b,h){return this.end.row==b&&this.end.column==h},p.prototype.isStart=function(b,h){return this.start.row==b&&this.start.column==h},p.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)},p.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)},p.prototype.inside=function(b,h){return this.compare(b,h)==0?!(this.isEnd(b,h)||this.isStart(b,h)):!1},p.prototype.insideStart=function(b,h){return this.compare(b,h)==0?!this.isEnd(b,h):!1},p.prototype.insideEnd=function(b,h){return this.compare(b,h)==0?!this.isStart(b,h):!1},p.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},p.prototype.compareStart=function(b,h){return this.start.row==b&&this.start.column==h?-1:this.compare(b,h)},p.prototype.compareEnd=function(b,h){return this.end.row==b&&this.end.column==h?1:this.compare(b,h)},p.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)},p.prototype.clipRows=function(b,h){if(this.end.row>h)var g={row:h+1,column:0};else if(this.end.row<b)var g={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 p.fromPoints(s||this.start,g||this.end)},p.prototype.extend=function(b,h){var g=this.compare(b,h);if(g==0)return this;if(g==-1)var s={row:b,column:h};else var a={row:b,column:h};return p.fromPoints(s||this.start,a||this.end)},p.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},p.prototype.isMultiLine=function(){return this.start.row!==this.end.row},p.prototype.clone=function(){return p.fromPoints(this.start,this.end)},p.prototype.collapseRows=function(){return this.end.column==0?new p(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new p(this.start.row,0,this.end.row,0)},p.prototype.toScreenRange=function(b){var h=b.documentToScreenPosition(this.start),g=b.documentToScreenPosition(this.end);return new p(h.row,h.column,g.row,g.column)},p.prototype.moveBy=function(b,h){this.start.row+=b,this.start.column+=h,this.end.row+=b,this.end.column+=h},p}();d.fromPoints=function(p,b){return new d(p.row,p.column,b.row,b.column)},d.comparePoints=function(p,b){return p.row-b.row||p.column-b.column},r.Range=d}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,f){for(var d=n("./oop"),p={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,p.PRINTABLE_KEYS[48+h]=""+h,p.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var g=String.fromCharCode(h+32);b["Key"+g.toUpperCase()]=h,p.PRINTABLE_KEYS[h]=g}for(var h=1;h<13;h++)b["F"+h]=111+h,p.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,p.PRINTABLE_KEYS[173]="-";for(var c in p.FUNCTION_KEYS){var l=p.FUNCTION_KEYS[c].toLowerCase();p[l]=parseInt(c,10)}for(var c in p.PRINTABLE_KEYS){var l=p.PRINTABLE_KEYS[c].toLowerCase();p[l]=parseInt(c,10)}d.mixin(p,p.MODIFIER_KEYS),d.mixin(p,p.PRINTABLE_KEYS),d.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,function(){for(var o=["cmd","ctrl","alt","shift"],u=Math.pow(2,o.length);u--;)p.KEY_MODS[u]=o.filter(function(m){return u&p.KEY_MODS[m]}).join("-")+"-"}(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",d.mixin(r,p),r.default=r,r.keyCodeToString=function(o){var u=p[o];return typeof u!="string"&&(u=String.fromCharCode(o)),u.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var d=n("./keys"),p=n("./useragent"),b=null,h=0,g;function s(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function a(){return g==null&&s(),g}function c(E,T,k){this.elem=E,this.type=T,this.callback=k}c.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var l=r.addListener=function(E,T,k,C){E.addEventListener(T,k,a()),C&&C.$toDestroy.push(new c(E,T,k))},o=r.removeListener=function(E,T,k){E.removeEventListener(T,k,a())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||p.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,T,k){var C=E&&E.ownerDocument||document;function L(R){T&&T(R),k&&k(R),o(C,"mousemove",T),o(C,"mouseup",L),o(C,"dragstart",L)}return l(C,"mousemove",T),l(C,"mouseup",L),l(C,"dragstart",L),L},r.addMouseWheelListener=function(E,T,k){l(E,"wheel",function(C){var L=.15,R=C.deltaX||0,F=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=R*L,C.wheelY=F*L;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=R*I,C.wheelY=F*I;break;case C.DOM_DELTA_PAGE:var H=150;C.wheelX=R*H,C.wheelY=F*H;break}T(C)},k)},r.addMultiMouseDownListener=function(E,T,k,C,L){var R=0,F,I,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(A){if(r.getButton(A)!==0?R=0:A.detail>1?(R++,R>4&&(R=1)):R=1,p.isIE){var S=Math.abs(A.clientX-F)>5||Math.abs(A.clientY-I)>5;(!H||S)&&(R=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},T[R-1]||600),R==1&&(F=A.clientX,I=A.clientY)}if(A._clicks=R,k[C]("mousedown",A),R>4)R=0;else if(R>1)return k[C](P[R],A)}Array.isArray(E)||(E=[E]),E.forEach(function(A){l(A,"mousedown",O,L)})};function u(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return d.KEY_MODS[u(E)]};function m(E,T,k){var C=u(T);if(!k&&T.code&&(k=d.$codeToKeyCode[T.code]||k),!p.isMac&&b){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(C|=8),b.altGr)if((3&C)!=3)b.altGr=0;else return;if(k===18||k===17){var L=T.location;if(k===17&&L===1)b[k]==1&&(h=T.timeStamp);else if(k===18&&C===3&&L===2){var R=T.timeStamp-h;R<50&&(b.altGr=!0)}}}if(k in d.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&T.location===3&&(E(T,C,-k),T.defaultPrevented))){if(p.isChromeOS&&C&8){if(E(T,C,k),T.defaultPrevented)return;C&=-9}return!C&&!(k in d.FUNCTION_KEYS)&&!(k in d.PRINTABLE_KEYS)?!1:E(T,C,k)}}r.addCommandKeyListener=function(E,T,k){var C=null;l(E,"keydown",function(L){b[L.keyCode]=(b[L.keyCode]||0)+1;var R=m(T,L,L.keyCode);return C=L.defaultPrevented,R},k),l(E,"keypress",function(L){C&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(r.stopEvent(L),C=null)},k),l(E,"keyup",function(L){b[L.keyCode]=null},k),b||(w(),l(window,"focus",w))};function w(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var x=1;r.nextTick=function(E,T){T=T||window;var k="zero-timeout-message-"+x++,C=function(L){L.data==k&&(r.stopPropagation(L),o(T,"message",C),E())};l(T,"message",C),T.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,T){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):E()},T)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,f){var d;f.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=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(n,r,f){var d=n("../lib/event"),p=n("../config").nls,b=n("../lib/useragent"),h=n("../lib/dom"),g=n("../lib/lang"),s=n("../clipboard"),a=b.isChrome<18,c=b.isIE,l=b.isChrome>63,o=400,u=n("../lib/keys"),m=u.KEY_MODS,w=b.isIOS,x=w?/\s/:/\n/,E=b.isMobile,T;T=function(k,C){var L=h.createElement("textarea");L.className="ace_text-input",L.setAttribute("wrap","off"),L.setAttribute("autocorrect","off"),L.setAttribute("autocapitalize","off"),L.setAttribute("spellcheck","false"),L.style.opacity="0",k.insertBefore(L,k.firstChild);var R=!1,F=!1,I=!1,H=!1,P="";E||(L.style.fontSize="1px");var O=!1,A=!1,S="",D=0,W=0,U=0,K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===L}catch{}this.setNumberOfExtraLines=function(ke){if(K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,ke<0){te=0;return}te=ke},this.setAriaLabel=function(){var ke="";if(C.$textInputAriaLabel&&(ke+="".concat(C.$textInputAriaLabel,", ")),C.session){var Ve=C.session.selection.cursor.row;ke+=p("text-input.aria-label","Cursor at row $0",[Ve+1])}L.setAttribute("aria-label",ke)},this.setAriaOptions=function(ke){ke.activeDescendant?(L.setAttribute("aria-haspopup","true"),L.setAttribute("aria-autocomplete",ke.inline?"both":"list"),L.setAttribute("aria-activedescendant",ke.activeDescendant)):(L.setAttribute("aria-haspopup","false"),L.setAttribute("aria-autocomplete","both"),L.removeAttribute("aria-activedescendant")),ke.role&&L.setAttribute("role",ke.role),ke.setLabel&&(L.setAttribute("aria-roledescription",p("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),d.addListener(L,"blur",function(ke){A||(C.onBlur(ke),he=!1)},C),d.addListener(L,"focus",function(ke){if(!A){if(he=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(ke),b.isEdge?setTimeout(ae):ae()}},C),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:C.renderer.enableKeyboardAccessibility}),P||l||this.$focusScroll=="browser")return L.focus({preventScroll:!0});var ke=L.style.top;L.style.position="fixed",L.style.top="0px";try{var Ve=L.getBoundingClientRect().top!=0}catch{return}var Je=[];if(Ve)for(var vt=L.parentElement;vt&&vt.nodeType==1;)Je.push(vt),vt.setAttribute("ace_nocontext","true"),!vt.parentElement&&vt.getRootNode?vt=vt.getRootNode().host:vt=vt.parentElement;L.focus({preventScroll:!0}),Ve&&Je.forEach(function(Tt){Tt.removeAttribute("ace_nocontext")}),setTimeout(function(){L.style.position="",L.style.top=="0px"&&(L.style.top=ke)},0)},this.blur=function(){L.blur()},this.isFocused=function(){return he},C.on("beforeEndOperation",function(){var ke=C.curOp,Ve=ke&&ke.command&&ke.command.name;if(Ve!="insertstring"){var Je=Ve&&(ke.docChanged||ke.selectionChanged);I&&Je&&(S=L.value="",Jt()),ae()}}),C.on("changeSelection",this.setAriaLabel);var ne=function(ke,Ve){for(var Je=Ve,vt=1;vt<=ke-K&&vt<2*te+1;vt++)Je+=C.session.getLine(ke-vt).length+1;return Je},ae=w?function(ke){if(!(!he||R&&!ke||H)){ke||(ke="");var Ve=`
167
+ ab`+ke+`cde fg
168
+ `;Ve!=L.value&&(L.value=S=Ve);var Je=4,vt=4+(ke.length||(C.selection.isEmpty()?0:1));(D!=Je||W!=vt)&&L.setSelectionRange(Je,vt),D=Je,W=vt}}:function(){if(!(I||H)&&!(!he&&!Te)){I=!0;var ke=0,Ve=0,Je="";if(C.session){var vt=C.selection,Tt=vt.getRange(),At=vt.cursor.row;At===Z+1?(K=Z+1,Z=K+2*te):At===K-1?(Z=K-1,K=Z-2*te):(At<K-1||At>Z+1)&&(K=At>te?At-te:0,Z=At>te?At+te:2*te);for(var Pt=[],Nt=K;Nt<=Z;Nt++)Pt.push(C.session.getLine(Nt));if(Je=Pt.join(`
169
+ `),ke=ne(Tt.start.row,Tt.start.column),Ve=ne(Tt.end.row,Tt.end.column),Tt.start.row<K){var pt=C.session.getLine(K-1);ke=Tt.start.row<K-1?0:ke,Ve+=pt.length+1,Je=pt+`
170
+ `+Je}else if(Tt.end.row>Z){var kt=C.session.getLine(Z+1);Ve=Tt.end.row>Z+1?kt.length:Tt.end.column,Ve+=Je.length+1,Je=Je+`
171
+ `+kt}else E&&At>0&&(Je=`
172
+ `+Je,Ve+=1,ke+=1);Je.length>o&&(ke<o&&Ve<o?Je=Je.slice(0,o):(Je=`
173
+ `,ke==Ve?ke=Ve=0:(ke=0,Ve=1)));var $n=Je+`
174
+
175
+ `;$n!=S&&(L.value=S=$n,D=W=$n.length)}if(Te&&(D=L.selectionStart,W=L.selectionEnd),W!=Ve||D!=ke||L.selectionEnd!=W)try{L.setSelectionRange(ke,Ve),D=ke,W=Ve}catch{}I=!1}};this.resetSelection=ae,he&&C.onFocus();var ue=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=S.length&&ke.value===S&&S&&ke.selectionEnd!==W},ce=function(ke){I||(R?R=!1:ue(L)?(C.selectAll(),ae()):E&&L.selectionStart!=D&&ae())},ge=null;this.setInputHandler=function(ke){ge=ke},this.getInputHandler=function(){return ge};var Te=!1,$e=function(ke,Ve){if(Te&&(Te=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Je=L.selectionStart,vt=L.selectionEnd,Tt=D,At=S.length-W,Pt=ke,Nt=ke.length-Je,pt=ke.length-vt,kt=0;Tt>0&&S[kt]==ke[kt];)kt++,Tt--;for(Pt=Pt.slice(kt),kt=1;At>0&&S.length-kt>D-1&&S[S.length-kt]==ke[ke.length-kt];)kt++,At--;Nt-=kt-1,pt-=kt-1;var $n=Pt.length-kt+1;if($n<0&&(Tt=-$n,$n=0),Pt=Pt.slice(0,$n),!Ve&&!Pt&&!Nt&&!Tt&&!At&&!pt)return"";H=!0;var $r=!1;return b.isAndroid&&Pt==". "&&(Pt=" ",$r=!0),Pt&&!Tt&&!At&&!Nt&&!pt||O?C.onTextInput(Pt):C.onTextInput(Pt,{extendLeft:Tt,extendRight:At,restoreStart:Nt,restoreEnd:pt}),H=!1,S=ke,D=Je,W=vt,U=pt,$r?`
176
+ `:Pt},Ee=function(ke){if(I)return bn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var Ve=L.value,Je=$e(Ve,!0);(Ve.length>o+100||x.test(Je)||E&&D<1&&D==W)&&ae()},Ze=function(ke,Ve,Je){var vt=ke.clipboardData||window.clipboardData;if(!(!vt||a)){var Tt=c||Je?"Text":"text/plain";try{return Ve?vt.setData(Tt,Ve)!==!1:vt.getData(Tt)}catch(At){if(!Je)return Ze(At,Ve,!0)}}},Xe=function(ke,Ve){var Je=C.getCopyText();if(!Je)return d.preventDefault(ke);Ze(ke,Je)?(w&&(ae(Je),R=Je,setTimeout(function(){R=!1},10)),Ve?C.onCut():C.onCopy(),d.preventDefault(ke)):(R=!0,L.value=Je,L.select(),setTimeout(function(){R=!1,ae(),Ve?C.onCut():C.onCopy()}))},gt=function(ke){Xe(ke,!0)},at=function(ke){Xe(ke,!1)},mt=function(ke){var Ve=Ze(ke);s.pasteCancelled()||(typeof Ve=="string"?(Ve&&C.onPaste(Ve,ke),b.isIE&&setTimeout(ae),d.preventDefault(ke)):(L.value="",F=!0))};d.addCommandKeyListener(L,function(ke,Ve,Je){if(!I)return C.onCommandKey(ke,Ve,Je)},C),d.addListener(L,"select",ce,C),d.addListener(L,"input",Ee,C),d.addListener(L,"cut",gt,C),d.addListener(L,"copy",at,C),d.addListener(L,"paste",mt,C),(!("oncut"in L)||!("oncopy"in L)||!("onpaste"in L))&&d.addListener(k,"keydown",function(ke){if(!(b.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:at(ke);break;case 86:mt(ke);break;case 88:gt(ke);break}},C);var sn=function(ke){if(!(I||!C.onCompositionStart||C.$readOnly)&&(I={},!O)){ke.data&&(I.useTextareaForIME=!1),setTimeout(bn,0),C._signal("compositionStart"),C.on("mousedown",wr);var Ve=C.getSelectionRange();Ve.end.row=Ve.start.row,Ve.end.column=Ve.start.column,I.markerRange=Ve,I.selectionStart=D,C.onCompositionStart(I),I.useTextareaForIME?(S=L.value="",D=0,W=0):(L.msGetInputContext&&(I.context=L.msGetInputContext()),L.getInputContext&&(I.context=L.getInputContext()))}},bn=function(){if(!(!I||!C.onCompositionUpdate||C.$readOnly)){if(O)return wr();if(I.useTextareaForIME)C.onCompositionUpdate(L.value);else{var ke=L.value;$e(ke),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+W-I.selectionStart+U)}}},Jt=function(ke){!C.onCompositionEnd||C.$readOnly||(I=!1,C.onCompositionEnd(),C.off("mousedown",wr),ke&&Ee())};function wr(){A=!0,L.blur(),L.focus(),A=!1}var wn=g.delayedCall(bn,50).schedule.bind(null,null);function Fn(ke){ke.keyCode==27&&L.value.length<L.selectionStart&&(I||(S=L.value),D=W=-1,ae()),wn()}d.addListener(L,"compositionstart",sn,C),d.addListener(L,"compositionupdate",bn,C),d.addListener(L,"keyup",Fn,C),d.addListener(L,"keydown",wn,C),d.addListener(L,"compositionend",Jt,C),this.getElement=function(){return L},this.setCommandMode=function(ke){O=ke,L.readOnly=!1},this.setReadOnly=function(ke){O||(L.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){Te=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,Ve){P||(P=L.style.cssText),L.style.cssText=(Ve?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(D+W)*C.renderer.characterWidth*.5+"px;";var Je=C.container.getBoundingClientRect(),vt=h.computedStyle(C.container),Tt=Je.top+(parseInt(vt.borderTopWidth)||0),At=Je.left+(parseInt(vt.borderLeftWidth)||0),Pt=Je.bottom-Tt-L.clientHeight-2,Nt=function(pt){h.translate(L,pt.clientX-At-2,Math.min(pt.clientY-Tt-2,Pt))};Nt(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(Pn),b.isWin&&d.capture(C.container,Nt,nr))},this.onContextMenuClose=nr;var Pn;function nr(){clearTimeout(Pn),Pn=setTimeout(function(){P&&(L.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var Ct=function(ke){C.textInput.onContextMenu(ke),nr()};d.addListener(L,"mouseup",Ct,C),d.addListener(L,"mousedown",function(ke){ke.preventDefault(),nr()},C),d.addListener(C.renderer.scroller,"contextmenu",Ct,C),d.addListener(L,"contextmenu",Ct,C),w&&Ke(k,C,L);function Ke(ke,Ve,Je){var vt=null,Tt=!1;Je.addEventListener("keydown",function(Pt){vt&&clearTimeout(vt),Tt=!0},!0),Je.addEventListener("keyup",function(Pt){vt=setTimeout(function(){Tt=!1},100)},!0);var At=function(Pt){if(document.activeElement===Je&&!(Tt||I||Ve.$mouseHandler.isMousePressed)&&!R){var Nt=Je.selectionStart,pt=Je.selectionEnd,kt=null,$n=0;if(Nt==0?kt=u.up:Nt==1?kt=u.home:pt>W&&S[pt]==`
177
+ `?kt=u.end:Nt<D&&S[Nt-1]==" "?(kt=u.left,$n=m.option):Nt<D||Nt==D&&W!=D&&Nt==pt?kt=u.left:pt>W&&S.slice(0,pt).split(`
178
+ `).length>2?kt=u.down:pt>W&&S[pt-1]==" "?(kt=u.right,$n=m.option):(pt>W||pt==W&&W!=D&&Nt==pt)&&(kt=u.right),Nt!==pt&&($n|=m.shift),kt){var $r=Ve.onCommandKey({},$n,kt);if(!$r&&Ve.commands){kt=u.keyCodeToString(kt);var Yr=Ve.commands.findKeyCommand($n,kt);Yr&&Ve.execCommand(Yr)}D=Nt,W=pt,ae("")}}};document.addEventListener("selectionchange",At),Ve.on("destroy",function(){document.removeEventListener("selectionchange",At)})}this.destroy=function(){L.parentElement&&L.parentElement.removeChild(L)}},r.TextInput=T,r.$setUserAgentForTests=function(k,C){E=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,f){var d=n("../lib/useragent"),p=0,b=550,h=function(){function a(c){c.$clickSelection=null;var l=c.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(u){c[u]=this[u]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return a.prototype.onMouseDown=function(c){var l=c.inSelection(),o=c.getDocumentPosition();this.mousedownEvent=c;var u=this.editor,m=c.getButton();if(m!==0){var w=u.getSelectionRange(),x=w.isEmpty();(x||m==1)&&u.selection.moveToPosition(o),m==2&&(u.textInput.onContextMenu(c.domEvent),d.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!u.isFocused()&&(u.focus(),this.$focusTimeout&&!this.$clickSelection&&!u.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(o,c.domEvent._clicks>1),c.preventDefault()},a.prototype.startSelect=function(c,l){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(c):l||o.selection.moveToPosition(c),l||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var c,l=this.editor,o=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(o);if(u==-1)c=this.$clickSelection.end;else if(u==1)c=this.$clickSelection.start;else{var m=s(this.$clickSelection,o);o=m.cursor,c=m.anchor}l.selection.setSelectionAnchor(c.row,c.column)}l.selection.selectToPosition(o),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(c){var l,o=this.editor,u=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[c](u.row,u.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)l=this.$clickSelection.end,(m.end.row!=u.row||m.end.column!=u.column)&&(u=m.start);else if(x==1&&w>=0)l=this.$clickSelection.start,(m.start.row!=u.row||m.start.column!=u.column)&&(u=m.end);else if(w==-1&&x==1)u=m.end,l=m.start;else{var E=s(this.$clickSelection,u);u=E.cursor,l=E.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(u),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var c=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(c>p||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(c){var l=c.getDocumentPosition(),o=this.editor,u=o.session,m=u.getBracketRange(l);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(c){var l=c.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var u=o.getSelectionRange();u.isMultiLine()&&u.contains(l.row,l.column)?(this.$clickSelection=o.selection.getLineRange(u.start.row),this.$clickSelection.end=o.selection.getLineRange(u.end.row).end):this.$clickSelection=o.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(c){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,u=c.domEvent.timeStamp,m=u-o.t,w=m?c.wheelX/m:o.vx,x=m?c.wheelY/m:o.vy;m<b&&(w=(w+o.vx)/2,x=(x+o.vy)/2);var E=Math.abs(w/x),T=!1;if(E>=1&&l.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(T=!0),E<=1&&l.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(T=!0),T)o.allowed=u;else if(u-o.allowed<b){var k=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);k?(T=!0,o.allowed=u):o.allowed=0}if(o.t=u,o.vx=w,o.vy=x,T)return l.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},a}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function g(a,c,l,o){return Math.sqrt(Math.pow(l-a,2)+Math.pow(o-c,2))}function s(a,c){if(a.start.row==a.end.row)var l=2*c.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=c.column-4;else var l=2*c.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,r,f){r.preventParentScroll=function(d){d.stopPropagation();var p=d.currentTarget,b=p.scrollHeight>p.clientHeight;b||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,f){var d=this&&this.__extends||function(){var u=function(m,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(x[T]=E[T])},u(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");u(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),p=this&&this.__values||function(u){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&u[m],x=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&x>=u.length&&(u=void 0),{value:u&&u[x++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("./lib/dom");n("./lib/event");var h=n("./range").Range,g=n("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function u(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return u.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},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(m){this.getElement().textContent=m},u.prototype.setHtml=function(m){this.getElement().innerHTML=m},u.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},u.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},u.prototype.setTheme=function(m){this.$element.className=s+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},u.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)},u.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u}(),c=function(){function u(){this.popups=[]}return u.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},u.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},u.prototype.updatePopups=function(){var m,w,x,E;this.popups.sort(function(P,O){return O.priority-P.priority});var T=[];try{for(var k=p(this.popups),C=k.next();!C.done;C=k.next()){var L=C.value,R=!0;try{for(var F=(x=void 0,p(T)),I=F.next();!I.done;I=F.next()){var H=I.value;if(this.doPopupsOverlap(H,L)){R=!1;break}}}catch(P){x={error:P}}finally{try{I&&!I.done&&(E=F.return)&&E.call(F)}finally{if(x)throw x.error}}R?T.push(L):L.hide()}}catch(P){m={error:P}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(m)throw m.error}}},u.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),E=w.getElement().getBoundingClientRect();return x.left<E.right&&x.right>E.left&&x.top<E.bottom&&x.bottom>E.top},u}(),l=new c;r.popupManager=l,r.Tooltip=a;var o=function(u){d(m,u);function m(w){w===void 0&&(w=document.body);var x=u.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 E=x.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",x.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(x)),E.addEventListener("wheel",g),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 E=x.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(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,E=w.getDocumentPosition(),T=x.session.getLine(E.row);if(E.column==T.length){var k=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(E.row,E.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,E,T){var k=10;if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.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 L=C.textToScreenCoordinates(x.start.row,x.start.column),R=C.scroller.getBoundingClientRect();L.pageX<R.left&&(L.pageX=R.left);var F=this.getElement();F.innerHTML="",F.appendChild(E),F.style.maxHeight="",F.style.display="block";var I=F.clientHeight,H=F.clientWidth,P=window.innerHeight-L.pageY-C.lineHeight,O=!0;L.pageY-I<0&&L.pageY<P&&(O=!1),F.style.maxHeight=(O?L.pageY:P)-k+"px",F.style.top=O?"":L.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-L.pageY+"px":"",F.style.left=Math.min(L.pageX,window.innerWidth-H-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,l.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=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,f){var d=this&&this.__extends||function(){var u=function(m,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(x[T]=E[T])},u(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");u(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),p=this&&this.__values||function(u){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&u[m],x=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&x>=u.length&&(u=void 0),{value:u&&u[x++],done:!u}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("../lib/dom"),h=n("../lib/event"),g=n("../tooltip").Tooltip,s=n("../config").nls,a=5,c=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=c;function l(u){var m=u.editor,w=m.renderer.$gutterLayer,x=new o(m,!0);u.editor.setDefaultHandler("guttermousedown",function(R){if(!(!m.isFocused()||R.getButton()!=0)){var F=w.getRegion(R);if(F!="foldWidgets"){var I=R.getDocumentPosition().row,H=m.session.selection;if(R.getShiftKey())H.selectTo(I,0);else{if(R.domEvent.detail==2)return m.selectAll(),R.preventDefault();u.$clickSelection=m.selection.getLineRange(I)}return u.setState("selectByLines"),u.captureMouse(R),R.preventDefault()}}});var E,T;function k(){var R=T.getDocumentPosition().row,F=m.session.getLength();if(R==F){var I=m.renderer.pixelToScreenCoordinates(0,T.y).row,H=T.$pos;if(I>m.session.documentToScreenRow(H.row,H.column))return C()}if(x.showTooltip(R),!!x.isOpen)if(m.on("mousewheel",C),m.on("changeSession",C),window.addEventListener("keydown",C,!0),u.$tooltipFollowsMouse)L(T);else{var P=T.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-c+"px"}else L(T)}}function C(R){R&&R.type==="keydown"&&(R.ctrlKey||R.metaKey)||R&&R.type==="mouseout"&&(!R.relatedTarget||x.getElement().contains(R.relatedTarget))||(E&&(E=clearTimeout(E)),x.isOpen&&(x.hideTooltip(),m.off("mousewheel",C),m.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function L(R){x.setPosition(R.x,R.y)}u.editor.setDefaultHandler("guttermousemove",function(R){var F=R.domEvent.target||R.domEvent.srcElement;if(b.hasCssClass(F,"ace_fold-widget")||b.hasCssClass(F,"ace_custom-widget"))return C();x.isOpen&&u.$tooltipFollowsMouse&&L(R),T=R,!E&&(E=setTimeout(function(){E=null,T&&!u.isMousePressed&&k()},50))}),h.addListener(m.renderer.$gutter,"mouseout",function(R){T=null,x.isOpen&&(E=setTimeout(function(){E=null,C(R)},50))},m)}r.GutterHandler=l;var o=function(u){d(m,u);function m(w,x){x===void 0&&(x=!1);var E=u.call(this,w.container)||this;E.editor=w,E.visibleTooltipRow;var T=E.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",x&&(E.onMouseOut=E.onMouseOut.bind(E),T.addEventListener("mouseout",E.onMouseOut)),E}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 E=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),C=this.getHeight();w+=15,x+=15,w+k>E&&(w-=w+k-E),x+C>T&&(x-=20+C),g.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,E=this.editor.renderer.$gutterLayer,T=E.$annotations[w],k;T?k={displayText:Array.from(T.displayText),type:Array.from(T.type)}:k={displayText:[],type:[]};var C=E.session.getFoldLine(w);if(C&&E.$showFoldedAnnotations){for(var L={error:[],security:[],warning:[],info:[],hint:[]},R={error:1,security:2,warning:3,info:4,hint:5},F,I=w+1;I<=C.end.row;I++)if(E.$annotations[I])for(var H=0;H<E.$annotations[I].text.length;H++){var P=E.$annotations[I].type[H];L[P].push(E.$annotations[I].text[H]),(!F||R[P]<R[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(m.annotationsToSummaryString(L)," in folded code.");k.displayText.push(O),k.type.push(F+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var A={error:[],security:[],warning:[],info:[],hint:[]},S=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<k.displayText.length;I++){var D=b.createElement("span"),W=b.createElement("span");(x=W.classList).add.apply(x,["ace_".concat(k.type[I]),S]),W.setAttribute("aria-label","".concat(m.annotationLabels[k.type[I].replace("_fold","")].singular)),W.setAttribute("role","img"),W.appendChild(b.createTextNode(" ")),D.appendChild(W),D.appendChild(b.createTextNode(k.displayText[I])),D.appendChild(b.createElement("br")),A[k.type[I].replace("_fold","")].push(D)}var U=this.getElement();b.removeChildren(U),A.error.forEach(function(K){return U.appendChild(K)}),A.security.forEach(function(K){return U.appendChild(K)}),A.warning.forEach(function(K){return U.appendChild(K)}),A.info.forEach(function(K){return U.appendChild(K)}),A.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},m.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},m.annotationsToSummaryString=function(w){var x,E,T=[],k=["error","security","warning","info","hint"];try{for(var C=p(k),L=C.next();!L.done;L=C.next()){var R=L.value;if(w[R].length){var F=w[R].length===1?m.annotationLabels[R].singular:m.annotationLabels[R].plural;T.push("".concat(w[R].length," ").concat(F))}}}catch(I){x={error:I}}finally{try{L&&!L.done&&(E=C.return)&&E.call(C)}finally{if(x)throw x.error}}return T.join(", ")},m}(g);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var d=n("../lib/event"),p=n("../lib/useragent"),b=function(){function h(g,s){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=s,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(g,0),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 g=this.editor,s=g.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 d.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return p.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(n,r,f){var d=n("../lib/dom"),p=n("../lib/event"),b=n("../lib/useragent"),h=200,g=200,s=5;function a(l){var o=l.editor,u=d.createElement("div");u.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",u.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){l[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(l));var w=o.container,x,E,T,k,C,L,R=0,F,I,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(u),ue.setDragImage&&ue.setDragImage(u,0,0),setTimeout(function(){o.container.removeChild(u)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,T=ne.clientY,x||W(),R++,ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,T=ne.clientY,x||(W(),R++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragLeave=function(ne){if(R--,R<=0&&x)return U(),F=null,p.preventDefault(ne)},this.onDrop=function(ne){if(L){var ae=ne.dataTransfer;if(I)switch(F){case"move":C.contains(L.row,L.column)?C={start:L,end:L}:C=o.moveText(C,L);break;case"copy":C=o.moveText(C,L,!0);break}else{var ue=ae.getData("Text");C={start:L,end:o.session.insert(L,ue)},o.focus(),F=null}return U(),p.preventDefault(ne)}},p.addListener(w,"dragstart",this.onDragStart.bind(l),o),p.addListener(w,"dragend",this.onDragEnd.bind(l),o),p.addListener(w,"dragenter",this.onDragEnter.bind(l),o),p.addListener(w,"dragover",this.onDragOver.bind(l),o),p.addListener(w,"dragleave",this.onDragLeave.bind(l),o),p.addListener(w,"drop",this.onDrop.bind(l),o);function A(ne,ae){var ue=Date.now(),ce=!ae||ne.row!=ae.row,ge=!ae||ne.column!=ae.column;if(!P||ce||ge)o.moveCursorToPosition(ne),P=ue,O={x:E,y:T};else{var Te=c(O.x,O.y,E,T);Te>s?P=null:ue-P>=g&&(o.renderer.scrollCursorIntoView(),P=null)}}function S(ne,ae){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,ge=o.renderer.layerConfig.characterWidth,Te=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:E-Te.left,right:Te.right-E},y:{top:T-Te.top,bottom:Te.bottom-T}},Ee=Math.min($e.x.left,$e.x.right),Ze=Math.min($e.y.top,$e.y.bottom),Xe={row:ne.row,column:ne.column};Ee/ge<=2&&(Xe.column+=$e.x.left<$e.x.right?-3:2),Ze/ce<=1&&(Xe.row+=$e.y.top<$e.y.bottom?-1:1);var gt=ne.row!=Xe.row,at=ne.column!=Xe.column,mt=!ae||ne.row!=ae.row;gt||at&&!mt?H?ue-H>=h&&o.renderer.scrollCursorIntoView(Xe):H=ue:H=null}function D(){var ne=L;L=o.renderer.screenToTextCoordinates(E,T),A(L,ne),S(L,ne)}function W(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),D(),k=setInterval(D,20),R=0,p.addListener(document,"mousemove",Z)}function U(){clearInterval(k),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!I&&o.$resetCursorStyle(),C=null,L=null,R=0,H=null,P=null,p.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&x&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=b.isMac?ne.altKey:ne.ctrlKey,ge="uninitialized";try{ge=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Te="none";return ce&&ae.indexOf(ge)>=0?Te="copy":ue.indexOf(ge)>=0?Te="move":ae.indexOf(ge)>=0&&(Te="copy"),Te}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,o=l.container;o.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var u=b.isWin?"default":"move";l.renderer.setCursorStyle(u),this.setState("dragReady")},this.onMouseDrag=function(l){var o=this.editor.container;if(b.isIE&&this.state=="dragReady"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>3&&o.dragDrop()}if(this.state==="dragWait"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var o=this.editor,u=l.inSelection(),m=l.getButton(),w=l.domEvent.detail||1;if(w===1&&m===0&&u){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function c(l,o,u,m){return Math.sqrt(Math.pow(u-l,2)+Math.pow(m-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,f){var d=n("./mouse_event").MouseEvent,p=n("../lib/event"),b=n("../lib/dom");r.addTouchListeners=function(h,g){var s="scroll",a,c,l,o,u,m,w=0,x,E=0,T=0,k=0,C,L;function R(){var A=window.navigator&&window.navigator.clipboard,S=!1,D=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();L.replaceChild(b.buildDom(S?["span",!K&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},W=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!S)return S=!S,D();Z=="paste"?A.readText().then(function(te){g.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(A?A.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),L.firstChild.style.display="none",S=!1,Z!="openCommandPalette"&&g.focus()};L=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function F(){if(!g.getOption("enableMobileMenu")){L&&I();return}L||R();var A=g.selection.cursor,S=g.renderer.textToScreenCoordinates(A.row,A.column),D=g.renderer.textToScreenCoordinates(0,0).pageX,W=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();L.style.top=S.pageY-U.top-3+"px",S.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=D+W-U.left+"px"),L.style.display="",L.firstChild.style.display="none",g.on("input",I)}function I(A){L&&(L.style.display="none"),g.off("input",I)}function H(){u=null,clearTimeout(u);var A=g.selection.getRange(),S=A.contains(x.row,x.column);(A.isEmpty()||!S)&&(g.selection.moveToPosition(x),g.selection.selectWord()),s="wait",F()}function P(){u=null,clearTimeout(u),g.selection.moveToPosition(x);var A=E>=2?g.selection.getLineRange(x.row):g.session.getBracketRange(x);A&&!A.isEmpty()?g.selection.setRange(A):g.selection.selectWord(),s="wait"}p.addListener(h,"contextmenu",function(A){if(C){var S=g.textInput.getElement();S.focus()}},g),p.addListener(h,"touchstart",function(A){var S=A.touches;if(u||S.length>1){clearTimeout(u),u=null,l=-1,s="zoom";return}C=g.$mouseHandler.isMousePressed=!0;var D=g.renderer.layerConfig.lineHeight,W=g.renderer.layerConfig.lineHeight,U=A.timeStamp;o=U;var K=S[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(c-te)>D&&(l=-1),a=A.clientX=Z,c=A.clientY=te,T=k=0;var he=new d(A,g);if(x=he.getDocumentPosition(),U-l<500&&S.length==1&&!w)E++,A.preventDefault(),A.button=0,P();else{E=0;var ne=g.selection.cursor,ae=g.selection.isEmpty()?ne:g.selection.anchor,ue=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=g.renderer.$cursorLayer.getPixelPosition(ae,!0),ge=g.renderer.scroller.getBoundingClientRect(),Te=g.renderer.layerConfig.offset,$e=g.renderer.scrollLeft,Ee=function(gt,at){return gt=gt/W,at=at/D-.75,gt*gt+at*at};if(A.clientX<ge.left){s="zoom";return}var Ze=Ee(A.clientX-ge.left-ue.left+$e,A.clientY-ge.top-ue.top+Te),Xe=Ee(A.clientX-ge.left-ce.left+$e,A.clientY-ge.top-ce.top+Te);Ze<3.5&&Xe<3.5&&(s=Ze>Xe?"cursor":"anchor"),Xe<3.5?s="anchor":Ze<3.5?s="cursor":s="scroll",u=setTimeout(H,450)}l=U},g),p.addListener(h,"touchend",function(A){C=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),s=="zoom"?(s="",w=0):u?(g.selection.moveToPosition(x),w=0,F()):s=="scroll"?(O(),I()):F(),clearTimeout(u),u=null},g),p.addListener(h,"touchmove",function(A){u&&(clearTimeout(u),u=null);var S=A.touches;if(!(S.length>1||s=="zoom")){var D=S[0],W=a-D.clientX,U=c-D.clientY;if(s=="wait")if(W*W+U*U>4)s="cursor";else return A.preventDefault();a=D.clientX,c=D.clientY,A.clientX=D.clientX,A.clientY=D.clientY;var K=A.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new d(A,g);te.speed=1,te.wheelX=W,te.wheelY=U,10*Math.abs(W)<Math.abs(U)&&(W=0),10*Math.abs(U)<Math.abs(W)&&(U=0),Z!=0&&(T=W/Z,k=U/Z),g._emit("mousewheel",te),te.propagationStopped||(T=k=0)}else{var he=new d(A,g),ne=he.getDocumentPosition();s=="cursor"?g.selection.moveCursorToPosition(ne):s=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},g);function O(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs(T)<.01&&(T=0),Math.abs(k)<.01&&(k=0),w<20&&(T=.9*T),w<20&&(k=.9*k);var A=g.session.getScrollTop();g.renderer.scrollBy(10*T,10*k),A==g.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,r,f){var d=n("../lib/event"),p=n("../lib/useragent"),b=n("./default_handlers").DefaultHandlers,h=n("./default_gutter_handler").GutterHandler,g=n("./mouse_event").MouseEvent,s=n("./dragdrop_handler").DragdropHandler,a=n("./touch_handler").addTouchListeners,c=n("../config"),l=function(){function o(u){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=u,new b(this),new h(this),new s(this);var w=function(T){var k=!document.hasFocus||!document.hasFocus()||!u.isFocused()&&document.activeElement==(u.textInput&&u.textInput.getElement());k&&window.focus(),u.focus(),setTimeout(function(){u.isFocused()||u.focus()})},x=u.renderer.getMouseEventTarget();d.addListener(x,"click",this.onMouseEvent.bind(this,"click"),u),d.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),u),d.addMultiMouseDownListener([x,u.renderer.scrollBarV&&u.renderer.scrollBarV.inner,u.renderer.scrollBarH&&u.renderer.scrollBarH.inner,u.textInput&&u.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",u),d.addMouseWheelListener(u.container,this.onMouseWheel.bind(this,"mousewheel"),u),a(u.container,u);var E=u.renderer.$gutter;d.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),u),d.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),u),d.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),u),d.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),u),d.addListener(x,"mousedown",w,u),d.addListener(E,"mousedown",w,u),p.isIE&&u.renderer.scrollBarV&&(d.addListener(u.renderer.scrollBarV.element,"mousedown",w,u),d.addListener(u.renderer.scrollBarH.element,"mousedown",w,u)),u.on("mousemove",function(T){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=u.renderer.screenToTextCoordinates(T.x,T.y),C=u.session.selection.getRange(),L=u.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},u)}return o.prototype.onMouseEvent=function(u,m){this.editor.session&&this.editor._emit(u,new g(m,this.editor))},o.prototype.onMouseMove=function(u,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(u,new g(m,this.editor))},o.prototype.onMouseWheel=function(u,m){var w=new g(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(u,w)},o.prototype.setState=function(u){this.state=u},o.prototype.captureMouse=function(u,m){this.x=u.x,this.y=u.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var E=this,T=function(F){if(F){if(p.isWebKit&&!F.which&&E.releaseMouse)return E.releaseMouse();E.x=F.clientX,E.y=F.clientY,m&&m(F),E.mouseEvent=new g(F,E.editor),E.$mouseMoved=!0}},k=function(F){w.off("beforeEndOperation",L),clearInterval(R),w.session&&C(),E[E.state+"End"]&&E[E.state+"End"](F),E.state="",E.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,F&&E.onMouseEvent("mouseup",F),w.endOperation()},C=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1};if(p.isOldIE&&u.domEvent.type=="dblclick")return setTimeout(function(){k(u)});var L=function(F){E.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};w.on("beforeEndOperation",L),w.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=T,E.releaseMouse=d.capture(this.editor.container,T,k);var R=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var u=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",u),m&&m.domEvent&&d.stopEvent(m.domEvent))}).bind(this);setTimeout(u,10),this.editor.on("nativecontextmenu",u)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();l.prototype.releaseMouse=null,c.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,f){var d=n("../lib/dom"),p=function(){function b(h){h.on("click",function(g){var s=g.getDocumentPosition(),a=h.session,c=a.getFoldAt(s.row,s.column,1);c&&(g.getAccelKey()?a.removeFold(c):a.expandFold(c),g.stop());var l=g.domEvent&&g.domEvent.target;l&&d.hasCssClass(l,"ace_inline_button")&&d.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var a=g.getDocumentPosition().row,c=h.session;c.foldWidgets&&c.foldWidgets[a]&&h.session.onFoldWidgetClick(a,g),h.isFocused()||h.focus(),g.stop()}}),h.on("gutterdblclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var a=g.getDocumentPosition().row,c=h.session,l=c.getParentFoldRangeData(a,!0),o=l.range||l.firstRange;if(o){a=o.start.row;var u=c.getFoldAt(a,c.getLine(a).length,1);u?c.removeFold(u):(c.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,f){var d=n("../lib/keys"),p=n("../lib/event"),b=function(){function h(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return h.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},h.prototype.setKeyboardHandler=function(g){var s=this.$handlers;if(s[s.length-1]!=g){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(g,1)}},h.prototype.addKeyboardHandler=function(g,s){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var a=this.$handlers.indexOf(g);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(g):this.$handlers.splice(s,0,g),a==-1&&g.attach&&g.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(g){var s=this.$handlers.indexOf(g);return s==-1?!1:(this.$handlers.splice(s,1),g.detach&&g.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var g=this.$data,s=g.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,g)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(g,s,a,c){for(var l,o=!1,u=this.$editor.commands,m=this.$handlers.length;m--&&(l=this.$handlers[m].handleKeyboard(this.$data,g,s,a,c),!(!(!l||!l.command)&&(l.command=="null"?o=!0:o=u.exec(l.command,this.$editor,l.args,c),o&&c&&g!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&p.stopEvent(c),o))););return!o&&g==-1&&(l={command:"insertstring"},o=u.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),o},h.prototype.onCommandKey=function(g,s,a){var c=d.keyCodeToString(a);return this.$callKeyboardHandlers(s,c,a,g)},h.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},h}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,f){var d=0,p=0,b=!1,h=!1,g=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],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]],c=0,l=1,o=0,u=1,m=2,w=3,x=4,E=5,T=6,k=7,C=8,L=9,R=10,F=11,I=12,H=13,P=14,O=15,A=16,S=17,D=18,W=[D,D,D,D,D,D,D,D,D,T,E,T,C,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,E,E,E,T,C,x,x,F,F,F,x,x,x,x,x,R,L,R,L,L,m,m,m,m,m,m,m,m,m,m,L,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,D,D,D,D,D,D,E,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,L,x,F,F,F,F,x,x,x,x,o,x,x,D,x,x,F,F,m,m,x,o,x,x,x,m,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,o,u,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,E,H,P,O,A,S,L,F,F,F,F,F,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function K(ne,ae,ue,ce){var ge=d?a:s,Te=null,$e=null,Ee=null,Ze=0,Xe=null,gt=null,at=-1,mt=null,sn=null,bn=[];if(!ce)for(mt=0,ce=[];mt<ue;mt++)ce[mt]=he(ne[mt]);for(p=d,b=!1,h=!1,g=!1,sn=0;sn<ue;sn++){if(Te=Ze,bn[sn]=$e=te(ne,ce,bn,sn),Ze=ge[Te][$e],Xe=Ze&240,Ze&=15,ae[sn]=Ee=ge[Ze][5],Xe>0)if(Xe==16){for(mt=at;mt<sn;mt++)ae[mt]=1;at=-1}else at=-1;if(gt=ge[Ze][6],gt)at==-1&&(at=sn);else if(at>-1){for(mt=at;mt<sn;mt++)ae[mt]=Ee;at=-1}ce[sn]==E&&(ae[sn]=0),p|=Ee}if(g){for(mt=0;mt<ue;mt++)if(ce[mt]==T){ae[mt]=d;for(var Jt=mt-1;Jt>=0&&ce[Jt]==C;Jt--)ae[Jt]=d}}}function Z(ne,ae,ue){if(!(p<ne)){if(ne==1&&d==l&&!h){ue.reverse();return}for(var ce=ue.length,ge=0,Te,$e,Ee,Ze;ge<ce;){if(ae[ge]>=ne){for(Te=ge+1;Te<ce&&ae[Te]>=ne;)Te++;for($e=ge,Ee=Te-1;$e<Ee;$e++,Ee--)Ze=ue[$e],ue[$e]=ue[Ee],ue[Ee]=Ze;ge=Te}ge++}}}function te(ne,ae,ue,ce){var ge=ae[ce],Te,$e,Ee,Ze;switch(ge){case o:case u:b=!1;case x:case w:return ge;case m:return b?w:m;case k:return b=!0,u;case C:return x;case L:return ce<1||ce+1>=ae.length||(Te=ue[ce-1])!=m&&Te!=w||($e=ae[ce+1])!=m&&$e!=w?x:(b&&($e=w),$e==Te?$e:x);case R:return Te=ce>0?ue[ce-1]:E,Te==m&&ce+1<ae.length&&ae[ce+1]==m?m:x;case F:if(ce>0&&ue[ce-1]==m)return m;if(b)return x;for(Ze=ce+1,Ee=ae.length;Ze<Ee&&ae[Ze]==F;)Ze++;return Ze<Ee&&ae[Ze]==m?m:x;case I:for(Ee=ae.length,Ze=ce+1;Ze<Ee&&ae[Ze]==I;)Ze++;if(Ze<Ee){var Xe=ne[ce],gt=Xe>=1425&&Xe<=2303||Xe==64286;if(Te=ae[Ze],gt&&(Te==u||Te==k))return u}return ce<1||(Te=ae[ce-1])==E?x:ue[ce-1];case E:return b=!1,h=!0,d;case T:return g=!0,x;case H:case P:case A:case S:case O:b=!1;case D:return x}}function he(ne){var ae=ne.charCodeAt(0),ue=ae>>8;return ue==0?ae>191?o:W[ae]:ue==5?/[\u0591-\u05f4]/.test(ne)?u:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?m:k:ue==32&&ae<=8287?U[ae&255]:ue==254&&ae>=65136?k:x}r.L=o,r.R=u,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ae,ue){if(ne.length<2)return{};var ce=ne.split(""),ge=new Array(ce.length),Te=new Array(ce.length),$e=[];d=ue?l:c,K(ce,$e,ce.length,ae);for(var Ee=0;Ee<ge.length;ge[Ee]=Ee,Ee++);Z(2,$e,ge),Z(1,$e,ge);for(var Ee=0;Ee<ge.length-1;Ee++)ae[Ee]===w?$e[Ee]=r.AN:$e[Ee]===u&&(ae[Ee]>k&&ae[Ee]<H||ae[Ee]===x||ae[Ee]===D)?$e[Ee]=r.ON_R:Ee>0&&ce[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Ee])&&($e[Ee-1]=$e[Ee]=r.R_H,Ee++);ce[ce.length-1]===r.DOT&&($e[ce.length-1]=r.B),ce[0]==="‫"&&($e[0]=r.RLE);for(var Ee=0;Ee<ge.length;Ee++)Te[Ee]=$e[ge[Ee]];return{logicalFromVisual:ge,bidiLevels:Te}},r.hasBidiCharacters=function(ne,ae){for(var ue=!1,ce=0;ce<ne.length;ce++)ae[ce]=he(ne.charAt(ce)),!ue&&(ae[ce]==u||ae[ce]==k||ae[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,ae){for(var ue=0;ue<ae.logicalFromVisual.length;ue++)if(ae.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,f){var d=n("./lib/bidiutil"),p=n("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function g(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=d,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 g.prototype.isBidiRow=function(s,a,c){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&b.test(s.lines.join(`
179
+ `))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var s=0,a=this.session.$screenRowCache;if(a.length){var c=this.session.$getRowCacheIndex(a,this.currentRow);c>=0&&(s=this.session.$docRowCache[c])}return s},g.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var c,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(c=this.session.$getRowCacheIndex(a,this.currentRow-s-1),c===l);)l=c,s++;else s=this.currentRow;return s},g.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var c=s===this.session.getLength()-1,l=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[s];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?l:d.DOT))}else this.line+=this.showInvisibles?l:d.DOT;var u=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,E){return x===" "||u.isFullWidth(x.charCodeAt(0))?(w=x===" "?u.getScreenTabSize(E+m):2,m+=w-1,p.stringRepeat(d.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==d.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var s=[];d.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=d.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,c=s.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=a,this.charWidths[d.R]=this.charWidths[d.AN]=c,this.charWidths[d.R_H]=c*.45,this.charWidths[d.B]=this.charWidths[d.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},g.prototype.setEolChar=function(s){this.EOL=s},g.prototype.setContentWidth=function(s){this.contentWidth=s},g.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(s,a){for(var c=s.getCursorPosition(),l=s.selection.getSelectionAnchor().row;l<=c.row;l++)!a&&s.session.getLine(l).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(l,0,1):a&&s.session.getLine(l).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:l},s.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,c=s>a?this.session.getOverwrite()?s:s-1:a,l=d.getVisualFromLogicalIdx(c,this.bidiMap),o=this.bidiMap.bidiLevels,u=0;!this.session.getOverwrite()&&s<=a&&o[l]%2!==0&&l++;for(var m=0;m<l;m++)u+=this.charWidths[o[m]];return!this.session.getOverwrite()&&s>a&&o[l]%2===0&&(u+=this.charWidths[o[l]]),this.wrapIndent&&(u+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(u+=this.rtlLineOffset),u},g.prototype.getSelections=function(s,a){var c=this.bidiMap,l=c.bidiLevels,o,u=[],m=0,w=Math.min(s,a)-this.wrapIndent,x=Math.max(s,a)-this.wrapIndent,E=!1,T=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,L=0;L<l.length;L++)C=c.logicalFromVisual[L],o=l[L],E=C>=w&&C<x,E&&!T?k=m:!E&&T&&u.push({left:k,width:m-k}),m+=this.charWidths[o],T=E;if(E&&L===l.length&&u.push({left:k,width:m-k}),this.isRtlDir)for(var R=0;R<u.length;R++)u[R].left+=this.rtlLineOffset;return u},g.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var a=0,c=Math.max(c,0),l=0,o=0,u=this.bidiMap.bidiLevels,m=this.charWidths[u[o]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>l+m/2;){if(l+=m,o===u.length-1){m=0;break}m=this.charWidths[u[++o]]}return o>0&&u[o-1]%2!==0&&u[o]%2===0?(c<l&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&u[o-1]%2===0&&u[o]%2!==0?a=1+(c>l?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===u.length-1&&m===0&&u[o-1]%2===0||!this.isRtlDir&&o===0&&u[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&u[o-1]%2!==0&&m!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},g}();r.BidiHandler=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,f){var d=n("./lib/oop"),p=n("./lib/lang"),b=n("./lib/event_emitter").EventEmitter,h=n("./range").Range,g=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 c=this;this.cursor.on("change",function(l){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._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,c){this.$isEmpty=!1,this.anchor.setPosition(a,c)},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,c=this.lead;return a.row>c.row||a.row==c.row&&a.column>c.column},s.prototype.getRange=function(){var a=this.anchor,c=this.lead;return this.$isEmpty?h.fromPoints(c,c):this.isBackwards()?h.fromPoints(c,a):h.fromPoints(a,c)},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,c){var l=c?a.end:a.start,o=c?a.start:a.end;this.$setSelection(l.row,l.column,o.row,o.column)},s.prototype.$setSelection=function(a,c,l,o){if(!this.$silent){var u=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,c),this.cursor.setPosition(l,o),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||u!=this.$isEmpty||m)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),a.call(this)},s.prototype.selectTo=function(a,c){this.$moveSelection(function(){this.moveCursorTo(a,c)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,c){this.clearSelection(),this.moveCursorTo(a,c)},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,c){if(typeof c>"u"){var l=a||this.lead;a=l.row,c=l.column}return this.session.getWordRange(a,c)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),c=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(c)},s.prototype.getLineRange=function(a,c){var l=typeof a=="number"?a:this.lead.row,o,u=this.session.getFoldLine(l);return u?(l=u.start.row,o=u.end.row):o=l,c===!0?new h(l,0,o,this.session.getLine(o).length):new h(l,0,o+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(a,c,l){var o=a.column,u=a.column+c;return l<0&&(o=a.column-c,u=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,u).split(" ").length-1==c},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(c.end.row,c.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 l=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,l,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,l):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,c=this.lead.column,l=this.session.documentToScreenRow(a,c),o=this.session.screenToDocumentPosition(l,0),u=this.session.getDisplayLine(a,null,o.row,o.column),m=u.match(/^\s*/);m[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,c=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==c.column){var l=this.session.getLine(c.row);if(c.column==l.length){var o=l.search(/\s+$/);o>0&&(c.column=o)}}this.moveCursorTo(c.row,c.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,c=this.doc.getLine(a).length;this.moveCursorTo(a,c)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,c=this.lead.column,l=this.doc.getLine(a),o=l.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var u=this.session.getFoldAt(a,c,1);if(u){this.moveCursorTo(u.end.row,u.end.column);return}if(this.session.nonTokenRe.exec(o)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=l.substring(c)),c>=l.length){this.moveCursorTo(a,l.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,c=this.lead.column,l;if(l=this.session.getFoldAt(a,c,-1)){this.moveCursorTo(l.start.row,l.start.column);return}var o=this.session.getFoldStringAt(a,c,-1);o==null&&(o=this.doc.getLine(a).substring(0,c));var u=p.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(u)&&(c-=this.session.nonTokenRe.lastIndex,u=u.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(u)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},s.prototype.$shortWordEndIndex=function(a){var c=0,l,o=/\s/,u=this.session.tokenRe;if(u.lastIndex=0,this.session.tokenRe.exec(a))c=this.session.tokenRe.lastIndex;else{for(;(l=a[c])&&o.test(l);)c++;if(c<1){for(u.lastIndex=0;(l=a[c])&&!u.test(l);)if(u.lastIndex=0,c++,o.test(l))if(c>2){c--;break}else{for(;(l=a[c])&&o.test(l);)c++;if(c>2)break}}}return u.lastIndex=0,c},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,c=this.lead.column,l=this.doc.getLine(a),o=l.substring(c),u=this.session.getFoldAt(a,c,1);if(u)return this.moveCursorTo(u.end.row,u.end.column);if(c==l.length){var m=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),c=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(a,c+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,c=this.lead.column,l;if(l=this.session.getFoldAt(a,c,-1))return this.moveCursorTo(l.start.row,l.start.column);var o=this.session.getLine(a).substring(0,c);if(c===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));c=o.length,/\s+$/.test(o)||(o="")}var u=p.stringReverse(o),m=this.$shortWordEndIndex(u);return this.moveCursorTo(a,c-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,c){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(c===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var u=this.session.lineWidgets[this.lead.row];a<0?a-=u.rowsAbove||0:a>0&&(a+=u.rowCount-(u.rowsAbove||0))}var m=this.session.screenToDocumentPosition(l.row+a,l.column,o);a!==0&&c===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+c,c===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,c,l){var o=this.session.getFoldAt(a,c,1);o&&(a=o.start.row,c=o.start.column),this.$keepDesiredColumnOnChange=!0;var u=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(u.charAt(c))&&u.charAt(c-1)&&(this.lead.row==a&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(a,c),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,c,l){var o=this.session.screenToDocumentPosition(a,c);this.moveCursorTo(o.row,o.column,l)},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 c=this.getRange();return a?(a.start.column=c.start.column,a.start.row=c.start.row,a.end.column=c.end.column,a.end.row=c.end.row):a=c,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var c=this.getCursor();try{a(this);var l=this.getCursor();return h.fromPoints(c,l)}catch{return h.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(c){var l=c.clone();return l.isBackwards=c.cursor==c.start,l});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 c=a.length;c--;){var l=h.fromPoints(a[c].start,a[c].end);a[c].isBackwards&&(l.cursor=l.start),this.addRange(l,!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 c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(a[c]))return!1;return!0},s}();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,d.implement(g.prototype,b),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,f){var d=n("./lib/report_error").reportError,p=2e3,b=function(){function h(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],c=[],l=0,o=this.matchMappings[s]={defaultToken:"text"},u="g",m=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&u.indexOf("i")===-1&&(u+="i"),x.unicode&&u.indexOf("u")===-1&&(u+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var E=x.regex,T=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||T==1?x.token=x.token[0]:T-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:T-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(T>1?x.onMatch=this.$applyToken:x.onMatch=x.token),T>1&&(/\\\d/.test(x.regex)?E=x.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+l+1)}):(T=1,E=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),o[l]=w,l+=T,c.push(E),x.onMatch||(x.onMatch=null)}}c.length||(o[0]=0,c.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,u)},this),this.regExps[s]=new RegExp("("+c.join(")|(")+")|($)",u)}}return h.prototype.$setMaxTokenCount=function(g){p=g|0},h.prototype.$applyToken=function(g){var s=this.splitRegex.exec(g).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:g}];for(var c=[],l=0,o=a.length;l<o;l++)s[l]&&(c[c.length]={type:a[l],value:s[l]});return c},h.prototype.$arrayTokens=function(g){if(!g)return[];var s=this.splitRegex.exec(g);if(!s)return"text";for(var a=[],c=this.tokenArray,l=0,o=c.length;l<o;l++)s[l+1]&&(a[a.length]={type:c[l],value:s[l+1]});return a},h.prototype.removeCapturingGroups=function(g){var s=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,c){return c?"(?:":a});return s},h.prototype.createSplitterRegexp=function(g,s){if(g.indexOf("(?=")!=-1){var a=0,c=!1,l={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,u,m,w,x,E){return c?c=x!="]":x?c=!0:w?(a==l.stack&&(l.end=E+1,l.stack=-1),a--):m&&(a++,m.length!=1&&(l.stack=a,l.start=E)),o}),l.end!=null&&/^\)*$/.test(g.substr(l.end))&&(g=g.substring(0,l.start)+g.substr(l.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(s||"").replace("g",""))},h.prototype.getLineTokens=function(g,s){if(s&&typeof s!="string"){var a=s.slice(0);s=a[0],s==="#tmp"&&(a.shift(),s=a.shift())}else var a=[];var c=s||"start",l=this.states[c];l||(c="start",l=this.states[c]);var o=this.matchMappings[c],u=this.regExps[c];u.lastIndex=0;for(var m,w=[],x=0,E=0,T={type:null,value:""};m=u.exec(g);){var k=o.defaultToken,C=null,L=m[0],R=u.lastIndex;if(R-L.length>x){var F=g.substring(x,R-L.length);T.type==k?T.value+=F:(T.type&&w.push(T),T={type:k,value:F})}for(var I=0;I<m.length-2;I++)if(m[I+1]!==void 0){C=l[o[I]],C.onMatch?k=C.onMatch(L,c,a,g):k=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,a),l=this.states[c],l||(this.reportError("state doesn't exist",c),c="start",l=this.states[c]),o=this.matchMappings[c],x=R,u=this.regExps[c],u.lastIndex=R),C.consumeLineEnd&&(x=R);break}if(L){if(typeof k=="string")(!C||C.merge!==!1)&&T.type===k?T.value+=L:(T.type&&w.push(T),T={type:k,value:L});else if(k){T.type&&w.push(T),T={type:null,value:""};for(var I=0;I<k.length;I++)w.push(k[I])}}if(x==g.length)break;if(x=R,E++>p){for(E>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:g});x<g.length;)T.type&&w.push(T),T={value:g.substring(x,x+=500),type:"overflow"};c="start",a=[];break}}return T.type&&w.push(T),a.length>1&&a[0]!==c&&a.unshift("#tmp",c),{tokens:w,state:a.length?a:c}},h}();b.prototype.reportError=d,r.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){var d=n("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,s){if(!s){for(var a in g)this.$rules[a]=g[a];return}for(var a in g){for(var c=g[a],l=0;l<c.length;l++){var o=c[l];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(s)!==0&&(o.next=s+o.next),o.nextState&&o.nextState.indexOf(s)!==0&&(o.nextState=s+o.nextState))}this.$rules[s+a]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(g,s,a,c,l){var o=typeof g=="function"?new g().getRules():g;if(c)for(var u=0;u<c.length;u++)c[u]=s+c[u];else{c=[];for(var m in o)c.push(s+m)}if(this.addRules(o,s),a)for(var w=Array.prototype[l?"push":"unshift"],u=0;u<c.length;u++)w.apply(this.$rules[c[u]],d(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var b=function(g,s){return(g!="start"||s.length)&&s.unshift(this.nextState,g),this.nextState},h=function(g,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var g=0,s=this.$rules;function a(c){var l=s[c];l.processed=!0;for(var o=0;o<l.length;o++){var u=l[o],m=null;Array.isArray(u)&&(m=u,u={}),!u.regex&&u.start&&(u.regex=u.start,u.next||(u.next=[]),u.next.push({defaultToken:u.token},{token:u.token+".end",regex:u.end||u.start,next:"pop"}),u.token=u.token+".start",u.push=!0);var w=u.next||u.push;if(w&&Array.isArray(w)){var x=u.stateName;x||(x=u.token,typeof x!="string"&&(x=x[0]||""),s[x]&&(x+=g++)),s[x]=w,u.next=x,a(x)}else w=="pop"&&(u.next=h);if(u.push&&(u.nextState=u.next||u.push,u.next=b,delete u.push),u.rules)for(var E in u.rules)s[E]?s[E].push&&s[E].push.apply(s[E],u.rules[E]):s[E]=u.rules[E];var T=typeof u=="string"?u:u.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?m=T.map(function(C){return s[C]}):m=s[T]),m){var k=[o,1].concat(m);u.noEscape&&(k=k.filter(function(C){return!C.next})),l.splice.apply(l,k),o--}u.keywordMap&&(u.token=this.createKeywordMapper(u.keywordMap,u.defaultToken||"text",u.caseInsensitive),delete u.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(g,s,a,c){var l=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(o){for(var u=g[o],m=u.split(c||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),l[x]=o}},this),g=null,a?function(o){return l[o.toLowerCase()]||s}:function(o){return l[o]||s}},this.getKeywords=function(){return this.$keywords}}).call(p.prototype),r.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,f){var d;d=function(){this.$behaviours={}},(function(){this.add=function(p,b,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][b]=h},this.addBehaviours=function(p){for(var b in p)for(var h in p[b])this.add(b,h,p[b][h])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,b){if(typeof p=="function")var h=new p().getBehaviours(b);else var h=p.getBehaviours(b);this.addBehaviours(h)},this.getBehaviours=function(p){if(p){for(var b={},h=0;h<p.length;h++)this.$behaviours[p[h]]&&(b[p[h]]=this.$behaviours[p[h]]);return b}else return this.$behaviours}}).call(d.prototype),r.Behaviour=d}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,f){var d=n("./range").Range,p=function(){function b(h,g,s){this.$session=h,this.$row=g,this.$rowTokens=h.getTokens(g);var a=h.getTokenAt(g,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,g=this.$tokenIndex,s=h[g].start;if(s!==void 0)return s;for(s=0;g>0;)g-=1,s+=h[g].value.length;return s},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new d(this.$row,g,this.$row,g+h.value.length)},b}();r.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,f){var d=n("../../lib/oop"),p=n("../behaviour").Behaviour,b=n("../../token_iterator").TokenIterator,h=n("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,c={},l={'"':'"',"'":"'"},o=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,c.rangeCount!=w.multiSelect.rangeCount&&(c={rangeCount:w.multiSelect.rangeCount})),c[x])return a=c[x];a=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(w,x,E,T){var k=w.end.row-w.start.row;return{text:E+x+T,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,E,T,k,C){var L=T.getCursorPosition(),R=k.doc.getLine(L.row);if(C=="{"){o(T);var F=T.getSelectionRange(),I=k.doc.getTextRange(F),H=k.getTokenAt(L.row,L.column);if(I!==""&&I!=="{"&&T.getWrapBehavioursEnabled())return u(F,I,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[L.column-H.start-1]!=="$"?void 0:(m.recordAutoInsert(T,k,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(T,k))return/[\]\}\)]/.test(R[L.column])||T.inMultiSelectMode||w.braces?(m.recordAutoInsert(T,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(T,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(T);var O=R.substring(L.column,L.column+1);if(O=="}"){var A=k.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(A!==null&&m.isAutoInsertedClosing(L,R,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
180
+ `||C==`\r
181
+ `){o(T);var S="";m.isMaybeInsertedClosing(L,R)&&(S=h.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var O=R.substring(L.column,L.column+1);if(O==="}"){var D=k.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!D)return null;var W=this.$getIndent(k.getLine(D.row))}else if(S)var W=this.$getIndent(R);else{m.clearMaybeInsertedClosing();return}var U=W+k.getTabString();return{text:`
182
+ `+U+`
183
+ `+W+S,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,E,T,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="{"){o(T);var R=k.doc.getLine(C.start.row),F=R.substring(C.end.column,C.end.column+1);if(F=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,E,T,k,C){if(C=="("){o(T);var L=T.getSelectionRange(),R=k.doc.getTextRange(L);if(R!==""&&T.getWrapBehavioursEnabled())return u(L,R,"(",")");if(m.isSaneInsertion(T,k))return m.recordAutoInsert(T,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){o(T);var F=T.getCursorPosition(),I=k.doc.getLine(F.row),H=I.substring(F.column,F.column+1);if(H==")"){var P=k.$findOpeningBracket(")",{column:F.column+1,row:F.row});if(P!==null&&m.isAutoInsertedClosing(F,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,E,T,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="("){o(T);var R=k.doc.getLine(C.start.row),F=R.substring(C.start.column+1,C.start.column+2);if(F==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,E,T,k,C){if(C=="["){o(T);var L=T.getSelectionRange(),R=k.doc.getTextRange(L);if(R!==""&&T.getWrapBehavioursEnabled())return u(L,R,"[","]");if(m.isSaneInsertion(T,k))return m.recordAutoInsert(T,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o(T);var F=T.getCursorPosition(),I=k.doc.getLine(F.row),H=I.substring(F.column,F.column+1);if(H=="]"){var P=k.$findOpeningBracket("]",{column:F.column+1,row:F.row});if(P!==null&&m.isAutoInsertedClosing(F,I,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,E,T,k,C){var L=k.doc.getTextRange(C);if(!C.isMultiLine()&&L=="["){o(T);var R=k.doc.getLine(C.start.row),F=R.substring(C.start.column+1,C.start.column+2);if(F=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,E,T,k,C){var L=k.$mode.$quotes||l;if(C.length==1&&L[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o(T);var R=C,F=T.getSelectionRange(),I=k.doc.getTextRange(F);if(I!==""&&(I.length!=1||!L[I])&&T.getWrapBehavioursEnabled())return u(F,I,R,R);if(!I){var H=T.getCursorPosition(),P=k.doc.getLine(H.row),O=P.substring(H.column-1,H.column),A=P.substring(H.column,H.column+1),S=k.getTokenAt(H.row,H.column),D=k.getTokenAt(H.row,H.column+1);if(O=="\\"&&S&&/escape/.test(S.type))return null;var W=S&&/string|escape/.test(S.type),U=!D||/string|escape/.test(D.type),K;if(A==R)K=W!==U,K&&/string\.end/.test(D.type)&&(K=!1);else{if(W&&!U||W&&U)return null;var Z=k.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(O);Z.lastIndex=0;var he=Z.test(A),ne=k.$mode.$pairQuotesAfter,ae=ne&&ne[R]&&ne[R].test(O);if(!ae&&te||he||A&&!/[\s;,.})\]\\]/.test(A))return null;var ue=P[H.column-2];if(O==R&&(ue==R||Z.test(ue)))return null;K=!0}return{text:K?R+R:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,E,T,k,C){var L=k.$mode.$quotes||l,R=k.doc.getTextRange(C);if(!C.isMultiLine()&&L.hasOwnProperty(R)){o(T);var F=k.doc.getLine(C.start.row),I=F.substring(C.start.column+1,C.start.column+2);if(I==R)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,E,T,k,C){if(x==="doc-start"&&(C===`
184
+ `||C===`\r
185
+ `)&&T.selection.isEmpty()){var L=T.getCursorPosition();if(L.column===0)return;for(var R=k.doc.getLine(L.row),F=k.doc.getLine(L.row+1),I=k.getTokens(L.row),H=0,P=0;P<I.length;P++){H+=I[P].value.length;var O=I[P];if(H>=L.column){if(H===L.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var A=I[P+1];if(!A||!/\.doc/.test(A.type))return}}var S=L.column-(H-O.value.length),D=O.value.indexOf("*/"),W=O.value.indexOf("/**",D>-1?D+2:0);if(W!==-1&&S>W&&S<W+3||D!==-1&&W!==-1&&S>=D&&S<=W||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(R);if(/\s*\*/.test(F))return/^\s*\*/.test(R)?{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(R.substring(0,L.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(w,x){var E=w.getCursorPosition(),T=new b(x,E.row,E.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",g)){if(/[)}\]]/.test(w.session.getLine(E.row)[E.column]))return!0;var k=new b(x,E.row,E.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",g))return!1}return T.stepForward(),T.getCurrentTokenRow()!==E.row||this.$matchTokenType(T.getCurrentToken()||"text",s)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,E){var T=w.getCursorPosition(),k=x.doc.getLine(T.row);this.isAutoInsertedClosing(T,k,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=T.row,a.autoInsertedLineEnd=E+k.substr(T.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,E){var T=w.getCursorPosition(),k=x.doc.getLine(T.row);this.isMaybeInsertedClosing(T,k)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=T.row,a.maybeInsertedLineStart=k.substr(0,T.column)+E,a.maybeInsertedLineEnd=k.substr(T.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,E){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&E===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)},d.inherits(m,p),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,f){for(var d=[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],p=0,b=[],h=0;h<d.length;h+=2)b.push(p+=d[h]),d[h+1]&&b.push(45,p+=d[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(n,r,f){var d=n("../config"),p=n("../tokenizer").Tokenizer,b=n("./text_highlight_rules").TextHighlightRules,h=n("./behaviour/cstyle").CstyleBehaviour,g=n("../unicode"),s=n("../lib/lang"),a=n("../token_iterator").TokenIterator,c=n("../range").Range,l;l=function(){this.HighlightRules=b},(function(){this.$defaultBehaviour=new h,this.tokenRe=new RegExp("^["+g.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new p(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,u,m,w){var x=u.doc,E=!0,T=!0,k=1/0,C=u.getTabSize(),L=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var R=this.lineCommentStart.map(s.escapeRegExp).join("|"),F=this.lineCommentStart[0];else var R=s.escapeRegExp(this.lineCommentStart),F=this.lineCommentStart;R=new RegExp("^(\\s*)(?:"+R+") ?"),L=u.getUseSoftTabs();var I=function(K,Z){var te=K.match(R);if(te){var he=te[1].length,ne=te[0].length;!A(K,he,ne)&&te[0][ne-1]==" "&&ne--,x.removeInLine(Z,he,ne)}},H=F+" ",P=function(K,Z){(!E||/\S/.test(K))&&(A(K,k,k)?x.insertInLine({row:Z,column:k},H):x.insertInLine({row:Z,column:k},F))},O=function(K,Z){return R.test(K)},A=function(K,Z,te){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;K.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var F=this.blockComment.start,S=this.blockComment.end,R=new RegExp("^(\\s*)(?:"+s.escapeRegExp(F)+")"),D=new RegExp("(?:"+s.escapeRegExp(S)+")\\s*$"),P=function(ae,ue){O(ae,ue)||(!E||/\S/.test(ae))&&(x.insertInLine({row:ue,column:ae.length},S),x.insertInLine({row:ue,column:k},F))},I=function(ae,ue){var ce;(ce=ae.match(D))&&x.removeInLine(ue,ae.length-ce[0].length,ae.length),(ce=ae.match(R))&&x.removeInLine(ue,ce[1].length,ce[0].length)},O=function(ae,ue){if(R.test(ae))return!0;for(var ce=u.getTokens(ue),ge=0;ge<ce.length;ge++)if(ce[ge].type==="comment")return!0}}function W(K){for(var Z=m;Z<=w;Z++)K(x.getLine(Z),Z)}var U=1/0;W(function(K,Z){var te=K.search(/\S/);te!==-1?(te<k&&(k=te),T&&!O(K,Z)&&(T=!1)):U>K.length&&(U=K.length)}),k==1/0&&(k=U,E=!1,T=!1),L&&k%C!=0&&(k=Math.floor(k/C)*C),W(T?I:P)},this.toggleBlockComment=function(o,u,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var E=new a(u,w.row,w.column),T=E.getCurrentToken();u.selection;var k=u.selection.toOrientedRange(),C,L;if(T&&/comment/.test(T.type)){for(var R,F;T&&/comment/.test(T.type);){var I=T.value.indexOf(x.start);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;R=new c(H,P,H,P+x.start.length);break}T=E.stepBackward()}for(var E=new a(u,w.row,w.column),T=E.getCurrentToken();T&&/comment/.test(T.type);){var I=T.value.indexOf(x.end);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;F=new c(H,P,H,P+x.end.length);break}T=E.stepForward()}F&&u.remove(F),R&&(u.remove(R),C=R.start.row,L=-x.start.length)}else L=x.start.length,C=m.start.row,u.insert(m.end,x.end),u.insert(m.start,x.start);k.start.row==C&&(k.start.column+=L),k.end.row==C&&(k.end.column+=L),u.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(o,u,m){return this.$getIndent(u)},this.checkOutdent=function(o,u,m){return!1},this.autoOutdent=function(o,u,m){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var u in o)if(o[u]){var m=o[u],w=m.prototype.$id,x=d.$modes[w];x||(d.$modes[w]=x=new m),d.$modes[u]||(d.$modes[u]=x),this.$embeds.push(u),this.$modes[u]=x}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(L){(function(R){var F=E[L],I=R[F];R[E[L]]=function(){return this.$delegator(F,arguments,I)}})(k)},k=this,u=0;u<E.length;u++)T(u)},this.$delegator=function(o,u,m){var w=u[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],E=this.$modes[x];if(E)return E[o].apply(E,[w[1]].concat([].slice.call(u,1)))}w=w[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var k=w.split(this.$embeds[T]);if(!k[0]&&k[1]){u[0]=k[1];var E=this.$modes[this.$embeds[T]];return E[o].apply(E,u)}}var C=m.apply(this,u);return m?C:void 0},this.transformAction=function(o,u,m,w,x){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var T in E)if(E[T][u]){var k=E[T][u].apply(this,arguments);if(k)return k}}},this.getKeywords=function(o){if(!this.completionKeywords){var u=this.$tokenizer.rules,m=[];for(var w in u)for(var x=u[w],E=0,T=x.length;E<T;E++)if(typeof x[E].token=="string")/keyword|support|storage/.test(x[E].token)&&m.push(x[E].regex);else if(typeof x[E].token=="object"){for(var k=0,C=x[E].token.length;k<C;k++)if(/keyword|support|storage/.test(x[E].token[k])){var w=x[E].regex.match(/\(.+?\)/g)[k];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return o?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,u,m,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),r.Mode=l}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,f){var d=n("./lib/dom"),p=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 g;return this.lineWidgets?g=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[h]?1+g:this.$wrapData[h].length+1+g},b.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(h+=g.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 g=this.editor;if(g){this.editor=null,g.widgetManager=null,g.renderer.off("beforeRender",this.measureWidgets),g.renderer.off("afterRender",this.renderWidgets);var s=this.session.lineWidgets;s&&s.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},b.prototype.updateOnFold=function(h,g){var s=g.lineWidgets;if(!(!s||!h.action)){for(var a=h.data,c=a.start.row,l=a.end.row,o=h.action=="add",u=c+1;u<l;u++)s[u]&&(s[u].hidden=o);s[l]&&(o?s[c]?s[l].hidden=o:s[c]=s[l]:(s[c]==s[l]&&(s[c]=void 0),s[l].hidden=o))}},b.prototype.updateOnChange=function(h){var g=this.session.lineWidgets;if(g){var s=h.start.row,a=h.end.row-s;if(a!==0)if(h.action=="remove"){var c=g.splice(s+1,a);!g[s]&&c[c.length-1]&&(g[s]=c.pop()),c.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var l=new Array(a);g[s]&&g[s].column!=null&&h.start.column>g[s].column&&s++,l.unshift(s,0),g.splice.apply(g,l),this.$updateRows()}}},b.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var g=!0;h.forEach(function(s,a){if(s)for(g=!1,s.row=a;s.$oldWidget;)s.$oldWidget.row=a,s=s.$oldWidget}),g&&(this.session.lineWidgets=null)}},b.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[h.row];return g&&(h.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[h.row]=h,h},b.prototype.addLineWidget=function(h){if(this.$registerLineWidget(h),h.session=this.session,!this.editor)return h;var g=this.editor.renderer;h.html&&!h.el&&(h.el=d.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=d.createElement("div"),h.el.textContent=h.text),h.el&&(d.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&d.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",g.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex="3"),h.pixelHeight==null&&(h.pixelHeight=h.el.offsetHeight)),h.rowCount==null&&(h.rowCount=h.pixelHeight/g.layerConfig.lineHeight);var s=this.session.getFoldAt(h.row,0);if(h.$fold=s,s){var 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,g),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 g=this.session.lineWidgets[h.row];if(g==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;g;){if(g.$oldWidget==h){g.$oldWidget=h.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},b.prototype.getWidgetsAtRow=function(h){for(var g=this.session.lineWidgets,s=g&&g[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,g){var s=this.session._changedWidgets,a=g.layerConfig;if(!(!s||!s.length)){for(var c=1/0,l=0;l<s.length;l++){var o=s[l];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,g.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/a.characterWidth));var u=o.h/a.lineHeight;o.coverLine&&(u-=this.session.getRowLineCount(o.row),u<0&&(u=0)),o.rowCount!=u&&(o.rowCount=u,o.row<c&&(c=o.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},b.prototype.renderWidgets=function(h,g){var s=g.layerConfig,a=this.session.lineWidgets;if(a){for(var c=Math.min(this.firstRow,s.firstRow),l=Math.max(this.lastRow,s.lastRow,a.length);c>0&&!a[c];)c--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,g.$cursorLayer.config=s;for(var o=c;o<=l;o++){var u=a[o];if(!(!u||!u.el)){if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,g.container.appendChild(u.el));var m=g.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(m+=s.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=m-s.offset+"px";var w=u.coverGutter?0:g.gutterWidth;u.fixedWidth||(w-=g.scrollLeft),u.el.style.left=w+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=s.width+2*s.padding+"px"),u.fixedWidth?u.el.style.right=g.scrollBar.getWidth()+"px":u.el.style.right=""}}}},b}();r.LineWidgets=p}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,f){r.applyDelta=function(d,p,b){var h=p.start.row,g=p.start.column,s=d[h]||"";switch(p.action){case"insert":var a=p.lines;if(a.length===1)d[h]=s.substring(0,g)+p.lines[0]+s.substring(g);else{var c=[h,1].concat(p.lines);d.splice.apply(d,c),d[h]=s.substring(0,g)+d[h],d[h+p.lines.length-1]+=s.substring(g)}break;case"remove":var l=p.end.column,o=p.end.row;h===o?d[h]=s.substring(0,g)+s.substring(l):d.splice(h,o-h+1,s.substring(0,g)+d[o].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var d=n("./lib/oop"),p=n("./lib/event_emitter").EventEmitter,b=function(){function s(a,c,l){this.$onChange=this.onChange.bind(this),this.attach(a),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,l)}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 c=g(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},s.prototype.setPosition=function(a,c,l){var o;if(l?o={row:a,column:c}:o=this.$clipPositionToDocument(a,c),!(this.row==o.row&&this.column==o.column)){var u={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:u,value:o})}},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,c){var l={};return a>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):a<0?(l.row=0,l.column=0):(l.row=a,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,c))),c<0&&(l.column=0),l},s}();b.prototype.$insertRight=!1,d.implement(b.prototype,p);function h(s,a,c){var l=c?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&l}function g(s,a,c){var l=s.action=="insert",o=(l?1:-1)*(s.end.row-s.start.row),u=(l?1:-1)*(s.end.column-s.start.column),m=s.start,w=l?m:s.end;return h(a,m,c)?{row:a.row,column:a.column}:h(w,a,!c)?{row:a.row+o,column:a.column+(a.row==w.row?u: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(n,r,f){var d=n("./lib/oop"),p=n("./apply_delta").applyDelta,b=n("./lib/event_emitter").EventEmitter,h=n("./range").Range,g=n("./anchor").Anchor,s=function(){function a(c){this.$lines=[""],c.length===0?this.$lines=[""]:Array.isArray(c)?this.insertMergedLines({row:0,column:0},c):this.insert({row:0,column:0},c)}return a.prototype.setValue=function(c){var l=this.getLength()-1;this.remove(new h(0,0,l,this.getLine(l).length)),this.insert({row:0,column:0},c||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(c,l){return new g(this,c,l)},a.prototype.$detectNewLine=function(c){var l=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=l?l[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(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(c){return c==`\r
190
+ `||c=="\r"||c==`
191
+ `},a.prototype.getLine=function(c){return this.$lines[c]||""},a.prototype.getLines=function(c,l){return this.$lines.slice(c,l+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(c){var l;if(c.start.row===c.end.row)l=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{l=this.getLines(c.start.row,c.end.row),l[0]=(l[0]||"").substring(c.start.column);var o=l.length-1;c.end.row-c.start.row==o&&(l[o]=l[o].substring(0,c.end.column))}return l},a.prototype.insertLines=function(c,l){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,l)},a.prototype.removeLines=function(c,l){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,l)},a.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},a.prototype.insert=function(c,l){return this.getLength()<=1&&this.$detectNewLine(l),this.insertMergedLines(c,this.$split(l))},a.prototype.insertInLine=function(c,l){var o=this.clippedPos(c.row,c.column),u=this.pos(c.row,c.column+l.length);return this.applyDelta({start:o,end:u,action:"insert",lines:[l]},!0),this.clonePos(u)},a.prototype.clippedPos=function(c,l){var o=this.getLength();c===void 0?c=o:c<0?c=0:c>=o&&(c=o-1,l=void 0);var u=this.getLine(c);return l==null&&(l=u.length),l=Math.min(Math.max(l,0),u.length),{row:c,column:l}},a.prototype.clonePos=function(c){return{row:c.row,column:c.column}},a.prototype.pos=function(c,l){return{row:c,column:l}},a.prototype.$clipPosition=function(c){var l=this.getLength();return c.row>=l?(c.row=Math.max(0,l-1),c.column=this.getLine(l-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},a.prototype.insertFullLines=function(c,l){c=Math.min(Math.max(c,0),this.getLength());var o=0;c<this.getLength()?(l=l.concat([""]),o=0):(l=[""].concat(l),c--,o=this.$lines[c].length),this.insertMergedLines({row:c,column:o},l)},a.prototype.insertMergedLines=function(c,l){var o=this.clippedPos(c.row,c.column),u={row:o.row+l.length-1,column:(l.length==1?o.column:0)+l[l.length-1].length};return this.applyDelta({start:o,end:u,action:"insert",lines:l}),this.clonePos(u)},a.prototype.remove=function(c){var l=this.clippedPos(c.start.row,c.start.column),o=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:l,end:o,action:"remove",lines:this.getLinesForRange({start:l,end:o})}),this.clonePos(l)},a.prototype.removeInLine=function(c,l,o){var u=this.clippedPos(c,l),m=this.clippedPos(c,o);return this.applyDelta({start:u,end:m,action:"remove",lines:this.getLinesForRange({start:u,end:m})},!0),this.clonePos(u)},a.prototype.removeFullLines=function(c,l){c=Math.min(Math.max(0,c),this.getLength()-1),l=Math.min(Math.max(0,l),this.getLength()-1);var o=l==this.getLength()-1&&c>0,u=l<this.getLength()-1,m=o?c-1:c,w=o?this.getLine(m).length:0,x=u?l+1:l,E=u?0:this.getLine(x).length,T=new h(m,w,x,E),k=this.$lines.slice(c,l+1);return this.applyDelta({start:T.start,end:T.end,action:"remove",lines:this.getLinesForRange(T)}),k},a.prototype.removeNewLine=function(c){c<this.getLength()-1&&c>=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(c,l){if(c instanceof h||(c=h.fromPoints(c.start,c.end)),l.length===0&&c.isEmpty())return c.start;if(l==this.getTextRange(c))return c.end;this.remove(c);var o;return l?o=this.insert(c.start,l):o=c.start,o},a.prototype.applyDeltas=function(c){for(var l=0;l<c.length;l++)this.applyDelta(c[l])},a.prototype.revertDeltas=function(c){for(var l=c.length-1;l>=0;l--)this.revertDelta(c[l])},a.prototype.applyDelta=function(c,l){var o=c.action=="insert";(o?c.lines.length<=1&&!c.lines[0]:!h.comparePoints(c.start,c.end))||(o&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(p(this.$lines,c,l),this._signal("change",c)))},a.prototype.$safeApplyDelta=function(c){var l=this.$lines.length;(c.action=="remove"&&c.start.row<l&&c.end.row<l||c.action=="insert"&&c.start.row<=l)&&this.applyDelta(c)},a.prototype.$splitAndapplyLargeDelta=function(c,l){for(var o=c.lines,u=o.length-l+1,m=c.start.row,w=c.start.column,x=0,E=0;x<u;x=E){E+=l-1;var T=o.slice(x,E);T.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+E,w=0),action:c.action,lines:T},!0)}c.lines=o.slice(x),c.start.row=m+x,c.start.column=w,this.applyDelta(c,!0)},a.prototype.revertDelta=function(c){this.$safeApplyDelta({start:this.clonePos(c.start),end:this.clonePos(c.end),action:c.action=="insert"?"remove":"insert",lines:c.lines.slice()})},a.prototype.indexToPosition=function(c,l){for(var o=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,m=l||0,w=o.length;m<w;m++)if(c-=o[m].length+u,c<0)return{row:m,column:c+o[m].length+u};return{row:w-1,column:c+o[w-1].length+u}},a.prototype.positionToIndex=function(c,l){for(var o=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,m=0,w=Math.min(c.row,o.length),x=l||0;x<w;++x)m+=o[x].length+u;return m+c.column},a.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},a}();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",d.implement(s.prototype,b),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var d=n("./lib/oop"),p=n("./lib/event_emitter").EventEmitter,b=function(){function h(g,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var a=this;this.$worker=function(){if(a.running){for(var c=new Date,l=a.currentLine,o=-1,u=a.doc,m=l;a.lines[l];)l++;var w=u.getLength(),x=0;for(a.running=!1;l<w;){a.$tokenizeRow(l),o=l;do l++;while(a.lines[l]);if(x++,x%5===0&&new Date-c>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=l,o==-1&&(o=l),m<=o&&a.fireUpdateEvent(m,o)}}}return h.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},h.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},h.prototype.fireUpdateEvent=function(g,s){var a={first:g,last:s};this._signal("update",{data:a})},h.prototype.start=function(g){this.currentLine=Math.min(g||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},h.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},h.prototype.$updateOnChange=function(g){var s=g.start.row,a=g.end.row-s;if(a===0)this.lines[s]=null;else if(g.action=="remove")this.lines.splice(s,a+1,null),this.states.splice(s,a+1,null);else{var c=Array(a+1);c.unshift(s,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},h.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},h.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},h.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},h.prototype.$tokenizeRow=function(g){var s=this.doc.getLine(g),a=this.states[g-1],c=this.tokenizer.getLineTokens(s,a,g);return this.states[g]+""!=c.state+""?(this.states[g]=c.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=c.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h}();d.implement(b.prototype,p),r.BackgroundTokenizer=b}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,f){var d=n("./lib/lang"),p=n("./range").Range,b=function(){function h(g,s,a){a===void 0&&(a="text"),this.setRegexp(g),this.clazz=s,this.type=a,this.docLen=0}return h.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},h.prototype.update=function(g,s,a,c){if(this.regExp){for(var l=c.firstRow,o=c.lastRow,u={},m=a.$editor.$search,w=m.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=l;x<=o;x++){var E=this.cache[x];if(E==null||a.getValue().length!=this.docLen){if(w){E=[];var T=m.$multiLineForward(a,this.regExp,x,o);if(T){var k=T.endRow<=o?T.endRow-1:o;k>x&&(x=k),E.push(new p(T.startRow,T.startCol,T.endRow,T.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=d.getMatchOffsets(a.getLine(x),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(F){return new p(x,F.offset,x,F.offset+F.length)});this.cache[x]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var L=E[C].toScreenRange(a),R=L.toString();u[R]||(u[R]=!0,s.drawSingleLineMarker(g,L,this.clazz,c))}}this.docLen=a.getValue().length}},h}();b.prototype.MAX_RANGES=500,r.SearchHighlight=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,f){var d=function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,L,R){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var F=this.$undoStack.length;F>this.$undoDepth-1&&this.$undoStack.splice(0,F-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},k.prototype.addSelection=function(C,L){this.selections.push({value:C,rev:L||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,L){L==null&&(L=this.$rev+1);for(var R=this.$undoStack,F=R.length;F--;){var I=R[F][0];if(I.id<=C)break;I.id<L&&(I.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,L){for(var R=this.selections,F=R.length;F--;){var I=R[F];if(I.rev<C)return L&&(I=R[F+1]),I}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,L){L==null&&(L=this.$rev+1);for(var R=this.$undoStack,F=null,I=0,H=R.length;H--;){var P=R[H][0];if(P.id<L&&!F&&(F=H+1),P.id<=C){I=H+1;break}}return R.slice(I,F)},k.prototype.getChangedRanges=function(C,L){L==null&&(L=this.$rev+1)},k.prototype.getChangedLines=function(C,L){L==null&&(L=this.$rev+1)},k.prototype.undo=function(C,L){this.lastDeltas=null;var R=this.$undoStack;if(p(R,R.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var F=R.pop(),I=null;return F&&(I=C.undoChanges(F,L),this.$redoStack.push(F),this.$syncRev()),this.$fromUndo=!1,I}},k.prototype.redo=function(C,L){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var R=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);T(this.$redoStack,R),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(H){H[0].id=++this.$maxRev},this)}var F=this.$redoStack.pop(),I=null;return F&&(I=C.redoChanges(F,L),this.$undoStack.push(F),this.$syncRev()),this.$fromUndo=!1,I},k.prototype.$syncRev=function(){var C=this.$undoStack,L=C[C.length-1],R=L&&L[0].id||0;this.$redoStackBaseRev=R,this.$rev=R},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}();d.prototype.hasUndo=d.prototype.canUndo,d.prototype.hasRedo=d.prototype.canRedo,d.prototype.isClean=d.prototype.isAtBookmark,d.prototype.markClean=d.prototype.bookmark;function p(k,C){for(var L=C;L--;){var R=k[L];if(R&&!R[0].ignore){for(;L<C-1;){var F=o(k[L],k[L+1]);k[L]=F[0],k[L+1]=F[1],L++}return!0}}}var b=n("./range").Range,h=b.comparePoints;b.comparePoints;function g(k){return{row:k.row,column:k.column}}function s(k){return{start:g(k.start),end:g(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(c).join(`
195
+ `):C=c(k.value)),k.start&&(C+=c(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function c(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function l(k,C){var L=k.action=="insert",R=C.action=="insert";if(L&&R)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(L&&!R)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(!L&&R)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(!L&&!R)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 o(k,C){for(var L=k.length;L--;)for(var R=0;R<C.length;R++)if(!l(k[L],C[R])){for(;L<k.length;){for(;R--;)l(C[R],k[L]);R=C.length,L++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function u(k,C){var L=k.action=="insert",R=C.action=="insert";if(L&&R)h(k.start,C.start)<0?m(C,k,1):m(k,C,1);else if(L&&!R)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(!L&&R)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(!L&&!R)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 F,I;return h(k.start,C.start)<0&&(F=k,k=x(k,C.start)),h(k.end,C.end)>0&&(I=x(k,C.end)),w(C.end,k.start,k.end,-1),I&&!F&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[C,F,I].filter(Boolean)}return[C,k]}function m(k,C,L){w(k.start,C.start,C.end,L),w(k.end,C.start,C.end,L)}function w(k,C,L,R){k.row==(R==1?C:L).row&&(k.column+=R*(L.column-C.column)),k.row+=R*(L.row-C.row)}function x(k,C){var L=k.lines,R=k.end;k.end=g(C);var F=k.end.row-k.start.row,I=L.splice(F,L.length),H=F?C.column:C.column-k.start.column;L.push(I[0].substring(0,H)),I[0]=I[0].substr(H);var P={start:g(C),end:R,lines:I,action:k.action};return P}function E(k,C){C=s(C);for(var L=k.length;L--;){for(var R=k[L],F=0;F<R.length;F++){var I=R[F],H=u(I,C);C=H[0],H.length!=2&&(H[2]?(R.splice(F+1,1,H[1],H[2]),F++):H[1]||(R.splice(F,1),F--))}R.length||k.splice(L,1)}return k}function T(k,C){for(var L=0;L<C.length;L++)for(var R=C[L],F=0;F<R.length;F++)E(k,R[F])}r.UndoManager=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,f){var d=n("../range").Range,p=function(){function b(h,g){this.foldData=h,Array.isArray(g)?this.folds=g:g=this.folds=[g];var s=g[g.length-1];this.range=new d(g[0].start.row,g[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return b.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(g){g.start.row+=h,g.end.row+=h})},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(g,s){return-g.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(h.start.row,h.start.column)>0?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else if(h.end.row==this.start.row)this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");h.foldLine=this},b.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},b.prototype.walk=function(h,g,s){var a=0,c=this.folds,l,o,u,m=!0;g==null&&(g=this.end.row,s=this.end.column);for(var w=0;w<c.length;w++){if(l=c[w],o=l.range.compareStart(g,s),o==-1){h(null,g,s,a,m);return}if(u=h(null,l.start.row,l.start.column,a,m),u=!u&&h(l.placeholder,l.start.row,l.start.column,a),u||o===0)return;m=!l.sameRow,a=l.end.column}h(null,g,s,a,m)},b.prototype.getNextFoldTo=function(h,g){for(var s,a,c=0;c<this.folds.length;c++){if(s=this.folds[c],a=s.range.compareEnd(h,g),a==-1)return{fold:s,kind:"after"};if(a===0)return{fold:s,kind:"inside"}}return null},b.prototype.addRemoveChars=function(h,g,s){var a=this.getNextFoldTo(h,g),c,l;if(a){if(c=a.fold,a.kind=="inside"&&c.start.column!=g&&c.start.row!=h)window.console&&window.console.log(h,g,c);else if(c.start.row==h){l=this.folds;var o=l.indexOf(c);for(o===0&&(this.start.column+=s),o;o<l.length;o++){if(c=l[o],c.start.column+=s,!c.sameRow)return;c.end.column+=s}this.end.column+=s}}},b.prototype.split=function(h,g){var s=this.getNextFoldTo(h,g);if(!s||s.kind=="inside")return null;var a=s.fold,c=this.folds,l=this.foldData,o=c.indexOf(a),u=c[o-1];this.end.row=u.end.row,this.end.column=u.end.column,c=c.splice(o,c.length-o);var m=new b(l,c);return l.splice(l.indexOf(this)+1,0,m),m},b.prototype.merge=function(h){for(var g=h.folds,s=0;s<g.length;s++)this.addFold(g[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(g){h.push(" "+g.toString())}),h.push("]"),h.join(`
196
+ `)},b.prototype.idxToPosition=function(h){for(var g=0,s=0;s<this.folds.length;s++){var a=this.folds[s];if(h-=a.start.column-g,h<0)return{row:a.start.row,column:a.start.column+h};if(h-=a.placeholder.length,h<0)return a.start;g=a.end.column}return{row:this.end.row,column:this.end.column+h}},b}();r.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,f){var d=n("./range").Range,p=d.comparePoints,b=function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(g,s,a){for(var c=this.ranges,l=a||0;l<c.length;l++){var o=c[l],u=p(g,o.end);if(!(u>0)){var m=p(g,o.start);return u===0?s&&m!==0?-l-2:l:m>0||m===0&&!s?l:-l-1}}return-l-1},h.prototype.add=function(g){var s=!g.isEmpty(),a=this.pointIndex(g.start,s);a<0&&(a=-a-1);var c=this.pointIndex(g.end,s,a);return c<0?c=-c-1:c++,this.ranges.splice(a,c-a,g)},h.prototype.addList=function(g){for(var s=[],a=g.length;a--;)s.push.apply(s,this.add(g[a]));return s},h.prototype.substractPoint=function(g){var s=this.pointIndex(g);if(s>=0)return this.ranges.splice(s,1)},h.prototype.merge=function(){var g=[],s=this.ranges;s=s.sort(function(u,m){return p(u.start,m.start)});for(var a=s[0],c,l=1;l<s.length;l++){c=a,a=s[l];var o=p(c.end,a.start);o<0||o==0&&!c.isEmpty()&&!a.isEmpty()||(p(c.end,a.end)<0&&(c.end.row=a.end.row,c.end.column=a.end.column),s.splice(l,1),g.push(a),a=c,l--)}return this.ranges=s,g},h.prototype.contains=function(g,s){return this.pointIndex({row:g,column:s})>=0},h.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},h.prototype.rangeAtPoint=function(g){var s=this.pointIndex(g);if(s>=0)return this.ranges[s]},h.prototype.clipRows=function(g,s){var a=this.ranges;if(a[0].start.row>s||a[a.length-1].start.row<g)return[];var c=this.pointIndex({row:g,column:0});c<0&&(c=-c-1);var l=this.pointIndex({row:s,column:0},c);l<0&&(l=-l-1);for(var o=[],u=c;u<l;u++)o.push(a[u]);return o},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},h.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},h.prototype.$onChange=function(g){for(var s=g.start,a=g.end,c=s.row,l=a.row,o=this.ranges,u=0,m=o.length;u<m;u++){var w=o[u];if(w.end.row>=c)break}if(g.action=="insert")for(var x=l-c,E=-s.column+a.column;u<m;u++){var w=o[u];if(w.start.row>c)break;if(w.start.row==c&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=E,w.start.row+=x)),w.end.row==c&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&E>0&&u<m-1&&w.end.column>w.start.column&&w.end.column==o[u+1].start.column&&(w.end.column-=E),w.end.column+=E,w.end.row+=x}}else for(var x=c-l,E=s.column-a.column;u<m;u++){var w=o[u];if(w.start.row>l)break;w.end.row<l&&(c<w.end.row||c==w.end.row&&s.column<w.end.column)?(w.end.row=c,w.end.column=s.column):w.end.row==l?w.end.column<=a.column?(x||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=E,w.end.row+=x):w.end.row>l&&(w.end.row+=x),w.start.row<l&&(c<w.start.row||c==w.start.row&&s.column<w.start.column)?(w.start.row=c,w.start.column=s.column):w.start.row==l?w.start.column<=a.column?(x||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=E,w.start.row+=x):w.start.row>l&&(w.start.row+=x)}if(x!=0&&u<m)for(;u<m;u++){var w=o[u];w.start.row+=x,w.end.row+=x}},h}();b.prototype.comparePoints=p,r.RangeList=b}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,f){var d=this&&this.__extends||function(){var c=function(l,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,m){u.__proto__=m}||function(u,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(u[w]=m[w])},c(l,o)};return function(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(l,o);function u(){this.constructor=l}l.prototype=o===null?Object.create(o):(u.prototype=o.prototype,new u)}}(),p=n("../range_list").RangeList,b=function(c){d(l,c);function l(o,u){var m=c.call(this)||this;return m.foldLine=null,m.placeholder=u,m.range=o,m.start=o.start,m.end=o.end,m.sameRow=o.start.row==o.end.row,m.subFolds=m.ranges=[],m}return l.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},l.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(u){u.setFoldLine(o)})},l.prototype.clone=function(){var o=this.range.clone(),u=new l(o,this.placeholder);return this.subFolds.forEach(function(m){u.subFolds.push(m.clone())}),u.collapseChildren=this.collapseChildren,u},l.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){g(o,this.start);for(var u=o.start.row,m=o.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(u,m),x==1);w++);var E=this.subFolds[w],T=0;if(x==0){if(E.range.containsRange(o))return E.addSubFold(o);T=1}for(var u=o.range.end.row,m=o.range.end.column,k=w,x=-1;k<this.subFolds.length&&(x=this.subFolds[k].range.compare(u,m),x==1);k++);x==0&&k++;for(var C=this.subFolds.splice(w,k-w,o),L=x==0?C.length-1:C.length,R=T;R<L;R++)o.addSubFold(C[R]);return o.setFoldLine(this.foldLine),o}},l.prototype.restoreRange=function(o){return a(o,this.start)},l}(p);function h(c,l){c.row-=l.row,c.row==0&&(c.column-=l.column)}function g(c,l){h(c.start,l),h(c.end,l)}function s(c,l){c.row==0&&(c.column+=l.column),c.row+=l.row}function a(c,l){s(c.start,l),s(c.end,l)}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(n,r,f){var d=n("../range").Range,p=n("./fold_line").FoldLine,b=n("./fold").Fold,h=n("../token_iterator").TokenIterator,g=n("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(a,c,l){var o=this.getFoldLine(a);if(!o)return null;for(var u=o.folds,m=0;m<u.length;m++){var w=u[m].range;if(w.contains(a,c)){if(l==1&&w.isEnd(a,c)&&!w.isEmpty()||l==-1&&w.isStart(a,c)&&!w.isEmpty())continue;return u[m]}}},this.getFoldsInRange=function(a){var c=a.start,l=a.end,o=this.$foldData,u=[];c.column+=1,l.column-=1;for(var m=0;m<o.length;m++){var w=o[m].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=o[m].folds,E=0;E<x.length;E++){var T=x[E];if(w=T.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;u.push(T)}}}}return c.column-=1,l.column+=1,u},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var c=[];a.forEach(function(o){c=c.concat(this.getFoldsInRange(o))},this)}else var c=this.getFoldsInRange(a);return c},this.getAllFolds=function(){for(var a=[],c=this.$foldData,l=0;l<c.length;l++)for(var o=0;o<c[l].folds.length;o++)a.push(c[l].folds[o]);return a},this.getFoldStringAt=function(a,c,l,o){if(o=o||this.getFoldLine(a),!o)return null;for(var u={end:{column:0}},m,w,x=0;x<o.folds.length;x++){w=o.folds[x];var E=w.range.compareEnd(a,c);if(E==-1){m=this.getLine(w.start.row).substring(u.end.column,w.start.column);break}else if(E===0)return null;u=w}return m||(m=this.getLine(w.start.row).substring(u.end.column)),l==-1?m.substring(0,c-u.end.column):l==1?m.substring(c-u.end.column):m},this.getFoldLine=function(a,c){var l=this.$foldData,o=0;for(c&&(o=l.indexOf(c)),o==-1&&(o=0),o;o<l.length;o++){var u=l[o];if(u.start.row<=a&&u.end.row>=a)return u;if(u.end.row>a)return null}return null},this.getNextFoldLine=function(a,c){var l=this.$foldData,o=0;for(c&&(o=l.indexOf(c)),o==-1&&(o=0),o;o<l.length;o++){var u=l[o];if(u.end.row>=a)return u}return null},this.getFoldedRowCount=function(a,c){for(var l=this.$foldData,o=c-a+1,u=0;u<l.length;u++){var m=l[u],w=m.end.row,x=m.start.row;if(w>=c){x<c&&(x>=a?o-=c-x:o=0);break}else w>=a&&(x>=a?o-=w-x:o-=w-a+1)}return o},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(c,l){return c.start.row-l.start.row}),a},this.addFold=function(a,c){var l=this.$foldData,o=!1,u;a instanceof b?u=a:(u=new b(c,a),u.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(u.range);var m=u.start.row,w=u.start.column,x=u.end.row,E=u.end.column,T=this.getFoldAt(m,w,1),k=this.getFoldAt(x,E,-1);if(T&&k==T)return T.addSubFold(u);T&&!T.range.isStart(m,w)&&this.removeFold(T),k&&!k.range.isEnd(x,E)&&this.removeFold(k);var C=this.getFoldsInRange(u.range);C.length>0&&(this.removeFolds(C),u.collapseChildren||C.forEach(function(I){u.addSubFold(I)}));for(var L=0;L<l.length;L++){var R=l[L];if(x==R.start.row){R.addFold(u),o=!0;break}else if(m==R.end.row){if(R.addFold(u),o=!0,!u.sameRow){var F=l[L+1];if(F&&F.start.row==x){R.merge(F);break}}break}else if(x<=R.start.row)break}return o||(R=this.$addFoldLine(new p(this.$foldData,u))),this.$useWrapMode?this.$updateWrapData(R.start.row,R.start.row):this.$updateRowLengthCache(R.start.row,R.start.row),this.$modified=!0,this._signal("changeFold",{data:u,action:"add"}),u},this.addFolds=function(a){a.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(a){var c=a.foldLine,l=c.start.row,o=c.end.row,u=this.$foldData,m=c.folds;if(m.length==1)u.splice(u.indexOf(c),1);else if(c.range.isEnd(a.end.row,a.end.column))m.pop(),c.end.row=m[m.length-1].end.row,c.end.column=m[m.length-1].end.column;else if(c.range.isStart(a.start.row,a.start.column))m.shift(),c.start.row=m[0].start.row,c.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var w=c.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(l,o):this.$updateRowLengthCache(l,o)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var c=[],l=0;l<a.length;l++)c.push(a[l]);c.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(c){a.restoreRange(c),this.addFold(c)},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(c){this.expandFold(c)},this)},this.unfold=function(a,c){var l,o;if(a==null)l=new d(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof a=="number")l=new d(a,0,a,this.getLine(a).length);else if("row"in a)l=d.fromPoints(a,a);else{if(Array.isArray(a))return o=[],a.forEach(function(m){o=o.concat(this.unfold(m))},this),o;l=a}o=this.getFoldsInRangeList(l);for(var u=o;o.length==1&&d.comparePoints(o[0].start,l.start)<0&&d.comparePoints(o[0].end,l.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(l);if(c!=!1?this.removeFolds(o):this.expandFolds(o),u.length)return u},this.isRowFolded=function(a,c){return!!this.getFoldLine(a,c)},this.getRowFoldEnd=function(a,c){var l=this.getFoldLine(a,c);return l?l.end.row:a},this.getRowFoldStart=function(a,c){var l=this.getFoldLine(a,c);return l?l.start.row:a},this.getFoldDisplayLine=function(a,c,l,o,u){o==null&&(o=a.start.row),u==null&&(u=0),c==null&&(c=a.end.row),l==null&&(l=this.getLine(c).length);var m=this.doc,w="";return a.walk(function(x,E,T,k){if(!(E<o)){if(E==o){if(T<u)return;k=Math.max(u,k)}x!=null?w+=x:w+=m.getLine(E).substring(k,T)}},c,l),w},this.getDisplayLine=function(a,c,l,o){var u=this.getFoldLine(a);if(u)return this.getFoldDisplayLine(u,a,c,l,o);var m;return m=this.doc.getLine(a),m.substring(o||0,c||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(c){var l=c.folds.map(function(o){return o.clone()});return new p(a,l)}),a},this.toggleFold=function(a){var c=this.selection,l=c.getRange(),o,u;if(l.isEmpty()){var m=l.start;if(o=this.getFoldAt(m.row,m.column),o){this.expandFold(o);return}else if(a){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(u=this.findMatchingBracket(m))?l.comparePoint(u)==1?l.end=u:(l.start=u,l.start.column++,l.end.column--):(u=this.findMatchingBracket({row:m.row,column:m.column+1}))?(l.comparePoint(u)==1?l.end=u:l.start=u,l.start.column++):l=this.getCommentFoldRange(m.row,m.column)||l}else{var x=this.getFoldsInRange(l);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(o=x[0])}if(o||(o=this.getFoldAt(l.start.row,l.start.column)),o&&o.range.toString()==l.toString()){this.expandFold(o);return}var E="...";if(!l.isMultiLine()){if(E=this.getTextRange(l),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,l)},this.getCommentFoldRange=function(a,c,l){var o=new h(this,a,c),u=o.getCurrentToken(),m=u&&u.type;if(u&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),x=new d;if(l!=1){do u=o.stepBackward();while(u&&w.test(u.type));u=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+u.value.length,o=new h(this,a,c);var E=this.getState(o.$row);if(l!=-1){var T=-1;do if(u=o.stepForward(),T==-1){var k=this.getState(o.$row);E.toString()!==k.toString()&&(T=o.$row)}else if(o.$row>T)break;while(u&&w.test(u.type));u=o.stepBackward()}else u=o.getCurrentToken();return x.end.row=o.getCurrentTokenRow(),x.end.column=o.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(a,c,l,o){l==null&&(l=1e5);var u=this.foldWidgets;if(u){c=c||this.getLength(),a=a||0;for(var m=a;m<c;m++)if(u[m]==null&&(u[m]=this.getFoldWidget(m)),u[m]=="start"&&!(o&&!o(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=c&&w.start.row>=a&&(m=w.end.row,w.collapseChildren=l,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(c){for(var l=a.getTokens(c),o=0;o<l.length;o++){var u=l[o];if(!(u.type=="text"&&/^\s+$/.test(u.value)))return!!/comment/.test(u.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 c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},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,c){var l=this.foldWidgets;if(!l||c&&l[a])return{};for(var o=a-1,u;o>=0;){var m=l[o];if(m==null&&(m=l[o]=this.getFoldWidget(o)),m=="start"){var w=this.getFoldWidgetRange(o);if(u||(u=w),w&&w.end.row>=a)break}o--}return{range:o!==-1&&w,firstRange:u}},this.onFoldWidgetClick=function(a,c){c instanceof g&&(c=c.domEvent);var l={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},o=this.$toggleFoldWidget(a,l);if(!o){var u=c.target||c.srcElement;u&&/ace_fold-widget/.test(u.className)&&(u.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,c){if(this.getFoldWidget){var l=this.getFoldWidget(a),o=this.getLine(a),u=l==="end"?-1:1,m=this.getFoldAt(a,u===-1?0:o.length,u);if(m)return c.children||c.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(c.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var E=x.range.start.row+1,T=x.range.end.row;this.foldAll(E,T,c.all?1e4:0)}else c.children?(T=w?w.end.row:this.getLength(),this.foldAll(a+1,T,c.all?1e4:0)):w&&(c.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var l=this.$toggleFoldWidget(c,{});if(!l){var o=this.getParentFoldRangeData(c,!0);if(l=o.range||o.firstRange,l){c=l.start.row;var u=this.getFoldAt(c,this.getLine(c).length,1);u?this.removeFold(u):this.addFold("...",l)}}},this.updateFoldWidgets=function(a){var c=a.start.row,l=a.end.row-c;if(l===0)this.foldWidgets[c]=null;else if(a.action=="remove")this.foldWidgets.splice(c,l+1,null);else{var o=Array(l+1);o.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(a){var c=a.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,f){var d=n("../token_iterator").TokenIterator,p=n("../range").Range;function b(){this.findMatchingBracket=function(h,g){if(h.column==0)return null;var s=g||this.getLine(h.row).charAt(h.column-1);if(s=="")return null;var a=s.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],h):this.$findOpeningBracket(a[2],h):null},this.getBracketRange=function(h){var g=this.getLine(h.row),s=!0,a,c=g.charAt(h.column-1),l=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(l||(c=g.charAt(h.column),h={row:h.row,column:h.column+1},l=c&&c.match(/([\(\[\{])|([\)\]\}])/),s=!1),!l)return null;if(l[1]){var o=this.$findClosingBracket(l[1],h);if(!o)return null;a=p.fromPoints(h,o),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var o=this.$findOpeningBracket(l[2],h);if(!o)return null;a=p.fromPoints(o,h),s||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(h,g){var s=this.getLine(h.row),a=/([\(\[\{])|([\)\]\}])/,c=!g&&s.charAt(h.column-1),l=c&&c.match(a);if(l||(c=(g===void 0||g)&&s.charAt(h.column),h={row:h.row,column:h.column+1},l=c&&c.match(a)),!l)return null;var o=new p(h.row,h.column-1,h.row,h.column),u=l[1]?this.$findClosingBracket(l[1],h):this.$findOpeningBracket(l[2],h);if(!u)return[o];var m=new p(u.row,u.column,u.row,u.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,g,s){var a=this.$brackets[h],c=1,l=new d(this,g.row,g.column),o=l.getCurrentToken();if(o||(o=l.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var u=g.column-l.getCurrentTokenColumn()-2,m=o.value;;){for(;u>=0;){var w=m.charAt(u);if(w==a){if(c-=1,c==0)return{row:l.getCurrentTokenRow(),column:u+l.getCurrentTokenColumn()}}else w==h&&(c+=1);u-=1}do o=l.stepBackward();while(o&&!s.test(o.type));if(o==null)break;m=o.value,u=m.length-1}return null}},this.$findClosingBracket=function(h,g,s){var a=this.$brackets[h],c=1,l=new d(this,g.row,g.column),o=l.getCurrentToken();if(o||(o=l.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var u=g.column-l.getCurrentTokenColumn();;){for(var m=o.value,w=m.length;u<w;){var x=m.charAt(u);if(x==a){if(c-=1,c==0)return{row:l.getCurrentTokenRow(),column:u+l.getCurrentTokenColumn()}}else x==h&&(c+=1);u+=1}do o=l.stepForward();while(o&&!s.test(o.type));if(o==null)break;u=0}return null}},this.getMatchingTags=function(h){var g=new d(this,h.row,h.column),s=this.$findTagName(g);if(s){var a=g.stepBackward();return a.value==="<"?this.$findClosingTag(g,s):this.$findOpeningTag(g,s)}},this.$findTagName=function(h){var g=h.getCurrentToken(),s=!1,a=!1;if(g&&g.type.indexOf("tag-name")===-1)do a?g=h.stepBackward():g=h.stepForward(),g&&(g.value==="/>"?a=!0:g.type.indexOf("tag-name")!==-1&&(s=!0));while(g&&!s);return g},this.$findClosingTag=function(h,g){var s,a=g.value,c=g.value,l=0,o=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);g=h.stepForward();var u=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length),m=!1;do{if(s=g,s.type.indexOf("tag-close")!==-1&&!m){var w=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);m=!0}if(g=h.stepForward(),g){if(g.value===">"&&!m){var w=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);m=!0}if(g.type.indexOf("tag-name")!==-1){if(a=g.value,c===a){if(s.value==="<")l++;else if(s.value==="</"&&(l--,l<0)){h.stepBackward();var x=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);g=h.stepForward();var E=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=h.stepForward()),g&&g.value===">")var T=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(c===a&&g.value==="/>"&&(l--,l<0))var x=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),E=x,T=E,w=new p(u.end.row,u.end.column,u.end.row,u.end.column+1)}}while(g&&l>=0);if(o&&w&&x&&T&&u&&E)return{openTag:new p(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new p(x.start.row,x.start.column,T.end.row,T.end.column),openTagName:u,closeTagName:E}},this.$findOpeningTag=function(h,g){var s=h.getCurrentToken(),a=g.value,c=0,l=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),u=o+2,m=new p(l,o,l,u);h.stepForward();var w=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=h.stepForward()),!(!g||g.value!==">")){var x=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(g=s,l=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),u=o+g.value.length,s=h.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(a===g.value)if(s.value==="<"){if(c++,c>0){var E=new p(l,o,l,u),T=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do g=h.stepForward();while(g&&g.value!==">");var k=new p(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else s.value==="</"&&c--}else if(g.value==="/>"){for(var C=0,L=s;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===a){c--;break}else if(L.value==="<")break;L=h.stepBackward(),C++}for(var R=0;R<C;R++)h.stepForward()}}while(s&&c<=0);if(T&&k&&m&&x&&E&&w)return{openTag:new p(T.start.row,T.start.column,k.end.row,k.end.column),closeTag:new p(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:E,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(n,r,f){var d=n("./lib/oop"),p=n("./lib/lang"),b=n("./bidihandler").BidiHandler,h=n("./config"),g=n("./lib/event_emitter").EventEmitter,s=n("./selection").Selection,a=n("./mode/text").Mode,c=n("./range").Range,l=n("./line_widgets").LineWidgets,o=n("./document").Document,u=n("./background_tokenizer").BackgroundTokenizer,m=n("./search_highlight").SearchHighlight,w=n("./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 u(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 o(O)),this.setDocument(O),this.selection=new s(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new 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=p.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 l(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 W=S+D>>1,U=O[W];if(A>U)S=W+1;else if(A<U)D=W-1;else return W}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("...",c.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,W=0;if(A==null){var U=S.length-1;W=this.getLine(O).length}else for(var U=0;U<S.length&&(W+=S[U].value.length,!(W>=A));U++);return D=S[U],D?(D.index=U,D.start=W-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=p.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()?p.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 W=this.$markerId++,U={range:O,type:S||"line",renderer:typeof S=="function"?S:null,clazz:A,inFront:!!D,id:W};return D?(this.$frontMarkers[W]=U,this._signal("changeFrontMarker")):(this.$backMarkers[W]=U,this._signal("changeBackMarker")),W},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 W=new c(O,0,A,1/0);return W.id=this.addMarker(W,S,"fullLine",D),W},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 W=this.tokenRe;else if(/^\s+$/.test(S.slice(A-1,A+1)))var W=/\s/;else var W=this.nonTokenRe;var U=A;if(U>0){do U--;while(U>=0&&S.charAt(U).match(W));U++}for(var K=A;K<S.length&&S.charAt(K).match(W);)K++;return new c(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(W){if(!this.destroyed){if(this.$modeId!==D)return A&&A();this.$modes[D]&&!S?this.$onChangeMode(this.$modes[D]):W&&W.Mode&&(W=new W.Mode(S),S||(this.$modes[D]=W,W.$id=D),this.$onChangeMode(W)),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 W=this.onReloadTokenizer.bind(this);D.on("update",W)}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,W=0,U=this.$foldData[W],K=U?U.start.row:1/0,Z=A.length,te=0;te<Z;te++){if(te>K){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[W++],K=U?U.start.row:1/0}S[te]==null&&(S[te]=this.$getStringScreenWidth(A[te])[0]),S[te]>D&&(D=S[te])}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(Z){return A?Z.action!=="insert":Z.action==="insert"}for(var D,W,U=0;U<O.length;U++){var K=O[U];if(K.start){if(!D){S(K)?D=c.fromPoints(K.start,K.end):D=c.fromPoints(K.start,K.start);continue}S(K)?(W=K.start,D.compare(W.row,W.column)==-1&&D.setStart(W),W=K.end,D.compare(W.row,W.column)==1&&D.setEnd(W)):(W=K.start,D.compare(W.row,W.column)==-1&&(D=c.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),W=this.getFoldsInRange(O),U=c.fromPoints(A,A);if(!S){this.remove(O);var K=O.start.row-O.end.row,Z=K?-O.end.column:O.start.column-O.end.column;Z&&(U.start.row==O.end.row&&U.start.column>O.end.column&&(U.start.column+=Z),U.end.row==O.end.row&&U.end.column>O.end.column&&(U.end.column+=Z)),K&&U.start.row>=O.end.row&&(U.start.row+=K,U.end.row+=K)}if(U.end=this.insert(U.start,D),W.length){var te=O.start,he=U.start,K=he.row-te.row,Z=he.column-te.column;this.addFolds(W.map(function(ue){return ue=ue.clone(),ue.start.row==te.row&&(ue.start.column+=Z),ue.end.row==te.row&&(ue.end.column+=Z),ue.start.row+=K,ue.end.row+=K,ue}))}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 c(0,0,0,0),D=this.getTabSize(),W=A.start.row;W<=A.end.row;++W){var U=this.getLine(W);S.start.row=W,S.end.row=W;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 W=D-O}else if(S>0){var D=this.getRowFoldEnd(A+S);if(D>this.doc.getLength()-1)return 0;var W=D-A}else{O=this.$clipRowToDocument(O),A=this.$clipRowToDocument(A);var W=A-O+1}var U=new c(O,0,A,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=W,te.end.row+=W,te}),Z=S==0?this.doc.getLines(O,A):this.doc.removeFullLines(O,A);return this.doc.insertFullLines(O+W,Z),K.length&&this.addFolds(K),W},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,W=O.end,U=D.row,K=W.row,Z=K-U,te=null;if(this.$updating=!0,Z!=0)if(S==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(O),this.removeFolds(te);var ne=this.getFoldLine(W.row),ae=0;if(ne){ne.addRemoveChars(W.row,W.column,D.column-W.column),ne.shiftRow(-Z);var ue=this.getFoldLine(U);ue&&ue!==ne&&(ue.merge(ne),ne=ue),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=W.row&&ne.shiftRow(-Z)}K=U}else{var ce=Array(Z);ce.unshift(U,0);var ge=A?this.$wrapData:this.$rowLengthCache;ge.splice.apply(ge,ce);var he=this.$foldData,ne=this.getFoldLine(U),ae=0;if(ne){var Te=ne.range.compareInside(D.row,D.column);Te==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(K,0,W.column-D.column))):Te==-1&&(ne.addRemoveChars(U,0,W.column-D.column),ne.shiftRow(Z)),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),S==="remove"&&(te=this.getFoldsInRange(O),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,D.column,Z)}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),te},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(),W=this.$wrapData,U=this.$wrapLimit,K,Z,te=O;for(A=Math.min(A,S.length-1);te<=A;)Z=this.getFoldLine(te,Z),Z?(K=[],Z.walk((function(he,ne,ae,ue){var ce;if(he!=null){ce=this.$getDisplayTokens(he,K.length),ce[0]=k;for(var ge=1;ge<ce.length;ge++)ce[ge]=C}else ce=this.$getDisplayTokens(S[ne].substring(ue,ae),K.length);K=K.concat(ce)}).bind(this),Z.end.row,S[Z.end.row].length+1),W[Z.start.row]=this.$computeWrapSplits(K,U,D),te=Z.end.row+1):(K=this.$getDisplayTokens(S[te]),W[te]=this.$computeWrapSplits(K,U,D),te++)},P.prototype.$computeWrapSplits=function(O,A,S){if(O.length==0)return[];var D=[],W=O.length,U=0,K=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=A<=Math.max(2*S,8)||te===!1?0:Math.floor(A/2);function ne(){var Te=0;if(he===0)return Te;if(te)for(var $e=0;$e<O.length;$e++){var Ee=O[$e];if(Ee==R)Te+=1;else if(Ee==F)Te+=S;else{if(Ee==I)continue;break}}return Z&&te!==!1&&(Te+=S),Math.min(Te,he)}function ae(Te){for(var $e=Te-U,Ee=U;Ee<Te;Ee++){var Ze=O[Ee];(Ze===12||Ze===2)&&($e-=1)}D.length||(ue=ne(),D.indent=ue),K+=$e,D.push(K),U=Te}for(var ue=0;W-U>A-ue;){var ce=U+A-ue;if(O[ce-1]>=R&&O[ce]>=R){ae(ce);continue}if(O[ce]==k||O[ce]==C){for(ce;ce!=U-1&&O[ce]!=k;ce--);if(ce>U){ae(ce);continue}for(ce=U+A,ce;ce<O.length&&O[ce]==C;ce++);if(ce==O.length)break;ae(ce);continue}for(var ge=Math.max(ce-(A-(A>>2)),U-1);ce>ge&&O[ce]<k;)ce--;if(Z){for(;ce>ge&&O[ce]<k;)ce--;for(;ce>ge&&O[ce]==L;)ce--}else for(;ce>ge&&O[ce]<R;)ce--;if(ce>ge){ae(++ce);continue}ce=U+A,O[ce]==T&&ce--,ae(ce-ue)}return D},P.prototype.$getDisplayTokens=function(O,A){var S=[],D;A=A||0;for(var W=0;W<O.length;W++){var U=O.charCodeAt(W);if(U==9){D=this.getScreenTabSize(S.length+A),S.push(F);for(var K=1;K<D;K++)S.push(I)}else U==32?S.push(R):U>39&&U<48||U>57&&U<64?S.push(L):U>=4352&&H(U)?S.push(E,T):S.push(E)}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,W;for(W=0;W<O.length&&(D=O.charCodeAt(W),D==9?S+=this.getScreenTabSize(S):D>=4352&&H(D)?S+=2:S+=1,!(S>A));W++);return[S,W]},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,ae=0,W=0,U,ne=0,K=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,O),he=Z.length;if(he&&te>=0)var ne=Z[te],ae=this.$docRowCache[te],ue=O>Z[he-1];else var ue=!he;for(var ce=this.getLength()-1,ge=this.getNextFoldLine(ae),Te=ge?ge.start.row:1/0;ne<=O&&(K=this.getRowLength(ae),!(ne+K>O||ae>=ce));)ne+=K,ae++,ae>Te&&(ae=ge.end.row+1,ge=this.getNextFoldLine(ae,ge),Te=ge?ge.start.row:1/0),ue&&(this.$docRowCache.push(ae),this.$screenRowCache.push(ne));if(ge&&ge.start.row<=ae)D=this.getFoldDisplayLine(ge),ae=ge.start.row;else{if(ne+K<=O||ae>ce)return{row:ce,column:this.getLine(ce).length};D=this.getLine(ae),ge=null}var $e=0,Ee=Math.floor(O-ne);if(this.$useWrapMode){var Ze=this.$wrapData[ae];Ze&&(U=Ze[Ee],Ee>0&&Ze.length&&($e=Ze.indent,W=Ze[Ee-1]||Ze[Ze.length-1],D=D.substring(W)))}return S!==void 0&&this.$bidiHandler.isBidiRow(ne+Ee,ae,Ee)&&(A=this.$bidiHandler.offsetToCol(S)),W+=this.$getStringScreenWidth(D,A-$e)[1],this.$useWrapMode&&W>=U&&(W=U-1),ge?ge.idxToPosition(W):{row:ae,column:W}},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 ne=0,D=null,W=null;W=this.getFoldAt(O,A,1),W&&(O=W.start.row,A=W.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,O),te=K.length;if(te&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],ae=O>K[te-1];else var ae=!te;for(var ue=this.getNextFoldLine(he),ce=ue?ue.start.row:1/0;he<O;){if(he>=ce){if(U=ue.end.row+1,U>O)break;ue=this.getNextFoldLine(U,ue),ce=ue?ue.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,ae&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var ge="";ue&&he>=ce?(ge=this.getFoldDisplayLine(ue,O,A),D=ue.start.row):(ge=this.getLine(O).substring(0,A),D=O);var Te=0;if(this.$useWrapMode){var $e=this.$wrapData[D];if($e){for(var Ee=0;ge.length>=$e[Ee];)ne++,Ee++;ge=ge.substring($e[Ee-1]||0,ge.length),Te=Ee>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:Te+this.$getStringScreenWidth(ge)[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,W=0,A=this.$foldData[W++],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[W++],U=A?A.start.row:1/0)}else{O=this.getLength();for(var Z=this.$foldData,W=0;W<Z.length;W++)A=Z[W],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 W,U;for(U=0;U<A.length&&(W=A.charAt(U),W===" "?D+=this.getScreenTabSize(D):D+=O.getCharacterWidth(W),!(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=H,d.implement(x.prototype,g);var E=1,T=2,k=3,C=4,L=9,R=10,F=11,I=12;function H(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}n("./edit_session/folding").Folding.call(x.prototype),n("./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(n,r,f){var d=n("./lib/lang"),p=n("./lib/oop"),b=n("./range").Range,h=function(){function c(){this.$options={}}return c.prototype.set=function(l){return p.mixin(this.$options,l),this},c.prototype.getOptions=function(){return d.copyObject(this.$options)},c.prototype.setOptions=function(l){this.$options=l},c.prototype.find=function(l){var o=this.$options,u=this.$matchIterator(l,o);if(!u)return!1;var m=null;return u.forEach(function(w,x,E,T){return m=new b(w,x,E,T),x==T&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},c.prototype.findAll=function(l){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var u=o.range,m=u?l.getLines(u.start.row,u.end.row):l.doc.getAllLines(),w=[],x=o.re;if(o.$isMultiLine){var E=x.length,T=m.length-E,k;e:for(var C=x.offset||0;C<=T;C++){for(var L=0;L<E;L++)if(m[C+L].search(x[L])==-1)continue e;var R=m[C],F=m[C+E-1],I=R.length-R.match(x[0])[0].length,H=F.match(x[E-1])[0].length;k&&k.end.row===C&&k.end.column>I||(w.push(k=new b(C,I,C+E-1,H)),E>2&&(C=C+E-2))}}else for(var P,O=0;O<m.length;O++)if(this.$isMultilineSearch(o)){var A=m.length-1;if(P=this.$multiLineForward(l,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=d.getMatchOffsets(m[O],x);for(var L=0;L<P.length;L++){var D=P[L];w.push(new b(O,D.offset,O,D.offset+D.length))}}if(u){for(var W=u.start.column,U=u.end.column,O=0,L=w.length-1;O<L&&w[O].start.column<W&&w[O].start.row==0;)O++;for(var K=u.end.row-u.start.row;O<L&&w[L].end.column>U&&w[L].end.row==K;)L--;for(w=w.slice(O,L+1),O=0,L=w.length;O<L;O++)w[O].start.row+=u.start.row,w[O].end.row+=u.start.row}return w},c.prototype.parseReplaceString=function(l){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},u="",m=0,w=l.length;m<w;m++){var x=l.charCodeAt(m);if(x===o.Backslash){if(m++,m>=w){u+="\\";break}var E=l.charCodeAt(m);switch(E){case o.Backslash:u+="\\";break;case o.n:u+=`
199
+ `;break;case o.t:u+=" ";break}continue}if(x===o.DollarSign){if(m++,m>=w){u+="$";break}var T=l.charCodeAt(m);if(T===o.DollarSign){u+="$$";continue}if(T===o.Digit0||T===o.Ampersand){u+="$&";continue}if(o.Digit1<=T&&T<=o.Digit9){u+="$"+l[m];continue}}u+=l[m]}return u||l},c.prototype.replace=function(l,o){var u=this.$options,m=this.$assembleRegExp(u);if(u.$isMultiLine)return o;if(m){var w=this.$isMultilineSearch(u);w&&(l=l.replace(/\r\n|\r|\n/g,`
200
+ `));var x=m.exec(l);if(!x||!w&&x[0].length!=l.length)return null;if(o=u.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=l.replace(m,o),u.preserveCase){o=o.split("");for(var E=Math.min(l.length,l.length);E--;){var T=l[E];T&&T.toLowerCase()!=T?o[E]=o[E].toUpperCase():o[E]=o[E].toLowerCase()}o=o.join("")}return o}},c.prototype.$assembleRegExp=function(l,o){if(l.needle instanceof RegExp)return l.re=l.needle;var u=l.needle;if(!l.needle)return l.re=!1;l.regExp||(u=d.escapeRegExp(u));var m=l.caseSensitive?"gm":"gmi";try{new RegExp(u,"u"),l.$supportsUnicodeFlag=!0,m+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(u=g(u,l)),l.$isMultiLine=!o&&/[\n\r]/.test(u),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(u,m);try{var w=new RegExp(u,m)}catch{w=!1}return l.re=w},c.prototype.$assembleMultilineRegExp=function(l,o){for(var u=l.replace(/\r\n|\r|\n/g,`$
201
+ ^`).split(`
202
+ `),m=[],w=0;w<u.length;w++)try{m.push(new RegExp(u[w],o))}catch{return!1}return m},c.prototype.$isMultilineSearch=function(l){return l.re&&/\\r\\n|\\r|\\n/.test(l.re.source)&&l.regExp&&!l.$isMultiLine},c.prototype.$multiLineForward=function(l,o,u,m){for(var w,x=a(l,u),E=u;E<=m;){for(var T=0;T<x&&!(E>m);T++){var k=l.getLine(E++);w=w==null?k:w+`
203
+ `+k}var C=o.exec(w);if(o.lastIndex=0,C){var L=w.slice(0,C.index).split(`
204
+ `),R=C[0].split(`
205
+ `),F=u+L.length-1,I=L[L.length-1].length,H=F+R.length-1,P=R.length==1?I+R[0].length:R[R.length-1].length;return{startRow:F,startCol:I,endRow:H,endCol:P}}}return null},c.prototype.$multiLineBackward=function(l,o,u,m,w){for(var x,E=a(l,m),T=l.getLine(m).length-u,k=m;k>=w;){for(var C=0;C<E&&k>=w;C++){var L=l.getLine(k--);x=x==null?L:L+`
206
+ `+x}var R=s(x,o,T);if(R){var F=x.slice(0,R.index).split(`
207
+ `),I=R[0].split(`
208
+ `),H=k+F.length,P=F[F.length-1].length,O=H+I.length-1,A=I.length==1?P+I[0].length:I[I.length-1].length;return{startRow:H,startCol:P,endRow:O,endCol:A}}}return null},c.prototype.$matchIterator=function(l,o){var u=this.$assembleRegExp(o);if(!u)return!1;var m=this.$isMultilineSearch(o),w=this.$multiLineForward,x=this.$multiLineBackward,E=o.backwards==!0,T=o.skipCurrent!=!1,k=u.unicode,C=o.range,L=o.start;L||(L=C?C[E?"end":"start"]:l.selection.getRange()),L.start&&(L=L[T!=E?"end":"start"]);var R=C?C.start.row:0,F=C?C.end.row:l.getLength()-1;if(E)var I=function(O){var A=L.row;if(!P(A,L.column,O)){for(A--;A>=R;A--)if(P(A,Number.MAX_VALUE,O))return;if(o.wrap!=!1){for(A=F,R=L.row;A>=R;A--)if(P(A,Number.MAX_VALUE,O))return}}};else var I=function(O){var A=L.row;if(!P(A,L.column,O)){for(A=A+1;A<=F;A++)if(P(A,0,O))return;if(o.wrap!=!1){for(A=R,F=L.row;A<=F;A++)if(P(A,0,O))return}}};if(o.$isMultiLine)var H=u.length,P=function(O,A,S){var D=E?O-H+1:O;if(!(D<0||D+H>l.getLength())){var W=l.getLine(D),U=W.search(u[0]);if(!(!E&&U<A||U===-1)){for(var K=1;K<H;K++)if(W=l.getLine(D+K),W.search(u[K])==-1)return;var Z=W.match(u[H-1])[0].length;if(!(E&&Z>A)&&S(D,U,D+H-1,Z))return!0}}};else if(E)var P=function(O,A,S){if(m){var D=x(l,u,A,O,R);if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var W=l.getLine(O),U=[],K,Z=0;for(u.lastIndex=0;K=u.exec(W);){var te=K[0].length;if(Z=K.index,!te){if(Z>=W.length)break;u.lastIndex=Z+=d.skipEmptyMatch(W,Z,k)}if(K.index+te>A)break;U.push(K.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(S(O,ne,O,ne+te))return!0}}};else var P=function(O,A,S){if(u.lastIndex=A,m){var D=w(l,u,O,F);if(D){var W=D.endRow<=F?D.endRow-1:F;W>O&&(O=W)}if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=l.getLine(O),K,Z;Z=u.exec(U);){var te=Z[0].length;if(K=Z.index,S(O,K,O,K+te))return!0;if(!te&&(u.lastIndex=K+=d.skipEmptyMatch(U,K,k),K>=U.length))return!1}};return{forEach:I}},c}();function g(c,l){var o=d.supportsLookbehind();function u(E,T){T===void 0&&(T=!0);var k=o&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(E)||l.regExp?o&&l.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(c),w=m[0],x=m[m.length-1];return u(w)+c+u(x,!1)}function s(c,l,o){for(var u=null,m=0;m<=c.length;){l.lastIndex=m;var w=l.exec(c);if(!w)break;var x=w.index+w[0].length;if(x>c.length-o)break;(!u||x>u.index+u[0].length)&&(u=w),m=w.index+1}return u}function a(c,l){var o=5e3,u={row:l,column:0},m=c.doc.positionToIndex(u),w=m+o,x=c.doc.indexToPosition(w),E=x.row;return E+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var d=this&&this.__extends||function(){var c=function(l,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,m){u.__proto__=m}||function(u,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(u[w]=m[w])},c(l,o)};return function(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(l,o);function u(){this.constructor=l}l.prototype=o===null?Object.create(o):(u.prototype=o.prototype,new u)}}(),p=n("../lib/keys"),b=n("../lib/useragent"),h=p.KEY_MODS,g=function(){function c(l,o){this.$init(l,o,!1)}return c.prototype.$init=function(l,o,u){this.platform=o||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=u},c.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},c.prototype.removeCommand=function(l,o){var u=l&&(typeof l=="string"?l:l.name);l=this.commands[u],o||delete this.commands[u];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==l)delete m[w];else if(Array.isArray(x)){var E=x.indexOf(l);E!=-1&&(x.splice(E,1),x.length==1&&(m[w]=x[0]))}}},c.prototype.bindKey=function(l,o,u){if(typeof l=="object"&&l&&(u==null&&(u=l.position),l=l[this.platform]),!!l){if(typeof o=="function")return this.addCommand({exec:o,bindKey:l,name:o.name||l});l.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),L=h[C.hashId]+C.key;w+=(w?" ":"")+L,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var E=this.parseKeys(m),T=h[E.hashId]+E.key;this._addCommandToBinding(w+T,o,u)},this)}},c.prototype._addCommandToBinding=function(l,o,u){var m=this.commandKeyBinding,w;if(!o)delete m[l];else if(!m[l]||this.$singleCommand)m[l]=o;else{Array.isArray(m[l])?(w=m[l].indexOf(o))!=-1&&m[l].splice(w,1):m[l]=[m[l]],typeof u!="number"&&(u=s(o));var x=m[l];for(w=0;w<x.length;w++){var E=x[w],T=s(E);if(T>u)break}x.splice(w,0,o)}},c.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(o){var u=l[o];if(u){if(typeof u=="string")return this.bindKey(u,o);typeof u=="function"&&(u={exec:u}),typeof u=="object"&&(u.name||(u.name=o),this.addCommand(u))}},this)},c.prototype.removeCommands=function(l){Object.keys(l).forEach(function(o){this.removeCommand(l[o])},this)},c.prototype.bindKeys=function(l){Object.keys(l).forEach(function(o){this.bindKey(o,l[o])},this)},c.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},c.prototype.parseKeys=function(l){var o=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),u=o.pop(),m=p[u];if(p.FUNCTION_KEYS[m])u=p.FUNCTION_KEYS[m].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:u.toUpperCase(),hashId:-1}}else return{key:u,hashId:-1};for(var w=0,x=o.length;x--;){var E=p.KEY_MODS[o[x]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+l),!1;w|=E}return{key:u,hashId:w}},c.prototype.findKeyCommand=function(l,o){var u=h[l]+o;return this.commandKeyBinding[u]},c.prototype.handleKeyboard=function(l,o,u,m){if(!(m<0)){var w=h[o]+u,x=this.commandKeyBinding[w];return l.$keyChain&&(l.$keyChain+=" "+w,x=this.commandKeyBinding[l.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||w,{command:"null"}):(l.$keyChain&&((!o||o==4)&&u.length==1?l.$keyChain=l.$keyChain.slice(0,-w.length-1):(o==-1||m>0)&&(l.$keyChain="")),{command:x})}},c.prototype.getStatusText=function(l,o){return o.$keyChain||""},c}();function s(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var a=function(c){d(l,c);function l(o,u){var m=c.call(this,o,u)||this;return m.$singleCommand=!0,m}return l}(g);a.call=function(c,l,o){g.prototype.$init.call(c,l,o,!0)},g.call=function(c,l,o){g.prototype.$init.call(c,l,o,!1)},r.HashHandler=a,r.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,f){var d=this&&this.__extends||function(){var s=function(a,c){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(l[u]=o[u])},s(a,c)};return function(a,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");s(a,c);function l(){this.constructor=a}a.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),p=n("../lib/oop"),b=n("../keyboard/hash_handler").MultiHashHandler,h=n("../lib/event_emitter").EventEmitter,g=function(s){d(a,s);function a(c,l){var o=s.call(this,l,c)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(u){return u.args?u.command.exec(u.editor,u.args,u.event,!1):u.command.exec(u.editor,{},u.event,!0)}),o}return a.prototype.exec=function(c,l,o){if(Array.isArray(c)){for(var u=c.length;u--;)if(this.exec(c[u],l,o))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var m={editor:l,command:c,args:o};return this.canExecute(c,l)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(c,l){return typeof c=="string"&&(c=this.commands[c]),!(!c||l&&l.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(l))},a.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._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(l){this.macro.push([l.command,l.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,c):this.exec(l[0],c,l[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(c){return c.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},a}(b);p.implement(g.prototype,h),r.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,f){var d=n("../lib/lang"),p=n("../config"),b=n("../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){p.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){p.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){p.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){p.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(),c=a?s.selection.getLineRange():s.selection.getRange();s._emit("cut",c),c.isEmpty()||s.session.remove(c),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){p.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(d.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(),c=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),l=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),o=s.session.doc.getLine(c.row).length,u=s.session.doc.getTextRange(s.selection.getRange()),m=u.replace(/\n\s*/," ").length,w=s.session.doc.getLine(c.row),x=c.row+1;x<=l.row+1;x++){var E=d.stringTrimLeft(d.stringTrimRight(s.session.doc.getLine(x)));E.length!==0&&(E=" "+E),w+=E}l.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new b(c.row,0,l.row+2,0),w),m>0?(s.selection.moveCursorTo(c.row,c.column),s.selection.selectTo(c.row,c.column+m)):(o=s.session.doc.getLine(c.row).length>o?o+1:o,s.selection.moveCursorTo(c.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(s){var a=s.session.doc.getLength()-1,c=s.session.doc.getLine(a).length,l=s.selection.rangeList.ranges,o=[];l.length<1&&(l=[s.selection.getRange()]);for(var u=0;u<l.length;u++)u==l.length-1&&(l[u].end.row===a&&l[u].end.column===c||o.push(new b(l[u].end.row,l[u].end.column,a,c))),u===0?l[u].start.row===0&&l[u].start.column===0||o.push(new b(0,0,l[u].start.row,l[u].start.column)):o.push(new b(l[u-1].end.row,l[u-1].end.column,l[u].start.row,l[u].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var u=0;u<o.length;u++)s.selection.addRange(o[u],!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 g=1;g<9;g++)r.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,f){var d=n("../lib/keys"),p=n("../mouse/default_gutter_handler").GutterTooltip,b=function(){function g(s){this.editor=s,this.gutterLayer=s.renderer.$gutterLayer,this.element=s.renderer.$gutter,this.lines=s.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new p(this.editor)}return g.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},g.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},g.prototype.$onGutterKeyDown=function(s){if(this.annotationTooltip.isOpen){s.preventDefault(),s.keyCode===d.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=d.enter)return;s.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var c=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),l=this.$findNearestFoldLaneWidget(c),o=this.$findNearestAnnotation(c);if(!(l===null&&o===null)){var u=this.$findClosestNumber(l,o,c);if(u===l)if(this.activeLane="fold",this.activeRowIndex=l,this.$isCustomWidgetVisible(l)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=o,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)},g.prototype.$handleGutterKeyboardInteraction=function(s){if(s.keyCode===d.tab){s.preventDefault();return}if(s.keyCode===d.escape){s.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(s.keyCode===d.up){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(s.keyCode===d.down){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(s.keyCode===d.left){s.preventDefault(),this.$switchLane("annotation");return}if(s.keyCode===d.right){s.preventDefault(),this.$switchLane("fold");return}if(s.keyCode===d.enter||s.keyCode===d.space){switch(s.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),c=this.editor.session.$gutterCustomWidgets[a];if(c)c.callbacks&&c.callbacks.onClick&&c.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 l=this.lines.cells[this.activeRowIndex].element.childNodes[2],o=l.getBoundingClientRect(),u=this.annotationTooltip.getElement().style;u.left=o.right+"px",u.top=o.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},g.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},g.prototype.$isFoldWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),c=this.$getFoldWidget(s).style.display!=="none";return a&&c},g.prototype.$isCustomWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),c=!!this.$getCustomWidget(s);return a&&c},g.prototype.$isAnnotationVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),c=this.$getAnnotation(s).style.display!=="none";return a&&c},g.prototype.$getFoldWidget=function(s){var a=this.lines.get(s),c=a.element;return c.childNodes[1]},g.prototype.$getCustomWidget=function(s){var a=this.lines.get(s),c=a.element;return c.childNodes[3]},g.prototype.$getAnnotation=function(s){var a=this.lines.get(s),c=a.element;return c.childNodes[2]},g.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},g.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},g.prototype.$focusFoldWidget=function(s){if(s!=null){var a=this.$getFoldWidget(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$focusCustomWidget=function(s){if(s!=null){var a=this.$getCustomWidget(s);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},g.prototype.$focusAnnotation=function(s){if(s!=null){var a=this.$getAnnotation(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$blurFoldWidget=function(s){var a=this.$getFoldWidget(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$blurCustomWidget=function(s){var a=this.$getCustomWidget(s);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},g.prototype.$blurAnnotation=function(s){var a=this.$getAnnotation(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.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}},g.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}},g.prototype.$moveAnnotationUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$moveAnnotationDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$findClosestNumber=function(s,a,c){return s===null?a:a===null||Math.abs(c-s)<=Math.abs(c-a)?s:a},g.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 c=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(c===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$isCustomWidgetVisible(c)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},g.prototype.$rowIndexToRow=function(s){var a=this.lines.get(s);return a?a.row:null},g.prototype.$rowToRowIndex=function(s){for(var a=0;a<this.lines.getLength();a++){var c=this.lines.get(a);if(c.row==s)return a}return null},g}();r.GutterKeyboardHandler=b;var h=function(){function g(s,a){this.gutterKeyboardHandler=a,this.domEvent=s}return g.prototype.getKey=function(){return d.keyCodeToString(this.domEvent.keyCode)},g.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},g.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},g.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},g}();r.GutterKeyboardEvent=h}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(n,r,f){var d=this&&this.__values||function(A){var S=typeof Symbol=="function"&&Symbol.iterator,D=S&&A[S],W=0;if(D)return D.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&W>=A.length&&(A=void 0),{value:A&&A[W++],done:!A}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},p=n("./lib/oop"),b=n("./lib/dom"),h=n("./lib/lang"),g=n("./lib/useragent"),s=n("./keyboard/textinput").TextInput,a=n("./mouse/mouse_handler").MouseHandler,c=n("./mouse/fold_handler").FoldHandler,l=n("./keyboard/keybinding").KeyBinding,o=n("./edit_session").EditSession,u=n("./search").Search,m=n("./range").Range,w=n("./lib/event_emitter").EventEmitter,x=n("./commands/command_manager").CommandManager,E=n("./commands/default_commands").commands,T=n("./config"),k=n("./token_iterator").TokenIterator,C=n("./keyboard/gutter_handler").GutterKeyboardHandler,L=n("./config").nls,R=n("./clipboard"),F=n("./lib/keys"),I=n("./lib/event"),H=n("./tooltip").HoverTooltip,P=function(){function A(S,D,W){this.session,this.$toDestroy=[];var U=S.getContainerElement();this.container=U,this.renderer=S,this.id="editor"+ ++A.$uid,this.commands=new x(g.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new s(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new c(this)),this.keyBinding=new l(this),this.$search=new u().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=h.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(K,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(D||W&&W.session||new o("")),T.resetOptions(this),W&&this.setOptions(W),T._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,W=D&&D.scrollIntoView;if(W){switch(W){case"center-animate":W="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}W=="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,W=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&&W.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:W.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 W=this;T.loadModule(["keybinding",S],function(U){W.$keybindingId==S&&W.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 W=this.session.getSelection();W.off("changeCursor",this.$onCursorChange),W.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){this.renderer.setStyle(S)},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(ue){D.removeMarker(ue)}),D.$bracketHighlight=null);var W=S.getCursorPosition(),U=S.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(S),Z=D.getMatchingBracketRanges(W,K);if(!Z){var te=new k(D,W.row,W.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=D.getMatchingTags(W);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&D.$mode.getMatching&&(Z=D.$mode.getMatching(S.session)),!Z){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var ae="ace_bracket";Array.isArray(Z)?Z.length==1&&(ae="ace_error_bracket"):Z=[Z],Z.length==2&&(m.comparePoints(Z[0].end,Z[1].start)==0?Z=[m.fromPoints(Z[0].start,Z[1].end)]:m.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[m.fromPoints(Z[1].start,Z[0].end)])),D.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return D.addMarker(ue,ae,"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,W=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,W,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 W=new m(D.row,D.column,D.row,1/0);W.id=S.addMarker(W,"ace_active-line","screenLine"),S.$highlightLineMarker=W}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 W=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(W,"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 W=D.start.column,U=D.end.column,K=S.getLine(D.start.row),Z=K.substring(W,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(W-1,U+1);if(te.test(he))return te}}},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(),W=!1;if(!S&&this.$copyWithEmptySelection){W=!0;for(var U=this.selection.getAllRanges(),K=0;K<U.length;K++){var Z=U[K];K&&U[K-1].start.row==Z.start.row||(S+=this.session.getLine(Z.start.row)+D)}}var te={text:S};return this._signal("copy",te),R.lineMode=W?te.text:!1,te.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 W={text:S,event:D};this.commands.exec("paste",this,W)},A.prototype.$handlePaste=function(S){typeof S=="string"&&(S={text:S}),this._signal("paste",S);var D=S.text,W=D===R.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)W?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(W)this.selection.rangeList.ranges.forEach(function(ae){U.insert({row:ae.start.row,column:0},D)});else{var K=D.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||te)return this.commands.exec("insertstring",this,D);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,K[he])}}},A.prototype.execCommand=function(S,D){return this.commands.exec(S,this,D)},A.prototype.insert=function(S,D){var W=this.session,U=W.getMode(),K=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var Z=U.transformAction(W.getState(K.row),"insertion",this,W,S);Z&&(S!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),S=Z.text)}if(S==" "&&(S=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&S.indexOf(`
211
+ `)==-1){var te=m.fromPoints(K,K);te.end.column+=S.length,this.session.remove(te)}}else{var te=this.getSelectionRange();K=this.session.remove(te),this.clearSelection()}if(S==`
212
+ `||S==`\r
213
+ `){var ue=W.getLine(K.row);if(K.column>ue.search(/\S|$/)){var he=ue.substr(K.column).search(/\S|$/);W.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,ae=W.getState(K.row),ue=W.getLine(K.row),ce=U.checkOutdent(ae,ue,S);if(W.insert(K,S),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new m(K.row,ne+Z.selection[0],K.row,ne+Z.selection[1])):this.selection.setSelectionRange(new m(K.row+Z.selection[0],Z.selection[1],K.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(W.getDocument().isNewLine(S)){var ge=U.getNextLineIndent(ae,ue.slice(0,K.column),W.getTabString());W.insert({row:K.row+1,column:0},ge)}ce&&U.autoOutdent(ae,W,K.row)}},A.prototype.autoIndent=function(){for(var S=this.session,D=S.getMode(),W=this.selection.isEmpty()?[new m(0,0,S.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",te=S.getTabString(),he=0;he<W.length;he++)for(var ne=W[he].start.row,ae=W[he].end.row,ue=ne;ue<=ae;ue++){ue>0&&(U=S.getState(ue-1),K=S.getLine(ue-1),Z=D.getNextLineIndent(U,K,te));var ce=S.getLine(ue),ge=D.$getIndent(ce);if(Z!==ge){if(ge.length>0){var Te=new m(ue,0,ue,ge.length);S.remove(Te)}Z.length>0&&S.insert({row:ue,column:0},Z)}D.autoOutdent(U,S,ue)}},A.prototype.onTextInput=function(S,D){if(!D)return this.keyBinding.onTextInput(S);this.startOperation({command:{name:"insertstring"}});var W=this.applyComposition.bind(this,S,D);this.selection.rangeCount?this.forEachSelection(W):W(),this.endOperation()},A.prototype.applyComposition=function(S,D){if(D.extendLeft||D.extendRight){var W=this.selection.getRange();W.start.column-=D.extendLeft,W.end.column+=D.extendRight,W.start.column<0&&(W.start.row--,W.start.column+=this.session.getLine(W.start.row).length+1),this.selection.setRange(W),!S&&!W.isEmpty()&&this.remove()}if((S||!this.selection.isEmpty())&&this.insert(S,!0),D.restoreStart||D.restoreEnd){var W=this.selection.getRange();W.start.column-=D.restoreStart,W.end.column-=D.restoreEnd,this.selection.setRange(W)}},A.prototype.onCommandKey=function(S,D,W){return this.keyBinding.onCommandKey(S,D,W)},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 W=this.session,U=W.getState(D.start.row),K=W.getMode().transformAction(U,"deletion",this,W,D);if(D.end.column===0){var Z=W.getTextRange(D);if(Z[Z.length-1]==`
214
+ `){var te=W.getLine(D.end.row);/^\s+$/.test(te)&&(D.end.column=te.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 W=this.session.getLine(S.row),U,K;D<W.length?(U=W.charAt(D)+W.charAt(D-1),K=new m(S.row,D-1,S.row,D+1)):(U=W.charAt(D-1)+W.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(),W=this.session.getTextRange(D);this.session.replace(D,W.toLowerCase()),this.selection.setSelectionRange(S)},A.prototype.toUpperCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),W=this.session.getTextRange(D);this.session.replace(D,W.toUpperCase()),this.selection.setSelectionRange(S)},A.prototype.indent=function(){var S=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var W=this.$getSelectedRows();S.indentRows(W.first,W.last," ");return}else if(D.start.column<D.end.column){var U=S.getTextRange(D);if(!/^\s+$/.test(U)){var W=this.$getSelectedRows();S.indentRows(W.first,W.last," ");return}}var K=S.getLine(D.start.row),Z=D.start,te=S.getTabSize(),he=S.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,ae=h.stringRepeat(" ",ne);else{for(var ne=he%te;K[D.start.column-1]==" "&&ne;)D.start.column--,ne--;this.selection.setSelectionRange(D),ae=" "}return this.insert(ae)},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,W=[],U=S.first;U<=S.last;U++)W.push(D.getLine(U));W.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var K=new m(0,0,0,0),U=S.first;U<=S.last;U++){var Z=D.getLine(U);K.start.row=U,K.end.row=U,K.end.column=Z.length,D.replace(K,W[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),W=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,W,S)},A.prototype.getNumberAt=function(S,D){var W=/[\-]?[0-9]+(?:\.[0-9]+)?/g;W.lastIndex=0;for(var U=this.session.getLine(S);W.lastIndex<D;){var K=W.exec(U);if(K.index<=D&&K.index+K[0].length>=D){var Z={value:K[0],start:K.index,end:K.index+K[0].length};return Z}}return null},A.prototype.modifyNumber=function(S){var D=this.selection.getCursor().row,W=this.selection.getCursor().column,U=new m(D,W-1,D,W),K=this.session.getTextRange(U);if(!isNaN(parseFloat(K))&&isFinite(K)){var Z=this.getNumberAt(D,W);if(Z){var te=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-te,ne=parseFloat(Z.value);ne*=Math.pow(10,he),te!==Z.end&&W<te?S*=Math.pow(10,Z.end-W-1):S*=Math.pow(10,Z.end-W),ne+=S,ne/=Math.pow(10,he);var ae=ne.toFixed(he),ue=new m(D,Z.start,D,Z.end);this.session.replace(ue,ae),this.moveCursorTo(D,Math.max(Z.start+1,W+ae.length-Z.value.length))}}else this.toggleWord()},A.prototype.toggleWord=function(){var S=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var W=this.getSelectedText(),U=this.selection.getWordRange().start.column,K=W.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=D-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;W.match(/[A-Za-z0-9_]+/)&&K.forEach(function(Xe,gt){he=te+Xe.length,Z>=te&&Z<=he&&(W=Xe,ne.selection.clearSelection(),ne.moveCursorTo(S,te+U),ne.selection.selectTo(S,he+U)),te=he});for(var ae=this.$toggleWordPairs,ue,ce=0;ce<ae.length;ce++)for(var ge=ae[ce],Te=0;Te<=1;Te++){var $e=+!Te,Ee=W.match(new RegExp("^\\s?_?("+h.escapeRegExp(ge[Te])+")\\s?$","i"));if(Ee){var Ze=W.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Ee[1])+")($|\\s)","g"));Ze&&(ue=W.replace(new RegExp(h.escapeRegExp(ge[Te]),"i"),function(Xe){var gt=ge[$e];return Xe.toUpperCase()==Xe?gt=gt.toUpperCase():Xe.charAt(0).toUpperCase()==Xe.charAt(0)&&(gt=gt.substr(0,0)+ge[$e].charAt(0).toUpperCase()+gt.substr(1)),gt}),this.insert(ue),ue="")}}},A.prototype.findLinkAt=function(S,D){var W,U,K=this.session.getLine(S),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),te=D;te<0&&(te=0);var he=0,ne=0,ae;try{for(var ue=d(Z),ce=ue.next();!ce.done;ce=ue.next()){var ge=ce.value;if(ne=he+ge.length,te>=he&&te<=ne&&ge.match(/((?:https?|ftp):\/\/[\S]+)/)){ae=ge.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(Te){W={error:Te}}finally{try{ce&&!ce.done&&(U=ue.return)&&U.call(ue)}finally{if(W)throw W.error}}return ae},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,W=S.getRange(),U=S.isBackwards();if(W.isEmpty()){var K=W.start.row;D.duplicateLines(K,K)}else{var Z=U?W.start:W.end,te=D.insert(Z,D.getTextRange(W));W.start=Z,W.end=te,S.setSelectionRange(W,U)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(S,D,W){return this.session.moveText(S,D,W)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(S,D){var W,U,K=this.selection;if(!K.inMultiSelectMode||this.inVirtualSelectionMode){var Z=K.toOrientedRange();W=this.$getSelectedRows(Z),U=this.session.$moveLines(W.first,W.last,D?0:S),D&&S==-1&&(U=0),Z.moveBy(U,0),K.fromOrientedRange(Z)}else{var te=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,ae=te.length,ue=0;ue<ae;ue++){var ce=ue;te[ue].moveBy(he,0),W=this.$getSelectedRows(te[ue]);for(var ge=W.first,Te=W.last;++ue<ae;){ne&&te[ue].moveBy(ne,0);var $e=this.$getSelectedRows(te[ue]);if(D&&$e.first!=Te||!D&&$e.first>Te+1)break;Te=$e.last}for(ue--,he=this.session.$moveLines(ge,Te,D?0:S),D&&S==-1&&(ce=ue+1);ce<=ue;)te[ce].moveBy(he,0),ce++;D||(he=0),ne+=he}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 W=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 Z=W.scrollTop;W.scrollBy(0,K*U.lineHeight),D!=null&&W.scrollCursorIntoView(null,.5),W.animateScrolling(Z)},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,W,U){this.renderer.scrollToLine(S,D,W,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 W=this.getCursorPosition(),U=new k(this.session,W.row,W.column),K=U.getCurrentToken(),Z=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var te=K||U.stepForward();if(te){var he,ne=!1,ae={},ue=W.column-te.start,ce,ge={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ue<te.value.length&&!ne;ue++)if(ge[te.value[ue]])switch(ce=ge[te.value[ue]]+"."+te.type.replace("rparen","lparen"),isNaN(ae[ce])&&(ae[ce]=0),te.value[ue]){case"(":case"[":case"{":ae[ce]++;break;case")":case"]":case"}":ae[ce]--,ae[ce]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ae[te.value])&&(ae[te.value]=0),K.value==="<"&&Z>1?ae[te.value]++:K.value==="</"&&ae[te.value]--,ae[te.value]===-1&&(he="tag",ne=!0));ne||(K=te,Z++,te=U.stepForward(),ue=0)}while(te&&!ne);if(he){var Te,$e;if(he==="bracket")Te=this.session.getBracketRange(W),Te||(Te=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1),$e=Te.start,(D||$e.row===W.row&&Math.abs($e.column-W.column)<2)&&(Te=this.session.getBracketRange($e)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Te=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Te.compare(W.row,W.column)===0){var Ee=this.session.getMatchingTags(W);Ee&&(Ee.openTag.contains(W.row,W.column)?(Te=Ee.closeTag,$e=Te.start):(Te=Ee.openTag,Ee.closeTag.start.row===W.row&&Ee.closeTag.start.column===W.column?$e=Te.end:$e=Te.start))}$e=$e||Te.start}$e=Te&&Te.cursor||$e,$e&&(S?Te&&D?this.selection.setRange(Te):Te&&Te.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},A.prototype.gotoLine=function(S,D,W){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,W)},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 W=this.$search.find(this.session),U=0;return W&&(this.$tryReplace(W,S)&&(U=1),this.selection.setSelectionRange(W),this.renderer.scrollSelectionIntoView(W.start,W.end)),U},A.prototype.replaceAll=function(S,D){D&&this.$search.set(D);var W=this.$search.findAll(this.session),U=0;if(!W.length)return U;var K=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=W.length-1;Z>=0;--Z)this.$tryReplace(W[Z],S)&&U++;return this.selection.setSelectionRange(K),U},A.prototype.$tryReplace=function(S,D){var W=this.session.getTextRange(S);return D=this.$search.replace(W,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,W){D||(D={}),typeof S=="string"||S instanceof RegExp?D.needle=S:typeof S=="object"&&p.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,W),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 W=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),D!==!1&&this.renderer.animateScrolling(W)},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.$toDestroy&&(this.$toDestroy.forEach(function(S){S.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},A.prototype.setAutoScrollEditorIntoView=function(S){if(S){var D,W=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var K=this.$scrollAnchor;K.style.cssText="position:absolute",this.container.insertBefore(K,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(D=W.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&D&&(W.isFocused()||W.searchBox&&W.searchBox.isFocused())){var ne=W.renderer,ae=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,ce=ae.top-ue.offset;ae.top>=0&&ce+D.top<0?U=!0:ae.top<ue.height&&ae.top+D.top+ue.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=ce+"px",K.style.left=ae.left+"px",K.style.height=ue.lineHeight+"px",K.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},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,W){var U=this;T.loadModule("ace/ext/prompt",function(K){K.prompt(U,S,D,W)})},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"],["&&","||"],["==","!="]],p.implement(P.prototype,w),T.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;this.textInput.setReadOnly(A),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(W){var U=!1;if(W&&W.type=="keydown"){if(U=W&&W.key&&W.key.length==1&&!W.ctrlKey&&!W.metaKey,!U)return}else W&&W.type!=="exec"&&(U=!0);if(U){S.hoverTooltip||(S.hoverTooltip=new H);var K=b.createElement("div");K.textContent=L("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?(I.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.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===F.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},W;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(g.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",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",L("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",L("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),W||(W=new C(this)),W.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),W&&W.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(n,r,f){var d=n("../lib/dom"),p=function(){function b(h,g){this.element=h,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return b.prototype.moveContainer=function(h){d.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},b.prototype.pageChanged=function(h,g){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},b.prototype.computeLineTop=function(h,g,s){var a=g.firstRowScreen*g.lineHeight,c=Math.floor(a/this.canvasHeight),l=s.documentToScreenRow(h,0)*g.lineHeight;return l-c*this.canvasHeight},b.prototype.computeLineHeight=function(h,g,s){return g.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 g=d.createFragment(this.element),s=0;s<h.length;s++)g.appendChild(h[s].element);this.element.appendChild(g)}else this.cells.push(h),this.element.appendChild(h.element)},b.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var g=d.createFragment(this.element),s=0;s<h.length;s++)g.appendChild(h[s].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},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,g,s,a){var c=this.cellCache.pop();if(!c){var l=d.createElement("div");a&&a(l),this.element.appendChild(l),c={element:l,text:"",row:h}}return c.row=h,c},b}();r.Lines=p}),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(n,r,f){var d=n("../lib/dom"),p=n("../lib/oop"),b=n("../lib/lang"),h=n("../lib/event_emitter").EventEmitter,g=n("./lines").Lines,s=n("../config").nls,a=function(){function l(o){this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return l.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},l.prototype.addGutterDecoration=function(o,u){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,u)},l.prototype.removeGutterDecoration=function(o,u){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,u)},l.prototype.setAnnotations=function(o){this.$annotations=[];for(var u=0;u<o.length;u++){var m=o[u],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var E=m.text,T=m.text,k=m.type;E=E?b.escapeHTML(E):m.html||"",T=T||m.html||"",x.text.indexOf(E)===-1&&(x.text.push(E),x.type.push(k),x.displayText.push(T));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")}},l.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var u=o.start.row,m=o.end.row-u;if(m!==0)if(o.action=="remove")this.$annotations.splice(u,m+1,null);else{var w=new Array(m+1);w.unshift(u,1),this.$annotations.splice.apply(this.$annotations,w)}}},l.prototype.update=function(o){this.config=o;var u=this.session,m=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,u.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=u.getNextFoldLine(m),E=x?x.start.row:1/0,T=null,k=-1,C=m;;){if(C>E&&(C=x.end.row+1,x=u.getNextFoldLine(C,x),E=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}T=this.$lines.get(++k),T?T.row=C:(T=this.$lines.createCell(C,o,this.session,c),this.$lines.push(T)),this.$renderCell(T,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o)},l.prototype.$updateGutterWidth=function(o){var u=this.session,m=u.gutterRenderer||this.$renderer,w=u.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||u.$useWrapMode)&&(x=u.getLength()+w-1);var E=m?m.getWidth(u,x,o):x.toString().length*o.characterWidth,T=this.$padding||this.$computePadding();E+=T.left+T.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},l.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var u=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<u.length;m++){var w=u[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==u[m-1].row)w=u[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},l.prototype.scrollLines=function(o){var u=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(u,o))return this.update(o);this.$lines.moveContainer(o);var m=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!u||w<o.firstRow)return this.update(o);if(m<u.firstRow)return this.update(o);if(u.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(u.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(w>m)for(var x=this.session.getFoldedRowCount(m+1,w);x>0;x--)this.$lines.pop();o.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,u.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(o,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},l.prototype.$renderLines=function(o,u,m){for(var w=[],x=u,E=this.session.getNextFoldLine(x),T=E?E.start.row:1/0;x>T&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),T=E?E.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,o,this.session,c);this.$renderCell(k,o,E,x),w.push(k),x++}return w},l.prototype.$renderCell=function(o,u,m,w){var x=o.element,E=this.session,T=x.childNodes[0],k=x.childNodes[1],C=x.childNodes[2],L=x.childNodes[3],R=C.firstChild,F=E.$firstLineNumber,I=E.$breakpoints,H=E.$decorations,P=E.gutterRenderer||this.$renderer,O=this.$showFoldWidgets&&E.foldWidgets,A=m?m.start.row:Number.MAX_VALUE,S=u.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",W=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(P?P.getText(E,w):w+F).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!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),I[w]&&(D+=I[w]),H[w]&&(D+=H[w]),this.$annotations[w]&&w!==A&&(D+=this.$annotations[w].className),O){var K=O[w];K==null&&(K=O[w]=E.getFoldWidget(w))}if(K){var Z="ace_fold-widget ace_"+K,te=K=="start"&&w==A&&w<m.end.row;if(te){Z+=" ace_closed";for(var he="",ne=!1,ae=w+1;ae<=m.end.row;ae++)if(this.$annotations[ae]){if(this.$annotations[ae].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[ae].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[ae].className===" ace_warning"&&he!==" ace_security_fold"&&(ne=!0,he=" ace_warning_fold")}D+=he}else Z+=" ace_open";k.className!=Z&&(k.className=Z),d.setStyle(k.style,"height",S),d.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var ue=E.getFoldWidgetRange(w);ue?k.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.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])),te?(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&&(d.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var ce=this.session.$gutterCustomWidgets[w];if(ce?this.$addCustomWidget(w,ce,o):L&&this.$removeCustomWidget(w,o),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",R.className=W,R.className+=he,d.setStyle(R.style,"height",S),d.setStyle(C.style,"display","block"),d.setStyle(C.style,"height",S);var ge;switch(he){case" ace_error_fold":ge=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":ge=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":ge=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",ge),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",R.className=W,this.$useSvgGutterIcons?R.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),d.setStyle(R.style,"height",S),d.setStyle(C.style,"display","block"),d.setStyle(C.style,"height",S);var ge;switch(this.$annotations[w].className){case" ace_error":ge=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":ge=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":ge=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":ge=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":ge=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",ge),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else d.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==T.data&&(T.data=U),x.className!=D&&(x.className=D),d.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,u,E)+"px"),d.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,u,E)+"px"),o.text=U,C.style.display==="none"&&k.style.display==="none"&&!ce?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},l.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},l.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},l.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},l.prototype.setShowFoldWidgets=function(o){o?d.addCssClass(this.element,"ace_folding-enabled"):d.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},l.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},l.prototype.$hideFoldWidget=function(o,u){var m=u||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&d.setStyle(w.style,"display","none")}},l.prototype.$showFoldWidget=function(o,u){var m=u||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&d.setStyle(w.style,"display","inline-block")}},l.prototype.$getGutterCell=function(o){var u=this.$lines.cells,m=this.session.documentToScreenRow(o,0);return u[o-this.config.firstRowScreen-(o-m)]},l.prototype.$addCustomWidget=function(o,u,m){var w=u.className,x=u.label,E=u.title,T=u.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:x,title:E,callbacks:T},this.$hideFoldWidget(o,m);var k=m||this.$getGutterCell(o);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=d.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",E),d.setStyle(C.style,"display","inline-block"),d.setStyle(C.style,"height","inherit"),T&&T.onClick&&C.addEventListener("click",function(L){T.onClick(L,o),L.stopPropagation()}),k.element.appendChild(C)}},l.prototype.$removeCustomWidget=function(o,u){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,u);var m=u||this.$getGutterCell(o);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},l.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=d.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},l.prototype.getRegion=function(o){var u=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(o.x<u.left+m.left)return"markers";if(this.$showFoldWidgets&&o.x>m.right-u.right)return"foldWidgets"},l}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,p.implement(a.prototype,h);function c(l){var o=document.createTextNode("");l.appendChild(o);var u=d.createElement("span");l.appendChild(u);var m=d.createElement("span");l.appendChild(m);var w=d.createElement("span");return m.appendChild(w),l}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,f){var d=n("../range").Range,p=n("../lib/dom"),b=function(){function g(s){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return g.prototype.setPadding=function(s){this.$padding=s},g.prototype.setSession=function(s){this.session=s},g.prototype.setMarkers=function(s){this.markers=s},g.prototype.elt=function(s,a){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=a,c.className=s},g.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var c in this.markers){var l=this.markers[c];if(!l.range){l.update(a,this,this.session,s);continue}var o=l.range.clipRows(s.firstRow,s.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),l.renderer){var u=this.$getTop(o.start.row,s),m=this.$padding+o.start.column*s.characterWidth;l.renderer(a,o,m,u,s)}else l.type=="fullLine"?this.drawFullLineMarker(a,o,l.clazz,s):l.type=="screenLine"?this.drawScreenLineMarker(a,o,l.clazz,s):o.isMultiLine()?l.type=="text"?this.drawTextMarker(a,o,l.clazz,s):this.drawMultiLineMarker(a,o,l.clazz,s):this.drawSingleLineMarker(a,o,l.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(s,a){return(s-a.firstRowScreen)*a.lineHeight},g.prototype.drawTextMarker=function(s,a,c,l,o){for(var u=this.session,m=a.start.row,w=a.end.row,x=m,E=0,T=0,k=u.getScreenLastRowColumn(x),C=new d(x,a.start.column,x,T);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?a.start.column:u.getRowWrapIndent(x),C.end.column=k,E=T,T=k,k=x+1<w?u.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(s,C,c+(x==m?" ace_start":"")+" ace_br"+h(x==m||x==m+1&&a.start.column,E<T,T>k,x==w),l,x==w?0:1,o)},g.prototype.drawMultiLineMarker=function(s,a,c,l,o){var u=this.$padding,m=l.lineHeight,w=this.$getTop(a.start.row,l),x=u+a.start.column*l.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var E=a.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(s,E,c+" ace_br1 ace_start",l,null,o)}else this.elt(c+" ace_br1 ace_start","height:"+m+"px;right:"+u+"px;top:"+w+"px;left:"+x+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var E=a.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(s,E,c+" ace_br12",l,null,o)}else{w=this.$getTop(a.end.row,l);var T=a.end.column*l.characterWidth;this.elt(c+" ace_br12","height:"+m+"px;width:"+T+"px;top:"+w+"px;left:"+u+"px;"+(o||""))}if(m=(a.end.row-a.start.row-1)*l.lineHeight,!(m<=0)){w=this.$getTop(a.start.row+1,l);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(c+(k?" ace_br"+k:""),"height:"+m+"px;right:"+u+"px;top:"+w+"px;left:"+u+"px;"+(o||""))}},g.prototype.drawSingleLineMarker=function(s,a,c,l,o,u){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,c,l,o,u);var m=l.lineHeight,w=(a.end.column+(o||0)-a.start.column)*l.characterWidth,x=this.$getTop(a.start.row,l),E=this.$padding+a.start.column*l.characterWidth;this.elt(c,"height:"+m+"px;width:"+w+"px;top:"+x+"px;left:"+E+"px;"+(u||""))},g.prototype.drawBidiSingleLineMarker=function(s,a,c,l,o,u){var m=l.lineHeight,w=this.$getTop(a.start.row,l),x=this.$padding,E=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);E.forEach(function(T){this.elt(c,"height:"+m+"px;width:"+(T.width+(o||0))+"px;top:"+w+"px;left:"+(x+T.left)+"px;"+(u||""))},this)},g.prototype.drawFullLineMarker=function(s,a,c,l,o){var u=this.$getTop(a.start.row,l),m=l.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,l)-u),this.elt(c,"height:"+m+"px;top:"+u+"px;left:0;right:0;"+(o||""))},g.prototype.drawScreenLineMarker=function(s,a,c,l,o){var u=this.$getTop(a.start.row,l),m=l.lineHeight;this.elt(c,"height:"+m+"px;top:"+u+"px;left:0;right:0;"+(o||""))},g}();b.prototype.$padding=0;function h(g,s,a,c){return(g?1:0)|(s?2:0)|(a?4:0)|(c?8:0)}r.Marker=b}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,f){var d=new Set(["text","rparen","lparen"]);r.isTextToken=function(p){return d.has(p)}}),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(n,r,f){var d=n("../lib/oop"),p=n("../lib/dom"),b=n("../lib/lang"),h=n("./lines").Lines,g=n("../lib/event_emitter").EventEmitter,s=n("../config").nls,a=n("./text_util").isTextToken,c=function(){function l(o){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return l.prototype.$updateEolChar=function(){var o=this.session.doc,u=o.getNewLineCharacter()==`
216
+ `&&o.getNewLineMode()!="windows",m=u?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},l.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(u){this._signal("changeCharacterSize",u)}).bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},l.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},l.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var u=this.$tabStrings=[0],m=1;m<o+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=b.stringRepeat(this.TAB_CHAR,m),u.push(w)}else u.push(this.dom.createTextNode(b.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",T=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):T,w=this.dom.createElement("span");w.className=x+E,w.textContent=T,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+k,w.textContent=C,this.$tabStrings[" "]=w}},l.prototype.updateLines=function(o,u,m){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(u,o.firstRow),x=Math.min(m,o.lastRow),E=this.element.childNodes,T=0,k=o.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;T++}for(var L=!1,k=w,C=this.session.getNextFoldLine(k),R=C?C.start.row:1/0;k>R&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),R=C?C.start.row:1/0),!(k>x);){var F=E[T++];if(F){this.dom.removeChildren(F),this.$renderLine(F,k,k==R?C:!1),L&&(F.style.top=this.$lines.computeLineTop(k,o,this.session)+"px");var I=o.lineHeight*this.session.getRowLength(k)+"px";F.style.height!=I&&(L=!0,F.style.height=I)}k++}if(L)for(;T<this.$lines.cells.length;){var H=this.$lines.cells[T++];H.element.style.top=this.$lines.computeLineTop(H.row,o,this.session)+"px"}},l.prototype.scrollLines=function(o){var u=this.config;if(this.config=o,this.$lines.pageChanged(u,o))return this.update(o);this.$lines.moveContainer(o);var m=o.lastRow,w=u?u.lastRow:-1;if(!u||w<o.firstRow)return this.update(o);if(m<u.firstRow)return this.update(o);if(!u||u.lastRow<o.firstRow)return this.update(o);if(o.lastRow<u.firstRow)return this.update(o);if(u.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(u.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(u.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,u.lastRow);x>0;x--)this.$lines.pop();o.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,u.firstRow-1)),o.lastRow>u.lastRow&&this.$lines.push(this.$renderLinesFragment(o,u.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(o,u,m){for(var w=[],x=u,E=this.session.getNextFoldLine(x),T=E?E.start.row:1/0;x>T&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),T=E?E.start.row:1/0),!(x>m);){var k=this.$lines.createCell(x,o,this.session),C=k.element;this.dom.removeChildren(C),p.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),p.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==T?E:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(k),x++}return w},l.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var u=o.firstRow,m=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,u,m))},l.prototype.$renderToken=function(o,u,m,w){for(var x=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,T=this.dom.createFragment(this.element),k,C=0;k=E.exec(w);){var L=k[1],R=k[2],F=k[3],I=k[4],H=k[5];if(!(!x.showSpaces&&R)){var P=C!=k.index?w.slice(C,k.index):"";if(C=k.index+k[0].length,P&&T.appendChild(this.dom.createTextNode(P,this.element)),L){var O=x.session.getScreenTabSize(u+k.index);T.appendChild(x.$tabStrings[O].cloneNode(!0)),u+=O-1}else if(R)if(x.showSpaces){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space",A.textContent=b.stringRepeat(x.SPACE_CHAR,R.length),T.appendChild(A)}else T.appendChild(this.dom.createTextNode(R,this.element));else if(F){var A=this.dom.createElement("span");A.className="ace_invisible ace_invisible_space ace_invalid",A.textContent=b.stringRepeat(x.SPACE_CHAR,F.length),T.appendChild(A)}else if(I){u+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",A.textContent=x.showSpaces?x.SPACE_CHAR:I,T.appendChild(A)}else if(H){u+=1;var A=this.dom.createElement("span");A.style.width=x.config.characterWidth*2+"px",A.className="ace_cjk",A.textContent=H,T.appendChild(A)}}}if(T.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(m.type))o.appendChild(T);else{var S="ace_"+m.type.replace(/\./g," ace_"),A=this.dom.createElement("span");m.type=="fold"&&(A.style.width=m.value.length*this.config.characterWidth+"px",A.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),A.className=S,A.appendChild(T),o.appendChild(A)}return u+w.length},l.prototype.renderIndentGuide=function(o,u,m){var w=u.search(this.$indentGuideRe);if(w<=0||w>=m)return u;if(u[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,E=0;E<x;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(w)}else if(u[0]==" "){for(var E=0;E<w;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(w)}return this.$highlightIndentGuide(),u},l.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var u=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(u.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:u.row};var x=this.session.$bracketHighlight;if(x){for(var E=this.session.$bracketHighlight.ranges,T=0;T<E.length;T++)if(u.row!==E[T].start.row){this.$highlightIndentGuideMarker.end=E[T].start.row+1,u.row>E[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[u.row]!==""&&u.column===o[u.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=u.row+1;T<o.length;T++){var k=o[T],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=T,C<=m))break}}this.$renderHighlightIndentGuide()}}},l.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),u=0;u<o.length;u++)o[u].classList.remove("ace_indent-guide-active")},l.prototype.$setIndentGuideActive=function(o,u){var m=this.session.doc.getLine(o.row);if(m!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var x=w.childNodes;if(x){var E=x[u-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var u=this.$highlightIndentGuideMarker.indentLevel;if(u!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<o.length;m++){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,u)}}else for(var m=o.length-1;m>=0;m--){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,u)}}}},l.prototype.$createLineElement=function(o){var u=this.dom.createElement("div");return u.className="ace_line",u.style.height=this.config.lineHeight+"px",u},l.prototype.$renderWrappedLine=function(o,u,m){var w=0,x=0,E=m[0],T=0,k=this.$createLineElement();o.appendChild(k);for(var C=0;C<u.length;C++){var L=u[C],R=L.value;if(C==0&&this.displayIndentGuides){if(w=R.length,R=this.renderIndentGuide(k,R,E),!R)continue;w-=R.length}if(w+R.length<E)T=this.$renderToken(k,T,L,R),w+=R.length;else{for(;w+R.length>=E;)T=this.$renderToken(k,T,L,R.substring(0,E-w)),R=R.substring(E-w),w=E,k=this.$createLineElement(),o.appendChild(k),k.appendChild(this.dom.createTextNode(b.stringRepeat(" ",m.indent),this.element)),x++,T=0,E=m[x]||Number.MAX_VALUE;R.length!=0&&(w+=R.length,T=this.$renderToken(k,T,L,R))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,T,null,"",!0)},l.prototype.$renderSimpleLine=function(o,u){for(var m=0,w=0;w<u.length;w++){var x=u[w],E=x.value;if(!(w==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(o,E),!E))){if(m+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,x,E);m=this.$renderToken(o,m,x,E)}}},l.prototype.$renderOverflowMessage=function(o,u,m,w,x){m&&this.$renderToken(o,u,m,w.slice(0,this.MAX_LINE_LENGTH-u));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=x?"<hide>":"<click to see more...>",o.appendChild(E)},l.prototype.$renderLine=function(o,u,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(u)),m)var w=this.$getFoldLineTokens(u,m);else var w=this.session.getTokens(u);var x=o;if(w.length){var E=this.session.getRowSplitData(u);if(E&&E.length){this.$renderWrappedLine(o,w,E);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){m&&(u=m.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=u==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(T)}},l.prototype.$getFoldLineTokens=function(o,u){var m=this.session,w=[];function x(T,k,C){for(var L=0,R=0;R+T[L].value.length<k;)if(R+=T[L].value.length,L++,L==T.length)return;if(R!=k){var F=T[L].value.substring(k-R);F.length>C-k&&(F=F.substring(0,C-k)),w.push({type:T[L].type,value:F}),R=k+F.length,L+=1}for(;R<C&&L<T.length;){var F=T[L].value;F.length+R>C?w.push({type:T[L].type,value:F.substring(0,C-R)}):w.push(T[L]),R+=F.length,L+=1}}var E=m.getTokens(o);return u.walk(function(T,k,C,L,R){T!=null?w.push({type:"fold",value:T}):(R&&(E=m.getTokens(k)),E.length&&x(E,L,C))},u.end.row,this.session.getLine(u.end.row).length),w},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l}();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,d.implement(c.prototype,g),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,f){var d=n("../lib/dom"),p=function(){function b(h){this.element=d.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(),d.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return b.prototype.$updateOpacity=function(h){for(var g=this.cursors,s=g.length;s--;)d.setStyle(g[s].style,"opacity",h?"":"0")},b.prototype.$startCssAnimation=function(){for(var h=this.cursors,g=h.length;g--;)h[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&d.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},b.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,d.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,d.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},b.prototype.addCursor=function(){var h=d.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,d.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.showCursor=function(){this.isVisible=!0,d.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,d.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&&d.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),d.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var g=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),g()},this.blinkInterval),g()}},b.prototype.getPixelPosition=function(h,g){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(h),a=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,h.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),c=(s.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:c}},b.prototype.isCursorInView=function(h,g){return h.top>=0&&h.top<g.maxHeight},b.prototype.update=function(h){this.config=h;var g=this.session.$selectionMarkers,s=0,a=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var s=0,c=g.length;s<c;s++){var l=this.getPixelPosition(g[s].cursor,!0);if(!((l.top>h.height+h.offset||l.top<0)&&s>1)){var o=this.cursors[a++]||this.addCursor(),u=o.style;this.drawCursor?this.drawCursor(o,l,h,g[s],this.session):this.isCursorInView(l,h)?(d.setStyle(u,"display","block"),d.translate(o,l.left,l.top),d.setStyle(u,"width",Math.round(h.characterWidth)+"px"),d.setStyle(u,"height",h.lineHeight+"px")):d.setStyle(u,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=l,this.restartTimer()},b.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},b.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},b}();p.prototype.$padding=0,p.prototype.drawCursor=null,r.Cursor=p}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,f){var d=this&&this.__extends||function(){var o=function(u,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(w[E]=x[E])},o(u,m)};return function(u,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(u,m);function w(){this.constructor=u}u.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}(),p=n("./lib/oop"),b=n("./lib/dom"),h=n("./lib/event"),g=n("./lib/event_emitter").EventEmitter,s=32768,a=function(){function o(u,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),u.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)}return o.prototype.setVisible=function(u){this.element.style.display=u?"":"none",this.isVisible=u,this.coeff=1},o}();p.implement(a.prototype,g);var c=function(o){d(u,o);function u(m,w){var x=o.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 u.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},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(m){this.element.style.height=m+"px"},u.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"},u.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},u}(a);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var l=function(o){d(u,o);function u(m,w){var x=o.call(this,m,"-h")||this;return x.scrollLeft=0,x.height=w.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return u.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},u.prototype.getHeight=function(){return this.isVisible?this.height:0},u.prototype.setWidth=function(m){this.element.style.width=m+"px"},u.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},u.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},u.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},u}(a);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=l,r.VScrollBar=c,r.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,f){var d=this&&this.__extends||function(){var l=function(o,u){return l=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])},l(o,u)};return function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");l(o,u);function m(){this.constructor=o}o.prototype=u===null?Object.create(u):(m.prototype=u.prototype,new m)}}(),p=n("./lib/oop"),b=n("./lib/dom"),h=n("./lib/event"),g=n("./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 l(o,u){this.element=b.createElement("div"),this.element.className="ace_sb"+u,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},l}();p.implement(s.prototype,g);var a=function(l){d(o,l);function o(u,m){var w=l.call(this,u,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=u,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(u,m){if(u==="mousedown"&&!(h.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,E=function(I){x=I.clientY},T=function(){clearInterval(R)},k=m.clientY,C=this.thumbTop,L=function(){if(x!==void 0){var I=w.scrollTopFromThumbTop(C+x-k);I!==w.scrollTop&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,T);var R=setInterval(L,20);return h.preventDefault(m)}var F=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(F)}),h.preventDefault(m)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(u){var m=u*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(u){this.height=Math.max(0,u),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(u,m){this.pageHeight===u&&!m||(this.pageHeight=u,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(u){this.scrollTop=u,u<0&&(u=0),this.thumbTop=u*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o}(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var c=function(l){d(o,l);function o(u,m){var w=l.call(this,u,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=m,w}return o.prototype.onMouseDown=function(u,m){if(u==="mousedown"&&!(h.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,E=function(I){x=I.clientX},T=function(){clearInterval(R)},k=m.clientX,C=this.thumbLeft,L=function(){if(x!==void 0){var I=w.scrollLeftFromThumbLeft(C+x-k);I!==w.scrollLeft&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,T);var R=setInterval(L,20);return h.preventDefault(m)}var F=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(F)}),h.preventDefault(m)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(u){var m=u*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},o.prototype.setWidth=function(u){this.width=Math.max(0,u),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(u,m){this.pageWidth===u&&!m||(this.pageWidth=u,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(u){this.scrollLeft=u,u<0&&(u=0),this.thumbLeft=u*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o}(s);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=c,r.VScrollBar=a,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,f){var d=n("./lib/event"),p=function(){function b(h,g){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var s=this;this._flush=function(a){s.pending=!1;var c=s.changes;if(c&&(d.blockIdle(100),s.changes=0,s.onRender(c)),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&&(d.nextFrame(this._flush),this.pending=!0)},b.prototype.clear=function(h){var g=this.changes;return this.changes=0,g},b}();r.RenderLoop=p}),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(n,r,f){var d=n("../lib/oop"),p=n("../lib/dom"),b=n("../lib/lang"),h=n("../lib/event"),g=n("../lib/useragent"),s=n("../lib/event_emitter").EventEmitter,a=512,c=typeof ResizeObserver=="function",l=200,o=function(){function u(m){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.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},c?this.$addObserver():this.checkForSizeChanges()}return u.prototype.$setMeasureNodeStyles=function(m,w){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",g.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=w?"hidden":"visible"},u.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})}},u.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},u.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)},u.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},u.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},u.prototype.$measureCharWidth=function(m){this.$main.textContent=b.stringRepeat(m,a);var w=this.$main.getBoundingClientRect();return w.width/a},u.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},u.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},u.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},u.prototype.$initTransformMeasureNodes=function(){var m=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=p.buildDom([m(0,0),m(l,0),m(0,l),m(l,l)],this.el)},u.prototype.transformCoordinates=function(m,w){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function E(Z,te,he){var ne=Z[1]*te[0]-Z[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function T(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function k(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function C(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function L(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var R=L(this.els[0]),F=L(this.els[1]),I=L(this.els[2]),H=L(this.els[3]),P=E(T(H,F),T(H,I),T(k(F,I),k(H,R))),O=C(1+P[0],T(F,R)),A=C(1+P[1],T(I,R));if(w){var S=w,D=P[0]*S[0]/l+P[1]*S[1]/l+1,W=k(C(S[0],O),C(S[1],A));return k(C(1/D/l,W),R)}var U=T(m,R),K=E(T(O,C(P[0],U)),T(A,C(P[1],U)),U);return C(l,K)},u}();o.prototype.$characterSize={width:0,height:0},d.implement(o.prototype,s),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,f){f.exports=`
255
+ .ace_br1 {border-top-left-radius : 3px;}
256
+ .ace_br2 {border-top-right-radius : 3px;}
257
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
258
+ .ace_br4 {border-bottom-right-radius: 3px;}
259
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
260
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
261
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
262
+ .ace_br8 {border-bottom-left-radius : 3px;}
263
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
264
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
265
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
266
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+
271
+
272
+ .ace_editor {
273
+ position: relative;
274
+ overflow: hidden;
275
+ padding: 0;
276
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
277
+ direction: ltr;
278
+ text-align: left;
279
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
280
+ forced-color-adjust: none;
281
+ }
282
+
283
+ .ace_scroller {
284
+ position: absolute;
285
+ overflow: hidden;
286
+ top: 0;
287
+ bottom: 0;
288
+ background-color: inherit;
289
+ -ms-user-select: none;
290
+ -moz-user-select: none;
291
+ -webkit-user-select: none;
292
+ user-select: none;
293
+ cursor: text;
294
+ }
295
+
296
+ .ace_content {
297
+ position: absolute;
298
+ box-sizing: border-box;
299
+ min-width: 100%;
300
+ contain: style size layout;
301
+ font-variant-ligatures: no-common-ligatures;
302
+ }
303
+ .ace_invisible {
304
+ font-variant-ligatures: none;
305
+ }
306
+
307
+ .ace_keyboard-focus:focus {
308
+ box-shadow: inset 0 0 0 2px #5E9ED6;
309
+ outline: none;
310
+ }
311
+
312
+ .ace_dragging .ace_scroller:before{
313
+ position: absolute;
314
+ top: 0;
315
+ left: 0;
316
+ right: 0;
317
+ bottom: 0;
318
+ content: '';
319
+ background: rgba(250, 250, 250, 0.01);
320
+ z-index: 1000;
321
+ }
322
+ .ace_dragging.ace_dark .ace_scroller:before{
323
+ background: rgba(0, 0, 0, 0.01);
324
+ }
325
+
326
+ .ace_gutter {
327
+ position: absolute;
328
+ overflow : hidden;
329
+ width: auto;
330
+ top: 0;
331
+ bottom: 0;
332
+ left: 0;
333
+ cursor: default;
334
+ z-index: 4;
335
+ -ms-user-select: none;
336
+ -moz-user-select: none;
337
+ -webkit-user-select: none;
338
+ user-select: none;
339
+ contain: style size layout;
340
+ }
341
+
342
+ .ace_gutter-active-line {
343
+ position: absolute;
344
+ left: 0;
345
+ right: 0;
346
+ }
347
+
348
+ .ace_scroller.ace_scroll-left:after {
349
+ content: "";
350
+ position: absolute;
351
+ top: 0;
352
+ right: 0;
353
+ bottom: 0;
354
+ left: 0;
355
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
356
+ pointer-events: none;
357
+ }
358
+
359
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
360
+ position: absolute;
361
+ top: 0;
362
+ left: 0;
363
+ right: 0;
364
+ padding-left: 19px;
365
+ padding-right: 6px;
366
+ background-repeat: no-repeat;
367
+ }
368
+
369
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
370
+ margin-left: -14px;
371
+ float: left;
372
+ }
373
+
374
+ .ace_gutter-cell .ace_gutter_annotation {
375
+ margin-left: -19px;
376
+ float: left;
377
+ }
378
+
379
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
380
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
381
+ background-repeat: no-repeat;
382
+ background-position: 2px center;
383
+ }
384
+
385
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
386
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
387
+ background-repeat: no-repeat;
388
+ background-position: 2px center;
389
+ }
390
+
391
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
392
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
393
+ background-repeat: no-repeat;
394
+ background-position: 2px center;
395
+ }
396
+
397
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
398
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
399
+ }
400
+
401
+ .ace_icon_svg.ace_error {
402
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
403
+ background-color: crimson;
404
+ }
405
+ .ace_icon_svg.ace_security {
406
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
407
+ background-color: crimson;
408
+ }
409
+ .ace_icon_svg.ace_warning {
410
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
411
+ background-color: darkorange;
412
+ }
413
+ .ace_icon_svg.ace_info {
414
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
415
+ background-color: royalblue;
416
+ }
417
+ .ace_icon_svg.ace_hint {
418
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
419
+ background-color: silver;
420
+ }
421
+
422
+ .ace_icon_svg.ace_error_fold {
423
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
424
+ background-color: crimson;
425
+ }
426
+ .ace_icon_svg.ace_security_fold {
427
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
428
+ background-color: crimson;
429
+ }
430
+ .ace_icon_svg.ace_warning_fold {
431
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
432
+ background-color: darkorange;
433
+ }
434
+
435
+ .ace_scrollbar {
436
+ contain: strict;
437
+ position: absolute;
438
+ right: 0;
439
+ bottom: 0;
440
+ z-index: 6;
441
+ }
442
+
443
+ .ace_scrollbar-inner {
444
+ position: absolute;
445
+ cursor: text;
446
+ left: 0;
447
+ top: 0;
448
+ }
449
+
450
+ .ace_scrollbar-v{
451
+ overflow-x: hidden;
452
+ overflow-y: scroll;
453
+ top: 0;
454
+ }
455
+
456
+ .ace_scrollbar-h {
457
+ overflow-x: scroll;
458
+ overflow-y: hidden;
459
+ left: 0;
460
+ }
461
+
462
+ .ace_print-margin {
463
+ position: absolute;
464
+ height: 100%;
465
+ }
466
+
467
+ .ace_text-input {
468
+ position: absolute;
469
+ z-index: 0;
470
+ width: 0.5em;
471
+ height: 1em;
472
+ opacity: 0;
473
+ background: transparent;
474
+ -moz-appearance: none;
475
+ appearance: none;
476
+ border: none;
477
+ resize: none;
478
+ outline: none;
479
+ overflow: hidden;
480
+ font: inherit;
481
+ padding: 0 1px;
482
+ margin: 0 -1px;
483
+ contain: strict;
484
+ -ms-user-select: text;
485
+ -moz-user-select: text;
486
+ -webkit-user-select: text;
487
+ user-select: text;
488
+ /*with \`pre-line\` chrome inserts &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: fixed;
706
+ z-index: 999999;
707
+ box-sizing: border-box;
708
+ cursor: default;
709
+ white-space: pre-wrap;
710
+ word-wrap: break-word;
711
+ line-height: normal;
712
+ font-style: normal;
713
+ font-weight: normal;
714
+ letter-spacing: normal;
715
+ pointer-events: none;
716
+ overflow: auto;
717
+ max-width: min(33em, 66vw);
718
+ overscroll-behavior: contain;
719
+ }
720
+ .ace_tooltip pre {
721
+ white-space: pre-wrap;
722
+ }
723
+
724
+ .ace_tooltip.ace_dark {
725
+ background-color: #636363;
726
+ color: #fff;
727
+ }
728
+
729
+ .ace_tooltip:focus {
730
+ outline: 1px solid #5E9ED6;
731
+ }
732
+
733
+ .ace_icon {
734
+ display: inline-block;
735
+ width: 18px;
736
+ vertical-align: top;
737
+ }
738
+
739
+ .ace_icon_svg {
740
+ display: inline-block;
741
+ width: 12px;
742
+ vertical-align: top;
743
+ -webkit-mask-repeat: no-repeat;
744
+ -webkit-mask-size: 12px;
745
+ -webkit-mask-position: center;
746
+ }
747
+
748
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
749
+ padding-right: 13px;
750
+ }
751
+
752
+ .ace_fold-widget, .ace_custom-widget {
753
+ box-sizing: border-box;
754
+
755
+ margin: 0 -12px 0 1px;
756
+ display: none;
757
+ width: 11px;
758
+ vertical-align: top;
759
+
760
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
761
+ background-repeat: no-repeat;
762
+ background-position: center;
763
+
764
+ border-radius: 3px;
765
+
766
+ border: 1px solid transparent;
767
+ cursor: pointer;
768
+ }
769
+
770
+ .ace_custom-widget {
771
+ background: none;
772
+ }
773
+
774
+ .ace_folding-enabled .ace_fold-widget {
775
+ display: inline-block;
776
+ }
777
+
778
+ .ace_fold-widget.ace_end {
779
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
780
+ }
781
+
782
+ .ace_fold-widget.ace_closed {
783
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
784
+ }
785
+
786
+ .ace_fold-widget:hover {
787
+ border: 1px solid rgba(0, 0, 0, 0.3);
788
+ background-color: rgba(255, 255, 255, 0.2);
789
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
790
+ }
791
+
792
+ .ace_fold-widget:active {
793
+ border: 1px solid rgba(0, 0, 0, 0.4);
794
+ background-color: rgba(0, 0, 0, 0.05);
795
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
796
+ }
797
+ /**
798
+ * Dark version for fold widgets
799
+ */
800
+ .ace_dark .ace_fold-widget {
801
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
802
+ }
803
+ .ace_dark .ace_fold-widget.ace_end {
804
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
805
+ }
806
+ .ace_dark .ace_fold-widget.ace_closed {
807
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
808
+ }
809
+ .ace_dark .ace_fold-widget:hover {
810
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
811
+ background-color: rgba(255, 255, 255, 0.1);
812
+ }
813
+ .ace_dark .ace_fold-widget:active {
814
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
+ }
816
+
817
+ .ace_inline_button {
818
+ border: 1px solid lightgray;
819
+ display: inline-block;
820
+ margin: -1px 8px;
821
+ padding: 0 5px;
822
+ pointer-events: auto;
823
+ cursor: pointer;
824
+ }
825
+ .ace_inline_button:hover {
826
+ border-color: gray;
827
+ background: rgba(200,200,200,0.2);
828
+ display: inline-block;
829
+ pointer-events: auto;
830
+ }
831
+
832
+ .ace_fold-widget.ace_invalid {
833
+ background-color: #FFB4B4;
834
+ border-color: #DE5555;
835
+ }
836
+
837
+ .ace_fade-fold-widgets .ace_fold-widget {
838
+ transition: opacity 0.4s ease 0.05s;
839
+ opacity: 0;
840
+ }
841
+
842
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
843
+ transition: opacity 0.05s ease 0.05s;
844
+ opacity:1;
845
+ }
846
+
847
+ .ace_underline {
848
+ text-decoration: underline;
849
+ }
850
+
851
+ .ace_bold {
852
+ font-weight: bold;
853
+ }
854
+
855
+ .ace_nobold .ace_bold {
856
+ font-weight: normal;
857
+ }
858
+
859
+ .ace_italic {
860
+ font-style: italic;
861
+ }
862
+
863
+
864
+ .ace_error-marker {
865
+ background-color: rgba(255, 0, 0,0.2);
866
+ position: absolute;
867
+ z-index: 9;
868
+ }
869
+
870
+ .ace_highlight-marker {
871
+ background-color: rgba(255, 255, 0,0.2);
872
+ position: absolute;
873
+ z-index: 8;
874
+ }
875
+
876
+ .ace_mobile-menu {
877
+ position: absolute;
878
+ line-height: 1.5;
879
+ border-radius: 4px;
880
+ -ms-user-select: none;
881
+ -moz-user-select: none;
882
+ -webkit-user-select: none;
883
+ user-select: none;
884
+ background: white;
885
+ box-shadow: 1px 3px 2px grey;
886
+ border: 1px solid #dcdcdc;
887
+ color: black;
888
+ }
889
+ .ace_dark > .ace_mobile-menu {
890
+ background: #333;
891
+ color: #ccc;
892
+ box-shadow: 1px 3px 2px grey;
893
+ border: 1px solid #444;
894
+
895
+ }
896
+ .ace_mobile-button {
897
+ padding: 2px;
898
+ cursor: pointer;
899
+ overflow: hidden;
900
+ }
901
+ .ace_mobile-button:hover {
902
+ background-color: #eee;
903
+ opacity:1;
904
+ }
905
+ .ace_mobile-button:active {
906
+ background-color: #ddd;
907
+ }
908
+
909
+ .ace_placeholder {
910
+ position: relative;
911
+ font-family: arial;
912
+ transform: scale(0.9);
913
+ transform-origin: left;
914
+ white-space: pre;
915
+ opacity: 0.7;
916
+ margin: 0 10px;
917
+ z-index: 1;
918
+ }
919
+
920
+ .ace_ghost_text {
921
+ opacity: 0.5;
922
+ font-style: italic;
923
+ }
924
+
925
+ .ace_ghost_text_container > div {
926
+ white-space: pre;
927
+ }
928
+
929
+ .ghost_text_line_wrapped::after {
930
+ content: "↩";
931
+ position: absolute;
932
+ }
933
+
934
+ .ace_lineWidgetContainer.ace_ghost_text {
935
+ margin: 0px 4px
936
+ }
937
+
938
+ .ace_screenreader-only {
939
+ position:absolute;
940
+ left:-10000px;
941
+ top:auto;
942
+ width:1px;
943
+ height:1px;
944
+ overflow:hidden;
945
+ }
946
+
947
+ .ace_hidden_token {
948
+ display: none;
949
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var d=n("../lib/dom"),p=n("../lib/oop"),b=n("../lib/event_emitter").EventEmitter,h=function(){function g(s,a){this.canvas=d.createElement("canvas"),this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.canvasHeight=s.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=s.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},s.element.appendChild(this.canvas)}return g.prototype.$updateDecorators=function(s){var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(s){this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height;var c=(s.lastRow+1)*this.lineHeight;c<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var l=this.canvas.getContext("2d");function o(H,P){return H.priority<P.priority?-1:H.priority>P.priority?1:0}var u=this.renderer.session.$annotations;if(l.clearRect(0,0,this.canvas.width,this.canvas.height),u){var m={info:1,warning:2,error:3};u.forEach(function(H){H.priority=m[H.type]||null}),u=u.sort(o);for(var w=this.renderer.session.$foldData,x=0;x<u.length;x++){var E=u[x].row,T=this.compensateFoldRows(E,w),k=Math.round((E-T)*this.lineHeight*this.heightRatio),C=Math.round((E-T)*this.lineHeight*this.heightRatio),L=Math.round(((E-T)*this.lineHeight+this.lineHeight)*this.heightRatio),R=L-C;if(R<this.minDecorationHeight){var F=(C+L)/2|0;F<this.halfMinDecorationHeight?F=this.halfMinDecorationHeight:F+this.halfMinDecorationHeight>this.canvasHeight&&(F=this.canvasHeight-this.halfMinDecorationHeight),C=Math.round(F-this.halfMinDecorationHeight),L=Math.round(F+this.halfMinDecorationHeight)}l.fillStyle=a[u[x].type]||null,l.fillRect(0,k,this.canvasWidth,L-C)}}var I=this.renderer.session.selection.getCursor();if(I){var T=this.compensateFoldRows(I.row,w),k=Math.round((I.row-T)*this.lineHeight*this.heightRatio);l.fillStyle="rgba(0, 0, 0, 0.5)",l.fillRect(0,k,this.canvasWidth,2)}},g.prototype.compensateFoldRows=function(s,a){var c=0;if(a&&a.length>0)for(var l=0;l<a.length;l++)s>a[l].start.row&&s<a[l].end.row?c+=s-a[l].start.row:s>=a[l].end.row&&(c+=a[l].end.row-a[l].start.row);return c},g}();p.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(n,r,f){var d=n("./lib/oop"),p=n("./lib/dom"),b=n("./lib/lang"),h=n("./config"),g=n("./layer/gutter").Gutter,s=n("./layer/marker").Marker,a=n("./layer/text").Text,c=n("./layer/cursor").Cursor,l=n("./scrollbar").HScrollBar,o=n("./scrollbar").VScrollBar,u=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,w=n("./renderloop").RenderLoop,x=n("./layer/font_metrics").FontMetrics,E=n("./lib/event_emitter").EventEmitter,T=n("./css/editor-css"),k=n("./layer/decorators").Decorator,C=n("./lib/useragent"),L=n("./layer/text_util").isTextToken;p.importCssString(T,"ace_editor.css",!1);var R=function(){function F(I,H){var P=this;this.container=I||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(H),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new g(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var O=this.$textLayer=new a(this.content);this.canvas=O.element,this.$markerFront=new s(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new l(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 F.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},F.prototype.setSession=function(I){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=I,I&&this.scrollMargin.top&&I.getScrollTop()<=0&&I.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(I),this.$markerBack.setSession(I),this.$markerFront.setSession(I),this.$gutterLayer.setSession(I),this.$textLayer.setSession(I),I&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},F.prototype.updateLines=function(I,H,P){if(H===void 0&&(H=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<H&&(this.$changedLines.lastRow=H)):this.$changedLines={firstRow:I,lastRow:H},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},F.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},F.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},F.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},F.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},F.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},F.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},F.prototype.onResize=function(I,H,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var 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(I,H,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?this.$renderChanges(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)}},F.prototype.$updateCachedSize=function(I,H,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&&(I||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&&(I||S.width!=P)){A|=this.CHANGE_SIZE,S.width=P,H==null&&(H=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=H,p.setStyle(this.scrollBarH.element.style,"left",H+"px"),p.setStyle(this.scroller.style,"left",H+this.margin.left+"px"),S.scrollerWidth=Math.max(0,P-H-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var W=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",W),p.setStyle(this.scroller.style,"right",W),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(A|=this.CHANGE_FULL)}return S.$dirty=!P||!O,A&&this._signal("resize",D),A},F.prototype.onGutterResize=function(I){var H=this.$showGutter?I:0;H!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,H,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},F.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,H=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(H,this.$showPrintMargin&&this.$printMarginColumn)},F.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},F.prototype.getAnimatedScroll=function(){return this.$animatedScroll},F.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},F.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},F.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},F.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},F.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},F.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},F.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},F.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},F.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},F.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},F.prototype.getShowGutter=function(){return this.getOption("showGutter")},F.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},F.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=p.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,this.content.firstChild)}var H=this.$printMarginEl.style;H.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",H.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},F.prototype.getContainerElement=function(){return this.container},F.prototype.getMouseEventTarget=function(){return this.scroller},F.prototype.getTextAreaContainer=function(){return this.container},F.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,H=this.$composition;if(!this.$keepTextAreaAtCursor&&!H){p.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){H&&H.markerRange&&(P=this.$cursorLayer.getPixelPosition(H.markerRange.start,!0));var O=this.layerConfig,A=P.top,S=P.left;A-=O.offset;var D=H&&H.useTextareaForIME||C.isMobile?this.lineHeight:1;if(A<0||A>O.height-D){p.translate(this.textarea,0,0);return}var W=1,U=this.$size.height-D;if(!H)A+=this.lineHeight;else if(H.useTextareaForIME){var K=this.textarea.value;W=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else A+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-W&&(S=this.$size.scrollerWidth-W),S+=this.gutterWidth+this.margin.left,p.setStyle(I,"height",D+"px"),p.setStyle(I,"width",W+"px"),p.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-W),Math.min(A,U))}}},F.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},F.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},F.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,H=I.lastRow,P=this.session.documentToScreenRow(H,0)*I.lineHeight;return P-this.session.getScrollTop()>I.height-I.lineHeight?H-1:H},F.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},F.prototype.setPadding=function(I){this.$padding=I,this.$textLayer.setPadding(I),this.$cursorLayer.setPadding(I),this.$markerFront.setPadding(I),this.$markerBack.setPadding(I),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},F.prototype.setScrollMargin=function(I,H,P,O){var A=this.scrollMargin;A.top=I|0,A.bottom=H|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()},F.prototype.setMargin=function(I,H,P,O){var A=this.margin;A.top=I|0,A.bottom=H|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()},F.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},F.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},F.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},F.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},F.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,H=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(H-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-H&&(I=this.scrollTop+H,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},F.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},F.prototype.freeze=function(){this.$frozen=!0},F.prototype.unfreeze=function(){this.$frozen=!1},F.prototype.$renderChanges=function(I,H){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!H){this.$changes|=I;return}if(this.$size.$dirty)return this.$changes|=I,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",I),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(I&this.CHANGE_FULL||I&this.CHANGE_SIZE||I&this.CHANGE_TEXT||I&this.CHANGE_LINES||I&this.CHANGE_SCROLL||I&this.CHANGE_H_SCROLL){if(I|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,I=I|this.CHANGE_SCROLL,I|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),p.translate(this.content,-this.scrollLeft,-P.offset);var A=P.width+2*this.$padding+"px",S=P.minHeight+"px";p.setStyle(this.content.style,"width",A),p.setStyle(this.content.style,"height",S)}if(I&this.CHANGE_H_SCROLL&&(p.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),I&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}if(I&this.CHANGE_SCROLL){this.$changedLines=null,I&this.CHANGE_TEXT||I&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(I&this.CHANGE_GUTTER||I&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}I&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_LINES?((this.$updateLines()||I&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_TEXT||I&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),I&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",I)},F.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,H=this.$maxLines*this.lineHeight,P=Math.min(H,Math.max((this.$minLines||1)*this.lineHeight,I))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var O=P<=2*this.lineHeight,A=!O&&I>H;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")}},F.prototype.$computeLayerConfig=function(){var I=this.session,H=this.$size,P=H.height<=2*this.lineHeight,O=this.session.getScreenLength(),A=O*this.lineHeight,S=this.$getLongestLine(),D=!P&&(this.$hScrollBarAlwaysVisible||H.scrollerWidth-S-2*this.$padding<0),W=this.$horizScroll!==D;W&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=H.height<=2*this.lineHeight);var K=H.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(H.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,A-H.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,S+2*this.$padding-H.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||H.scrollerHeight-A+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var ae=this.scrollTop%this.lineHeight,ue=Math.ceil(K/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-ae)/this.lineHeight)),ge=ce+ue,Te,$e,Ee=this.lineHeight;ce=I.screenToDocumentRow(ce,0);var Ze=I.getFoldLine(ce);Ze&&(ce=Ze.start.row),Te=I.documentToScreenRow(ce,0),$e=I.getRowLength(ce)*Ee,ge=Math.min(I.screenToDocumentRow(ge,0),I.getLength()-1),K=H.scrollerHeight+I.getRowLength(ge)*Ee+$e,ae=this.scrollTop-Te*Ee;var Xe=0;return(this.layerConfig.width!=S||W)&&(Xe=this.CHANGE_H_SCROLL),(W||ne)&&(Xe|=this.$updateCachedSize(!0,this.gutterWidth,H.width,H.height),this._signal("scrollbarVisibilityChanged"),ne&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:ce,firstRowScreen:Te,lastRow:ge,lineHeight:Ee,characterWidth:this.characterWidth,minHeight:K,maxHeight:A,offset:ae,gutterOffset:Ee?Math.max(0,Math.ceil((ae+H.height-H.scrollerHeight)/Ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Xe},F.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,H=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(I>P.lastRow+1)&&!(H<P.firstRow)){if(H===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,I,H),!0}}},F.prototype.$getLongestLine=function(){var I=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(I+=1),this.$textLayer&&I>this.$textLayer.MAX_LINE_LENGTH&&(I=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(I*this.characterWidth))},F.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},F.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},F.prototype.addGutterDecoration=function(I,H){this.$gutterLayer.addGutterDecoration(I,H)},F.prototype.removeGutterDecoration=function(I,H){this.$gutterLayer.removeGutterDecoration(I,H)},F.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},F.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},F.prototype.showCursor=function(){this.$cursorLayer.showCursor()},F.prototype.scrollSelectionIntoView=function(I,H,P){this.scrollCursorIntoView(I,P),this.scrollCursorIntoView(H,P)},F.prototype.scrollCursorIntoView=function(I,H,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(I),A=O.left,S=O.top,D=P&&P.top||0,W=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>S?(H&&U+D>S+this.lineHeight&&(S-=H*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):U+this.$size.scrollerHeight-W<S+this.lineHeight&&(H&&U+this.$size.scrollerHeight-W<S-this.lineHeight&&(S+=H*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight+W-this.$size.scrollerHeight));var K=this.scrollLeft,Z=2*this.layerConfig.characterWidth;A-Z<K?(A-=Z,A<this.$padding+Z&&(A=-this.scrollMargin.left),this.session.setScrollLeft(A)):(A+=Z,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))}},F.prototype.getScrollTop=function(){return this.session.getScrollTop()},F.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},F.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},F.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},F.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},F.prototype.alignCursor=function(I,H){typeof I=="number"&&(I={row:I,column:0});var P=this.$cursorLayer.getPixelPosition(I),O=this.$size.scrollerHeight-this.lineHeight,A=P.top-O*(H||0);return this.session.setScrollTop(A),A},F.prototype.$calcSteps=function(I,H){var P=0,O=this.STEPS,A=[],S=function(D,W,U){return U*(Math.pow(D-1,3)+1)+W};for(P=0;P<O;++P)A.push(S(P/this.STEPS,I,H-I));return A},F.prototype.scrollToLine=function(I,H,P,O){var A=this.$cursorLayer.getPixelPosition({row:I,column:0}),S=A.top;H&&(S-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(S),P!==!1&&this.animateScrolling(D,O)},F.prototype.animateScrolling=function(I,H){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(I==P)return;if(this.$scrollAnimation){var A=this.$scrollAnimation.steps;if(A.length&&(I=A[0],I==P))return}var S=O.$calcSteps(I,P);this.$scrollAnimation={from:I,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,H&&H()}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)},F.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},F.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},F.prototype.scrollTo=function(I,H){this.session.setScrollTop(H),this.session.setScrollLeft(I)},F.prototype.scrollBy=function(I,H){H&&this.session.setScrollTop(this.session.getScrollTop()+H),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},F.prototype.isScrollableBy=function(I,H){if(H<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||H>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||I<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||I>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},F.prototype.pixelToScreenCoordinates=function(I,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,H]);I=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var A=I+this.scrollLeft-P.left-this.$padding,S=A/this.characterWidth,D=Math.floor((H+this.scrollTop-P.top)/this.lineHeight),W=this.$blockCursor?Math.floor(S):Math.round(S);return{row:D,column:W,side:S-W>0?1:-1,offsetX:A}},F.prototype.screenToTextCoordinates=function(I,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,H]);I=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var A=I+this.scrollLeft-P.left-this.$padding,S=A/this.characterWidth,D=this.$blockCursor?Math.floor(S):Math.round(S),W=Math.floor((H+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(W,Math.max(D,0),A)},F.prototype.textToScreenCoordinates=function(I,H){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(I,H),A=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,I)?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}},F.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},F.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},F.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):I.markerId=this.session.addMarker(I.markerRange,"ace_composition_marker","text")},F.prototype.setCompositionText=function(I){var H=this.session.selection.cursor;this.addToken(I,"composition_placeholder",H.row,H.column),this.$moveTextAreaToCursor()},F.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),p.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},F.prototype.setGhostText=function(I,H){var P=this.session.selection.cursor,O=H||{row:P.row,column:P.column};this.removeGhostText();var A=this.$calculateWrappedTextChunks(I,O);this.addToken(A[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:I,position:{row:O.row,column:O.column}};var S=p.createElement("div");if(A.length>1){var D=this.hideTokensAfterPosition(O.row,O.column),W;A.slice(1).forEach(function(ne){var ae=p.createElement("div"),ue=p.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(ae.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(p.createTextNode(ne.text)),ae.appendChild(ue),S.appendChild(ae),W=ae}),D.forEach(function(ne){var ae=p.createElement("span");L(ne.type)||(ae.className="ace_"+ne.type.replace(/\./g," ace_")),ae.appendChild(p.createTextNode(ne.value)),W.appendChild(ae)}),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,Z=K.getBoundingClientRect().height,te=A.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,(A.length-1)*this.lineHeight):this.scrollToRow(O.row)}},F.prototype.$calculateWrappedTextChunks=function(I,H){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var A=I.split(/\r?\n/),S=[],D=0;D<A.length;D++){var W=this.session.$getDisplayTokens(A[D],H.column),U=this.session.$computeWrapSplits(W,O,this.session.$tabSize);if(U.length>0){var K=0;U.push(A[D].length);for(var Z=0;Z<U.length;Z++){var te=A[D].slice(K,U[Z]);S.push({text:te,wrapped:!0}),K=U[Z]}}else S.push({text:A[D],wrapped:!1})}return S},F.prototype.removeGhostText=function(){if(this.$ghostText){var I=this.$ghostText.position;this.removeExtraToken(I.row,I.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},F.prototype.addToken=function(I,H,P,O){var A=this.session;A.bgTokenizer.lines[P]=null;var S={type:H,value:I},D=A.getTokens(P);if(O==null||!D.length)D.push(S);else for(var W=0,U=0;U<D.length;U++){var K=D[U];if(W+=K.value.length,O<=W){var Z=K.value.length-(W-O),te=K.value.slice(0,Z),he=K.value.slice(Z);D.splice(U,1,{type:K.type,value:te},S,{type:K.type,value:he});break}}this.updateLines(P,P)},F.prototype.hideTokensAfterPosition=function(I,H){for(var P=this.session.getTokens(I),O=0,A=!1,S=[],D=0;D<P.length;D++){var W=P[D];if(O+=W.value.length,W.type!=="ghost_text"){if(A){S.push({type:W.type,value:W.value}),W.type="hidden_token";continue}O===H&&(A=!0)}}return this.updateLines(I,I),S},F.prototype.removeExtraToken=function(I,H){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},F.prototype.setTheme=function(I,H){var P=this;if(this.$themeId=I,P._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var O=I||this.$options.theme.initialValue;h.loadModule(["theme",O],A)}else A(I);function A(S){if(P.$themeId!=I)return H&&H();if(!S||!S.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");S.$id&&(P.$themeId=S.$id),p.importCssString(S.cssText,S.cssClass,P.container),P.theme&&p.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,p.addCssClass(P.container,S.cssClass),p.setCssClass(P.container,"ace_dark",S.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:S}),H&&H(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},F.prototype.getTheme=function(){return this.$themeId},F.prototype.setStyle=function(I,H){p.setCssClass(this.container,I,H!==!1)},F.prototype.unsetStyle=function(I){p.removeCssClass(this.container,I)},F.prototype.setCursorStyle=function(I){p.setStyle(this.scroller.style,"cursor",I)},F.prototype.setMouseCursor=function(I){p.setStyle(this.scroller.style,"cursor",I)},F.prototype.attachToShadowRoot=function(){p.importCssString(T,"ace_editor.css",this.container)},F.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},F.prototype.$updateCustomScrollbar=function(I){var H=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,I===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}),this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}))},F.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=b.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(H){var P=H[0].contentRect.width,O=H[0].contentRect.height;Math.abs(I.$size.width-P)>1||Math.abs(I.$size.height-O)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},F}();R.prototype.CHANGE_CURSOR=1,R.prototype.CHANGE_MARKER=2,R.prototype.CHANGE_GUTTER=4,R.prototype.CHANGE_SCROLL=8,R.prototype.CHANGE_LINES=16,R.prototype.CHANGE_TEXT=32,R.prototype.CHANGE_SIZE=64,R.prototype.CHANGE_MARKER_BACK=128,R.prototype.CHANGE_MARKER_FRONT=256,R.prototype.CHANGE_FULL=512,R.prototype.CHANGE_H_SCROLL=1024,R.prototype.$changes=0,R.prototype.$padding=null,R.prototype.$frozen=!1,R.prototype.STEPS=8,d.implement(R.prototype,E),h.defineOptions(R.prototype,"renderer",{useResizeObserver:{set:function(F){!F&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):F&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(F){this.$textLayer.setShowInvisibles(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(F){typeof F=="number"&&(this.$printMarginColumn=F),this.$showPrintMargin=!!F,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(F){this.$gutter.style.display=F?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(F){this.$gutterLayer.$useSvgGutterIcons=F},initialValue:!1},showFoldedAnnotations:{set:function(F){this.$gutterLayer.$showFoldedAnnotations=F},initialValue:!1},fadeFoldWidgets:{set:function(F){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",F)},initialValue:!1},showFoldWidgets:{set:function(F){this.$gutterLayer.setShowFoldWidgets(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(F){this.$textLayer.setDisplayIndentGuides(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(F){this.$textLayer.setHighlightIndentGuides(F)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(F){this.$gutterLayer.setHighlightGutterLine(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(F){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(F){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(F){typeof F=="number"&&(F=F+"px"),this.container.style.fontSize=F,this.updateFontSize()},initialValue:12},fontFamily:{set:function(F){this.container.style.fontFamily=F,this.updateFontSize()}},maxLines:{set:function(F){this.updateFull()}},minLines:{set:function(F){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(F){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(F){F=+F||0,this.$scrollPastEnd!=F&&(this.$scrollPastEnd=F,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(F){this.$gutterLayer.$fixedWidth=!!F,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(F){this.$updateCustomScrollbar(F)},initialValue:!1},theme:{set:function(F){this.setTheme(F)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=R}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,f){var d=n("../lib/oop"),p=n("../lib/net"),b=n("../lib/event_emitter").EventEmitter,h=n("../config");function g(l){var o="importScripts('"+p.qualifyURL(l)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new u;return m.append(o),m.getBlob("application/javascript")}}function s(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var o=g(l),u=window.URL||window.webkitURL,m=u.createObjectURL(o);return new Worker(m)}return new Worker(l)}var a=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,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(){d.implement(this,b),this.$createWorkerFromOldConfig=function(l,o,u,m,w){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),h.get("packaged")||!n.toUrl)m=m||h.moduleUrl(o,"worker");else{var x=this.$normalizePath;m=m||x(n.toUrl("ace/worker/worker.js",null,"_"));var E={};l.forEach(function(T){E[T]=x(n.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:E,module:o,classname:u}),this.$worker},this.onMessage=function(l){var o=l.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var u=this.callbacks[o.id];u&&(u(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return p.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,o){this.$worker.postMessage({command:l,args:o})},this.call=function(l,o,u){if(u){var m=this.callbackId++;this.callbacks[m]=u,o.push(m)}this.send(l,o)},this.emit=function(l,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:o.data}})}catch(u){console.error(u.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(a.prototype);var c=function(l,o,u){var m=null,w=!1,x=Object.create(b),E=[],T=new a({messageBuffer:E,terminate:function(){},postMessage:function(C){E.push(C),m&&(w?setTimeout(k):k())}});T.setEmitSync=function(C){w=C};var k=function(){var C=E.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){T.onMessage({data:C})},x.callback=function(C,L){this.postMessage({type:"call",id:L,data:C})},x.emit=function(C,L){this.postMessage({type:"event",name:C,data:L})},h.loadModule(["worker",o],function(C){for(m=new C[u](x);E.length;)k()}),T};r.UIWorkerClient=c,r.WorkerClient=a,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,f){var d=n("./range").Range,p=n("./lib/event_emitter").EventEmitter,b=n("./lib/oop"),h=function(){function g(s,a,c,l,o,u){var m=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=o,this.othersClass=u,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=c;var w=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var s=this,a=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=c.addMarker(new d(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var u=a.createAnchor(o.row,o.column);u.$insertRight=!0,u.detach(),s.others.push(u)}),c.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,a=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=s.addMarker(new d(c.row,c.column,c.row,c.column+a.length),a.othersClass,null,!1)})}},g.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},g.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var a=s;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var c=s.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,l=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,o=a.start.column-this.pos.column;if(this.updateAnchors(s),l&&(this.length+=c),l&&!this.session.$fromUndo){if(s.action==="insert")for(var u=this.others.length-1;u>=0;u--){var m=this.others[u],w={row:m.row,column:m.column+o};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var u=this.others.length-1;u>=0;u--){var m=this.others[u],w={row:m.row,column:m.column+o};this.doc.remove(new d(w.row,w.column,w.row,w.column-c))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var a=this.others.length;a--;)this.others[a].onChange(s);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var s=this,a=this.session,c=function(o,u){a.removeMarker(o.markerId),o.markerId=a.addMarker(new d(o.row,o.column,o.row,o.column+s.length),u,null,!1)};c(this.pos,this.mainClass);for(var l=this.others.length;l--;)c(this.others[l],this.othersClass)}},g.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))}},g.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},g.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),a=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,c=0;c<a;c++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g}();b.implement(h.prototype,p),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var d=n("../lib/event"),p=n("../lib/useragent");function b(g,s){return g.row==s.row&&g.column==s.column}function h(g){var s=g.domEvent,a=s.altKey,c=s.shiftKey,l=s.ctrlKey,o=g.getAccelKey(),u=g.getButton();if(l&&p.isMac&&(u=s.button),g.editor.inMultiSelectMode&&u==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!l&&!a&&!o){u===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(u===0){var m=g.editor,w=m.selection,x=m.inMultiSelectMode,E=g.getDocumentPosition(),T=w.getCursor(),k=g.inSelection()||w.isEmpty()&&b(E,T),C=g.x,L=g.y,R=function(te){C=te.clientX,L=te.clientY},F=m.session,I=m.renderer.pixelToScreenCoordinates(C,L),H=I,P;if(m.$mouseHandler.$enableJumpToDef)l&&a||o&&a?P=c?"block":"add":a&&m.$blockSelectEnabled&&(P="block");else if(o&&!a){if(P="add",!x&&c)return}else a&&m.$blockSelectEnabled&&(P="block");if(P&&p.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(E);m.inVirtualSelectionMode=!0,c&&(A=null,O=w.ranges[0]||O,m.removeSelectionMarker(O)),m.once("mouseup",function(){var te=w.toOrientedRange();A&&te.isEmpty()&&b(A.cursor,te.cursor)?w.substractPoint(te.cursor):(c?w.substractPoint(O.cursor):O&&(m.removeSelectionMarker(O),w.addRange(O)),w.addRange(te)),m.inVirtualSelectionMode=!1})}else if(P=="block"){g.stop(),m.inVirtualSelectionMode=!0;var S,D=[],W=function(){var te=m.renderer.pixelToScreenCoordinates(C,L),he=F.screenToDocumentPosition(te.row,te.column,te.offsetX);b(H,te)&&b(he,w.lead)||(H=te,m.selection.moveToPosition(he),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(D),D=w.rectangularRangeBlock(H,I),m.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=m.$mouseHandler.$clickSelection.clone()),D.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!o?w.toSingleRange():!x&&o&&(S=w.toOrientedRange(),m.addSelectionMarker(S)),c?I=F.documentToScreenPosition(w.lead):w.moveToPosition(E),H={row:-1,column:-1};var U=function(te){W(),clearInterval(Z),m.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),S&&(m.removeSelectionMarker(S),w.toSingleRange(S));for(var he=0;he<D.length;he++)w.addRange(D[he]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},K=W;d.capture(m.container,R,U);var Z=setInterval(function(){K()},20);return g.preventDefault()}}}r.onMouseDown=h}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,f){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(p){p.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(p){p.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(p){p.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(p){p.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(p){p.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(p){p.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(p){p.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(p){p.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(p){p.multiSelect.rangeCount>1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.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(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var d=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new d(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(n,r,f){var d=n("./range_list").RangeList,p=n("./range").Range,b=n("./selection").Selection,h=n("./mouse/multi_select_handler").onMouseDown,g=n("./lib/event"),s=n("./lib/lang"),a=n("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var c=n("./search").Search,l=new c;function o(T,k,C){return l.$options.wrap=!0,l.$options.needle=k,l.$options.backwards=C==-1,l.find(T)}var u=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,k){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}T.cursor||(T.cursor=T.end);var L=this.rangeList.add(T);return this.$onAddRange(T),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var k=this.rangeList.substractPoint(T);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();T.push(k),this.rangeCount=0}for(var C=T.length;C--;){var L=this.ranges.indexOf(T[C]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],k=[],C=0;C<T.length;C++){var L=T[C],R=L.start.row,F=L.end.row;if(R===F)k.push(L.clone());else{for(k.push(new p(R,L.start.column,R,this.session.getLine(R).length));++R<F;)k.push(this.getLineRange(R,!0));k.push(new p(F,0,F,L.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var T=this.rangeList.ranges,k=T[T.length-1],C=p.fromPoints(T[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,k=T[T.length-1],C=p.fromPoints(T[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var L=this.session.documentToScreenPosition(this.cursor),R=this.session.documentToScreenPosition(this.anchor),F=this.rectangularRangeBlock(L,R);F.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,k,C){var L=[],R=T.column<k.column;if(R)var F=T.column,I=k.column,H=T.offsetX,P=k.offsetX;else var F=k.column,I=T.column,H=k.offsetX,P=T.offsetX;var O=T.row<k.row;if(O)var A=T.row,S=k.row;else var A=k.row,S=T.row;F<0&&(F=0),A<0&&(A=0),A==S&&(C=!0);for(var D,W=A;W<=S;W++){var U=p.fromPoints(this.session.screenToDocumentPosition(W,F,H),this.session.screenToDocumentPosition(W,I,P));if(U.isEmpty()){if(D&&w(U.end,D))break;D=U.end}U.cursor=R?U.start:U.end,L.push(U)}if(O&&L.reverse(),!C){for(var K=L.length-1;L[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;L[Z].isEmpty();)Z++;for(var te=K;te>=Z;te--)L[te].isEmpty()&&L.splice(te,1)}return L}}).call(b.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var k=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",k),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var k=this.session.$selectionMarkers.indexOf(T);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var k=this.session.$selectionMarkers,C=T.length;C--;){var L=T[C];if(L.marker){this.session.removeMarker(L.marker);var R=k.indexOf(L);R!=-1&&k.splice(R,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(T){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(T){var k=T.command,C=T.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?L=C.forEachSelection(k,T.args):k.multiSelectAction=="forEachLine"?L=C.forEachSelection(k,T.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),L=k.exec(C,T.args||{})):L=k.multiSelectAction(C,T.args||{});else{var L=k.exec(C,T.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function(T,k,C){if(!this.inVirtualSelectionMode){var L=C&&C.keepOrder,R=C==!0||C&&C.$byLines,F=this.session,I=this.selection,H=I.rangeList,P=(L?I:H).ranges,O;if(!P.length)return T.exec?T.exec(this,k||{}):T(this,k||{});var A=I._eventRegistry;I._eventRegistry={};var S=new b(F);this.inVirtualSelectionMode=!0;for(var D=P.length;D--;){if(R)for(;D>0&&P[D].start.row==P[D-1].end.row;)D--;S.fromOrientedRange(P[D]),S.index=D,this.selection=F.selection=S;var W=T.exec?T.exec(this,k||{}):T(this,k||{});!O&&W!==void 0&&(O=W),S.toOrientedRange(P[D])}S.detach(),this.selection=F.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=A,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],L=0;L<k.length;L++)C.push(this.session.getTextRange(k[L]));var R=this.session.getDocument().getNewLineCharacter();T=C.join(R),T.length==(C.length-1)*R.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var L=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;L.row!=k.row||this.session.$clipPositionToDocument(L.row,L.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,k,C){if(k=k||{},k.needle=T||k.needle,k.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(L)}this.$search.set(k);var R=this.$search.findAll(this.session);if(!R.length)return 0;var F=this.multiSelect;C||F.toSingleRange(R[0]);for(var I=R.length;I--;)F.addRange(R[I],!0);return L&&F.rangeList.rangeAtPoint(L.start)&&F.addRange(L,!0),R.length},this.selectMoreLines=function(T,k){var C=this.selection.toOrientedRange(),L=C.cursor==C.end,R=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(R.column=this.selection.$desiredColumn);var F=this.session.screenToDocumentPosition(R.row+T,R.column);if(C.isEmpty())var H=F;else var I=this.session.documentToScreenPosition(L?C.end:C.start),H=this.session.screenToDocumentPosition(I.row+T,I.column);if(L){var P=p.fromPoints(F,H);P.cursor=P.start}else{var P=p.fromPoints(H,F);P.cursor=P.end}if(P.desiredColumn=R.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(T){for(var k=this.session,C=k.multiSelect,L=C.ranges,R=L.length;R--;){var F=L[R];if(F.isEmpty()){var I=k.getWordRange(F.start.row,F.start.column);F.start.row=I.start.row,F.start.column=I.start.column,F.end.row=I.end.row,F.end.column=I.end.column}}C.mergeOverlappingRanges();for(var H=[],R=L.length;R--;){var F=L[R];H.unshift(k.getTextRange(F))}T<0?H.unshift(H.pop()):H.push(H.shift());for(var R=L.length;R--;){var F=L[R],P=F.clone();k.replace(F,H[R]),F.start.row=P.start.row,F.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(T,k,C){var L=this.session,R=L.multiSelect,F=R.toOrientedRange();if(!(F.isEmpty()&&(F=L.getWordRange(F.start.row,F.start.column),F.cursor=T==-1?F.start:F.end,this.multiSelect.addRange(F),C))){var I=L.getTextRange(F),H=o(L,I,T);H&&(H.cursor=T==-1?H.start:H.end,this.session.unfold(H),this.multiSelect.addRange(H),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(F.cursor)}},this.alignCursors=function(){var T=this.session,k=T.multiSelect,C=k.ranges,L=-1,R=C.filter(function(K){if(K.cursor.row==L)return!0;L=K.cursor.row});if(!C.length||R.length==C.length-1){var F=this.selection.getRange(),I=F.start.row,H=F.end.row,P=I==H;if(P){var O=this.session.getLength(),A;do A=this.session.getLine(H);while(/[=:]/.test(A)&&++H<O);do A=this.session.getLine(I);while(/[=:]/.test(A)&&--I>0);I<0&&(I=0),H>=O&&(H=O-1)}var S=this.session.removeFullLines(I,H);S=this.$reAlignText(S,P),this.session.insert({row:I,column:0},S.join(`
950
+ `)+`
951
+ `),P||(F.start.column=0,F.end.column=S[S.length-1].length),this.selection.setRange(F)}else{R.forEach(function(K){k.substractPoint(K.cursor)});var D=0,W=1/0,U=C.map(function(K){var Z=K.cursor,te=T.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>D&&(D=Z.column),he<W&&(W=he),he});C.forEach(function(K,Z){var te=K.cursor,he=D-te.column,ne=U[Z]-W;he>ne?T.insert(te,s.stringRepeat(" ",he-ne)):T.remove(new p(te.row,te.column,te.row,te.column-he+ne)),K.start.column=K.end.column=D,K.start.row=K.end.row=te.row,K.cursor=K.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,k){var C=!0,L=!0,R,F,I;return T.map(function(S){var D=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?R==null?(R=D[1].length,F=D[2].length,I=D[3].length,D):(R+F+I!=D[1].length+D[2].length+D[3].length&&(L=!1),R!=D[1].length&&(C=!1),R>D[1].length&&(R=D[1].length),F<D[2].length&&(F=D[2].length),I>D[3].length&&(I=D[3].length),D):[S]}).map(k?P:C?L?O:P:A);function H(S){return s.stringRepeat(" ",S)}function P(S){return S[2]?H(R)+S[2]+H(F-S[2].length+I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function O(S){return S[2]?H(R+F-S[2].length)+S[2]+H(I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function A(S){return S[2]?H(R)+S[2]+H(I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(m.prototype);function w(T,k){return T.row==k.row&&T.column==k.column}r.onSessionChange=function(T){var k=T.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var C=T.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),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(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=r.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",h),T.commands.addCommands(a.defaultCommands),E(T))}function E(T){if(!T.textInput)return;var k=T.textInput.getElement(),C=!1;g.addListener(k,"keydown",function(R){var F=R.keyCode==18&&!(R.ctrlKey||R.shiftKey||R.metaKey);T.$blockSelectEnabled&&F?C||(T.renderer.setMouseCursor("crosshair"),C=!0):C&&L()},T),g.addListener(k,"keyup",L,T),g.addListener(k,"blur",L,T);function L(R){C&&(T.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(T){x(this),T?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,f){var d=n("../../range").Range,p=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(b,h,g){var s=b.getLine(g);return this.foldingStartMarker.test(s)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(b,h,g){return null},this.indentationBlock=function(b,h,g){var s=/\S/,a=b.getLine(h),c=a.search(s);if(c!=-1){for(var l=g||a.length,o=b.getLength(),u=h,m=h;++h<o;){var w=b.getLine(h).search(s);if(w!=-1){if(w<=c){var x=b.getTokenAt(h,0);if(!x||x.type!=="string")break}m=h}}if(m>u){var E=b.getLine(m).length;return new d(u,l,m,E)}}},this.openingBracketBlock=function(b,h,g,s,a){var c={row:g,column:s+1},l=b.$findClosingBracket(h,c,a);if(l){var o=b.foldWidgets[l.row];return o==null&&(o=b.getFoldWidget(l.row)),o=="start"&&l.row>c.row&&(l.row--,l.column=b.getLine(l.row).length),d.fromPoints(c,l)}},this.closingBracketBlock=function(b,h,g,s,a){var c={row:g,column:s},l=b.$findOpeningBracket(h,c);if(l)return l.column++,c.column--,d.fromPoints(l,c)}}).call(p.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(n,r,f){var d=n("../lib/dom"),p=n("../range").Range,b=n("../config").nls;function h(s,a,c){for(var l=0,o=s.length-1;l<=o;){var u=l+o>>1,m=c(a,s[u]);if(m>0)l=u+1;else if(m<0)o=u-1;else return u}return-(l+1)}function g(s,a,c){var l=s.getAnnotations().sort(p.comparePoints);if(l.length){var o=h(l,{row:a,column:-1},p.comparePoints);o<0&&(o=-o-1),o>=l.length?o=c>0?0:l.length-1:o===0&&c<0&&(o=l.length-1);var u=l[o];if(!(!u||!c)){if(u.row===a){do u=l[o+=c];while(u&&u.row===a);if(!u)return l.slice()}var m=[];a=u.row;do m[c<0?"unshift":"push"](u),u=l[o+=c];while(u&&u.row==a);return m.length&&m}}}r.showErrorMarker=function(s,a){var c=s.session,l=s.getCursorPosition(),o=l.row,u=c.widgetManager.getWidgetsAtRow(o).filter(function(R){return R.type=="errorMarker"})[0];u?u.destroy():o-=a;var m=g(c,o,a),w;if(m){var x=m[0];l.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,l.row=x.row,w=s.renderer.$gutterLayer.$annotations[l.row]}else{if(u)return;w={displayText:[b("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(l.row),s.selection.moveToPosition(l);var E={row:l.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},T=E.el.appendChild(d.createElement("div")),k=E.el.appendChild(d.createElement("div"));k.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(l).left;k.style.left=C+s.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",T.className="error_widget "+w.className,w.displayText.forEach(function(R,F){T.appendChild(d.createTextNode(R)),F<w.displayText.length-1&&T.appendChild(d.createElement("br"))}),T.appendChild(d.createElement("div"));var L=function(R,F,I){if(F===0&&(I==="esc"||I==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(L),c.widgetManager.removeLineWidget(E),s.off("changeSelection",E.destroy),s.off("changeSession",E.destroy),s.off("mouseup",E.destroy),s.off("change",E.destroy))},s.keyBinding.addKeyboardHandler(L),s.on("changeSelection",E.destroy),s.on("changeSession",E.destroy),s.on("mouseup",E.destroy),s.on("change",E.destroy),s.session.widgetManager.addLineWidget(E),E.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},d.importCssString(`
952
+ .error_widget_wrapper {
953
+ background: inherit;
954
+ color: inherit;
955
+ border:none
956
+ }
957
+ .error_widget {
958
+ border-top: solid 2px;
959
+ border-bottom: solid 2px;
960
+ margin: 5px 0;
961
+ padding: 10px 40px;
962
+ white-space: pre-wrap;
963
+ }
964
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
965
+ border-color: #ff5a5a
966
+ }
967
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
968
+ border-color: #F1D817
969
+ }
970
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
971
+ border-color: #5a5a5a
972
+ }
973
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
974
+ border-color: #5aaa5a
975
+ }
976
+ .error_widget_arrow {
977
+ position: absolute;
978
+ border: solid 5px;
979
+ border-top-color: transparent!important;
980
+ border-right-color: transparent!important;
981
+ border-left-color: transparent!important;
982
+ top: -5px;
983
+ }
984
+ `,"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(n,r,f){n("./loader_build")(r);var d=n("./lib/dom"),p=n("./range").Range,b=n("./editor").Editor,h=n("./edit_session").EditSession,g=n("./undomanager").UndoManager,s=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(c,l){if(typeof c=="string"){var o=c;if(c=document.getElementById(o),!c)throw new Error("ace.edit can't find div #"+o)}if(c&&c.env&&c.env.editor instanceof b)return c.env.editor;var u="";if(c&&/input|textarea/i.test(c.tagName)){var m=c;u=m.value,c=d.createElement("pre"),m.parentNode.replaceChild(c,m)}else c&&(u=c.textContent,c.innerHTML="");var w=r.createEditSession(u),x=new b(new s(c),w,l),E={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(E.textarea=m),x.on("destroy",function(){E.editor.container.env=null}),x.container.env=x.env=E,x},r.createEditSession=function(c,l){var o=new h(c,l);return o.setUndoManager(new g),o},r.Range=p,r.Editor=b,r.EditSession=h,r.UndoManager=g,r.VirtualRenderer=s;var a=r.config.version;r.version=a}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var f in n)n.hasOwnProperty(f)&&(r.ace[f]=n[f]);r.ace.default=r.ace,t&&(t.exports=r.ace)})}()}(Yf)),Yf.exports}var ls=sr("b",g1()),Qf={exports:{}},Zf;function m1(){return Zf||(Zf=1,function(t,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var d=n("../lib/oop"),p=n("./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"},g=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},s=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},c=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},l=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},u=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",E="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",T="$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":E,"variable.language":T,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(R,F,I){I.length&&(I=[]);var H=R[R.length-1];return I.unshift(H,F),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},u,{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:/\?(?=.+:)/},c,l,b,h,o,g,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(R,F,I){var H=R[2]=="-"||R[2]=="~"?"indentedHeredoc":"heredoc",P=R.split(this.splitRegex);return I.push(H,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(R,F,I){return R===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(R,F,I){return R===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(R,F){return F[0]==="heredoc"||F[0]==="indentedHeredoc"?F[0]:R}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(R,F,I){return this.next="",R=="}"&&I.length>1&&I[1]!="start"&&(I.shift(),this.next=I.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(R,F,I){return I.length&&R===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(R,F,I){return I.length&&R===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(R,F,I){return I.length&&R===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(R,F,I){return I.length&&R===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(R,F,I){return I.length&&R===I[0]?(I.unshift(R,F),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(R,F,I){return I.length&&R[0]===L[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};d.inherits(m,p),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,f){var d=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var g=b.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,c=b.findMatchingBracket({row:h,column:a});if(!c||c.row==h)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new d(h,0,h,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(n,r,f){var d=n("../../lib/oop"),p=n("./fold_mode").FoldMode,b=n("../../range").Range,h=n("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};d.inherits(g,p),(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,c){var l=s.getLine(c),o=this.foldingStartMarker.test(l),u=this.foldingStopMarker.test(l);if(o&&!u){var m=l.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(l)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(l)===!1)||m[1]=="when"&&/\sthen\s/.test(l)===!0)return;if(s.getTokenAt(c,m.index+2).type==="keyword")return"start"}else if(!m[3]||s.getTokenAt(c,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!u||o&&u)return"";var m=l.match(this.foldingStopMarker);if(m[3]==="end"){if(s.getTokenAt(c,m.index+1).type==="keyword")return"end"}else if(!m[1]||s.getTokenAt(c,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,a,c){var l=s.doc.getLine(c),o=this.foldingStartMarker.exec(l);if(o)return o[1]||o[3]?this.rubyBlock(s,c,o.index+2):this.openingBracketBlock(s,"{",c,o.index);var o=this.foldingStopMarker.exec(l);if(o)return o[3]==="end"&&s.getTokenAt(c,o.index+1).type==="keyword"?this.rubyBlock(s,c,o.index+1):o[1]==="=end"&&s.getTokenAt(c,o.index+1).type==="comment.multiline"?this.rubyBlock(s,c,o.index+1):this.closingBracketBlock(s,"}",c,o.index+o[0].length)},this.rubyBlock=function(s,a,c,l){var o=new h(s,a,c),u=o.getCurrentToken();if(!(!u||u.type!="keyword"&&u.type!="comment.multiline")){var m=u.value,w=s.getLine(a);switch(u.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+u.value);if(!x.test(w))return;var E=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var x=new RegExp("^\\s*"+u.value+"\\s*$");if(!x.test(w))return;var E=1;break;default:var E=this.indentKeywords[m]}var T=[m];if(E){var k=E===-1?s.getLine(a-1).length:s.getLine(a).length,C=a,L=[];if(L.push(o.getCurrentTokenRange()),o.step=E===-1?o.stepBackward:o.stepForward,u.type=="comment.multiline"){for(;u=o.step();)if(u.type==="comment.multiline"){if(E==1){if(k=6,u.value=="=end")break}else if(u.value=="=begin")break}}else for(;u=o.step();){var R=!1;if(u.type==="keyword"){var F=E*this.indentKeywords[u.value];switch(w=s.getLine(o.getCurrentTokenRow()),u.value){case"do":for(var I=o.$tokenIndex-1;I>=0;I--){var H=o.$rowTokens[I];if(H&&(H.value=="while"||H.value=="until"||H.value=="for")){F=0;break}}break;case"else":var x=new RegExp("^\\s*"+u.value+"\\s*$");(!x.test(w)||m=="case")&&(F=0,R=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+u.value);x.test(w)||(F=0,R=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(F=0,R=!0)}if(F>0)T.unshift(u.value);else if(F<=0&&R===!1){if(T.shift(),!T.length&&((m=="while"||m=="until"||m=="for")&&u.value!="do"||u.value=="do"&&E==-1&&F!=0||u.value!="do"))break;F===0&&T.unshift(u.value)}}}if(!u)return null;if(l)return L.push(o.getCurrentTokenRange()),L;var a=o.getCurrentTokenRow();if(E===-1){if(u.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(g.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(n,r,f){var d=n("../lib/oop"),p=n("./text").Mode,b=n("./ruby_highlight_rules").RubyHighlightRules,h=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../range").Range,s=n("./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};d.inherits(a,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,l,o){var u=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var x=l.match(/^.*[\{\(\[]\s*$/),E=l.match(/^\s*(class|def|module)\s.*$/),T=l.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=l.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||E||T||k)&&(u+=o)}return u},this.checkOutdent=function(c,l,o){return/^\s+(end|else|rescue|ensure)$/.test(l+o)||this.$outdent.checkOutdent(l,o)},this.autoOutdent=function(c,l,o){var u=l.getLine(o);if(/}/.test(u))return this.$outdent.autoOutdent(l,o);var m=this.$getIndent(u),w=l.getLine(o-1),x=this.$getIndent(w),E=l.getTabString();x.length<=m.length&&m.slice(-E.length)==E&&l.remove(new g(o,m.length-E.length,o,m.length))},this.getMatching=function(c,l,o){if(l==null){var u=c.selection.lead;o=u.column,l=u.row}var m=c.getTokenAt(l,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,l,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/ruby"],function(n){t&&(t.exports=n)})}()}(Qf)),Qf.exports}m1();var Jf={exports:{}},ep;function v1(){return ep||(ep=1,function(t,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var d=n("../lib/oop"),p=n("./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",g="True|False|None|NotImplemented|Ellipsis|__debug__",s="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":s,"variable.language":"self|cls","constant.language":g,keyword:h},"identifier"),c="[uU]?",l="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",T="(?:"+m+"|"+w+"|"+x+"|"+E+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",L="(?:\\d+)",R="(?:(?:"+L+"?"+C+")|(?:"+L+"\\.))",F="(?:(?:"+R+"|"+L+")"+k+")",I="(?:"+F+"|"+R+")",H=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:c+'"{3}',next:"qqstring3"},{token:"string",regex:c+'"(?=.)',next:"qqstring"},{token:"string",regex:c+"'{3}",next:"qstring3"},{token:"string",regex:c+"'(?=.)",next:"qstring"},{token:"string",regex:l+'"{3}',next:"rawqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rawqqstring"},{token:"string",regex:l+"'{3}",next:"rawqstring3"},{token:"string",regex:l+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+I+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:I},{token:"constant.numeric",regex:T+"[lL]\\b"},{token:"constant.numeric",regex:T+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};d.inherits(b,p),r.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,f){var d=n("../../lib/oop"),p=n("./fold_mode").FoldMode,b=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};d.inherits(b,p),(function(){this.getFoldWidgetRange=function(h,g,s){var a=h.getLine(s),c=a.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(h,c[1],s,c.index):c[2]?this.indentationBlock(h,s,c.index+c[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(n,r,f){var d=n("../lib/oop"),p=n("./text").Mode,b=n("./python_highlight_rules").PythonHighlightRules,h=n("./folding/pythonic").FoldMode,g=n("../range").Range,s=function(){this.HighlightRules=b,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(s,p),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,l,o){var u=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var x=l.match(/^.*[\{\(\[:]\s*$/);x&&(u+=o)}return u};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,l,o){if(o!==`\r
985
+ `&&o!=="\r"&&o!==`
986
+ `)return!1;var u=this.getTokenizer().getLineTokens(l.trim(),c).tokens;if(!u)return!1;do var m=u.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(c,l,o){o+=1;var u=this.$getIndent(l.getLine(o)),m=l.getTabString();u.slice(-m.length)==m&&l.remove(new g(o,u.length-m.length,o,u.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/python"],function(n){t&&(t.exports=n)})}()}(Jf)),Jf.exports}v1();var tp={exports:{}},np;function y1(){return np||(np=1,function(t,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var d=n("../lib/oop"),p=n("./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"}]}};d.inherits(b,p),r.JsonHighlightRules=b}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,f){var d=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var g=b.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,c=b.findMatchingBracket({row:h,column:a});if(!c||c.row==h)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new d(h,0,h,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,f){var d=n("../../lib/oop"),p=n("../../range").Range,b=n("./fold_mode").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};d.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(g,s,a){var c=g.getLine(a);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var l=this._getFoldWidgetBase(g,s,a);return!l&&this.startRegionRe.test(c)?"start":l},this.getFoldWidgetRange=function(g,s,a,c){var l=g.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(g,l,a);var o=l.match(this.foldingStartMarker);if(o){var u=o.index;if(o[1])return this.openingBracketBlock(g,o[1],a,u);var m=g.getCommentFoldRange(a,u+o[0].length,1);return m&&!m.isMultiLine()&&(c?m=this.getSectionRange(g,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var o=l.match(this.foldingStopMarker);if(o){var u=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],a,u):g.getCommentFoldRange(a,u,-1)}}},this.getSectionRange=function(g,s){var a=g.getLine(s),c=a.search(/\S/),l=s,o=a.length;s+=1;for(var u=s,m=g.getLength();++s<m;){a=g.getLine(s);var w=a.search(/\S/);if(w!==-1){if(c>w)break;var x=this.getFoldWidgetRange(g,"all",s);if(x){if(x.start.row<=l)break;if(x.isMultiLine())s=x.end.row;else if(c==w)break}u=s}}return new p(l,o,u,g.getLine(u).length)},this.getCommentRegionBlock=function(g,s,a){for(var c=s.search(/\s*$/),l=g.getLength(),o=a,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<l;){s=g.getLine(a);var w=u.exec(s);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>o)return new p(o,c,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(n,r,f){var d=n("../lib/oop"),p=n("./text").Mode,b=n("./json_highlight_rules").JsonHighlightRules,h=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("./folding/cstyle").FoldMode,s=n("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};d.inherits(a,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,l,o){var u=this.$getIndent(l);if(c=="start"){var m=l.match(/^.*[\{\(\[]\s*$/);m&&(u+=o)}return u},this.checkOutdent=function(c,l,o){return this.$outdent.checkOutdent(l,o)},this.autoOutdent=function(c,l,o){this.$outdent.autoOutdent(l,o)},this.createWorker=function(c){var l=new s(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(c.getDocument()),l.on("annotate",function(o){c.setAnnotations(o.data)}),l.on("terminate",function(){c.clearAnnotations()}),l},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/json"],function(n){t&&(t.exports=n)})}()}(tp)),tp.exports}y1();var rp={exports:{}},ip;function b1(){return ip||(ip=1,function(t,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,f){var d=n("../lib/oop");n("../lib/lang");var p=n("./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",g=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",s=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",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",c=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",l=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",u=function(){var m=this.createKeywordMapper({"support.function":h,"support.constant":g,"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:c},{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:"("+c+")(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:c},{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:l},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};d.inherits(u,p),r.CssHighlightRules=u}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var d=n("../lib/oop"),p=n("./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()};d.inherits(b,p),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(n,r,f){function d(){var c=s.replace("\\d","\\d\\-"),l={onMatch:function(u,m,w){var x=u.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:u.slice(0,x)},{type:"meta.tag.tag-name.xml",value:u.substr(x)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(l);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,l,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(u,m,w){return m==w[0]&&w.shift(),u.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:u}]},nextState:"jsx"},o,p("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:c},{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"}]},l],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function p(c){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=n("../lib/oop"),h=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=n("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(c){var l={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(l,"identifier"),u="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(l).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),p("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:"(?:"+u+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[h.getStartRule("doc-start"),p("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:[p("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"}]},(!c||!c.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,T,k){if(this.next=E=="{"?this.nextState:"",E=="{"&&k.length)k.unshift("start",T);else if(E=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex: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"}),(!c||c.jsx!=0)&&d.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};b.inherits(a,g),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var d=n("../lib/oop"),p=n("./text_highlight_rules").TextHighlightRules,b=function(h){var g="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+g+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:g},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+g+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+g+":)?"+g+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:g},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===b&&this.normalizeRules()};(function(){this.embedTagRules=function(h,g,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,c,l){return l.splice(0),this.token}}],this.embedRules(h,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(p.prototype),d.inherits(b,p),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(n,r,f){var d=n("../lib/oop"),p=n("../lib/lang"),b=n("./css_highlight_rules").CssHighlightRules,h=n("./javascript_highlight_rules").JavaScriptHighlightRules,g=n("./xml_highlight_rules").XmlHighlightRules,s=p.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(){g.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(c,l){var o=s[l];return["meta.tag.punctuation."+(c=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(b,"css-","style"),this.embedTagRules(new h({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};d.inherits(a,g),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(n,r,f){var d=n("../config").$modes,p=n("../lib/oop"),b=n("../lib/lang"),h=n("./text_highlight_rules").TextHighlightRules,g=n("./html_highlight_rules").HtmlHighlightRules,s=function(c){return"(?:[^"+b.escapeRegExp(c)+"\\\\]|\\\\.)*"},a=function(){g.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,u,m,w){var x=o.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(x[3])[0];return d[E]||(E=""),m.unshift("githubblock",[],[x[1],x[2],E],u),this.token},next:"githubblock"},l=[{token:"support.function",regex:".*",onMatch:function(o,u,m,w){var x=m[1],E=m[2][0],T=m[2][1],k=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<E.length+3&&C[2].length>=T.length&&C[2][0]==T[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&d[k]){var L=d[k].getTokenizer().getLineTokens(o,x.slice(0));return m[1]=L.state,L.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},c,{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},c,{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:l}),this.normalizeRules()};p.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(n,r,f){var d=n("../../lib/oop"),p=n("./fold_mode").FoldMode,b=n("../../range").Range,h=r.FoldMode=function(){};d.inherits(h,p),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,s,a){var c=g.getLine(a);return this.foldingStartMarker.test(c)?c[0]=="`"&&g.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,s,a){function c(R){return E=g.getTokens(R)[0],E&&E.type.lastIndexOf(T,0)===0}function l(){var R=E.value[0];return R=="="?6:R=="-"?5:7-E.value.search(/[^#]|$/)}var o=g.getLine(a),u=o.length,m=g.getLength(),w=a,x=a;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(g.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(o=g.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new b(w,u,a,0)}for(;a-- >0&&(o=g.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new b(a,o.length,w,0)}var E,T="markup.heading";if(c(a)){for(var k=l();++a<m;)if(c(a)){var C=l();if(C>=k)break}if(x=a-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(g.getLine(x));)x--;if(x>w){var L=g.getLine(x).length;return new b(w,u,x,L)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,f){var d=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(b,h){return/^\s+$/.test(b)?/^\s*\}/.test(h):!1},this.autoOutdent=function(b,h){var g=b.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,c=b.findMatchingBracket({row:h,column:a});if(!c||c.row==h)return 0;var l=this.$getIndent(b.getLine(c.row));b.replace(new d(h,0,h,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(n,r,f){function d(s,a){return s&&s.type.lastIndexOf(a+".xml")>-1}var p=n("../../lib/oop"),b=n("../behaviour").Behaviour,h=n("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(s,a,c,l,o){if(o=='"'||o=="'"){var u=o,m=l.doc.getTextRange(c.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&c.getWrapBehavioursEnabled())return{text:u+m+u,selection:!1};var w=c.getCursorPosition(),x=l.doc.getLine(w.row),E=x.substring(w.column,w.column+1),T=new h(l,w.row,w.column),k=T.getCurrentToken();if(E==u&&(d(k,"attribute-value")||d(k,"string")))return{text:"",selection:[1,1]};if(k||(k=T.stepBackward()),!k)return;for(;d(k,"tag-whitespace")||d(k,"whitespace");)k=T.stepBackward();var C=!E||E.match(/\s/);if(d(k,"attribute-equals")&&(C||E==">")||d(k,"decl-attribute-equals")&&(C||E=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,c,l,o){var u=l.doc.getTextRange(o);if(!o.isMultiLine()&&(u=='"'||u=="'")){var m=l.doc.getLine(o.start.row),w=m.substring(o.start.column+1,o.start.column+2);if(w==u)return o.end.column++,o}}),this.add("autoclosing","insertion",function(s,a,c,l,o){if(o==">"){var u=c.getSelectionRange().start,m=new h(l,u.row,u.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(d(w,"tag-name")||d(w,"tag-whitespace")||d(w,"attribute-name")||d(w,"attribute-equals")||d(w,"attribute-value"))||d(w,"reference.attribute-value"))return;if(d(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(u.column<x)return;if(u.column==x){var E=m.stepForward();if(E&&d(E,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(l.getLine(u.row).slice(u.column)))return;for(;!d(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var T=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(d(m.stepBackward(),"end-tag-open"))return;var C=w.value;return T==u.row&&(C=C.substring(0,u.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,c,l,o){if(o==`
987
+ `){var u=c.getCursorPosition(),m=l.getLine(u.row),w=new h(l,u.row,u.column),x=w.getCurrentToken();if(d(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 E=x.value,T=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var k=l.getTokenAt(u.row,u.column+1),m=l.getLine(T),C=this.$getIndent(m),L=C+l.getTabString();return k&&k.value==="</"?{text:`
988
+ `+L+`
989
+ `+C,selection:[1,L.length,1,L.length]}:{text:`
990
+ `+L}}}}})};p.inherits(g,b),r.XmlBehaviour=g}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(n,r,f){var d=n("../../lib/oop"),p=n("../../token_iterator").TokenIterator,b=n("../behaviour/cstyle").CstyleBehaviour,h=n("../behaviour/xml").XmlBehaviour,g=function(){var s=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(b),this.add("autoclosing-fragment","insertion",function(a,c,l,o,u){if(u==">"){var m=l.getSelectionRange().start,w=new p(o,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};d.inherits(g,b),r.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,f){function d(a,c){return a&&a.type&&a.type.lastIndexOf(c+".xml")>-1}var p=n("../../lib/oop"),b=n("../../range").Range,h=n("./fold_mode").FoldMode,g=r.FoldMode=function(a,c){h.call(this),this.voidElements=a||{},this.optionalEndTags=p.mixin({},this.voidElements),c&&p.mixin(this.optionalEndTags,c)};p.inherits(g,h);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,c,l){var o=this._getFirstTagInLine(a,l);return o?o.closing||!o.tagName&&o.selfClosing?c==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(a,l,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(a,l)},this.getCommentFoldWidget=function(a,c){return/comment/.test(a.getState(c))&&/<!-/.test(a.getLine(c))?"start":""},this._getFirstTagInLine=function(a,c){for(var l=a.getTokens(c),o=new s,u=0;u<l.length;u++){var m=l[u];if(d(m,"tag-open")){if(o.end.column=o.start.column+m.value.length,o.closing=d(m,"end-tag-open"),m=l[++u],!m)return null;if(o.tagName=m.value,m.value===""){if(m=l[++u],!m)return null;o.tagName=m.value}for(o.end.column+=m.value.length,u++;u<l.length;u++)if(m=l[u],o.end.column+=m.value.length,d(m,"tag-close")){o.selfClosing=m.value=="/>";break}return o}if(d(m,"tag-close"))return o.selfClosing=m.value=="/>",o;o.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,c,l,o){for(var u=a.getTokens(c),m=0,w=0;w<u.length;w++){var x=u[w];if(m+=x.value.length,!(m<o-1)&&d(x,"end-tag-open")&&(x=u[w+1],d(x,"tag-name")&&x.value===""&&(x=u[w+2]),x&&x.value==l))return!0}return!1},this.getFoldWidgetRange=function(a,c,l){var o=this._getFirstTagInLine(a,l);if(!o)return this.getCommentFoldWidget(a,l)&&a.getCommentFoldRange(l,a.getLine(l).length);var u=a.getMatchingTags({row:l,column:0});if(u)return new b(u.openTag.end.row,u.openTag.end.column,u.closeTag.start.row,u.closeTag.start.column)}}).call(g.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,f){var d=n("../../lib/oop"),p=n("../../range").Range,b=n("./fold_mode").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};d.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(g,s,a){var c=g.getLine(a);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var l=this._getFoldWidgetBase(g,s,a);return!l&&this.startRegionRe.test(c)?"start":l},this.getFoldWidgetRange=function(g,s,a,c){var l=g.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(g,l,a);var o=l.match(this.foldingStartMarker);if(o){var u=o.index;if(o[1])return this.openingBracketBlock(g,o[1],a,u);var m=g.getCommentFoldRange(a,u+o[0].length,1);return m&&!m.isMultiLine()&&(c?m=this.getSectionRange(g,a):s!="all"&&(m=null)),m}if(s!=="markbegin"){var o=l.match(this.foldingStopMarker);if(o){var u=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],a,u):g.getCommentFoldRange(a,u,-1)}}},this.getSectionRange=function(g,s){var a=g.getLine(s),c=a.search(/\S/),l=s,o=a.length;s+=1;for(var u=s,m=g.getLength();++s<m;){a=g.getLine(s);var w=a.search(/\S/);if(w!==-1){if(c>w)break;var x=this.getFoldWidgetRange(g,"all",s);if(x){if(x.start.row<=l)break;if(x.isMultiLine())s=x.end.row;else if(c==w)break}u=s}}return new p(l,o,u,g.getLine(u).length)},this.getCommentRegionBlock=function(g,s,a){for(var c=s.search(/\s*$/),l=g.getLength(),o=a,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<l;){s=g.getLine(a);var w=u.exec(s);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>o)return new p(o,c,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(n,r,f){var d=n("../../lib/oop"),p=n("./xml").FoldMode,b=n("./cstyle").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new p};d.inherits(h,b),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,s,a){var c=this.getFoldWidgetBase(g,s,a);return c||this.xmlFoldMode.getFoldWidget(g,s,a)},this.getFoldWidgetRange=function(g,s,a,c){var l=this.getFoldWidgetRangeBase(g,s,a,c);return l||this.xmlFoldMode.getFoldWidgetRange(g,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(n,r,f){var d=n("../lib/oop"),p=n("./text").Mode,b=n("./javascript_highlight_rules").JavaScriptHighlightRules,h=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,s=n("./behaviour/javascript").JavaScriptBehaviour,a=n("./folding/javascript").FoldMode,c=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new s,this.foldingRules=new a};d.inherits(c,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(l,o,u){var m=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,l),x=w.tokens,E=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(l=="start"||l=="no_regex"){var T=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);T&&(m+=u)}else if(l=="doc-start"&&(E=="start"||E=="no_regex"))return"";return m},this.checkOutdent=function(l,o,u){return this.$outdent.checkOutdent(o,u)},this.autoOutdent=function(l,o,u){this.$outdent.autoOutdent(o,u)},this.createWorker=function(l){var o=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(l.getDocument()),o.on("annotate",function(u){l.setAnnotations(u.data)}),o.on("terminate",function(){l.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,f){var d={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}},p=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 g=h.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});d.hasOwnProperty(g)||(d[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(b,h,g,s){if(this.completionsDefined||this.defineCompletions(),b==="ruleset"||h.$mode.$id=="ace/mode/scss"){var a=h.getLine(g.row).substr(0,g.column),c=/\([^)]*$/.test(a);return c&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(b,h,g,s):this.getPropertyCompletions(b,h,g,s,c)}return[]},this.getPropertyCompletions=function(b,h,g,s,a){a=a||!1;var c=Object.keys(d);return c.map(function(l){return{caption:l,snippet:l+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(b,h,g,s){var a=h.getLine(g.row).substr(0,g.column),c=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!c)return[];var l=[];return c in d&&typeof d[c]=="object"&&(l=Object.keys(d[c])),l.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(p.prototype),r.CssCompletions=p}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,f){var d=n("../../lib/oop");n("../behaviour").Behaviour;var p=n("./cstyle").CstyleBehaviour,b=n("../../token_iterator").TokenIterator,h=function(){this.inherit(p),this.add("colon","insertion",function(g,s,a,c,l){if(l===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),u=new b(c,o.row,o.column),m=u.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=u.stepBackward()),m&&m.type==="support.type"){var w=c.doc.getLine(o.row),x=w.substring(o.column,o.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,s,a,c,l){var o=c.doc.getTextRange(l);if(!l.isMultiLine()&&o===":"){var u=a.getCursorPosition(),m=new b(c,u.row,u.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=c.doc.getLine(l.start.row),E=x.substring(l.end.column,l.end.column+1);if(E===";")return l.end.column++,l}}}),this.add("semicolon","insertion",function(g,s,a,c,l){if(l===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),u=c.doc.getLine(o.row),m=u.substring(o.column,o.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,s,a,c,l){if(l==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),u=c.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(u.substring(o.column)))return{text:"!important",selection:[10,10]}}})};d.inherits(h,p),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(n,r,f){var d=n("../lib/oop"),p=n("./text").Mode,b=n("./css_highlight_rules").CssHighlightRules,h=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,s=n("./css_completions").CssCompletions,a=n("./behaviour/css").CssBehaviour,c=n("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=b,this.$outdent=new h,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new c};d.inherits(l,p),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,u,m){var w=this.$getIndent(u),x=this.getTokenizer().getLineTokens(u,o).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var E=u.match(/^.*\{\s*$/);return E&&(w+=m),w},this.checkOutdent=function(o,u,m){return this.$outdent.checkOutdent(u,m)},this.autoOutdent=function(o,u,m){this.$outdent.autoOutdent(u,m)},this.getCompletions=function(o,u,m,w){return this.$completer.getCompletions(o,u,m,w)},this.createWorker=function(o){var u=new g(["ace"],"ace/mode/css_worker","Worker");return u.attachToDocument(o.getDocument()),u.on("annotate",function(m){o.setAnnotations(m.data)}),u.on("terminate",function(){o.clearAnnotations()}),u},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(l.prototype),r.Mode=l}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,f){var d=n("../../lib/oop"),p=n("./fold_mode").FoldMode,b=r.FoldMode=function(h,g){this.defaultMode=h,this.subModes=g};d.inherits(b,p),(function(){this.$getMode=function(h){typeof h!="string"&&(h=h[0]);for(var g in this.subModes)if(h.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(h,g,s,a){var c=this.$getMode(h);return c?c.getFoldWidget(g,s,a):""},this.getFoldWidget=function(h,g,s){return this.$tryMode(h.getState(s-1),h,g,s)||this.$tryMode(h.getState(s),h,g,s)||this.defaultMode.getFoldWidget(h,g,s)},this.getFoldWidgetRange=function(h,g,s){var a=this.$getMode(h.getState(s-1));return(!a||!a.getFoldWidget(h,g,s))&&(a=this.$getMode(h.getState(s))),(!a||!a.getFoldWidget(h,g,s))&&(a=this.defaultMode),a.getFoldWidgetRange(h,g,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(n,r,f){var d=n("../../lib/oop"),p=n("./mixed").FoldMode,b=n("./xml").FoldMode,h=n("./cstyle").FoldMode,g=r.FoldMode=function(s,a){p.call(this,new b(s,a),{"js-":new h,"css-":new h})};d.inherits(g,p)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(n,r,f){function d(u,m){return u.type.lastIndexOf(m+".xml")>-1}function p(u,m){for(var w=new h(u,m.row,m.column),x=w.getCurrentToken();x&&!d(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function b(u,m){for(var w=new h(u,m.row,m.column),x=w.getCurrentToken();x&&!d(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var h=n("../token_iterator").TokenIterator,g=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=g.concat(s),c={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:{}},l=Object.keys(c),o=function(){};(function(){this.getCompletions=function(u,m,w,x){var E=m.getTokenAt(w.row,w.column);if(!E)return[];if(d(E,"tag-name")||d(E,"tag-open")||d(E,"end-tag-open"))return this.getTagCompletions(u,m,w,x);if(d(E,"tag-whitespace")||d(E,"attribute-name"))return this.getAttributeCompletions(u,m,w,x);if(d(E,"attribute-value"))return this.getAttributeValueCompletions(u,m,w,x);var T=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(T)?this.getHTMLEntityCompletions(u,m,w,x):[]},this.getTagCompletions=function(u,m,w,x){return l.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(u,m,w,x){var E=p(m,w);if(!E)return[];var T=a;return E in c&&(T=T.concat(Object.keys(c[E]))),T.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(u,m,w,x){var E=p(m,w),T=b(m,w);if(!E)return[];var k=[];return E in c&&T in c[E]&&typeof c[E][T]=="object"&&(k=Object.keys(c[E][T])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(u,m,w,x){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function(T){return{caption:T,snippet:T,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,f){var d=n("../lib/oop"),p=n("../lib/lang"),b=n("./text").Mode,h=n("./javascript").Mode,g=n("./css").Mode,s=n("./html_highlight_rules").HtmlHighlightRules,a=n("./behaviour/xml").XmlBehaviour,c=n("./folding/html").FoldMode,l=n("./html_completions").HtmlCompletions,o=n("../worker/worker_client").WorkerClient,u=["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 l,this.createModeDelegates({"js-":h,"css-":g}),this.foldingRules=new c(this.voidElements,p.arrayToMap(m))};d.inherits(w,b),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=p.arrayToMap(u),this.getNextLineIndent=function(x,E,T){return this.$getIndent(E)},this.checkOutdent=function(x,E,T){return!1},this.getCompletions=function(x,E,T,k){return this.$completer.getCompletions(x,E,T,k)},this.createWorker=function(x){if(this.constructor==w){var E=new o(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(x.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function(T){x.setAnnotations(T.data)}),E.on("terminate",function(){x.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,f){var d=n("../lib/oop"),p=n("./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",g=function(){var s=this.createKeywordMapper({keyword:b,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",l="(?:\\d+)",o="(?:(?:"+l+"?"+c+")|(?:"+l+"\\.))",u="(?:(?:"+o+"|"+l+"))",m="(?:"+u+"|"+o+")",w="(?:&"+l+")",x="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+x+"(?==))",T="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,L,R){var F=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return R.push(F,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(C,L,R){return C===R[1]?(R.shift(),R.shift(),this.next=R[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,L,R){return C===R[1]?(R.shift(),R.shift(),this.next=R[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,L){return L[0]==="heredoc"||L[0]==="indentedHeredoc"?L[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:T},{token:"variable",regex:E},{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()};d.inherits(g,p),r.ShHighlightRules=g}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,r,f){var d=n("../lib/oop"),p=n("./text").Mode,b=n("./sh_highlight_rules").ShHighlightRules,h=n("../range").Range,g=n("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=b,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};d.inherits(s,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,l,o){var u=this.$getIndent(l),m=this.getTokenizer().getLineTokens(l,c),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var x=l.match(/^.*[\{\(\[:]\s*$/);x&&(u+=o)}return u};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,l,o){if(o!==`\r
991
+ `&&o!=="\r"&&o!==`
992
+ `)return!1;var u=this.getTokenizer().getLineTokens(l.trim(),c).tokens;if(!u)return!1;do var m=u.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(c,l,o){o+=1;var u=this.$getIndent(l.getLine(o)),m=l.getTabString();u.slice(-m.length)==m&&l.remove(new h(o,u.length-m.length,o,u.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(n,r,f){var d=n("../lib/oop"),p=n("../lib/lang"),b=n("./text").Mode,h=n("./xml_highlight_rules").XmlHighlightRules,g=n("./behaviour/xml").XmlBehaviour,s=n("./folding/xml").FoldMode,a=n("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=h,this.$behaviour=new g,this.foldingRules=new s};d.inherits(c,b),(function(){this.voidElements=p.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(l){var o=new a(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(l.getDocument()),o.on("error",function(u){l.setAnnotations(u.data)}),o.on("terminate",function(){l.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(c.prototype),r.Mode=c}),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(n,r,f){var d=n("../lib/oop"),p=n("./behaviour/cstyle").CstyleBehaviour,b=n("./text").Mode,h=n("./markdown_highlight_rules").MarkdownHighlightRules,g=n("./folding/markdown").FoldMode,s=function(){this.HighlightRules=h,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new g,this.$behaviour=new p({braces:!0})};d.inherits(s,b),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,c,l){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!o)return"";var u=o[2];return u||(u=parseInt(o[3],10)+1+"."),o[1]+u+o[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})}()}(rp)),rp.exports}b1();var op={exports:{}},sp;function w1(){return sp||(sp=1,function(t,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(n,r,f){f.exports=`.ace-twilight .ace_gutter {
993
+ background: #232323;
994
+ color: #E2E2E2
995
+ }
996
+
997
+ .ace-twilight .ace_print-margin {
998
+ width: 1px;
999
+ background: #232323
1000
+ }
1001
+
1002
+ .ace-twilight {
1003
+ background-color: #141414;
1004
+ color: #F8F8F8
1005
+ }
1006
+
1007
+ .ace-twilight .ace_cursor {
1008
+ color: #A7A7A7
1009
+ }
1010
+
1011
+ .ace-twilight .ace_marker-layer .ace_selection {
1012
+ background: rgba(221, 240, 255, 0.20)
1013
+ }
1014
+
1015
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1016
+ box-shadow: 0 0 3px 0px #141414;
1017
+ }
1018
+
1019
+ .ace-twilight .ace_marker-layer .ace_step {
1020
+ background: rgb(102, 82, 0)
1021
+ }
1022
+
1023
+ .ace-twilight .ace_marker-layer .ace_bracket {
1024
+ margin: -1px 0 0 -1px;
1025
+ border: 1px solid rgba(255, 255, 255, 0.25)
1026
+ }
1027
+
1028
+ .ace-twilight .ace_marker-layer .ace_active-line {
1029
+ background: rgba(255, 255, 255, 0.031)
1030
+ }
1031
+
1032
+ .ace-twilight .ace_gutter-active-line {
1033
+ background-color: rgba(255, 255, 255, 0.031)
1034
+ }
1035
+
1036
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1037
+ border: 1px solid rgba(221, 240, 255, 0.20)
1038
+ }
1039
+
1040
+ .ace-twilight .ace_invisible {
1041
+ color: rgba(255, 255, 255, 0.25)
1042
+ }
1043
+
1044
+ .ace-twilight .ace_keyword,
1045
+ .ace-twilight .ace_meta {
1046
+ color: #CDA869
1047
+ }
1048
+
1049
+ .ace-twilight .ace_constant,
1050
+ .ace-twilight .ace_constant.ace_character,
1051
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1052
+ .ace-twilight .ace_constant.ace_other,
1053
+ .ace-twilight .ace_heading,
1054
+ .ace-twilight .ace_markup.ace_heading,
1055
+ .ace-twilight .ace_support.ace_constant {
1056
+ color: #CF6A4C
1057
+ }
1058
+
1059
+ .ace-twilight .ace_invalid.ace_illegal {
1060
+ color: #F8F8F8;
1061
+ background-color: rgba(86, 45, 86, 0.75)
1062
+ }
1063
+
1064
+ .ace-twilight .ace_invalid.ace_deprecated {
1065
+ text-decoration: underline;
1066
+ font-style: italic;
1067
+ color: #D2A8A1
1068
+ }
1069
+
1070
+ .ace-twilight .ace_support {
1071
+ color: #9B859D
1072
+ }
1073
+
1074
+ .ace-twilight .ace_fold {
1075
+ background-color: #AC885B;
1076
+ border-color: #F8F8F8
1077
+ }
1078
+
1079
+ .ace-twilight .ace_support.ace_function {
1080
+ color: #DAD085
1081
+ }
1082
+
1083
+ .ace-twilight .ace_list,
1084
+ .ace-twilight .ace_markup.ace_list,
1085
+ .ace-twilight .ace_storage {
1086
+ color: #F9EE98
1087
+ }
1088
+
1089
+ .ace-twilight .ace_entity.ace_name.ace_function,
1090
+ .ace-twilight .ace_meta.ace_tag {
1091
+ color: #AC885B
1092
+ }
1093
+
1094
+ .ace-twilight .ace_string {
1095
+ color: #8F9D6A
1096
+ }
1097
+
1098
+ .ace-twilight .ace_string.ace_regexp {
1099
+ color: #E9C062
1100
+ }
1101
+
1102
+ .ace-twilight .ace_comment {
1103
+ font-style: italic;
1104
+ color: #5F5A60
1105
+ }
1106
+
1107
+ .ace-twilight .ace_variable {
1108
+ color: #7587A6
1109
+ }
1110
+
1111
+ .ace-twilight .ace_xml-pe {
1112
+ color: #494949
1113
+ }
1114
+
1115
+ .ace-twilight .ace_indent-guide {
1116
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1117
+ }
1118
+
1119
+ .ace-twilight .ace_indent-guide-active {
1120
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1121
+ }
1122
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(n,r,f){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=n("./twilight-css");var d=n("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(n){t&&(t.exports=n)})}()}(op)),op.exports}w1();var ap={exports:{}},lp;function x1(){return lp||(lp=1,function(t,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(n,r,f){function d(C){var L=new Date().toLocaleString("en-us",C);return L.length==1?"0"+L:L}var p=n("./lib/dom"),b=n("./lib/oop"),h=n("./lib/event_emitter").EventEmitter,g=n("./lib/lang"),s=n("./range").Range,a=n("./range_list").RangeList,c=n("./keyboard/hash_handler").HashHandler,l=n("./tokenizer").Tokenizer,o=n("./clipboard"),u={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,L,R){var F=C.session.getTextRange();return R?F.replace(/\n\r?([ \t]*\S)/g,`
1123
+ `+R+"$1"):F},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.start||""},BLOCK_COMMENT_END:function(C){var L=C.session.$mode||{};return L.blockComment&&L.blockComment.end||""},LINE_COMMENT:function(C){var L=C.session.$mode||{};return L.lineCommentStart||""},CURRENT_YEAR:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};u.SELECTED_TEXT=u.SELECTION;var m=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=u}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function L(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function R(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var F={regex:"/("+R("/")+"+)/",onMatch:function(I,H,P){var O=P[0];return O.fmtString=!0,O.guard=I.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(I,H,P){var O=I[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(I=O),[I]}},{regex:/}/,onMatch:function(I,H,P){return[P.length?P.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:L},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,H,P){var O=L(I.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+R("\\|")+"*\\|",onMatch:function(I,H,P){var O=I.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"},F,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,H,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,H,P){var O=I[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?I=O:O=="n"?I=`
1124
+ `:O=="t"?I=" ":"ulULE".indexOf(O)!=-1&&(I={changeCase:O,local:O>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,H,P){var O=P.shift();return O&&(O.flag=I.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,H,P){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,H,P){var O={text:I.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,H,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,H,P){var O=P[0];return O.formatFunction=I.slice(2,-1),[P.shift()]},next:"formatString"},F,{regex:/:[\?\-+]?/,onMatch:function(I,H,P){I[1]=="+"&&(P[0].ifEnd=P[0]),I[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(L,R){return this.getTokenizer().getLineTokens(L,R).tokens.map(function(F){return F.value||F})},C.prototype.getVariableValue=function(L,R,F){if(/^\d+$/.test(R))return(this.variables.__||{})[R]||"";if(/^[A-Z]\d+$/.test(R))return(this.variables[R[0]+"__"]||{})[R.substr(1)]||"";if(R=R.replace(/^TM_/,""),!this.variables.hasOwnProperty(R))return"";var I=this.variables[R];return typeof I=="function"&&(I=this.variables[R](L,R,F)),I??""},C.prototype.tmStrFormat=function(L,R,F){if(!R.fmt)return L;var I=R.flag||"",H=R.guard;H=new RegExp(H,I.replace(/[^gim]/g,""));var P=typeof R.fmt=="string"?this.tokenizeTmSnippet(R.fmt,"formatString"):R.fmt,O=this,A=L.replace(H,function(){var S=O.variables.__;O.variables.__=[].slice.call(arguments);for(var D=O.resolveVariables(P,F),W="E",U=0;U<D.length;U++){var K=D[U];if(typeof K=="object")if(D[U]="",K.changeCase&&K.local){var Z=D[U+1];Z&&typeof Z=="string"&&(K.changeCase=="u"?D[U]=Z[0].toUpperCase():D[U]=Z[0].toLowerCase(),D[U+1]=Z.substr(1))}else K.changeCase&&(W=K.changeCase);else W=="U"?D[U]=K.toUpperCase():W=="L"&&(D[U]=K.toLowerCase())}return O.variables.__=S,D.join("")});return A},C.prototype.tmFormatFunction=function(L,R,F){return R.formatFunction=="upcase"?L.toUpperCase():R.formatFunction=="downcase"?L.toLowerCase():L},C.prototype.resolveVariables=function(L,R){function F(W){var U=L.indexOf(W,O+1);U!=-1&&(O=U)}for(var I=[],H="",P=!0,O=0;O<L.length;O++){var A=L[O];if(typeof A=="string"){I.push(A),A==`
1125
+ `?(P=!0,H=""):P&&(H=/^\t*/.exec(A)[0],P=/\S/.test(A));continue}if(A){if(P=!1,A.fmtString){var S=L.indexOf(A,O+1);S==-1&&(S=L.length),A.fmt=L.slice(O+1,S),O=S}if(A.text){var D=this.getVariableValue(R,A.text,H)+"";A.fmtString&&(D=this.tmStrFormat(D,A,R)),A.formatFunction&&(D=this.tmFormatFunction(D,A,R)),D&&!A.ifEnd?(I.push(D),F(A)):!D&&A.ifEnd&&F(A.ifEnd)}else A.elseEnd?F(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&I.push(A)}}return I},C.prototype.getDisplayTextForSnippet=function(L,R){var F=w.call(this,L,R);return F.text},C.prototype.insertSnippetForSelection=function(L,R,F){F===void 0&&(F={});var I=w.call(this,L,R,F),H=L.getSelectionRange(),P=L.session.replace(H,I.text),O=new x(L),A=L.inVirtualSelectionMode&&L.selection.index;O.addTabstops(I.tabstops,H.start,P,A)},C.prototype.insertSnippet=function(L,R,F){F===void 0&&(F={});var I=this;if(L.inVirtualSelectionMode)return I.insertSnippetForSelection(L,R,F);L.forEachSelection(function(){I.insertSnippetForSelection(L,R,F)},null,{keepOrder:!0}),L.tabstopManager&&L.tabstopManager.tabNext()},C.prototype.$getScope=function(L){var R=L.session.$mode.$id||"";if(R=R.split("/").pop(),R==="html"||R==="php"){R==="php"&&!L.session.$mode.inlinePhp&&(R="html");var F=L.getCursorPosition(),I=L.session.getState(F.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?R="javascript":I.substring(0,4)=="css-"?R="css":I.substring(0,4)=="php-"&&(R="php"))}return R},C.prototype.getActiveScopes=function(L){var R=this.$getScope(L),F=[R],I=this.snippetMap;return I[R]&&I[R].includeScopes&&F.push.apply(F,I[R].includeScopes),F.push("_"),F},C.prototype.expandWithTab=function(L,R){var F=this,I=L.forEachSelection(function(){return F.expandSnippetForSelection(L,R)},null,{keepOrder:!0});return I&&L.tabstopManager&&L.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(L,R){var F=L.getCursorPosition(),I=L.session.getLine(F.row),H=I.substring(0,F.column),P=I.substr(F.column),O=this.snippetMap,A;return this.getActiveScopes(L).some(function(S){var D=O[S];return D&&(A=this.findMatchingSnippet(D,H,P)),!!A},this),A?(R&&R.dryRun||(L.session.doc.removeInLine(F.row,F.column-A.replaceBefore.length,F.column+A.replaceAfter.length),this.variables.M__=A.matchBefore,this.variables.T__=A.matchAfter,this.insertSnippetForSelection(L,A.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(L,R,F){for(var I=L.length;I--;){var H=L[I];if(!(H.startRe&&!H.startRe.test(R))&&!(H.endRe&&!H.endRe.test(F))&&!(!H.startRe&&!H.endRe))return H.matchBefore=H.startRe?H.startRe.exec(R):[""],H.matchAfter=H.endRe?H.endRe.exec(F):[""],H.replaceBefore=H.triggerRe?H.triggerRe.exec(R)[0]:"",H.replaceAfter=H.endTriggerRe?H.endTriggerRe.exec(F)[0]:"",H}},C.prototype.register=function(L,R){function F(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function I(S,D,W){return S=F(S),D=F(D),S=D+S,S&&S[S.length-1]!="$"&&(S+="$"),new RegExp(S)}function H(S){S.scope||(S.scope=R||"_"),R=S.scope,P[R]||(P[R]=[],O[R]={});var D=O[R];if(S.name){var W=D[S.name];W&&A.unregister(W),D[S.name]=S}P[R].push(S),S.prefix&&(S.tabTrigger=S.prefix),!S.content&&S.body&&(S.content=Array.isArray(S.body)?S.body.join(`
1126
+ `):S.body),S.tabTrigger&&!S.trigger&&(!S.guard&&/^\w/.test(S.tabTrigger)&&(S.guard="\\b"),S.trigger=g.escapeRegExp(S.tabTrigger)),!(!S.trigger&&!S.guard&&!S.endTrigger&&!S.endGuard)&&(S.startRe=I(S.trigger,S.guard),S.triggerRe=new RegExp(S.trigger),S.endRe=I(S.endTrigger,S.endGuard),S.endTriggerRe=new RegExp(S.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,A=this;L||(L=[]),Array.isArray(L)?L.forEach(H):Object.keys(L).forEach(function(S){H(L[S])}),this._signal("registerSnippets",{scope:R})},C.prototype.unregister=function(L,R){function F(P){var O=H[P.scope||R];if(O&&O[P.name]){delete O[P.name];var A=I[P.scope||R],S=A&&A.indexOf(P);S>=0&&A.splice(S,1)}}var I=this.snippetMap,H=this.snippetNameMap;L.content?F(L):Array.isArray(L)&&L.forEach(F)},C.prototype.parseSnippetFile=function(L){L=L.replace(/\r/g,"");for(var R=[],F={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,H;H=I.exec(L);){if(H[1])try{F=JSON.parse(H[1]),R.push(F)}catch{}if(H[4])F.content=H[4].replace(/^\t/gm,""),R.push(F),F={};else{var P=H[2],O=H[3];if(P=="regex"){var A=/\/((?:[^\/\\]|\\.)*)|$/g;F.guard=A.exec(O)[1],F.trigger=A.exec(O)[1],F.endTrigger=A.exec(O)[1],F.endGuard=A.exec(O)[1]}else P=="snippet"?(F.tabTrigger=O.match(/^\S*/)[0],F.name||(F.name=O)):P&&(F[P]=O)}}return R},C.prototype.getSnippetByName=function(L,R){var F=this.snippetNameMap,I;return this.getActiveScopes(R).some(function(H){var P=F[H];return P&&(I=P[L]),!!I},this),I},C}();b.implement(m.prototype,h);var w=function(C,L,R){function F(ce){for(var ge=[],Te=0;Te<ce.length;Te++){var $e=ce[Te];if(typeof $e=="object"){if(D[$e.tabstopId])continue;var Ee=ce.lastIndexOf($e,Te-1);$e=ge[Ee]||{tabstopId:$e.tabstopId}}ge[Te]=$e}return ge}R===void 0&&(R={});var I=C.getCursorPosition(),H=C.session.getLine(I.row),P=C.session.getTabString(),O=H.match(/^\s*/)[0];I.column<O.length&&(O=O.slice(0,I.column)),L=L.replace(/\r/g,"");var A=this.tokenizeTmSnippet(L);A=this.resolveVariables(A,C),A=A.map(function(ce){return ce==`
1127
+ `&&!R.excludeExtraIndent?ce+O:typeof ce=="string"?ce.replace(/\t/g,P):ce});var S=[];A.forEach(function(ce,ge){if(typeof ce=="object"){var Te=ce.tabstopId,$e=S[Te];if($e||($e=S[Te]=[],$e.index=Te,$e.value="",$e.parents={}),$e.indexOf(ce)===-1){ce.choices&&!$e.choices&&($e.choices=ce.choices),$e.push(ce);var Ee=A.indexOf(ce,ge+1);if(Ee!==-1){var Ze=A.slice(ge+1,Ee),Xe=Ze.some(function(gt){return typeof gt=="object"});Xe&&!$e.value?$e.value=Ze:Ze.length&&(!$e.value||typeof $e.value!="string")&&($e.value=Ze.join(""))}}}}),S.forEach(function(ce){ce.length=0});for(var D={},W=0;W<A.length;W++){var U=A[W];if(typeof U=="object"){var K=U.tabstopId,Z=S[K],te=A.indexOf(U,W+1);if(D[K]){D[K]===U&&(delete D[K],Object.keys(D).forEach(function(ce){Z.parents[ce]=!0}));continue}D[K]=U;var he=Z.value;typeof he!="string"?he=F(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),A.splice.apply(A,[W+1,Math.max(0,te-W)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,ae=0,ue="";return A.forEach(function(ce){if(typeof ce=="string"){var ge=ce.split(`
1128
+ `);ge.length>1?(ae=ge[ge.length-1].length,ne+=ge.length-1):ae+=ce.length,ue+=ce}else ce&&(ce.start?ce.end={row:ne,column:ae}:ce.start={row:ne,column:ae})}),{text:ue,tabstops:S,tokens:A}},x=function(){function C(L){if(this.index=0,this.ranges=[],this.tabstops=[],L.tabstopManager)return L.tabstopManager;L.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=g.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(L)}return C.prototype.attach=function(L){this.$openTabstops=null,this.selectedTabstop=null,this.editor=L,this.session=L.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(L){for(var R=L.action[0]=="r",F=this.selectedTabstop||{},I=F.parents||{},H=this.tabstops.slice(),P=0;P<H.length;P++){var O=H[P],A=O==F||I[O.index];if(O.rangeList.$bias=A?0:1,L.action=="remove"&&O!==F){var S=O.parents&&O.parents[F.index],D=O.rangeList.pointIndex(L.start,S);D=D<0?-D-1:D+1;var W=O.rangeList.pointIndex(L.end,S);W=W<0?-W-1:W-1;for(var U=O.rangeList.ranges.slice(D,W),K=0;K<U.length;K++)this.removeRange(U[K])}O.rangeList.$onChange(L)}var Z=this.session;!this.$inChange&&R&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var L=this.selectedTabstop;if(!(!L||!L.hasLinkedRanges||!L.firstNonLinked)){this.$inChange=!0;for(var R=this.session,F=R.getTextRange(L.firstNonLinked),I=0;I<L.length;I++){var H=L[I];if(H.linked){var P=H.original,O=r.snippetManager.tmStrFormat(F,P,this.editor);R.replace(H,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(L){L.command&&!L.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var L=this.editor.selection.lead,R=this.editor.selection.anchor,F=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var H=this.ranges[I].contains(L.row,L.column),P=F||this.ranges[I].contains(R.row,R.column);if(H&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(L){var R=this.tabstops.length,F=this.index+(L||1);F=Math.min(Math.max(F,1),R),F==R&&(F=0),this.selectTabstop(F),this.updateTabstopMarkers(),F===0&&this.detach()},C.prototype.selectTabstop=function(L){this.$openTabstops=null;var R=this.tabstops[this.index];if(R&&this.addTabstopMarkers(R),this.index=L,R=this.tabstops[this.index],!(!R||!R.length)){this.selectedTabstop=R;var F=R.firstNonLinked||R;if(R.choices&&(F.cursor=F.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(F);else{var I=this.editor.multiSelect;I.toSingleRange(F);for(var H=0;H<R.length;H++)R.hasLinkedRanges&&R[H].linked||I.addRange(R[H].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(L,R,F){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!L[0]){var H=s.fromPoints(F,F);T(H.start,R),T(H.end,R),L[0]=[H],L[0].index=0}var P=this.index,O=[P+1,0],A=this.ranges,S=this.snippetId=(this.snippetId||0)+1;L.forEach(function(D,W){var U=this.$openTabstops[W]||D;U.snippetId=S;for(var K=0;K<D.length;K++){var Z=D[K],te=s.fromPoints(Z.start,Z.end||Z.start);E(te.start,R),E(te.end,R),te.original=Z,te.tabstop=U,A.push(te),U!=D?U.unshift(te):U[K]=te,Z.fmtString||U.firstNonLinked&&I?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(O.push(U),this.$openTabstops[W]=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(L){var R=this.session;L.forEach(function(F){F.markerId||(F.markerId=R.addMarker(F,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(L){var R=this.session;L.forEach(function(F){R.removeMarker(F.markerId),F.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var L=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&L--,this.tabstops.forEach(function(R){R.snippetId===L?this.addTabstopMarkers(R):this.removeTabstopMarkers(R)},this)}},C.prototype.removeRange=function(L){var R=L.tabstop.indexOf(L);R!=-1&&L.tabstop.splice(R,1),R=this.ranges.indexOf(L),R!=-1&&this.ranges.splice(R,1),R=L.tabstop.rangeList.ranges.indexOf(L),R!=-1&&L.tabstop.splice(R,1),this.session.removeMarker(L.markerId),L.tabstop.length||(R=this.tabstops.indexOf(L.tabstop),R!=-1&&this.tabstops.splice(R,1),this.tabstops.length||this.detach())},C}();x.prototype.keyboardHandler=new c,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 E=function(C,L){C.row==0&&(C.column+=L.column),C.row+=L.row},T=function(C,L){C.row==L.row&&(C.column-=L.column),C.row-=L.row};p.importCssString(`
1129
+ .ace_snippet-marker {
1130
+ -moz-box-sizing: border-box;
1131
+ box-sizing: border-box;
1132
+ background: rgba(194, 193, 208, 0.09);
1133
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1134
+ position: absolute;
1135
+ }`,"snippets.css",!1),r.snippetManager=new m;var k=n("./editor").Editor;(function(){this.insertSnippet=function(C,L){return r.snippetManager.insertSnippet(this,C,L)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(n,r,f){var d=n("../virtual_renderer").VirtualRenderer,p=n("../editor").Editor,b=n("../range").Range,h=n("../lib/event"),g=n("../lib/lang"),s=n("../lib/dom"),a=n("../config").nls,c=n("./../lib/useragent"),l=function(E){return"suggest-aria-id:".concat(E)},o=c.isSafari?"menu":"listbox",u=c.isSafari?"menuitem":"option",m=c.isSafari?"aria-current":"aria-selected",w=function(E){var T=new d(E);T.$maxLines=4;var k=new p(T);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 E(T){var k=s.createElement("div"),C=w(k);T&&T.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",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 L=function(){};C.focus=L,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=L,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(A){var S=A.getDocumentPosition();C.selection.moveToPosition(S),I.start.row=I.end.row=S.row,A.stop()});var R,F=new b(-1,0,-1,1/0),I=new b(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(A){A?F.id&&(C.session.removeMarker(F.id),F.id=null):F.id=C.session.addMarker(F,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(A){if(!R){R=A;return}if(!(R.x==A.x&&R.y==A.y)){R=A,R.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var S=R.getDocumentPosition().row;F.start.row!=S&&(F.id||C.setRow(S),P(S))}}),C.renderer.on("beforeRender",function(){if(R&&F.start.row!=-1){R.$pos=null;var A=R.getDocumentPosition().row;F.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 W=A.element.childNodes[S-A.config.firstRow];W.setAttribute("role",u),W.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),W.setAttribute("aria-setsize",C.data.length),W.setAttribute("aria-describedby","doc-tooltip"),W.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):"");W.setAttribute("aria-label",K)}var Z=W.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var A=C.getRow(),S=C.renderer.$textLayer,D=S.element.childNodes[A-S.config.firstRow],W=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),W.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=l(A);s.addCssClass(D,"ace_selected"),D.id=U,S.element.setAttribute("aria-activedescendant",U),W.setAttribute("aria-activedescendant",U),D.setAttribute(m,"true")}});var H=function(){P(-1)},P=function(A,S){A!==F.start.row&&(F.start.row=F.end.row=A,S||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return F.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,H()}),C.on("hide",H),C.on("changeSelection",H),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(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(ce,ge){ce&&W.push({type:(D.className||"")+(ge||""),value:ce})}var D=C.data[A],W=[];if(!D)return W;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,K=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(D.matchMask&1<<ne||ne==Z.length)){var ae=Z.slice(he,ne);he=ne;var ue=K.indexOf(ae,te);if(ue==-1)continue;S(U.slice(te,ue),""),te=ue+ae.length,S(U.slice(ue,te),"completion-highlight")}return S(U.slice(te,U.length),""),W.push({type:"completion-spacer",value:" "}),D.meta&&W.push({type:"completion-meta",value:D.meta}),D.message&&W.push({type:"completion-message",value:D.message}),W},O.$updateOnChange=L,O.start=L,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(A,S){C.filterText=S||"",C.setValue(g.stringRepeat(`
1136
+ `,A.length),-1),C.data=A||[],C.setRow(0)},C.getData=function(A){return C.data[A]},C.getRow=function(){return I.start.row},C.setRow=function(A){A=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,A)),I.start.row!=A&&(C.selection.clearSelection(),I.start.row=I.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,W){if(!W&&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,Z=window.innerHeight-K,te=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*S*1.4,ae={top:0,bottom:0},ue=Z-A.top-3*this.$borderSize-S,ce=A.top-3*this.$borderSize;D||(ce<=ue||ue>=ne?D="bottom":D="top"),D==="top"?(ae.bottom=A.top-this.$borderSize,ae.top=ae.bottom-ne):D==="bottom"&&(ae.top=A.top+S+this.$borderSize,ae.bottom=ae.top+ne);var ge=ae.top>=0&&ae.bottom<=Z;if(!W&&!ge)return!1;ge?he.$maxPixelHeight=null:D==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=ue,D==="top"?(U.style.top="",U.style.bottom=Z+K-ae.bottom+"px",C.isTopdown=!1):(U.style.top=ae.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var Te=A.left;return Te+U.offsetWidth>te&&(Te=te-U.offsetWidth),U.style.left=Te+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),R=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 E}();s.importCssString(`
1137
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1138
+ background-color: #CAD6FA;
1139
+ z-index: 1;
1140
+ }
1141
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1142
+ background-color: #3a674e;
1143
+ }
1144
+ .ace_editor.ace_autocomplete .ace_line-hover {
1145
+ border: 1px solid #abbffe;
1146
+ margin-top: -1px;
1147
+ background: rgba(233,233,253,0.4);
1148
+ position: absolute;
1149
+ z-index: 2;
1150
+ }
1151
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1152
+ border: 1px solid rgba(109, 150, 13, 0.8);
1153
+ background: rgba(58, 103, 78, 0.62);
1154
+ }
1155
+ .ace_completion-meta {
1156
+ opacity: 0.5;
1157
+ margin-left: 0.9em;
1158
+ }
1159
+ .ace_completion-message {
1160
+ margin-left: 0.9em;
1161
+ color: blue;
1162
+ }
1163
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1164
+ color: #2d69c7;
1165
+ }
1166
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1167
+ color: #93ca12;
1168
+ }
1169
+ .ace_editor.ace_autocomplete {
1170
+ width: 300px;
1171
+ z-index: 200000;
1172
+ border: 1px lightgray solid;
1173
+ position: fixed;
1174
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1175
+ line-height: 1.4;
1176
+ background: #fefefe;
1177
+ color: #111;
1178
+ }
1179
+ .ace_dark.ace_editor.ace_autocomplete {
1180
+ border: 1px #484747 solid;
1181
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1182
+ line-height: 1.4;
1183
+ background: #25282c;
1184
+ color: #c1c1c1;
1185
+ }
1186
+ .ace_autocomplete .ace_text-layer {
1187
+ width: calc(100% - 8px);
1188
+ }
1189
+ .ace_autocomplete .ace_line {
1190
+ display: flex;
1191
+ align-items: center;
1192
+ }
1193
+ .ace_autocomplete .ace_line > * {
1194
+ min-width: 0;
1195
+ flex: 0 0 auto;
1196
+ }
1197
+ .ace_autocomplete .ace_line .ace_ {
1198
+ flex: 0 1 auto;
1199
+ overflow: hidden;
1200
+ text-overflow: ellipsis;
1201
+ }
1202
+ .ace_autocomplete .ace_completion-spacer {
1203
+ flex: 1;
1204
+ }
1205
+ .ace_autocomplete.ace_loading:after {
1206
+ content: "";
1207
+ position: absolute;
1208
+ top: 0px;
1209
+ height: 2px;
1210
+ width: 8%;
1211
+ background: blue;
1212
+ z-index: 100;
1213
+ animation: ace_progress 3s infinite linear;
1214
+ animation-delay: 300ms;
1215
+ transform: translateX(-100%) scaleX(1);
1216
+ }
1217
+ @keyframes ace_progress {
1218
+ 0% { transform: translateX(-100%) scaleX(1) }
1219
+ 50% { transform: translateX(625%) scaleX(2) }
1220
+ 100% { transform: translateX(1500%) scaleX(3) }
1221
+ }
1222
+ @media (prefers-reduced-motion) {
1223
+ .ace_autocomplete.ace_loading:after {
1224
+ transform: translateX(625%) scaleX(2);
1225
+ animation: none;
1226
+ }
1227
+ }
1228
+ `,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=l}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(n,r,f){var d=function(){function p(b){this.editor=b,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return p.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 g=this.popup.getRow(),s=this.popup.renderer.$textLayer,a=s.element.childNodes[g-s.config.firstRow];if(a){for(var c="doc-tooltip ",l=0;l<this._lines.length;l++)c+="ace-inline-screenreader-line-".concat(l," ");a.setAttribute("aria-describedby",c)}}).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)},p.prototype.destroy=function(){this.screenReaderDiv.remove()},p.prototype.createCodeBlock=function(){var b=document.createElement("pre");b.setAttribute("id","ace-inline-screenreader");for(var h=0;h<this._lines.length;h++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(h));var s=document.createTextNode(this._lines[h]);g.appendChild(s),b.appendChild(g)}return b},p}();r.AceInlineScreenReader=d}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(n,r,f){var d=n("../snippets").snippetManager,p=n("./inline_screenreader").AceInlineScreenReader,b=function(){function h(){this.editor=null}return h.prototype.show=function(g,s,a){if(a=a||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new p(g));var c=s.snippet?d.getDisplayTextForSnippet(g,s.snippet):s.value;return s.hideInlinePreview||!c||!c.startsWith(a)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(a.length),c===""?g.removeGhostText():g.setGhostText(c),!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(n,r,f){r.parForEach=function(p,b,h){var g=0,s=p.length;s===0&&h();for(var a=0;a<s;a++)b(p[a],function(c,l){g++,g===s&&h(c,l)})};var d=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(p,b,h){h=h||d;for(var g=[],s=b-1;s>=0&&h.test(p[s]);s--)g.push(p[s]);return g.reverse().join("")},r.retrieveFollowingIdentifier=function(p,b,h){h=h||d;for(var g=[],s=b;s<p.length&&h.test(p[s]);s++)g.push(p[s]);return g},r.getCompletionPrefix=function(p){var b=p.getCursorPosition(),h=p.session.getLine(b.row),g;return p.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(a){!g&&a&&(g=this.retrievePrecedingIdentifier(h,b.column,a))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(h,b.column)},r.triggerAutocomplete=function(p,h){var h=h??p.session.getPrecedingCharacter();return p.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(h)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(n,r,f){var d=n("./keyboard/hash_handler").HashHandler,p=n("./autocomplete/popup").AcePopup,b=n("./autocomplete/inline").AceInline,h=n("./autocomplete/popup").getAriaId,g=n("./autocomplete/util"),s=n("./lib/lang"),a=n("./lib/dom"),c=n("./snippets").snippetManager,l=n("./config"),o=n("./lib/event"),u=n("./lib/scroll").preventParentScroll,m=function(T,k){k.completer&&k.completer.destroy()},w=function(){function T(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new d,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 E(T.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:l.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new p(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)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new b,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(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))},T.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)},T.prototype.$updateGhostText=function(k){var C=this.base.row,L=this.base.column,R=this.editor.getCursorPosition().column,F=this.editor.session.getLine(C).slice(L,R);this.inlineRenderer.show(this.editor,k,F)?this.$seen(k):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var L=this.popup.getData(C);L&&(!k||L.hideInlinePreview)&&this.$seen(L)}},T.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},T.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},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,L=C.layerConfig.lineHeight,R=C.$cursorLayer.getPixelPosition(this.base,!0);R.left-=this.popup.getTextLeftOffset();var F=k.container.getBoundingClientRect();R.top+=F.top-C.layerConfig.offset,R.left+=F.left-k.renderer.scrollLeft,R.left+=C.gutterWidth;var I={top:R.top,left:R.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var H=k.container.getBoundingClientRect().bottom-L,P=H<I.top?{top:H,left:I.left}:I;this.popup.tryShow(P,L,"bottom")||this.popup.tryShow(R,L,"top")||this.popup.show(R,L)},T.prototype.openPopup=function(k,C,L){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var R=this.popup.getRow(),F=this.popup.data[R];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:h(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(F)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===R&&F!==this.completions.filtered[I]&&this.$onPopupChange();var H=this.inlineRenderer&&this.inlineEnabled;if(I===R&&H){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}L||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},T.prototype.changeListener=function(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()},T.prototype.blurListener=function(k){var C=document.activeElement,L=this.editor.textInput.getElement(),R=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),F=this.popup&&this.popup.container;C!=L&&C.parentNode!=F&&!R&&C!=this.tooltipNode&&k.relatedTarget!=L&&this.detach()},T.prototype.mousedownListener=function(k){this.detach()},T.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(k){this.popup.goTo(k)},T.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var L=this.completions,R=this.getCompletionProvider().insertMatch(this.editor,k,L.filterText,C);return this.completions==L&&this.detach(),R},T.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)},T.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new x(k)),this.completionProvider},T.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},T.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var R=this.editor.getCursorPosition(),F=this.editor.session.getTextRange({start:this.base,end:R});if(F==this.completions.filterText)return;if(this.completions.setFilter(F),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==F&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,F,k);return}if(C&&C.matches){var R=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(R.row,R.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var L=this.editor.getSession(),R=this.editor.getCursorPosition(),F=g.getCompletionPrefix(this.editor);this.base=L.doc.createAnchor(R.row,R.column-F.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:F,pos:R}).provideCompletions(this.editor,I,(function(H,P,O){var A=P.filtered,S=g.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 W=[{caption:D,value:""}];this.completions=new E(W),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 E(T.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)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var k=this.popup,C=this.completions&&this.completions.filtered,L=C&&(C[k.getHoveredRow()]||C[k.getRow()]),R=null;if(!L||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var F=this.editor.completers.length,I=0;I<F;I++){var H=this.editor.completers[I];if(H.getDocTooltip&&L.completerId===H.id){R=H.getDocTooltip(L);break}}if(!R&&typeof L!="string"&&(R=L),typeof R=="string"&&(R={docText:R}),!R||!R.docHTML&&!R.docText)return this.hideDocTooltip();this.showDocTooltip(R)},T.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",u));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var L=this.tooltipNode;k.docHTML?L.innerHTML=k.docHTML:k.docText&&(L.textContent=k.docText),L.parentNode||this.popup.container.appendChild(this.tooltipNode);var R=this.popup,F=R.container.getBoundingClientRect(),I=400,H=300,P=R.renderer.scrollBar.width||10,O=F.left,A=window.innerWidth-F.right-P,S=R.isTopdown?F.top:window.innerHeight-P-F.bottom,D=[Math.min(A/I,1),Math.min(O/I,1),Math.min(S/H*.9)],W=Math.max.apply(Math,D),U=L.style;U.display="block",W==D[0]?(U.left=F.right+1+"px",U.right="",U.maxWidth=I*W+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):W==D[1]?(U.right=window.innerWidth-F.left+"px",U.left="",U.maxWidth=I*W+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):W==D[2]&&(U.left=window.innerWidth-F.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",R.isTopdown?(U.top=F.bottom+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.bottom,H)+"px"):(U.top=R.container.offsetTop-L.offsetHeight+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(R.container.offsetTop,H)+"px"))},T.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)}},T.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}},T.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},T.for=function(k){return k.completer instanceof T||(k.completer&&(k.completer.destroy(),k.completer=null),l.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),k.completer=T.$sharedInstance):(k.completer=new T,k.once("destroy",m))),k.completer},T}();w.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var k=T.completer.insertMatch();if(k||T.tabstopManager)return k;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var k=g.getCompletionPrefix(T);!k&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(T,k){var C=w.for(T);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(T,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=function(){function T(k){this.initialPosition=k,this.active=!0}return T.prototype.insertByIndex=function(k,C,L){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],L)},T.prototype.insertMatch=function(k,C,L){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var R=this.completions.filterText.length,F=0;if(C.range&&C.range.start.row===C.range.end.row&&(R-=this.initialPosition.prefix.length,R+=this.initialPosition.pos.column-C.range.start.column,F+=C.range.end.column-this.initialPosition.pos.column),R||F){var I;k.selection.getAllRanges?I=k.selection.getAllRanges():I=[k.getSelectionRange()];for(var H=0,P;P=I[H];H++)P.start.column-=R,P.end.column+=F,k.session.remove(P)}C.snippet?c.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},T.prototype.$insertString=function(k,C){var L=C.value||C;k.execCommand("insertstring",L)},T.prototype.gatherCompletions=function(k,C){var L=k.getSession(),R=k.getCursorPosition(),F=g.getCompletionPrefix(k),I=[];this.completers=k.completers;var H=k.completers.length;return k.completers.forEach(function(P,O){P.getCompletions(k,L,R,F,function(A,S){P.hideInlinePreview&&(S=S.map(function(D){return Object.assign(D,{hideInlinePreview:P.hideInlinePreview})})),!A&&S&&(I=I.concat(S)),C(null,{prefix:g.getCompletionPrefix(k),matches:I,finished:--H===0})})}),!0},T.prototype.provideCompletions=function(k,C,L){var R=(function(P){var O=P.prefix,A=P.matches;this.completions=new E(A),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&L(null,this.completions,P.finished)}).bind(this),F=!0,I=null;if(this.gatherCompletions(k,(function(P,O){if(this.active){P&&(L(P,[],!0),this.detach());var A=O.prefix;if(A.indexOf(O.prefix)===0){if(F){I=O;return}R(O)}}}).bind(this)),F=!1,I){var H=I;I=null,R(H)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},T}(),E=function(){function T(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.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(R,F){return F.exactMatch-R.exactMatch||F.$score-R.$score||(R.caption||R.value).localeCompare(F.caption||F.value)});var L=null;C=C.filter(function(R){var F=R.snippet||R.caption||R.value;return F===L?!1:(L=F,!0)}),this.filtered=C},T.prototype.filterCompletions=function(k,C){var L=[],R=C.toUpperCase(),F=C.toLowerCase();e:for(var I=0,H;H=k[I];I++){if(H.skipFilter){H.$score=H.score,L.push(H);continue}var P=!this.ignoreCaption&&H.caption||H.value||H.snippet;if(P){var O=-1,A=0,S=0,D,W;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(F);if(U>-1)S=U;else for(var K=0;K<C.length;K++){var Z=P.indexOf(F[K],O+1),te=P.indexOf(R[K],O+1);if(D=Z>=0&&(te<0||Z<te)?Z:te,D<0)continue e;W=D-O-1,W>0&&(O===-1&&(S+=10),S+=W,A|=1<<K),O=D}}H.matchMask=A,H.exactMatch=S?0:1,H.$score=(H.score||0)-S,L.push(H)}}return L},T}();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=E}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,r,f){function d(g,s){var a=g.getTextRange(b.fromPoints({row:0,column:0},s));return a.split(h).length-1}function p(g,s){var a=d(g,s),c=g.getValue().split(h),l=Object.create(null),o=c[a];return c.forEach(function(u,m){if(!(!u||u===o)){var w=Math.abs(a-m),x=c.length-w;l[u]?l[u]=Math.max(x,l[u]):l[u]=x}}),l}var b=n("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(g,s,a,c,l){var o=p(s,a),u=Object.keys(o);l(null,u.map(function(m){return{caption:m,value:m,score:o[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(n,r,f){var d=n("../snippets").snippetManager,p=n("../autocomplete").Autocomplete,b=n("../config"),h=n("../lib/lang"),g=n("../autocomplete/util"),s=n("../autocomplete/text_completer"),a={getCompletions:function(R,F,I,H,P){if(F.$mode.completer)return F.$mode.completer.getCompletions(R,F,I,H,P);var O=R.session.getState(I.row),A=F.$mode.getCompletions(O,F,I,H);A=A.map(function(S){return S.completerId=a.id,S}),P(null,A)},id:"keywordCompleter"},c=function(R){var F={};return R.replace(/\${(\d+)(:(.*?))?}/g,function(I,H,P,O){return F[H]=O||""}).replace(/\$(\d+?)/g,function(I,H){return F[H]})},l={getCompletions:function(R,F,I,H,P){var O=[],A=F.getTokenAt(I.row,I.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?O.push("html-tag"):O=d.getActiveScopes(R);var S=d.snippetMap,D=[];O.forEach(function(W){for(var U=S[W]||[],K=U.length;K--;){var Z=U[K],te=Z.name||Z.tabTrigger;te&&D.push({caption:te,snippet:Z.content,meta:Z.tabTrigger&&!Z.name?Z.tabTrigger+"⇥ ":"snippet",completerId:l.id})}},this),P(null,D)},getDocTooltip:function(R){R.snippet&&!R.docHTML&&(R.docHTML=["<b>",h.escapeHTML(R.caption),"</b>","<hr></hr>",h.escapeHTML(c(R.snippet))].join(""))},id:"snippetCompleter"},o=[l,s,a];r.setCompleters=function(R){o.length=0,R&&o.push.apply(o,R)},r.addCompleter=function(R){o.push(R)},r.textCompleter=s,r.keyWordCompleter=a,r.snippetCompleter=l;var u={name:"expandSnippet",exec:function(R){return d.expandWithTab(R)},bindKey:"Tab"},m=function(R,F){w(F.session.$mode)},w=function(R){typeof R=="string"&&(R=b.$modes[R]),R&&(d.files||(d.files={}),x(R.$id,R.snippetFileId),R.modes&&R.modes.forEach(w))},x=function(R,F){!F||!R||d.files[R]||(d.files[R]={},b.loadModule(F,function(I){I&&(d.files[R]=I,!I.snippets&&I.snippetText&&(I.snippets=d.parseSnippetFile(I.snippetText)),d.register(I.snippets||[],I.scope),I.includeScopes&&(d.snippetMap[I.scope].includeScopes=I.includeScopes,I.includeScopes.forEach(function(H){w("ace/mode/"+H)})))}))},E=function(R){var F=R.editor,I=F.completer&&F.completer.activated;if(R.command.name==="backspace")I&&!g.getCompletionPrefix(F)&&F.completer.detach();else if(R.command.name==="insertstring"&&!I){T=R;var H=R.editor.$liveAutocompletionDelay;H?k.delay(H):C(R)}},T,k=h.delayedCall(function(){C(T)},0),C=function(R){var F=R.editor,I=g.getCompletionPrefix(F),H=R.args,P=g.triggerAutocomplete(F,H);if(I&&I.length>=F.$liveAutocompletionThreshold||P){var O=p.for(F);O.autoShown=!0,O.showPopup(F)}},L=n("../editor").Editor;n("../config").defineOptions(L.prototype,"editor",{enableBasicAutocompletion:{set:function(R){R?(this.completers||(this.completers=Array.isArray(R)?R:o),this.commands.addCommand(p.startCommand)):this.commands.removeCommand(p.startCommand)},value:!1},enableLiveAutocompletion:{set:function(R){R?(this.completers||(this.completers=Array.isArray(R)?R:o),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(R){R?(this.commands.addCommand(u),this.on("changeMode",m),m(null,this)):(this.commands.removeCommand(u),this.off("changeMode",m))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(n){t&&(t.exports=n)})}()}(ap)),ap.exports}x1();var cp={exports:{}},up;function C1(){return up||(up=1,function(t,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(n,r,f){f.exports=`
1229
+
1230
+ /* ------------------------------------------------------------------------------------------
1231
+ * Editor Search Form
1232
+ * --------------------------------------------------------------------------------------- */
1233
+ .ace_search {
1234
+ background-color: #ddd;
1235
+ color: #666;
1236
+ border: 1px solid #cbcbcb;
1237
+ border-top: 0 none;
1238
+ overflow: hidden;
1239
+ margin: 0;
1240
+ padding: 4px 6px 0 4px;
1241
+ position: absolute;
1242
+ top: 0;
1243
+ z-index: 99;
1244
+ white-space: normal;
1245
+ }
1246
+ .ace_search.left {
1247
+ border-left: 0 none;
1248
+ border-radius: 0px 0px 5px 0px;
1249
+ left: 0;
1250
+ }
1251
+ .ace_search.right {
1252
+ border-radius: 0px 0px 0px 5px;
1253
+ border-right: 0 none;
1254
+ right: 0;
1255
+ }
1256
+
1257
+ .ace_search_form, .ace_replace_form {
1258
+ margin: 0 20px 4px 0;
1259
+ overflow: hidden;
1260
+ line-height: 1.9;
1261
+ }
1262
+ .ace_replace_form {
1263
+ margin-right: 0;
1264
+ }
1265
+ .ace_search_form.ace_nomatch {
1266
+ outline: 1px solid red;
1267
+ }
1268
+
1269
+ .ace_search_field {
1270
+ border-radius: 3px 0 0 3px;
1271
+ background-color: white;
1272
+ color: black;
1273
+ border: 1px solid #cbcbcb;
1274
+ border-right: 0 none;
1275
+ outline: 0;
1276
+ padding: 0;
1277
+ font-size: inherit;
1278
+ margin: 0;
1279
+ line-height: inherit;
1280
+ padding: 0 6px;
1281
+ min-width: 17em;
1282
+ vertical-align: top;
1283
+ min-height: 1.8em;
1284
+ box-sizing: content-box;
1285
+ }
1286
+ .ace_searchbtn {
1287
+ border: 1px solid #cbcbcb;
1288
+ line-height: inherit;
1289
+ display: inline-block;
1290
+ padding: 0 6px;
1291
+ background: #fff;
1292
+ border-right: 0 none;
1293
+ border-left: 1px solid #dcdcdc;
1294
+ cursor: pointer;
1295
+ margin: 0;
1296
+ position: relative;
1297
+ color: #666;
1298
+ }
1299
+ .ace_searchbtn:last-child {
1300
+ border-radius: 0 3px 3px 0;
1301
+ border-right: 1px solid #cbcbcb;
1302
+ }
1303
+ .ace_searchbtn:disabled {
1304
+ background: none;
1305
+ cursor: default;
1306
+ }
1307
+ .ace_searchbtn:hover {
1308
+ background-color: #eef1f6;
1309
+ }
1310
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1311
+ padding: 0px 0.7em
1312
+ }
1313
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1314
+ content: "";
1315
+ border: solid 2px #888;
1316
+ width: 0.5em;
1317
+ height: 0.5em;
1318
+ border-width: 2px 0 0 2px;
1319
+ display:inline-block;
1320
+ transform: rotate(-45deg);
1321
+ }
1322
+ .ace_searchbtn.next:after {
1323
+ border-width: 0 2px 2px 0 ;
1324
+ }
1325
+ .ace_searchbtn_close {
1326
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1327
+ border-radius: 50%;
1328
+ border: 0 none;
1329
+ color: #656565;
1330
+ cursor: pointer;
1331
+ font: 16px/16px Arial;
1332
+ padding: 0;
1333
+ height: 14px;
1334
+ width: 14px;
1335
+ top: 9px;
1336
+ right: 7px;
1337
+ position: absolute;
1338
+ }
1339
+ .ace_searchbtn_close:hover {
1340
+ background-color: #656565;
1341
+ background-position: 50% 100%;
1342
+ color: white;
1343
+ }
1344
+
1345
+ .ace_button {
1346
+ margin-left: 2px;
1347
+ cursor: pointer;
1348
+ -webkit-user-select: none;
1349
+ -moz-user-select: none;
1350
+ -o-user-select: none;
1351
+ -ms-user-select: none;
1352
+ user-select: none;
1353
+ overflow: hidden;
1354
+ opacity: 0.7;
1355
+ border: 1px solid rgba(100,100,100,0.23);
1356
+ padding: 1px;
1357
+ box-sizing: border-box!important;
1358
+ color: black;
1359
+ }
1360
+
1361
+ .ace_button:hover {
1362
+ background-color: #eee;
1363
+ opacity:1;
1364
+ }
1365
+ .ace_button:active {
1366
+ background-color: #ddd;
1367
+ }
1368
+
1369
+ .ace_button.checked {
1370
+ border-color: #3399ff;
1371
+ opacity:1;
1372
+ }
1373
+
1374
+ .ace_search_options{
1375
+ margin-bottom: 3px;
1376
+ text-align: right;
1377
+ -webkit-user-select: none;
1378
+ -moz-user-select: none;
1379
+ -o-user-select: none;
1380
+ -ms-user-select: none;
1381
+ user-select: none;
1382
+ clear: both;
1383
+ }
1384
+
1385
+ .ace_search_counter {
1386
+ float: left;
1387
+ font-family: arial;
1388
+ padding: 0 8px;
1389
+ }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(n,r,f){var d=n("../lib/dom"),p=n("../lib/lang"),b=n("../lib/event"),h=n("./searchbox-css"),g=n("../keyboard/hash_handler").HashHandler,s=n("../lib/keys"),a=n("../config").nls,c=999;d.importCssString(h,"ace_searchbox",!1);var l=function(){function m(w,x,E){this.activeInput,this.element=d.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),d.importCssString(h,"ace_searchbox",w.container),b.addListener(this.element,"touchstart",function(T){T.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;b.addListener(w,"mousedown",function(E){setTimeout(function(){x.activeInput.focus()},0),b.stopPropagation(E)}),b.addListener(w,"click",function(E){var T=E.target||E.srcElement,k=T.getAttribute("action");k&&x[k]?x[k]():x.$searchBarKb.commands[k]&&x.$searchBarKb.commands[k].exec(x),b.stopPropagation(E)}),b.addCommandKeyListener(w,function(E,T,k){var C=s.keyCodeToString(k),L=x.$searchBarKb.findKeyCommand(T,C);L&&L.exec&&(L.exec(x),b.stopEvent(E))}),this.$onChange=p.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){d.setCssClass(this.replaceOption,"checked",this.searchRange),d.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.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,E){var T=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),k=!T&&this.searchInput.value;d.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,E=x.unicode,T=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,`
1390
+ `),w.session.doc.$autoNewLine=`
1391
+ `);var L=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(L-=w.session.doc.positionToIndex(this.searchRange.start));for(var R=x.lastIndex=0,F;(F=x.exec(C))&&(T++,R=F.index,R<=L&&k++,!(T>c||!F[0]&&(x.lastIndex=R+=p.skipEmptyMatch(C,R,E),R>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,T>c?c+"+":T])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;d.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=p.escapeRegExp(w)),w&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m}(),o=new g;o.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},Tab:function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var u=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);l.prototype.$searchBarKb=o,l.prototype.$closeSearchBarKb=u,r.SearchBox=l,r.Search=function(m,w){var x=m.searchBox||new l(m);x.show(m.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(n){t&&(t.exports=n)})}()}(cp)),cp.exports}C1();var k1=Object.defineProperty,_1=(t,e,n)=>e in t?k1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vl=(t,e,n)=>_1(t,typeof e!="symbol"?e+"":e,n);function hp(t,e){return function(){return t.apply(e,arguments)}}const{toString:S1}=Object.prototype,{getPrototypeOf:uu}=Object,{iterator:yl,toStringTag:dp}=Symbol,bl=(t=>e=>{const n=S1.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Oi=t=>(t=t.toLowerCase(),e=>bl(e)===t),wl=t=>e=>typeof e===t,{isArray:Vs}=Array,Aa=wl("undefined");function A1(t){return t!==null&&!Aa(t)&&t.constructor!==null&&!Aa(t.constructor)&&Vr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const fp=Oi("ArrayBuffer");function T1(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&fp(t.buffer),e}const $1=wl("string"),Vr=wl("function"),pp=wl("number"),xl=t=>t!==null&&typeof t=="object",M1=t=>t===!0||t===!1,Cl=t=>{if(bl(t)!=="object")return!1;const e=uu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(dp in t)&&!(yl in t)},E1=Oi("Date"),I1=Oi("File"),L1=Oi("Blob"),R1=Oi("FileList"),O1=t=>xl(t)&&Vr(t.pipe),D1=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Vr(t.append)&&((e=bl(t))==="formdata"||e==="object"&&Vr(t.toString)&&t.toString()==="[object FormData]"))},N1=Oi("URLSearchParams"),[F1,P1,B1,W1]=["ReadableStream","Request","Response","Headers"].map(Oi),j1=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ta(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,f;if(typeof t!="object"&&(t=[t]),Vs(t))for(r=0,f=t.length;r<f;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let b;for(r=0;r<p;r++)b=d[r],e.call(null,t[b],b,t)}}function gp(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,f;for(;r-- >0;)if(f=n[r],e===f.toLowerCase())return f;return null}const cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mp=t=>!Aa(t)&&t!==cs;function hu(){const{caseless:t}=mp(this)&&this||{},e={},n=(r,f)=>{const d=t&&gp(e,f)||f;Cl(e[d])&&Cl(r)?e[d]=hu(e[d],r):Cl(r)?e[d]=hu({},r):Vs(r)?e[d]=r.slice():e[d]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&Ta(arguments[r],n);return e}const z1=(t,e,n,{allOwnKeys:r}={})=>(Ta(e,(f,d)=>{n&&Vr(f)?t[d]=hp(f,n):t[d]=f},{allOwnKeys:r}),t),H1=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),U1=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},V1=(t,e,n,r)=>{let f,d,p;const b={};if(e=e||{},t==null)return e;do{for(f=Object.getOwnPropertyNames(t),d=f.length;d-- >0;)p=f[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&uu(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},q1=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},K1=t=>{if(!t)return null;if(Vs(t))return t;let e=t.length;if(!pp(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},G1=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&uu(Uint8Array)),Y1=(t,e)=>{const n=(t&&t[yl]).call(t);let r;for(;(r=n.next())&&!r.done;){const f=r.value;e.call(t,f[0],f[1])}},X1=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Q1=Oi("HTMLFormElement"),Z1=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),vp=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),J1=Oi("RegExp"),yp=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ta(n,(f,d)=>{let p;(p=e(f,d,t))!==!1&&(r[d]=p||f)}),Object.defineProperties(t,r)},ex=t=>{yp(t,(e,n)=>{if(Vr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Vr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},tx=(t,e)=>{const n={},r=f=>{f.forEach(d=>{n[d]=!0})};return Vs(t)?r(t):r(String(t).split(e)),n},nx=()=>{},rx=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function ix(t){return!!(t&&Vr(t.append)&&t[dp]==="FormData"&&t[yl])}const ox=t=>{const e=new Array(10),n=(r,f)=>{if(xl(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[f]=r;const d=Vs(r)?[]:{};return Ta(r,(p,b)=>{const h=n(p,f+1);!Aa(h)&&(d[b]=h)}),e[f]=void 0,d}}return r};return n(t,0)},sx=Oi("AsyncFunction"),ax=t=>t&&(xl(t)||Vr(t))&&Vr(t.then)&&Vr(t.catch),bp=((t,e)=>t?setImmediate:e?((n,r)=>(cs.addEventListener("message",({source:f,data:d})=>{f===cs&&d===n&&r.length&&r.shift()()},!1),f=>{r.push(f),cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vr(cs.postMessage)),lx=typeof queueMicrotask<"u"?queueMicrotask.bind(cs):typeof process<"u"&&process.nextTick||bp,cx=t=>t!=null&&Vr(t[yl]),Se={isArray:Vs,isArrayBuffer:fp,isBuffer:A1,isFormData:D1,isArrayBufferView:T1,isString:$1,isNumber:pp,isBoolean:M1,isObject:xl,isPlainObject:Cl,isReadableStream:F1,isRequest:P1,isResponse:B1,isHeaders:W1,isUndefined:Aa,isDate:E1,isFile:I1,isBlob:L1,isRegExp:J1,isFunction:Vr,isStream:O1,isURLSearchParams:N1,isTypedArray:G1,isFileList:R1,forEach:Ta,merge:hu,extend:z1,trim:j1,stripBOM:H1,inherits:U1,toFlatObject:V1,kindOf:bl,kindOfTest:Oi,endsWith:q1,toArray:K1,forEachEntry:Y1,matchAll:X1,isHTMLForm:Q1,hasOwnProperty:vp,hasOwnProp:vp,reduceDescriptors:yp,freezeMethods:ex,toObjectSet:tx,toCamelCase:Z1,noop:nx,toFiniteNumber:rx,findKey:gp,global:cs,isContextDefined:mp,isSpecCompliantForm:ix,toJSONObject:ox,isAsyncFn:sx,isThenable:ax,setImmediate:bp,asap:lx,isIterable:cx};function Lt(t,e,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Se.inherits(Lt,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 wp=Lt.prototype,xp={};["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(t=>{xp[t]={value:t}}),Object.defineProperties(Lt,xp),Object.defineProperty(wp,"isAxiosError",{value:!0}),Lt.from=(t,e,n,r,f,d)=>{const p=Object.create(wp);return Se.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Lt.call(p,t.message,e,n,r,f),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const ux=null;function du(t){return Se.isPlainObject(t)||Se.isArray(t)}function Cp(t){return Se.endsWith(t,"[]")?t.slice(0,-2):t}function kp(t,e,n){return t?t.concat(e).map(function(r,f){return r=Cp(r),!n&&f?"["+r+"]":r}).join(n?".":""):e}function hx(t){return Se.isArray(t)&&!t.some(du)}const dx=Se.toFlatObject(Se,{},null,function(t){return/^is[A-Z]/.test(t)});function kl(t,e,n){if(!Se.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Se.isUndefined(o[l])});const r=n.metaTokens,f=n.visitor||g,d=n.dots,p=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(f))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Se.isDate(l))return l.toISOString();if(!b&&Se.isBlob(l))throw new Lt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(l)||Se.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,o,u){let m=l;if(l&&!u&&typeof l=="object"){if(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Se.isArray(l)&&hx(l)||(Se.isFileList(l)||Se.endsWith(o,"[]"))&&(m=Se.toArray(l)))return o=Cp(o),m.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&e.append(p===!0?kp([o],x,d):p===null?o:o+"[]",h(w))}),!1}return du(l)?!0:(e.append(kp(u,o,d),h(l)),!1)}const s=[],a=Object.assign(dx,{defaultVisitor:g,convertValue:h,isVisitable:du});function c(l,o){if(!Se.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Se.forEach(l,function(u,m){(!(Se.isUndefined(u)||u===null)&&f.call(e,u,Se.isString(m)?m.trim():m,o,a))===!0&&c(u,o?o.concat(m):[m])}),s.pop()}}if(!Se.isObject(t))throw new TypeError("data must be an object");return c(t),e}function _p(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function fu(t,e){this._pairs=[],t&&kl(t,this,e)}const Sp=fu.prototype;Sp.append=function(t,e){this._pairs.push([t,e])},Sp.toString=function(t){const e=t?function(n){return t.call(this,n,_p)}:_p;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function fx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ap(t,e,n){if(!e)return t;const r=n&&n.encode||fx;Se.isFunction(n)&&(n={serialize:n});const f=n&&n.serialize;let d;if(f?d=f(e,n):d=Se.isURLSearchParams(e)?e.toString():new fu(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class Tp{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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(n){n!==null&&e(n)})}}const $p={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},px=typeof URLSearchParams<"u"?URLSearchParams:fu,gx=typeof FormData<"u"?FormData:null,mx=typeof Blob<"u"?Blob:null,vx={isBrowser:!0,classes:{URLSearchParams:px,FormData:gx,Blob:mx},protocols:["http","https","file","blob","url","data"]},pu=typeof window<"u"&&typeof document<"u",gu=typeof navigator=="object"&&navigator||void 0,yx=pu&&(!gu||["ReactNative","NativeScript","NS"].indexOf(gu.product)<0),bx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wx=pu&&window.location.href||"http://localhost",xx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pu,hasStandardBrowserEnv:yx,hasStandardBrowserWebWorkerEnv:bx,navigator:gu,origin:wx},Symbol.toStringTag,{value:"Module"})),Sr={...xx,...vx};function Cx(t,e){return kl(t,new Sr.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,d){return Sr.isNode&&Se.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function kx(t){return Se.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function _x(t){const e={},n=Object.keys(t);let r;const f=n.length;let d;for(r=0;r<f;r++)d=n[r],e[d]=t[d];return e}function Mp(t){function e(n,r,f,d){let p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),h=d>=n.length;return p=!p&&Se.isArray(f)?f.length:p,h?(Se.hasOwnProp(f,p)?f[p]=[f[p],r]:f[p]=r,!b):((!f[p]||!Se.isObject(f[p]))&&(f[p]=[]),e(n,r,f[p],d)&&Se.isArray(f[p])&&(f[p]=_x(f[p])),!b)}if(Se.isFormData(t)&&Se.isFunction(t.entries)){const n={};return Se.forEachEntry(t,(r,f)=>{e(kx(r),f,n,0)}),n}return null}function Sx(t,e,n){if(Se.isString(t))try{return(e||JSON.parse)(t),Se.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const $a={transitional:$p,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,f=Se.isObject(t);if(f&&Se.isHTMLForm(t)&&(t=new FormData(t)),Se.isFormData(t))return r?JSON.stringify(Mp(t)):t;if(Se.isArrayBuffer(t)||Se.isBuffer(t)||Se.isStream(t)||Se.isFile(t)||Se.isBlob(t)||Se.isReadableStream(t))return t;if(Se.isArrayBufferView(t))return t.buffer;if(Se.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Cx(t,this.formSerializer).toString();if((d=Se.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return kl(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return f||r?(e.setContentType("application/json",!1),Sx(t)):t}],transformResponse:[function(t){const e=this.transitional||$a.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(t)||Se.isReadableStream(t))return t;if(t&&Se.isString(t)&&(n&&!this.responseType||r)){const f=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(f)throw d.name==="SyntaxError"?Lt.from(d,Lt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sr.classes.FormData,Blob:Sr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],t=>{$a.headers[t]={}});const Ax=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"]),Tx=t=>{const e={};let n,r,f;return t&&t.split(`
1392
+ `).forEach(function(d){f=d.indexOf(":"),n=d.substring(0,f).trim().toLowerCase(),r=d.substring(f+1).trim(),!(!n||e[n]&&Ax[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Ep=Symbol("internals");function Ma(t){return t&&String(t).trim().toLowerCase()}function _l(t){return t===!1||t==null?t:Se.isArray(t)?t.map(_l):String(t)}function $x(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Mx=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function mu(t,e,n,r,f){if(Se.isFunction(r))return r.call(this,e,n);if(f&&(e=n),!!Se.isString(e)){if(Se.isString(r))return e.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(e)}}function Ex(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Ix(t,e){const n=Se.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(f,d,p){return this[r].call(this,e,f,d,p)},configurable:!0})})}let qr=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function f(p,b,h){const g=Ma(b);if(!g)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,g);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||b]=_l(p))}const d=(p,b)=>Se.forEach(p,(h,g)=>f(h,g,b));if(Se.isPlainObject(t)||t instanceof this.constructor)d(t,e);else if(Se.isString(t)&&(t=t.trim())&&!Mx(t))d(Tx(t),e);else if(Se.isObject(t)&&Se.isIterable(t)){let p={},b,h;for(const g of t){if(!Se.isArray(g))throw TypeError("Object iterator must return a key-value pair");p[h=g[0]]=(b=p[h])?Se.isArray(b)?[...b,g[1]]:[b,g[1]]:g[1]}d(p,e)}else t!=null&&f(e,t,n);return this}get(t,e){if(t=Ma(t),t){const n=Se.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return $x(r);if(Se.isFunction(e))return e.call(this,r,n);if(Se.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ma(t),t){const n=Se.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||mu(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function f(d){if(d=Ma(d),d){const p=Se.findKey(n,d);p&&(!e||mu(n,n[p],p,e))&&(delete n[p],r=!0)}}return Se.isArray(t)?t.forEach(f):f(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const f=e[n];(!t||mu(this,this[f],f,t,!0))&&(delete this[f],r=!0)}return r}normalize(t){const e=this,n={};return Se.forEach(this,(r,f)=>{const d=Se.findKey(n,f);if(d){e[d]=_l(r),delete e[f];return}const p=t?Ex(f):String(f).trim();p!==f&&delete e[f],e[p]=_l(r),n[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Se.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&Se.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1393
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[Ep]=this[Ep]={accessors:{}}).accessors,n=this.prototype;function r(f){const d=Ma(f);e[d]||(Ix(n,f),e[d]=!0)}return Se.isArray(t)?t.forEach(r):r(t),this}};qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(qr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Se.freezeMethods(qr);function vu(t,e){const n=this||$a,r=e||n,f=qr.from(r.headers);let d=r.data;return Se.forEach(t,function(p){d=p.call(n,d,f.normalize(),e?e.status:void 0)}),f.normalize(),d}function Ip(t){return!!(t&&t.__CANCEL__)}function qs(t,e,n){Lt.call(this,t??"canceled",Lt.ERR_CANCELED,e,n),this.name="CanceledError"}Se.inherits(qs,Lt,{__CANCEL__:!0});function Lp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Lt("Request failed with status code "+n.status,[Lt.ERR_BAD_REQUEST,Lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Lx(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Rx(t,e){t=t||10;const n=new Array(t),r=new Array(t);let f=0,d=0,p;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),g=r[d];p||(p=h),n[f]=b,r[f]=h;let s=d,a=0;for(;s!==f;)a+=n[s++],s=s%t;if(f=(f+1)%t,f===d&&(d=(d+1)%t),h-p<e)return;const c=g&&h-g;return c?Math.round(a*1e3/c):void 0}}function Ox(t,e){let n=0,r=1e3/e,f,d;const p=(b,h=Date.now())=>{n=h,f=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const h=Date.now(),g=h-n;g>=r?p(b,h):(f=b,d||(d=setTimeout(()=>{d=null,p(f)},r-g)))},()=>f&&p(f)]}const Sl=(t,e,n=3)=>{let r=0;const f=Rx(50,250);return Ox(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,h=p-r,g=f(h),s=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:h,rate:g||void 0,estimated:g&&b&&s?(b-p)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Rp=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Op=t=>(...e)=>Se.asap(()=>t(...e)),Dx=Sr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Sr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Sr.origin),Sr.navigator&&/(msie|trident)/i.test(Sr.navigator.userAgent)):()=>!0,Nx=Sr.hasStandardBrowserEnv?{write(t,e,n,r,f,d){const p=[t+"="+encodeURIComponent(e)];Se.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Se.isString(r)&&p.push("path="+r),Se.isString(f)&&p.push("domain="+f),d===!0&&p.push("secure"),document.cookie=p.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Fx(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Px(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Dp(t,e,n){let r=!Fx(e);return t&&(r||n==!1)?Px(t,e):e}const Np=t=>t instanceof qr?{...t}:t;function us(t,e){e=e||{};const n={};function r(g,s,a,c){return Se.isPlainObject(g)&&Se.isPlainObject(s)?Se.merge.call({caseless:c},g,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function f(g,s,a,c){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g,a,c)}else return r(g,s,a,c)}function d(g,s){if(!Se.isUndefined(s))return r(void 0,s)}function p(g,s){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function b(g,s,a){if(a in e)return r(g,s);if(a in t)return r(void 0,g)}const h={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:b,headers:(g,s,a)=>f(Np(g),Np(s),a,!0)};return Se.forEach(Object.keys(Object.assign({},t,e)),function(g){const s=h[g]||f,a=s(t[g],e[g],g);Se.isUndefined(a)&&s!==b||(n[g]=a)}),n}const Fp=t=>{const e=us({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:d,headers:p,auth:b}=e;e.headers=p=qr.from(p),e.url=Ap(Dp(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let h;if(Se.isFormData(n)){if(Sr.hasStandardBrowserEnv||Sr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((h=p.getContentType())!==!1){const[g,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...s].join("; "))}}if(Sr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(e)),r||r!==!1&&Dx(e.url))){const g=f&&d&&Nx.read(d);g&&p.set(f,g)}return e},Bx=typeof XMLHttpRequest<"u",Wx=Bx&&function(t){return new Promise(function(e,n){const r=Fp(t);let f=r.data;const d=qr.from(r.headers).normalize();let{responseType:p,onUploadProgress:b,onDownloadProgress:h}=r,g,s,a,c,l;function o(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function m(){if(!u)return;const x=qr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!p||p==="text"||p==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:x,config:t,request:u};Lp(function(T){e(T),o()},function(T){n(T),o()},E),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(n(new Lt("Request aborted",Lt.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new Lt("Network Error",Lt.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||$p;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new Lt(x,E.clarifyTimeoutError?Lt.ETIMEDOUT:Lt.ECONNABORTED,t,u)),u=null},f===void 0&&d.setContentType(null),"setRequestHeader"in u&&Se.forEach(d.toJSON(),function(x,E){u.setRequestHeader(E,x)}),Se.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),p&&p!=="json"&&(u.responseType=r.responseType),h&&([a,l]=Sl(h,!0),u.addEventListener("progress",a)),b&&u.upload&&([s,c]=Sl(b),u.upload.addEventListener("progress",s),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{u&&(n(!x||x.type?new qs(null,t,u):x),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=Lx(r.url);if(w&&Sr.protocols.indexOf(w)===-1){n(new Lt("Unsupported protocol "+w+":",Lt.ERR_BAD_REQUEST,t));return}u.send(f||null)})},jx=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,f;const d=function(g){if(!f){f=!0,b();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Lt?s:new qs(s instanceof Error?s.message:s))}};let p=e&&setTimeout(()=>{p=null,d(new Lt(`timeout ${e} of ms exceeded`,Lt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(b),h}},zx=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,f;for(;r<n;)f=r+e,yield t.slice(r,f),r=f},Hx=async function*(t,e){for await(const n of Ux(t))yield*zx(n,e)},Ux=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Pp=(t,e,n,r)=>{const f=Hx(t,e);let d=0,p,b=h=>{p||(p=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await f.next();if(g){b(),h.close();return}let a=s.byteLength;if(n){let c=d+=a;n(c)}h.enqueue(new Uint8Array(s))}catch(g){throw b(g),g}},cancel(h){return b(h),f.return()}},{highWaterMark:2})},Al=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Bp=Al&&typeof ReadableStream=="function",Vx=Al&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Wp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},qx=Bp&&Wp(()=>{let t=!1;const e=new Request(Sr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),jp=64*1024,yu=Bp&&Wp(()=>Se.isReadableStream(new Response("").body)),Tl={stream:yu&&(t=>t.body)};Al&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Tl[e]&&(Tl[e]=Se.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Lt(`Response type '${e}' is not supported`,Lt.ERR_NOT_SUPPORT,r)})})})(new Response);const Kx=async t=>{if(t==null)return 0;if(Se.isBlob(t))return t.size;if(Se.isSpecCompliantForm(t))return(await new Request(Sr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(t)||Se.isArrayBuffer(t))return t.byteLength;if(Se.isURLSearchParams(t)&&(t=t+""),Se.isString(t))return(await Vx(t)).byteLength},Gx=async(t,e)=>Se.toFiniteNumber(t.getContentLength())??Kx(e),Yx=Al&&(async t=>{let{url:e,method:n,data:r,signal:f,cancelToken:d,timeout:p,onDownloadProgress:b,onUploadProgress:h,responseType:g,headers:s,withCredentials:a="same-origin",fetchOptions:c}=Fp(t);g=g?(g+"").toLowerCase():"text";let l=jx([f,d&&d.toAbortSignal()],p),o;const u=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(h&&qx&&n!=="get"&&n!=="head"&&(m=await Gx(s,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Se.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[L,R]=Rp(m,Sl(Op(h)));r=Pp(k.body,jp,L,R)}}Se.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...c,signal:l,method:n.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(o);const E=yu&&(g==="stream"||g==="response");if(yu&&(b||E&&u)){const k={};["status","statusText","headers"].forEach(F=>{k[F]=x[F]});const C=Se.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&Rp(C,Sl(Op(b),!0))||[];x=new Response(Pp(x.body,jp,L,()=>{R&&R(),u&&u()}),k)}g=g||"text";let T=await Tl[Se.findKey(Tl,g)||"text"](x,t);return!E&&u&&u(),await new Promise((k,C)=>{Lp(k,C,{data:T,headers:qr.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:o})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Lt("Network Error",Lt.ERR_NETWORK,t,o),{cause:w.cause||w}):Lt.from(w,w&&w.code,t,o)}}),bu={http:ux,xhr:Wx,fetch:Yx};Se.forEach(bu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const zp=t=>`- ${t}`,Xx=t=>Se.isFunction(t)||t===null||t===!1,Hp={getAdapter:t=>{t=Se.isArray(t)?t:[t];const{length:e}=t;let n,r;const f={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!Xx(n)&&(r=bu[(p=String(n)).toLowerCase()],r===void 0))throw new Lt(`Unknown adapter '${p}'`);if(r)break;f[p||"#"+d]=r}if(!r){const d=Object.entries(f).map(([b,h])=>`adapter ${b} `+(h===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1394
+ `+d.map(zp).join(`
1395
+ `):" "+zp(d[0]):"as no adapter specified";throw new Lt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:bu};function wu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qs(null,t)}function Up(t){return wu(t),t.headers=qr.from(t.headers),t.data=vu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Hp.getAdapter(t.adapter||$a.adapter)(t).then(function(e){return wu(t),e.data=vu.call(t,t.transformResponse,e),e.headers=qr.from(e.headers),e},function(e){return Ip(e)||(wu(t),e&&e.response&&(e.response.data=vu.call(t,t.transformResponse,e.response),e.response.headers=qr.from(e.response.headers))),Promise.reject(e)})}const Vp="1.9.0",$l={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$l[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const qp={};$l.transitional=function(t,e,n){function r(f,d){return"[Axios v"+Vp+"] Transitional option '"+f+"'"+d+(n?". "+n:"")}return(f,d,p)=>{if(t===!1)throw new Lt(r(d," has been removed"+(e?" in "+e:"")),Lt.ERR_DEPRECATED);return e&&!qp[d]&&(qp[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(f,d,p):!0}},$l.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Qx(t,e,n){if(typeof t!="object")throw new Lt("options must be an object",Lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let f=r.length;for(;f-- >0;){const d=r[f],p=e[d];if(p){const b=t[d],h=b===void 0||p(b,d,t);if(h!==!0)throw new Lt("option "+d+" must be "+h,Lt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Lt("Unknown option "+d,Lt.ERR_BAD_OPTION)}}const Ml={assertOptions:Qx,validators:$l},Qi=Ml.validators;let hs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Tp,response:new Tp}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const f=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?f&&!String(n.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(n.stack+=`
1396
+ `+f):n.stack=f}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=us(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:f}=e;n!==void 0&&Ml.assertOptions(n,{silentJSONParsing:Qi.transitional(Qi.boolean),forcedJSONParsing:Qi.transitional(Qi.boolean),clarifyTimeoutError:Qi.transitional(Qi.boolean)},!1),r!=null&&(Se.isFunction(r)?e.paramsSerializer={serialize:r}:Ml.assertOptions(r,{encode:Qi.function,serialize:Qi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ml.assertOptions(e,{baseUrl:Qi.spelling("baseURL"),withXsrfToken:Qi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let d=f&&Se.merge(f.common,f[e.method]);f&&Se.forEach(["delete","get","head","post","put","patch","common"],l=>{delete f[l]}),e.headers=qr.concat(d,f);const p=[];let b=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(e)===!1||(b=b&&l.synchronous,p.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let g,s=0,a;if(!b){const l=[Up.bind(this),void 0];for(l.unshift.apply(l,p),l.push.apply(l,h),a=l.length,g=Promise.resolve(e);s<a;)g=g.then(l[s++],l[s++]);return g}a=p.length;let c=e;for(s=0;s<a;){const l=p[s++],o=p[s++];try{c=l(c)}catch(u){o.call(this,u);break}}try{g=Up.call(this,c)}catch(l){return Promise.reject(l)}for(s=0,a=h.length;s<a;)g=g.then(h[s++],h[s++]);return g}getUri(t){t=us(this.defaults,t);const e=Dp(t.baseURL,t.url,t.allowAbsoluteUrls);return Ap(e,t.params,t.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(t){hs.prototype[t]=function(e,n){return this.request(us(n||{},{method:t,url:e,data:(n||{}).data}))}}),Se.forEach(["post","put","patch"],function(t){function e(n){return function(r,f,d){return this.request(us(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}hs.prototype[t]=e(),hs.prototype[t+"Form"]=e(!0)});let Zx=class Zb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(f){n=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](f);r._listeners=null}),this.promise.then=f=>{let d;const p=new Promise(b=>{r.subscribe(b),d=b}).then(f);return p.cancel=function(){r.unsubscribe(d)},p},e(function(f,d,p){r.reason||(r.reason=new qs(f,d,p),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Zb(function(n){e=n}),cancel:e}}};function Jx(t){return function(e){return t.apply(null,e)}}function eC(t){return Se.isObject(t)&&t.isAxiosError===!0}const xu={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(xu).forEach(([t,e])=>{xu[e]=t});function Kp(t){const e=new hs(t),n=hp(hs.prototype.request,e);return Se.extend(n,hs.prototype,e,{allOwnKeys:!0}),Se.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Kp(us(t,r))},n}const Vn=Kp($a);Vn.Axios=hs,Vn.CanceledError=qs,Vn.CancelToken=Zx,Vn.isCancel=Ip,Vn.VERSION=Vp,Vn.toFormData=kl,Vn.AxiosError=Lt,Vn.Cancel=Vn.CanceledError,Vn.all=function(t){return Promise.all(t)},Vn.spread=Jx,Vn.isAxiosError=eC,Vn.mergeConfig=us,Vn.AxiosHeaders=qr,Vn.formToJSON=t=>Mp(Se.isHTMLForm(t)?new FormData(t):t),Vn.getAdapter=Hp.getAdapter,Vn.HttpStatusCode=xu,Vn.default=Vn;const{Axios:QD,AxiosError:ZD,CanceledError:JD,isCancel:eN,CancelToken:tN,VERSION:nN,all:rN,Cancel:iN,isAxiosError:oN,spread:sN,toFormData:aN,AxiosHeaders:lN,HttpStatusCode:cN,formToJSON:uN,getAdapter:hN,mergeConfig:dN}=Vn,Cu=Vn.create({baseURL:location.origin,timeout:6e4,params:{}});Cu.interceptors.response.use(t=>t,t=>{var e,n,r,f,d,p,b,h,g,s,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let c=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(c+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(c+=`${t.response.config.data} `),(d=(f=t.response)==null?void 0:f.data)!=null&&d.message?c+=`${t.response.data.message}`:(b=(p=t.response)==null?void 0:p.data)!=null&&b.exception?c+=`${t.response.data.exception}`:(s=(g=(h=t.response)==null?void 0:h.data)==null?void 0:g.error)!=null&&s.message?(t.response.data.error.class&&(c+=`${t.response.data.error.class} `),c+=`${t.response.data.error.message}`):c+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:c}),t}else throw t});const El=async function(t,e,{data:n,params:r={},headers:f,noAuth:d=!1,noScope:p=!1,onUploadProgress:b=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}f.Authorization=localStorage.openc3Token}return f.manual=!0,!p&&!r.scope&&(r.scope=window.openc3Scope),Cu({method:t,url:e,data:n,params:r,headers:f,onUploadProgress:b})},ku={Accept:"application/json"},Gp={...ku,"Content-Type":"application/json"},tC=sr("F",{get:function(t,{params:e,headers:n=ku,noScope:r,noAuth:f,onUploadProgress:d}={}){return El("get",t,{params:e,headers:n,noScope:r,noAuth:f,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=Gp,noScope:f,noAuth:d,onUploadProgress:p}={}){return El("put",t,{data:e,params:n,headers:r,noScope:f,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=Gp,noScope:f,noAuth:d,onUploadProgress:p}={}){return El("post",t,{data:e,params:n,headers:r,noScope:f,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=ku,noScope:r,noAuth:f,onUploadProgress:d}={}){return El("delete",t,{params:e,headers:n,noScope:r,noAuth:f,onUploadProgress:d})}});let Il=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,f=n.length;r<f;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(f=>e!==f)}}});class Ea extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class _u extends Ea{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class nC extends Ea{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Di extends Ea{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class rC extends Di{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Yp(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class iC{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,n){if(!this._info)return this._info={id:e,info:n},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((n,{id:r,info:f})=>(n[r]=f,n),{})}}const ds=Symbol("state");class Xp{constructor(e={}){this.emitter=Il(),this.params=Object.freeze(e),this.presence=new iC(this),this.initialConnect=!0,this[ds]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Yp({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ds]}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[ds]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ds]="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[ds]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ds]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ds]="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,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});return r}emit(e,...n){return this.emitter.emit(e,...n)}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,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(f=>f()),e()})),r.push(this.on("close",f=>{r.forEach(d=>d()),n(f||new Ea("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class oC{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 n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.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 n,r={promise:new Promise(d=>{n=d}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},f=this._pendingTop;return this._pendings.push(r),f&&await f.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 n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class sC{constructor(){this.queue=[]}async acquire(e,n){n==="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 aC{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new sC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let f=this._subscriptions[e]=new oC(e);return f.remoteId=this._localToRemote[e],f.subscriber=n,f.unsubscriber=r,f.gvl=this.glv,f}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class lC{constructor(e={}){this.subscriptions=new aC(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let f=this._remoteToLocal[e];if(!f){this._pendingMessages.push([e,n,r]);return}let d=this.subscriptions.get(f);d&&d.channels.forEach(p=>{p.receive(n,r)})}notify(e,n,r){let f=this._remoteToLocal[e];if(!f)return;let d=this.subscriptions.get(f);d&&d.channels.forEach(p=>p.emit(n,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 n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const Qp={debug:0,info:1,warn:2,error:3};class Zp{constructor(e){this.level=e||"warn"}log(e,n,r){Qp[e]<Qp[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class Ia extends Zp{writeLogEntry(){}}class cC{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let uC=0;class Jp{constructor(e={}){let{logger:n}=e;this.logger=n||new Ia,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let f=Yp(r);if(this.pendingUnsubscriptions[f]){let p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,f),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,n))},p)})}if(this.pendingSubscriptions[f])return this.logger.warn("subscription is already pending, skipping",f),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((p,b)=>{let h=++uC;this.pendingSubscriptions[f]={resolve:p,reject:b,id:h},this.cable.send(this.buildSubscribeRequest(f)),this.maybeRetrySubscribe(h,f,d)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let f=this.pendingSubscriptions[n];f&&f.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let f=this.pendingSubscriptions[n];f&&f.id===e&&(delete this.pendingSubscriptions[n],f.reject(new nC(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},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,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:f,reason:d,reconnect:p}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(n==="disconnect"){let b=new Di(d);this.reset(b),p===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(n==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(n==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new _u)):this.logger.error("subscription not found",{type:n,identifier:r})}if(f)return{identifier:r,message:f};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const eg=()=>Date.now()/1e3|0;class hC extends Jp{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=eg()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:f}=e;if(n==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=eg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let d=e.restored_ids||Object.keys(this.subscriptionStreams);for(let p of d)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(n==="presence"){let d=f.type;if(d==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(f))}else if(d==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:f}}if(f){let d=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:f,meta:d}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){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,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let f=this.presenceInfo[e];return f&&(n.presence=f),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let f of this.subscriptionStreams[e]){let d=this.streamsPositions[f];d&&(r=!0,n[f]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,f){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:f},{stream:n,epoch:r,offset:f}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,f)=>{this.pendingPresence[e]={resolve:r,reject:f},this.cable.send({command:"presence",identifier:e,data:n})})}}class dC extends Ea{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Su extends Xp{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}vl(Su,"identifier","__ghost__");const fC="$pubsub";class Au extends Xp{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}vl(Au,"identifier",fC);const fs=Symbol("state");let pC=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:f,hubOptions:d,performFailures:p,transportConfigurator:b}){this.emitter=Il(),this.transport=t,this.encoder=n,this.logger=r||new Ia,this.protocol=e,this.performFailures=p||"throw",this.protocol.attached(this),this.hub=new lC(d||{}),this[fs]="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,f===!1&&this.connect().catch(()=>{})}get state(){return this[fs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[fs]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[fs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Di("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[fs]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Di("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Di(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[fs]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof Di?t:new Di(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[fs]="closed";let n=e||new Di("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:f,message:d,meta:p}=n;r?this.hub.notify(f,r,d):this.hub.transmit(f,d,p)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new Au({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Au({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=Su),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let f=await t.acquire("subscribed");if(f.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),f.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),f.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),f.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),f.release();return}let d={identifier:e,params:n};this.logger.debug("subscribing",d);try{let p=await this.protocol.subscribe(e,n);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...d,remoteId:p}),t.notify("connected")}catch(p){if(p){if(p instanceof _u&&this.logger.warn("rejected",d),p instanceof Di){this.logger.debug("disconnected during subscription; will retry on connect",d),f.release();return}this.logger.error("failed to subscribe",{error:p,...d})}t.close(p),this.hub.unsubscribe(r)}f.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(f){f&&(f instanceof Di?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:f}):this.logger.error("unsubscribe failed",{id:e,error:f}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new dC;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let f=r.remoteId,d={id:f,action:e,payload:n};this.logger.debug("perform",d);try{let p=await this.protocol.perform(f,e,n);return p&&this.logger.debug("perform result",{message:p,request:d}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:d}),p}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(f=>f()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(f=>f()),e(r)}))}),this._pendingConnect)}};const gC={maxMissingPings:2,maxReconnectAttempts:1/0},Ks=()=>Date.now(),tg=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:f}=e;return n=n||2,r===void 0&&(r=.5),d=>{let p=t*n**d,b=p*n,h=p+(b-p)*Math.random(),g=2*(Math.random()-.5)*r;return h=h*(1+g),f&&f<h&&(h=f),h}};let ng=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},gC,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 Ia,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Ks()}watch(t){this.target=t,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(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=Ks(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Ks(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Ks(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Ks()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=Ks()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new rC))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class mC{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Il(),this.unbind=[],this.logger=n.logger||new Ia}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.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,n){this.transports.forEach(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});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 vC{constructor(e,n={}){this.url=e;let r=n.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=Il();let{format:f,subprotocol:d,authStrategy:p}=n;this.format=f||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=p||"param",this.authProtocol="",this.subprotocol=d}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((n,r)=>{let f=[];f.push(this.once("open",()=>{f.forEach(d=>d()),n()})),f.push(this.once("close",()=>{f.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let f=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(f)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(f=>f.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,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...f)=>{r(),n(...f)});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 n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},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 rg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function yC(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},rg,e);let{protocol:n,websocketImplementation:r,websocketFormat:f,websocketOptions:d,websocketAuthStrategy:p,fallbacks:b,logLevel:h,logger:g,transport:s,encoder:a,lazy:c,monitor:l,pingInterval:o,reconnectStrategy:u,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:E,historyTimestamp:T,protocolOptions:k,concurrentSubscribes:C,performFailures:L,transportConfigurator:R,auth:F}=e;if(g=g||new Ia(h),typeof n=="string"){x=x||n;let P=n.substring(0,n.lastIndexOf("-")),O=n.substring(n.lastIndexOf("-")+1);if(k=k||{},P==="actioncable-v1")n=new Jp({logger:g,...k});else if(P==="actioncable-v1-ext")n=new hC({logger:g,historyTimestamp:T,...k});else throw Error(`Protocol is not supported yet: ${n}`);if(O==="json")a=a||new cC,f=f||"text";else if(O==="msgpack"){if(f="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(f=f||"binary",!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: ${n}`)}if(!n)throw Error("Protocol must be specified");s=s||new vC(t,{websocketImplementation:r,websocketOptions:d,subprotocol:x,authStrategy:p,format:f}),b&&(s=new mC([s,...b],{logger:g})),F&&F.token&&s.setToken(F.token,F.param||"jid"),u=u||tg(o),l!==!1&&(l=l||new ng({pingInterval:o,reconnectStrategy:u,maxMissingPings:m,maxReconnectAttempts:w,logger:g}));let I={concurrentSubscribes:C},H=new pC({protocol:n,transport:s,encoder:a,logger:g,lazy:c,hubOptions:I,performFailures:L,transportConfigurator:R});return l&&(l.watch(H),H.monitor=l),E&&bC(H,async()=>{try{await E(s)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function bC(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class wC{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class xC extends Su{constructor(e,n,r){super(e,n),this.subscription=new wC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:f})=>this.subscription.notify("connected",{reconnected:f})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",f=>this.subscription.notify("received",f)),this.on("close",f=>{f&&f instanceof _u?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class CC{constructor(e){this.cable=e}create(e,n){let r,f;typeof e=="object"?(r=e.channel,delete e.channel,f=e):(r=e,f={});let d=new xC(r,f,n);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class kC{constructor(e){this.cable=e,this.subscriptions=new CC(e)}}class _C extends Zp{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class SC 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")},n=f=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:f})},r=()=>this.disconnect(new Di("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!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 AC=["cable","action-cable"],TC="/cable",Ll=(t,e)=>{for(let n of AC){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},ig=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,$C=()=>{if(typeof document<"u"&&document.head){let t=Ll(document,"url");if(t)return ig(t)}return ig(TC)},MC=()=>{if(typeof document<"u"&&document.head){let t=Ll(document,"history-timestamp");if(t)return t|0}},EC=()=>{if(typeof document<"u"&&document.head)return Ll(document,"token")},IC=()=>{if(typeof document<"u"&&document.head)return Ll(document,"token-param")};function LC(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||$C(),e=e||{},e.historyTimestamp||(e.historyTimestamp=MC());let n=EC();if(n){let g=IC();e.auth=Object.assign({token:n,param:g},e.auth||{})}e=Object.assign({},rg,e);let{logLevel:r,logger:f,pingInterval:d,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:h}=e;return f=e.logger=e.logger||new _C(r),p=e.reconnectStrategy=e.reconnectStrategy||tg(d),e.monitor!==!1&&(e.monitor=e.monitor||new SC({pingInterval:d,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:h,logger:f})),yC(t,e)}function RC(t,e){let n=LC(t,e);return new kC(n)}class OC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},f={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){let p=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);p=new URL(p,document.baseURI).href,this._cable=RC(p)}return this._cable.subscriptions.create({channel:e,...f},r)})}recordPing(){}}sr("P",OC);class DC{constructor(e,n,r="",f=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=n,this.usage=r,this.url=f}}sr("e",DC);function Tu(t){return NC.test(t)}const NC=/^-?[0-9]+$/;function og(t){return FC.test(t)}const FC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function sg(t,e){const n=Number.parseFloat(t),r=String(n),f=ag(t),d=ag(r);return!!(f===d||(e==null?void 0:e.approx)===!0&&!Tu(t)&&d.length>=14&&f.startsWith(d.substring(0,14)))}let La=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function PC(t){if(sg(t,{approx:!1}))return;if(Tu(t))return La.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?La.underflow:La.truncate_float:La.overflow}function ag(t){return t.replace(BC,"").replace(jC,"").replace(zC,"").replace(WC,"")}const BC=/[eE][+-]?\d+$/,WC=/^-?(0*)?/,jC=/\./,zC=/0+$/;class HC{constructor(e){if(vl(this,"isLosslessNumber",!0),!og(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=PC(this.value);if(e===void 0||e===La.truncate_float)return Number.parseFloat(this.value);if(Tu(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 UC(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function VC(t){return new HC(t)}function qC(t,e){return $u({"":t},"",t,e)}function $u(t,e,n,r){return Array.isArray(n)?r.call(t,e,GC(n,r)):n&&typeof n=="object"&&!UC(n)?r.call(t,e,KC(n,r)):r.call(t,e,n)}function KC(t,e){for(const n of Object.keys(t)){const r=$u(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function GC(t,e){for(let n=0;n<t.length;n++)t[n]=$u(t,String(n),t[n],e);return t}function YC(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:VC,r=0;const f=b();return o(f),m(),e?qC(f,e):f;function d(){if(t.charCodeAt(r)===tk){r++,g();const A={};let S=!0;for(;r<t.length&&t.charCodeAt(r)!==cg;){S?S=!1:(c(),g());const D=r,W=s();if(W===void 0){E();return}g(),l();const U=b();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(A,W)&&!Mu(U,A[W])&&T(W,D+1),A[W]=U}return t.charCodeAt(r)!==cg&&k(),r++,A}}function p(){if(t.charCodeAt(r)===nk){r++,g();const A=[];let S=!0;for(;r<t.length&&t.charCodeAt(r)!==ug;){S?S=!1:c();const D=b();u(D),A.push(D)}return t.charCodeAt(r)!==ug&&C(),r++,A}}function b(){g();const A=s()??a()??d()??p()??h("true",!0)??h("false",!1)??h("null",null);return g(),A}function h(A,S){if(t.slice(r,r+A.length)===A)return r+=A.length,S}function g(){for(;XC(t.charCodeAt(r));)r++}function s(){if(t.charCodeAt(r)===Eu){r++;let A="";for(;r<t.length&&t.charCodeAt(r)!==Eu;){if(t.charCodeAt(r)===ek){const S=t[r+1],D=JC[S];D!==void 0?(A+=D,r++):S==="u"?Rl(t.charCodeAt(r+2))&&Rl(t.charCodeAt(r+3))&&Rl(t.charCodeAt(r+4))&&Rl(t.charCodeAt(r+5))?(A+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):I(r):R(r)}else ZC(t.charCodeAt(r))?A+=t[r]:L(t[r]);r++}return x(),r++,A}}function a(){const A=r;if(t.charCodeAt(r)===hg&&(r++,w(A)),t.charCodeAt(r)===Iu)r++;else if(QC(t.charCodeAt(r)))for(r++;Ol(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===uk)for(r++,w(A);Ol(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===gk||t.charCodeAt(r)===pk)for(r++,(t.charCodeAt(r)===hg||t.charCodeAt(r)===ak)&&r++,w(A);Ol(t.charCodeAt(r));)r++;if(r>A)return n(t.slice(A,r))}function c(){if(t.charCodeAt(r)!==ck)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function l(){if(t.charCodeAt(r)!==hk)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(A){if(A===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function u(A){if(A===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function m(){if(r<t.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(A){if(!Ol(t.charCodeAt(r))){const S=t.slice(A,r);throw new SyntaxError(`Invalid number '${S}', expecting a digit ${O()}`)}}function x(){if(t.charCodeAt(r)!==Eu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function T(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 L(A){throw new SyntaxError(`Invalid character '${A}' ${H()}`)}function R(A){const S=t.slice(A,A+2);throw new SyntaxError(`Invalid escape character '${S}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function I(A){const S=t.slice(A,A+6);throw new SyntaxError(`Invalid unicode character '${S}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function XC(t){return t===rk||t===ik||t===ok||t===sk}function Rl(t){return t>=Iu&&t<=Lu||t>=dk&&t<=mk||t>=fk&&t<=vk}function Ol(t){return t>=Iu&&t<=Lu}function QC(t){return t>=lk&&t<=Lu}function ZC(t){return t>=32&&t<=1114111}function Mu(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>Mu(n,e[r])):lg(t)&&lg(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>Mu(t[n],e[n])):!1}function lg(t){return typeof t=="object"&&t!==null}const JC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1397
+ `,r:"\r",t:" "},ek=92,tk=123,cg=125,nk=91,ug=93,rk=32,ik=10,ok=9,sk=13,Eu=34,ak=43,hg=45,Iu=48,lk=49,Lu=57,ck=44,uk=46,hk=58,dk=65,fk=97,pk=69,gk=101,mk=70,vk=102;function dg(t,e,n,r){return f(t);function f(h,g){if(Array.isArray(r)){const s=r.find(a=>a.test(h));if(s){const a=s.stringify(h);if(typeof a!="string"||!og(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 d(h);if(h&&typeof h=="object")return p(h)}function d(h,g){if(h.length===0)return"[]";let s="[";for(let a=0;a<h.length;a++){const c=h[a];typeof c<"u"&&typeof c!="function"?s+=f(c):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function p(h,g){if(typeof h.toJSON=="function")return dg(h.toJSON(),e,n,void 0);const s=Array.isArray(e)?e.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,c="{";for(const l of s){const o=h[l];if(b(l,o)){a?a=!1:c+=",";const u=JSON.stringify(l);c+=`${u}:`,c+=f(o)}}return c+="}",c}function b(h,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function yk(t){return sg(t)?parseFloat(t):BigInt(t)}class bk{constructor(){vl(this,"id",1)}async exec(e,n,r={},f={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,f.manual=!0,(await Cu.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...f},timeout:d,transformRequest:[(p,b)=>dg(p)],transformResponse:[p=>YC(p,void 0,yk)]})).data.result}catch(p){let b=new Error;throw p.response?(b.name=p.response.data.error.data.class,b.message=p.response.data.error.data.message,b.object=p.response.data.error):p.request?(b.name="Request error",b.message="Request error, no response received"):b.name="Unknown error",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,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,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,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}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,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}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,n,r,f=30){const d=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:f});if(d!=null){let p=d.length,b=null;for(let h=0;h<p;h++)b=this.decode_openc3_type(d[h][1]),b!==null&&(d[h][1]=b)}return d}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}async get_tlm_values(e,n=30,r=null){let f={stale_time:n};r!==null&&(f.cache_timeout=r);const d=await this.exec("get_tlm_values",[e],f,{},1e4);let p=d[0].length,b=null;for(let h=0;h<p;h++)b=this.decode_openc3_type(d[0][h]),b!==null&&(d[0][h]=b);return d}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,f="CONVERTED"){let d=null;if(n===void 0)d=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))d=await this.exec("tlm",[e],{type:n});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else d=await this.exec("tlm",[e,n,r],{type:f});let p=this.decode_openc3_type(d);return p!==null&&(d=p),d}async inject_tlm(e,n,r=null,f="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:f})}set_tlm(e,n,r,f){return this.exec("set_tlm",[e,n,r],{type:f})}override_tlm(e,n,r,f){return this.exec("override_tlm",[e,n,r],{type:f})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,f){return this.exec("normalize_tlm",[e,n,r],{type:f})}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,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,f="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,f])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,f,d){let p=null;for(let b in f)Object.prototype.hasOwnProperty.call(f,b)&&(p=this.encode_openc3_type(f[b]),p!==null&&(f[b]=p));return this.exec(e,[n,r,f],{},d)}get_cmd_hazardous(e,n,r,f={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},f):this._cmd("get_cmd_hazardous",e,n,r,f)}cmd(e,n,r,f={}){return n===void 0?this.exec("cmd",e,{},f):this._cmd("cmd",e,n,r,f)}cmd_no_range_check(e,n,r,f={}){return n===void 0?this.exec("cmd_no_range_check",e,{},f):this._cmd("cmd_no_range_check",e,n,r,f)}cmd_raw(e,n,r,f={}){return n===void 0?this.exec("cmd_raw",e,{},f):this._cmd("cmd_raw",e,n,r,f)}cmd_raw_no_range_check(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},f):this._cmd("cmd_raw_no_range_check",e,n,r,f)}cmd_no_hazardous_check(e,n,r,f={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},f):this._cmd("cmd_no_hazardous_check",e,n,r,f)}cmd_no_checks(e,n,r,f={}){return n===void 0?this.exec("cmd_no_checks",e,{},f):this._cmd("cmd_no_checks",e,n,r,f)}cmd_raw_no_hazardous_check(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},f):this._cmd("cmd_raw_no_hazardous_check",e,n,r,f)}cmd_raw_no_checks(e,n,r,f={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},f):this._cmd("cmd_raw_no_checks",e,n,r,f)}build_cmd(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}build_command(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,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){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),f=new Uint8Array(r);return Array.from(f).map(d=>d.toString(16).padStart(2,"0")).join("")}}}sr("B",bk);var fg={exports:{}},pg;function wk(){return pg||(pg=1,function(t,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(n,r,f){function d(g,s){function a(F,I,H){if(!(F.length<I)){var P=F.slice(0,I),O=F.slice(I),A=/^(?:(\s+)|(\S+)(\s+))/.exec(O),S=/(?:(\s+)|(\s+)(\S+))$/.exec(P),D=0,W=0;if(S&&!S[2]&&(D=I-S[1].length,W=I),A&&!A[2]&&(D||(D=I),W=I+A[1].length),D)return{start:D,end:W};if(S&&S[2]&&S.index>H)return{start:S.index,end:S.index+S[2].length};if(A&&A[2])return D=I+A[2].length,{start:D,end:D+A[3].length}}}for(var c=s.column||g.getOption("printMarginColumn"),l=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),u=Math.max(s.startRow,s.endRow),m=g.session;o<=u;){var w=m.getLine(o);if(w.length>c){var x=a(w,c,5);if(x){var E=/^\s*/.exec(w)[0];m.replace(new b(o,x.start,o,x.end),`
1398
+ `+E)}u++}else if(l&&/\S/.test(w)&&o!=u){var T=m.getLine(o+1);if(T&&/\S/.test(T)){var k=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),L=k+" "+C,x=a(L,c,5);if(x&&x.start>k.length||L.length<c){var R=new b(o,k.length,o+1,T.length-C.length);m.replace(R," "),o--,u--}else k.length<w.length&&m.remove(new b(o,k.length,o,w.length))}}o++}}function p(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var s=g.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var c=s.session.$undoManager.$lastDelta;d(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),c!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var b=n("../range").Range,h=n("../editor").Editor;n("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},value:!1}}),r.hardWrap=d}),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(n,r,f){function d(y){return{row:y.line,column:y.ch}}function p(y){return new De(y.row,y.column)}function b(y,$,_){if($.line===_.line&&$.ch>=_.ch-1){var N=y.getLine($.line),B=N.charCodeAt($.ch);55296<=B&&B<=55551&&(_.ch+=1)}return{start:$,end:_}}function h(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),je.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",Vo),L(y),je.on(y.getInputField(),"paste",s(y))}function g(y){y.setOption("disableInput",!1),y.off("cursorActivity",Vo),je.off(y.getInputField(),"paste",s(y)),y.state.vim=null,gr&&clearTimeout(gr)}function s(y){var $=y.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(y.setCursor(ge(y.getCursor(),0,1)),zn.enterInsertMode(y,{},$))}),$.onPasteFn}function a(y,$){return $>=y.firstLine()&&$<=y.lastLine()}function c(y){return/^[a-z]$/.test(y)}function l(y){return"()[]{}".indexOf(y)!=-1}function o(y){return pa.test(y)}function u(y){return ln.test(y)}function m(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,$){for(var _=0;_<$.length;_++)if($[_]==y)return!0;return!1}function E(y,$,_,N,B){if($===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(_||(_="string"),Gt[y]={type:_,defaultValue:$,callback:B},N)for(var j=0;j<N.length;j++)Gt[N[j]]=Gt[y];$&&T(y,$)}function T(y,$,_,N){var B=Gt[y];N=N||{};var j=N.scope;if(!B)return new Error("Unknown option: "+y);if(B.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+y+"="+$);$!==!1&&($=!0)}B.callback?(j!=="local"&&B.callback($,void 0),j!=="global"&&_&&B.callback($,_)):(j!=="local"&&(B.value=B.type=="boolean"?!!$:$),j!=="global"&&_&&(_.state.vim.options[y]={value:$}))}function k(y,$,_){var N=Gt[y];_=_||{};var B=_.scope;if(!N)return new Error("Unknown option: "+y);if(N.callback){var j=$&&N.callback(void 0,$);return B!=="global"&&j!==void 0?j:B!=="local"?N.callback():void 0}var j=B!=="global"&&$&&$.state.vim.options[y];return(j||B!=="local"&&N||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Wn()}function L(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 R(){He={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:ki(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Gt){var $=Gt[y];$.value=$.defaultValue}}function F(y){function $(Y){typeof Y=="string"?An.value=Y:An=null}if(y[0]=="<"){var _=y.toLowerCase().slice(1,-1),N=_.split("-");if(_=N.pop()||"",_=="lt")y="<";else if(_=="space")y=" ";else if(_=="cr")y=`
1399
+ `;else if(_i[_]){var B=An.value,j={key:_i[_],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};An.onKeyDown&&An.onKeyDown(j,An.value,$),An&&An.onKeyUp&&An.onKeyUp(j,An.value,$);return}}if(y==`
1400
+ `){var q=An;An=null,q.onClose&&q.onClose(q.value)}else An.value=(An.value||"")+y}function I(y,$,_){var N=fn;if(_){if(Pr.indexOf(_)!=-1)return;Pr.push(_),fn=_.noremap!=0}try{for(var B=L(y),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec($);){var Y=q[0],Q=B.insertMode;if(An){F(Y);continue}var re=_t.handleKey(y,Y,"mapping");if(!re&&Q&&B.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
1401
+ `;else{if(_i.hasOwnProperty(se)){Y=_i[se],Ko(y,Y);continue}Y=Y[0],j.lastIndex=q.index+1}}y.replaceSelection(Y)}}}finally{if(Pr.pop(),fn=Pr.length?N:!1,!Pr.length&&An){var Ce=An;An=null,Ir(y,Ce)}}}function H(y,$){var _=y.key;if(!Br[_]){_.length>1&&_[0]=="n"&&(_=_.replace("Numpad","")),_=rr[_]||_;var N="";if(y.ctrlKey&&(N+="C-"),y.altKey&&(N+="A-"),y.metaKey&&(N+="M-"),je.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(N=N.slice(2)),(N||_.length>1)&&y.shiftKey&&(N+="S-"),$&&!$.expectLiteralNext&&_.length==1){if(Qn.keymap&&_ in Qn.keymap)(Qn.remapCtrl!=0||!N)&&(_=Qn.keymap[_]);else if(_.charCodeAt(0)>255){var B=y.code&&y.code.slice(-1)||"";y.shiftKey||(B=B.toLowerCase()),B&&(_=B)}}return N+=_,N.length>1&&(N="<"+N+">"),N}}function P(y,$){Qn.string!==y&&(Qn=O(y)),Qn.remapCtrl=$}function O(y){function $(N){return N.split(/\\?(.)/).filter(Boolean)}var _={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(N){if(N){var B=N.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var j=$(B[1]),q=$(B[2]);if(j.length!==q.length)return;for(var Y=0;Y<j.length;++Y)_[j[Y]]=q[Y]}else if(B.length==1){var Q=$(N);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,$){y.state.vim.inputState=new A,y.state.vim.expectLiteralNext=!1,je.signal(y,"vim-command-done",$)}function D(){this.removed=[],this.inserted=""}function W(y,$,_){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!_}function U(y,$){var _=He.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");_[y]=$,an.push(y)}function K(y){this.registers=y,this.unnamedRegister=y['"']=new W,y["."]=new W,y[":"]=new W,y["/"]=new W,y["+"]=new W}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(y,$){Zr[y]=$}function he(y,$){for(var _=[],N=0;N<$;N++)_.push(y);return _}function ne(y,$){Qo[y]=$}function ae(y,$){zn[y]=$}function ue(y,$,_){var N=y.state.vim,B=N.insertMode||N.visualMode,j=Math.min(Math.max(y.firstLine(),$.line),y.lastLine()),q=y.getLine(j),Y=q.length-1+ +!!B,Q=Math.min(Math.max(0,$.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;_&&_.line==j&&_.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new De(j,Q)}function ce(y){var $={};for(var _ in y)y.hasOwnProperty(_)&&($[_]=y[_]);return $}function ge(y,$,_){return typeof $=="object"&&(_=$.ch,$=$.line),new De(y.line+$,y.ch+_)}function Te(y,$,_,N){N.operator&&(_="operatorPending");for(var B,j=[],q=[],Y=fn?$.length-Co:0,Q=Y;Q<$.length;Q++){var re=$[Q];_=="insert"&&re.context!="insert"||re.context&&re.context!=_||N.operator&&re.type=="action"||!(B=$e(y,re.keys))||(B=="partial"&&j.push(re),B=="full"&&q.push(re))}return{partial:j.length&&j,full:q.length&&q}}function $e(y,$){var _=$.slice(-11)=="<character>",N=$.slice(-10)=="<register>";if(_||N){var B=$.length-(_?11:10),j=y.slice(0,B),q=$.slice(0,B);return j==q&&y.length>B?"full":q.indexOf(j)==0?"partial":!1}return y==$?"full":$.indexOf(y)==0?"partial":!1}function Ee(y){var $=/^.*(<[^>]+>)$/.exec(y),_=$?$[1]:y.slice(-1);if(_.length>1)switch(_){case"<CR>":_=`
1402
+ `;break;case"<Space>":_=" ";break;default:_=""}return _}function Ze(y,$,_){return function(){for(var N=0;N<_;N++)$(y)}}function Xe(y){return new De(y.line,y.ch)}function gt(y,$){return y.ch==$.ch&&y.line==$.line}function at(y,$){return y.line<$.line?!0:y.line==$.line&&y.ch<$.ch}function mt(y,$){return arguments.length>2&&($=mt.apply(void 0,Array.prototype.slice.call(arguments,1))),at(y,$)?y:$}function sn(y,$){return arguments.length>2&&($=sn.apply(void 0,Array.prototype.slice.call(arguments,1))),at(y,$)?$:y}function bn(y,$,_){var N=at(y,$),B=at($,_);return N&&B}function Jt(y,$){return y.getLine($).length}function wr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function wn(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Fn(y,$,_){var N=Jt(y,$),B=new Array(_-N+1).join(" ");y.setCursor(new De($,N)),y.replaceRange(B,y.getCursor())}function Pn(y,$){var _=[],N=y.listSelections(),B=Xe(y.clipPos($)),j=!gt($,B),q=y.getCursor("head"),Y=Ct(N,q),Q=gt(N[Y].head,N[Y].anchor),re=N.length-1,se=re-Y>Y?re:0,ye=N[se].anchor,Ce=Math.min(ye.line,B.line),me=Math.max(ye.line,B.line),be=ye.ch,Oe=B.ch,Re=N[se].head.ch-be,Ge=Oe-be;Re>0&&Ge<=0?(be++,j||Oe--):Re<0&&Ge>=0?(be--,Q||Oe++):Re<0&&Ge==-1&&(be--,Oe++);for(var ht=Ce;ht<=me;ht++){var tt={anchor:new De(ht,be),head:new De(ht,Oe)};_.push(tt)}return y.setSelections(_),$.ch=Oe,ye.ch=be,ye}function nr(y,$,_){for(var N=[],B=0;B<_;B++){var j=ge($,B,0);N.push({anchor:j,head:j})}y.setSelections(N,0)}function Ct(y,$,_){for(var N=0;N<y.length;N++){var B=gt(y[N].anchor,$),j=gt(y[N].head,$);if(B||j)return N}return-1}function Ke(y,$){var _=$.lastSelection,N=function(){var j=y.listSelections(),q=j[0],Y=j[j.length-1],Q=at(q.anchor,q.head)?q.anchor:q.head,re=at(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},B=function(){var j=y.getCursor(),q=y.getCursor(),Y=_.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new De(j.line+re,j.ch+Q);for(var se=[],ye=j.line;ye<q.line;ye++){var Ce=new De(ye,j.ch),me=new De(ye,q.ch),be={anchor:Ce,head:me};se.push(be)}y.setSelections(se)}else{var Oe=_.anchorMark.find(),Re=_.headMark.find(),Ge=Re.line-Oe.line,ht=Re.ch-Oe.ch;q={line:q.line+Ge,ch:Ge?q.ch:ht+q.ch},_.visualLine&&(j=new De(j.line,0),q=new De(q.line,Jt(y,q.line))),y.setSelection(j,q)}return[j,q]};return $.visualMode?N():B()}function ke(y,$){var _=$.sel.anchor,N=$.sel.head;$.lastPastedText&&(N=y.posFromIndex(y.indexFromPos(_)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:y.setBookmark(_),headMark:y.setBookmark(N),anchor:Xe(_),head:Xe(N),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function Ve(y,$,_,N){var B=y.state.vim.sel,j=N?$:B.head,q=N?$:B.anchor,Y;return at(_,$)&&(Y=_,_=$,$=Y),at(j,q)?(j=mt($,j),q=sn(q,_)):(q=mt($,q),j=sn(j,_),j=ge(j,0,-1),j.ch==-1&&j.line!=y.firstLine()&&(j=new De(j.line-1,Jt(y,j.line-1)))),[q,j]}function Je(y,$,B){var N=y.state.vim;$=$||N.sel;var B=B||N.visualLine?"line":N.visualBlock?"block":"char",j=vt(y,$,B);y.setSelections(j.ranges,j.primary)}function vt(y,$,_,N){var B=Xe($.head),j=Xe($.anchor);if(_=="char"){var q=!N&&!at($.head,$.anchor)?1:0,Y=at($.head,$.anchor)?1:0;return B=ge($.head,0,q),j=ge($.anchor,0,Y),{ranges:[{anchor:j,head:B}],primary:0}}if(_=="line"){if(at($.head,$.anchor))B.ch=0,j.ch=Jt(y,j.line);else{j.ch=0;var Q=y.lastLine();B.line>Q&&(B.line=Q),B.ch=Jt(y,B.line)}return{ranges:[{anchor:j,head:B}],primary:0}}if(_=="block"){var re=Math.min(j.line,B.line),se=j.ch,ye=Math.max(j.line,B.line),Ce=B.ch;se<Ce?Ce+=1:se+=1;for(var me=ye-re+1,be=B.line==re?0:me-1,Oe=[],Re=0;Re<me;Re++)Oe.push({anchor:new De(re+Re,se),head:new De(re+Re,Ce)});return{ranges:Oe,primary:be}}}function Tt(y){var $=y.getCursor("head");return y.getSelection().length==1&&($=mt($,y.getCursor("anchor"))),$}function At(y,$){var _=y.state.vim;$!==!1&&y.setCursor(ue(y,_.sel.head)),ke(y,_),_.visualMode=!1,_.visualLine=!1,_.visualBlock=!1,_.insertMode||je.signal(y,"vim-mode-change",{mode:"normal"})}function Pt(y,$,_){var N=y.getRange($,_);if(/\n\s*$/.test(N)){var B=N.split(`
1403
+ `);B.pop();for(var j,j=B.pop();B.length>0&&j&&m(j);j=B.pop())_.line--,_.ch=0;j?(_.line--,_.ch=Jt(y,_.line)):_.ch=0}}function Nt(y,$,_){$.ch=0,_.ch=0,_.line++}function pt(y){if(!y)return 0;var $=y.search(/\S/);return $==-1?y.length:$}function kt(y,$,_){var N=$.inclusive,B=$.innerWord,j=$.bigWord,q=$.noSymbol,Y=$.multiline,Q=_||Tt(y),re=y.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,be,Oe=q?ko[0]:Ci[0];if(B&&/\s/.test(re.charAt(me)))Oe=function(kn){return/\s/.test(kn)};else{for(;!Oe(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,be=po(y,Q,!0,j,!0);break}j?Oe=Ci[0]:(Oe=ko[0],Oe(re.charAt(me))||(Oe=ko[1]))}for(var Re=me,Ge=me;Oe(re.charAt(Ge))&&Ge>=0;)Ge--;if(Ge++,be)Re=be.to,Ce=be.line,se=y.getLine(Ce),!se&&Re==0&&Re++;else for(;Oe(re.charAt(Re))&&Re<re.length;)Re++;if(N){var ht=Re,tt=Q.ch<=Ge&&/\s/.test(re.charAt(Q.ch));if(!tt)for(;/\s/.test(se.charAt(Re))&&Re<se.length;)Re++;if(ht==Re||tt){for(var st=Ge;/\s/.test(re.charAt(Ge-1))&&Ge>0;)Ge--;!Ge&&!tt&&(Ge=st)}}return{start:new De(ye,Ge),end:new De(Ce,Re)}}function $n(y,$,_){var N=$;if(!je.findMatchingTag||!je.findEnclosingTag)return{start:N,end:N};var B=je.findMatchingTag(y,$)||je.findEnclosingTag(y,$);return!B||!B.open||!B.close?{start:N,end:N}:_?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function $r(y,$,_){gt($,_)||He.jumpList.add(y,$,_)}function Yr(y,$){He.lastCharacterSearch.increment=y,He.lastCharacterSearch.forward=$.forward,He.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Wi(y,$,_,N){var B=Xe(y.getCursor()),j=_?1:-1,q=_?y.lineCount():-1,Y=B.ch,Q=B.line,re=y.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:N,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[N],forward:_,depth:0,curMoveThrough:!1},ye=ci[N];if(!ye)return B;var Ce=ui[ye].init,me=ui[ye].isComplete;for(Ce&&Ce(se);Q!==q&&$;){if(se.index+=j,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=j,se.lineText=y.getLine(Q)||"",j>0)se.index=0;else{var be=se.lineText.length;se.index=be>0?be-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(B.line=Q,B.ch=se.index,$--)}return se.nextCh||se.curMoveThrough?new De(Q,se.index):B}function po(y,$,_,N,B){var j=$.line,q=$.ch,Y=y.getLine(j),Q=_?1:-1,re=N?Ci:ko;if(B&&Y==""){if(j+=Q,Y=y.getLine(j),!a(y,j))return null;q=_?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:j};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;q!=se;){for(var me=!1,be=0;be<re.length&&!me;++be)if(re[be](Y.charAt(q))){for(ye=q;q!=se&&re[be](Y.charAt(q));)q+=Q;if(Ce=q,me=ye!=Ce,ye==$.ch&&j==$.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:j}}me||(q+=Q)}if(j+=Q,!a(y,j))return null;Y=y.getLine(j),q=Q>0?0:Y.length}}function xr(y,$,_,N,B,j){var q=Xe($),Y=[];(N&&!B||!N&&B)&&_++;for(var Q=!N||!B,re=0;re<_;re++){var se=po(y,$,N,j,Q);if(!se){var ye=Jt(y,y.lastLine());Y.push(N?{line:y.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),$=new De(se.line,N?se.to-1:se.from)}var Ce=Y.length!=_,me=Y[0],be=Y.pop();return N&&!B?(!Ce&&(me.from!=q.ch||me.line!=q.line)&&(be=Y.pop()),new De(be.line,be.from)):N&&B?new De(be.line,be.to-1):!N&&B?(!Ce&&(me.to!=q.ch||me.line!=q.line)&&(be=Y.pop()),new De(be.line,be.to)):new De(be.line,be.from)}function go(y,$,_,N,B){var j=$,q=new De(j.line+_.repeat-1,1/0),Y=y.clipPos(q);return Y.ch--,B||(N.lastHPos=1/0,N.lastHSPos=y.charCoords(Y,"div").left),q}function Wo(y,$,_,N,B){for(var j=B||y.getCursor(),q=j.ch,Y,Q=0;Q<$;Q++){var re=y.getLine(j.line);if(Y=Ya(q,re,N,_),Y==-1)return null;q=Y}return new De(y.getCursor().line,Y)}function Ga(y,$){var _=y.getCursor().line;return ue(y,new De(_,$-1))}function si(y,$,_,N){!x(_,ao)&&!nn.test(_)||($.marks[_]&&$.marks[_].clear(),$.marks[_]=y.setBookmark(N))}function Ya(y,$,_,N,B){var j;return N?(j=$.indexOf(_,y+1),j!=-1):(j=$.lastIndexOf(_,y-1),j!=-1),j}function ks(y,$,_,N,B){function j(Ge){return!/\S/.test(y.getLine(Ge))}function q(Ge,ht,tt){return tt?j(Ge)!=j(Ge+ht):!j(Ge)&&j(Ge+ht)}function Y(Ge){N=N>0?1:-1;var ht=y.ace.session.getFoldLine(Ge);ht&&Ge+N>ht.start.row&&Ge+N<ht.end.row&&(N=(N>0?ht.end.row:ht.start.row)-Ge)}var Q=$.line,re=y.firstLine(),se=y.lastLine(),ye,Ce,me=Q;if(N){for(;re<=me&&me<=se&&_>0;)Y(me),q(me,N)&&_--,me+=N;return new De(me,0)}var be=y.state.vim;if(be.visualLine&&q(Q,1,!0)){var Oe=be.sel.anchor;q(Oe.line,-1,!0)&&(!B||Oe.line!=Q)&&(Q+=1)}var Re=j(Q);for(me=Q;me<=se&&_;me++)q(me,1,!0)&&(!B||j(me)!=Re)&&_--;for(Ce=new De(me,0),me>se&&!Re?Re=!0:B=!1,me=Q;me>re&&!((!B||j(me)==Re||me==Q)&&q(me,-1,!0));me--);return ye=new De(me,0),{start:ye,end:Ce}}function aa(y,$,_,N,B){function j(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ye,Ce){var me=re.getLine(se),be={line:me,ln:se,pos:ye,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(j(be);be.line!==null;){if(Oe=be.pos,w(be.line[be.pos])){if(!B)return{ln:be.ln,pos:be.pos+1};for(j(be);be.line!==null&&m(be.line[be.pos]);)Oe=be.pos,j(be);return{ln:be.ln,pos:Oe+1}}j(be)}return{ln:be.ln,pos:Oe+1}}function Y(re,se,ye,Ce){var me=re.getLine(se),be={line:me,ln:se,pos:ye,dir:Ce};if(be.line==="")return{ln:be.ln,pos:be.pos};var Oe=be.pos;for(j(be);be.line!==null;){if(!m(be.line[be.pos])&&!w(be.line[be.pos]))Oe=be.pos;else if(w(be.line[be.pos]))return B?m(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:Oe}:{ln:be.ln,pos:Oe};j(be)}return be.line=me,B&&m(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:Oe}}for(var Q={ln:$.line,pos:$.ch};_>0;)N<0?Q=Y(y,Q.ln,Q.pos,N):Q=q(y,Q.ln,Q.pos,N),_--;return new De(Q.ln,Q.pos)}function ji(y,$,_,N){function B(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 j(Q,re,se,ye){var Re=Q.getLine(re),Ce=Re==="",me={line:Re,ln:re,pos:se,dir:ye},be={ln:me.ln,pos:me.pos},Oe=me.line==="";for(B(Q,me);me.line!==null;){if(be.ln=me.ln,be.pos=me.pos,me.line===""&&!Oe)return{ln:me.ln,pos:me.pos};if(Ce&&me.line!==""&&!m(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!Ce&&(me.pos===me.line.length-1||m(me.line[me.pos+1]))&&(Ce=!0),B(Q,me)}var Re=Q.getLine(be.ln);be.pos=0;for(var Ge=Re.length-1;Ge>=0;--Ge)if(!m(Re[Ge])){be.pos=Ge;break}return be}function q(Q,re,se,ye){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ye},me={ln:Ce.ln,pos:null},be=Ce.line==="";for(B(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!be)return me.pos!==null?me:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||me.pos===null||Ce.ln===me.ln&&Ce.pos+1===me.pos))return me;Ce.line!==""&&!m(Ce.line[Ce.pos])&&(be=!1,me={ln:Ce.ln,pos:Ce.pos}),B(Q,Ce)}var Oe=Q.getLine(me.ln);me.pos=0;for(var Re=0;Re<Oe.length;++Re)if(!m(Oe[Re])){me.pos=Re;break}return me}for(var Y={ln:$.line,pos:$.ch};_>0;)N<0?Y=q(y,Y.ln,Y.pos,N):Y=j(y,Y.ln,Y.pos,N),_--;return new De(Y.ln,Y.pos)}function Yn(y,$,_,N){var B=$,j,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],re=y.getLine(B.line).charAt(B.ch),se=re===Q?1:0;if(j=y.scanForBracket(new De(B.line,B.ch+se),-1,void 0,{bracketRegex:Y}),q=y.scanForBracket(new De(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!j||!q)return null;if(j=j.pos,q=q.pos,j.line==q.line&&j.ch>q.ch||j.line>q.line){var ye=j;j=q,q=ye}return N?q.ch+=1:j.ch+=1,{start:j,end:q}}function Mr(y,$,_,N){var B=Xe($),j=y.getLine(B.line),q=j.split(""),Y,Q,re,se,ye=q.indexOf(_);if(B.ch<ye)B.ch=ye;else if(ye<B.ch&&q[B.ch]==_){var Ce=/string/.test(y.getTokenTypeAt(ge($,0,1))),me=/string/.test(y.getTokenTypeAt($)),be=Ce&&!me;be||(Q=B.ch,--B.ch)}if(q[B.ch]==_&&!Q)Y=B.ch+1;else for(re=B.ch;re>-1&&!Y;re--)q[re]==_&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==_&&(Q=re);return!Y||!Q?{start:B,end:B}:(N&&(--Y,++Q),{start:new De(B.line,Y),end:new De(B.line,Q)})}function zi(){}function Rn(y){var $=y.state.vim;return $.searchState_||($.searchState_=new zi)}function Er(y){return Hi(y,"/")}function no(y){return _s(y,"/")}function Hi(y,$){var _=_s(y,$)||[];if(!_.length)return[];var N=[];if(_[0]===0){for(var B=0;B<_.length;B++)typeof _[B]=="number"&&N.push(y.substring(_[B]+1,_[B+1]));return N}}function _s(y,$){$||($="/");for(var _=!1,N=[],B=0;B<y.length;B++){var j=y.charAt(B);!_&&j==$&&N.push(B),_=!_&&j=="\\"}return N}function la(y){for(var $="|(){",_="}",N=!1,B=[],j=-1;j<y.length;j++){var q=y.charAt(j)||"",Y=y.charAt(j+1)||"",Q=Y&&$.indexOf(Y)!=-1;N?((q!=="\\"||!Q)&&B.push(q),N=!1):q==="\\"?(N=!0,Y&&_.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&B.push(q)):(B.push(q),Q&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Xa(y){for(var $=!1,_=[],N=-1;N<y.length;N++){var B=y.charAt(N)||"",j=y.charAt(N+1)||"";Si[B+j]?(_.push(Si[B+j]),N++):$?(_.push(B),$=!1):B==="\\"?($=!0,o(j)||j==="$"?_.push("$"):j!=="/"&&j!=="\\"&&_.push("\\")):(B==="$"&&_.push("$"),_.push(B),j==="/"&&_.push("\\"))}return _.join("")}function Qa(y){for(var $=new je.StringStream(y),_=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)_.push($.next());var N=!1;for(var B in pr)if($.match(B,!0)){N=!0,_.push(pr[B]);break}N||_.push($.next())}return _.join("")}function Ui(y,$,_){var N=He.registerController.getRegister("/");if(N.setText(y),y instanceof RegExp)return y;var B=no(y),j,q;if(!B.length)j=y;else{j=y.substring(0,B[0]);var Y=y.substring(B[0]);q=Y.indexOf("i")!=-1}if(!j)return null;k("pcre")||(j=la(j)),_&&($=/^[^A-Z]*$/.test(j));var Q=new RegExp(j,$||q?"im":"m");return Q}function ai(y){typeof y=="string"&&(y=document.createElement(y));for(var $,_=1;_<arguments.length;_++)if($=arguments[_])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)y.appendChild($);else for(var N in $)Object.prototype.hasOwnProperty.call($,N)&&(N[0]==="$"?y.style[N.slice(1)]=$[N]:y.setAttribute(N,$[N]));return y}function Kt(y,$){var _=ai("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);y.openNotification?y.openNotification(_,{bottom:!0,duration:5e3}):alert(_.innerText)}function ca(y,$){return ai("div",{$display:"flex"},ai("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,ai("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&ai("span",{$color:"#888"},$))}function Ir(y,$){if(Pr.length){$.value||($.value=""),An=$;return}var _=ca($.prefix,$.desc);if(y.openDialog)y.openDialog(_,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var N="";typeof $.prefix!="string"&&$.prefix&&(N+=$.prefix.textContent),$.desc&&(N+=" "+$.desc),$.onClose(prompt(N,""))}}function Xn(y,$){if(y instanceof RegExp&&$ instanceof RegExp){for(var _=["global","multiline","ignoreCase","source"],N=0;N<_.length;N++){var B=_[N];if(y[B]!==$[B])return!1}return!0}return!1}function xn(y,$,_,N){if($){var B=Rn(y),j=Ui($,!!_,!!N);if(j)return bi(y,j),Xn(j,B.getQuery())||B.setQuery(j),j}}function Bn(y){if(y.source.charAt(0)=="^")var $=!0;return{token:function(_){if($&&!_.sol()){_.skipToEnd();return}var N=_.match(y,!1);if(N)return N[0].length==0?(_.next(),"searching"):!_.sol()&&(_.backUp(1),!y.exec(_.next()+N[0]))?(_.next(),null):(_.match(y),"searching");for(;!_.eol()&&(_.next(),!_.match(y,!1)););},query:y}}function bi(y,$){clearTimeout(gr);var _=Rn(y);_.highlightTimeout=gr,gr=setTimeout(function(){if(y.state.vim){var N=Rn(y);N.highlightTimeout=null;var B=N.getOverlay();(!B||$!=B.query)&&(B&&y.removeOverlay(B),B=Bn($),y.addOverlay(B),y.showMatchesOnScrollbar&&(N.getScrollbarAnnotate()&&N.getScrollbarAnnotate().clear(),N.setScrollbarAnnotate(y.showMatchesOnScrollbar($))),N.setOverlay(B))}},50)}function Lr(y,$,_,N){return N===void 0&&(N=1),y.operation(function(){for(var B=y.getCursor(),j=y.getSearchCursor(_,B),q=0;q<N;q++){var Y=j.find($);if(q==0&&Y&&gt(j.from(),B)){var Q=$?j.from():j.to();Y=j.find($),Y&&!Y[0]&&gt(j.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=j.find($))}if(!Y&&(j=y.getSearchCursor(_,$?new De(y.lastLine()):new De(y.firstLine(),0)),!j.find($)))return}return j.from()})}function wi(y,$,_,N,B){return N===void 0&&(N=1),y.operation(function(){var j=y.getCursor(),q=y.getSearchCursor(_,j),Y=q.find(!$);!B.visualMode&&Y&&gt(q.from(),j)&&q.find(!$);for(var Q=0;Q<N;Q++)if(Y=q.find($),!Y&&(q=y.getSearchCursor(_,$?new De(y.lastLine()):new De(y.firstLine(),0)),!q.find($)))return;return[q.from(),q.to()]})}function jo(y){var $=Rn(y);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),y.removeOverlay(Rn(y).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function Ss(y,$,_){return typeof y!="number"&&(y=y.line),$ instanceof Array?x(y,$):typeof _=="number"?y>=$&&y<=_:y==$}function ro(y){var $=y.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function Xr(y,$,_){if(_=="'"||_=="`")return He.jumpList.find(y,-1)||new De(0,0);if(_==".")return mo(y);var N=$.marks[_];return N&&N.find()}function mo(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var $=y.doc.history.done,_=$.length;_--;)if($[_].changes)return Xe($[_].changes[0].to)}function zo(y,$,_,N,B,j,q,Y,Q){function re(){y.operation(function(){for(;!Oe;)se(),Ce();me()})}function se(){var tt=y.getRange(j.from(),j.to()),st=tt.replace(q,Y),kn=j.to().line;j.replace(st),Ge=j.to().line,B+=Ge-kn,ht=Ge<kn}function ye(){var tt=Re&&Xe(j.to()),st=j.findNext();return st&&!st[0]&&tt&&gt(j.from(),tt)&&(st=j.findNext()),st}function Ce(){for(;ye()&&Ss(j.from(),N,B);)if(!(!_&&j.from().line==Ge&&!ht)){y.scrollIntoView(j.from(),30),y.setSelection(j.from(),j.to()),Re=j.from(),Oe=!1;return}Oe=!0}function me(tt){if(tt&&tt(),y.focus(),Re){y.setCursor(Re);var st=y.state.vim;st.exMode=!1,st.lastHPos=st.lastHSPos=Re.ch}Q&&Q()}function be(tt,st,kn){je.e_stop(tt);var dt=H(tt);switch(dt){case"y":se(),Ce();break;case"n":Ce();break;case"a":var Mn=Q;Q=void 0,y.operation(re),Q=Mn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(kn)}return Oe&&me(kn),!0}y.state.vim.exMode=!0;var Oe=!1,Re,Ge,ht;if(Ce(),Oe){Kt(y,"No matches for "+q.source);return}if(!$){re(),Q&&Q();return}Ir(y,{prefix:ai("span","replace with ",ai("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function Qr(y,$){var _=y.state.vim,N=He.macroModeState,B=He.registerController.getRegister("."),j=N.isPlaying,q=N.lastInsertModeChanges;j||(y.off("change",vo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=null,je.off(y.getInputField(),"keydown",Ms)),!j&&_.insertModeRepeat>1&&(ua(y,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.insertMode=!1,$||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),B.setText(q.changes.join("")),je.signal(y,"vim-mode-change",{mode:"normal"}),N.isRecording&&ur(N)}function Ho(y){On.unshift(y)}function As(y,$,_,N,B){var j={keys:y,type:$};j[$]=_,j[$+"Args"]=N;for(var q in B)j[q]=B[q];Ho(j)}function Ts(y,$,_,N){var B=He.registerController.getRegister(N);if(N==":"){B.keyBuffer[0]&&kr.processCommand(y,B.keyBuffer[0]),_.isPlaying=!1;return}var j=B.keyBuffer,q=0;_.isPlaying=!0,_.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var Q=j[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),_t.handleKey(y,se,"macro"),$.insertMode){var ye=B.insertModeChanges[q++].changes;He.macroModeState.lastInsertModeChanges.changes=ye,Go(y,ye,1),Qr(y)}_.isPlaying=!1}function Uo(y,$){if(!y.isPlaying){var _=y.latestRegister,N=He.registerController.getRegister(_);N&&N.pushText($)}}function ur(y){if(!y.isPlaying){var $=y.latestRegister,_=He.registerController.getRegister($);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(y.lastInsertModeChanges)}}function $s(y,$){if(!y.isPlaying){var _=y.latestRegister,N=He.registerController.getRegister(_);N&&N.pushSearchQuery&&N.pushSearchQuery($)}}function vo(y,$){var _=He.macroModeState,N=_.lastInsertModeChanges;if(!_.isPlaying)for(var B=y.state.vim;$;){if(N.expectCursorActivityForChange=!0,N.ignoreCount>1)N.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var j=y.listSelections().length;j>1&&(N.ignoreCount=j);var q=$.text.join(`
1404
+ `);if(N.maybeReset&&(N.changes=[],N.maybeReset=!1),q)if(y.state.overwrite&&!/\n/.test(q))N.changes.push([q]);else{if(q.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),Q=y.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(N.changes.push([q,re]),q="")}}q&&N.changes.push(q)}}$=$.next}}function Vo(y){var $=y.state.vim;if($.insertMode){var _=He.macroModeState;if(_.isPlaying)return;var N=_.lastInsertModeChanges;N.expectCursorActivityForChange?N.expectCursorActivityForChange=!1:(N.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||qo(y,$)}function qo(y,$,_){var N=y.getCursor("anchor"),B=y.getCursor("head");if($.visualMode&&!y.somethingSelected()?At(y,!1):!$.visualMode&&!$.insertMode&&y.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,je.signal(y,"vim-mode-change",{mode:"visual"})),$.visualMode){var j=at(B,N)?0:-1,q=at(B,N)?-1:0;B=ge(B,0,j),N=ge(N,0,q),$.sel={anchor:N,head:B},si(y,$,"<",mt(B,N)),si(y,$,">",sn(B,N))}else!$.insertMode&&!_&&($.lastHPos=y.getCursor().ch)}function io(y,$){this.keyName=y,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function Ms(y){var $=He.macroModeState,_=$.lastInsertModeChanges,N=je.keyName?je.keyName(y):y.key;N&&(N.indexOf("Delete")!=-1||N.indexOf("Backspace")!=-1)&&(_.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new io(N,y)))}function ua(y,$,_,N){function B(){Y?jn.processAction(y,$,$.lastEditActionCommand):jn.evalInput(y,$)}function j(se){if(q.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ye=q.lastInsertModeChanges;Go(y,ye.changes,se)}}var q=He.macroModeState;q.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<_;re++)B(),j(1);else N||B(),j(_);$.inputState=Q,$.insertMode&&!N&&Qr(y),q.isPlaying=!1}function Ko(y,$){je.lookupKey($,"vim-insert",function(_){return typeof _=="string"?je.commands[_](y):_(y),!0})}function Go(y,$,_){var N=y.getCursor("head"),B=He.macroModeState.lastInsertModeChanges.visualBlock;B&&(nr(y,N,B+1),_=y.listSelections().length,y.setCursor(N));for(var j=0;j<_;j++){B&&y.setCursor(ge(N,j,0));for(var q=0;q<$.length;q++){var Y=$[q];if(Y instanceof io)Ko(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=ge(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}B&&y.setCursor(ge(N,0,1))}function Es(y,$,_,N){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=Rr[$]||$;var B="";if(_.ctrlKey&&(B+="C-"),_.altKey&&(B+="A-"),(B||$.length>1)&&_.shiftKey&&(B+="S-"),N&&!N.expectLiteralNext&&$.length==1){if(Qn.keymap&&$ in Qn.keymap)(Qn.remapCtrl!==!1||!B)&&($=Qn.keymap[$]);else if($.charCodeAt(0)>255){var j=_.code&&_.code.slice(-1)||"";_.shiftKey||(j=j.toLowerCase()),j&&($=j)}}return B+=$,B.length>1&&(B="<"+B+">"),B}function Yo(y){var $=new y.constructor;return Object.keys(y).forEach(function(_){if(_!="insertEnd"){var N=y[_];Array.isArray(N)?N=N.slice():N&&typeof N=="object"&&N.constructor!=Object&&(N=Yo(N)),$[_]=N}}),y.sel&&($.sel={head:y.sel.head&&Xe(y.sel.head),anchor:y.sel.anchor&&Xe(y.sel.anchor)}),$}function yo(y,$,_){var N=!1,B=_t.maybeInitVimState_(y),j=B.visualBlock||B.wasInVisualBlock,q=y.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!q?B.wasInVisualBlock=!1:q&&B.visualBlock&&(B.wasInVisualBlock=!0),$=="<Esc>"&&!B.insertMode&&!B.visualMode&&q)y.ace.exitMultiSelectMode();else if(j||!q||y.ace.inVirtualSelectionMode)N=_t.handleKey(y,$,_);else{var Y=Yo(B),Q=B.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var se=y.ace.selection;y.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var ye=y.getCursor("head"),Ce=y.getCursor("anchor"),me=at(ye,Ce)?0:-1,be=at(ye,Ce)?-1:0;ye=ge(ye,0,me),Ce=ge(Ce,0,be),y.state.vim.sel.head=ye,y.state.vim.sel.anchor=Ce,N=hi(y,$,_),se.$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=Yo(Y)),re++}),y.curOp.cursorActivity&&!N&&(y.curOp.cursorActivity=!1),B.status=y.state.vim.status,y.state.vim=B,B.inputState.changeQueueList=Q,B.inputState.changeQueue=null},!0)}return N&&!B.visualMode&&!B.insert&&B.visualMode!=y.somethingSelected()&&qo(y,B,!0),N}function xi(y,$){$.off("beforeEndOperation",xi);var _=$.state.cm.vimCmd;_&&$.execCommand(_.exec?_:_.name,_.args),$.curOp=$.prevOp}var hr=n("../range").Range,oo=n("../lib/event_emitter").EventEmitter,Vi=n("../lib/dom"),ha=n("../lib/oop"),Za=n("../lib/keys"),bo=n("../lib/event"),qi=n("../search").Search,wo=n("../lib/useragent"),Xo=n("../search_highlight").SearchHighlight,xo=n("../commands/multi_select_commands"),da=n("../mode/text").Mode.prototype.tokenRe,so=n("../ext/hardwrap").hardWrap;n("../multi_select");var je=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)};je.Pos=function(y,$){if(!(this instanceof De))return new De(y,$);this.line=y,this.ch=$},je.defineOption=function(y,$,_){},je.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1405
+ `)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},je.keyMap={},je.addClass=je.rmClass=function(){},je.e_stop=je.e_preventDefault=bo.stopEvent,je.keyName=function(y){var $=Za[y.keyCode]||y.key||"";return $.length==1&&($=$.toUpperCase()),$=bo.getModifierString(y).replace(/(^|-)\w/g,function(_){return _.toUpperCase()})+$,$},je.keyMap.default=function(y){return function($){var _=$.ace.commands.commandKeyBinding[y.toLowerCase()];return _&&$.ace.execCommand(_)!==!1}},je.lookupKey=function y($,_,N){_||(_="default"),typeof _=="string"&&(_=je.keyMap[_]||je.keyMap.default);var B=typeof _=="function"?_($):_[$];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&N(B))return"handled";if(_.fallthrough){if(!Array.isArray(_.fallthrough))return y($,_.fallthrough,N);for(var j=0;j<_.fallthrough.length;j++){var q=y($,_.fallthrough[j],N);if(q)return q}}},je.findMatchingTag=function(y,$){return y.findMatchingTag($)},je.findEnclosingTag=function(y,$){},je.signal=function(y,$,_){return y._signal($,_)},je.on=bo.addListener,je.off=bo.removeListener,je.isWordChar=function(y){return y<""?/^\w$/.test(y):(da.lastIndex=0,da.test(y))},(function(){ha.implement(je.prototype,oo),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 N={text:_.action[0]=="i"?_.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=N:B.lastChange=B.change=N,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(xo.keyboardHandler)},this.operation=function(_,N){if(!N&&this.curOp||N&&this.curOp&&this.curOp.force)return _();if((N||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=N;var q=_();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(),!j.cursorActivity&&!j.lastChange&&B&&(this.ace.prevOp=B)),(N||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var _=this.curOp;_&&(_.change&&this.signal("change",_.change,_),_&&_.cursorActivity&&this.signal("cursorActivity",null,_),this.curOp=null)},this.signal=function(_,N,B){var j=B?B[_+"Handlers"]:(this._eventRegistry||{})[_];if(j){j=j.slice();for(var q=0;q<j.length;q++)j[q](this,N)}},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(_,N){typeof _=="object"&&(N=_.ch,_=_.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:_,column:N}),this.ace.selection.moveTo(_,N),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(_){var N=this.ace.selection,B=_=="anchor"?N.isEmpty()?N.lead:N.anchor:_=="head"||!_?N.lead:N.getRange()[_];return p(B)},this.listSelections=function(_){var N=this.ace.multiSelect.rangeList.ranges;return!N.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:N.map(function(B){return{anchor:this.clipPos(p(B.cursor==B.end?B.start:B.end)),head:this.clipPos(p(B.cursor))}},this)},this.setSelections=function(_,N){var B=this.ace.multiSelect,j=_.map(function(re){var se=d(re.anchor),ye=d(re.head),Ce=hr.comparePoints(se,ye)<0?new hr.fromPoints(se,ye):new hr.fromPoints(ye,se);return Ce.cursor=hr.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(j[0]);return}N?j[N]&&j.push(j.splice(N,1)[0]):j=j.reverse(),B.toSingleRange(j[0].clone());for(var q=this.ace.session,Y=0;Y<j.length;Y++){var Q=q.$clipRangeToDocument(j[Y]);B.addRange(Q)}},this.setSelection=function(_,N,B){var j=this.ace.selection;j.moveTo(_.line,_.ch),j.selectTo(N.line,N.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(_){return!this.ace.selection.isEmpty()},this.clipPos=function(_){var N=this.ace.session.$clipPositionToDocument(_.line,_.ch);return p(N)},this.foldCode=function(_){this.ace.session.$toggleFoldWidget(_.line,{})},this.markText=function(_){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(_){var N=_.action=="insert",B=_.start,j=_.end,q=(j.row-B.row)*(N?1:-1),Y=(j.column-B.column)*(N?1:-1);N&&(j=B);for(var Q in this.marks){var re=this.marks[Q],se=hr.comparePoints(re,B);if(!(se<0)){if(se===0&&N)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ye=N?se:hr.comparePoints(re,j);if(ye>0){re.row+=q,re.column+=re.row==j.row?Y:0;continue}!N&&ye<=0&&(re.row=B.row,re.column=B.column,ye===0&&(re.bias=1))}}};var y=function(_,N,B,j){this.cm=_,this.id=N,this.row=B,this.column=j,_.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return p(this)},this.setBookmark=function(_,N){var B=new y(this,this.$uid++,_.line,_.ch);return(!N||!N.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(_,N){if(N=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,_)}},this.findPosV=function(_,N,B,j){if(B=="page"){var q=this.ace.renderer,Y=q.layerConfig;N*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var Q=this.ace.session.documentToScreenPosition(_.line,_.ch);j!=null&&(Q.column=j),Q.row+=N,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 p(re)}debugger},this.charCoords=function(_,N){if(N=="div"||!N){var B=this.ace.session.documentToScreenPosition(_.line,_.ch);return{left:B.column,top:B.row}}if(N=="local"){var j=this.ace.renderer,B=this.ace.session.documentToScreenPosition(_.line,_.ch),q=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,Q=q*B.row;return{left:B.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(_,N){var B=this.ace.renderer;if(N=="local"){var j=Math.max(0,Math.floor(_.top/B.lineHeight)),q=Math.max(0,Math.floor(_.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(j,q);return p(Y)}if(N=="div")throw"not implemented"},this.getSearchCursor=function(_,N,B){var j=!1,q=!1;_ instanceof RegExp&&!_.global&&(j=!_.ignoreCase,_=_.source,q=!0),_=="\\n"&&(_=`
1406
+ `,q=!1);var Y=new qi;N.ch==null&&(N.ch=Number.MAX_VALUE);var Q={row:N.line,column:N.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:_,caseSensitive:j,wrap:!1,backwards:ye,regExp:q,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&p(se.start)},to:function(){return se&&p(se.end)},replace:function(ye){se&&(se.end=re.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(_,N){var B=this.ace.renderer,j=B.layerConfig,q=j.maxHeight;q-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,N!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(N,q))),_!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(_,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(_,N){if(_){var B=this.ace.renderer,j={top:0,bottom:N};B.scrollCursorIntoView(d(_),B.lineHeight*2/B.$size.scrollerHeight,j)}},this.getLine=function(_){return this.ace.session.getLine(_)},this.getRange=function(_,N){return this.ace.session.getTextRange(new hr(_.line,_.ch,N.line,N.ch))},this.replaceRange=function(_,N,B){B||(B=N);var j=new hr(N.line,N.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,_)},this.replaceSelection=this.replaceSelections=function(_){var N=Array.isArray(_)&&_,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),N?_[0]||"":_);return}B.inVirtualSelectionMode=!0;var j=B.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var q=j.length;q--;)this.ace.session.replace(j[q],N?_[q]||"":_);B.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 $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(_,N){switch(this.state[_]=N,_){case"indentWithTabs":_=$[_],N=!N;break;case"keyMap":this.state.$keyMap=N;return;default:_=$[_]}_&&this.ace.setOption(_,N)},this.getOption=function(_){var N,B=$[_];switch(B&&(N=this.ace.getOption(B)),_){case"indentWithTabs":return _=$[_],!N;case"keyMap":return this.state.$keyMap||"vim"}return B?N:this.state[_]},this.toggleOverwrite=function(_){return this.state.overwrite=_,this.ace.setOverwrite(_)},this.addOverlay=function(_){if(!this.$searchHighlight||!this.$searchHighlight.session){var N=new Xo(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(N);N.id=B.id,N.session=this.ace.session,N.destroy=function(q){N.session.off("change",N.updateOnChange),N.session.off("changeEditor",N.destroy),N.session.removeMarker(N.id),N.session=null},N.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?N.cache[Y]=void 0:N.cache.splice(Y,N.cache.length)},N.session.on("changeEditor",N.destroy),N.session.on("change",N.updateOnChange)}var j=new RegExp(_.query.source,"gmi");this.$searchHighlight=_.highlight=N,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(_){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var _=this.ace.renderer,N=_.layerConfig;return{left:_.scrollLeft,top:_.scrollTop,height:N.maxHeight,width:N.width,clientHeight:N.height,clientWidth:N.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(_){return this.ace.setValue(_,-1)},this.getTokenTypeAt=function(_){var N=this.ace.session.getTokenAt(_.line,_.ch);return N&&/comment|string/.test(N.type)?"string":""},this.findMatchingBracket=function(_){var N=this.ace.session.findMatchingBracket(d(_));return{to:N&&p(N)}},this.findMatchingTag=function(_){var N=this.ace.session.getMatchingTags(d(_));if(N)return{open:{from:p(N.openTag.start),to:p(N.openTag.end)},close:{from:p(N.closeTag.start),to:p(N.closeTag.end)}}},this.indentLine=function(_,N){N===!0?this.ace.session.indentRows(_,_," "):N===!1&&this.ace.session.outdentRows(new hr(_,0,_,0))},this.indexFromPos=function(_){return this.ace.session.doc.positionToIndex(d(_))},this.posFromIndex=function(_){return p(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(_,N,B,j){var q=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(N==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),d(_),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:_.line,column:_.ch+1},Y);!Q&&j.bracketRegex&&j.bracketRegex.test(this.getLine(_.line)[_.ch-1])&&(Q={row:_.line,column:_.ch-1})}return Q&&{pos:p(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(_){if(je.commands.hasOwnProperty(_))return je.commands[_](this);if(_=="indentAuto")return this.ace.execCommand("autoindent");console.log(_+" is not implemented")},this.getLineNumber=function(_){var N=this.$lineHandleChanges;if(!N)return null;for(var B=_.row,j=0;j<N.length;j++){var q=N[j];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<B&&(B+=q.end.row-q.start.row);else if(q.start.row<B){if(B<q.end.row||B==q.end.row&&q.start.column>0)return null;B-=q.end.row-q.start.row}}}return B},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 p(_.$lastDelta.end)}}).call(je.prototype);var fa=je.StringStream=function(y,$){this.pos=this.start=0,this.string=y,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};fa.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 $=this.string.charAt(this.pos);if(typeof y=="string")var _=$==y;else var _=$&&(y.test?y.test($):y($));if(_)return++this.pos,$},eatWhile:function(y){for(var $=this.pos;this.eat(y););return this.pos>$},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 $=this.string.indexOf(y,this.pos);if($>-1)return this.pos=$,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,$,_){if(typeof y!="string"){var N=this.string.slice(this.pos).match(y);return N&&N.index>0?null:(N&&$!==!1&&(this.pos+=N[0].length),N)}var B=function(q){return _?q.toLowerCase():q},j=this.string.substr(this.pos,y.length);if(B(j)==B(y))return $!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,$){this.lineStart+=y;try{return $()}finally{this.lineStart-=y}}},je.defineExtension=function(y,$){je.prototype[y]=$},Vi.importCssString(`.normal-mode .ace_cursor{
1407
+ border: none;
1408
+ background-color: rgba(255,0,0,0.5);
1409
+ }
1410
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1411
+ background-color: transparent;
1412
+ border: 1px solid red;
1413
+ opacity: 0.7
1414
+ }
1415
+ .ace_dialog {
1416
+ position: absolute;
1417
+ left: 0; right: 0;
1418
+ background: inherit;
1419
+ z-index: 15;
1420
+ padding: .1em .8em;
1421
+ overflow: hidden;
1422
+ color: inherit;
1423
+ }
1424
+ .ace_dialog-top {
1425
+ border-bottom: 1px solid #444;
1426
+ top: 0;
1427
+ }
1428
+ .ace_dialog-bottom {
1429
+ border-top: 1px solid #444;
1430
+ bottom: 0;
1431
+ }
1432
+ .ace_dialog input {
1433
+ border: none;
1434
+ outline: none;
1435
+ background: transparent;
1436
+ width: 20em;
1437
+ color: inherit;
1438
+ font-family: monospace;
1439
+ }`,"vimMode",!1),function(){function y(_,N,B){var j=_.ace.container,q;return q=j.appendChild(document.createElement("div")),B?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof N=="string"?q.innerHTML=N:q.appendChild(N),q}function $(_,N){_.state.currentNotificationClose&&_.state.currentNotificationClose(),_.state.currentNotificationClose=N}je.defineExtension("openDialog",function(_,N,B){function j(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),B.onClose&&B.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),$(this,null);var q=y(this,_,B.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(B.value&&(re.value=B.value,B.selectValueOnOpen!==!1&&re.select()),B.onInput&&je.on(re,"input",function(ye){B.onInput(ye,re.value,j)}),B.onKeyUp&&je.on(re,"keyup",function(ye){B.onKeyUp(ye,re.value,j)}),je.on(re,"keydown",function(ye){B&&B.onKeyDown&&B.onKeyDown(ye,re.value,j)||(ye.keyCode==13&&N(re.value),(ye.keyCode==27||B.closeOnEnter!==!1&&ye.keyCode==13)&&(je.e_stop(ye),j()))}),B.closeOnBlur!==!1&&je.on(re,"blur",j),re.focus()):(se=q.getElementsByTagName("button")[0])&&(je.on(se,"click",function(){j(),Q.focus()}),B.closeOnBlur!==!1&&je.on(se,"blur",j),se.focus()),j}}),je.defineExtension("openNotification",function(_,N){function B(){q||(q=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){$(this,B);var j=y(this,_,N&&N.bottom),q=!1,Y,Q=N&&typeof N.duration<"u"?N.duration:5e3;return je.on(j,"click",function(re){je.e_preventDefault(re),B()}),Q&&(Y=setTimeout(B,Q)),B}})}();var De=je.Pos,On=[{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"}],Co=On.length,li=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],Qn=O(""),pa=/[\d]/,ko=[je.isWordChar,function(y){return y&&!je.isWordChar(y)&&!/\s/.test(y)}],Ci=[function(y){return/\S/.test(y)}],ao=["<",">"],an=["-",'"',".",":","_","/","+"],nn=/^\w$/,ln;try{ln=new RegExp("^[\\p{Lu}]$","u")}catch{ln=/^[A-Z]$/}var Gt={};E("filetype",void 0,"string",["ft"],function(y,$){if($!==void 0){if(y===void 0){var _=$.getOption("mode");return _=="null"?"":_}var _=y==""?"null":y;$.setOption("mode",_)}}),E("textwidth",80,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var _=$.getOption("textwidth");return _}var N=Math.round(y);N>1&&$.setOption("textwidth",N)}});var ki=function(){function y(Q,re,se){function ye(Oe){var Re=++B%N,Ge=Y[Re];Ge&&Ge.clear(),Y[Re]=Q.setBookmark(Oe)}var Ce=B%N,me=Y[Ce];if(me){var be=me.find();be&&!gt(be,re)&&ye(re)}else ye(re);ye(se),j=B,q=B-N+1,q<0&&(q=0)}function $(Q,re){B+=re,B>j?B=j:B<q&&(B=q);var se=Y[(N+B)%N];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(B+=ye,se=Y[(N+B)%N],se&&(Ce=se.find())&&!gt(me,Ce))break;while(B<j&&B>q)}return se}function _(Q,re){var se=B,ye=$(Q,re);return B=se,ye&&ye.find()}var N=100,B=-1,j=0,q=0,Y=new Array(N);return{cachedCursor:void 0,add:y,find:_,move:$}},Wn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=He.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,$){var _=He.registerController.getRegister($);if(_){if(_.clear(),this.latestRegister=$,y.openDialog){var N=ai("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=y.openDialog(N,null,{bottom:!0})}this.isRecording=!0}}};var He,Cn,_t={enterVimMode:h,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return He.registerController},resetVimGlobalState_:R,getVimGlobalState_:function(){return He},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:io,map:function(y,$,_){kr.map(y,$,_)},unmap:function(y,$){return kr.unmap(y,$)},noremap:function(y,$,_){kr.map(y,$,_,!0)},mapclear:function(y){var $=On.length,_=Co,N=On.slice(0,$-_);if(On=On.slice($-_),y)for(var B=N.length-1;B>=0;B--){var j=N[B];if(y!==j.context)if(j.context)this._mapCommand(j);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==y){var Q={};for(var re in j)Q[re]=j[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:T,getOption:k,defineOption:E,defineEx:function(y,$,_){if(!$)$=y;else if(y.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+y+'", command not registered');Is[y]=_,kr.commandMap_[$]={name:y,shortName:$,type:"api"}},handleKey:function(y,$,_){var N=this.findKey(y,$,_);if(typeof N=="function")return N()},multiSelectHandleKey:yo,findKey:function(y,$,_){function N(){var re=He.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),S(y),!0;_!="mapping"&&Uo(re,$)}}function B(){if($=="<Esc>"){if(Y.visualMode)At(y);else{if(!Y.insertMode)return;Qr(y)}return S(y),!0}}function j(){if(B())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ye=jn.matchCommand(re,On,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return S(y),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),Cn&&window.clearTimeout(Cn),Cn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(y)},k("insertModeEscKeysTimeout")),se){var me=y.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new D),Ce.inserted+=$;for(var be=0;be<me.length;be++){var Oe=mt(me[be].anchor,me[be].head),Re=sn(me[be].anchor,me[be].head),Ge=y.getRange(Oe,y.state.overwrite?ge(Re,0,1):Re);Ce.removed[be]=(Ce.removed[be]||"")+Ge}}return!se}if(Y.expectLiteralNext=!1,Cn&&window.clearTimeout(Cn),ye.command&&Ce){for(var me=y.listSelections(),be=0;be<me.length;be++){var ht=me[be].head;y.replaceRange(Ce.removed[be]||"",ge(ht,0,-Ce.inserted.length),ht,"+input")}He.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||S(y),ye.command}function q(){if(N()||B())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return S(y),!1;var ye=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var me=jn.matchCommand(Ce,On,Y.inputState,ye);return me.type=="none"?(S(y),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(S(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=L(y),Q;return Y.insertMode?Q=j():Q=q(),Q===!1?!Y.insertMode&&$.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(y,Q.toKeys,Q):jn.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,L(y),_t.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,$){kr.processCommand(y,$)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:As,_mapCommand:Ho,defineRegister:U,exitVisualMode:At,exitInsertMode:Qr},Pr=[],fn=!1,An,rr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Br={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},_i={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(rr)).forEach(function(y){_i[(rr[y]||"").toLowerCase()]=_i[y.toLowerCase()]=y}),E("langmap",void 0,"string",["lmap"],function(y,$){if(y===void 0)return Qn.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},W.prototype={setText:function(y,$,_){this.keyBuffer=[y||""],this.linewise=!!$,this.blockwise=!!_},pushText:function(y,$){$&&(this.linewise||this.keyBuffer.push(`
1440
+ `),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Wn(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,$,_,N,B){if(y!=="_"){N&&_.charAt(_.length-1)!==`
1441
+ `&&(_+=`
1442
+ `);var j=this.isValidRegister(y)?this.getRegister(y):null;if(!j){switch($){case"yank":this.registers[0]=new W(_,N,B);break;case"delete":case"change":_.indexOf(`
1443
+ `)==-1?this.registers["-"]=new W(_,N):(this.shiftNumericRegisters_(),this.registers[1]=new W(_,N))}this.unnamedRegister.setText(_,N,B);return}var q=u(y);q?j.pushText(_,N):j.setText(_,N,B),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(_),this.unnamedRegister.setText(j.toString(),N)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new W),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,an)||nn.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Z.prototype={nextMatch:function(y,$){var _=this.historyBuffer,N=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var B=this.iterator+N;$?B>=0:B<_.length;B+=N)for(var j=_[B],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=B,j;if(B>=_.length)return this.iterator=_.length,this.initialPrefix;if(B<0)return y},pushInput:function(y){var $=this.historyBuffer.indexOf(y);$>-1&&this.historyBuffer.splice($,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var jn={matchCommand:function(y,$,_,N){var B=Te(y,$,N,_);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var j,q=0;q<B.full.length;q++){var Y=B.full[q];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var Q=Ee(y);if(!Q||Q.length>1)return{type:"clear"};_.selectedCharacter=Q}return{type:"full",command:j}},processCommand:function(y,$,_){switch($.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(y,$,_);break;case"operator":this.processOperator(y,$,_);break;case"operatorMotion":this.processOperatorMotion(y,$,_);break;case"action":this.processAction(y,$,_);break;case"search":this.processSearch(y,$,_);break;case"ex":case"keyToEx":this.processEx(y,$,_);break}},processMotion:function(y,$,_){$.inputState.motion=_.motion,$.inputState.motionArgs=ce(_.motionArgs),this.evalInput(y,$)},processOperator:function(y,$,_){var N=$.inputState;if(N.operator){if(N.operator==_.operator){N.motion="expandToLine",N.motionArgs={linewise:!0},this.evalInput(y,$);return}S(y)}N.operator=_.operator,N.operatorArgs=ce(_.operatorArgs),_.keys.length>1&&(N.operatorShortcut=_.keys),_.exitVisualBlock&&($.visualBlock=!1,Je(y)),$.visualMode&&this.evalInput(y,$)},processOperatorMotion:function(y,$,_){var N=$.visualMode,B=ce(_.operatorMotionArgs);B&&N&&B.visualLine&&($.visualLine=!0),this.processOperator(y,$,_),N||this.processMotion(y,$,_)},processAction:function(y,$,_){var N=$.inputState,B=N.getRepeat(),j=!!B,q=ce(_.actionArgs)||{};N.selectedCharacter&&(q.selectedCharacter=N.selectedCharacter),_.operator&&this.processOperator(y,$,_),_.motion&&this.processMotion(y,$,_),(_.motion||_.operator)&&this.evalInput(y,$),q.repeat=B||1,q.repeatIsExplicit=j,q.registerName=N.registerName,S(y),$.lastMotion=null,_.isEdit&&this.recordLastEdit($,N,_),zn[_.action](y,q,$)},processSearch:function(y,$,_){function N(Re,Ge,ht){He.searchHistoryController.pushInput(Re),He.searchHistoryController.reset();try{xn(y,Re,Ge,ht)}catch{Kt(y,"Invalid regex: "+Re),S(y);return}jn.processMotion(y,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function B(Re){N(Re,!0,!0);var Ge=He.macroModeState;Ge.isRecording&&$s(Ge,Re)}function j(Re,Ge,ht){var tt=H(Re),st,kn;tt=="<Up>"||tt=="<Down>"?(st=tt=="<Up>",kn=Re.target?Re.target.selectionEnd:0,Ge=He.searchHistoryController.nextMatch(Ge,st)||"",ht(Ge),kn&&Re.target&&(Re.target.selectionEnd=Re.target.selectionStart=Math.min(kn,Re.target.value.length))):tt&&tt!="<Left>"&&tt!="<Right>"&&He.searchHistoryController.reset();var dt;try{dt=xn(y,Ge,!0,!0)}catch{}dt?y.scrollIntoView(Lr(y,!Y,dt),30):(jo(y),y.scrollTo(ye.left,ye.top))}function q(Re,Ge,ht){var tt=H(Re);tt=="<Esc>"||tt=="<C-c>"||tt=="<C-[>"||tt=="<BS>"&&Ge==""?(He.searchHistoryController.pushInput(Ge),He.searchHistoryController.reset(),xn(y,se),jo(y),y.scrollTo(ye.left,ye.top),je.e_stop(Re),S(y),ht(),y.focus()):tt=="<Up>"||tt=="<Down>"?je.e_stop(Re):tt=="<C-u>"&&(je.e_stop(Re),ht(""))}if(y.getSearchCursor){var Y=_.searchArgs.forward,Q=_.searchArgs.wholeWordOnly;Rn(y).setReversed(!Y);var re=Y?"/":"?",se=Rn(y).getQuery(),ye=y.getScrollInfo();switch(_.searchArgs.querySrc){case"prompt":var Ce=He.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();N(Oe,!0,!1)}else Ir(y,{onClose:B,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});break;case"wordUnderCursor":var me=kt(y,{noSymbol:!0}),be=!0;if(me||(me=kt(y,{noSymbol:!1}),be=!1),!me){Kt(y,"No word under cursor"),S(y);return}var Oe=y.getLine(me.start.line).substring(me.start.ch,me.end.ch);be&&Q?Oe="\\b"+Oe+"\\b":Oe=wn(Oe),He.jumpList.cachedCursor=y.getCursor(),y.setCursor(me.start),N(Oe,!0,!1)}}},processEx:function(y,$,_){function N(j){He.exCommandHistoryController.pushInput(j),He.exCommandHistoryController.reset(),kr.processCommand(y,j),y.state.vim&&S(y)}function B(j,q,Y){var Q=H(j),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(He.exCommandHistoryController.pushInput(q),He.exCommandHistoryController.reset(),je.e_stop(j),S(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(je.e_stop(j),re=Q=="<Up>",se=j.target?j.target.selectionEnd:0,q=He.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(se,j.target.value.length))):Q=="<C-u>"?(je.e_stop(j),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&He.exCommandHistoryController.reset()}_.type=="keyToEx"?kr.processCommand(y,_.exArgs.input):$.visualMode?Ir(y,{onClose:N,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Ir(y,{onClose:N,prefix:":",onKeyDown:B})},evalInput:function(y,$){var _=$.inputState,N=_.motion,B=_.motionArgs||{},j=_.operator,q=_.operatorArgs||{},Y=_.registerName,Q=$.sel,re=Xe($.visualMode?ue(y,Q.head):y.getCursor("head")),se=Xe($.visualMode?ue(y,Q.anchor):y.getCursor("anchor")),ye=Xe(re),Ce=Xe(se),me,be,Oe;if(j&&this.recordLastEdit($,_),_.repeatOverride!==void 0?Oe=_.repeatOverride:Oe=_.getRepeat(),Oe>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Oe===0)&&(Oe=1,B.repeatIsExplicit=!1),_.selectedCharacter&&(B.selectedCharacter=q.selectedCharacter=_.selectedCharacter),B.repeat=Oe,S(y),N){var Re=Zr[N](y,re,B,$,_);if($.lastMotion=Zr[N],!Re)return;if(B.toJumplist){!j&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ge=He.jumpList,ht=Ge.cachedCursor;ht?($r(y,ht,Re),delete Ge.cachedCursor):$r(y,re,Re)}Re instanceof Array?(be=Re[0],me=Re[1]):me=Re,me||(me=Xe(re)),$.visualMode?((!$.visualBlock||me.ch!==1/0)&&(me=ue(y,me,ye)),be&&(be=ue(y,be)),be=be||Ce,Q.anchor=be,Q.head=me,Je(y),si(y,$,"<",at(be,me)?be:me),si(y,$,">",at(be,me)?me:be)):j||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),me=ue(y,me,ye),y.setCursor(me.line,me.ch))}if(j){if(q.lastSel){be=Ce;var tt=q.lastSel,st=Math.abs(tt.head.line-tt.anchor.line),kn=Math.abs(tt.head.ch-tt.anchor.ch);tt.visualLine?me=new De(Ce.line+st,Ce.ch):tt.visualBlock?me=new De(Ce.line+st,Ce.ch+kn):tt.head.line==tt.anchor.line?me=new De(Ce.line,Ce.ch+kn):me=new De(Ce.line+st,Ce.ch),$.visualMode=!0,$.visualLine=tt.visualLine,$.visualBlock=tt.visualBlock,Q=$.sel={anchor:be,head:me},Je(y)}else $.visualMode&&(q.lastSel={anchor:Xe(Q.anchor),head:Xe(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var dt,Mn,$t,Ot,ir;if($.visualMode){dt=mt(Q.head,Q.anchor),Mn=sn(Q.head,Q.anchor),$t=$.visualLine||q.linewise,Ot=$.visualBlock?"block":$t?"line":"char";var mr=b(y,dt,Mn);if(ir=vt(y,{anchor:mr.start,head:mr.end},Ot),$t){var En=ir.ranges;if(Ot=="block")for(var V=0;V<En.length;V++)En[V].head.ch=Jt(y,En[V].head.line);else Ot=="line"&&(En[0].head=new De(En[0].head.line+1,0))}}else{if(dt=Xe(be||Ce),Mn=Xe(me||ye),at(Mn,dt)){var X=dt;dt=Mn,Mn=X}$t=B.linewise||q.linewise,$t?Nt(y,dt,Mn):B.forward&&Pt(y,dt,Mn),Ot="char";var ie=!B.inclusive||$t,mr=b(y,dt,Mn);ir=vt(y,{anchor:mr.start,head:mr.end},Ot,ie)}y.setSelections(ir.ranges,ir.primary),$.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=$t;var oe=Qo[j](y,q,ir.ranges,Ce,me);$.visualMode&&At(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,$,_){var N=He.macroModeState;N.isPlaying||(y.lastEditInputState=$,y.lastEditActionCommand=_,N.lastInsertModeChanges.changes=[],N.lastInsertModeChanges.expectCursorActivityForChange=!1,N.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},Zr={moveToTopLine:function(y,$,_){var N=ro(y).top+_.repeat-1;return new De(N,pt(y.getLine(N)))},moveToMiddleLine:function(y){var $=ro(y),_=Math.floor(($.top+$.bottom)*.5);return new De(_,pt(y.getLine(_)))},moveToBottomLine:function(y,$,_){var N=ro(y).bottom-_.repeat+1;return new De(N,pt(y.getLine(N)))},expandToLine:function(y,$,_){var N=$;return new De(N.line+_.repeat-1,1/0)},findNext:function(y,$,_){var N=Rn(y),B=N.getQuery();if(B){var j=!_.forward;return j=N.isReversed()?!j:j,bi(y,B),Lr(y,j,B,_.repeat)}},findAndSelectNextInclusive:function(y,$,_,N,B){var j=Rn(y),q=j.getQuery();if(q){var Y=!_.forward;Y=j.isReversed()?!Y:Y;var Q=wi(y,Y,q,_.repeat,N);if(Q){if(B.operator)return Q;var re=Q[0],se=new De(Q[1].line,Q[1].ch-1);if(N.visualMode){(N.visualLine||N.visualBlock)&&(N.visualLine=!1,N.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var ye=N.sel.anchor;if(ye)return j.isReversed()?_.forward?[ye,re]:[ye,se]:_.forward?[ye,se]:[ye,re]}else N.visualMode=!0,N.visualLine=!1,N.visualBlock=!1,je.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(y,$,_,N){var B=Xr(y,N,_.selectedCharacter);return B?_.linewise?{line:B.line,ch:pt(y.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(y,$,_,N){if(N.visualBlock&&_.sameLine){var B=N.sel;return[ue(y,new De(B.anchor.line,B.head.ch)),ue(y,new De(B.head.line,B.anchor.ch))]}return[N.sel.head,N.sel.anchor]},jumpToMark:function(y,$,_,N){for(var B=$,j=0;j<_.repeat;j++){var q=B;for(var Y in N.marks)if(c(Y)){var Q=N.marks[Y].find(),re=_.forward?at(Q,q):at(q,Q);if(!re&&!(_.linewise&&Q.line==q.line)){var se=gt(q,B),ye=_.forward?bn(q,Q,B):bn(B,Q,q);(se||ye)&&(B=Q)}}}return _.linewise&&(B=new De(B.line,pt(y.getLine(B.line)))),B},moveByCharacters:function(y,$,_){var N=$,B=_.repeat,j=_.forward?N.ch+B:N.ch-B;return new De(N.line,j)},moveByLines:function(y,$,_,N){var B=$,j=B.ch;switch(N.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=N.lastHPos;break;default:N.lastHPos=j}var q=_.repeat+(_.repeatOffset||0),Y=_.forward?B.line+q:B.line-q,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&B.line==Q)return this.moveToStartOfLine(y,$,_,N);if(Y>re&&B.line==re)return go(y,$,_,N,!0);var se=y.ace.session.getFoldLine(Y);return se&&(_.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),_.toFirstChar&&(j=pt(y.getLine(Y)),N.lastHPos=j),N.lastHSPos=y.charCoords(new De(Y,j),"div").left,new De(Y,j)},moveByDisplayLines:function(y,$,_,N){var B=$;switch(N.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:N.lastHSPos=y.charCoords(B,"div").left}var j=_.repeat,Q=y.findPosV(B,_.forward?j:-j,"line",N.lastHSPos);if(Q.hitSide)if(_.forward)var q=y.charCoords(Q,"div"),Y={top:q.top+8,left:N.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new De(y.firstLine(),0),"div");re.left=N.lastHSPos,Q=y.coordsChar(re,"div")}return N.lastHPos=Q.ch,Q},moveByPage:function(y,$,_){var N=$,B=_.repeat;return y.findPosV(N,_.forward?B:-B,"page")},moveByParagraph:function(y,$,_){var N=_.forward?1:-1;return ks(y,$,_.repeat,N)},moveBySentence:function(y,$,_){var N=_.forward?1:-1;return ji(y,$,_.repeat,N)},moveByScroll:function(y,$,_,N){var B=y.getScrollInfo(),j=null,q=_.repeat;q||(q=B.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords($,"local");if(_.repeat=q,j=Zr.moveByDisplayLines(y,$,_,N),!j)return null;var Q=y.charCoords(j,"local");return y.scrollTo(null,B.top+Q.top-Y.top),j},moveByWords:function(y,$,_){return xr(y,$,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(y,$,_){var N=_.repeat,B=Wo(y,N,_.forward,_.selectedCharacter,$),j=_.forward?-1:1;return Yr(j,_),B?(B.ch+=j,B):null},moveToCharacter:function(y,$,_){var N=_.repeat;return Yr(0,_),Wo(y,N,_.forward,_.selectedCharacter,$)||$},moveToSymbol:function(y,$,_){var N=_.repeat;return Wi(y,N,_.forward,_.selectedCharacter)||$},moveToColumn:function(y,$,_,N){var B=_.repeat;return N.lastHPos=B-1,N.lastHSPos=y.charCoords($,"div").left,Ga(y,B)},moveToEol:function(y,$,_,N){return go(y,$,_,N,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,$){var _=$;return new De(_.line,pt(y.getLine(_.line)))},moveToMatchedSymbol:function(y,$){for(var _=$,N=_.line,B=_.ch,j=y.getLine(N),q;B<j.length;B++)if(q=j.charAt(B),q&&l(q)){var Y=y.getTokenTypeAt(new De(N,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<j.length){var Q=/[<>]/.test(j[B])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new De(N,B+1),{bracketRegex:Q});return re.to}return _},moveToStartOfLine:function(y,$){return new De($.line,0)},moveToLineOrEdgeOfDocument:function(y,$,_){var N=_.forward?y.lastLine():y.firstLine();return _.repeatIsExplicit&&(N=_.repeat-y.getOption("firstLineNumber")),new De(N,pt(y.getLine(N)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var $=y.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(y,$,_,N){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=_.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!_.textObjectInner,Q,re;if(B[q]){if(re=!0,Q=Yn(y,$,q,Y),!Q){var se=y.getSearchCursor(new RegExp("\\"+q,"g"),$);se.find()&&(Q=Yn(y,se.from(),q,Y))}}else if(j[q])re=!0,Q=Mr(y,$,q,Y);else if(q==="W"||q==="w")for(var ye=_.repeat||1;ye-- >0;){var Ce=kt(y,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=ks(y,$,_.repeat,0,Y),_.linewise=!0,N.visualMode)N.visualLine||(N.visualLine=!0);else{var me=N.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(q==="t")Q=$n(y,$,Y);else if(q==="s"){var be=y.getLine($.line);$.ch>0&&w(be[$.ch])&&($.ch-=1);var Oe=aa(y,$,_.repeat,1,Y),Re=aa(y,$,_.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?Ve(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,$,_){var N=He.lastCharacterSearch,B=_.repeat,j=_.forward===N.forward,q=(N.increment?1:0)*(j?-1:1);y.moveH(-q,"char"),_.inclusive=!!j;var Y=Wo(y,B,j,N.selectedCharacter);return Y?(Y.ch+=q,Y):(y.moveH(q,"char"),$)}},Qo={change:function(y,$,_){var N,B,j=y.state.vim,q=_[0].anchor,Y=_[0].head;if(j.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(q,Y),B=y.getSelection(),y.replaceSelection(""),N=q;else{B=y.getSelection();var Q=he("",_.length);y.replaceSelections(Q),N=mt(_[0].head,_[0].anchor)}else{B=y.getRange(q,Y);var re=j.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(B)){var se=/\s+$/.exec(B);se&&re.motionArgs&&re.motionArgs.forward&&(Y=ge(Y,0,-se[0].length),B=B.slice(0,-se[0].length))}$.linewise&&(q=new De(q.line,pt(y.getLine(q.line))),Y.line>q.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",q,Y),N=q}He.registerController.pushText($.registerName,"change",B,$.linewise,_.length>1),zn.enterInsertMode(y,{head:N},y.state.vim)},delete:function(y,$,_){var N,B,j=y.state.vim;if(j.visualBlock){B=y.getSelection();var q=he("",_.length);y.replaceSelections(q),N=mt(_[0].head,_[0].anchor)}else{var Y=_[0].anchor,Q=_[0].head;$.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,Jt(y,Y.line-1))),B=y.getRange(Y,Q),y.replaceRange("",Y,Q),N=Y,$.linewise&&(N=Zr.moveToFirstNonWhiteSpaceCharacter(y,Y))}return He.registerController.pushText($.registerName,"delete",B,$.linewise,j.visualBlock),ue(y,N)},indent:function(y,$,_){var N=y.state.vim,B=N.visualMode?$.repeat:1;if(N.visualBlock){for(var j=y.getOption("tabSize"),q=y.getOption("indentWithTabs")?" ":" ".repeat(j),Y,Q=_.length-1;Q>=0;Q--)if(Y=mt(_[Q].anchor,_[Q].head),$.indentRight)y.replaceRange(q.repeat(B),Y,Y);else{for(var re=y.getLine(Y.line),se=0,ye=0;ye<B;ye++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var me=1;me<q.length&&(Ce=re[Y.ch+se],Ce===" ");me++)se++}}y.replaceRange("",Y,ge(Y,0,se))}return Y}if(y.indentMore)for(var ye=0;ye<B;ye++)$.indentRight?y.indentMore():y.indentLess();else{var be=_[0].anchor.line,Oe=N.visualBlock?_[_.length-1].anchor.line:_[0].head.line;$.linewise&&Oe--;for(var Q=be;Q<=Oe;Q++)for(var ye=0;ye<B;ye++)y.indentLine(Q,$.indentRight)}return Zr.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},indentAuto:function(y,$,_){return y.execCommand("indentAuto"),Zr.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},hardWrap:function(y,$,_,N,B){if(y.hardWrap){var j=_[0].anchor.line,q=_[0].head.line;$.linewise&&q--;var Y=y.hardWrap({from:j,to:q});return Y>j&&$.linewise&&Y--,$.keepCursor?N:new De(Y,0)}},changeCase:function(y,$,_,N,B){for(var j=y.getSelections(),q=[],Y=$.toLower,Q=0;Q<j.length;Q++){var re=j[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);se+=u(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return y.replaceSelections(q),$.shouldMoveCursor?B:!y.state.vim.visualMode&&$.linewise&&_[0].anchor.line+1==_[0].head.line?Zr.moveToFirstNonWhiteSpaceCharacter(y,N):$.linewise?N:mt(_[0].anchor,_[0].head)},yank:function(y,$,_,N){var B=y.state.vim,j=y.getSelection(),q=B.visualMode?mt(B.sel.anchor,B.sel.head,_[0].head,_[0].anchor):N;return He.registerController.pushText($.registerName,"yank",j,$.linewise,B.visualBlock),q}},zn={jumpListWalk:function(y,$,_){if(!_.visualMode){var N=$.repeat,B=$.forward,j=He.jumpList,q=j.move(y,B?N:-N),Y=q?q.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,$,_){if(!_.visualMode){var N=$.repeat||1,B=y.defaultTextHeight(),j=y.getScrollInfo().top,q=B*N,Y=$.forward?j+q:j-q,Q=Xe(y.getCursor()),re=y.charCoords(Q,"local");if($.forward)Y>re.top?(Q.line+=(Y-re.top)/B,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 se=Y+y.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/B,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,$){var _=y.getCursor().line,N=y.charCoords(new De(_,0),"local"),B=y.getScrollInfo().clientHeight,j=N.top;switch($.position){case"center":j=N.bottom-B/2;break;case"bottom":var q=new De(_,y.getLine(_).length-1),Y=y.charCoords(q,"local"),Q=Y.bottom-j;j=j-B+Q}y.scrollTo(null,j)},replayMacro:function(y,$,_){var N=$.selectedCharacter,B=$.repeat,j=He.macroModeState;for(N=="@"?N=j.latestRegister:j.latestRegister=N;B--;)Ts(y,_,j,N)},enterMacroRecordMode:function(y,$){var _=He.macroModeState,N=$.selectedCharacter;He.registerController.isValidRegister(N)&&_.enterMacroRecordMode(y,N)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,$,_){if(!y.getOption("readOnly")){_.insertMode=!0,_.insertModeRepeat=$&&$.repeat||1;var N=$?$.insertAt:null,B=_.sel,j=$.head||y.getCursor("head"),q=y.listSelections().length;if(N=="eol")j=new De(j.line,Jt(y,j.line));else if(N=="bol")j=new De(j.line,0);else if(N=="charAfter"){var Y=b(y,j,ge(j,0,1));j=Y.end}else if(N=="firstNonBlank"){var Y=b(y,j,Zr.moveToFirstNonWhiteSpaceCharacter(y,j));j=Y.end}else if(N=="startOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),q=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?j=B.head:j=new De(B.anchor.line,0)}else if(N=="endOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),q=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?j=ge(B.head,0,1):j=new De(B.anchor.line,0)}else if(N=="inplace"){if(_.visualMode)return}else N=="lastEdit"&&(j=mo(y)||j);y.setOption("disableInput",!1),$&&$.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),je.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),je.signal(y,"vim-mode-change",{mode:"insert"})),He.macroModeState.isPlaying||(y.on("change",vo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=y.setBookmark(j,{insertLeft:!0}),je.on(y.getInputField(),"keydown",Ms)),_.visualMode&&At(y),nr(y,j,q)}},toggleVisualMode:function(y,$,_){var N=$.repeat,B=y.getCursor(),j;if(_.visualMode)_.visualLine^$.linewise||_.visualBlock^$.blockwise?(_.visualLine=!!$.linewise,_.visualBlock=!!$.blockwise,je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Je(y)):At(y);else{_.visualMode=!0,_.visualLine=!!$.linewise,_.visualBlock=!!$.blockwise,j=ue(y,new De(B.line,B.ch+N-1));var q=b(y,B,j);_.sel={anchor:q.start,head:q.end},je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Je(y),si(y,_,"<",mt(B,j)),si(y,_,">",sn(B,j))}},reselectLastSelection:function(y,$,_){var N=_.lastSelection;if(_.visualMode&&ke(y,_),N){var B=N.anchorMark.find(),j=N.headMark.find();if(!B||!j)return;_.sel={anchor:B,head:j},_.visualMode=!0,_.visualLine=N.visualLine,_.visualBlock=N.visualBlock,Je(y),si(y,_,"<",mt(B,j)),si(y,_,">",sn(B,j)),je.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(y,$,_){var N,B;if(_.visualMode){if(N=y.getCursor("anchor"),B=y.getCursor("head"),at(B,N)){var j=B;B=N,N=j}B.ch=Jt(y,B.line)-1}else{var q=Math.max($.repeat,2);N=y.getCursor(),B=ue(y,new De(N.line+q-1,1/0))}for(var Y=0,Q=N.line;Q<B.line;Q++){Y=Jt(y,N.line);var re="",se=0;if(!$.keepSpaces){var ye=y.getLine(N.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}y.replaceRange(re,new De(N.line,Y),new De(N.line+1,se))}var Ce=ue(y,new De(N.line,Y));_.visualMode&&At(y,!1),y.setCursor(Ce)},newLineAndEnterInsertMode:function(y,$,_){_.insertMode=!0;var N=Xe(y.getCursor());if(N.line===y.firstLine()&&!$.after)y.replaceRange(`
1444
+ `,new De(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{N.line=$.after?N.line:N.line-1,N.ch=Jt(y,N.line),y.setCursor(N);var B=je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent;B(y)}this.enterInsertMode(y,{repeat:$.repeat},_)},paste:function(y,$,_){var N=this,B=He.registerController.getRegister($.registerName),j=function(){var q=B.toString();N.continuePaste(y,$,_,q,B)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){N.continuePaste(y,$,_,q,B)},function(){j()}):j()},continuePaste:function(y,$,_,N,B){var j=Xe(y.getCursor());if(N){if($.matchIndent){var q=y.getOption("tabSize"),Y=function(En){var V=En.split(" ").length-1,X=En.split(" ").length-1;return V*q+X*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=N.replace(/\n$/,""),ye=N!==se,Ce=Y(N.match(/^\s*/)[0]),N=se.replace(/^\s*/gm,function(En){var V=re+(Y(En)-Ce);if(V<0)return"";if(y.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});N+=ye?`
1445
+ `:""}if($.repeat>1)var N=Array($.repeat+1).join(N);var me=B.linewise,be=B.blockwise;if(be){N=N.split(`
1446
+ `),me&&N.pop();for(var Oe=0;Oe<N.length;Oe++)N[Oe]=N[Oe]==""?" ":N[Oe];j.ch+=$.after?1:0,j.ch=Math.min(Jt(y,j.line),j.ch)}else me?_.visualMode?N=_.visualLine?N.slice(0,-1):`
1447
+ `+N.slice(0,N.length-1)+`
1448
+ `:$.after?(N=`
1449
+ `+N.slice(0,N.length-1),j.ch=Jt(y,j.line)):j.ch=0:j.ch+=$.after?1:0;var Re;if(_.visualMode){_.lastPastedText=N;var Ge,ht=Ke(y,_),tt=ht[0],st=ht[1],kn=y.getSelection(),dt=y.listSelections(),Mn=new Array(dt.length).join("1").split("1");_.lastSelection&&(Ge=_.lastSelection.headMark.find()),He.registerController.unnamedRegister.setText(kn),be?(y.replaceSelections(Mn),st=new De(tt.line+N.length-1,tt.ch),y.setCursor(tt),Pn(y,st),y.replaceSelections(N),Re=tt):_.visualBlock?(y.replaceSelections(Mn),y.setCursor(tt),y.replaceRange(N,tt,tt),Re=tt):(y.replaceRange(N,tt,st),Re=y.posFromIndex(y.indexFromPos(tt)+N.length-1)),Ge&&(_.lastSelection.headMark=y.setBookmark(Ge)),me&&(Re.ch=0)}else if(be){y.setCursor(j);for(var Oe=0;Oe<N.length;Oe++){var $t=j.line+Oe;$t>y.lastLine()&&y.replaceRange(`
1450
+ `,new De($t,0));var Ot=Jt(y,$t);Ot<j.ch&&Fn(y,$t,j.ch)}y.setCursor(j),Pn(y,new De(j.line+N.length-1,j.ch)),y.replaceSelections(N),Re=j}else if(y.replaceRange(N,j),me){var $t=$.after?j.line+1:j.line;Re=new De($t,pt(y.getLine($t)))}else Re=Xe(j),/\n/.test(N)||(Re.ch+=N.length-($.after?1:0));_.visualMode&&At(y,!1),y.setCursor(Re)}},undo:function(y,$){y.operation(function(){Ze(y,je.commands.undo,$.repeat)(),y.setCursor(ue(y,y.getCursor("start")))})},redo:function(y,$){Ze(y,je.commands.redo,$.repeat)()},setRegister:function(y,$,_){_.inputState.registerName=$.selectedCharacter},insertRegister:function(y,$,_){var N=$.selectedCharacter,B=He.registerController.getRegister(N),j=B&&B.toString();j&&y.replaceSelection(j)},oneNormalCommand:function(y,$,_){Qr(y,!0),_.insertModeReturn=!0,je.on(y,"vim-command-done",function N(){_.visualMode||(_.insertModeReturn&&(_.insertModeReturn=!1,_.insertMode||zn.enterInsertMode(y,{},_)),je.off(y,"vim-command-done",N))})},setMark:function(y,$,_){var N=$.selectedCharacter;si(y,_,N,y.getCursor())},replace:function(y,$,_){var N=$.selectedCharacter,B=y.getCursor(),j,q,Y=y.listSelections();if(_.visualMode)B=y.getCursor("start"),q=y.getCursor("end");else{var Q=y.getLine(B.line);j=B.ch+$.repeat,j>Q.length&&(j=Q.length),q=new De(B.line,j)}var re=b(y,B,q);if(B=re.start,q=re.end,N==`
1451
+ `)_.visualMode||y.replaceRange("",B,q),(je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent)(y);else{var se=y.getRange(B,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N),se=se.replace(/[^\n]/g,N),_.visualBlock){var ye=new Array(y.getOption("tabSize")+1).join(" ");se=y.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N),se=se.replace(/\t/g,ye).replace(/[^\n]/g,N).split(`
1452
+ `),y.replaceSelections(se)}else y.replaceRange(se,B,q);_.visualMode?(B=at(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(B),At(y,!1)):y.setCursor(ge(q,0,-1))}},incrementNumberToken:function(y,$){for(var _=y.getCursor(),N=y.getLine(_.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,Y,Q;(j=B.exec(N))!==null&&(q=j.index,Y=q+j[0].length,!(_.ch<Y)););if(!(!$.backtrack&&Y<=_.ch)&&j){var re=j[2]||j[4],se=j[3]||j[5],ye=$.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(j[1]+se,Ce)+ye*$.repeat;Q=me.toString(Ce);var be=re?new Array(se.length-Q.length+1+j[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var Oe=new De(_.line,q),Re=new De(_.line,Y);y.replaceRange(Q,Oe,Re),y.setCursor(new De(_.line,q+Q.length-1))}},repeatLastEdit:function(y,$,_){var N=_.lastEditInputState;if(N){var B=$.repeat;B&&$.repeatIsExplicit?_.lastEditInputState.repeatOverride=B:B=_.lastEditInputState.repeatOverride||B,ua(y,_,B,!1)}},indent:function(y,$){y.indentLine(y.getCursor().line,$.indentRight)},exitInsertMode:Qr},ci={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ui={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 $=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,$}},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 $=y.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if($==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if($==="else"&&y.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),zi.prototype={getQuery:function(){return He.query},setQuery:function(y){He.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return He.isReversed},setReversed:function(y){He.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Si={"\\n":`
1453
+ `,"\\r":"\r","\\t":" "},pr={"\\/":"/","\\\\":"\\","\\n":`
1454
+ `,"\\r":"\r","\\t":" ","\\&":"&"},gr=0,Cr=function(){this.buildCommandMap_()};Cr.prototype={processCommand:function(y,$,_){var N=this;y.operation(function(){y.curOp.isVimOp=!0,N._processCommand(y,$,_)})},_processCommand:function(y,$,_){var N=y.state.vim,B=He.registerController.getRegister(":"),j=B.toString(),q=new je.StringStream($);B.setText($);var Y=_||{};Y.input=$;try{this.parseInput_(y,q,Y)}catch(se){throw Kt(y,se.toString()),se}N.visualMode&&At(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&&B.setText(j),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){I(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){Kt(y,'Not an editor command ":'+$+'"');return}try{Is[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Kt(y,se.toString()),se}},parseInput_:function(y,$,_){if($.eatWhile(":"),$.eat("%")?(_.line=y.firstLine(),_.lineEnd=y.lastLine()):(_.line=this.parseLineSpec_(y,$),_.line!==void 0&&$.eat(",")&&(_.lineEnd=this.parseLineSpec_(y,$))),_.line==null)if(y.state.vim.visualMode){var N=Xr(y,y.state.vim,"<");_.selectionLine=N&&N.line,N=Xr(y,y.state.vim,">"),_.selectionLineEnd=N&&N.line}else _.selectionLine=y.getCursor().line;else _.selectionLine=_.line,_.selectionLineEnd=_.lineEnd;var B=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?_.commandName=B[1]:_.commandName=$.match(/.*/)[0],_},parseLineSpec_:function(y,$){var _=$.match(/^(\d+)/);if(_)return parseInt(_[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,y.getCursor().line);case"$":return this.parseLineSpecOffset_($,y.lastLine());case"'":var N=$.next(),B=Xr(y,y.state.vim,N);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_($,B.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,y.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(y,$){var _=y.match(/^([+-])?(\d+)/);if(_){var N=parseInt(_[2],10);_[1]=="-"?$-=N:$+=N}return $},parseCommandArgs_:function(y,$,_){if(!y.eol()){$.argString=y.match(/.*/)[0];var N=_.argDelimiter||/\s+/,B=wr($.argString).split(N);B.length&&B[0]&&($.args=B)}},matchCommand_:function(y){for(var $=y.length;$>0;$--){var _=y.substring(0,$);if(this.commandMap_[_]){var N=this.commandMap_[_];if(N.name.indexOf(y)===0)return N}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<li.length;y++){var $=li[y],_=$.shortName||$.name;this.commandMap_[_]=$}},map:function(y,$,_,N){if(y!=":"&&y.charAt(0)==":"){if(_)throw Error("Mode not supported for ex mappings");var B=y.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:$,user:!0}}else{var j={keys:y,type:"keyToKey",toKeys:$,noremap:!!N};_&&(j.context=_),On.unshift(j)}},unmap:function(y,$){if(y!=":"&&y.charAt(0)==":"){if($)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 N=y,B=0;B<On.length;B++)if(N==On[B].keys&&On[B].context===$)return On.splice(B,1),!0}};var Is={colorscheme:function(y,$){if(!$.args||$.args.length<1){Kt(y,y.getOption("theme"));return}y.setOption("theme",$.args[0])},map:function(y,$,_,N){var B=$.args;if(!B||B.length<2){y&&Kt(y,"Invalid mapping: "+$.input);return}kr.map(B[0],B[1],_,N)},imap:function(y,$){this.map(y,$,"insert")},nmap:function(y,$){this.map(y,$,"normal")},vmap:function(y,$){this.map(y,$,"visual")},omap:function(y,$){this.map(y,$,"operatorPending")},noremap:function(y,$){this.map(y,$,void 0,!0)},inoremap:function(y,$){this.map(y,$,"insert",!0)},nnoremap:function(y,$){this.map(y,$,"normal",!0)},vnoremap:function(y,$){this.map(y,$,"visual",!0)},onoremap:function(y,$){this.map(y,$,"operatorPending",!0)},unmap:function(y,$,_){var N=$.args;(!N||N.length<1||!kr.unmap(N[0],_))&&y&&Kt(y,"No such mapping: "+$.input)},mapclear:function(y,$){_t.mapclear()},imapclear:function(y,$){_t.mapclear("insert")},nmapclear:function(y,$){_t.mapclear("normal")},vmapclear:function(y,$){_t.mapclear("visual")},omapclear:function(y,$){_t.mapclear("operatorPending")},move:function(y,$){jn.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(y,$){var _=$.args,N=$.setCfg||{};if(!_||_.length<1){y&&Kt(y,"Invalid mapping: "+$.input);return}var B=_[0].split("="),j=B[0],q=B[1],Y=!1,Q=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+$.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),Q=!0);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var re=Gt[j]&&Gt[j].type=="boolean";if(re&&(Q?q=!k(j,y,N):q==null&&(q=!0)),!re&&q===void 0||Y){var se=k(j,y,N);se instanceof Error?Kt(y,se.message):se===!0||se===!1?Kt(y," "+(se?"":"no")+j):Kt(y," "+j+"="+se)}else{var ye=T(j,q,y,N);ye instanceof Error&&Kt(y,ye.message)}},setlocal:function(y,$){$.setCfg={scope:"local"},this.set(y,$)},setglobal:function(y,$){$.setCfg={scope:"global"},this.set(y,$)},registers:function(y,$){var _=$.args,N=He.registerController.registers,B=`----------Registers----------
1455
+
1456
+ `;if(_){var j;_=_.join("");for(var q=0;q<_.length;q++)if(j=_.charAt(q),!!He.registerController.isValidRegister(j)){var Y=N[j]||new W;B+='"'+j+" "+Y.toString()+`
1457
+ `}}else for(var j in N){var Q=N[j].toString();Q.length&&(B+='"'+j+" "+Q+`
1458
+ `)}Kt(y,B)},sort:function(y,$){function _(){if($.argString){var $t=new je.StringStream($.argString);if($t.eat("!")&&(j=!0),$t.eol())return;if(!$t.eatSpace())return"Invalid arguments";var Ot=$t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Ot&&!$t.eol())return"Invalid arguments";if(Ot[1]){q=Ot[1].indexOf("i")!=-1,Y=Ot[1].indexOf("u")!=-1;var ir=Ot[1].indexOf("d")!=-1||Ot[1].indexOf("n")!=-1&&1,mr=Ot[1].indexOf("x")!=-1&&1,En=Ot[1].indexOf("o")!=-1&&1;if(ir+mr+En>1)return"Invalid arguments";Q=ir&&"decimal"||mr&&"hex"||En&&"octal"}Ot[2]&&(re=new RegExp(Ot[2].substr(1,Ot[2].length-2),q?"i":""))}}function N($t,Ot){if(j){var ir;ir=$t,$t=Ot,Ot=ir}q&&($t=$t.toLowerCase(),Ot=Ot.toLowerCase());var mr=Q&&Re.exec($t),En=Q&&Re.exec(Ot);return mr?(mr=parseInt((mr[1]+mr[2]).toLowerCase(),Ge),En=parseInt((En[1]+En[2]).toLowerCase(),Ge),mr-En):$t<Ot?-1:1}function B($t,Ot){if(j){var ir;ir=$t,$t=Ot,Ot=ir}return q&&($t[0]=$t[0].toLowerCase(),Ot[0]=Ot[0].toLowerCase()),$t[0]<Ot[0]?-1:1}var j,q,Y,Q,re,se=_();if(se){Kt(y,se+": "+$.argString);return}var ye=$.line||y.firstLine(),Ce=$.lineEnd||$.line||y.lastLine();if(ye!=Ce){var me=new De(ye,0),be=new De(Ce,Jt(y,Ce)),Oe=y.getRange(me,be).split(`
1459
+ `),Re=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ge=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,ht=[],tt=[];if(Q||re)for(var st=0;st<Oe.length;st++){var kn=re?Oe[st].match(re):null;kn&&kn[0]!=""?ht.push(kn):!re&&Re.exec(Oe[st])?ht.push(Oe[st]):tt.push(Oe[st])}else tt=Oe;if(ht.sort(re?B:N),re)for(var st=0;st<ht.length;st++)ht[st]=ht[st].input;else Q||tt.sort(N);if(Oe=j?ht.concat(tt):tt.concat(ht),Y){var dt=Oe,Mn;Oe=[];for(var st=0;st<dt.length;st++)dt[st]!=Mn&&Oe.push(dt[st]),Mn=dt[st]}y.replaceRange(Oe.join(`
1460
+ `),me,be)}},vglobal:function(y,$){this.global(y,$)},normal:function(y,$){var _=$.argString;if(_&&_[0]=="!"&&(_=_.slice(1),fn=!0),_=_.trimStart(),!_){Kt(y,"Argument is required.");return}var N=$.line;if(typeof N=="number")for(var B=isNaN($.lineEnd)?N:$.lineEnd,j=N;j<=B;j++)y.setCursor(j,0),I(y,$.argString.trimStart()),y.state.vim.insertMode&&Qr(y,!0);else I(y,$.argString.trimStart()),y.state.vim.insertMode&&Qr(y,!0)},global:function(y,$){var _=$.argString;if(!_){Kt(y,"Regular Expression missing from global");return}var N=$.commandName[0]==="v";_[0]==="!"&&$.commandName[0]==="g"&&(N=!0,_=_.slice(1));var B=$.line!==void 0?$.line:y.firstLine(),j=$.lineEnd||$.line||y.lastLine(),q=Er(_),Y=_,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{xn(y,Y,!0,!0)}catch{Kt(y,"Invalid regex: "+Y);return}for(var re=Rn(y).getQuery(),se=[],ye=B;ye<=j;ye++){var Ce=y.getLine(ye),me=re.test(Ce);me!==N&&se.push(Q?y.getLineHandle(ye):Ce)}if(!Q){Kt(y,se.join(`
1461
+ `));return}var be=0,Oe=function(){if(be<se.length){var Re=se[be++],Ge=y.getLineNumber(Re);if(Ge==null){Oe();return}var ht=Ge+1+Q;kr.processCommand(y,ht,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,$){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var _=$.argString,N=_?Hi(_,_[0]):[],B,j="",q,Y,Q,re=!1,se=!1;if(N.length)B=N[0],k("pcre")&&B!==""&&(B=new RegExp(B).source),j=N[1],j!==void 0&&(k("pcre")?j=Qa(j.replace(/([^\\])&/g,"$1$$&")):j=Xa(j),He.lastSubstituteReplacePart=j),q=N[2]?N[2].split(" "):[];else if(_&&_.length){Kt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),k("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{xn(y,B,!0,!0)}catch{Kt(y,"Invalid regex: "+B);return}if(j=j||He.lastSubstituteReplacePart,j===void 0){Kt(y,"No previous substitute regular expression");return}var ye=Rn(y),Ce=ye.getQuery(),me=$.line!==void 0?$.line:y.getCursor().line,be=$.lineEnd||me;me==y.firstLine()&&be==y.lastLine()&&(be=1/0),Q&&(me=be,be=me+Q-1);var Oe=ue(y,new De(me,0)),Re=y.getSearchCursor(Ce,Oe);zo(y,re,se,me,be,Re,Ce,j,$.callback)},startinsert:function(y,$){I(y,$.argString=="!"?"A":"i",{})},redo:je.commands.redo,undo:je.commands.undo,write:function(y){je.commands.save?je.commands.save(y):y.save&&y.save()},nohlsearch:function(y){jo(y)},yank:function(y){var $=Xe(y.getCursor()),_=$.line,N=y.getLine(_);He.registerController.pushText("0","yank",N,!0,!0)},delete:function(y,$){var _=$.selectionLine,N=isNaN($.selectionLineEnd)?_:$.selectionLineEnd;Qo.delete(y,{linewise:!0},[{anchor:new De(_,0),head:new De(N+1,0)}])},join:function(y,$){var _=$.selectionLine,N=isNaN($.selectionLineEnd)?_:$.selectionLineEnd;y.setCursor(new De(_,0)),zn.joinLines(y,{repeat:N-_},y.state.vim)},delmarks:function(y,$){if(!$.argString||!wr($.argString)){Kt(y,"Argument required");return}for(var _=y.state.vim,N=new je.StringStream(wr($.argString));!N.eol();){N.eatSpace();var B=N.pos;if(!N.match(/[a-zA-Z]/,!1)){Kt(y,"Invalid argument: "+$.argString.substring(B));return}var j=N.next();if(N.match("-",!0)){if(!N.match(/[a-zA-Z]/,!1)){Kt(y,"Invalid argument: "+$.argString.substring(B));return}var q=j,Y=N.next();if(!(c(q)&&c(Y)||u(q)&&u(Y))){Kt(y,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Kt(y,"Invalid argument: "+$.argString.substring(B));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete _.marks[ye]}}else delete _.marks[j]}}},kr=new Cr;E("insertModeEscKeysTimeout",200,"number"),je.Vim=_t;var Rr={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"},hi=_t.handleKey.bind(_t);_t.handleKey=function(y,$,_){return y.operation(function(){return hi(y,$,_)},!0)},R(),r.CodeMirror=je;var di=_t.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,$,_,N,B){var j=this.state.vim||{},q=_.characterWidth,Y=_.lineHeight,Q=$.top,re=$.left;if(!j.insertMode){var se=N.cursor?hr.comparePoints(N.cursor,N.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&re>q&&(re-=q)}!j.insertMode&&j.status&&(Y/=2,Q+=Y),Vi.translate(y,re,Q),Vi.setStyle(y.style,"width",q+"px"),Vi.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var $=y.state.cm,_=di($);if(!_.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,$,_,N,B){var j=y.editor,q=j.state.cm,Y=di(q);if(N!=-1){if(Y.insertMode||($==-1?(_.charCodeAt(0)>255&&y.inputKey&&(_=y.inputKey,_&&y.inputHash==4&&(_=_.toUpperCase())),y.inputChar=_):$==4||$==0?y.inputKey==_&&y.inputHash==$&&y.inputChar?(_=y.inputChar,$=-1):(y.inputChar=null,y.inputKey=_,y.inputHash=$):y.inputChar=y.inputKey=null),q.state.overwrite&&Y.insertMode&&_=="backspace"&&$==0)return{command:"gotoleft"};if(_=="c"&&$==1&&!wo.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():q.operation(function(){At(q)})}),{command:"null",passEvent:!0};if(_=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Rn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if($==-1||$&1||$===0&&_.length>1){var se=Y.insertMode,ye=Es($,_,B||{},Y);Y.status==null&&(Y.status="");var Ce=yo(q,ye,"user");return Y=di(q),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(y){function $(){var N=di(_).insertMode;_.ace.renderer.setStyle("normal-mode",!N),y.textInput.setCommandMode(!N),y.renderer.$keepTextAreaAtCursor=N,y.renderer.$blockCursor=!N}y.state||(y.state={});var _=new je(y);y.state.cm=_,y.$vimModeHandler=this,h(_),di(_).status=null,_.on("vim-command-done",function(){_.virtualSelectionMode()||(di(_).status=null,_.ace._signal("changeStatus"),_.ace.session.markUndoGroup())}),_.on("changeStatus",function(){_.ace.renderer.updateCursor(),_.ace._signal("changeStatus")}),_.on("vim-mode-change",function(){_.virtualSelectionMode()||($(),_._signal("changeStatus"))}),$(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(_)},detach:function(y){var $=y.state.cm;g($),$.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 $=y.state.cm,_=di($);if(_.insertMode)return"INSERT";var N="";return _.visualMode&&(N+="VISUAL",_.visualLine&&(N+=" LINE"),_.visualBlock&&(N+=" BLOCK")),_.status&&(N+=(N?" ":"")+_.status),N}},_t.defineOption({name:"wrap",set:function(y,$){$&&$.ace.setOption("wrap",y)},type:"boolean"},!1),_t.defineEx("write","w",function(){console.log(":write is not implemented")}),On.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"}}),On.push({keys:"gq",type:"operator",operator:"hardWrap"}),_t.defineOperator("hardWrap",function(y,$,_,N,B){var j=_[0].anchor.line,q=_[0].head.line;return $.linewise&&q--,so(y.ace,{startRow:j,endRow:q}),De(q,0)}),E("textwidth",void 0,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var _=$.ace.getOption("printMarginColumn");return _}var N=Math.round(y);N>1&&$.ace.setOption("printMarginColumn",N)}}),zn.aceCommand=function(y,$,_){y.vimCmd=$,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",xi):xi(null,y.ace)},zn.fold=function(y,$,_){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},Co=On.length,r.handler.defaultKeymap=On,r.handler.actions=zn,r.Vim=_t}),function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})}()}(fg)),fg.exports}wk();var Dl={exports:{}};/**
1462
+ * @license
1463
+ * Lodash <https://lodash.com/>
1464
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1465
+ * Released under MIT license <https://lodash.com/license>
1466
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1467
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1468
+ */var xk=Dl.exports,gg;function Ck(){return gg||(gg=1,function(t,e){(function(){var n,r="4.17.21",f=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",b="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",g=500,s="__lodash_placeholder__",a=1,c=2,l=4,o=1,u=2,m=1,w=2,x=4,E=8,T=16,k=32,C=64,L=128,R=256,F=512,I=30,H="...",P=800,O=16,A=1,S=2,D=3,W=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",L],["bind",m],["bindKey",w],["curry",E],["curryRight",T],["flip",F],["partial",k],["partialRight",C],["rearg",R]],ue="[object Arguments]",ce="[object Array]",ge="[object AsyncFunction]",Te="[object Boolean]",$e="[object Date]",Ee="[object DOMException]",Ze="[object Error]",Xe="[object Function]",gt="[object GeneratorFunction]",at="[object Map]",mt="[object Number]",sn="[object Null]",bn="[object Object]",Jt="[object Promise]",wr="[object Proxy]",wn="[object RegExp]",Fn="[object Set]",Pn="[object String]",nr="[object Symbol]",Ct="[object Undefined]",Ke="[object WeakMap]",ke="[object WeakSet]",Ve="[object ArrayBuffer]",Je="[object DataView]",vt="[object Float32Array]",Tt="[object Float64Array]",At="[object Int8Array]",Pt="[object Int16Array]",Nt="[object Int32Array]",pt="[object Uint8Array]",kt="[object Uint8ClampedArray]",$n="[object Uint16Array]",$r="[object Uint32Array]",Yr=/\b__p \+= '';/g,Wi=/\b(__p \+=) '' \+/g,po=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xr=/&(?:amp|lt|gt|quot|#39);/g,go=/[&<>"']/g,Wo=RegExp(xr.source),Ga=RegExp(go.source),si=/<%-([\s\S]+?)%>/g,Ya=/<%([\s\S]+?)%>/g,ks=/<%=([\s\S]+?)%>/g,aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,Yn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,zi=RegExp(Mr.source),Rn=/^\s+/,Er=/\s/,no=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Hi=/\{\n\/\* \[wrapped with (.+)\] \*/,_s=/,? & /,la=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xa=/[()=,{}\[\]\/\s]/,Qa=/\\(\\)?/g,Ui=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ai=/\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,ca=/^0b[01]+$/i,Ir=/^\[object .+?Constructor\]$/,Xn=/^0o[0-7]+$/i,xn=/^(?:0|[1-9]\d*)$/,Bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bi=/($^)/,Lr=/['\n\r\u2028\u2029\\]/g,wi="\\ud800-\\udfff",jo="\\u0300-\\u036f",Ss="\\ufe20-\\ufe2f",ro="\\u20d0-\\u20ff",Xr=jo+Ss+ro,mo="\\u2700-\\u27bf",zo="a-z\\xdf-\\xf6\\xf8-\\xff",Qr="\\xac\\xb1\\xd7\\xf7",Ho="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",As="\\u2000-\\u206f",Ts=" \\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",Uo="A-Z\\xc0-\\xd6\\xd8-\\xde",ur="\\ufe0e\\ufe0f",$s=Qr+Ho+As+Ts,vo="['’]",Vo="["+wi+"]",qo="["+$s+"]",io="["+Xr+"]",Ms="\\d+",ua="["+mo+"]",Ko="["+zo+"]",Go="[^"+wi+$s+Ms+mo+zo+Uo+"]",Es="\\ud83c[\\udffb-\\udfff]",Yo="(?:"+io+"|"+Es+")",yo="[^"+wi+"]",xi="(?:\\ud83c[\\udde6-\\uddff]){2}",hr="[\\ud800-\\udbff][\\udc00-\\udfff]",oo="["+Uo+"]",Vi="\\u200d",ha="(?:"+Ko+"|"+Go+")",Za="(?:"+oo+"|"+Go+")",bo="(?:"+vo+"(?:d|ll|m|re|s|t|ve))?",qi="(?:"+vo+"(?:D|LL|M|RE|S|T|VE))?",wo=Yo+"?",Xo="["+ur+"]?",xo="(?:"+Vi+"(?:"+[yo,xi,hr].join("|")+")"+Xo+wo+")*",da="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",so="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",je=Xo+wo+xo,fa="(?:"+[ua,xi,hr].join("|")+")"+je,De="(?:"+[yo+io+"?",io,xi,hr,Vo].join("|")+")",On=RegExp(vo,"g"),Co=RegExp(io,"g"),li=RegExp(Es+"(?="+Es+")|"+De+je,"g"),Qn=RegExp([oo+"?"+Ko+"+"+bo+"(?="+[qo,oo,"$"].join("|")+")",Za+"+"+qi+"(?="+[qo,oo+ha,"$"].join("|")+")",oo+"?"+ha+"+"+bo,oo+"+"+qi,so,da,Ms,fa].join("|"),"g"),pa=RegExp("["+Vi+wi+Xr+ur+"]"),ko=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ci=["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,an={};an[vt]=an[Tt]=an[At]=an[Pt]=an[Nt]=an[pt]=an[kt]=an[$n]=an[$r]=!0,an[ue]=an[ce]=an[Ve]=an[Te]=an[Je]=an[$e]=an[Ze]=an[Xe]=an[at]=an[mt]=an[bn]=an[wn]=an[Fn]=an[Pn]=an[Ke]=!1;var nn={};nn[ue]=nn[ce]=nn[Ve]=nn[Je]=nn[Te]=nn[$e]=nn[vt]=nn[Tt]=nn[At]=nn[Pt]=nn[Nt]=nn[at]=nn[mt]=nn[bn]=nn[wn]=nn[Fn]=nn[Pn]=nn[nr]=nn[pt]=nn[kt]=nn[$n]=nn[$r]=!0,nn[Ze]=nn[Xe]=nn[Ke]=!1;var ln={À:"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"},Gt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ki={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Wn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,Cn=parseInt,_t=typeof Fo=="object"&&Fo&&Fo.Object===Object&&Fo,Pr=typeof self=="object"&&self&&self.Object===Object&&self,fn=_t||Pr||Function("return this")(),An=e&&!e.nodeType&&e,rr=An&&!0&&t&&!t.nodeType&&t,Br=rr&&rr.exports===An,_i=Br&&_t.process,jn=function(){try{var fe=rr&&rr.require&&rr.require("util").types;return fe||_i&&_i.binding&&_i.binding("util")}catch{}}(),Zr=jn&&jn.isArrayBuffer,Qo=jn&&jn.isDate,zn=jn&&jn.isMap,ci=jn&&jn.isRegExp,ui=jn&&jn.isSet,Si=jn&&jn.isTypedArray;function pr(fe,_e,xe){switch(xe.length){case 0:return fe.call(_e);case 1:return fe.call(_e,xe[0]);case 2:return fe.call(_e,xe[0],xe[1]);case 3:return fe.call(_e,xe[0],xe[1],xe[2])}return fe.apply(_e,xe)}function gr(fe,_e,xe,qe){for(var ft=-1,Dt=fe==null?0:fe.length;++ft<Dt;){var en=fe[ft];_e(qe,en,xe(en),fe)}return qe}function Cr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe&&_e(fe[xe],xe,fe)!==!1;);return fe}function Is(fe,_e){for(var xe=fe==null?0:fe.length;xe--&&_e(fe[xe],xe,fe)!==!1;);return fe}function kr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe;)if(!_e(fe[xe],xe,fe))return!1;return!0}function Rr(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length,ft=0,Dt=[];++xe<qe;){var en=fe[xe];_e(en,xe,fe)&&(Dt[ft++]=en)}return Dt}function hi(fe,_e){var xe=fe==null?0:fe.length;return!!xe&&se(fe,_e,0)>-1}function di(fe,_e,xe){for(var qe=-1,ft=fe==null?0:fe.length;++qe<ft;)if(xe(_e,fe[qe]))return!0;return!1}function y(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length,ft=Array(qe);++xe<qe;)ft[xe]=_e(fe[xe],xe,fe);return ft}function $(fe,_e){for(var xe=-1,qe=_e.length,ft=fe.length;++xe<qe;)fe[ft+xe]=_e[xe];return fe}function _(fe,_e,xe,qe){var ft=-1,Dt=fe==null?0:fe.length;for(qe&&Dt&&(xe=fe[++ft]);++ft<Dt;)xe=_e(xe,fe[ft],ft,fe);return xe}function N(fe,_e,xe,qe){var ft=fe==null?0:fe.length;for(qe&&ft&&(xe=fe[--ft]);ft--;)xe=_e(xe,fe[ft],ft,fe);return xe}function B(fe,_e){for(var xe=-1,qe=fe==null?0:fe.length;++xe<qe;)if(_e(fe[xe],xe,fe))return!0;return!1}var j=be("length");function q(fe){return fe.split("")}function Y(fe){return fe.match(la)||[]}function Q(fe,_e,xe){var qe;return xe(fe,function(ft,Dt,en){if(_e(ft,Dt,en))return qe=Dt,!1}),qe}function re(fe,_e,xe,qe){for(var ft=fe.length,Dt=xe+(qe?1:-1);qe?Dt--:++Dt<ft;)if(_e(fe[Dt],Dt,fe))return Dt;return-1}function se(fe,_e,xe){return _e===_e?nt(fe,_e,xe):re(fe,Ce,xe)}function ye(fe,_e,xe,qe){for(var ft=xe-1,Dt=fe.length;++ft<Dt;)if(qe(fe[ft],_e))return ft;return-1}function Ce(fe){return fe!==fe}function me(fe,_e){var xe=fe==null?0:fe.length;return xe?ht(fe,_e)/xe:Z}function be(fe){return function(_e){return _e==null?n:_e[fe]}}function Oe(fe){return function(_e){return fe==null?n:fe[_e]}}function Re(fe,_e,xe,qe,ft){return ft(fe,function(Dt,en,Bt){xe=qe?(qe=!1,Dt):_e(xe,Dt,en,Bt)}),xe}function Ge(fe,_e){var xe=fe.length;for(fe.sort(_e);xe--;)fe[xe]=fe[xe].value;return fe}function ht(fe,_e){for(var xe,qe=-1,ft=fe.length;++qe<ft;){var Dt=_e(fe[qe]);Dt!==n&&(xe=xe===n?Dt:xe+Dt)}return xe}function tt(fe,_e){for(var xe=-1,qe=Array(fe);++xe<fe;)qe[xe]=_e(xe);return qe}function st(fe,_e){return y(_e,function(xe){return[xe,fe[xe]]})}function kn(fe){return fe&&fe.slice(0,jt(fe)+1).replace(Rn,"")}function dt(fe){return function(_e){return fe(_e)}}function Mn(fe,_e){return y(_e,function(xe){return fe[xe]})}function $t(fe,_e){return fe.has(_e)}function Ot(fe,_e){for(var xe=-1,qe=fe.length;++xe<qe&&se(_e,fe[xe],0)>-1;);return xe}function ir(fe,_e){for(var xe=fe.length;xe--&&se(_e,fe[xe],0)>-1;);return xe}function mr(fe,_e){for(var xe=fe.length,qe=0;xe--;)fe[xe]===_e&&++qe;return qe}var En=Oe(ln),V=Oe(Gt);function X(fe){return"\\"+Wn[fe]}function ie(fe,_e){return fe==null?n:fe[_e]}function oe(fe){return pa.test(fe)}function pe(fe){return ko.test(fe)}function we(fe){for(var _e,xe=[];!(_e=fe.next()).done;)xe.push(_e.value);return xe}function Me(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe,ft){xe[++_e]=[ft,qe]}),xe}function Be(fe,_e){return function(xe){return fe(_e(xe))}}function ze(fe,_e){for(var xe=-1,qe=fe.length,ft=0,Dt=[];++xe<qe;){var en=fe[xe];(en===_e||en===s)&&(fe[xe]=s,Dt[ft++]=xe)}return Dt}function Ye(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe){xe[++_e]=qe}),xe}function et(fe){var _e=-1,xe=Array(fe.size);return fe.forEach(function(qe){xe[++_e]=[qe,qe]}),xe}function nt(fe,_e,xe){for(var qe=xe-1,ft=fe.length;++qe<ft;)if(fe[qe]===_e)return qe;return-1}function St(fe,_e,xe){for(var qe=xe+1;qe--;)if(fe[qe]===_e)return qe;return qe}function Ut(fe){return oe(fe)?ut(fe):j(fe)}function Mt(fe){return oe(fe)?vn(fe):q(fe)}function jt(fe){for(var _e=fe.length;_e--&&Er.test(fe.charAt(_e)););return _e}var yt=Oe(ki);function ut(fe){for(var _e=li.lastIndex=0;li.test(fe);)++_e;return _e}function vn(fe){return fe.match(li)||[]}function In(fe){return fe.match(Qn)||[]}var or=function fe(_e){_e=_e==null?fn:Qt.defaults(fn.Object(),_e,Qt.pick(fn,Ci));var xe=_e.Array,qe=_e.Date,ft=_e.Error,Dt=_e.Function,en=_e.Math,Bt=_e.Object,Wr=_e.RegExp,Ai=_e.String,pn=_e.TypeError,vr=xe.prototype,_o=Dt.prototype,Hn=Bt.prototype,Ls=_e["__core-js_shared__"],xc=_o.toString,dn=Hn.hasOwnProperty,HE=0,c0=function(){var i=/[^.]+$/.exec(Ls&&Ls.keys&&Ls.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Cc=Hn.toString,UE=xc.call(Bt),VE=fn._,qE=Wr("^"+xc.call(dn).replace(Mr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kc=Br?_e.Buffer:n,Zo=_e.Symbol,_c=_e.Uint8Array,u0=kc?kc.allocUnsafe:n,Sc=Be(Bt.getPrototypeOf,Bt),h0=Bt.create,d0=Hn.propertyIsEnumerable,Ac=vr.splice,f0=Zo?Zo.isConcatSpreadable:n,Ja=Zo?Zo.iterator:n,Rs=Zo?Zo.toStringTag:n,Tc=function(){try{var i=Ps(Bt,"defineProperty");return i({},"",{}),i}catch{}}(),KE=_e.clearTimeout!==fn.clearTimeout&&_e.clearTimeout,GE=qe&&qe.now!==fn.Date.now&&qe.now,YE=_e.setTimeout!==fn.setTimeout&&_e.setTimeout,$c=en.ceil,Mc=en.floor,bd=Bt.getOwnPropertySymbols,XE=kc?kc.isBuffer:n,p0=_e.isFinite,QE=vr.join,ZE=Be(Bt.keys,Bt),dr=en.max,Or=en.min,JE=qe.now,eI=_e.parseInt,g0=en.random,tI=vr.reverse,wd=Ps(_e,"DataView"),el=Ps(_e,"Map"),xd=Ps(_e,"Promise"),ga=Ps(_e,"Set"),tl=Ps(_e,"WeakMap"),nl=Ps(Bt,"create"),Ec=tl&&new tl,ma={},nI=Bs(wd),rI=Bs(el),iI=Bs(xd),oI=Bs(ga),sI=Bs(tl),Ic=Zo?Zo.prototype:n,rl=Ic?Ic.valueOf:n,m0=Ic?Ic.toString:n;function J(i){if(Un(i)&&!It(i)&&!(i instanceof Yt)){if(i instanceof Ti)return i;if(dn.call(i,"__wrapped__"))return vb(i)}return new Ti(i)}var va=function(){function i(){}return function(v){if(!Dn(v))return{};if(h0)return h0(v);i.prototype=v;var M=new i;return i.prototype=n,M}}();function Lc(){}function Ti(i,v){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=n}J.templateSettings={escape:si,evaluate:Ya,interpolate:ks,variable:"",imports:{_:J}},J.prototype=Lc.prototype,J.prototype.constructor=J,Ti.prototype=va(Lc.prototype),Ti.prototype.constructor=Ti;function Yt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function aI(){var i=new Yt(this.__wrapped__);return i.__actions__=Jr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Jr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Jr(this.__views__),i}function lI(){if(this.__filtered__){var i=new Yt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function cI(){var i=this.__wrapped__.value(),v=this.__dir__,M=It(i),z=v<0,G=M?i.length:0,ee=xL(0,G,this.__views__),le=ee.start,de=ee.end,ve=de-le,Ie=z?de:le-1,Le=this.__iteratees__,Ne=Le.length,Qe=0,ct=Or(ve,this.__takeCount__);if(!M||!z&&G==ve&&ct==ve)return W0(i,this.__actions__);var wt=[];e:for(;ve--&&Qe<ct;){Ie+=v;for(var Wt=-1,xt=i[Ie];++Wt<Ne;){var Vt=Le[Wt],Zt=Vt.iteratee,gi=Vt.type,Hr=Zt(xt);if(gi==S)xt=Hr;else if(!Hr){if(gi==A)continue e;break e}}wt[Qe++]=xt}return wt}Yt.prototype=va(Lc.prototype),Yt.prototype.constructor=Yt;function Os(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function uI(){this.__data__=nl?nl(null):{},this.size=0}function hI(i){var v=this.has(i)&&delete this.__data__[i];return this.size-=v?1:0,v}function dI(i){var v=this.__data__;if(nl){var M=v[i];return M===h?n:M}return dn.call(v,i)?v[i]:n}function fI(i){var v=this.__data__;return nl?v[i]!==n:dn.call(v,i)}function pI(i,v){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=nl&&v===n?h:v,this}Os.prototype.clear=uI,Os.prototype.delete=hI,Os.prototype.get=dI,Os.prototype.has=fI,Os.prototype.set=pI;function So(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function gI(){this.__data__=[],this.size=0}function mI(i){var v=this.__data__,M=Rc(v,i);if(M<0)return!1;var z=v.length-1;return M==z?v.pop():Ac.call(v,M,1),--this.size,!0}function vI(i){var v=this.__data__,M=Rc(v,i);return M<0?n:v[M][1]}function yI(i){return Rc(this.__data__,i)>-1}function bI(i,v){var M=this.__data__,z=Rc(M,i);return z<0?(++this.size,M.push([i,v])):M[z][1]=v,this}So.prototype.clear=gI,So.prototype.delete=mI,So.prototype.get=vI,So.prototype.has=yI,So.prototype.set=bI;function Ao(i){var v=-1,M=i==null?0:i.length;for(this.clear();++v<M;){var z=i[v];this.set(z[0],z[1])}}function wI(){this.size=0,this.__data__={hash:new Os,map:new(el||So),string:new Os}}function xI(i){var v=Vc(this,i).delete(i);return this.size-=v?1:0,v}function CI(i){return Vc(this,i).get(i)}function kI(i){return Vc(this,i).has(i)}function _I(i,v){var M=Vc(this,i),z=M.size;return M.set(i,v),this.size+=M.size==z?0:1,this}Ao.prototype.clear=wI,Ao.prototype.delete=xI,Ao.prototype.get=CI,Ao.prototype.has=kI,Ao.prototype.set=_I;function Ds(i){var v=-1,M=i==null?0:i.length;for(this.__data__=new Ao;++v<M;)this.add(i[v])}function SI(i){return this.__data__.set(i,h),this}function AI(i){return this.__data__.has(i)}Ds.prototype.add=Ds.prototype.push=SI,Ds.prototype.has=AI;function Ki(i){var v=this.__data__=new So(i);this.size=v.size}function TI(){this.__data__=new So,this.size=0}function $I(i){var v=this.__data__,M=v.delete(i);return this.size=v.size,M}function MI(i){return this.__data__.get(i)}function EI(i){return this.__data__.has(i)}function II(i,v){var M=this.__data__;if(M instanceof So){var z=M.__data__;if(!el||z.length<f-1)return z.push([i,v]),this.size=++M.size,this;M=this.__data__=new Ao(z)}return M.set(i,v),this.size=M.size,this}Ki.prototype.clear=TI,Ki.prototype.delete=$I,Ki.prototype.get=MI,Ki.prototype.has=EI,Ki.prototype.set=II;function v0(i,v){var M=It(i),z=!M&&Ws(i),G=!M&&!z&&rs(i),ee=!M&&!z&&!G&&xa(i),le=M||z||G||ee,de=le?tt(i.length,Ai):[],ve=de.length;for(var Ie in i)(v||dn.call(i,Ie))&&!(le&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Eo(Ie,ve)))&&de.push(Ie);return de}function y0(i){var v=i.length;return v?i[Ld(0,v-1)]:n}function LI(i,v){return qc(Jr(i),Ns(v,0,i.length))}function RI(i){return qc(Jr(i))}function Cd(i,v,M){(M!==n&&!Gi(i[v],M)||M===n&&!(v in i))&&To(i,v,M)}function il(i,v,M){var z=i[v];(!(dn.call(i,v)&&Gi(z,M))||M===n&&!(v in i))&&To(i,v,M)}function Rc(i,v){for(var M=i.length;M--;)if(Gi(i[M][0],v))return M;return-1}function OI(i,v,M,z){return Jo(i,function(G,ee,le){v(z,G,M(G),le)}),z}function b0(i,v){return i&&co(v,yr(v),i)}function DI(i,v){return i&&co(v,ti(v),i)}function To(i,v,M){v=="__proto__"&&Tc?Tc(i,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[v]=M}function kd(i,v){for(var M=-1,z=v.length,G=xe(z),ee=i==null;++M<z;)G[M]=ee?n:rf(i,v[M]);return G}function Ns(i,v,M){return i===i&&(M!==n&&(i=i<=M?i:M),v!==n&&(i=i>=v?i:v)),i}function $i(i,v,M,z,G,ee){var le,de=v&a,ve=v&c,Ie=v&l;if(M&&(le=G?M(i,z,G,ee):M(i)),le!==n)return le;if(!Dn(i))return i;var Le=It(i);if(Le){if(le=kL(i),!de)return Jr(i,le)}else{var Ne=Dr(i),Qe=Ne==Xe||Ne==gt;if(rs(i))return H0(i,de);if(Ne==bn||Ne==ue||Qe&&!G){if(le=ve||Qe?{}:lb(i),!de)return ve?dL(i,DI(le,i)):hL(i,b0(le,i))}else{if(!nn[Ne])return G?i:{};le=_L(i,Ne,de)}}ee||(ee=new Ki);var ct=ee.get(i);if(ct)return ct;ee.set(i,le),Fb(i)?i.forEach(function(xt){le.add($i(xt,v,M,xt,i,ee))}):Db(i)&&i.forEach(function(xt,Vt){le.set(Vt,$i(xt,v,M,Vt,i,ee))});var wt=Ie?ve?Hd:zd:ve?ti:yr,Wt=Le?n:wt(i);return Cr(Wt||i,function(xt,Vt){Wt&&(Vt=xt,xt=i[Vt]),il(le,Vt,$i(xt,v,M,Vt,i,ee))}),le}function NI(i){var v=yr(i);return function(M){return w0(M,i,v)}}function w0(i,v,M){var z=M.length;if(i==null)return!z;for(i=Bt(i);z--;){var G=M[z],ee=v[G],le=i[G];if(le===n&&!(G in i)||!ee(le))return!1}return!0}function x0(i,v,M){if(typeof i!="function")throw new pn(p);return hl(function(){i.apply(n,M)},v)}function ol(i,v,M,z){var G=-1,ee=hi,le=!0,de=i.length,ve=[],Ie=v.length;if(!de)return ve;M&&(v=y(v,dt(M))),z?(ee=di,le=!1):v.length>=f&&(ee=$t,le=!1,v=new Ds(v));e:for(;++G<de;){var Le=i[G],Ne=M==null?Le:M(Le);if(Le=z||Le!==0?Le:0,le&&Ne===Ne){for(var Qe=Ie;Qe--;)if(v[Qe]===Ne)continue e;ve.push(Le)}else ee(v,Ne,z)||ve.push(Le)}return ve}var Jo=G0(lo),C0=G0(Sd,!0);function FI(i,v){var M=!0;return Jo(i,function(z,G,ee){return M=!!v(z,G,ee),M}),M}function Oc(i,v,M){for(var z=-1,G=i.length;++z<G;){var ee=i[z],le=v(ee);if(le!=null&&(de===n?le===le&&!pi(le):M(le,de)))var de=le,ve=ee}return ve}function PI(i,v,M,z){var G=i.length;for(M=Ft(M),M<0&&(M=-M>G?0:G+M),z=z===n||z>G?G:Ft(z),z<0&&(z+=G),z=M>z?0:Bb(z);M<z;)i[M++]=v;return i}function k0(i,v){var M=[];return Jo(i,function(z,G,ee){v(z,G,ee)&&M.push(z)}),M}function _r(i,v,M,z,G){var ee=-1,le=i.length;for(M||(M=AL),G||(G=[]);++ee<le;){var de=i[ee];v>0&&M(de)?v>1?_r(de,v-1,M,z,G):$(G,de):z||(G[G.length]=de)}return G}var _d=Y0(),_0=Y0(!0);function lo(i,v){return i&&_d(i,v,yr)}function Sd(i,v){return i&&_0(i,v,yr)}function Dc(i,v){return Rr(v,function(M){return Io(i[M])})}function Fs(i,v){v=ts(v,i);for(var M=0,z=v.length;i!=null&&M<z;)i=i[uo(v[M++])];return M&&M==z?i:n}function S0(i,v,M){var z=v(i);return It(i)?z:$(z,M(i))}function jr(i){return i==null?i===n?Ct:sn:Rs&&Rs in Bt(i)?wL(i):RL(i)}function Ad(i,v){return i>v}function BI(i,v){return i!=null&&dn.call(i,v)}function WI(i,v){return i!=null&&v in Bt(i)}function jI(i,v,M){return i>=Or(v,M)&&i<dr(v,M)}function Td(i,v,M){for(var z=M?di:hi,G=i[0].length,ee=i.length,le=ee,de=xe(ee),ve=1/0,Ie=[];le--;){var Le=i[le];le&&v&&(Le=y(Le,dt(v))),ve=Or(Le.length,ve),de[le]=!M&&(v||G>=120&&Le.length>=120)?new Ds(le&&Le):n}Le=i[0];var Ne=-1,Qe=de[0];e:for(;++Ne<G&&Ie.length<ve;){var ct=Le[Ne],wt=v?v(ct):ct;if(ct=M||ct!==0?ct:0,!(Qe?$t(Qe,wt):z(Ie,wt,M))){for(le=ee;--le;){var Wt=de[le];if(!(Wt?$t(Wt,wt):z(i[le],wt,M)))continue e}Qe&&Qe.push(wt),Ie.push(ct)}}return Ie}function zI(i,v,M,z){return lo(i,function(G,ee,le){v(z,M(G),ee,le)}),z}function sl(i,v,M){v=ts(v,i),i=db(i,v);var z=i==null?i:i[uo(Ei(v))];return z==null?n:pr(z,i,M)}function A0(i){return Un(i)&&jr(i)==ue}function HI(i){return Un(i)&&jr(i)==Ve}function UI(i){return Un(i)&&jr(i)==$e}function al(i,v,M,z,G){return i===v?!0:i==null||v==null||!Un(i)&&!Un(v)?i!==i&&v!==v:VI(i,v,M,z,al,G)}function VI(i,v,M,z,G,ee){var le=It(i),de=It(v),ve=le?ce:Dr(i),Ie=de?ce:Dr(v);ve=ve==ue?bn:ve,Ie=Ie==ue?bn:Ie;var Le=ve==bn,Ne=Ie==bn,Qe=ve==Ie;if(Qe&&rs(i)){if(!rs(v))return!1;le=!0,Le=!1}if(Qe&&!Le)return ee||(ee=new Ki),le||xa(i)?ob(i,v,M,z,G,ee):yL(i,v,ve,M,z,G,ee);if(!(M&o)){var ct=Le&&dn.call(i,"__wrapped__"),wt=Ne&&dn.call(v,"__wrapped__");if(ct||wt){var Wt=ct?i.value():i,xt=wt?v.value():v;return ee||(ee=new Ki),G(Wt,xt,M,z,ee)}}return Qe?(ee||(ee=new Ki),bL(i,v,M,z,G,ee)):!1}function qI(i){return Un(i)&&Dr(i)==at}function $d(i,v,M,z){var G=M.length,ee=G,le=!z;if(i==null)return!ee;for(i=Bt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var ve=de[0],Ie=i[ve],Le=de[1];if(le&&de[2]){if(Ie===n&&!(ve in i))return!1}else{var Ne=new Ki;if(z)var Qe=z(Ie,Le,ve,i,v,Ne);if(!(Qe===n?al(Le,Ie,o|u,z,Ne):Qe))return!1}}return!0}function T0(i){if(!Dn(i)||$L(i))return!1;var v=Io(i)?qE:Ir;return v.test(Bs(i))}function KI(i){return Un(i)&&jr(i)==wn}function GI(i){return Un(i)&&Dr(i)==Fn}function YI(i){return Un(i)&&Zc(i.length)&&!!an[jr(i)]}function $0(i){return typeof i=="function"?i:i==null?ni:typeof i=="object"?It(i)?I0(i[0],i[1]):E0(i):Xb(i)}function Md(i){if(!ul(i))return ZE(i);var v=[];for(var M in Bt(i))dn.call(i,M)&&M!="constructor"&&v.push(M);return v}function XI(i){if(!Dn(i))return LL(i);var v=ul(i),M=[];for(var z in i)z=="constructor"&&(v||!dn.call(i,z))||M.push(z);return M}function Ed(i,v){return i<v}function M0(i,v){var M=-1,z=ei(i)?xe(i.length):[];return Jo(i,function(G,ee,le){z[++M]=v(G,ee,le)}),z}function E0(i){var v=Vd(i);return v.length==1&&v[0][2]?ub(v[0][0],v[0][1]):function(M){return M===i||$d(M,i,v)}}function I0(i,v){return Kd(i)&&cb(v)?ub(uo(i),v):function(M){var z=rf(M,i);return z===n&&z===v?of(M,i):al(v,z,o|u)}}function Nc(i,v,M,z,G){i!==v&&_d(v,function(ee,le){if(G||(G=new Ki),Dn(ee))QI(i,v,le,M,Nc,z,G);else{var de=z?z(Yd(i,le),ee,le+"",i,v,G):n;de===n&&(de=ee),Cd(i,le,de)}},ti)}function QI(i,v,M,z,G,ee,le){var de=Yd(i,M),ve=Yd(v,M),Ie=le.get(ve);if(Ie){Cd(i,M,Ie);return}var Le=ee?ee(de,ve,M+"",i,v,le):n,Ne=Le===n;if(Ne){var Qe=It(ve),ct=!Qe&&rs(ve),wt=!Qe&&!ct&&xa(ve);Le=ve,Qe||ct||wt?It(de)?Le=de:Zn(de)?Le=Jr(de):ct?(Ne=!1,Le=H0(ve,!0)):wt?(Ne=!1,Le=U0(ve,!0)):Le=[]:dl(ve)||Ws(ve)?(Le=de,Ws(de)?Le=Wb(de):(!Dn(de)||Io(de))&&(Le=lb(ve))):Ne=!1}Ne&&(le.set(ve,Le),G(Le,ve,z,ee,le),le.delete(ve)),Cd(i,M,Le)}function L0(i,v){var M=i.length;if(M)return v+=v<0?M:0,Eo(v,M)?i[v]:n}function R0(i,v,M){v.length?v=y(v,function(ee){return It(ee)?function(le){return Fs(le,ee.length===1?ee[0]:ee)}:ee}):v=[ni];var z=-1;v=y(v,dt(bt()));var G=M0(i,function(ee,le,de){var ve=y(v,function(Ie){return Ie(ee)});return{criteria:ve,index:++z,value:ee}});return Ge(G,function(ee,le){return uL(ee,le,M)})}function ZI(i,v){return O0(i,v,function(M,z){return of(i,z)})}function O0(i,v,M){for(var z=-1,G=v.length,ee={};++z<G;){var le=v[z],de=Fs(i,le);M(de,le)&&ll(ee,ts(le,i),de)}return ee}function JI(i){return function(v){return Fs(v,i)}}function Id(i,v,M,z){var G=z?ye:se,ee=-1,le=v.length,de=i;for(i===v&&(v=Jr(v)),M&&(de=y(i,dt(M)));++ee<le;)for(var ve=0,Ie=v[ee],Le=M?M(Ie):Ie;(ve=G(de,Le,ve,z))>-1;)de!==i&&Ac.call(de,ve,1),Ac.call(i,ve,1);return i}function D0(i,v){for(var M=i?v.length:0,z=M-1;M--;){var G=v[M];if(M==z||G!==ee){var ee=G;Eo(G)?Ac.call(i,G,1):Dd(i,G)}}return i}function Ld(i,v){return i+Mc(g0()*(v-i+1))}function eL(i,v,M,z){for(var G=-1,ee=dr($c((v-i)/(M||1)),0),le=xe(ee);ee--;)le[z?ee:++G]=i,i+=M;return le}function Rd(i,v){var M="";if(!i||v<1||v>U)return M;do v%2&&(M+=i),v=Mc(v/2),v&&(i+=i);while(v);return M}function zt(i,v){return Xd(hb(i,v,ni),i+"")}function tL(i){return y0(Ca(i))}function nL(i,v){var M=Ca(i);return qc(M,Ns(v,0,M.length))}function ll(i,v,M,z){if(!Dn(i))return i;v=ts(v,i);for(var G=-1,ee=v.length,le=ee-1,de=i;de!=null&&++G<ee;){var ve=uo(v[G]),Ie=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(G!=le){var Le=de[ve];Ie=z?z(Le,ve,de):n,Ie===n&&(Ie=Dn(Le)?Le:Eo(v[G+1])?[]:{})}il(de,ve,Ie),de=de[ve]}return i}var N0=Ec?function(i,v){return Ec.set(i,v),i}:ni,rL=Tc?function(i,v){return Tc(i,"toString",{configurable:!0,enumerable:!1,value:af(v),writable:!0})}:ni;function iL(i){return qc(Ca(i))}function Mi(i,v,M){var z=-1,G=i.length;v<0&&(v=-v>G?0:G+v),M=M>G?G:M,M<0&&(M+=G),G=v>M?0:M-v>>>0,v>>>=0;for(var ee=xe(G);++z<G;)ee[z]=i[z+v];return ee}function oL(i,v){var M;return Jo(i,function(z,G,ee){return M=v(z,G,ee),!M}),!!M}function Fc(i,v,M){var z=0,G=i==null?z:i.length;if(typeof v=="number"&&v===v&&G<=ne){for(;z<G;){var ee=z+G>>>1,le=i[ee];le!==null&&!pi(le)&&(M?le<=v:le<v)?z=ee+1:G=ee}return G}return Od(i,v,ni,M)}function Od(i,v,M,z){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;v=M(v);for(var le=v!==v,de=v===null,ve=pi(v),Ie=v===n;G<ee;){var Le=Mc((G+ee)/2),Ne=M(i[Le]),Qe=Ne!==n,ct=Ne===null,wt=Ne===Ne,Wt=pi(Ne);if(le)var xt=z||wt;else Ie?xt=wt&&(z||Qe):de?xt=wt&&Qe&&(z||!ct):ve?xt=wt&&Qe&&!ct&&(z||!Wt):ct||Wt?xt=!1:xt=z?Ne<=v:Ne<v;xt?G=Le+1:ee=Le}return Or(ee,he)}function F0(i,v){for(var M=-1,z=i.length,G=0,ee=[];++M<z;){var le=i[M],de=v?v(le):le;if(!M||!Gi(de,ve)){var ve=de;ee[G++]=le===0?0:le}}return ee}function P0(i){return typeof i=="number"?i:pi(i)?Z:+i}function fi(i){if(typeof i=="string")return i;if(It(i))return y(i,fi)+"";if(pi(i))return m0?m0.call(i):"";var v=i+"";return v=="0"&&1/i==-1/0?"-0":v}function es(i,v,M){var z=-1,G=hi,ee=i.length,le=!0,de=[],ve=de;if(M)le=!1,G=di;else if(ee>=f){var Ie=v?null:mL(i);if(Ie)return Ye(Ie);le=!1,G=$t,ve=new Ds}else ve=v?[]:de;e:for(;++z<ee;){var Le=i[z],Ne=v?v(Le):Le;if(Le=M||Le!==0?Le:0,le&&Ne===Ne){for(var Qe=ve.length;Qe--;)if(ve[Qe]===Ne)continue e;v&&ve.push(Ne),de.push(Le)}else G(ve,Ne,M)||(ve!==de&&ve.push(Ne),de.push(Le))}return de}function Dd(i,v){return v=ts(v,i),i=db(i,v),i==null||delete i[uo(Ei(v))]}function B0(i,v,M,z){return ll(i,v,M(Fs(i,v)),z)}function Pc(i,v,M,z){for(var G=i.length,ee=z?G:-1;(z?ee--:++ee<G)&&v(i[ee],ee,i););return M?Mi(i,z?0:ee,z?ee+1:G):Mi(i,z?ee+1:0,z?G:ee)}function W0(i,v){var M=i;return M instanceof Yt&&(M=M.value()),_(v,function(z,G){return G.func.apply(G.thisArg,$([z],G.args))},M)}function Nd(i,v,M){var z=i.length;if(z<2)return z?es(i[0]):[];for(var G=-1,ee=xe(z);++G<z;)for(var le=i[G],de=-1;++de<z;)de!=G&&(ee[G]=ol(ee[G]||le,i[de],v,M));return es(_r(ee,1),v,M)}function j0(i,v,M){for(var z=-1,G=i.length,ee=v.length,le={};++z<G;){var de=z<ee?v[z]:n;M(le,i[z],de)}return le}function Fd(i){return Zn(i)?i:[]}function Pd(i){return typeof i=="function"?i:ni}function ts(i,v){return It(i)?i:Kd(i,v)?[i]:mb(un(i))}var sL=zt;function ns(i,v,M){var z=i.length;return M=M===n?z:M,!v&&M>=z?i:Mi(i,v,M)}var z0=KE||function(i){return fn.clearTimeout(i)};function H0(i,v){if(v)return i.slice();var M=i.length,z=u0?u0(M):new i.constructor(M);return i.copy(z),z}function Bd(i){var v=new i.constructor(i.byteLength);return new _c(v).set(new _c(i)),v}function aL(i,v){var M=v?Bd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function lL(i){var v=new i.constructor(i.source,ai.exec(i));return v.lastIndex=i.lastIndex,v}function cL(i){return rl?Bt(rl.call(i)):{}}function U0(i,v){var M=v?Bd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function V0(i,v){if(i!==v){var M=i!==n,z=i===null,G=i===i,ee=pi(i),le=v!==n,de=v===null,ve=v===v,Ie=pi(v);if(!de&&!Ie&&!ee&&i>v||ee&&le&&ve&&!de&&!Ie||z&&le&&ve||!M&&ve||!G)return 1;if(!z&&!ee&&!Ie&&i<v||Ie&&M&&G&&!z&&!ee||de&&M&&G||!le&&G||!ve)return-1}return 0}function uL(i,v,M){for(var z=-1,G=i.criteria,ee=v.criteria,le=G.length,de=M.length;++z<le;){var ve=V0(G[z],ee[z]);if(ve){if(z>=de)return ve;var Ie=M[z];return ve*(Ie=="desc"?-1:1)}}return i.index-v.index}function q0(i,v,M,z){for(var G=-1,ee=i.length,le=M.length,de=-1,ve=v.length,Ie=dr(ee-le,0),Le=xe(ve+Ie),Ne=!z;++de<ve;)Le[de]=v[de];for(;++G<le;)(Ne||G<ee)&&(Le[M[G]]=i[G]);for(;Ie--;)Le[de++]=i[G++];return Le}function K0(i,v,M,z){for(var G=-1,ee=i.length,le=-1,de=M.length,ve=-1,Ie=v.length,Le=dr(ee-de,0),Ne=xe(Le+Ie),Qe=!z;++G<Le;)Ne[G]=i[G];for(var ct=G;++ve<Ie;)Ne[ct+ve]=v[ve];for(;++le<de;)(Qe||G<ee)&&(Ne[ct+M[le]]=i[G++]);return Ne}function Jr(i,v){var M=-1,z=i.length;for(v||(v=xe(z));++M<z;)v[M]=i[M];return v}function co(i,v,M,z){var G=!M;M||(M={});for(var ee=-1,le=v.length;++ee<le;){var de=v[ee],ve=z?z(M[de],i[de],de,M,i):n;ve===n&&(ve=i[de]),G?To(M,de,ve):il(M,de,ve)}return M}function hL(i,v){return co(i,qd(i),v)}function dL(i,v){return co(i,sb(i),v)}function Bc(i,v){return function(M,z){var G=It(M)?gr:OI,ee=v?v():{};return G(M,i,bt(z,2),ee)}}function ya(i){return zt(function(v,M){var z=-1,G=M.length,ee=G>1?M[G-1]:n,le=G>2?M[2]:n;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):n,le&&zr(M[0],M[1],le)&&(ee=G<3?n:ee,G=1),v=Bt(v);++z<G;){var de=M[z];de&&i(v,de,z,ee)}return v})}function G0(i,v){return function(M,z){if(M==null)return M;if(!ei(M))return i(M,z);for(var G=M.length,ee=v?G:-1,le=Bt(M);(v?ee--:++ee<G)&&z(le[ee],ee,le)!==!1;);return M}}function Y0(i){return function(v,M,z){for(var G=-1,ee=Bt(v),le=z(v),de=le.length;de--;){var ve=le[i?de:++G];if(M(ee[ve],ve,ee)===!1)break}return v}}function fL(i,v,M){var z=v&m,G=cl(i);function ee(){var le=this&&this!==fn&&this instanceof ee?G:i;return le.apply(z?M:this,arguments)}return ee}function X0(i){return function(v){v=un(v);var M=oe(v)?Mt(v):n,z=M?M[0]:v.charAt(0),G=M?ns(M,1).join(""):v.slice(1);return z[i]()+G}}function ba(i){return function(v){return _(Gb(Kb(v).replace(On,"")),i,"")}}function cl(i){return function(){var v=arguments;switch(v.length){case 0:return new i;case 1:return new i(v[0]);case 2:return new i(v[0],v[1]);case 3:return new i(v[0],v[1],v[2]);case 4:return new i(v[0],v[1],v[2],v[3]);case 5:return new i(v[0],v[1],v[2],v[3],v[4]);case 6:return new i(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new i(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=va(i.prototype),z=i.apply(M,v);return Dn(z)?z:M}}function pL(i,v,M){var z=cl(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,ve=wa(G);de--;)le[de]=arguments[de];var Ie=ee<3&&le[0]!==ve&&le[ee-1]!==ve?[]:ze(le,ve);if(ee-=Ie.length,ee<M)return tb(i,v,Wc,G.placeholder,n,le,Ie,n,n,M-ee);var Le=this&&this!==fn&&this instanceof G?z:i;return pr(Le,this,le)}return G}function Q0(i){return function(v,M,z){var G=Bt(v);if(!ei(v)){var ee=bt(M,3);v=yr(v),M=function(de){return ee(G[de],de,G)}}var le=i(v,M,z);return le>-1?G[ee?v[le]:le]:n}}function Z0(i){return Mo(function(v){var M=v.length,z=M,G=Ti.prototype.thru;for(i&&v.reverse();z--;){var ee=v[z];if(typeof ee!="function")throw new pn(p);if(G&&!le&&Uc(ee)=="wrapper")var le=new Ti([],!0)}for(z=le?z:M;++z<M;){ee=v[z];var de=Uc(ee),ve=de=="wrapper"?Ud(ee):n;ve&&Gd(ve[0])&&ve[1]==(L|E|k|R)&&!ve[4].length&&ve[9]==1?le=le[Uc(ve[0])].apply(le,ve[3]):le=ee.length==1&&Gd(ee)?le[de]():le.thru(ee)}return function(){var Ie=arguments,Le=Ie[0];if(le&&Ie.length==1&&It(Le))return le.plant(Le).value();for(var Ne=0,Qe=M?v[Ne].apply(this,Ie):Le;++Ne<M;)Qe=v[Ne].call(this,Qe);return Qe}})}function Wc(i,v,M,z,G,ee,le,de,ve,Ie){var Le=v&L,Ne=v&m,Qe=v&w,ct=v&(E|T),wt=v&F,Wt=Qe?n:cl(i);function xt(){for(var Vt=arguments.length,Zt=xe(Vt),gi=Vt;gi--;)Zt[gi]=arguments[gi];if(ct)var Hr=wa(xt),mi=mr(Zt,Hr);if(z&&(Zt=q0(Zt,z,G,ct)),ee&&(Zt=K0(Zt,ee,le,ct)),Vt-=mi,ct&&Vt<Ie){var Jn=ze(Zt,Hr);return tb(i,v,Wc,xt.placeholder,M,Zt,Jn,de,ve,Ie-Vt)}var Yi=Ne?M:this,Ro=Qe?Yi[i]:i;return Vt=Zt.length,de?Zt=OL(Zt,de):wt&&Vt>1&&Zt.reverse(),Le&&ve<Vt&&(Zt.length=ve),this&&this!==fn&&this instanceof xt&&(Ro=Wt||cl(Ro)),Ro.apply(Yi,Zt)}return xt}function J0(i,v){return function(M,z){return zI(M,i,v(z),{})}}function jc(i,v){return function(M,z){var G;if(M===n&&z===n)return v;if(M!==n&&(G=M),z!==n){if(G===n)return z;typeof M=="string"||typeof z=="string"?(M=fi(M),z=fi(z)):(M=P0(M),z=P0(z)),G=i(M,z)}return G}}function Wd(i){return Mo(function(v){return v=y(v,dt(bt())),zt(function(M){var z=this;return i(v,function(G){return pr(G,z,M)})})})}function zc(i,v){v=v===n?" ":fi(v);var M=v.length;if(M<2)return M?Rd(v,i):v;var z=Rd(v,$c(i/Ut(v)));return oe(v)?ns(Mt(z),0,i).join(""):z.slice(0,i)}function gL(i,v,M,z){var G=v&m,ee=cl(i);function le(){for(var de=-1,ve=arguments.length,Ie=-1,Le=z.length,Ne=xe(Le+ve),Qe=this&&this!==fn&&this instanceof le?ee:i;++Ie<Le;)Ne[Ie]=z[Ie];for(;ve--;)Ne[Ie++]=arguments[++de];return pr(Qe,G?M:this,Ne)}return le}function eb(i){return function(v,M,z){return z&&typeof z!="number"&&zr(v,M,z)&&(M=z=n),v=Lo(v),M===n?(M=v,v=0):M=Lo(M),z=z===n?v<M?1:-1:Lo(z),eL(v,M,z,i)}}function Hc(i){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=Ii(v),M=Ii(M)),i(v,M)}}function tb(i,v,M,z,G,ee,le,de,ve,Ie){var Le=v&E,Ne=Le?le:n,Qe=Le?n:le,ct=Le?ee:n,wt=Le?n:ee;v|=Le?k:C,v&=~(Le?C:k),v&x||(v&=-4);var Wt=[i,v,G,ct,Ne,wt,Qe,de,ve,Ie],xt=M.apply(n,Wt);return Gd(i)&&fb(xt,Wt),xt.placeholder=z,pb(xt,i,v)}function jd(i){var v=en[i];return function(M,z){if(M=Ii(M),z=z==null?0:Or(Ft(z),292),z&&p0(M)){var G=(un(M)+"e").split("e"),ee=v(G[0]+"e"+(+G[1]+z));return G=(un(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-z))}return v(M)}}var mL=ga&&1/Ye(new ga([,-0]))[1]==W?function(i){return new ga(i)}:uf;function nb(i){return function(v){var M=Dr(v);return M==at?Me(v):M==Fn?et(v):st(v,i(v))}}function $o(i,v,M,z,G,ee,le,de){var ve=v&w;if(!ve&&typeof i!="function")throw new pn(p);var Ie=z?z.length:0;if(Ie||(v&=-97,z=G=n),le=le===n?le:dr(Ft(le),0),de=de===n?de:Ft(de),Ie-=G?G.length:0,v&C){var Le=z,Ne=G;z=G=n}var Qe=ve?n:Ud(i),ct=[i,v,M,z,G,Le,Ne,ee,le,de];if(Qe&&IL(ct,Qe),i=ct[0],v=ct[1],M=ct[2],z=ct[3],G=ct[4],de=ct[9]=ct[9]===n?ve?0:i.length:dr(ct[9]-Ie,0),!de&&v&(E|T)&&(v&=-25),!v||v==m)var wt=fL(i,v,M);else v==E||v==T?wt=pL(i,v,de):(v==k||v==(m|k))&&!G.length?wt=gL(i,v,M,z):wt=Wc.apply(n,ct);var Wt=Qe?N0:fb;return pb(Wt(wt,ct),i,v)}function rb(i,v,M,z){return i===n||Gi(i,Hn[M])&&!dn.call(z,M)?v:i}function ib(i,v,M,z,G,ee){return Dn(i)&&Dn(v)&&(ee.set(v,i),Nc(i,v,n,ib,ee),ee.delete(v)),i}function vL(i){return dl(i)?n:i}function ob(i,v,M,z,G,ee){var le=M&o,de=i.length,ve=v.length;if(de!=ve&&!(le&&ve>de))return!1;var Ie=ee.get(i),Le=ee.get(v);if(Ie&&Le)return Ie==v&&Le==i;var Ne=-1,Qe=!0,ct=M&u?new Ds:n;for(ee.set(i,v),ee.set(v,i);++Ne<de;){var wt=i[Ne],Wt=v[Ne];if(z)var xt=le?z(Wt,wt,Ne,v,i,ee):z(wt,Wt,Ne,i,v,ee);if(xt!==n){if(xt)continue;Qe=!1;break}if(ct){if(!B(v,function(Vt,Zt){if(!$t(ct,Zt)&&(wt===Vt||G(wt,Vt,M,z,ee)))return ct.push(Zt)})){Qe=!1;break}}else if(!(wt===Wt||G(wt,Wt,M,z,ee))){Qe=!1;break}}return ee.delete(i),ee.delete(v),Qe}function yL(i,v,M,z,G,ee,le){switch(M){case Je:if(i.byteLength!=v.byteLength||i.byteOffset!=v.byteOffset)return!1;i=i.buffer,v=v.buffer;case Ve:return!(i.byteLength!=v.byteLength||!ee(new _c(i),new _c(v)));case Te:case $e:case mt:return Gi(+i,+v);case Ze:return i.name==v.name&&i.message==v.message;case wn:case Pn:return i==v+"";case at:var de=Me;case Fn:var ve=z&o;if(de||(de=Ye),i.size!=v.size&&!ve)return!1;var Ie=le.get(i);if(Ie)return Ie==v;z|=u,le.set(i,v);var Le=ob(de(i),de(v),z,G,ee,le);return le.delete(i),Le;case nr:if(rl)return rl.call(i)==rl.call(v)}return!1}function bL(i,v,M,z,G,ee){var le=M&o,de=zd(i),ve=de.length,Ie=zd(v),Le=Ie.length;if(ve!=Le&&!le)return!1;for(var Ne=ve;Ne--;){var Qe=de[Ne];if(!(le?Qe in v:dn.call(v,Qe)))return!1}var ct=ee.get(i),wt=ee.get(v);if(ct&&wt)return ct==v&&wt==i;var Wt=!0;ee.set(i,v),ee.set(v,i);for(var xt=le;++Ne<ve;){Qe=de[Ne];var Vt=i[Qe],Zt=v[Qe];if(z)var gi=le?z(Zt,Vt,Qe,v,i,ee):z(Vt,Zt,Qe,i,v,ee);if(!(gi===n?Vt===Zt||G(Vt,Zt,M,z,ee):gi)){Wt=!1;break}xt||(xt=Qe=="constructor")}if(Wt&&!xt){var Hr=i.constructor,mi=v.constructor;Hr!=mi&&"constructor"in i&&"constructor"in v&&!(typeof Hr=="function"&&Hr instanceof Hr&&typeof mi=="function"&&mi instanceof mi)&&(Wt=!1)}return ee.delete(i),ee.delete(v),Wt}function Mo(i){return Xd(hb(i,n,wb),i+"")}function zd(i){return S0(i,yr,qd)}function Hd(i){return S0(i,ti,sb)}var Ud=Ec?function(i){return Ec.get(i)}:uf;function Uc(i){for(var v=i.name+"",M=ma[v],z=dn.call(ma,v)?M.length:0;z--;){var G=M[z],ee=G.func;if(ee==null||ee==i)return G.name}return v}function wa(i){var v=dn.call(J,"placeholder")?J:i;return v.placeholder}function bt(){var i=J.iteratee||lf;return i=i===lf?$0:i,arguments.length?i(arguments[0],arguments[1]):i}function Vc(i,v){var M=i.__data__;return TL(v)?M[typeof v=="string"?"string":"hash"]:M.map}function Vd(i){for(var v=yr(i),M=v.length;M--;){var z=v[M],G=i[z];v[M]=[z,G,cb(G)]}return v}function Ps(i,v){var M=ie(i,v);return T0(M)?M:n}function wL(i){var v=dn.call(i,Rs),M=i[Rs];try{i[Rs]=n;var z=!0}catch{}var G=Cc.call(i);return z&&(v?i[Rs]=M:delete i[Rs]),G}var qd=bd?function(i){return i==null?[]:(i=Bt(i),Rr(bd(i),function(v){return d0.call(i,v)}))}:hf,sb=bd?function(i){for(var v=[];i;)$(v,qd(i)),i=Sc(i);return v}:hf,Dr=jr;(wd&&Dr(new wd(new ArrayBuffer(1)))!=Je||el&&Dr(new el)!=at||xd&&Dr(xd.resolve())!=Jt||ga&&Dr(new ga)!=Fn||tl&&Dr(new tl)!=Ke)&&(Dr=function(i){var v=jr(i),M=v==bn?i.constructor:n,z=M?Bs(M):"";if(z)switch(z){case nI:return Je;case rI:return at;case iI:return Jt;case oI:return Fn;case sI:return Ke}return v});function xL(i,v,M){for(var z=-1,G=M.length;++z<G;){var ee=M[z],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":v-=le;break;case"take":v=Or(v,i+le);break;case"takeRight":i=dr(i,v-le);break}}return{start:i,end:v}}function CL(i){var v=i.match(Hi);return v?v[1].split(_s):[]}function ab(i,v,M){v=ts(v,i);for(var z=-1,G=v.length,ee=!1;++z<G;){var le=uo(v[z]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++z!=G?ee:(G=i==null?0:i.length,!!G&&Zc(G)&&Eo(le,G)&&(It(i)||Ws(i)))}function kL(i){var v=i.length,M=new i.constructor(v);return v&&typeof i[0]=="string"&&dn.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function lb(i){return typeof i.constructor=="function"&&!ul(i)?va(Sc(i)):{}}function _L(i,v,M){var z=i.constructor;switch(v){case Ve:return Bd(i);case Te:case $e:return new z(+i);case Je:return aL(i,M);case vt:case Tt:case At:case Pt:case Nt:case pt:case kt:case $n:case $r:return U0(i,M);case at:return new z;case mt:case Pn:return new z(i);case wn:return lL(i);case Fn:return new z;case nr:return cL(i)}}function SL(i,v){var M=v.length;if(!M)return i;var z=M-1;return v[z]=(M>1?"& ":"")+v[z],v=v.join(M>2?", ":" "),i.replace(no,`{
1469
+ /* [wrapped with `+v+`] */
1470
+ `)}function AL(i){return It(i)||Ws(i)||!!(f0&&i&&i[f0])}function Eo(i,v){var M=typeof i;return v=v??U,!!v&&(M=="number"||M!="symbol"&&xn.test(i))&&i>-1&&i%1==0&&i<v}function zr(i,v,M){if(!Dn(M))return!1;var z=typeof v;return(z=="number"?ei(M)&&Eo(v,M.length):z=="string"&&v in M)?Gi(M[v],i):!1}function Kd(i,v){if(It(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||pi(i)?!0:ji.test(i)||!aa.test(i)||v!=null&&i in Bt(v)}function TL(i){var v=typeof i;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?i!=="__proto__":i===null}function Gd(i){var v=Uc(i),M=J[v];if(typeof M!="function"||!(v in Yt.prototype))return!1;if(i===M)return!0;var z=Ud(M);return!!z&&i===z[0]}function $L(i){return!!c0&&c0 in i}var ML=Ls?Io:df;function ul(i){var v=i&&i.constructor,M=typeof v=="function"&&v.prototype||Hn;return i===M}function cb(i){return i===i&&!Dn(i)}function ub(i,v){return function(M){return M==null?!1:M[i]===v&&(v!==n||i in Bt(M))}}function EL(i){var v=Xc(i,function(z){return M.size===g&&M.clear(),z}),M=v.cache;return v}function IL(i,v){var M=i[1],z=v[1],G=M|z,ee=G<(m|w|L),le=z==L&&M==E||z==L&&M==R&&i[7].length<=v[8]||z==(L|R)&&v[7].length<=v[8]&&M==E;if(!(ee||le))return i;z&m&&(i[2]=v[2],G|=M&m?0:x);var de=v[3];if(de){var ve=i[3];i[3]=ve?q0(ve,de,v[4]):de,i[4]=ve?ze(i[3],s):v[4]}return de=v[5],de&&(ve=i[5],i[5]=ve?K0(ve,de,v[6]):de,i[6]=ve?ze(i[5],s):v[6]),de=v[7],de&&(i[7]=de),z&L&&(i[8]=i[8]==null?v[8]:Or(i[8],v[8])),i[9]==null&&(i[9]=v[9]),i[0]=v[0],i[1]=G,i}function LL(i){var v=[];if(i!=null)for(var M in Bt(i))v.push(M);return v}function RL(i){return Cc.call(i)}function hb(i,v,M){return v=dr(v===n?i.length-1:v,0),function(){for(var z=arguments,G=-1,ee=dr(z.length-v,0),le=xe(ee);++G<ee;)le[G]=z[v+G];G=-1;for(var de=xe(v+1);++G<v;)de[G]=z[G];return de[v]=M(le),pr(i,this,de)}}function db(i,v){return v.length<2?i:Fs(i,Mi(v,0,-1))}function OL(i,v){for(var M=i.length,z=Or(v.length,M),G=Jr(i);z--;){var ee=v[z];i[z]=Eo(ee,M)?G[ee]:n}return i}function Yd(i,v){if(!(v==="constructor"&&typeof i[v]=="function")&&v!="__proto__")return i[v]}var fb=gb(N0),hl=YE||function(i,v){return fn.setTimeout(i,v)},Xd=gb(rL);function pb(i,v,M){var z=v+"";return Xd(i,SL(z,DL(CL(z),M)))}function gb(i){var v=0,M=0;return function(){var z=JE(),G=O-(z-M);if(M=z,G>0){if(++v>=P)return arguments[0]}else v=0;return i.apply(n,arguments)}}function qc(i,v){var M=-1,z=i.length,G=z-1;for(v=v===n?z:v;++M<v;){var ee=Ld(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=v,i}var mb=EL(function(i){var v=[];return i.charCodeAt(0)===46&&v.push(""),i.replace(Yn,function(M,z,G,ee){v.push(G?ee.replace(Qa,"$1"):z||M)}),v});function uo(i){if(typeof i=="string"||pi(i))return i;var v=i+"";return v=="0"&&1/i==-1/0?"-0":v}function Bs(i){if(i!=null){try{return xc.call(i)}catch{}try{return i+""}catch{}}return""}function DL(i,v){return Cr(ae,function(M){var z="_."+M[0];v&M[1]&&!hi(i,z)&&i.push(z)}),i.sort()}function vb(i){if(i instanceof Yt)return i.clone();var v=new Ti(i.__wrapped__,i.__chain__);return v.__actions__=Jr(i.__actions__),v.__index__=i.__index__,v.__values__=i.__values__,v}function NL(i,v,M){(M?zr(i,v,M):v===n)?v=1:v=dr(Ft(v),0);var z=i==null?0:i.length;if(!z||v<1)return[];for(var G=0,ee=0,le=xe($c(z/v));G<z;)le[ee++]=Mi(i,G,G+=v);return le}function FL(i){for(var v=-1,M=i==null?0:i.length,z=0,G=[];++v<M;){var ee=i[v];ee&&(G[z++]=ee)}return G}function PL(){var i=arguments.length;if(!i)return[];for(var v=xe(i-1),M=arguments[0],z=i;z--;)v[z-1]=arguments[z];return $(It(M)?Jr(M):[M],_r(v,1))}var BL=zt(function(i,v){return Zn(i)?ol(i,_r(v,1,Zn,!0)):[]}),WL=zt(function(i,v){var M=Ei(v);return Zn(M)&&(M=n),Zn(i)?ol(i,_r(v,1,Zn,!0),bt(M,2)):[]}),jL=zt(function(i,v){var M=Ei(v);return Zn(M)&&(M=n),Zn(i)?ol(i,_r(v,1,Zn,!0),n,M):[]});function zL(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),Mi(i,v<0?0:v,z)):[]}function HL(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),v=z-v,Mi(i,0,v<0?0:v)):[]}function UL(i,v){return i&&i.length?Pc(i,bt(v,3),!0,!0):[]}function VL(i,v){return i&&i.length?Pc(i,bt(v,3),!0):[]}function qL(i,v,M,z){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&zr(i,v,M)&&(M=0,z=G),PI(i,v,M,z)):[]}function yb(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=M==null?0:Ft(M);return G<0&&(G=dr(z+G,0)),re(i,bt(v,3),G)}function bb(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=z-1;return M!==n&&(G=Ft(M),G=M<0?dr(z+G,0):Or(G,z-1)),re(i,bt(v,3),G,!0)}function wb(i){var v=i==null?0:i.length;return v?_r(i,1):[]}function KL(i){var v=i==null?0:i.length;return v?_r(i,W):[]}function GL(i,v){var M=i==null?0:i.length;return M?(v=v===n?1:Ft(v),_r(i,v)):[]}function YL(i){for(var v=-1,M=i==null?0:i.length,z={};++v<M;){var G=i[v];z[G[0]]=G[1]}return z}function xb(i){return i&&i.length?i[0]:n}function XL(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=M==null?0:Ft(M);return G<0&&(G=dr(z+G,0)),se(i,v,G)}function QL(i){var v=i==null?0:i.length;return v?Mi(i,0,-1):[]}var ZL=zt(function(i){var v=y(i,Fd);return v.length&&v[0]===i[0]?Td(v):[]}),JL=zt(function(i){var v=Ei(i),M=y(i,Fd);return v===Ei(M)?v=n:M.pop(),M.length&&M[0]===i[0]?Td(M,bt(v,2)):[]}),eR=zt(function(i){var v=Ei(i),M=y(i,Fd);return v=typeof v=="function"?v:n,v&&M.pop(),M.length&&M[0]===i[0]?Td(M,n,v):[]});function tR(i,v){return i==null?"":QE.call(i,v)}function Ei(i){var v=i==null?0:i.length;return v?i[v-1]:n}function nR(i,v,M){var z=i==null?0:i.length;if(!z)return-1;var G=z;return M!==n&&(G=Ft(M),G=G<0?dr(z+G,0):Or(G,z-1)),v===v?St(i,v,G):re(i,Ce,G,!0)}function rR(i,v){return i&&i.length?L0(i,Ft(v)):n}var iR=zt(Cb);function Cb(i,v){return i&&i.length&&v&&v.length?Id(i,v):i}function oR(i,v,M){return i&&i.length&&v&&v.length?Id(i,v,bt(M,2)):i}function sR(i,v,M){return i&&i.length&&v&&v.length?Id(i,v,n,M):i}var aR=Mo(function(i,v){var M=i==null?0:i.length,z=kd(i,v);return D0(i,y(v,function(G){return Eo(G,M)?+G:G}).sort(V0)),z});function lR(i,v){var M=[];if(!(i&&i.length))return M;var z=-1,G=[],ee=i.length;for(v=bt(v,3);++z<ee;){var le=i[z];v(le,z,i)&&(M.push(le),G.push(z))}return D0(i,G),M}function Qd(i){return i==null?i:tI.call(i)}function cR(i,v,M){var z=i==null?0:i.length;return z?(M&&typeof M!="number"&&zr(i,v,M)?(v=0,M=z):(v=v==null?0:Ft(v),M=M===n?z:Ft(M)),Mi(i,v,M)):[]}function uR(i,v){return Fc(i,v)}function hR(i,v,M){return Od(i,v,bt(M,2))}function dR(i,v){var M=i==null?0:i.length;if(M){var z=Fc(i,v);if(z<M&&Gi(i[z],v))return z}return-1}function fR(i,v){return Fc(i,v,!0)}function pR(i,v,M){return Od(i,v,bt(M,2),!0)}function gR(i,v){var M=i==null?0:i.length;if(M){var z=Fc(i,v,!0)-1;if(Gi(i[z],v))return z}return-1}function mR(i){return i&&i.length?F0(i):[]}function vR(i,v){return i&&i.length?F0(i,bt(v,2)):[]}function yR(i){var v=i==null?0:i.length;return v?Mi(i,1,v):[]}function bR(i,v,M){return i&&i.length?(v=M||v===n?1:Ft(v),Mi(i,0,v<0?0:v)):[]}function wR(i,v,M){var z=i==null?0:i.length;return z?(v=M||v===n?1:Ft(v),v=z-v,Mi(i,v<0?0:v,z)):[]}function xR(i,v){return i&&i.length?Pc(i,bt(v,3),!1,!0):[]}function CR(i,v){return i&&i.length?Pc(i,bt(v,3)):[]}var kR=zt(function(i){return es(_r(i,1,Zn,!0))}),_R=zt(function(i){var v=Ei(i);return Zn(v)&&(v=n),es(_r(i,1,Zn,!0),bt(v,2))}),SR=zt(function(i){var v=Ei(i);return v=typeof v=="function"?v:n,es(_r(i,1,Zn,!0),n,v)});function AR(i){return i&&i.length?es(i):[]}function TR(i,v){return i&&i.length?es(i,bt(v,2)):[]}function $R(i,v){return v=typeof v=="function"?v:n,i&&i.length?es(i,n,v):[]}function Zd(i){if(!(i&&i.length))return[];var v=0;return i=Rr(i,function(M){if(Zn(M))return v=dr(M.length,v),!0}),tt(v,function(M){return y(i,be(M))})}function kb(i,v){if(!(i&&i.length))return[];var M=Zd(i);return v==null?M:y(M,function(z){return pr(v,n,z)})}var MR=zt(function(i,v){return Zn(i)?ol(i,v):[]}),ER=zt(function(i){return Nd(Rr(i,Zn))}),IR=zt(function(i){var v=Ei(i);return Zn(v)&&(v=n),Nd(Rr(i,Zn),bt(v,2))}),LR=zt(function(i){var v=Ei(i);return v=typeof v=="function"?v:n,Nd(Rr(i,Zn),n,v)}),RR=zt(Zd);function OR(i,v){return j0(i||[],v||[],il)}function DR(i,v){return j0(i||[],v||[],ll)}var NR=zt(function(i){var v=i.length,M=v>1?i[v-1]:n;return M=typeof M=="function"?(i.pop(),M):n,kb(i,M)});function _b(i){var v=J(i);return v.__chain__=!0,v}function FR(i,v){return v(i),i}function Kc(i,v){return v(i)}var PR=Mo(function(i){var v=i.length,M=v?i[0]:0,z=this.__wrapped__,G=function(ee){return kd(ee,i)};return v>1||this.__actions__.length||!(z instanceof Yt)||!Eo(M)?this.thru(G):(z=z.slice(M,+M+(v?1:0)),z.__actions__.push({func:Kc,args:[G],thisArg:n}),new Ti(z,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(n),ee}))});function BR(){return _b(this)}function WR(){return new Ti(this.value(),this.__chain__)}function jR(){this.__values__===n&&(this.__values__=Pb(this.value()));var i=this.__index__>=this.__values__.length,v=i?n:this.__values__[this.__index__++];return{done:i,value:v}}function zR(){return this}function HR(i){for(var v,M=this;M instanceof Lc;){var z=vb(M);z.__index__=0,z.__values__=n,v?G.__wrapped__=z:v=z;var G=z;M=M.__wrapped__}return G.__wrapped__=i,v}function UR(){var i=this.__wrapped__;if(i instanceof Yt){var v=i;return this.__actions__.length&&(v=new Yt(this)),v=v.reverse(),v.__actions__.push({func:Kc,args:[Qd],thisArg:n}),new Ti(v,this.__chain__)}return this.thru(Qd)}function VR(){return W0(this.__wrapped__,this.__actions__)}var qR=Bc(function(i,v,M){dn.call(i,M)?++i[M]:To(i,M,1)});function KR(i,v,M){var z=It(i)?kr:FI;return M&&zr(i,v,M)&&(v=n),z(i,bt(v,3))}function GR(i,v){var M=It(i)?Rr:k0;return M(i,bt(v,3))}var YR=Q0(yb),XR=Q0(bb);function QR(i,v){return _r(Gc(i,v),1)}function ZR(i,v){return _r(Gc(i,v),W)}function JR(i,v,M){return M=M===n?1:Ft(M),_r(Gc(i,v),M)}function Sb(i,v){var M=It(i)?Cr:Jo;return M(i,bt(v,3))}function Ab(i,v){var M=It(i)?Is:C0;return M(i,bt(v,3))}var eO=Bc(function(i,v,M){dn.call(i,M)?i[M].push(v):To(i,M,[v])});function tO(i,v,M,z){i=ei(i)?i:Ca(i),M=M&&!z?Ft(M):0;var G=i.length;return M<0&&(M=dr(G+M,0)),Jc(i)?M<=G&&i.indexOf(v,M)>-1:!!G&&se(i,v,M)>-1}var nO=zt(function(i,v,M){var z=-1,G=typeof v=="function",ee=ei(i)?xe(i.length):[];return Jo(i,function(le){ee[++z]=G?pr(v,le,M):sl(le,v,M)}),ee}),rO=Bc(function(i,v,M){To(i,M,v)});function Gc(i,v){var M=It(i)?y:M0;return M(i,bt(v,3))}function iO(i,v,M,z){return i==null?[]:(It(v)||(v=v==null?[]:[v]),M=z?n:M,It(M)||(M=M==null?[]:[M]),R0(i,v,M))}var oO=Bc(function(i,v,M){i[M?0:1].push(v)},function(){return[[],[]]});function sO(i,v,M){var z=It(i)?_:Re,G=arguments.length<3;return z(i,bt(v,4),M,G,Jo)}function aO(i,v,M){var z=It(i)?N:Re,G=arguments.length<3;return z(i,bt(v,4),M,G,C0)}function lO(i,v){var M=It(i)?Rr:k0;return M(i,Qc(bt(v,3)))}function cO(i){var v=It(i)?y0:tL;return v(i)}function uO(i,v,M){(M?zr(i,v,M):v===n)?v=1:v=Ft(v);var z=It(i)?LI:nL;return z(i,v)}function hO(i){var v=It(i)?RI:iL;return v(i)}function dO(i){if(i==null)return 0;if(ei(i))return Jc(i)?Ut(i):i.length;var v=Dr(i);return v==at||v==Fn?i.size:Md(i).length}function fO(i,v,M){var z=It(i)?B:oL;return M&&zr(i,v,M)&&(v=n),z(i,bt(v,3))}var pO=zt(function(i,v){if(i==null)return[];var M=v.length;return M>1&&zr(i,v[0],v[1])?v=[]:M>2&&zr(v[0],v[1],v[2])&&(v=[v[0]]),R0(i,_r(v,1),[])}),Yc=GE||function(){return fn.Date.now()};function gO(i,v){if(typeof v!="function")throw new pn(p);return i=Ft(i),function(){if(--i<1)return v.apply(this,arguments)}}function Tb(i,v,M){return v=M?n:v,v=i&&v==null?i.length:v,$o(i,L,n,n,n,n,v)}function $b(i,v){var M;if(typeof v!="function")throw new pn(p);return i=Ft(i),function(){return--i>0&&(M=v.apply(this,arguments)),i<=1&&(v=n),M}}var Jd=zt(function(i,v,M){var z=m;if(M.length){var G=ze(M,wa(Jd));z|=k}return $o(i,z,v,M,G)}),Mb=zt(function(i,v,M){var z=m|w;if(M.length){var G=ze(M,wa(Mb));z|=k}return $o(v,z,i,M,G)});function Eb(i,v,M){v=M?n:v;var z=$o(i,E,n,n,n,n,n,v);return z.placeholder=Eb.placeholder,z}function Ib(i,v,M){v=M?n:v;var z=$o(i,T,n,n,n,n,n,v);return z.placeholder=Ib.placeholder,z}function Lb(i,v,M){var z,G,ee,le,de,ve,Ie=0,Le=!1,Ne=!1,Qe=!0;if(typeof i!="function")throw new pn(p);v=Ii(v)||0,Dn(M)&&(Le=!!M.leading,Ne="maxWait"in M,ee=Ne?dr(Ii(M.maxWait)||0,v):ee,Qe="trailing"in M?!!M.trailing:Qe);function ct(Jn){var Yi=z,Ro=G;return z=G=n,Ie=Jn,le=i.apply(Ro,Yi),le}function wt(Jn){return Ie=Jn,de=hl(Vt,v),Le?ct(Jn):le}function Wt(Jn){var Yi=Jn-ve,Ro=Jn-Ie,Qb=v-Yi;return Ne?Or(Qb,ee-Ro):Qb}function xt(Jn){var Yi=Jn-ve,Ro=Jn-Ie;return ve===n||Yi>=v||Yi<0||Ne&&Ro>=ee}function Vt(){var Jn=Yc();if(xt(Jn))return Zt(Jn);de=hl(Vt,Wt(Jn))}function Zt(Jn){return de=n,Qe&&z?ct(Jn):(z=G=n,le)}function gi(){de!==n&&z0(de),Ie=0,z=ve=G=de=n}function Hr(){return de===n?le:Zt(Yc())}function mi(){var Jn=Yc(),Yi=xt(Jn);if(z=arguments,G=this,ve=Jn,Yi){if(de===n)return wt(ve);if(Ne)return z0(de),de=hl(Vt,v),ct(ve)}return de===n&&(de=hl(Vt,v)),le}return mi.cancel=gi,mi.flush=Hr,mi}var mO=zt(function(i,v){return x0(i,1,v)}),vO=zt(function(i,v,M){return x0(i,Ii(v)||0,M)});function yO(i){return $o(i,F)}function Xc(i,v){if(typeof i!="function"||v!=null&&typeof v!="function")throw new pn(p);var M=function(){var z=arguments,G=v?v.apply(this,z):z[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,z);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(Xc.Cache||Ao),M}Xc.Cache=Ao;function Qc(i){if(typeof i!="function")throw new pn(p);return function(){var v=arguments;switch(v.length){case 0:return!i.call(this);case 1:return!i.call(this,v[0]);case 2:return!i.call(this,v[0],v[1]);case 3:return!i.call(this,v[0],v[1],v[2])}return!i.apply(this,v)}}function bO(i){return $b(2,i)}var wO=sL(function(i,v){v=v.length==1&&It(v[0])?y(v[0],dt(bt())):y(_r(v,1),dt(bt()));var M=v.length;return zt(function(z){for(var G=-1,ee=Or(z.length,M);++G<ee;)z[G]=v[G].call(this,z[G]);return pr(i,this,z)})}),ef=zt(function(i,v){var M=ze(v,wa(ef));return $o(i,k,n,v,M)}),Rb=zt(function(i,v){var M=ze(v,wa(Rb));return $o(i,C,n,v,M)}),xO=Mo(function(i,v){return $o(i,R,n,n,n,v)});function CO(i,v){if(typeof i!="function")throw new pn(p);return v=v===n?v:Ft(v),zt(i,v)}function kO(i,v){if(typeof i!="function")throw new pn(p);return v=v==null?0:dr(Ft(v),0),zt(function(M){var z=M[v],G=ns(M,0,v);return z&&$(G,z),pr(i,this,G)})}function _O(i,v,M){var z=!0,G=!0;if(typeof i!="function")throw new pn(p);return Dn(M)&&(z="leading"in M?!!M.leading:z,G="trailing"in M?!!M.trailing:G),Lb(i,v,{leading:z,maxWait:v,trailing:G})}function SO(i){return Tb(i,1)}function AO(i,v){return ef(Pd(v),i)}function TO(){if(!arguments.length)return[];var i=arguments[0];return It(i)?i:[i]}function $O(i){return $i(i,l)}function MO(i,v){return v=typeof v=="function"?v:n,$i(i,l,v)}function EO(i){return $i(i,a|l)}function IO(i,v){return v=typeof v=="function"?v:n,$i(i,a|l,v)}function LO(i,v){return v==null||w0(i,v,yr(v))}function Gi(i,v){return i===v||i!==i&&v!==v}var RO=Hc(Ad),OO=Hc(function(i,v){return i>=v}),Ws=A0(function(){return arguments}())?A0:function(i){return Un(i)&&dn.call(i,"callee")&&!d0.call(i,"callee")},It=xe.isArray,DO=Zr?dt(Zr):HI;function ei(i){return i!=null&&Zc(i.length)&&!Io(i)}function Zn(i){return Un(i)&&ei(i)}function NO(i){return i===!0||i===!1||Un(i)&&jr(i)==Te}var rs=XE||df,FO=Qo?dt(Qo):UI;function PO(i){return Un(i)&&i.nodeType===1&&!dl(i)}function BO(i){if(i==null)return!0;if(ei(i)&&(It(i)||typeof i=="string"||typeof i.splice=="function"||rs(i)||xa(i)||Ws(i)))return!i.length;var v=Dr(i);if(v==at||v==Fn)return!i.size;if(ul(i))return!Md(i).length;for(var M in i)if(dn.call(i,M))return!1;return!0}function WO(i,v){return al(i,v)}function jO(i,v,M){M=typeof M=="function"?M:n;var z=M?M(i,v):n;return z===n?al(i,v,n,M):!!z}function tf(i){if(!Un(i))return!1;var v=jr(i);return v==Ze||v==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!dl(i)}function zO(i){return typeof i=="number"&&p0(i)}function Io(i){if(!Dn(i))return!1;var v=jr(i);return v==Xe||v==gt||v==ge||v==wr}function Ob(i){return typeof i=="number"&&i==Ft(i)}function Zc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function Dn(i){var v=typeof i;return i!=null&&(v=="object"||v=="function")}function Un(i){return i!=null&&typeof i=="object"}var Db=zn?dt(zn):qI;function HO(i,v){return i===v||$d(i,v,Vd(v))}function UO(i,v,M){return M=typeof M=="function"?M:n,$d(i,v,Vd(v),M)}function VO(i){return Nb(i)&&i!=+i}function qO(i){if(ML(i))throw new ft(d);return T0(i)}function KO(i){return i===null}function GO(i){return i==null}function Nb(i){return typeof i=="number"||Un(i)&&jr(i)==mt}function dl(i){if(!Un(i)||jr(i)!=bn)return!1;var v=Sc(i);if(v===null)return!0;var M=dn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&xc.call(M)==UE}var nf=ci?dt(ci):KI;function YO(i){return Ob(i)&&i>=-9007199254740991&&i<=U}var Fb=ui?dt(ui):GI;function Jc(i){return typeof i=="string"||!It(i)&&Un(i)&&jr(i)==Pn}function pi(i){return typeof i=="symbol"||Un(i)&&jr(i)==nr}var xa=Si?dt(Si):YI;function XO(i){return i===n}function QO(i){return Un(i)&&Dr(i)==Ke}function ZO(i){return Un(i)&&jr(i)==ke}var JO=Hc(Ed),e2=Hc(function(i,v){return i<=v});function Pb(i){if(!i)return[];if(ei(i))return Jc(i)?Mt(i):Jr(i);if(Ja&&i[Ja])return we(i[Ja]());var v=Dr(i),M=v==at?Me:v==Fn?Ye:Ca;return M(i)}function Lo(i){if(!i)return i===0?i:0;if(i=Ii(i),i===W||i===-1/0){var v=i<0?-1:1;return v*K}return i===i?i:0}function Ft(i){var v=Lo(i),M=v%1;return v===v?M?v-M:v:0}function Bb(i){return i?Ns(Ft(i),0,te):0}function Ii(i){if(typeof i=="number")return i;if(pi(i))return Z;if(Dn(i)){var v=typeof i.valueOf=="function"?i.valueOf():i;i=Dn(v)?v+"":v}if(typeof i!="string")return i===0?i:+i;i=kn(i);var M=ca.test(i);return M||Xn.test(i)?Cn(i.slice(2),M?2:8):Kt.test(i)?Z:+i}function Wb(i){return co(i,ti(i))}function t2(i){return i?Ns(Ft(i),-9007199254740991,U):i===0?i:0}function un(i){return i==null?"":fi(i)}var n2=ya(function(i,v){if(ul(v)||ei(v)){co(v,yr(v),i);return}for(var M in v)dn.call(v,M)&&il(i,M,v[M])}),jb=ya(function(i,v){co(v,ti(v),i)}),eu=ya(function(i,v,M,z){co(v,ti(v),i,z)}),r2=ya(function(i,v,M,z){co(v,yr(v),i,z)}),i2=Mo(kd);function o2(i,v){var M=va(i);return v==null?M:b0(M,v)}var s2=zt(function(i,v){i=Bt(i);var M=-1,z=v.length,G=z>2?v[2]:n;for(G&&zr(v[0],v[1],G)&&(z=1);++M<z;)for(var ee=v[M],le=ti(ee),de=-1,ve=le.length;++de<ve;){var Ie=le[de],Le=i[Ie];(Le===n||Gi(Le,Hn[Ie])&&!dn.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),a2=zt(function(i){return i.push(n,ib),pr(zb,n,i)});function l2(i,v){return Q(i,bt(v,3),lo)}function c2(i,v){return Q(i,bt(v,3),Sd)}function u2(i,v){return i==null?i:_d(i,bt(v,3),ti)}function h2(i,v){return i==null?i:_0(i,bt(v,3),ti)}function d2(i,v){return i&&lo(i,bt(v,3))}function f2(i,v){return i&&Sd(i,bt(v,3))}function p2(i){return i==null?[]:Dc(i,yr(i))}function g2(i){return i==null?[]:Dc(i,ti(i))}function rf(i,v,M){var z=i==null?n:Fs(i,v);return z===n?M:z}function m2(i,v){return i!=null&&ab(i,v,BI)}function of(i,v){return i!=null&&ab(i,v,WI)}var v2=J0(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=Cc.call(v)),i[v]=M},af(ni)),y2=J0(function(i,v,M){v!=null&&typeof v.toString!="function"&&(v=Cc.call(v)),dn.call(i,v)?i[v].push(M):i[v]=[M]},bt),b2=zt(sl);function yr(i){return ei(i)?v0(i):Md(i)}function ti(i){return ei(i)?v0(i,!0):XI(i)}function w2(i,v){var M={};return v=bt(v,3),lo(i,function(z,G,ee){To(M,v(z,G,ee),z)}),M}function x2(i,v){var M={};return v=bt(v,3),lo(i,function(z,G,ee){To(M,G,v(z,G,ee))}),M}var C2=ya(function(i,v,M){Nc(i,v,M)}),zb=ya(function(i,v,M,z){Nc(i,v,M,z)}),k2=Mo(function(i,v){var M={};if(i==null)return M;var z=!1;v=y(v,function(ee){return ee=ts(ee,i),z||(z=ee.length>1),ee}),co(i,Hd(i),M),z&&(M=$i(M,a|c|l,vL));for(var G=v.length;G--;)Dd(M,v[G]);return M});function _2(i,v){return Hb(i,Qc(bt(v)))}var S2=Mo(function(i,v){return i==null?{}:ZI(i,v)});function Hb(i,v){if(i==null)return{};var M=y(Hd(i),function(z){return[z]});return v=bt(v),O0(i,M,function(z,G){return v(z,G[0])})}function A2(i,v,M){v=ts(v,i);var z=-1,G=v.length;for(G||(G=1,i=n);++z<G;){var ee=i==null?n:i[uo(v[z])];ee===n&&(z=G,ee=M),i=Io(ee)?ee.call(i):ee}return i}function T2(i,v,M){return i==null?i:ll(i,v,M)}function $2(i,v,M,z){return z=typeof z=="function"?z:n,i==null?i:ll(i,v,M,z)}var Ub=nb(yr),Vb=nb(ti);function M2(i,v,M){var z=It(i),G=z||rs(i)||xa(i);if(v=bt(v,4),M==null){var ee=i&&i.constructor;G?M=z?new ee:[]:Dn(i)?M=Io(ee)?va(Sc(i)):{}:M={}}return(G?Cr:lo)(i,function(le,de,ve){return v(M,le,de,ve)}),M}function E2(i,v){return i==null?!0:Dd(i,v)}function I2(i,v,M){return i==null?i:B0(i,v,Pd(M))}function L2(i,v,M,z){return z=typeof z=="function"?z:n,i==null?i:B0(i,v,Pd(M),z)}function Ca(i){return i==null?[]:Mn(i,yr(i))}function R2(i){return i==null?[]:Mn(i,ti(i))}function O2(i,v,M){return M===n&&(M=v,v=n),M!==n&&(M=Ii(M),M=M===M?M:0),v!==n&&(v=Ii(v),v=v===v?v:0),Ns(Ii(i),v,M)}function D2(i,v,M){return v=Lo(v),M===n?(M=v,v=0):M=Lo(M),i=Ii(i),jI(i,v,M)}function N2(i,v,M){if(M&&typeof M!="boolean"&&zr(i,v,M)&&(v=M=n),M===n&&(typeof v=="boolean"?(M=v,v=n):typeof i=="boolean"&&(M=i,i=n)),i===n&&v===n?(i=0,v=1):(i=Lo(i),v===n?(v=i,i=0):v=Lo(v)),i>v){var z=i;i=v,v=z}if(M||i%1||v%1){var G=g0();return Or(i+G*(v-i+He("1e-"+((G+"").length-1))),v)}return Ld(i,v)}var F2=ba(function(i,v,M){return v=v.toLowerCase(),i+(M?qb(v):v)});function qb(i){return sf(un(i).toLowerCase())}function Kb(i){return i=un(i),i&&i.replace(Bn,En).replace(Co,"")}function P2(i,v,M){i=un(i),v=fi(v);var z=i.length;M=M===n?z:Ns(Ft(M),0,z);var G=M;return M-=v.length,M>=0&&i.slice(M,G)==v}function B2(i){return i=un(i),i&&Ga.test(i)?i.replace(go,V):i}function W2(i){return i=un(i),i&&zi.test(i)?i.replace(Mr,"\\$&"):i}var j2=ba(function(i,v,M){return i+(M?"-":"")+v.toLowerCase()}),z2=ba(function(i,v,M){return i+(M?" ":"")+v.toLowerCase()}),H2=X0("toLowerCase");function U2(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;if(!v||z>=v)return i;var G=(v-z)/2;return zc(Mc(G),M)+i+zc($c(G),M)}function V2(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;return v&&z<v?i+zc(v-z,M):i}function q2(i,v,M){i=un(i),v=Ft(v);var z=v?Ut(i):0;return v&&z<v?zc(v-z,M)+i:i}function K2(i,v,M){return M||v==null?v=0:v&&(v=+v),eI(un(i).replace(Rn,""),v||0)}function G2(i,v,M){return(M?zr(i,v,M):v===n)?v=1:v=Ft(v),Rd(un(i),v)}function Y2(){var i=arguments,v=un(i[0]);return i.length<3?v:v.replace(i[1],i[2])}var X2=ba(function(i,v,M){return i+(M?"_":"")+v.toLowerCase()});function Q2(i,v,M){return M&&typeof M!="number"&&zr(i,v,M)&&(v=M=n),M=M===n?te:M>>>0,M?(i=un(i),i&&(typeof v=="string"||v!=null&&!nf(v))&&(v=fi(v),!v&&oe(i))?ns(Mt(i),0,M):i.split(v,M)):[]}var Z2=ba(function(i,v,M){return i+(M?" ":"")+sf(v)});function J2(i,v,M){return i=un(i),M=M==null?0:Ns(Ft(M),0,i.length),v=fi(v),i.slice(M,M+v.length)==v}function eD(i,v,M){var z=J.templateSettings;M&&zr(i,v,M)&&(v=n),i=un(i),v=eu({},v,z,rb);var G=eu({},v.imports,z.imports,rb),ee=yr(G),le=Mn(G,ee),de,ve,Ie=0,Le=v.interpolate||bi,Ne="__p += '",Qe=Wr((v.escape||bi).source+"|"+Le.source+"|"+(Le===ks?Ui:bi).source+"|"+(v.evaluate||bi).source+"|$","g"),ct="//# sourceURL="+(dn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ao+"]")+`
1471
+ `;i.replace(Qe,function(xt,Vt,Zt,gi,Hr,mi){return Zt||(Zt=gi),Ne+=i.slice(Ie,mi).replace(Lr,X),Vt&&(de=!0,Ne+=`' +
1472
+ __e(`+Vt+`) +
1473
+ '`),Hr&&(ve=!0,Ne+=`';
1474
+ `+Hr+`;
1475
+ __p += '`),Zt&&(Ne+=`' +
1476
+ ((__t = (`+Zt+`)) == null ? '' : __t) +
1477
+ '`),Ie=mi+xt.length,xt}),Ne+=`';
1478
+ `;var wt=dn.call(v,"variable")&&v.variable;if(!wt)Ne=`with (obj) {
1479
+ `+Ne+`
1480
+ }
1481
+ `;else if(Xa.test(wt))throw new ft(b);Ne=(ve?Ne.replace(Yr,""):Ne).replace(Wi,"$1").replace(po,"$1;"),Ne="function("+(wt||"obj")+`) {
1482
+ `+(wt?"":`obj || (obj = {});
1483
+ `)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(ve?`, __j = Array.prototype.join;
1484
+ function print() { __p += __j.call(arguments, '') }
1485
+ `:`;
1486
+ `)+Ne+`return __p
1487
+ }`;var Wt=Yb(function(){return Dt(ee,ct+"return "+Ne).apply(n,le)});if(Wt.source=Ne,tf(Wt))throw Wt;return Wt}function tD(i){return un(i).toLowerCase()}function nD(i){return un(i).toUpperCase()}function rD(i,v,M){if(i=un(i),i&&(M||v===n))return kn(i);if(!i||!(v=fi(v)))return i;var z=Mt(i),G=Mt(v),ee=Ot(z,G),le=ir(z,G)+1;return ns(z,ee,le).join("")}function iD(i,v,M){if(i=un(i),i&&(M||v===n))return i.slice(0,jt(i)+1);if(!i||!(v=fi(v)))return i;var z=Mt(i),G=ir(z,Mt(v))+1;return ns(z,0,G).join("")}function oD(i,v,M){if(i=un(i),i&&(M||v===n))return i.replace(Rn,"");if(!i||!(v=fi(v)))return i;var z=Mt(i),G=Ot(z,Mt(v));return ns(z,G).join("")}function sD(i,v){var M=I,z=H;if(Dn(v)){var G="separator"in v?v.separator:G;M="length"in v?Ft(v.length):M,z="omission"in v?fi(v.omission):z}i=un(i);var ee=i.length;if(oe(i)){var le=Mt(i);ee=le.length}if(M>=ee)return i;var de=M-Ut(z);if(de<1)return z;var ve=le?ns(le,0,de).join(""):i.slice(0,de);if(G===n)return ve+z;if(le&&(de+=ve.length-de),nf(G)){if(i.slice(de).search(G)){var Ie,Le=ve;for(G.global||(G=Wr(G.source,un(ai.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Le);)var Ne=Ie.index;ve=ve.slice(0,Ne===n?de:Ne)}}else if(i.indexOf(fi(G),de)!=de){var Qe=ve.lastIndexOf(G);Qe>-1&&(ve=ve.slice(0,Qe))}return ve+z}function aD(i){return i=un(i),i&&Wo.test(i)?i.replace(xr,yt):i}var lD=ba(function(i,v,M){return i+(M?" ":"")+v.toUpperCase()}),sf=X0("toUpperCase");function Gb(i,v,M){return i=un(i),v=M?n:v,v===n?pe(i)?In(i):Y(i):i.match(v)||[]}var Yb=zt(function(i,v){try{return pr(i,n,v)}catch(M){return tf(M)?M:new ft(M)}}),cD=Mo(function(i,v){return Cr(v,function(M){M=uo(M),To(i,M,Jd(i[M],i))}),i});function uD(i){var v=i==null?0:i.length,M=bt();return i=v?y(i,function(z){if(typeof z[1]!="function")throw new pn(p);return[M(z[0]),z[1]]}):[],zt(function(z){for(var G=-1;++G<v;){var ee=i[G];if(pr(ee[0],this,z))return pr(ee[1],this,z)}})}function hD(i){return NI($i(i,a))}function af(i){return function(){return i}}function dD(i,v){return i==null||i!==i?v:i}var fD=Z0(),pD=Z0(!0);function ni(i){return i}function lf(i){return $0(typeof i=="function"?i:$i(i,a))}function gD(i){return E0($i(i,a))}function mD(i,v){return I0(i,$i(v,a))}var vD=zt(function(i,v){return function(M){return sl(M,i,v)}}),yD=zt(function(i,v){return function(M){return sl(i,M,v)}});function cf(i,v,M){var z=yr(v),G=Dc(v,z);M==null&&!(Dn(v)&&(G.length||!z.length))&&(M=v,v=i,i=this,G=Dc(v,yr(v)));var ee=!(Dn(M)&&"chain"in M)||!!M.chain,le=Io(i);return Cr(G,function(de){var ve=v[de];i[de]=ve,le&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Le=i(this.__wrapped__),Ne=Le.__actions__=Jr(this.__actions__);return Ne.push({func:ve,args:arguments,thisArg:i}),Le.__chain__=Ie,Le}return ve.apply(i,$([this.value()],arguments))})}),i}function bD(){return fn._===this&&(fn._=VE),this}function uf(){}function wD(i){return i=Ft(i),zt(function(v){return L0(v,i)})}var xD=Wd(y),CD=Wd(kr),kD=Wd(B);function Xb(i){return Kd(i)?be(uo(i)):JI(i)}function _D(i){return function(v){return i==null?n:Fs(i,v)}}var SD=eb(),AD=eb(!0);function hf(){return[]}function df(){return!1}function TD(){return{}}function $D(){return""}function MD(){return!0}function ED(i,v){if(i=Ft(i),i<1||i>U)return[];var M=te,z=Or(i,te);v=bt(v),i-=te;for(var G=tt(z,v);++M<i;)v(M);return G}function ID(i){return It(i)?y(i,uo):pi(i)?[i]:Jr(mb(un(i)))}function LD(i){var v=++HE;return un(i)+v}var RD=jc(function(i,v){return i+v},0),OD=jd("ceil"),DD=jc(function(i,v){return i/v},1),ND=jd("floor");function FD(i){return i&&i.length?Oc(i,ni,Ad):n}function PD(i,v){return i&&i.length?Oc(i,bt(v,2),Ad):n}function BD(i){return me(i,ni)}function WD(i,v){return me(i,bt(v,2))}function jD(i){return i&&i.length?Oc(i,ni,Ed):n}function zD(i,v){return i&&i.length?Oc(i,bt(v,2),Ed):n}var HD=jc(function(i,v){return i*v},1),UD=jd("round"),VD=jc(function(i,v){return i-v},0);function qD(i){return i&&i.length?ht(i,ni):0}function KD(i,v){return i&&i.length?ht(i,bt(v,2)):0}return J.after=gO,J.ary=Tb,J.assign=n2,J.assignIn=jb,J.assignInWith=eu,J.assignWith=r2,J.at=i2,J.before=$b,J.bind=Jd,J.bindAll=cD,J.bindKey=Mb,J.castArray=TO,J.chain=_b,J.chunk=NL,J.compact=FL,J.concat=PL,J.cond=uD,J.conforms=hD,J.constant=af,J.countBy=qR,J.create=o2,J.curry=Eb,J.curryRight=Ib,J.debounce=Lb,J.defaults=s2,J.defaultsDeep=a2,J.defer=mO,J.delay=vO,J.difference=BL,J.differenceBy=WL,J.differenceWith=jL,J.drop=zL,J.dropRight=HL,J.dropRightWhile=UL,J.dropWhile=VL,J.fill=qL,J.filter=GR,J.flatMap=QR,J.flatMapDeep=ZR,J.flatMapDepth=JR,J.flatten=wb,J.flattenDeep=KL,J.flattenDepth=GL,J.flip=yO,J.flow=fD,J.flowRight=pD,J.fromPairs=YL,J.functions=p2,J.functionsIn=g2,J.groupBy=eO,J.initial=QL,J.intersection=ZL,J.intersectionBy=JL,J.intersectionWith=eR,J.invert=v2,J.invertBy=y2,J.invokeMap=nO,J.iteratee=lf,J.keyBy=rO,J.keys=yr,J.keysIn=ti,J.map=Gc,J.mapKeys=w2,J.mapValues=x2,J.matches=gD,J.matchesProperty=mD,J.memoize=Xc,J.merge=C2,J.mergeWith=zb,J.method=vD,J.methodOf=yD,J.mixin=cf,J.negate=Qc,J.nthArg=wD,J.omit=k2,J.omitBy=_2,J.once=bO,J.orderBy=iO,J.over=xD,J.overArgs=wO,J.overEvery=CD,J.overSome=kD,J.partial=ef,J.partialRight=Rb,J.partition=oO,J.pick=S2,J.pickBy=Hb,J.property=Xb,J.propertyOf=_D,J.pull=iR,J.pullAll=Cb,J.pullAllBy=oR,J.pullAllWith=sR,J.pullAt=aR,J.range=SD,J.rangeRight=AD,J.rearg=xO,J.reject=lO,J.remove=lR,J.rest=CO,J.reverse=Qd,J.sampleSize=uO,J.set=T2,J.setWith=$2,J.shuffle=hO,J.slice=cR,J.sortBy=pO,J.sortedUniq=mR,J.sortedUniqBy=vR,J.split=Q2,J.spread=kO,J.tail=yR,J.take=bR,J.takeRight=wR,J.takeRightWhile=xR,J.takeWhile=CR,J.tap=FR,J.throttle=_O,J.thru=Kc,J.toArray=Pb,J.toPairs=Ub,J.toPairsIn=Vb,J.toPath=ID,J.toPlainObject=Wb,J.transform=M2,J.unary=SO,J.union=kR,J.unionBy=_R,J.unionWith=SR,J.uniq=AR,J.uniqBy=TR,J.uniqWith=$R,J.unset=E2,J.unzip=Zd,J.unzipWith=kb,J.update=I2,J.updateWith=L2,J.values=Ca,J.valuesIn=R2,J.without=MR,J.words=Gb,J.wrap=AO,J.xor=ER,J.xorBy=IR,J.xorWith=LR,J.zip=RR,J.zipObject=OR,J.zipObjectDeep=DR,J.zipWith=NR,J.entries=Ub,J.entriesIn=Vb,J.extend=jb,J.extendWith=eu,cf(J,J),J.add=RD,J.attempt=Yb,J.camelCase=F2,J.capitalize=qb,J.ceil=OD,J.clamp=O2,J.clone=$O,J.cloneDeep=EO,J.cloneDeepWith=IO,J.cloneWith=MO,J.conformsTo=LO,J.deburr=Kb,J.defaultTo=dD,J.divide=DD,J.endsWith=P2,J.eq=Gi,J.escape=B2,J.escapeRegExp=W2,J.every=KR,J.find=YR,J.findIndex=yb,J.findKey=l2,J.findLast=XR,J.findLastIndex=bb,J.findLastKey=c2,J.floor=ND,J.forEach=Sb,J.forEachRight=Ab,J.forIn=u2,J.forInRight=h2,J.forOwn=d2,J.forOwnRight=f2,J.get=rf,J.gt=RO,J.gte=OO,J.has=m2,J.hasIn=of,J.head=xb,J.identity=ni,J.includes=tO,J.indexOf=XL,J.inRange=D2,J.invoke=b2,J.isArguments=Ws,J.isArray=It,J.isArrayBuffer=DO,J.isArrayLike=ei,J.isArrayLikeObject=Zn,J.isBoolean=NO,J.isBuffer=rs,J.isDate=FO,J.isElement=PO,J.isEmpty=BO,J.isEqual=WO,J.isEqualWith=jO,J.isError=tf,J.isFinite=zO,J.isFunction=Io,J.isInteger=Ob,J.isLength=Zc,J.isMap=Db,J.isMatch=HO,J.isMatchWith=UO,J.isNaN=VO,J.isNative=qO,J.isNil=GO,J.isNull=KO,J.isNumber=Nb,J.isObject=Dn,J.isObjectLike=Un,J.isPlainObject=dl,J.isRegExp=nf,J.isSafeInteger=YO,J.isSet=Fb,J.isString=Jc,J.isSymbol=pi,J.isTypedArray=xa,J.isUndefined=XO,J.isWeakMap=QO,J.isWeakSet=ZO,J.join=tR,J.kebabCase=j2,J.last=Ei,J.lastIndexOf=nR,J.lowerCase=z2,J.lowerFirst=H2,J.lt=JO,J.lte=e2,J.max=FD,J.maxBy=PD,J.mean=BD,J.meanBy=WD,J.min=jD,J.minBy=zD,J.stubArray=hf,J.stubFalse=df,J.stubObject=TD,J.stubString=$D,J.stubTrue=MD,J.multiply=HD,J.nth=rR,J.noConflict=bD,J.noop=uf,J.now=Yc,J.pad=U2,J.padEnd=V2,J.padStart=q2,J.parseInt=K2,J.random=N2,J.reduce=sO,J.reduceRight=aO,J.repeat=G2,J.replace=Y2,J.result=A2,J.round=UD,J.runInContext=fe,J.sample=cO,J.size=dO,J.snakeCase=X2,J.some=fO,J.sortedIndex=uR,J.sortedIndexBy=hR,J.sortedIndexOf=dR,J.sortedLastIndex=fR,J.sortedLastIndexBy=pR,J.sortedLastIndexOf=gR,J.startCase=Z2,J.startsWith=J2,J.subtract=VD,J.sum=qD,J.sumBy=KD,J.template=eD,J.times=ED,J.toFinite=Lo,J.toInteger=Ft,J.toLength=Bb,J.toLower=tD,J.toNumber=Ii,J.toSafeInteger=t2,J.toString=un,J.toUpper=nD,J.trim=rD,J.trimEnd=iD,J.trimStart=oD,J.truncate=sD,J.unescape=aD,J.uniqueId=LD,J.upperCase=lD,J.upperFirst=sf,J.each=Sb,J.eachRight=Ab,J.first=xb,cf(J,function(){var i={};return lo(J,function(v,M){dn.call(J.prototype,M)||(i[M]=v)}),i}(),{chain:!1}),J.VERSION=r,Cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),Cr(["drop","take"],function(i,v){Yt.prototype[i]=function(M){M=M===n?1:dr(Ft(M),0);var z=this.__filtered__&&!v?new Yt(this):this.clone();return z.__filtered__?z.__takeCount__=Or(M,z.__takeCount__):z.__views__.push({size:Or(M,te),type:i+(z.__dir__<0?"Right":"")}),z},Yt.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),Cr(["filter","map","takeWhile"],function(i,v){var M=v+1,z=M==A||M==D;Yt.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:bt(G,3),type:M}),ee.__filtered__=ee.__filtered__||z,ee}}),Cr(["head","last"],function(i,v){var M="take"+(v?"Right":"");Yt.prototype[i]=function(){return this[M](1).value()[0]}}),Cr(["initial","tail"],function(i,v){var M="drop"+(v?"":"Right");Yt.prototype[i]=function(){return this.__filtered__?new Yt(this):this[M](1)}}),Yt.prototype.compact=function(){return this.filter(ni)},Yt.prototype.find=function(i){return this.filter(i).head()},Yt.prototype.findLast=function(i){return this.reverse().find(i)},Yt.prototype.invokeMap=zt(function(i,v){return typeof i=="function"?new Yt(this):this.map(function(M){return sl(M,i,v)})}),Yt.prototype.reject=function(i){return this.filter(Qc(bt(i)))},Yt.prototype.slice=function(i,v){i=Ft(i);var M=this;return M.__filtered__&&(i>0||v<0)?new Yt(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),v!==n&&(v=Ft(v),M=v<0?M.dropRight(-v):M.take(v-i)),M)},Yt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Yt.prototype.toArray=function(){return this.take(te)},lo(Yt.prototype,function(i,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),z=/^(?:head|last)$/.test(v),G=J[z?"take"+(v=="last"?"Right":""):v],ee=z||/^find/.test(v);G&&(J.prototype[v]=function(){var le=this.__wrapped__,de=z?[1]:arguments,ve=le instanceof Yt,Ie=de[0],Le=ve||It(le),Ne=function(Vt){var Zt=G.apply(J,$([Vt],de));return z&&Qe?Zt[0]:Zt};Le&&M&&typeof Ie=="function"&&Ie.length!=1&&(ve=Le=!1);var Qe=this.__chain__,ct=!!this.__actions__.length,wt=ee&&!Qe,Wt=ve&&!ct;if(!ee&&Le){le=Wt?le:new Yt(this);var xt=i.apply(le,de);return xt.__actions__.push({func:Kc,args:[Ne],thisArg:n}),new Ti(xt,Qe)}return wt&&Wt?i.apply(this,de):(xt=this.thru(Ne),wt?z?xt.value()[0]:xt.value():xt)})}),Cr(["pop","push","shift","sort","splice","unshift"],function(i){var v=vr[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",z=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(z&&!this.__chain__){var ee=this.value();return v.apply(It(ee)?ee:[],G)}return this[M](function(le){return v.apply(It(le)?le:[],G)})}}),lo(Yt.prototype,function(i,v){var M=J[v];if(M){var z=M.name+"";dn.call(ma,z)||(ma[z]=[]),ma[z].push({name:v,func:M})}}),ma[Wc(n,w).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=aI,Yt.prototype.reverse=lI,Yt.prototype.value=cI,J.prototype.at=PR,J.prototype.chain=BR,J.prototype.commit=WR,J.prototype.next=jR,J.prototype.plant=HR,J.prototype.reverse=UR,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=VR,J.prototype.first=J.prototype.head,Ja&&(J.prototype[Ja]=zR),J},Qt=or();rr?((rr.exports=Qt)._=Qt,An._=Qt):fn._=Qt}).call(xk)}(Dl,Dl.exports)),Dl.exports}var kk=Ck();sr("O",ml(kk)).debounce(function(){this.rebuildDisplayText()},300);var mg={exports:{}},vg;function _k(){return vg||(vg=1,function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()}(mg)),mg.exports}_k();const Sk=!0,ar="u-",Ak="uplot",Tk=ar+"hz",$k=ar+"vt",Mk=ar+"title",Ek=ar+"wrap",Ik=ar+"under",Lk=ar+"over",Rk=ar+"axis",ps=ar+"off",Ok=ar+"select",Dk=ar+"cursor-x",Nk=ar+"cursor-y",Fk=ar+"cursor-pt",Pk=ar+"legend",Bk=ar+"live",Wk=ar+"inline",jk=ar+"series",zk=ar+"marker",yg=ar+"label",Hk=ar+"value",Ra="width",Oa="height",Da="top",bg="bottom",Gs="left",Ru="right",Ou="#000",wg=Ou+"0",Du="mousemove",xg="mousedown",Nu="mouseup",Cg="mouseenter",kg="mouseleave",_g="dblclick",Uk="resize",Vk="scroll",Sg="change",Nl="dppxchange",Fu="--",Ys=typeof window<"u",Pu=Ys?document:null,Xs=Ys?window:null,qk=Ys?navigator:null;let rn,Fl;function Bu(){let t=devicePixelRatio;rn!=t&&(rn=t,Fl&&zu(Sg,Fl,Bu),Fl=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),gs(Sg,Fl,Bu),Xs.dispatchEvent(new CustomEvent(Nl)))}function ri(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function Wu(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function Sn(t,e,n){t.style[e]=n+"px"}function Ni(t,e,n,r){let f=Pu.createElement(t);return e!=null&&ri(f,e),n!=null&&n.insertBefore(f,r),f}function vi(t,e){return Ni("div",t,e)}const Ag=new WeakMap;function Zi(t,e,n,r,f){let d="translate("+e+"px,"+n+"px)",p=Ag.get(t);d!=p&&(t.style.transform=d,Ag.set(t,d),e<0||n<0||e>r||n>f?ri(t,ps):Wu(t,ps))}const Tg=new WeakMap;function $g(t,e,n){let r=e+n,f=Tg.get(t);r!=f&&(Tg.set(t,r),t.style.background=e,t.style.borderColor=n)}const Mg=new WeakMap;function Eg(t,e,n,r){let f=e+""+n,d=Mg.get(t);f!=d&&(Mg.set(t,f),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=r?-e/2+"px":0,t.style.marginTop=r?-n/2+"px":0)}const ju={passive:!0},Kk={...ju,capture:!0};function gs(t,e,n,r){e.addEventListener(t,n,r?Kk:ju)}function zu(t,e,n,r){e.removeEventListener(t,n,ju)}Ys&&Bu();function Fi(t,e,n,r){let f;n=n||0,r=r||e.length-1;let d=r<=2147483647;for(;r-n>1;)f=d?n+r>>1:oi((n+r)/2),e[f]<t?n=f:r=f;return t-e[n]<=e[r]-t?n:r}function Ig(t){return(e,n,r)=>{let f=-1,d=-1;for(let p=n;p<=r;p++)if(t(e[p])){f=p;break}for(let p=r;p>=n;p--)if(t(e[p])){d=p;break}return[f,d]}}const Lg=t=>t!=null,Rg=t=>t!=null&&t>0,Pl=Ig(Lg),Gk=Ig(Rg);function Yk(t,e,n,r=0,f=!1){let d=f?Gk:Pl,p=f?Rg:Lg;[e,n]=d(t,e,n);let b=t[e],h=t[e];if(e>-1)if(r==1)b=t[e],h=t[n];else if(r==-1)b=t[n],h=t[e];else for(let g=e;g<=n;g++){let s=t[g];p(s)&&(s<b?b=s:s>h&&(h=s))}return[b??br,h??-1/0]}function Bl(t,e,n,r){let f=Ng(t),d=Ng(e);t==e&&(f==-1?(t*=n,e/=n):(t/=n,e*=n));let p=n==10?ho:Fg,b=f==1?oi:yi,h=d==1?yi:oi,g=b(p(lr(t))),s=h(p(lr(e))),a=Qs(n,g),c=Qs(n,s);return n==10&&(g<0&&(a=mn(a,-g)),s<0&&(c=mn(c,-s))),r||n==2?(t=a*f,e=c*d):(t=Ug(t,a),e=zl(e,c)),[t,e]}function Hu(t,e,n,r){let f=Bl(t,e,n,r);return t==0&&(f[0]=0),e==0&&(f[1]=0),f}const Uu=.1,Og={mode:3,pad:Uu},Na={pad:0,soft:null,mode:0},Xk={min:Na,max:Na};function Wl(t,e,n,r){return Hl(n)?Dg(t,e,n):(Na.pad=n,Na.soft=r?0:null,Na.mode=r?3:0,Dg(t,e,Xk))}function tn(t,e){return t??e}function Qk(t,e,n){for(e=tn(e,0),n=tn(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function Dg(t,e,n){let r=n.min,f=n.max,d=tn(r.pad,0),p=tn(f.pad,0),b=tn(r.hard,-1/0),h=tn(f.hard,br),g=tn(r.soft,br),s=tn(f.soft,-1/0),a=tn(r.mode,0),c=tn(f.mode,0),l=e-t,o=ho(l),u=Nr(lr(t),lr(e)),m=ho(u),w=lr(m-o);(l<1e-24||w>10)&&(l=0,(t==0||e==0)&&(l=1e-24,a==2&&g!=br&&(d=0),c==2&&s!=-1/0&&(p=0)));let x=l||u||1e3,E=ho(x),T=Qs(10,oi(E)),k=x*(l==0?t==0?.1:1:d),C=mn(Ug(t-k,T/10),24),L=t>=g&&(a==1||a==3&&C<=g||a==2&&C>=g)?g:br,R=Nr(b,C<L&&t>=L?L:Pi(L,C)),F=x*(l==0?e==0?.1:1:p),I=mn(zl(e+F,T/10),24),H=e<=s&&(c==1||c==3&&I>=s||c==2&&I<=s)?s:-1/0,P=Pi(h,I>H&&e<=H?H:Nr(H,I));return R==P&&R==0&&(P=100),[R,P]}const Zk=new Intl.NumberFormat(Ys?qk.language:"en-US"),Vu=t=>Zk.format(t),ii=Math,jl=ii.PI,lr=ii.abs,oi=ii.floor,cr=ii.round,yi=ii.ceil,Pi=ii.min,Nr=ii.max,Qs=ii.pow,Ng=ii.sign,ho=ii.log10,Fg=ii.log2,Jk=(t,e=1)=>ii.sinh(t)*e,qu=(t,e=1)=>ii.asinh(t/e),br=1/0;function Pg(t){return(ho((t^t>>31)-(t>>31))|0)+1}function Ku(t,e,n){return Pi(Nr(t,e),n)}function Bg(t){return typeof t=="function"}function qt(t){return Bg(t)?t:()=>t}const e_=()=>{},Wg=t=>t,jg=(t,e)=>e,t_=t=>null,zg=t=>!0,Hg=(t,e)=>t==e,n_=/\.\d*?(?=9{6,}|0{6,})/gm,ms=t=>{if(qg(t)||Po.has(t))return t;const e=`${t}`,n=e.match(n_);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[f,d]=e.split("e");return+`${ms(f)}e${d}`}return mn(t,r)};function vs(t,e){return ms(mn(ms(t/e))*e)}function zl(t,e){return ms(yi(ms(t/e))*e)}function Ug(t,e){return ms(oi(ms(t/e))*e)}function mn(t,e=0){if(qg(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return cr(r)/n}const Po=new Map;function Vg(t){return((""+t).split(".")[1]||"").length}function Fa(t,e,n,r){let f=[],d=r.map(Vg);for(let p=e;p<n;p++){let b=lr(p),h=mn(Qs(t,p),b);for(let g=0;g<r.length;g++){let s=t==10?+`${r[g]}e${p}`:r[g]*h,a=(p>=0?0:b)+(p>=d[g]?0:d[g]),c=t==10?s:mn(s,a);f.push(c),Po.set(c,a)}}return f}const Pa={},Gu=[],Zs=[null,null],Bo=Array.isArray,qg=Number.isInteger,r_=t=>t===void 0;function Kg(t){return typeof t=="string"}function Hl(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function i_(t){return t!=null&&typeof t=="object"}const o_=Object.getPrototypeOf(Uint8Array),Gg="__proto__";function Js(t,e=Hl){let n;if(Bo(t)){let r=t.find(f=>f!=null);if(Bo(r)||e(r)){n=Array(t.length);for(let f=0;f<t.length;f++)n[f]=Js(t[f],e)}else n=t.slice()}else if(t instanceof o_)n=t.slice();else if(e(t)){n={};for(let r in t)r!=Gg&&(n[r]=Js(t[r],e))}else n=t;return n}function tr(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let f in r)f!=Gg&&(Hl(t[f])?tr(t[f],Js(r[f])):t[f]=Js(r[f]))}return t}const s_=0,a_=1,l_=2;function c_(t,e,n){for(let r=0,f,d=-1;r<e.length;r++){let p=e[r];if(p>d){for(f=p-1;f>=0&&t[f]==null;)t[f--]=null;for(f=p+1;f<n&&t[f]==null;)t[d=f++]=null}}}function u_(t,e){if(f_(t)){let p=t[0].slice();for(let b=1;b<t.length;b++)p.push(...t[b].slice(1));return p_(p[0])||(p=d_(p)),p}let n=new Set;for(let p=0;p<t.length;p++){let b=t[p][0],h=b.length;for(let g=0;g<h;g++)n.add(b[g])}let r=[Array.from(n).sort((p,b)=>p-b)],f=r[0].length,d=new Map;for(let p=0;p<f;p++)d.set(r[0][p],p);for(let p=0;p<t.length;p++){let b=t[p],h=b[0];for(let g=1;g<b.length;g++){let s=b[g],a=Array(f).fill(void 0),c=e?e[p][g]:a_,l=[];for(let o=0;o<s.length;o++){let u=s[o],m=d.get(h[o]);u===null?c!=s_&&(a[m]=u,c==l_&&l.push(m)):a[m]=u}c_(a,l,f),r.push(a)}}return r}const h_=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function d_(t){let e=t[0],n=e.length,r=Array(n);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,p)=>e[d]-e[p]);let f=[];for(let d=0;d<t.length;d++){let p=t[d],b=Array(n);for(let h=0;h<n;h++)b[h]=p[r[h]];f.push(b)}return f}function f_(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let f=t[r][0];if(f.length!=n)return!1;if(f!=e){for(let d=0;d<n;d++)if(f[d]!=e[d])return!1}}return!0}function p_(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,f=n-1;for(;r<=f&&t[r]==null;)r++;for(;f>=r&&t[f]==null;)f--;if(f<=r)return!0;const d=Nr(1,oi((f-r+1)/e));for(let p=t[r],b=r+d;b<=f;b+=d){const h=t[b];if(h!=null){if(h<=p)return!1;p=h}}return!0}const Yg=["January","February","March","April","May","June","July","August","September","October","November","December"],Xg=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Qg(t){return t.slice(0,3)}const g_=Xg.map(Qg),m_=Yg.map(Qg),v_={MMMM:Yg,MMM:m_,WWWW:Xg,WWW:g_};function Ba(t){return(t<10?"0":"")+t}function y_(t){return(t<10?"00":t<100?"0":"")+t}const b_={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>Ba(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Ba(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>Ba(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>Ba(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Ba(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>y_(t.getMilliseconds())};function Yu(t,e){e=e||v_;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,f;for(;f=r.exec(t);)n.push(f[0][0]=="{"?b_[f[1]]:f[0]);return d=>{let p="";for(let b=0;b<n.length;b++)p+=typeof n[b]=="string"?n[b]:n[b](d,e);return p}}const w_=new Intl.DateTimeFormat().resolvedOptions().timeZone;function x_(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==w_?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const Zg=t=>t%1==0,Ul=[1,2,2.5,5],C_=Fa(10,-32,0,Ul),Jg=Fa(10,0,32,Ul),k_=Jg.filter(Zg),ys=C_.concat(Jg),Xu=`
1488
+ `,em="{YYYY}",tm=Xu+em,nm="{M}/{D}",Wa=Xu+nm,Vl=Wa+"/{YY}",rm="{aa}",__="{h}:{mm}",ea=__+rm,im=Xu+ea,om=":{ss}",cn=null;function sm(t){let e=t*1e3,n=e*60,r=n*60,f=r*24,d=f*30,p=f*365,b=(t==1?Fa(10,0,3,Ul).filter(Zg):Fa(10,-3,0,Ul)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,f,f*2,f*3,f*4,f*5,f*6,f*7,f*8,f*9,f*10,f*15,d,d*2,d*3,d*4,d*6,p,p*2,p*5,p*10,p*25,p*50,p*100]);const h=[[p,em,cn,cn,cn,cn,cn,cn,1],[f*28,"{MMM}",tm,cn,cn,cn,cn,cn,1],[f,nm,tm,cn,cn,cn,cn,cn,1],[r,"{h}"+rm,Vl,cn,Wa,cn,cn,cn,1],[n,ea,Vl,cn,Wa,cn,cn,cn,1],[e,om,Vl+" "+ea,cn,Wa+" "+ea,cn,im,cn,1],[t,om+".{fff}",Vl+" "+ea,cn,Wa+" "+ea,cn,im,cn,1]];function g(s){return(a,c,l,o,u,m)=>{let w=[],x=u>=p,E=u>=d&&u<p,T=s(l),k=mn(T*t,3),C=Qu(T.getFullYear(),x?0:T.getMonth(),E||x?1:T.getDate()),L=mn(C*t,3);if(E||x){let R=E?u/d:0,F=x?u/p:0,I=k==L?k:mn(Qu(C.getFullYear()+F,C.getMonth()+R,1)*t,3),H=new Date(cr(I/t)),P=H.getFullYear(),O=H.getMonth();for(let A=0;I<=o;A++){let S=Qu(P+F*A,O+R*A,1),D=S-s(mn(S*t,3));I=mn((+S+D)*t,3),I<=o&&w.push(I)}}else{let R=u>=f?f:u,F=oi(l)-oi(k),I=L+F+zl(k-L,R);w.push(I);let H=s(I),P=H.getHours()+H.getMinutes()/n+H.getSeconds()/r,O=u/r,A=a.axes[c]._space,S=m/A;for(;I=mn(I+u,t==1?0:3),!(I>o);)if(O>1){let D=oi(mn(P+O,6))%24,W=s(I).getHours()-D;W>1&&(W=-1),I-=W*r,P=(P+O)%24;let U=w[w.length-1];mn((I-U)/u,3)*S>=.7&&w.push(I)}else w.push(I)}return w}}return[b,h,g]}const[S_,A_,T_]=sm(1),[$_,M_,E_]=sm(.001);Fa(2,-53,53,[1]);function am(t,e){return t.map(n=>n.map((r,f)=>f==0||f==8||r==null?r:e(f==1||n[8]==0?r:n[1]+r)))}function lm(t,e){return(n,r,f,d,p)=>{let b=e.find(o=>p>=o[0])||e[e.length-1],h,g,s,a,c,l;return r.map(o=>{let u=t(o),m=u.getFullYear(),w=u.getMonth(),x=u.getDate(),E=u.getHours(),T=u.getMinutes(),k=u.getSeconds(),C=m!=h&&b[2]||w!=g&&b[3]||x!=s&&b[4]||E!=a&&b[5]||T!=c&&b[6]||k!=l&&b[7]||b[1];return h=m,g=w,s=x,a=E,c=T,l=k,C(u)})}}function I_(t,e){let n=Yu(e);return(r,f,d,p,b)=>f.map(h=>n(t(h)))}function Qu(t,e,n){return new Date(t,e,n)}function cm(t,e){return e(t)}const L_="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function um(t,e){return(n,r,f,d)=>d==null?Fu:e(t(r))}function R_(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function O_(t,e){return t.series[e].fill(t,e)}const D_={show:!0,live:!0,isolate:!1,mount:e_,markers:{show:!0,width:2,stroke:R_,fill:O_,dash:"solid"},idx:null,idxs:null,values:[]};function N_(t,e){let n=t.cursor.points,r=vi(),f=n.size(t,e);Sn(r,Ra,f),Sn(r,Oa,f);let d=f/-2;Sn(r,"marginLeft",d),Sn(r,"marginTop",d);let p=n.width(t,e,f);return p&&Sn(r,"borderWidth",p),r}function F_(t,e){let n=t.series[e].points;return n._fill||n._stroke}function P_(t,e){let n=t.series[e].points;return n._stroke||n._fill}function B_(t,e){return t.series[e].points.size}const Zu=[0,0];function W_(t,e,n){return Zu[0]=e,Zu[1]=n,Zu}function ql(t,e,n,r=!0){return f=>{f.button==0&&(!r||f.target==e)&&n(f)}}function Ju(t,e,n,r=!0){return f=>{(!r||f.target==e)&&n(f)}}const j_={show:!0,x:!0,y:!0,lock:!1,move:W_,points:{one:!1,show:N_,size:B_,width:0,stroke:P_,fill:F_},bind:{mousedown:ql,mouseup:ql,click:ql,dblclick:ql,mousemove:Ju,mouseleave:Ju,mouseenter:Ju},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,r,f)=>r-f,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},hm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},eh=tr({},hm,{filter:jg}),dm=tr({},eh,{size:10}),fm=tr({},hm,{show:!1}),th='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"',pm="bold "+th,gm=1.5,mm={show:!0,scale:"x",stroke:Ou,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:pm,side:2,grid:eh,ticks:dm,border:fm,font:th,lineGap:gm,rotate:0},z_="Value",H_="Time",vm={show:!0,scale:"x",auto:!1,sorted:1,min:br,max:-1/0,idxs:[]};function U_(t,e,n,r,f){return e.map(d=>d==null?"":Vu(d))}function V_(t,e,n,r,f,d,p){let b=[],h=Po.get(f)||0;n=p?n:mn(zl(n,f),h);for(let g=n;g<=r;g=mn(g+f,h))b.push(Object.is(g,-0)?0:g);return b}function nh(t,e,n,r,f,d,p){const b=[],h=t.scales[t.axes[e].scale].log,g=h==10?ho:Fg,s=oi(g(n));f=Qs(h,s),h==10&&(f=ys[Fi(f,ys)]);let a=n,c=f*h;h==10&&(c=ys[Fi(c,ys)]);do b.push(a),a=a+f,h==10&&!Po.has(a)&&(a=mn(a,Po.get(f))),a>=c&&(f=a,c=f*h,h==10&&(c=ys[Fi(c,ys)]));while(a<=r);return b}function q_(t,e,n,r,f,d,p){let b=t.scales[t.axes[e].scale].asinh,h=r>b?nh(t,e,Nr(b,n),r,f):[b],g=r>=0&&n<=0?[0]:[];return(n<-b?nh(t,e,Nr(b,-r),-n,f):[b]).reverse().map(s=>-s).concat(g,h)}const ym=/./,K_=/[12357]/,G_=/[125]/,bm=/1/,rh=(t,e,n,r)=>t.map((f,d)=>e==4&&f==0||d%r==0&&n.test(f.toExponential()[f<0?1:0])?f:null);function Y_(t,e,n,r,f){let d=t.axes[n],p=d.scale,b=t.scales[p],h=t.valToPos,g=d._space,s=h(10,p),a=h(9,p)-s>=g?ym:h(7,p)-s>=g?K_:h(5,p)-s>=g?G_:bm;if(a==bm){let c=lr(h(1,p)-s);if(c<g)return rh(e.slice().reverse(),b.distr,a,yi(g/c)).reverse()}return rh(e,b.distr,a,1)}function X_(t,e,n,r,f){let d=t.axes[n],p=d.scale,b=d._space,h=t.valToPos,g=lr(h(1,p)-h(2,p));return g<b?rh(e.slice().reverse(),3,ym,yi(b/g)).reverse():e}function Q_(t,e,n,r){return r==null?Fu:e==null?"":Vu(e)}const wm={show:!0,scale:"y",stroke:Ou,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:pm,side:3,grid:eh,ticks:dm,border:fm,font:th,lineGap:gm,rotate:0};function Z_(t,e){let n=3+(t||1)*2;return mn(n*e,3)}function J_(t,e){let{scale:n,idxs:r}=t.series[0],f=t._data[0],d=t.valToPos(f[r[0]],n,!0),p=t.valToPos(f[r[1]],n,!0),b=lr(p-d),h=t.series[e],g=b/(h.points.space*rn);return r[1]-r[0]<=g}const xm={scale:null,auto:!0,sorted:0,min:br,max:-1/0},Cm=(t,e,n,r,f)=>f,km={show:!0,auto:!0,sorted:0,gaps:Cm,alpha:1,facets:[tr({},xm,{scale:"x"}),tr({},xm,{scale:"y"})]},_m={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Cm,alpha:1,points:{show:J_,filter:null},values:null,min:br,max:-1/0,idxs:[],path:null,clip:null};function eS(t,e,n,r,f){return n/10}const Sm={time:Sk,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},tS=tr({},Sm,{time:!1,ori:1}),Am={};function Tm(t,e){let n=Am[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(f=>f!=r)},pub(r,f,d,p,b,h,g){for(let s=0;s<n.plots.length;s++)n.plots[s]!=f&&n.plots[s].pub(r,f,d,p,b,h,g)}},t!=null&&(Am[t]=n)),n}const ta=1,ih=2;function bs(t,e,n){const r=t.mode,f=t.series[e],d=r==2?t._data[e]:t._data,p=t.scales,b=t.bbox;let h=d[0],g=r==2?d[1]:d[e],s=r==2?p[f.facets[0].scale]:p[t.series[0].scale],a=r==2?p[f.facets[1].scale]:p[f.scale],c=b.left,l=b.top,o=b.width,u=b.height,m=t.valToPosH,w=t.valToPosV;return s.ori==0?n(f,h,g,s,a,m,w,c,l,o,u,Gl,na,Xl,Em,Lm):n(f,h,g,s,a,w,m,l,c,u,o,Yl,ra,ah,Im,Rm)}function oh(t,e){let n=0,r=0,f=tn(t.bands,Gu);for(let d=0;d<f.length;d++){let p=f[d];p.series[0]==e?n=p.dir:p.series[1]==e&&(p.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function nS(t,e,n,r,f){let d=t.mode,p=t.series[e],b=d==2?p.facets[1].scale:p.scale,h=t.scales[b];return f==-1?h.min:f==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function fo(t,e,n,r,f,d){return bs(t,e,(p,b,h,g,s,a,c,l,o,u,m)=>{let w=p.pxRound;const x=g.dir*(g.ori==0?1:-1),E=g.ori==0?na:ra;let T,k;x==1?(T=n,k=r):(T=r,k=n);let C=w(a(b[T],g,u,l)),L=w(c(h[T],s,m,o)),R=w(a(b[k],g,u,l)),F=w(c(d==1?s.max:s.min,s,m,o)),I=new Path2D(f);return E(I,R,F),E(I,C,F),E(I,C,L),I})}function Kl(t,e,n,r,f,d){let p=null;if(t.length>0){p=new Path2D;const b=e==0?Xl:ah;let h=n;for(let a=0;a<t.length;a++){let c=t[a];if(c[1]>c[0]){let l=c[0]-h;l>0&&b(p,h,r,l,r+d),h=c[1]}}let g=n+f-h,s=10;g>0&&b(p,h,r-s/2,g,r+d+s)}return p}function rS(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function sh(t,e,n,r,f,d,p){let b=[],h=t.length;for(let g=f==1?n:r;g>=n&&g<=r;g+=f)if(e[g]===null){let s=g,a=g;if(f==1)for(;++g<=r&&e[g]===null;)a=g;else for(;--g>=n&&e[g]===null;)a=g;let c=d(t[s]),l=a==s?c:d(t[a]),o=s-f;c=p<=0&&o>=0&&o<h?d(t[o]):c;let u=a+f;l=p>=0&&u>=0&&u<h?d(t[u]):l,l>=c&&b.push([c,l])}return b}function $m(t){return t==0?Wg:t==1?cr:e=>vs(e,t)}function Mm(t){let e=t==0?Gl:Yl,n=t==0?(f,d,p,b,h,g)=>{f.arcTo(d,p,b,h,g)}:(f,d,p,b,h,g)=>{f.arcTo(p,d,h,b,g)},r=t==0?(f,d,p,b,h)=>{f.rect(d,p,b,h)}:(f,d,p,b,h)=>{f.rect(p,d,h,b)};return(f,d,p,b,h,g=0,s=0)=>{g==0&&s==0?r(f,d,p,b,h):(g=Pi(g,b/2,h/2),s=Pi(s,b/2,h/2),e(f,d+g,p),n(f,d+b,p,d+b,p+h,g),n(f,d+b,p+h,d,p+h,s),n(f,d,p+h,d,p,s),n(f,d,p,d+b,p,g),f.closePath())}}const Gl=(t,e,n)=>{t.moveTo(e,n)},Yl=(t,e,n)=>{t.moveTo(n,e)},na=(t,e,n)=>{t.lineTo(e,n)},ra=(t,e,n)=>{t.lineTo(n,e)},Xl=Mm(0),ah=Mm(1),Em=(t,e,n,r,f,d)=>{t.arc(e,n,r,f,d)},Im=(t,e,n,r,f,d)=>{t.arc(n,e,r,f,d)},Lm=(t,e,n,r,f,d,p)=>{t.bezierCurveTo(e,n,r,f,d,p)},Rm=(t,e,n,r,f,d,p)=>{t.bezierCurveTo(n,e,f,r,p,d)};function Om(t){return(e,n,r,f,d)=>bs(e,n,(p,b,h,g,s,a,c,l,o,u,m)=>{let{pxRound:w,points:x}=p,E,T;g.ori==0?(E=Gl,T=Em):(E=Yl,T=Im);const k=mn(x.width*rn,3);let C=(x.size-x.width)/2*rn,L=mn(C*2,3),R=new Path2D,F=new Path2D,{left:I,top:H,width:P,height:O}=e.bbox;Xl(F,I-L,H-L,P+L*2,O+L*2);const A=S=>{if(h[S]!=null){let D=w(a(b[S],g,u,l)),W=w(c(h[S],s,m,o));E(R,D+C,W),T(R,D,W,C,0,jl*2)}};if(d)d.forEach(A);else for(let S=r;S<=f;S++)A(S);return{stroke:k>0?R:null,fill:R,clip:F,flags:ta|ih}})}function Dm(t){return(e,n,r,f,d,p)=>{r!=f&&(d!=r&&p!=r&&t(e,n,r),d!=f&&p!=f&&t(e,n,f),t(e,n,p))}}const iS=Dm(na),oS=Dm(ra);function Nm(t){const e=tn(t==null?void 0:t.alignGaps,0);return(n,r,f,d)=>bs(n,r,(p,b,h,g,s,a,c,l,o,u,m)=>{[f,d]=Pl(h,f,d);let w=p.pxRound,x=P=>w(a(P,g,u,l)),E=P=>w(c(P,s,m,o)),T,k;g.ori==0?(T=na,k=iS):(T=ra,k=oS);const C=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},R=L.stroke;let F=!1;if(d-f>=u*4){let P=he=>n.posToVal(he,g.key,!0),O=null,A=null,S,D,W,U=x(b[C==1?f:d]),K=x(b[f]),Z=x(b[d]),te=P(C==1?K+1:Z-1);for(let he=C==1?f:d;he>=f&&he<=d;he+=C){let ne=b[he],ae=(C==1?ne<te:ne>te)?U:x(ne),ue=h[he];ae==U?ue!=null?(D=ue,O==null?(T(R,ae,E(D)),S=O=A=D):D<O?O=D:D>A&&(A=D)):ue===null&&(F=!0):(O!=null&&k(R,U,E(O),E(A),E(S),E(D)),ue!=null?(D=ue,T(R,ae,E(D)),O=A=S=D):(O=A=null,ue===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=A&&W!=U&&k(R,U,E(O),E(A),E(S),E(D))}else for(let P=C==1?f:d;P>=f&&P<=d;P+=C){let O=h[P];O===null?F=!0:O!=null&&T(R,x(b[P]),E(O))}let[I,H]=oh(n,r);if(p.fill!=null||I!=0){let P=L.fill=new Path2D(R),O=p.fillTo(n,r,p.min,p.max,I),A=E(O),S=x(b[f]),D=x(b[d]);C==-1&&([D,S]=[S,D]),T(P,D,A),T(P,S,A)}if(!p.spanGaps){let P=[];F&&P.push(...sh(b,h,f,d,C,x,e)),L.gaps=P=p.gaps(n,r,f,d,P),L.clip=Kl(P,g.ori,l,o,u,m)}return H!=0&&(L.band=H==2?[fo(n,r,f,d,R,-1),fo(n,r,f,d,R,1)]:fo(n,r,f,d,R,H)),L})}function sS(t){const e=tn(t.align,1),n=tn(t.ascDesc,!1),r=tn(t.alignGaps,0),f=tn(t.extend,!1);return(d,p,b,h)=>bs(d,p,(g,s,a,c,l,o,u,m,w,x,E)=>{[b,h]=Pl(a,b,h);let T=g.pxRound,{left:k,width:C}=d.bbox,L=Z=>T(o(Z,c,x,m)),R=Z=>T(u(Z,l,E,w)),F=c.ori==0?na:ra;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},H=I.stroke,P=c.dir*(c.ori==0?1:-1);let O=R(a[P==1?b:h]),A=L(s[P==1?b:h]),S=A,D=A;f&&e==-1&&(D=k,F(H,D,O)),F(H,A,O);for(let Z=P==1?b:h;Z>=b&&Z<=h;Z+=P){let te=a[Z];if(te==null)continue;let he=L(s[Z]),ne=R(te);e==1?F(H,he,O):F(H,S,ne),F(H,he,ne),O=ne,S=he}let W=S;f&&e==1&&(W=k+C,F(H,W,O));let[U,K]=oh(d,p);if(g.fill!=null||U!=0){let Z=I.fill=new Path2D(H),te=g.fillTo(d,p,g.min,g.max,U),he=R(te);F(Z,W,he),F(Z,D,he)}if(!g.spanGaps){let Z=[];Z.push(...sh(s,a,b,h,P,L,r));let te=g.width*rn/2,he=n||e==1?te:-te,ne=n||e==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),I.gaps=Z=g.gaps(d,p,b,h,Z),I.clip=Kl(Z,c.ori,m,w,x,E)}return K!=0&&(I.band=K==2?[fo(d,p,b,h,H,-1),fo(d,p,b,h,H,1)]:fo(d,p,b,h,H,K)),I})}function Fm(t,e,n,r,f,d,p=br){if(t.length>1){let b=null;for(let h=0,g=1/0;h<t.length;h++)if(e[h]!==void 0){if(b!=null){let s=lr(t[h]-t[b]);s<g&&(g=s,p=lr(n(t[h],r,f,d)-n(t[b],r,f,d)))}b=h}}return p}function aS(t){t=t||Pa;const e=tn(t.size,[.6,br,1]),n=t.align||0,r=t.gap||0;let f=t.radius;f=f==null?[0,0]:typeof f=="number"?[f,0]:f;const d=qt(f),p=1-e[0],b=tn(e[1],br),h=tn(e[2],1),g=tn(t.disp,Pa),s=tn(t.each,l=>{}),{fill:a,stroke:c}=g;return(l,o,u,m)=>bs(l,o,(w,x,E,T,k,C,L,R,F,I,H)=>{let P=w.pxRound,O=n,A=r*rn,S=b*rn,D=h*rn,W,U;T.ori==0?[W,U]=d(l,o):[U,W]=d(l,o);const K=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?Xl:ah,te=T.ori==0?s:(Ke,ke,Ve,Je,vt,Tt,At)=>{s(Ke,ke,Ve,vt,Je,At,Tt)},he=tn(l.bands,Gu).find(Ke=>Ke.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(l,o,w.min,w.max,ne),ue=P(L(ae,k,H,F)),ce,ge,Te,$e=I,Ee=P(w.width*rn),Ze=!1,Xe=null,gt=null,at=null,mt=null;a!=null&&(Ee==0||c!=null)&&(Ze=!0,Xe=a.values(l,o,u,m),gt=new Map,new Set(Xe).forEach(Ke=>{Ke!=null&&gt.set(Ke,new Path2D)}),Ee>0&&(at=c.values(l,o,u,m),mt=new Map,new Set(at).forEach(Ke=>{Ke!=null&&mt.set(Ke,new Path2D)})));let{x0:sn,size:bn}=g;if(sn!=null&&bn!=null){O=1,x=sn.values(l,o,u,m),sn.unit==2&&(x=x.map(ke=>l.posToVal(R+ke*I,T.key,!0)));let Ke=bn.values(l,o,u,m);bn.unit==2?ge=Ke[0]*I:ge=C(Ke[0],T,I,R)-C(0,T,I,R),$e=Fm(x,E,C,T,I,R,$e),Te=$e-ge+A}else $e=Fm(x,E,C,T,I,R,$e),Te=$e*p+A,ge=$e-Te;Te<1&&(Te=0),Ee>=ge/2&&(Ee=0),Te<5&&(P=Wg);let Jt=Te>0,wr=$e-Te-(Jt?Ee:0);ge=P(Ku(wr,D,S)),ce=(O==0?ge/2:O==K?0:ge)-O*K*((O==0?A/2:0)+(Jt?Ee/2:0));const wn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Fn=Ze?null:new Path2D;let Pn=null;if(he!=null)Pn=l.data[he.series[1]];else{let{y0:Ke,y1:ke}=g;Ke!=null&&ke!=null&&(E=ke.values(l,o,u,m),Pn=Ke.values(l,o,u,m))}let nr=W*ge,Ct=U*ge;for(let Ke=K==1?u:m;Ke>=u&&Ke<=m;Ke+=K){let ke=E[Ke];if(ke==null)continue;if(Pn!=null){let pt=Pn[Ke]??0;if(ke-pt==0)continue;ue=L(pt,k,H,F)}let Ve=T.distr!=2||g!=null?x[Ke]:Ke,Je=C(Ve,T,I,R),vt=L(tn(ke,ae),k,H,F),Tt=P(Je-ce),At=P(Nr(vt,ue)),Pt=P(Pi(vt,ue)),Nt=At-Pt;if(ke!=null){let pt=ke<0?Ct:nr,kt=ke<0?nr:Ct;Ze?(Ee>0&&at[Ke]!=null&&Z(mt.get(at[Ke]),Tt,Pt+oi(Ee/2),ge,Nr(0,Nt-Ee),pt,kt),Xe[Ke]!=null&&Z(gt.get(Xe[Ke]),Tt,Pt+oi(Ee/2),ge,Nr(0,Nt-Ee),pt,kt)):Z(Fn,Tt,Pt+oi(Ee/2),ge,Nr(0,Nt-Ee),pt,kt),te(l,o,Ke,Tt-Ee/2,Pt,ge+Ee,Nt)}}return Ee>0?wn.stroke=Ze?mt:Fn:Ze||(wn._fill=w.width==0?w._fill:w._stroke??w._fill,wn.width=0),wn.fill=Ze?gt:Fn,wn})}function lS(t,e){const n=tn(e==null?void 0:e.alignGaps,0);return(r,f,d,p)=>bs(r,f,(b,h,g,s,a,c,l,o,u,m,w)=>{[d,p]=Pl(g,d,p);let x=b.pxRound,E=W=>x(c(W,s,m,o)),T=W=>x(l(W,a,w,u)),k,C,L;s.ori==0?(k=Gl,L=na,C=Lm):(k=Yl,L=ra,C=Rm);const R=s.dir*(s.ori==0?1:-1);let F=E(h[R==1?d:p]),I=F,H=[],P=[];for(let W=R==1?d:p;W>=d&&W<=p;W+=R)if(g[W]!=null){let U=h[W],K=E(U);H.push(I=K),P.push(T(g[W]))}const O={stroke:t(H,P,k,L,C,x),fill:null,clip:null,band:null,gaps:null,flags:ta},A=O.stroke;let[S,D]=oh(r,f);if(b.fill!=null||S!=0){let W=O.fill=new Path2D(A),U=b.fillTo(r,f,b.min,b.max,S),K=T(U);L(W,I,K),L(W,F,K)}if(!b.spanGaps){let W=[];W.push(...sh(h,g,d,p,R,E,n)),O.gaps=W=b.gaps(r,f,d,p,W),O.clip=Kl(W,s.ori,o,u,m,w)}return D!=0&&(O.band=D==2?[fo(r,f,d,p,A,-1),fo(r,f,d,p,A,1)]:fo(r,f,d,p,A,D)),O})}function cS(t){return lS(uS,t)}function uS(t,e,n,r,f,d){const p=t.length;if(p<2)return null;const b=new Path2D;if(n(b,t[0],e[0]),p==2)r(b,t[1],e[1]);else{let h=Array(p),g=Array(p-1),s=Array(p-1),a=Array(p-1);for(let c=0;c<p-1;c++)s[c]=e[c+1]-e[c],a[c]=t[c+1]-t[c],g[c]=s[c]/a[c];h[0]=g[0];for(let c=1;c<p-1;c++)g[c]===0||g[c-1]===0||g[c-1]>0!=g[c]>0?h[c]=0:(h[c]=3*(a[c-1]+a[c])/((2*a[c]+a[c-1])/g[c-1]+(a[c]+2*a[c-1])/g[c]),isFinite(h[c])||(h[c]=0));h[p-1]=g[p-2];for(let c=0;c<p-1;c++)f(b,t[c]+a[c]/3,e[c]+h[c]*a[c]/3,t[c+1]-a[c]/3,e[c+1]-h[c+1]*a[c]/3,t[c+1],e[c+1])}return b}const lh=new Set;function Pm(){for(let t of lh)t.syncRect(!0)}Ys&&(gs(Uk,Xs,Pm),gs(Vk,Xs,Pm,!0),gs(Nl,Xs,()=>{Ar.pxRatio=rn}));const hS=Nm(),dS=Om();function Bm(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((f,d)=>ch(f,d,e,n))}function fS(t,e){return t.map((n,r)=>r==0?{}:tr({},e,n))}function ch(t,e,n,r){return tr({},e==0?n:r,t)}function Wm(t,e,n){return e==null?Zs:[e,n]}const pS=Wm;function gS(t,e,n){return e==null?Zs:Wl(e,n,Uu,!0)}function jm(t,e,n,r){return e==null?Zs:Bl(e,n,t.scales[r].log,!1)}const mS=jm;function zm(t,e,n,r){return e==null?Zs:Hu(e,n,t.scales[r].log,!1)}const vS=zm;function yS(t,e,n,r,f){let d=Nr(Pg(t),Pg(e)),p=e-t,b=Fi(f/r*p,n);do{let h=n[b],g=r*h/p;if(g>=f&&d+(h<5?Po.get(h):0)<=17)return[h,g]}while(++b<n.length);return[0,0]}function Hm(t){let e,n;return t=t.replace(/(\d+)px/,(r,f)=>(e=cr((n=+f)*rn))+"px"),[t,e,n]}function bS(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=mn(e[2]*rn,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function Ar(t,e,n){const r={mode:tn(t.mode,1)},f=r.mode;function d(V,X,ie,oe){let pe=X.valToPct(V);return oe+ie*(X.dir==-1?1-pe:pe)}function p(V,X,ie,oe){let pe=X.valToPct(V);return oe+ie*(X.dir==-1?pe:1-pe)}function b(V,X,ie,oe){return X.ori==0?d(V,X,ie,oe):p(V,X,ie,oe)}r.valToPosH=d,r.valToPosV=p;let h=!1;r.status=0;const g=r.root=vi(Ak);if(t.id!=null&&(g.id=t.id),ri(g,t.class),t.title){let V=vi(Mk,g);V.textContent=t.title}const s=Ni("canvas"),a=r.ctx=s.getContext("2d"),c=vi(Ek,g);gs("click",c,V=>{V.target===o&&(ln!=Ci||Gt!=ao)&&Wn.click(r,V)},!0);const l=r.under=vi(Ik,c);c.appendChild(s);const o=r.over=vi(Lk,c);t=Js(t);const u=+tn(t.pxAlign,1),m=$m(u);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const w=t.ms||.001,x=r.series=f==1?Bm(t.series||[],vm,_m,!1):fS(t.series||[null],km),E=r.axes=Bm(t.axes||[],mm,wm,!0),T=r.scales={},k=r.bands=t.bands||[];k.forEach(V=>{V.fill=qt(V.fill||null),V.dir=tn(V.dir,-1)});const C=f==2?x[1].facets[0].scale:x[0].scale,L={axes:bo,series:ua},R=(t.drawOrder||["axes","series"]).map(V=>L[V]);function F(V){const X=V.distr==3?ie=>ho(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>qu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:pe,_max:we}=V,Me=we-pe;return(oe-pe)/Me}}function I(V){let X=T[V];if(X==null){let ie=(t.scales||Pa)[V]||Pa;if(ie.from!=null){I(ie.from);let oe=tr({},T[ie.from],ie,{key:V});oe.valToPct=F(oe),T[V]=oe}else{X=T[V]=tr({},V==C?Sm:tS,ie),X.key=V;let oe=X.time,pe=X.range,we=Bo(pe);if((V!=C||f==2&&!oe)&&(we&&(pe[0]==null||pe[1]==null)&&(pe={min:pe[0]==null?Og:{mode:1,hard:pe[0],soft:pe[0]},max:pe[1]==null?Og:{mode:1,hard:pe[1],soft:pe[1]}},we=!1),!we&&Hl(pe))){let Me=pe;pe=(Be,ze,Ye)=>ze==null?Zs:Wl(ze,Ye,Me)}X.range=qt(pe||(oe?pS:V==C?X.distr==3?mS:X.distr==4?vS:Wm:X.distr==3?jm:X.distr==4?zm:gS)),X.auto=qt(we?!1:X.auto),X.clamp=qt(X.clamp||eS),X._min=X._max=null,X.valToPct=F(X)}}}I("x"),I("y"),f==1&&x.forEach(V=>{I(V.scale)}),E.forEach(V=>{I(V.scale)});for(let V in t.scales)I(V);const H=T[C],P=H.distr;let O,A;H.ori==0?(ri(g,Tk),O=d,A=p):(ri(g,$k),O=p,A=d);const S={};for(let V in T){let X=T[V];(X.min!=null||X.max!=null)&&(S[V]={min:X.min,max:X.max},X.min=X.max=null)}const D=t.tzDate||(V=>new Date(cr(V/w))),W=t.fmtDate||Yu,U=w==1?T_(D):E_(D),K=lm(D,am(w==1?A_:M_,W)),Z=um(D,cm(L_,W)),te=[],he=r.legend=tr({},D_,t.legend),ne=r.cursor=tr({},j_,{drag:{y:f==2}},t.cursor),ae=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=qt(ce.width),ce.dash=qt(ce.dash),ce.stroke=qt(ce.stroke),ce.fill=qt(ce.fill);let ge,Te,$e,Ee=[],Ze=[],Xe,gt=!1,at={};if(he.live){const V=x[1]?x[1].values:null;gt=V!=null,Xe=gt?V(r,1,0):{_:0};for(let X in Xe)at[X]=Fu}if(ae)if(ge=Ni("table",Pk,g),$e=Ni("tbody",null,ge),he.mount(r,ge),gt){Te=Ni("thead",null,ge,$e);let V=Ni("tr",null,Te);Ni("th",null,V);for(var mt in Xe)Ni("th",yg,V).textContent=mt}else ri(ge,Wk),he.live&&ri(ge,Bk);const sn={show:!0},bn={show:!1};function Jt(V,X){if(X==0&&(gt||!he.live||f==2))return Zs;let ie=[],oe=Ni("tr",jk,$e,$e.childNodes[X]);ri(oe,V.class),V.show||ri(oe,ps);let pe=Ni("th",null,oe);if(ce.show){let Be=vi(zk,pe);if(X>0){let ze=ce.width(r,X);ze&&(Be.style.border=ze+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Be.style.background=ce.fill(r,X)}}let we=vi(yg,pe);V.label instanceof HTMLElement?we.appendChild(V.label):we.textContent=V.label,X>0&&(ce.show||(we.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),wn("click",pe,Be=>{if(ne._lock)return;ji(Be);let ze=x.indexOf(V);if((Be.ctrlKey||Be.metaKey)!=he.isolate){let Ye=x.some((et,nt)=>nt>0&&nt!=ze&&et.show);x.forEach((et,nt)=>{nt>0&&Br(nt,Ye?nt==ze?sn:bn:sn,!0,dt.setSeries)})}else Br(ze,{show:!V.show},!0,dt.setSeries)},!1),zi&&wn(Cg,pe,Be=>{ne._lock||(ji(Be),Br(x.indexOf(V),Si,!0,dt.setSeries))},!1));for(var Me in Xe){let Be=Ni("td",Hk,oe);Be.textContent="--",ie.push(Be)}return[oe,ie]}const wr=new Map;function wn(V,X,ie,oe=!0){const pe=wr.get(X)||{},we=ne.bind[V](r,X,ie,oe);we&&(gs(V,X,pe[V]=we),wr.set(X,pe))}function Fn(V,X,ie){const oe=wr.get(X)||{};for(let pe in oe)(V==null||pe==V)&&(zu(pe,X,oe[pe]),delete oe[pe]);V==null&&wr.delete(X)}let Pn=0,nr=0,Ct=0,Ke=0,ke=0,Ve=0,Je=ke,vt=Ve,Tt=Ct,At=Ke,Pt=0,Nt=0,pt=0,kt=0;r.bbox={};let $n=!1,$r=!1,Yr=!1,Wi=!1,po=!1,xr=!1;function go(V,X,ie){(ie||V!=r.width||X!=r.height)&&Wo(V,X),qi(!1),Yr=!0,$r=!0,so()}function Wo(V,X){r.width=Pn=Ct=V,r.height=nr=Ke=X,ke=Ve=0,ks(),aa();let ie=r.bbox;Pt=ie.left=vs(ke*rn,.5),Nt=ie.top=vs(Ve*rn,.5),pt=ie.width=vs(Ct*rn,.5),kt=ie.height=vs(Ke*rn,.5)}const Ga=3;function si(){let V=!1,X=0;for(;!V;){X++;let ie=ha(X),oe=Za(X);V=X==Ga||ie&&oe,V||(Wo(r.width,r.height),$r=!0)}}function Ya({width:V,height:X}){go(V,X)}r.setSize=Ya;function ks(){let V=!1,X=!1,ie=!1,oe=!1;E.forEach((pe,we)=>{if(pe.show&&pe._show){let{side:Me,_size:Be}=pe,ze=Me%2,Ye=pe.label!=null?pe.labelSize:0,et=Be+Ye;et>0&&(ze?(Ct-=et,Me==3?(ke+=et,oe=!0):ie=!0):(Ke-=et,Me==0?(Ve+=et,V=!0):X=!0))}}),Ui[0]=V,Ui[1]=ie,Ui[2]=X,Ui[3]=oe,Ct-=Ir[1]+Ir[3],ke+=Ir[3],Ke-=Ir[2]+Ir[0],Ve+=Ir[0]}function aa(){let V=ke+Ct,X=Ve+Ke,ie=ke,oe=Ve;function pe(we,Me){switch(we){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}E.forEach((we,Me)=>{if(we.show&&we._show){let Be=we.side;we._pos=pe(Be,we._size),we.label!=null&&(we._lpos=pe(Be,we.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=qt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(pe,we,Me,Be)=>{if(we==0)return Me;let ze=Me,Ye=ie(pe,we,Me,Be)??br,et=Ye>=0&&Ye<br,nt=H.ori==0?Ct:Ke,St=ne.left,Ut=e[0],Mt=e[we];if(X.has(Mt[Me])){ze=null;let jt=null,yt=null,ut;if(oe==0||oe==-1)for(ut=Me;jt==null&&ut-- >0;)X.has(Mt[ut])||(jt=ut);if(oe==0||oe==1)for(ut=Me;yt==null&&ut++<Mt.length;)X.has(Mt[ut])||(yt=ut);if(jt!=null||yt!=null)if(et){let vn=jt==null?-1/0:O(Ut[jt],H,nt,0),In=yt==null?1/0:O(Ut[yt],H,nt,0),or=St-vn,Qt=In-St;or<=Qt?or<=Ye&&(ze=jt):Qt<=Ye&&(ze=yt)}else ze=yt==null?jt:jt==null?yt:Me-jt<=yt-Me?jt:yt}else et&&lr(St-O(Ut[Me],H,nt,0))>Ye&&(ze=null);return ze}}const ji=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let Yn=ne.points;Yn.show=qt(Yn.show),Yn.size=qt(Yn.size),Yn.stroke=qt(Yn.stroke),Yn.width=qt(Yn.width),Yn.fill=qt(Yn.fill);const Mr=r.focus=tr({},t.focus||{alpha:.3},ne.focus),zi=Mr.prox>=0,Rn=zi&&Yn.one;let Er=[],no=[],Hi=[];function _s(V,X){let ie=Yn.show(r,X);if(ie instanceof HTMLElement)return ri(ie,Fk),ri(ie,V.class),Zi(ie,-10,-10,Ct,Ke),o.insertBefore(ie,Er[X]),ie}function la(V,X){if(f==1||X>0){let ie=f==1&&T[V.scale].time,oe=V.value;V.value=ie?Kg(oe)?um(D,cm(oe,W)):oe||Z:oe||Q_,V.label=V.label||(ie?H_:z_)}if(Rn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||hS||t_,V.fillTo=qt(V.fillTo||nS),V.pxAlign=+tn(V.pxAlign,u),V.pxRound=$m(V.pxAlign),V.stroke=qt(V.stroke||null),V.fill=qt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=Z_(Nr(1,V.width),1),oe=V.points=tr({},{size:ie,width:Nr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:dS,_stroke:null,_fill:null},V.points);oe.show=qt(oe.show),oe.filter=qt(oe.filter),oe.fill=qt(oe.fill),oe.stroke=qt(oe.stroke),oe.paths=qt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=Jt(V,X);Ee.splice(X,0,ie[0]),Ze.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;Rn?X==0&&(ie=_s(V,X)):X>0&&(ie=_s(V,X)),Er.splice(X,0,ie),no.splice(X,0,0),Hi.splice(X,0,0)}st("addSeries",X)}function Xa(V,X){X=X??x.length,V=f==1?ch(V,X,vm,_m):ch(V,X,{},km),x.splice(X,0,V),la(x[X],X)}r.addSeries=Xa;function Qa(V){if(x.splice(V,1),ae){he.values.splice(V,1),Ze.splice(V,1);let X=Ee.splice(V,1)[0];Fn(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),Er.splice(V,1)[0].remove(),no.splice(V,1),Hi.splice(V,1)),st("delSeries",V)}r.delSeries=Qa;const Ui=[!1,!1,!1,!1];function ai(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=T[V.scale];oe==null&&(V.scale=ie?x[1].scale:C,oe=T[V.scale]);let pe=oe.time;V.size=qt(V.size),V.space=qt(V.space),V.rotate=qt(V.rotate),Bo(V.incrs)&&V.incrs.forEach(Me=>{!Po.has(Me)&&Po.set(Me,Vg(Me))}),V.incrs=qt(V.incrs||(oe.distr==2?k_:pe?w==1?S_:$_:ys)),V.splits=qt(V.splits||(pe&&oe.distr==1?U:oe.distr==3?nh:oe.distr==4?q_:V_)),V.stroke=qt(V.stroke),V.grid.stroke=qt(V.grid.stroke),V.ticks.stroke=qt(V.ticks.stroke),V.border.stroke=qt(V.border.stroke);let we=V.values;V.values=Bo(we)&&!Bo(we[0])?qt(we):pe?Bo(we)?lm(D,am(we,W)):Kg(we)?I_(D,we):we||K:we||U_,V.filter=qt(V.filter||(oe.distr>=3&&oe.log==10?Y_:oe.distr==3&&oe.log==2?X_:jg)),V.font=Hm(V.font),V.labelFont=Hm(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Ui[X]=!0,V._el=vi(Rk,c))}}function Kt(V,X,ie,oe){let[pe,we,Me,Be]=ie,ze=X%2,Ye=0;return ze==0&&(Be||we)&&(Ye=X==0&&!pe||X==2&&!Me?cr(mm.size/3):0),ze==1&&(pe||Me)&&(Ye=X==1&&!we||X==3&&!Be?cr(wm.size/2):0),Ye}const ca=r.padding=(t.padding||[Kt,Kt,Kt,Kt]).map(V=>qt(tn(V,Kt))),Ir=r._padding=ca.map((V,X)=>V(r,X,Ui,0));let Xn,xn=null,Bn=null;const bi=f==1?x[0].idxs:null;let Lr=null,wi=!1;function jo(V,X){if(e=V??[],r.data=r._data=e,f==2){Xn=0;for(let ie=1;ie<x.length;ie++)Xn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Lr=e[0],Xn=Lr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Xn);for(let pe=0;pe<Xn;pe++)oe[pe]=pe}r._data=e=ie}if(qi(!0),st("setData"),P==2&&(Yr=!0),X!==!1){let ie=H;ie.auto(r,wi)?Ss():rr(C,ie.min,ie.max),Wi=Wi||ne.left>=0,xr=!0,so()}}r.setData=jo;function Ss(){wi=!0;let V,X;f==1&&(Xn>0?(xn=bi[0]=0,Bn=bi[1]=Xn-1,V=e[0][xn],X=e[0][Bn],P==2?(V=xn,X=Bn):V==X&&(P==3?[V,X]=Bl(V,V,H.log,!1):P==4?[V,X]=Hu(V,V,H.log,!1):H.time?X=V+cr(86400/w):[V,X]=Wl(V,X,Uu,!0))):(xn=bi[0]=V=null,Bn=bi[1]=X=null)),rr(C,V,X)}let ro,Xr,mo,zo,Qr,Ho,As,Ts,Uo,ur;function $s(V,X,ie,oe,pe,we){V??(V=wg),ie??(ie=Gu),oe??(oe="butt"),pe??(pe=wg),we??(we="round"),V!=ro&&(a.strokeStyle=ro=V),pe!=Xr&&(a.fillStyle=Xr=pe),X!=mo&&(a.lineWidth=mo=X),we!=Qr&&(a.lineJoin=Qr=we),oe!=Ho&&(a.lineCap=Ho=oe),ie!=zo&&a.setLineDash(zo=ie)}function vo(V,X,ie,oe){X!=Xr&&(a.fillStyle=Xr=X),V!=As&&(a.font=As=V),ie!=Ts&&(a.textAlign=Ts=ie),oe!=Uo&&(a.textBaseline=Uo=oe)}function Vo(V,X,ie,oe,pe=0){if(oe.length>0&&V.auto(r,wi)&&(X==null||X.min==null)){let we=tn(xn,0),Me=tn(Bn,oe.length-1),Be=ie.min==null?Yk(oe,we,Me,pe,V.distr==3):[ie.min,ie.max];V.min=Pi(V.min,ie.min=Be[0]),V.max=Nr(V.max,ie.max=Be[1])}}const qo={min:null,max:null};function io(){for(let oe in T){let pe=T[oe];S[oe]==null&&(pe.min==null||S[C]!=null&&pe.auto(r,wi))&&(S[oe]=qo)}for(let oe in T){let pe=T[oe];S[oe]==null&&pe.from!=null&&S[pe.from]!=null&&(S[oe]=qo)}S[C]!=null&&qi(!0);let V={};for(let oe in S){let pe=S[oe];if(pe!=null){let we=V[oe]=Js(T[oe],i_);if(pe.min!=null)tr(we,pe);else if(oe!=C||f==2)if(Xn==0&&we.from==null){let Me=we.range(r,null,null,oe);we.min=Me[0],we.max=Me[1]}else we.min=br,we.max=-1/0}}if(Xn>0){x.forEach((oe,pe)=>{if(f==1){let we=oe.scale,Me=S[we];if(Me==null)return;let Be=V[we];if(pe==0){let ze=Be.range(r,Be.min,Be.max,we);Be.min=ze[0],Be.max=ze[1],xn=Fi(Be.min,e[0]),Bn=Fi(Be.max,e[0]),Bn-xn>1&&(e[0][xn]<Be.min&&xn++,e[0][Bn]>Be.max&&Bn--),oe.min=Lr[xn],oe.max=Lr[Bn]}else oe.show&&oe.auto&&Vo(Be,Me,oe,e[pe],oe.sorted);oe.idxs[0]=xn,oe.idxs[1]=Bn}else if(pe>0&&oe.show&&oe.auto){let[we,Me]=oe.facets,Be=we.scale,ze=Me.scale,[Ye,et]=e[pe],nt=V[Be],St=V[ze];nt!=null&&Vo(nt,S[Be],we,Ye,we.sorted),St!=null&&Vo(St,S[ze],Me,et,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let pe=V[oe],we=S[oe];if(pe.from==null&&(we==null||we.min==null)){let Me=pe.range(r,pe.min==br?null:pe.min,pe.max==-1/0?null:pe.max,oe);pe.min=Me[0],pe.max=Me[1]}}}for(let oe in V){let pe=V[oe];if(pe.from!=null){let we=V[pe.from];if(we.min==null)pe.min=pe.max=null;else{let Me=pe.range(r,we.min,we.max,oe);pe.min=Me[0],pe.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let pe=V[oe],we=T[oe];if(we.min!=pe.min||we.max!=pe.max){we.min=pe.min,we.max=pe.max;let Me=we.distr;we._min=Me==3?ho(we.min):Me==4?qu(we.min,we.asinh):Me==100?we.fwd(we.min):we.min,we._max=Me==3?ho(we.max):Me==4?qu(we.max,we.asinh):Me==100?we.fwd(we.max):we.max,X[oe]=ie=!0}}if(ie){x.forEach((oe,pe)=>{f==2?pe>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Yr=!0,st("setScale",oe);ue&&ne.left>=0&&(Wi=xr=!0)}for(let oe in S)S[oe]=null}function Ms(V){let X=Ku(xn-1,0,Xn-1),ie=Ku(Bn+1,0,Xn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Xn-1;)ie++;return[X,ie]}function ua(){if(Xn>0){let V=x.some(X=>X._focus)&&ur!=Mr.alpha;V&&(a.globalAlpha=ur=Mr.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(Ko(ie,!1),Ko(ie,!0),X._paths==null)){let oe=ur;ur!=X.alpha&&(a.globalAlpha=ur=X.alpha);let pe=f==2?[0,e[ie][0].length-1]:Ms(e[ie]);X._paths=X.paths(r,ie,pe[0],pe[1]),ur!=oe&&(a.globalAlpha=ur=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=ur;ur!=X.alpha&&(a.globalAlpha=ur=X.alpha),X._paths!=null&&Go(ie,!1);{let pe=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,xn,Bn,pe),Me=X.points.filter(r,ie,we,pe);(we||Me)&&(X.points._paths=X.points.paths(r,ie,xn,Bn,Me),Go(ie,!0))}ur!=oe&&(a.globalAlpha=ur=oe),st("drawSeries",ie)}}),V&&(a.globalAlpha=ur=1)}}function Ko(V,X){let ie=X?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function Go(V,X){let ie=X?x[V].points:x[V],{stroke:oe,fill:pe,clip:we,flags:Me,_stroke:Be=ie._stroke,_fill:ze=ie._fill,_width:Ye=ie.width}=ie._paths;Ye=mn(Ye*rn,3);let et=null,nt=Ye%2/2;X&&ze==null&&(ze=Ye>0?"#fff":Be);let St=ie.pxAlign==1&&nt>0;if(St&&a.translate(nt,nt),!X){let Ut=Pt-Ye/2,Mt=Nt-Ye/2,jt=pt+Ye,yt=kt+Ye;et=new Path2D,et.rect(Ut,Mt,jt,yt)}X?yo(Be,Ye,ie.dash,ie.cap,ze,oe,pe,Me,we):Es(V,Be,Ye,ie.dash,ie.cap,ze,oe,pe,Me,et,we),St&&a.translate(-nt,-nt)}function Es(V,X,ie,oe,pe,we,Me,Be,ze,Ye,et){let nt=!1;ze!=0&&k.forEach((St,Ut)=>{if(St.series[0]==V){let Mt=x[St.series[1]],jt=e[St.series[1]],yt=(Mt._paths||Pa).band;Bo(yt)&&(yt=St.dir==1?yt[0]:yt[1]);let ut,vn=null;Mt.show&&yt&&Qk(jt,xn,Bn)?(vn=St.fill(r,Ut)||we,ut=Mt._paths.clip):yt=null,yo(X,ie,oe,pe,vn,Me,Be,ze,Ye,et,ut,yt),nt=!0}}),nt||yo(X,ie,oe,pe,we,Me,Be,ze,Ye,et)}const Yo=ta|ih;function yo(V,X,ie,oe,pe,we,Me,Be,ze,Ye,et,nt){$s(V,X,ie,oe,pe),(ze||Ye||nt)&&(a.save(),ze&&a.clip(ze),Ye&&a.clip(Ye)),nt?(Be&Yo)==Yo?(a.clip(nt),et&&a.clip(et),hr(pe,Me),xi(V,we,X)):Be&ih?(hr(pe,Me),a.clip(nt),xi(V,we,X)):Be&ta&&(a.save(),a.clip(nt),et&&a.clip(et),hr(pe,Me),a.restore(),xi(V,we,X)):(hr(pe,Me),xi(V,we,X)),(ze||Ye||nt)&&a.restore()}function xi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,pe)=>{a.strokeStyle=ro=pe,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function hr(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=Xr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function oo(V,X,ie,oe){let pe=E[V],we;if(oe<=0)we=[0,0];else{let Me=pe._space=pe.space(r,V,X,ie,oe),Be=pe._incrs=pe.incrs(r,V,X,ie,oe,Me);we=yS(X,ie,Be,oe,Me)}return pe._found=we}function Vi(V,X,ie,oe,pe,we,Me,Be,ze,Ye){let et=Me%2/2;u==1&&a.translate(et,et),$s(Be,Me,ze,Ye,Be),a.beginPath();let nt,St,Ut,Mt,jt=pe+(oe==0||oe==3?-we:we);ie==0?(St=pe,Mt=jt):(nt=pe,Ut=jt);for(let yt=0;yt<V.length;yt++)X[yt]!=null&&(ie==0?nt=Ut=V[yt]:St=Mt=V[yt],a.moveTo(nt,St),a.lineTo(Ut,Mt));a.stroke(),u==1&&a.translate(-et,-et)}function ha(V){let X=!0;return E.forEach((ie,oe)=>{if(!ie.show)return;let pe=T[ie.scale];if(pe.min==null){ie._show&&(X=!1,ie._show=!1,qi(!1));return}else ie._show||(X=!1,ie._show=!0,qi(!1));let we=ie.side,Me=we%2,{min:Be,max:ze}=pe,[Ye,et]=oo(oe,Be,ze,Me==0?Ct:Ke);if(et==0)return;let nt=pe.distr==2,St=ie._splits=ie.splits(r,oe,Be,ze,Ye,et,nt),Ut=pe.distr==2?St.map(ut=>Lr[ut]):St,Mt=pe.distr==2?Lr[St[1]]-Lr[St[0]]:Ye,jt=ie._values=ie.values(r,ie.filter(r,Ut,oe,et,Mt),oe,et,Mt);ie._rotate=we==2?ie.rotate(r,jt,oe,et):0;let yt=ie._size;ie._size=yi(ie.size(r,jt,oe,V)),yt!=null&&ie._size!=yt&&(X=!1)}),X}function Za(V){let X=!0;return ca.forEach((ie,oe)=>{let pe=ie(r,oe,Ui,V);pe!=Ir[oe]&&(X=!1),Ir[oe]=pe}),X}function bo(){for(let V=0;V<E.length;V++){let X=E[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,pe,we,Me=X.stroke(r,V),Be=ie==0||ie==3?-1:1,[ze,Ye]=X._found;if(X.label!=null){let pn=X.labelGap*Be,vr=cr((X._lpos+pn)*rn);vo(X.labelFont[0],Me,"center",ie==2?Da:bg),a.save(),oe==1?(pe=we=0,a.translate(vr,cr(Nt+kt/2)),a.rotate((ie==3?-jl:jl)/2)):(pe=cr(Pt+pt/2),we=vr);let _o=Bg(X.label)?X.label(r,V,ze,Ye):X.label;a.fillText(_o,pe,we),a.restore()}if(Ye==0)continue;let et=T[X.scale],nt=oe==0?pt:kt,St=oe==0?Pt:Nt,Ut=X._splits,Mt=et.distr==2?Ut.map(pn=>Lr[pn]):Ut,jt=et.distr==2?Lr[Ut[1]]-Lr[Ut[0]]:ze,yt=X.ticks,ut=X.border,vn=yt.show?yt.size:0,In=cr(vn*rn),or=cr((X.alignTo==2?X._size-vn-X.gap:X.gap)*rn),Qt=X._rotate*-jl/180,fe=m(X._pos*rn),_e=(In+or)*Be,xe=fe+_e;we=oe==0?xe:0,pe=oe==1?xe:0;let qe=X.font[0],ft=X.align==1?Gs:X.align==2?Ru:Qt>0?Gs:Qt<0?Ru:oe==0?"center":ie==3?Ru:Gs,Dt=Qt||oe==1?"middle":ie==2?Da:bg;vo(qe,Me,ft,Dt);let en=X.font[1]*X.lineGap,Bt=Ut.map(pn=>m(b(pn,et,nt,St))),Wr=X._values;for(let pn=0;pn<Wr.length;pn++){let vr=Wr[pn];if(vr!=null){oe==0?pe=Bt[pn]:we=Bt[pn],vr=""+vr;let _o=vr.indexOf(`
1489
+ `)==-1?[vr]:vr.split(/\n/gm);for(let Hn=0;Hn<_o.length;Hn++){let Ls=_o[Hn];Qt?(a.save(),a.translate(pe,we+Hn*en),a.rotate(Qt),a.fillText(Ls,0,0),a.restore()):a.fillText(Ls,pe,we+Hn*en)}}}yt.show&&Vi(Bt,yt.filter(r,Mt,V,Ye,jt),oe,ie,fe,In,mn(yt.width*rn,3),yt.stroke(r,V),yt.dash,yt.cap);let Ai=X.grid;Ai.show&&Vi(Bt,Ai.filter(r,Mt,V,Ye,jt),oe,oe==0?2:1,oe==0?Nt:Pt,oe==0?kt:pt,mn(Ai.width*rn,3),Ai.stroke(r,V),Ai.dash,Ai.cap),ut.show&&Vi([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?Nt:Pt,oe==1?kt:pt,mn(ut.width*rn,3),ut.stroke(r,V),ut.dash,ut.cap)}st("drawAxes")}function qi(V){x.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(f==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let wo=!1,Xo=!1,xo=[];function da(){Xo=!1;for(let V=0;V<xo.length;V++)st(...xo[V]);xo.length=0}function so(){wo||(h_(fa),wo=!0)}function je(V,X=!1){wo=!0,Xo=X,V(r),fa(),X&&xo.length>0&&queueMicrotask(da)}r.batch=je;function fa(){if($n&&(io(),$n=!1),Yr&&(si(),Yr=!1),$r){if(Sn(l,Gs,ke),Sn(l,Da,Ve),Sn(l,Ra,Ct),Sn(l,Oa,Ke),Sn(o,Gs,ke),Sn(o,Da,Ve),Sn(o,Ra,Ct),Sn(o,Oa,Ke),Sn(c,Ra,Pn),Sn(c,Oa,nr),s.width=cr(Pn*rn),s.height=cr(nr*rn),E.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:pe})=>{if(V!=null)if(X){let we=pe===3||pe===0?ie:0,Me=pe%2==1;Sn(V,Me?"left":"top",oe-we),Sn(V,Me?"width":"height",ie),Sn(V,Me?"top":"left",Me?Ve:ke),Sn(V,Me?"height":"width",Me?Ke:Ct),Wu(V,ps)}else ri(V,ps)}),ro=Xr=mo=Qr=Ho=As=Ts=Uo=zo=null,ur=1,B(!0),ke!=Je||Ve!=vt||Ct!=Tt||Ke!=At){qi(!1);let V=Ct/Tt,X=Ke/At;if(ue&&!Wi&&ne.left>=0){ne.left*=V,ne.top*=X,li&&Zi(li,cr(ne.left),0,Ct,Ke),Qn&&Zi(Qn,0,cr(ne.top),Ct,Ke);for(let ie=0;ie<Er.length;ie++){let oe=Er[ie];oe!=null&&(no[ie]*=V,Hi[ie]*=X,Zi(oe,yi(no[ie]),yi(Hi[ie]),Ct,Ke))}}if(_t.show&&!po&&_t.left>=0&&_t.width>0){_t.left*=V,_t.width*=V,_t.top*=X,_t.height*=X;for(let ie in Y)Sn(Pr,ie,_t[ie])}Je=ke,vt=Ve,Tt=Ct,At=Ke}st("setSize"),$r=!1}Pn>0&&nr>0&&(a.clearRect(0,0,s.width,s.height),st("drawClear"),R.forEach(V=>V()),st("draw")),_t.show&&po&&(fn(_t),po=!1),ue&&Wi&&(_(null,!0,!1),Wi=!1),he.show&&he.live&&xr&&(y(),xr=!1),h||(h=!0,r.status=1,st("ready")),wi=!1,wo=!1}r.redraw=(V,X)=>{Yr=X||!1,V!==!1?rr(C,H.min,H.max):so()};function De(V,X){let ie=T[V];if(ie.from==null){if(Xn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Xn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&Xn>0&&(X.min=Fi(X.min,e[0]),X.max=Fi(X.max,e[0]),X.min==X.max&&X.max++),S[V]=X,$n=!0,so()}}r.setScale=De;let On,Co,li,Qn,pa,ko,Ci,ao,an,nn,ln,Gt,ki=!1;const Wn=ne.drag;let He=Wn.x,Cn=Wn.y;ue&&(ne.x&&(On=vi(Dk,o)),ne.y&&(Co=vi(Nk,o)),H.ori==0?(li=On,Qn=Co):(li=Co,Qn=On),ln=ne.left,Gt=ne.top);const _t=r.select=tr({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Pr=_t.show?vi(Ok,_t.over?o:l):null;function fn(V,X){if(_t.show){for(let ie in V)_t[ie]=V[ie],ie in Y&&Sn(Pr,ie,V[ie]);X!==!1&&st("setSelect")}}r.setSelect=fn;function An(V){if(x[V].show)ae&&Wu(Ee[V],ps);else if(ae&&ri(Ee[V],ps),ue){let X=Rn?Er[0]:Er[V];X!=null&&Zi(X,-10,-10,Ct,Ke)}}function rr(V,X,ie){De(V,{min:X,max:ie})}function Br(V,X,ie,oe){X.focus!=null&&pr(V),X.show!=null&&x.forEach((pe,we)=>{we>0&&(V==we||V==null)&&(pe.show=X.show,An(we),f==2?(rr(pe.facets[0].scale,null,null),rr(pe.facets[1].scale,null,null)):rr(pe.scale,null,null),so())}),ie!==!1&&st("setSeries",V,X),oe&&Ot("setSeries",r,V,X)}r.setSeries=Br;function _i(V,X){tr(k[V],X)}function jn(V,X){V.fill=qt(V.fill||null),V.dir=tn(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function Zr(V){V==null?k.length=0:k.splice(V,1)}r.addBand=jn,r.setBand=_i,r.delBand=Zr;function Qo(V,X){x[V].alpha=X,ue&&Er[V]!=null&&(Er[V].style.opacity=X),ae&&Ee[V]&&(Ee[V].style.opacity=X)}let zn,ci,ui;const Si={focus:!0};function pr(V){if(V!=ui){let X=V==null,ie=Mr.alpha!=1;x.forEach((oe,pe)=>{if(f==1||pe>0){let we=X||pe==0||pe==V;oe._focus=X?null:we,ie&&Qo(pe,we?1:Mr.alpha)}}),ui=V,ie&&so()}}ae&&zi&&wn(kg,ge,V=>{ne._lock||(ji(V),ui!=null&&Br(null,Si,!0,dt.setSeries))});function gr(V,X,ie){let oe=T[X];ie&&(V=V/rn-(oe.ori==1?Ve:ke));let pe=Ct;oe.ori==1&&(pe=Ke,V=pe-V),oe.dir==-1&&(V=pe-V);let we=oe._min,Me=oe._max,Be=V/pe,ze=we+(Me-we)*Be,Ye=oe.distr;return Ye==3?Qs(10,ze):Ye==4?Jk(ze,oe.asinh):Ye==100?oe.bwd(ze):ze}function Cr(V,X){let ie=gr(V,C,X);return Fi(ie,e[0],xn,Bn)}r.valToIdx=V=>Fi(V,e[0]),r.posToIdx=Cr,r.posToVal=gr,r.valToPos=(V,X,ie)=>T[X].ori==0?d(V,T[X],ie?pt:Ct,ie?Pt:0):p(V,T[X],ie?kt:Ke,ie?Nt:0),r.setCursor=(V,X,ie)=>{ln=V.left,Gt=V.top,_(null,X,ie)};function Is(V,X){Sn(Pr,Gs,_t.left=V),Sn(Pr,Ra,_t.width=X)}function kr(V,X){Sn(Pr,Da,_t.top=V),Sn(Pr,Oa,_t.height=X)}let Rr=H.ori==0?Is:kr,hi=H.ori==1?Is:kr;function di(){if(ae&&he.live)for(let V=f==2?1:0;V<x.length;V++){if(V==0&&gt)continue;let X=he.values[V],ie=0;for(let oe in X)Ze[V][ie++].firstChild.nodeValue=X[oe]}}function y(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):r_(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<x.length;ie++)(ie>0||f==1&&!gt)&&$(ie,te[ie]);di()}xr=!1,X!==!1&&st("setLegend")}r.setLegend=y;function $(V,X){let ie=x[V],oe=V==0&&P==2?Lr:e[V],pe;gt?pe=ie.values(r,V,X)??at:(pe=ie.value(r,X==null?null:oe[X],V,X),pe=pe==null?at:{_:pe}),he.values[V]=pe}function _(V,X,ie){an=ln,nn=Gt,[ln,Gt]=ne.move(r,ln,Gt),ne.left=ln,ne.top=Gt,ue&&(li&&Zi(li,cr(ln),0,Ct,Ke),Qn&&Zi(Qn,0,cr(Gt),Ct,Ke));let oe,pe=xn>Bn;zn=br,ci=null;let we=H.ori==0?Ct:Ke,Me=H.ori==1?Ct:Ke;if(ln<0||Xn==0||pe){oe=ne.idx=null;for(let Be=0;Be<x.length;Be++){let ze=Er[Be];ze!=null&&Zi(ze,-10,-10,Ct,Ke)}zi&&Br(null,Si,!0,V==null&&dt.setSeries),he.live&&(te.fill(oe),xr=!0)}else{let Be,ze,Ye;f==1&&(Be=H.ori==0?ln:Gt,ze=gr(Be,C),oe=ne.idx=Fi(ze,e[0],xn,Bn),Ye=O(e[0][oe],H,we,0));let et=-10,nt=-10,St=0,Ut=0,Mt=!0,jt="",yt="";for(let ut=f==2?1:0;ut<x.length;ut++){let vn=x[ut],In=te[ut],or=In==null?null:f==1?e[ut][In]:e[ut][1][In],Qt=ne.dataIdx(r,ut,oe,ze),fe=Qt==null?null:f==1?e[ut][Qt]:e[ut][1][Qt];if(xr=xr||fe!=or||Qt!=In,te[ut]=Qt,ut>0&&vn.show){let _e=Qt==null?-10:Qt==oe?Ye:O(f==1?e[0][Qt]:e[ut][0][Qt],H,we,0),xe=fe==null?-10:A(fe,f==1?T[vn.scale]:T[vn.facets[1].scale],Me,0);if(zi&&fe!=null){let qe=H.ori==1?ln:Gt,ft=lr(Mr.dist(r,ut,Qt,xe,qe));if(ft<zn){let Dt=Mr.bias;if(Dt!=0){let en=gr(qe,vn.scale),Bt=fe>=0?1:-1,Wr=en>=0?1:-1;Wr==Bt&&(Wr==1?Dt==1?fe>=en:fe<=en:Dt==1?fe<=en:fe>=en)&&(zn=ft,ci=ut)}else zn=ft,ci=ut}}if(xr||Rn){let qe,ft;H.ori==0?(qe=_e,ft=xe):(qe=xe,ft=_e);let Dt,en,Bt,Wr,Ai,pn,vr=!0,_o=Yn.bbox;if(_o!=null){vr=!1;let Hn=_o(r,ut);Bt=Hn.left,Wr=Hn.top,Dt=Hn.width,en=Hn.height}else Bt=qe,Wr=ft,Dt=en=Yn.size(r,ut);if(pn=Yn.fill(r,ut),Ai=Yn.stroke(r,ut),Rn)ut==ci&&zn<=Mr.prox&&(et=Bt,nt=Wr,St=Dt,Ut=en,Mt=vr,jt=pn,yt=Ai);else{let Hn=Er[ut];Hn!=null&&(no[ut]=Bt,Hi[ut]=Wr,Eg(Hn,Dt,en,vr),$g(Hn,pn,Ai),Zi(Hn,yi(Bt),yi(Wr),Ct,Ke))}}}}if(Rn){let ut=Mr.prox,vn=ui==null?zn<=ut:zn>ut||ci!=ui;if(xr||vn){let In=Er[0];In!=null&&(no[0]=et,Hi[0]=nt,Eg(In,St,Ut,Mt),$g(In,jt,yt),Zi(In,yi(et),yi(nt),Ct,Ke))}}}if(_t.show&&ki)if(V!=null){let[Be,ze]=dt.scales,[Ye,et]=dt.match,[nt,St]=V.cursor.sync.scales,Ut=V.cursor.drag;if(He=Ut._x,Cn=Ut._y,He||Cn){let{left:Mt,top:jt,width:yt,height:ut}=V.select,vn=V.scales[nt].ori,In=V.posToVal,or,Qt,fe,_e,xe,qe=Be!=null&&Ye(Be,nt),ft=ze!=null&&et(ze,St);qe&&He?(vn==0?(or=Mt,Qt=yt):(or=jt,Qt=ut),fe=T[Be],_e=O(In(or,nt),fe,we,0),xe=O(In(or+Qt,nt),fe,we,0),Rr(Pi(_e,xe),lr(xe-_e))):Rr(0,we),ft&&Cn?(vn==1?(or=Mt,Qt=yt):(or=jt,Qt=ut),fe=T[ze],_e=A(In(or,St),fe,Me,0),xe=A(In(or+Qt,St),fe,Me,0),hi(Pi(_e,xe),lr(xe-_e))):hi(0,Me)}else Q()}else{let Be=lr(an-pa),ze=lr(nn-ko);if(H.ori==1){let St=Be;Be=ze,ze=St}He=Wn.x&&Be>=Wn.dist,Cn=Wn.y&&ze>=Wn.dist;let Ye=Wn.uni;Ye!=null?He&&Cn&&(He=Be>=Ye,Cn=ze>=Ye,!He&&!Cn&&(ze>Be?Cn=!0:He=!0)):Wn.x&&Wn.y&&(He||Cn)&&(He=Cn=!0);let et,nt;He&&(H.ori==0?(et=Ci,nt=ln):(et=ao,nt=Gt),Rr(Pi(et,nt),lr(nt-et)),Cn||hi(0,Me)),Cn&&(H.ori==1?(et=Ci,nt=ln):(et=ao,nt=Gt),hi(Pi(et,nt),lr(nt-et)),He||Rr(0,we)),!He&&!Cn&&(Rr(0,0),hi(0,0))}if(Wn._x=He,Wn._y=Cn,V==null){if(ie){if(Mn!=null){let[Be,ze]=dt.scales;dt.values[0]=Be!=null?gr(H.ori==0?ln:Gt,Be):null,dt.values[1]=ze!=null?gr(H.ori==1?ln:Gt,ze):null}Ot(Du,r,ln,Gt,Ct,Ke,oe)}if(zi){let Be=ie&&dt.setSeries,ze=Mr.prox;ui==null?zn<=ze&&Br(ci,Si,!0,Be):zn>ze?Br(null,Si,!0,Be):ci!=ui&&Br(ci,Si,!0,Be)}}xr&&(he.idx=oe,y()),X!==!1&&st("setCursor")}let N=null;Object.defineProperty(r,"rect",{get(){return N==null&&B(!1),N}});function B(V=!1){V?N=null:(N=o.getBoundingClientRect(),st("syncRect",N))}function j(V,X,ie,oe,pe,we,Me){ne._lock||ki&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,pe,we,Me,!1,V!=null),V!=null?_(null,!0,!0):_(X,!0,!1))}function q(V,X,ie,oe,pe,we,Me,Be,ze){if(N==null&&B(!1),ji(V),V!=null)ie=V.clientX-N.left,oe=V.clientY-N.top;else{if(ie<0||oe<0){ln=-10,Gt=-10;return}let[Ye,et]=dt.scales,nt=X.cursor.sync,[St,Ut]=nt.values,[Mt,jt]=nt.scales,[yt,ut]=dt.match,vn=X.axes[0].side%2==1,In=H.ori==0?Ct:Ke,or=H.ori==1?Ct:Ke,Qt=vn?we:pe,fe=vn?pe:we,_e=vn?oe:ie,xe=vn?ie:oe;if(Mt!=null?ie=yt(Ye,Mt)?b(St,T[Ye],In,0):-10:ie=In*(_e/Qt),jt!=null?oe=ut(et,jt)?b(Ut,T[et],or,0):-10:oe=or*(xe/fe),H.ori==1){let qe=ie;ie=oe,oe=qe}}ze&&(X==null||X.cursor.event.type==Du)&&((ie<=1||ie>=Ct-1)&&(ie=vs(ie,Ct)),(oe<=1||oe>=Ke-1)&&(oe=vs(oe,Ke))),Be?(pa=ie,ko=oe,[Ci,ao]=ne.move(r,ie,oe)):(ln=ie,Gt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){fn(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,pe,we,Me){ki=!0,He=Cn=Wn._x=Wn._y=!1,q(V,X,ie,oe,pe,we,Me,!0,!1),V!=null&&(wn(Nu,Pu,be,!1),Ot(xg,r,Ci,ao,Ct,Ke,null));let{left:Be,top:ze,width:Ye,height:et}=_t;re=Be,se=ze,ye=Ye,Ce=et}function be(V,X,ie,oe,pe,we,Me){ki=Wn._x=Wn._y=!1,q(V,X,ie,oe,pe,we,Me,!1,!0);let{left:Be,top:ze,width:Ye,height:et}=_t,nt=Ye>0||et>0,St=re!=Be||se!=ze||ye!=Ye||Ce!=et;if(nt&&St&&fn(_t),Wn.setScale&&nt&&St){let Ut=Be,Mt=Ye,jt=ze,yt=et;if(H.ori==1&&(Ut=ze,Mt=et,jt=Be,yt=Ye),He&&rr(C,gr(Ut,C),gr(Ut+Mt,C)),Cn)for(let ut in T){let vn=T[ut];ut!=C&&vn.from==null&&vn.min!=br&&rr(ut,gr(jt+yt,ut),gr(jt,ut))}Q()}else ne.lock&&(ne._lock=!ne._lock,_(X,!0,V!=null));V!=null&&(Fn(Nu,Pu),Ot(Nu,r,ln,Gt,Ct,Ke,null))}function Oe(V,X,ie,oe,pe,we,Me){if(ne._lock)return;ji(V);let Be=ki;if(ki){let ze=!0,Ye=!0,et=10,nt,St;H.ori==0?(nt=He,St=Cn):(nt=Cn,St=He),nt&&St&&(ze=ln<=et||ln>=Ct-et,Ye=Gt<=et||Gt>=Ke-et),nt&&ze&&(ln=ln<Ci?0:Ct),St&&Ye&&(Gt=Gt<ao?0:Ke),_(null,!0,!0),ki=!1}ln=-10,Gt=-10,te.fill(null),_(null,!0,!0),Be&&(ki=Be)}function Re(V,X,ie,oe,pe,we,Me){ne._lock||(ji(V),Ss(),Q(),V!=null&&Ot(_g,r,ln,Gt,Ct,Ke,null))}function Ge(){E.forEach(bS),go(r.width,r.height,!0)}gs(Nl,Xs,Ge);const ht={};ht.mousedown=me,ht.mousemove=j,ht.mouseup=be,ht.dblclick=Re,ht.setSeries=(V,X,ie,oe)=>{let pe=dt.match[2];ie=pe(r,X,ie),ie!=-1&&Br(ie,oe,!0,!1)},ue&&(wn(xg,o,me),wn(Du,o,j),wn(Cg,o,V=>{ji(V),B(!1)}),wn(kg,o,Oe),wn(_g,o,Re),lh.add(r),r.syncRect=B);const tt=r.hooks=t.hooks||{};function st(V,X,ie){Xo?xo.push([V,X,ie]):V in tt&&tt[V].forEach(oe=>{oe.call(null,r,X,ie)})}(t.plugins||[]).forEach(V=>{for(let X in V.hooks)tt[X]=(tt[X]||[]).concat(V.hooks[X])});const kn=(V,X,ie)=>ie,dt=tr({key:null,setSeries:!1,filters:{pub:zg,sub:zg},scales:[C,x[1]?x[1].scale:null],match:[Hg,Hg,kn],values:[null,null]},ne.sync);dt.match.length==2&&dt.match.push(kn),ne.sync=dt;const Mn=dt.key,$t=Tm(Mn);function Ot(V,X,ie,oe,pe,we,Me){dt.filters.pub(V,X,ie,oe,pe,we,Me)&&$t.pub(V,X,ie,oe,pe,we,Me)}$t.sub(r);function ir(V,X,ie,oe,pe,we,Me){dt.filters.sub(V,X,ie,oe,pe,we,Me)&&ht[V](null,X,ie,oe,pe,we,Me)}r.pub=ir;function mr(){$t.unsub(r),lh.delete(r),wr.clear(),zu(Nl,Xs,Ge),g.remove(),ge==null||ge.remove(),st("destroy")}r.destroy=mr;function En(){st("init",t,e),jo(e||t.data,!1),S[C]?De(C,S[C]):Ss(),po=_t.show&&(_t.width>0||_t.height>0),Wi=xr=!0,go(t.width,t.height)}return x.forEach(la),E.forEach(ai),n?n instanceof HTMLElement?(n.appendChild(g),En()):n(r,En):En(),r}Ar.assign=tr,Ar.fmtNum=Vu,Ar.rangeNum=Wl,Ar.rangeLog=Bl,Ar.rangeAsinh=Hu,Ar.orient=bs,Ar.pxRatio=rn,Ar.join=u_,Ar.fmtDate=Yu,Ar.tzDate=x_,Ar.sync=Tm;{Ar.addGap=rS,Ar.clipGaps=Kl;let t=Ar.paths={points:Om};t.linear=Nm,t.stepped=sS,t.bars=aS,t.spline=cS}var Um,Vm;function wS(){return Vm||(Vm=1,Um=function(t,e,n,r,f){var d,p;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(f===void 0)f=t.length-1;else if(f=f|0,f<r||f>=t.length)throw new RangeError("invalid upper bound");for(;r<=f;)if(d=r+(f-r>>>1),p=+n(t[d],e,d,t),p<0)r=d+1;else if(p>0)f=d-1;else return d;return~r}),Um}var xS=wS();const pN=sr("g",ml(xS));var uh,qm;function CS(){if(qm)return uh;qm=1;function t(e,n,r){var f=-1,d=e.length;n<0&&(n=-n>d?0:d+n),r=r>d?d:r,r<0&&(r+=d),d=n>r?0:r-n>>>0,n>>>=0;for(var p=Array(d);++f<d;)p[f]=e[f+n];return p}return uh=t,uh}var hh,Km;function kS(){if(Km)return hh;Km=1;var t=CS();function e(n,r,f){var d=n.length;return f=f===void 0?d:f,!r&&f>=d?n:t(n,r,f)}return hh=e,hh}var dh,Gm;function Ym(){if(Gm)return dh;Gm=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\ufe0e\\ufe0f",p="\\u200d",b=RegExp("["+p+t+f+d+"]");function h(g){return b.test(g)}return dh=h,dh}var fh,Xm;function _S(){if(Xm)return fh;Xm=1;function t(e){return e.split("")}return fh=t,fh}var ph,Qm;function SS(){if(Qm)return ph;Qm=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\ufe0e\\ufe0f",p="["+t+"]",b="["+f+"]",h="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+h+")",s="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",o=g+"?",u="["+d+"]?",m="(?:"+l+"(?:"+[s,a,c].join("|")+")"+u+o+")*",w=u+o+m,x="(?:"+[s+b+"?",b,a,c,p].join("|")+")",E=RegExp(h+"(?="+h+")|"+x+w,"g");function T(k){return k.match(E)||[]}return ph=T,ph}var gh,Zm;function AS(){if(Zm)return gh;Zm=1;var t=_S(),e=Ym(),n=SS();function r(f){return e(f)?n(f):t(f)}return gh=r,gh}var mh,Jm;function TS(){if(Jm)return mh;Jm=1;var t=typeof Fo=="object"&&Fo&&Fo.Object===Object&&Fo;return mh=t,mh}var vh,ev;function $S(){if(ev)return vh;ev=1;var t=TS(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return vh=n,vh}var yh,tv;function bh(){if(tv)return yh;tv=1;var t=$S(),e=t.Symbol;return yh=e,yh}var wh,nv;function MS(){if(nv)return wh;nv=1;function t(e,n){for(var r=-1,f=e==null?0:e.length,d=Array(f);++r<f;)d[r]=n(e[r],r,e);return d}return wh=t,wh}var xh,rv;function ES(){if(rv)return xh;rv=1;var t=Array.isArray;return xh=t,xh}var Ch,iv;function IS(){if(iv)return Ch;iv=1;var t=bh(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,f=t?t.toStringTag:void 0;function d(p){var b=n.call(p,f),h=p[f];try{p[f]=void 0;var g=!0}catch{}var s=r.call(p);return g&&(b?p[f]=h:delete p[f]),s}return Ch=d,Ch}var kh,ov;function LS(){if(ov)return kh;ov=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return kh=n,kh}var _h,sv;function RS(){if(sv)return _h;sv=1;var t=bh(),e=IS(),n=LS(),r="[object Null]",f="[object Undefined]",d=t?t.toStringTag:void 0;function p(b){return b==null?b===void 0?f:r:d&&d in Object(b)?e(b):n(b)}return _h=p,_h}var Sh,av;function OS(){if(av)return Sh;av=1;function t(e){return e!=null&&typeof e=="object"}return Sh=t,Sh}var Ah,lv;function DS(){if(lv)return Ah;lv=1;var t=RS(),e=OS(),n="[object Symbol]";function r(f){return typeof f=="symbol"||e(f)&&t(f)==n}return Ah=r,Ah}var Th,cv;function NS(){if(cv)return Th;cv=1;var t=bh(),e=MS(),n=ES(),r=DS(),f=t?t.prototype:void 0,d=f?f.toString:void 0;function p(b){if(typeof b=="string")return b;if(n(b))return e(b,p)+"";if(r(b))return d?d.call(b):"";var h=b+"";return h=="0"&&1/b==-1/0?"-0":h}return Th=p,Th}var $h,uv;function Ql(){if(uv)return $h;uv=1;var t=NS();function e(n){return n==null?"":t(n)}return $h=e,$h}var Mh,hv;function FS(){if(hv)return Mh;hv=1;var t=kS(),e=Ym(),n=AS(),r=Ql();function f(d){return function(p){p=r(p);var b=e(p)?n(p):void 0,h=b?b[0]:p.charAt(0),g=b?t(b,1).join(""):p.slice(1);return h[d]()+g}}return Mh=f,Mh}var Eh,dv;function fv(){if(dv)return Eh;dv=1;var t=FS(),e=t("toUpperCase");return Eh=e,Eh}var PS=fv();const BS=ml(PS);var Ih,pv;function WS(){if(pv)return Ih;pv=1;var t=Ql(),e=fv();function n(r){return e(t(r).toLowerCase())}return Ih=n,Ih}var Lh,gv;function jS(){if(gv)return Lh;gv=1;function t(e,n,r,f){var d=-1,p=e==null?0:e.length;for(f&&p&&(r=e[++d]);++d<p;)r=n(r,e[d],d,e);return r}return Lh=t,Lh}var Rh,mv;function zS(){if(mv)return Rh;mv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return Rh=t,Rh}var Oh,vv;function HS(){if(vv)return Oh;vv=1;var t=zS(),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"},n=t(e);return Oh=n,Oh}var Dh,yv;function US(){if(yv)return Dh;yv=1;var t=HS(),e=Ql(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",f="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",p=r+f+d,b="["+p+"]",h=RegExp(b,"g");function g(s){return s=e(s),s&&s.replace(n,t).replace(h,"")}return Dh=g,Dh}var Nh,bv;function VS(){if(bv)return Nh;bv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return Nh=e,Nh}var Fh,wv;function qS(){if(wv)return Fh;wv=1;var t=/[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(n){return t.test(n)}return Fh=e,Fh}var Ph,xv;function KS(){if(xv)return Ph;xv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",f=e+n+r,d="\\u2700-\\u27bf",p="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",l=b+h+g+s,o="['’]",u="["+l+"]",m="["+f+"]",w="\\d+",x="["+d+"]",E="["+p+"]",T="[^"+t+l+w+d+p+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+k+")",L="[^"+t+"]",R="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+a+"]",H="\\u200d",P="(?:"+E+"|"+T+")",O="(?:"+I+"|"+T+")",A="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",W="["+c+"]?",U="(?:"+H+"(?:"+[L,R,F].join("|")+")"+W+D+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=W+D+U,he="(?:"+[x,R,F].join("|")+")"+te,ne=RegExp([I+"?"+E+"+"+A+"(?="+[u,I,"$"].join("|")+")",O+"+"+S+"(?="+[u,I+P,"$"].join("|")+")",I+"?"+P+"+"+A,I+"+"+S,Z,K,w,he].join("|"),"g");function ae(ue){return ue.match(ne)||[]}return Ph=ae,Ph}var Bh,Cv;function GS(){if(Cv)return Bh;Cv=1;var t=VS(),e=qS(),n=Ql(),r=KS();function f(d,p,b){return d=n(d),p=b?void 0:p,p===void 0?e(d)?r(d):t(d):d.match(p)||[]}return Bh=f,Bh}var Wh,kv;function YS(){if(kv)return Wh;kv=1;var t=jS(),e=US(),n=GS(),r="['’]",f=RegExp(r,"g");function d(p){return function(b){return t(n(e(b).replace(f,"")),p,"")}}return Wh=d,Wh}var jh,_v;function XS(){if(_v)return jh;_v=1;var t=WS(),e=YS(),n=e(function(r,f,d){return f=f.toLowerCase(),r+(d?t(f):f)});return jh=n,jh}var QS=XS();const ZS=ml(QS),JS=Object.assign({"./ArrayWidget.vue":()=>it(()=>rt.import("./ArrayWidget-DAZApfkV-278468a53d6dcd290939.js"),void 0),"./ArrayplotWidget.vue":()=>it(()=>rt.import("./ArrayplotWidget-BfsxDplv-e75768e19a78a755021f.js"),void 0),"./BlockWidget.vue":()=>it(()=>rt.import("./BlockWidget-SDCUWcMQ-2bc1ff795dd9b8289734.js"),void 0),"./ButtonWidget.vue":()=>it(()=>rt.import("./ButtonWidget-BVMjwC19-21d6311409e6295e5ff1.js"),void 0),"./CanvasWidget.vue":()=>it(()=>rt.import("./CanvasWidget-bVkufjRQ-67d07bc7c7e068b64f55.js"),void 0),"./CanvasdotWidget.vue":()=>it(()=>rt.import("./CanvasdotWidget-DpniFfca-45fb1bde56856286c38d.js"),void 0),"./CanvasimageWidget.vue":()=>it(()=>rt.import("./CanvasimageWidget-DHOSz-dJ-de800e86e1bee6f5a0ff.js"),void 0),"./CanvasimagevalueWidget.vue":()=>it(()=>rt.import("./CanvasimagevalueWidget-zrURWWUL-17057ebfab0467f8b7f5.js"),void 0),"./CanvaslabelWidget.vue":()=>it(()=>rt.import("./CanvaslabelWidget-D-XAMifp-41af33bdafdfcfaeca35.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>it(()=>rt.import("./CanvaslabelvalueWidget-BsIdBtEb-963e3f40288b9cc769c9.js"),void 0),"./CanvaslineWidget.vue":()=>it(()=>rt.import("./CanvaslineWidget-CA2aPGRg-176c5b3f1d9009c13ce0.js"),void 0),"./CanvaslinevalueWidget.vue":()=>it(()=>rt.import("./CanvaslinevalueWidget-J7epKRlo-c968b8847757e14bfb1c.js"),void 0),"./CheckbuttonWidget.vue":()=>it(()=>rt.import("./CheckbuttonWidget-ByH-PDRG-626ee1d1d84173983d50.js"),void 0),"./ComboboxWidget.vue":()=>it(()=>rt.import("./ComboboxWidget-Bdm_fMzW-cab3c8e434fe2c88bab1.js"),void 0),"./DateWidget.vue":()=>it(()=>rt.import("./DateWidget-BaQqthC7-3d8a26b6aafc6de1b56a.js"),void 0),"./DynamicWidget.vue":()=>it(()=>rt.import("./DynamicWidget-CfMtj7H8-28b5c02a544a8b721b2d.js"),void 0),"./FormatvalueWidget.vue":()=>it(()=>rt.import("./FormatvalueWidget--H5B9i_Y-cca10587c6e1ab5b71a6.js"),void 0),"./HorizontalWidget.vue":()=>it(()=>rt.import("./HorizontalWidget-D_gzrOWs-bd70f9d52446f354a3ed.js"),void 0),"./HorizontalboxWidget.vue":()=>it(()=>rt.import("./HorizontalboxWidget-GDcjO-UB-e7a5b1d2df595dfa8528.js"),void 0),"./HorizontallineWidget.vue":()=>it(()=>rt.import("./HorizontallineWidget-DZvOYFxf-5f8d348b3e905046cbc4.js"),void 0),"./IframeWidget.vue":()=>it(()=>rt.import("./IframeWidget-CuUav9b3-4b58f427f7c7c3b092bc.js"),void 0),"./ImageviewerWidget.vue":()=>it(()=>rt.import("./ImageviewerWidget-BMZ6REN4-99508d60b2bf097a6732.js"),void 0),"./LabelWidget.vue":()=>it(()=>rt.import("./LabelWidget-oh6FIG6s-d868fb2bd26ce6d2f3d6.js"),void 0),"./LabelledWidget.vue":()=>it(()=>rt.import("./LabelledWidget-Bic36les-b854193849403490d15f.js"),void 0),"./LabelprogressbarWidget.vue":()=>it(()=>rt.import("./LabelprogressbarWidget-CqIiGoDb-3253bfa6f16674c0a578.js"),void 0),"./LabelsparklineWidget.vue":()=>it(()=>rt.import("./LabelsparklineWidget-DLhmqO02-5615de2dfe11c3bc1e0e.js"),void 0),"./LabelvalueWidget.vue":()=>it(()=>rt.import("./LabelvalueWidget-BefwSSVq-80d87143686ab5e22873.js"),void 0),"./LabelvaluedescWidget.vue":()=>it(()=>rt.import("./LabelvaluedescWidget-NxrCzznm-1abe6e80871d0a1d3f62.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>it(()=>rt.import("./LabelvaluelimitsbarWidget-pq7qoolL-799f04ee161ac207990e.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>it(()=>rt.import("./LabelvaluelimitscolumnWidget-edkpogsl-cc8cb37331d149620877.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>it(()=>rt.import("./LabelvaluerangebarWidget-DpJNv9dh-69d6c63a5b945223a268.js"),void 0),"./LedWidget.vue":()=>it(()=>rt.import("./LedWidget--4eSxBnn-b23e9dba9fe8083fa005.js"),void 0),"./LimitsbarWidget.vue":()=>it(()=>rt.import("./LimitsbarWidget-BQaumgRt-83eeb25d4b6e4e99b119.js"),void 0),"./LimitscolorWidget.vue":()=>it(()=>rt.import("./LimitscolorWidget-BBF9sRtF-62a27f46ce7c054d150f.js"),void 0),"./LimitscolumnWidget.vue":()=>it(()=>rt.import("./LimitscolumnWidget-DZZtSoXw-425281a88105e20ed3ba.js"),void 0),"./LinegraphWidget.vue":()=>it(()=>rt.import("./LinegraphWidget-DTLZmyWs-72c6387f595a0a4013be.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>it(()=>rt.import("./MatrixbycolumnsWidget-dpgZz4wR-f0f3fdf10d49af904bf5.js"),void 0),"./ProgressbarWidget.vue":()=>it(()=>rt.import("./ProgressbarWidget-7cYr8136-1c12582ce9d4ff413a55.js"),void 0),"./RadiobuttonWidget.vue":()=>it(()=>rt.import("./RadiobuttonWidget-DTfn-7F2-2fdf40f484b98c933b8e.js"),void 0),"./RadiogroupWidget.vue":()=>it(()=>rt.import("./RadiogroupWidget-DWvTpw94-72c898511170802d814f.js"),void 0),"./RangebarWidget.vue":()=>it(()=>rt.import("./RangebarWidget-CG2Y7eYp-376805c2784826569f50.js"),void 0),"./RollupWidget.vue":()=>it(()=>rt.import("./RollupWidget-C6HKTfCR-2fee2f5abf13112784d3.js"),void 0),"./ScrollwindowWidget.vue":()=>it(()=>rt.import("./ScrollwindowWidget-DvhBCYd2-1ca5ef1549a42b7ea26c.js"),void 0),"./SignalWidget.vue":()=>it(()=>rt.import("./SignalWidget-BZIoGjam-517ce457178e055a0785.js"),void 0),"./SpacerWidget.vue":()=>it(()=>rt.import("./SpacerWidget-YBS8RZIE-6f604070f76233e8abf6.js"),void 0),"./SparklineWidget.vue":()=>it(()=>rt.import("./SparklineWidget-BMhY9vYe-330a5e7e3db2907e0b78.js"),void 0),"./TabbookWidget.vue":()=>it(()=>rt.import("./TabbookWidget-RfET19pq-f131be0ee6a50775a079.js"),void 0),"./TextboxWidget.vue":()=>it(()=>rt.import("./TextboxWidget-M8vFBSxS-8d0b53e2f7eebf969abb.js"),void 0),"./TextfieldWidget.vue":()=>it(()=>rt.import("./TextfieldWidget-Dev7lCsT-b4e43b129c8b8b194dba.js"),void 0),"./TimeWidget.vue":()=>it(()=>rt.import("./TimeWidget-CQzn13rQ-dde78e9108545bc47090.js"),void 0),"./TitleWidget.vue":()=>it(()=>rt.import("./TitleWidget-C4zbSian-f6fd7ad5542875ddd1c9.js"),void 0),"./ValueWidget.vue":()=>it(()=>rt.import("./ValueWidget-BVI6uUVX-3d7edd0290c877d1cbb8.js"),void 0),"./ValuelimitsbarWidget.vue":()=>it(()=>rt.import("./ValuelimitsbarWidget-BiIcery0-86e4d3b97524111adad6.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>it(()=>rt.import("./ValuelimitscolumnWidget-BiRI8GbI-2b9bd816bf467264a76d.js"),void 0),"./ValuerangebarWidget.vue":()=>it(()=>rt.import("./ValuerangebarWidget-CtMFQu9--3192b0e9ed894b0a92c2.js"),void 0),"./VerticalWidget.vue":()=>it(()=>rt.import("./VerticalWidget-CRmcpQBn-52ff42eb62875348fc5a.js"),void 0),"./VerticalboxWidget.vue":()=>it(()=>rt.import("./VerticalboxWidget-C-qChjug-a7cdc3ed315048ef8b50.js"),void 0)}),eA=Object.entries(JS).reduce((t,[e,n])=>{e=e.split("/").pop();const r=BS(ZS(e.replace(/\.\w+$/,"")));return{...t,[r]:pf(n)}},{}),gN=sr("U",{components:eA}),Sv="openc3-ace-vim-mode-enabled",zh="ace/keyboard/vim",Zl=sr("X",{isVimModeEnabled(){return localStorage.getItem(Sv)==="true"},setVimMode(t){localStorage.setItem(Sv,JSON.stringify(!!t))},toggleVimMode(t){this.isVimModeEnabled()?(t.setKeyboardHandler(null),this.setVimMode(!1)):(t.setKeyboardHandler(zh),this.setVimMode(!0)),t.focus()},applyVimModeIfEnabled(t,{saveFn:e}={}){this.isVimModeEnabled()?(t.setKeyboardHandler(zh),ace.config.loadModule(zh,n=>{n.CodeMirror.Vim.defineEx("write","w",r=>{typeof e=="function"?e():r.ace.execCommand("save")})})):t.setKeyboardHandler(null)}}),tA={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},nA={class:"app-title mr-2"};function rA(t,e,n,r,f,d){const p=Ue("v-col"),b=Ue("v-row"),h=Ue("v-icon"),g=Ue("v-btn"),s=Ue("v-divider"),a=Ue("v-list-item-title"),c=Ue("v-list-item"),l=Ue("v-list"),o=Ue("v-menu"),u=Ue("v-radio"),m=Ue("v-list-item-action"),w=Ue("v-radio-group"),x=Ue("v-checkbox");return lt(),Xt(gf,{to:"#openc3-menu"},[We(b,{"no-gutters":""},{default:Fe(()=>[We(p,{"align-self":"end"},{default:Fe(()=>[fr("span",nA,_n(n.title),1)]),_:1})]),_:1}),We(b,{dense:"",class:"flex-nowrap"},{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(n.menus,(E,T)=>(lt(),Xt(o,{ref_for:!0,ref:"topmenu",key:T},{activator:Fe(({props:k})=>[We(g,fl({ref_for:!0},k,{variant:"outlined",class:"mx-1 menu-button",text:E.label,"data-test":d.formatDT(`${n.title} ${E.label}`)}),{append:Fe(()=>[We(h,{class:"menu-button-icon"},{default:Fe(()=>e[0]||(e[0]=[Ht(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:Fe(()=>[We(l,null,{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(E.items,(k,C)=>(lt(),gn(Li,null,[k.divider?(lt(),Xt(s,{key:C+"-divider"})):k.subMenu&&k.subMenu.length>0?(lt(),gn("div",{key:C+"-submenu"},[(lt(),Xt(o,{"open-on-hover":"",location:"right",key:C},{activator:Fe(({props:L})=>[(lt(),Xt(c,fl({ref_for:!0},L,{disabled:k.disabled,key:C}),tu({append:Fe(()=>[We(h,null,{default:Fe(()=>e[1]||(e[1]=[Ht(" mdi-chevron-right ")])),_:1})]),default:Fe(()=>[!k.radio&&!k.checkbox?(lt(),Xt(a,{key:0,style:is("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Fe(()=>[Ht(_n(k.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[k.icon?{name:"prepend",fn:Fe(()=>[We(h,{disabled:k.disabled},{default:Fe(()=>[Ht(_n(k.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Fe(()=>[We(l,null,{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(k.subMenu,(L,R)=>(lt(),Xt(c,{key:R,"prepend-icon":L.icon,onClick:F=>d.subMenuClick(L)},{default:Fe(()=>[We(a,null,{default:Fe(()=>[Ht(_n(L.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):k.radioGroup?(lt(),Xt(w,{"model-value":k.value,"onUpdate:modelValue":k.command,key:C+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(k.choices,(L,R)=>(lt(),Xt(c,{key:R+"-choice"},{default:Fe(()=>[We(m,{class:"list-action"},{default:Fe(()=>[We(u,{color:"secondary",label:L.label,value:L.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(lt(),Xt(c,{onClick:L=>k.command(k),disabled:k.disabled,"data-test":d.formatDT(`${n.title} ${E.label} ${k.label}`),key:C+"-list"},tu({default:Fe(()=>[k.checkbox?(lt(),Xt(m,{key:0,class:"list-action"},{default:Fe(()=>[We(x,{modelValue:k.checked,"onUpdate:modelValue":L=>k.checked=L,label:k.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Ur("",!0),!k.radio&&!k.checkbox?(lt(),Xt(a,{key:1,style:is("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:Fe(()=>[Ht(_n(k.label),1)]),_:2},1032,["style"])):Ur("",!0)]),_:2},[k.icon?{name:"prepend",fn:Fe(()=>[We(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 iA=Ri(tA,[["render",rA],["__scopeId","data-v-4d454b93"]]);function Av(t,e){return function(){return t.apply(e,arguments)}}const{toString:oA}=Object.prototype,{getPrototypeOf:Hh}=Object,{iterator:Jl,toStringTag:Tv}=Symbol,ec=(t=>e=>{const n=oA.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Bi=t=>(t=t.toLowerCase(),e=>ec(e)===t),tc=t=>e=>typeof e===t,{isArray:ia}=Array,ja=tc("undefined");function sA(t){return t!==null&&!ja(t)&&t.constructor!==null&&!ja(t.constructor)&&Kr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const $v=Bi("ArrayBuffer");function aA(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&$v(t.buffer),e}const lA=tc("string"),Kr=tc("function"),Mv=tc("number"),nc=t=>t!==null&&typeof t=="object",cA=t=>t===!0||t===!1,rc=t=>{if(ec(t)!=="object")return!1;const e=Hh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Tv in t)&&!(Jl in t)},uA=Bi("Date"),hA=Bi("File"),dA=Bi("Blob"),fA=Bi("FileList"),pA=t=>nc(t)&&Kr(t.pipe),gA=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Kr(t.append)&&((e=ec(t))==="formdata"||e==="object"&&Kr(t.toString)&&t.toString()==="[object FormData]"))},mA=Bi("URLSearchParams"),[vA,yA,bA,wA]=["ReadableStream","Request","Response","Headers"].map(Bi),xA=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function za(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,f;if(typeof t!="object"&&(t=[t]),ia(t))for(r=0,f=t.length;r<f;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let b;for(r=0;r<p;r++)b=d[r],e.call(null,t[b],b,t)}}function Ev(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,f;for(;r-- >0;)if(f=n[r],e===f.toLowerCase())return f;return null}const ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Iv=t=>!ja(t)&&t!==ws;function Uh(){const{caseless:t}=Iv(this)&&this||{},e={},n=(r,f)=>{const d=t&&Ev(e,f)||f;rc(e[d])&&rc(r)?e[d]=Uh(e[d],r):rc(r)?e[d]=Uh({},r):ia(r)?e[d]=r.slice():e[d]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&za(arguments[r],n);return e}const CA=(t,e,n,{allOwnKeys:r}={})=>(za(e,(f,d)=>{n&&Kr(f)?t[d]=Av(f,n):t[d]=f},{allOwnKeys:r}),t),kA=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),_A=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},SA=(t,e,n,r)=>{let f,d,p;const b={};if(e=e||{},t==null)return e;do{for(f=Object.getOwnPropertyNames(t),d=f.length;d-- >0;)p=f[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&Hh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},AA=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},TA=t=>{if(!t)return null;if(ia(t))return t;let e=t.length;if(!Mv(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},$A=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Hh(Uint8Array)),MA=(t,e)=>{const n=(t&&t[Jl]).call(t);let r;for(;(r=n.next())&&!r.done;){const f=r.value;e.call(t,f[0],f[1])}},EA=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},IA=Bi("HTMLFormElement"),LA=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Lv=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),RA=Bi("RegExp"),Rv=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};za(n,(f,d)=>{let p;(p=e(f,d,t))!==!1&&(r[d]=p||f)}),Object.defineProperties(t,r)},OA=t=>{Rv(t,(e,n)=>{if(Kr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Kr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},DA=(t,e)=>{const n={},r=f=>{f.forEach(d=>{n[d]=!0})};return ia(t)?r(t):r(String(t).split(e)),n},NA=()=>{},FA=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function PA(t){return!!(t&&Kr(t.append)&&t[Tv]==="FormData"&&t[Jl])}const BA=t=>{const e=new Array(10),n=(r,f)=>{if(nc(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[f]=r;const d=ia(r)?[]:{};return za(r,(p,b)=>{const h=n(p,f+1);!ja(h)&&(d[b]=h)}),e[f]=void 0,d}}return r};return n(t,0)},WA=Bi("AsyncFunction"),jA=t=>t&&(nc(t)||Kr(t))&&Kr(t.then)&&Kr(t.catch),Ov=((t,e)=>t?setImmediate:e?((n,r)=>(ws.addEventListener("message",({source:f,data:d})=>{f===ws&&d===n&&r.length&&r.shift()()},!1),f=>{r.push(f),ws.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Kr(ws.postMessage)),zA=typeof queueMicrotask<"u"?queueMicrotask.bind(ws):typeof process<"u"&&process.nextTick||Ov,HA=t=>t!=null&&Kr(t[Jl]),Ae={isArray:ia,isArrayBuffer:$v,isBuffer:sA,isFormData:gA,isArrayBufferView:aA,isString:lA,isNumber:Mv,isBoolean:cA,isObject:nc,isPlainObject:rc,isReadableStream:vA,isRequest:yA,isResponse:bA,isHeaders:wA,isUndefined:ja,isDate:uA,isFile:hA,isBlob:dA,isRegExp:RA,isFunction:Kr,isStream:pA,isURLSearchParams:mA,isTypedArray:$A,isFileList:fA,forEach:za,merge:Uh,extend:CA,trim:xA,stripBOM:kA,inherits:_A,toFlatObject:SA,kindOf:ec,kindOfTest:Bi,endsWith:AA,toArray:TA,forEachEntry:MA,matchAll:EA,isHTMLForm:IA,hasOwnProperty:Lv,hasOwnProp:Lv,reduceDescriptors:Rv,freezeMethods:OA,toObjectSet:DA,toCamelCase:LA,noop:NA,toFiniteNumber:FA,findKey:Ev,global:ws,isContextDefined:Iv,isSpecCompliantForm:PA,toJSONObject:BA,isAsyncFn:WA,isThenable:jA,setImmediate:Ov,asap:zA,isIterable:HA};function Rt(t,e,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f,this.status=f.status?f.status:null)}Ae.inherits(Rt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const Dv=Rt.prototype,Nv={};["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(t=>{Nv[t]={value:t}}),Object.defineProperties(Rt,Nv),Object.defineProperty(Dv,"isAxiosError",{value:!0}),Rt.from=(t,e,n,r,f,d)=>{const p=Object.create(Dv);return Ae.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Rt.call(p,t.message,e,n,r,f),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const UA=null;function Vh(t){return Ae.isPlainObject(t)||Ae.isArray(t)}function Fv(t){return Ae.endsWith(t,"[]")?t.slice(0,-2):t}function Pv(t,e,n){return t?t.concat(e).map(function(r,f){return r=Fv(r),!n&&f?"["+r+"]":r}).join(n?".":""):e}function VA(t){return Ae.isArray(t)&&!t.some(Vh)}const qA=Ae.toFlatObject(Ae,{},null,function(t){return/^is[A-Z]/.test(t)});function ic(t,e,n){if(!Ae.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!Ae.isUndefined(o[l])});const r=n.metaTokens,f=n.visitor||g,d=n.dots,p=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(e);if(!Ae.isFunction(f))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Ae.isDate(l))return l.toISOString();if(!b&&Ae.isBlob(l))throw new Rt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(l)||Ae.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,o,u){let m=l;if(l&&!u&&typeof l=="object"){if(Ae.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Ae.isArray(l)&&VA(l)||(Ae.isFileList(l)||Ae.endsWith(o,"[]"))&&(m=Ae.toArray(l)))return o=Fv(o),m.forEach(function(w,x){!(Ae.isUndefined(w)||w===null)&&e.append(p===!0?Pv([o],x,d):p===null?o:o+"[]",h(w))}),!1}return Vh(l)?!0:(e.append(Pv(u,o,d),h(l)),!1)}const s=[],a=Object.assign(qA,{defaultVisitor:g,convertValue:h,isVisitable:Vh});function c(l,o){if(!Ae.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Ae.forEach(l,function(u,m){(!(Ae.isUndefined(u)||u===null)&&f.call(e,u,Ae.isString(m)?m.trim():m,o,a))===!0&&c(u,o?o.concat(m):[m])}),s.pop()}}if(!Ae.isObject(t))throw new TypeError("data must be an object");return c(t),e}function Bv(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function qh(t,e){this._pairs=[],t&&ic(t,this,e)}const Wv=qh.prototype;Wv.append=function(t,e){this._pairs.push([t,e])},Wv.toString=function(t){const e=t?function(n){return t.call(this,n,Bv)}:Bv;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function KA(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function jv(t,e,n){if(!e)return t;const r=n&&n.encode||KA;Ae.isFunction(n)&&(n={serialize:n});const f=n&&n.serialize;let d;if(f?d=f(e,n):d=Ae.isURLSearchParams(e)?e.toString():new qh(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}let zv=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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){Ae.forEach(this.handlers,function(n){n!==null&&e(n)})}};const Hv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},GA=typeof URLSearchParams<"u"?URLSearchParams:qh,YA=typeof FormData<"u"?FormData:null,XA=typeof Blob<"u"?Blob:null,QA={isBrowser:!0,classes:{URLSearchParams:GA,FormData:YA,Blob:XA},protocols:["http","https","file","blob","url","data"]},Kh=typeof window<"u"&&typeof document<"u",Gh=typeof navigator=="object"&&navigator||void 0,ZA=Kh&&(!Gh||["ReactNative","NativeScript","NS"].indexOf(Gh.product)<0),JA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",eT=Kh&&window.location.href||"http://localhost",tT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kh,hasStandardBrowserEnv:ZA,hasStandardBrowserWebWorkerEnv:JA,navigator:Gh,origin:eT},Symbol.toStringTag,{value:"Module"})),Tr={...tT,...QA};function nT(t,e){return ic(t,new Tr.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,d){return Tr.isNode&&Ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function rT(t){return Ae.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function iT(t){const e={},n=Object.keys(t);let r;const f=n.length;let d;for(r=0;r<f;r++)d=n[r],e[d]=t[d];return e}function Uv(t){function e(n,r,f,d){let p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),h=d>=n.length;return p=!p&&Ae.isArray(f)?f.length:p,h?(Ae.hasOwnProp(f,p)?f[p]=[f[p],r]:f[p]=r,!b):((!f[p]||!Ae.isObject(f[p]))&&(f[p]=[]),e(n,r,f[p],d)&&Ae.isArray(f[p])&&(f[p]=iT(f[p])),!b)}if(Ae.isFormData(t)&&Ae.isFunction(t.entries)){const n={};return Ae.forEachEntry(t,(r,f)=>{e(rT(r),f,n,0)}),n}return null}function oT(t,e,n){if(Ae.isString(t))try{return(e||JSON.parse)(t),Ae.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ha={transitional:Hv,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,f=Ae.isObject(t);if(f&&Ae.isHTMLForm(t)&&(t=new FormData(t)),Ae.isFormData(t))return r?JSON.stringify(Uv(t)):t;if(Ae.isArrayBuffer(t)||Ae.isBuffer(t)||Ae.isStream(t)||Ae.isFile(t)||Ae.isBlob(t)||Ae.isReadableStream(t))return t;if(Ae.isArrayBufferView(t))return t.buffer;if(Ae.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return nT(t,this.formSerializer).toString();if((d=Ae.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return ic(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return f||r?(e.setContentType("application/json",!1),oT(t)):t}],transformResponse:[function(t){const e=this.transitional||Ha.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Ae.isResponse(t)||Ae.isReadableStream(t))return t;if(t&&Ae.isString(t)&&(n&&!this.responseType||r)){const f=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(f)throw d.name==="SyntaxError"?Rt.from(d,Rt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tr.classes.FormData,Blob:Tr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],t=>{Ha.headers[t]={}});const sT=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aT=t=>{const e={};let n,r,f;return t&&t.split(`
1490
+ `).forEach(function(d){f=d.indexOf(":"),n=d.substring(0,f).trim().toLowerCase(),r=d.substring(f+1).trim(),!(!n||e[n]&&sT[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Vv=Symbol("internals");function Ua(t){return t&&String(t).trim().toLowerCase()}function oc(t){return t===!1||t==null?t:Ae.isArray(t)?t.map(oc):String(t)}function lT(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const cT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Yh(t,e,n,r,f){if(Ae.isFunction(r))return r.call(this,e,n);if(f&&(e=n),!!Ae.isString(e)){if(Ae.isString(r))return e.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(e)}}function uT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function hT(t,e){const n=Ae.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(f,d,p){return this[r].call(this,e,f,d,p)},configurable:!0})})}let Gr=class{constructor(e){e&&this.set(e)}set(e,n,r){const f=this;function d(b,h,g){const s=Ua(h);if(!s)throw new Error("header name must be a non-empty string");const a=Ae.findKey(f,s);(!a||f[a]===void 0||g===!0||g===void 0&&f[a]!==!1)&&(f[a||h]=oc(b))}const p=(b,h)=>Ae.forEach(b,(g,s)=>d(g,s,h));if(Ae.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(Ae.isString(e)&&(e=e.trim())&&!cT(e))p(aT(e),n);else if(Ae.isObject(e)&&Ae.isIterable(e)){let b={},h,g;for(const s of e){if(!Ae.isArray(s))throw TypeError("Object iterator must return a key-value pair");b[g=s[0]]=(h=b[g])?Ae.isArray(h)?[...h,s[1]]:[h,s[1]]:s[1]}p(b,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=Ua(e),e){const r=Ae.findKey(this,e);if(r){const f=this[r];if(!n)return f;if(n===!0)return lT(f);if(Ae.isFunction(n))return n.call(this,f,r);if(Ae.isRegExp(n))return n.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ua(e),e){const r=Ae.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Yh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let f=!1;function d(p){if(p=Ua(p),p){const b=Ae.findKey(r,p);b&&(!n||Yh(r,r[b],b,n))&&(delete r[b],f=!0)}}return Ae.isArray(e)?e.forEach(d):d(e),f}clear(e){const n=Object.keys(this);let r=n.length,f=!1;for(;r--;){const d=n[r];(!e||Yh(this,this[d],d,e,!0))&&(delete this[d],f=!0)}return f}normalize(e){const n=this,r={};return Ae.forEach(this,(f,d)=>{const p=Ae.findKey(r,d);if(p){n[p]=oc(f),delete n[d];return}const b=e?uT(d):String(d).trim();b!==d&&delete n[d],n[b]=oc(f),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Ae.forEach(this,(r,f)=>{r!=null&&r!==!1&&(n[f]=e&&Ae.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
1491
+ `)}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,...n){const r=new this(e);return n.forEach(f=>r.set(f)),r}static accessor(e){const n=(this[Vv]=this[Vv]={accessors:{}}).accessors,r=this.prototype;function f(d){const p=Ua(d);n[p]||(hT(r,d),n[p]=!0)}return Ae.isArray(e)?e.forEach(f):f(e),this}};Gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(Gr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Ae.freezeMethods(Gr);function Xh(t,e){const n=this||Ha,r=e||n,f=Gr.from(r.headers);let d=r.data;return Ae.forEach(t,function(p){d=p.call(n,d,f.normalize(),e?e.status:void 0)}),f.normalize(),d}function qv(t){return!!(t&&t.__CANCEL__)}function oa(t,e,n){Rt.call(this,t??"canceled",Rt.ERR_CANCELED,e,n),this.name="CanceledError"}Ae.inherits(oa,Rt,{__CANCEL__:!0});function Kv(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dT(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fT(t,e){t=t||10;const n=new Array(t),r=new Array(t);let f=0,d=0,p;return e=e!==void 0?e:1e3,function(b){const h=Date.now(),g=r[d];p||(p=h),n[f]=b,r[f]=h;let s=d,a=0;for(;s!==f;)a+=n[s++],s=s%t;if(f=(f+1)%t,f===d&&(d=(d+1)%t),h-p<e)return;const c=g&&h-g;return c?Math.round(a*1e3/c):void 0}}function pT(t,e){let n=0,r=1e3/e,f,d;const p=(b,h=Date.now())=>{n=h,f=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const h=Date.now(),g=h-n;g>=r?p(b,h):(f=b,d||(d=setTimeout(()=>{d=null,p(f)},r-g)))},()=>f&&p(f)]}const sc=(t,e,n=3)=>{let r=0;const f=fT(50,250);return pT(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,h=p-r,g=f(h),s=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:h,rate:g||void 0,estimated:g&&b&&s?(b-p)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Gv=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Yv=t=>(...e)=>Ae.asap(()=>t(...e)),gT=Tr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Tr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Tr.origin),Tr.navigator&&/(msie|trident)/i.test(Tr.navigator.userAgent)):()=>!0,mT=Tr.hasStandardBrowserEnv?{write(t,e,n,r,f,d){const p=[t+"="+encodeURIComponent(e)];Ae.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Ae.isString(r)&&p.push("path="+r),Ae.isString(f)&&p.push("domain="+f),d===!0&&p.push("secure"),document.cookie=p.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vT(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yT(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Xv(t,e,n){let r=!vT(e);return t&&(r||n==!1)?yT(t,e):e}const Qv=t=>t instanceof Gr?{...t}:t;function xs(t,e){e=e||{};const n={};function r(g,s,a,c){return Ae.isPlainObject(g)&&Ae.isPlainObject(s)?Ae.merge.call({caseless:c},g,s):Ae.isPlainObject(s)?Ae.merge({},s):Ae.isArray(s)?s.slice():s}function f(g,s,a,c){if(Ae.isUndefined(s)){if(!Ae.isUndefined(g))return r(void 0,g,a,c)}else return r(g,s,a,c)}function d(g,s){if(!Ae.isUndefined(s))return r(void 0,s)}function p(g,s){if(Ae.isUndefined(s)){if(!Ae.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function b(g,s,a){if(a in e)return r(g,s);if(a in t)return r(void 0,g)}const h={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:b,headers:(g,s,a)=>f(Qv(g),Qv(s),a,!0)};return Ae.forEach(Object.keys(Object.assign({},t,e)),function(g){const s=h[g]||f,a=s(t[g],e[g],g);Ae.isUndefined(a)&&s!==b||(n[g]=a)}),n}const Zv=t=>{const e=xs({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:f,xsrfCookieName:d,headers:p,auth:b}=e;e.headers=p=Gr.from(p),e.url=jv(Xv(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let h;if(Ae.isFormData(n)){if(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((h=p.getContentType())!==!1){const[g,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...s].join("; "))}}if(Tr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(e)),r||r!==!1&&gT(e.url))){const g=f&&d&&mT.read(d);g&&p.set(f,g)}return e},bT=typeof XMLHttpRequest<"u",wT=bT&&function(t){return new Promise(function(e,n){const r=Zv(t);let f=r.data;const d=Gr.from(r.headers).normalize();let{responseType:p,onUploadProgress:b,onDownloadProgress:h}=r,g,s,a,c,l;function o(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function m(){if(!u)return;const x=Gr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!p||p==="text"||p==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:x,config:t,request:u};Kv(function(T){e(T),o()},function(T){n(T),o()},E),u=null}"onloadend"in u?u.onloadend=m:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(m)},u.onabort=function(){u&&(n(new Rt("Request aborted",Rt.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new Rt("Network Error",Rt.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Hv;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),n(new Rt(x,E.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,t,u)),u=null},f===void 0&&d.setContentType(null),"setRequestHeader"in u&&Ae.forEach(d.toJSON(),function(x,E){u.setRequestHeader(E,x)}),Ae.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),p&&p!=="json"&&(u.responseType=r.responseType),h&&([a,l]=sc(h,!0),u.addEventListener("progress",a)),b&&u.upload&&([s,c]=sc(b),u.upload.addEventListener("progress",s),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=x=>{u&&(n(!x||x.type?new oa(null,t,u):x),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=dT(r.url);if(w&&Tr.protocols.indexOf(w)===-1){n(new Rt("Unsupported protocol "+w+":",Rt.ERR_BAD_REQUEST,t));return}u.send(f||null)})},xT=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,f;const d=function(g){if(!f){f=!0,b();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Rt?s:new oa(s instanceof Error?s.message:s))}};let p=e&&setTimeout(()=>{p=null,d(new Rt(`timeout ${e} of ms exceeded`,Rt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:h}=r;return h.unsubscribe=()=>Ae.asap(b),h}},CT=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,f;for(;r<n;)f=r+e,yield t.slice(r,f),r=f},kT=async function*(t,e){for await(const n of _T(t))yield*CT(n,e)},_T=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Jv=(t,e,n,r)=>{const f=kT(t,e);let d=0,p,b=h=>{p||(p=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await f.next();if(g){b(),h.close();return}let a=s.byteLength;if(n){let c=d+=a;n(c)}h.enqueue(new Uint8Array(s))}catch(g){throw b(g),g}},cancel(h){return b(h),f.return()}},{highWaterMark:2})},ac=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ey=ac&&typeof ReadableStream=="function",ST=ac&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ty=(t,...e)=>{try{return!!t(...e)}catch{return!1}},AT=ey&&ty(()=>{let t=!1;const e=new Request(Tr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ny=64*1024,Qh=ey&&ty(()=>Ae.isReadableStream(new Response("").body)),lc={stream:Qh&&(t=>t.body)};ac&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!lc[e]&&(lc[e]=Ae.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Rt(`Response type '${e}' is not supported`,Rt.ERR_NOT_SUPPORT,r)})})})(new Response);const TT=async t=>{if(t==null)return 0;if(Ae.isBlob(t))return t.size;if(Ae.isSpecCompliantForm(t))return(await new Request(Tr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(t)||Ae.isArrayBuffer(t))return t.byteLength;if(Ae.isURLSearchParams(t)&&(t=t+""),Ae.isString(t))return(await ST(t)).byteLength},$T=async(t,e)=>Ae.toFiniteNumber(t.getContentLength())??TT(e),MT=ac&&(async t=>{let{url:e,method:n,data:r,signal:f,cancelToken:d,timeout:p,onDownloadProgress:b,onUploadProgress:h,responseType:g,headers:s,withCredentials:a="same-origin",fetchOptions:c}=Zv(t);g=g?(g+"").toLowerCase():"text";let l=xT([f,d&&d.toAbortSignal()],p),o;const u=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let m;try{if(h&&AT&&n!=="get"&&n!=="head"&&(m=await $T(s,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Ae.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[L,R]=Gv(m,sc(Yv(h)));r=Jv(k.body,ny,L,R)}}Ae.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...c,signal:l,method:n.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let x=await fetch(o);const E=Qh&&(g==="stream"||g==="response");if(Qh&&(b||E&&u)){const k={};["status","statusText","headers"].forEach(F=>{k[F]=x[F]});const C=Ae.toFiniteNumber(x.headers.get("content-length")),[L,R]=b&&Gv(C,sc(Yv(b),!0))||[];x=new Response(Jv(x.body,ny,L,()=>{R&&R(),u&&u()}),k)}g=g||"text";let T=await lc[Ae.findKey(lc,g)||"text"](x,t);return!E&&u&&u(),await new Promise((k,C)=>{Kv(k,C,{data:T,headers:Gr.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:o})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Rt("Network Error",Rt.ERR_NETWORK,t,o),{cause:w.cause||w}):Rt.from(w,w&&w.code,t,o)}}),Zh={http:UA,xhr:wT,fetch:MT};Ae.forEach(Zh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ry=t=>`- ${t}`,ET=t=>Ae.isFunction(t)||t===null||t===!1,iy={getAdapter:t=>{t=Ae.isArray(t)?t:[t];const{length:e}=t;let n,r;const f={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!ET(n)&&(r=Zh[(p=String(n)).toLowerCase()],r===void 0))throw new Rt(`Unknown adapter '${p}'`);if(r)break;f[p||"#"+d]=r}if(!r){const d=Object.entries(f).map(([b,h])=>`adapter ${b} `+(h===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1492
+ `+d.map(ry).join(`
1493
+ `):" "+ry(d[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:Zh};function Jh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new oa(null,t)}function oy(t){return Jh(t),t.headers=Gr.from(t.headers),t.data=Xh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),iy.getAdapter(t.adapter||Ha.adapter)(t).then(function(e){return Jh(t),e.data=Xh.call(t,t.transformResponse,e),e.headers=Gr.from(e.headers),e},function(e){return qv(e)||(Jh(t),e&&e.response&&(e.response.data=Xh.call(t,t.transformResponse,e.response),e.response.headers=Gr.from(e.response.headers))),Promise.reject(e)})}const sy="1.9.0",cc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{cc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ay={};cc.transitional=function(t,e,n){function r(f,d){return"[Axios v"+sy+"] Transitional option '"+f+"'"+d+(n?". "+n:"")}return(f,d,p)=>{if(t===!1)throw new Rt(r(d," has been removed"+(e?" in "+e:"")),Rt.ERR_DEPRECATED);return e&&!ay[d]&&(ay[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(f,d,p):!0}},cc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function IT(t,e,n){if(typeof t!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let f=r.length;for(;f-- >0;){const d=r[f],p=e[d];if(p){const b=t[d],h=b===void 0||p(b,d,t);if(h!==!0)throw new Rt("option "+d+" must be "+h,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+d,Rt.ERR_BAD_OPTION)}}const uc={assertOptions:IT,validators:cc},Ji=uc.validators;let Cs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new zv,response:new zv}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const d=f.stack?f.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1494
+ `+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=xs(this.defaults,n);const{transitional:r,paramsSerializer:f,headers:d}=n;r!==void 0&&uc.assertOptions(r,{silentJSONParsing:Ji.transitional(Ji.boolean),forcedJSONParsing:Ji.transitional(Ji.boolean),clarifyTimeoutError:Ji.transitional(Ji.boolean)},!1),f!=null&&(Ae.isFunction(f)?n.paramsSerializer={serialize:f}:uc.assertOptions(f,{encode:Ji.function,serialize:Ji.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),uc.assertOptions(n,{baseUrl:Ji.spelling("baseURL"),withXsrfToken:Ji.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=d&&Ae.merge(d.common,d[n.method]);d&&Ae.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=Gr.concat(p,d);const b=[];let h=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(h=h&&o.synchronous,b.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let s,a=0,c;if(!h){const o=[oy.bind(this),void 0];for(o.unshift.apply(o,b),o.push.apply(o,g),c=o.length,s=Promise.resolve(n);a<c;)s=s.then(o[a++],o[a++]);return s}c=b.length;let l=n;for(a=0;a<c;){const o=b[a++],u=b[a++];try{l=o(l)}catch(m){u.call(this,m);break}}try{s=oy.call(this,l)}catch(o){return Promise.reject(o)}for(a=0,c=g.length;a<c;)s=s.then(g[a++],g[a++]);return s}getUri(e){e=xs(this.defaults,e);const n=Xv(e.baseURL,e.url,e.allowAbsoluteUrls);return jv(n,e.params,e.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(t){Cs.prototype[t]=function(e,n){return this.request(xs(n||{},{method:t,url:e,data:(n||{}).data}))}}),Ae.forEach(["post","put","patch"],function(t){function e(n){return function(r,f,d){return this.request(xs(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:f}))}}Cs.prototype[t]=e(),Cs.prototype[t+"Form"]=e(!0)});let LT=class Jb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(f){n=f});const r=this;this.promise.then(f=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](f);r._listeners=null}),this.promise.then=f=>{let d;const p=new Promise(b=>{r.subscribe(b),d=b}).then(f);return p.cancel=function(){r.unsubscribe(d)},p},e(function(f,d,p){r.reason||(r.reason=new oa(f,d,p),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Jb(function(n){e=n}),cancel:e}}};function RT(t){return function(e){return t.apply(null,e)}}function OT(t){return Ae.isObject(t)&&t.isAxiosError===!0}const ed={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(ed).forEach(([t,e])=>{ed[e]=t});function ly(t){const e=new Cs(t),n=Av(Cs.prototype.request,e);return Ae.extend(n,Cs.prototype,e,{allOwnKeys:!0}),Ae.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ly(xs(t,r))},n}const qn=sr("E",ly(Ha));qn.Axios=Cs,qn.CanceledError=oa,qn.CancelToken=LT,qn.isCancel=qv,qn.VERSION=sy,qn.toFormData=ic,qn.AxiosError=Rt,qn.Cancel=qn.CanceledError,qn.all=function(t){return Promise.all(t)},qn.spread=RT,qn.isAxiosError=OT,qn.mergeConfig=xs,qn.AxiosHeaders=Gr,qn.formToJSON=t=>Uv(Ae.isHTMLForm(t)?new FormData(t):t),qn.getAdapter=iy.getAdapter,qn.HttpStatusCode=ed,qn.default=qn;const{Axios:mN,AxiosError:vN,CanceledError:yN,isCancel:bN,CancelToken:wN,VERSION:xN,all:CN,Cancel:kN,isAxiosError:_N,spread:SN,toFormData:AN,AxiosHeaders:TN,HttpStatusCode:$N,formToJSON:MN,getAdapter:EN,mergeConfig:IN}=qn;function cy(){return Object.assign({},zs())}function DT(t,e,n){const r=Tn(t,void 0);return r.setTime(r.getTime()+e*pl),r}function NT(t,e){const n=()=>er(void 0,NaN),r=WT(t);let f;if(r.date){const h=jT(r.date,2);f=zT(h.restDateString,h.year)}if(!f||isNaN(+f))return n();const d=+f;let p=0,b;if(r.time&&(p=HT(r.time),isNaN(p)))return n();if(r.timezone){if(b=UT(r.timezone),isNaN(b))return n()}else{const h=new Date(d+p),g=Tn(0,void 0);return g.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),g.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),g}return Tn(d+p+b,void 0)}const hc={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*)?))?$/,BT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function WT(t){const e={},n=t.split(hc.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],hc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(hc.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const f=hc.timezone.exec(r);f?(e.time=r.replace(f[1],""),e.timezone=f[1]):e.time=r}return e}function jT(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const f=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?f:d*100,restDateString:t.slice((r[1]||r[2]).length)}}function zT(t,e){if(e===null)return new Date(NaN);const n=t.match(FT);if(!n)return new Date(NaN);const r=!!n[4],f=Va(n[1]),d=Va(n[2])-1,p=Va(n[3]),b=Va(n[4]),h=Va(n[5])-1;if(r)return YT(e,b,h)?VT(e,b,h):new Date(NaN);{const g=new Date(0);return!KT(e,d,p)||!GT(e,f)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(f,p)),g)}}function Va(t){return t?parseInt(t):1}function HT(t){const e=t.match(PT);if(!e)return NaN;const n=td(e[1]),r=td(e[2]),f=td(e[3]);return XT(n,r,f)?n*ou+r*pl+f*1e3:NaN}function td(t){return t&&parseFloat(t.replace(",","."))||0}function UT(t){if(t==="Z")return 0;const e=t.match(BT);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),f=e[3]&&parseInt(e[3])||0;return QT(r,f)?n*(r*ou+f*pl):NaN}function VT(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const f=r.getUTCDay()||7,d=(e-1)*7+n+1-f;return r.setUTCDate(r.getUTCDate()+d),r}const qT=[31,null,31,30,31,30,31,31,30,31,30,31];function uy(t){return t%400===0||t%4===0&&t%100!==0}function KT(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(qT[e]||(uy(t)?29:28))}function GT(t,e){return e>=1&&e<=(uy(t)?366:365)}function YT(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function XT(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function QT(t,e){return e>=0&&e<=59}function ZT(t,e,n){return DT(t,-e)}function hy(t,e,n){const r=cy(),f=t$(t,n.timeZone,n.locale??r.locale);return"formatToParts"in f?JT(f,e):e$(f,e)}function JT(t,e){const n=t.formatToParts(e);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function e$(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function t$(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function n$(t,e){const n=a$(e);return"formatToParts"in n?i$(n,t):o$(n,t)}const r$={year:0,month:1,day:2,hour:3,minute:4,second:5};function i$(t,e){try{const n=t.formatToParts(e),r=[];for(let f=0;f<n.length;f++){const d=r$[n[f].type];d!==void 0&&(r[d]=parseInt(n[f].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function o$(t,e){const n=t.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);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 nd={},dy=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")),s$=dy==="06/25/2014, 00:00:00"||dy==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function a$(t){return nd[t]||(nd[t]=s$?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),nd[t]}function fy(t,e,n,r,f,d,p){const b=new Date(0);return b.setUTCFullYear(t,e,n),b.setUTCHours(r,f,d,p),b}const py=36e5,l$=6e4,rd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function id(t,e,n){if(!t)return 0;let r=rd.timezoneZ.exec(t);if(r)return 0;let f,d;if(r=rd.timezoneHH.exec(t),r)return f=parseInt(r[1],10),gy(f)?-(f*py):NaN;if(r=rd.timezoneHHMM.exec(t),r){f=parseInt(r[2],10);const p=parseInt(r[3],10);return gy(f,p)?(d=Math.abs(f)*py+p*l$,r[1]==="+"?-d:d):NaN}if(h$(t)){e=new Date(e||Date.now());const p=n?e:c$(e),b=od(p,t);return-(n?b:u$(e,b,t))}return NaN}function c$(t){return fy(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function od(t,e){const n=n$(t,e),r=fy(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let f=t.getTime();const d=f%1e3;return f-=d>=0?d:1e3+d,r-f}function u$(t,e,n){let r=t.getTime()-e;const f=od(new Date(r),n);if(e===f)return e;r-=f-e;const d=od(new Date(r),n);return f===d?f:Math.max(f,d)}function gy(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const my={};function h$(t){if(my[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),my[t]=!0,!0}catch{return!1}}const d$=60*1e3,f$={X:function(t,e,n){const r=sd(n.timeZone,t);if(r===0)return"Z";switch(e){case"X":return vy(r);case"XXXX":case"XX":return sa(r);case"XXXXX":case"XXX":default:return sa(r,":")}},x:function(t,e,n){const r=sd(n.timeZone,t);switch(e){case"x":return vy(r);case"xxxx":case"xx":return sa(r);case"xxxxx":case"xxx":default:return sa(r,":")}},O:function(t,e,n){const r=sd(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+p$(r,":");case"OOOO":default:return"GMT"+sa(r,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return hy("short",t,n);case"zzzz":default:return hy("long",t,n)}}};function sd(t,e){const n=t?id(t,e,!0)/d$:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function dc(t,e){const n=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<e;)r="0"+r;return n+r}function sa(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=dc(Math.floor(r/60),2),d=dc(Math.floor(r%60),2);return n+f+e+d}function vy(t,e){return t%60===0?(t>0?"-":"+")+dc(Math.abs(t)/60,2):sa(t,e)}function p$(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),f=Math.floor(r/60),d=r%60;return d===0?n+String(f):n+String(f)+e+dc(d,2)}function yy(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+t-+e}const g$=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,ad=36e5,by=6e4,m$=2,Fr={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:g$};function wy(t,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const n=e.additionalDigits==null?m$:Number(e.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=v$(t),{year:f,restDateString:d}=y$(r.date,n),p=b$(d,f);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const b=p.getTime();let h=0,g;if(r.time&&(h=w$(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=id(r.timeZone||e.timeZone,new Date(b+h)),isNaN(g))return new Date(NaN)}else g=yy(new Date(b+h)),g=yy(new Date(b+h+g));return new Date(b+h+g)}else return new Date(NaN)}function v$(t){const e={};let n=Fr.dateTimePattern.exec(t),r;if(n?(e.date=n[1],r=n[3]):(n=Fr.datePattern.exec(t),n?(e.date=n[1],r=n[2]):(e.date=null,r=t)),r){const f=Fr.timeZone.exec(r);f?(e.time=r.replace(f[1],""),e.timeZone=f[1].trim()):e.time=r}return e}function y$(t,e){if(t){const n=Fr.YYY[e],r=Fr.YYYYY[e];let f=Fr.YYYY.exec(t)||r.exec(t);if(f){const d=f[1];return{year:parseInt(d,10),restDateString:t.slice(d.length)}}if(f=Fr.YY.exec(t)||n.exec(t),f){const d=f[1];return{year:parseInt(d,10)*100,restDateString:t.slice(d.length)}}}return{year:null}}function b$(t,e){if(e===null)return null;let n,r,f;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let d=Fr.MM.exec(t);if(d)return n=new Date(0),r=parseInt(d[1],10)-1,ky(e,r)?(n.setUTCFullYear(e,r),n):new Date(NaN);if(d=Fr.DDD.exec(t),d){n=new Date(0);const p=parseInt(d[1],10);return k$(e,p)?(n.setUTCFullYear(e,0,p),n):new Date(NaN)}if(d=Fr.MMDD.exec(t),d){n=new Date(0),r=parseInt(d[1],10)-1;const p=parseInt(d[2],10);return ky(e,r,p)?(n.setUTCFullYear(e,r,p),n):new Date(NaN)}if(d=Fr.Www.exec(t),d)return f=parseInt(d[1],10)-1,_y(f)?xy(e,f):new Date(NaN);if(d=Fr.WwwD.exec(t),d){f=parseInt(d[1],10)-1;const p=parseInt(d[2],10)-1;return _y(f,p)?xy(e,f,p):new Date(NaN)}return null}function w$(t){let e,n,r=Fr.HH.exec(t);if(r)return e=parseFloat(r[1].replace(",",".")),ld(e)?e%24*ad:NaN;if(r=Fr.HHMM.exec(t),r)return e=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),ld(e,n)?e%24*ad+n*by:NaN;if(r=Fr.HHMMSS.exec(t),r){e=parseInt(r[1],10),n=parseInt(r[2],10);const f=parseFloat(r[3].replace(",","."));return ld(e,n,f)?e%24*ad+n*by+f*1e3:NaN}return null}function xy(t,e,n){e=e||0,n=n||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const f=r.getUTCDay()||7,d=e*7+n+1-f;return r.setUTCDate(r.getUTCDate()+d),r}const x$=[31,28,31,30,31,30,31,31,30,31,30,31],C$=[31,29,31,30,31,30,31,31,30,31,30,31];function Cy(t){return t%400===0||t%4===0&&t%100!==0}function ky(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const r=Cy(t);if(r&&n>C$[e]||!r&&n>x$[e])return!1}return!0}function k$(t,e){if(e<1)return!1;const n=Cy(t);return!(n&&e>366||!n&&e>365)}function _y(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function ld(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const _$=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function S$(t,e,n={}){e=String(e);const r=e.match(_$);if(r){const f=wy(n.originalDate||t,n);e=r.reduce(function(d,p){if(p[0]==="'")return d;const b=d.indexOf(p),h=d[b-1]==="'",g=d.replace(p,"'"+f$[p[0]](f,p,n)+"'");return h?g.substring(0,b-1)+g.substring(b+1):g},e)}return No(t,e,n)}function A$(t,e,n){t=wy(t,n);const r=id(e,t,!0),f=new Date(t.getTime()-r),d=new Date(0);return d.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),d.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),d}function fc(t,e,n,r){return r={...r,timeZone:e,originalDate:t},S$(A$(t,e,{timeZone:r.timeZone}),n,r)}const pc="yyyy-MM-dd",Sy="HH:mm:ss.SSS",Ay="HH:mm:ss",gc=`${pc} ${Sy}`,Ty=`${pc} ${Ay}`,LN=sr("R",{methods:{parseDateTime(t,e){return t.includes(" ")&&(t=t.replace(" ","T")),e&&e==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,e){return No(!e||e==="local"?ZT(t,t.getTimezoneOffset()):t,gc)},formatDateTime(t,e){return!e||e==="local"?No(t,gc):fc(t,e,gc)},formatDateTimeHMS(t,e){return!e||e==="local"?No(t,Ty):fc(t,e,Ty)},formatDate:function(t,e){return!e||e==="local"?No(t,pc):fc(t,this.timeZone,pc)},formatTime:function(t,e,n=Sy){return!e||e==="local"?No(t,n):fc(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,Ay)},formatTimestamp(t,e){return this.formatDateTime(NT(t),e)},formatSeconds(t,e){return this.formatDateTime(new Date(t*1e3),e)},formatNanoseconds(t,e){return this.formatDateTime(new Date(parseInt(t)/1e6),e)}}});var T$=Object.defineProperty,$$=(t,e,n)=>e in t?T$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ot=(t,e,n)=>$$(t,typeof e!="symbol"?e+"":e,n);function cd(t,e,n){const r=Tn(t,n==null?void 0:n.in);return isNaN(e)?er((n==null?void 0:n.in)||t,NaN):(e&&r.setDate(r.getDate()+e),r)}function M$(t,e){const n=Tn(t,void 0).getDay();return n===0?7:n}function E$(t,e){const n=I$(e)?new e(0):er(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function I$(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const L$=10;let $y=class{constructor(){ot(this,"subPriority",0)}validate(e,n){return!0}},R$=class extends $y{constructor(e,n,r,f,d){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=f,d&&(this.subPriority=d)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}},O$=class extends $y{constructor(e,n){super(),ot(this,"priority",L$),ot(this,"subPriority",-1),this.context=e||(r=>er(n,r))}set(e,n){return n.timestampIsSet?e:er(e,E$(e,this.context))}};class on{run(e,n,r,f){const d=this.parse(e,n,r,f);return d?{setter:new R$(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,n,r){return!0}}class D$ extends on{constructor(){super(...arguments),ot(this,"priority",140),ot(this,"incompatibleTokens",["R","u","t","T"])}parse(e,n,r){switch(n){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,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const Kn={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}/},eo={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 Gn(t,e){return t&&{value:e(t.value),rest:t.rest}}function Ln(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function to(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,f=n[2]?parseInt(n[2],10):0,d=n[3]?parseInt(n[3],10):0,p=n[5]?parseInt(n[5],10):0;return{value:r*(f*ou+d*pl+p*vw),rest:e.slice(n[0].length)}}function My(t){return Ln(Kn.anyDigitsSigned,t)}function Nn(t,e){switch(t){case 1:return Ln(Kn.singleDigit,e);case 2:return Ln(Kn.twoDigits,e);case 3:return Ln(Kn.threeDigits,e);case 4:return Ln(Kn.fourDigits,e);default:return Ln(new RegExp("^\\d{1,"+t+"}"),e)}}function Ey(t,e){switch(t){case 1:return Ln(Kn.singleDigitSigned,e);case 2:return Ln(Kn.twoDigitsSigned,e);case 3:return Ln(Kn.threeDigitsSigned,e);case 4:return Ln(Kn.fourDigitsSigned,e);default:return Ln(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ud(t){switch(t){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 Iy(t,e){const n=e>0,r=n?e:1-e;let f;if(r<=50)f=t||100;else{const d=r+50,p=Math.trunc(d/100)*100,b=t>=d%100;f=t+p-(b?100:0)}return n?f:1-f}function Ly(t){return t%400===0||t%4===0&&t%100!==0}class N$ extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,n,r){const f=d=>({year:d,isTwoDigitYear:n==="yy"});switch(n){case"y":return Gn(Nn(4,e),f);case"yo":return Gn(r.ordinalNumber(e,{unit:"year"}),f);default:return Gn(Nn(n.length,e),f)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const f=e.getFullYear();if(r.isTwoDigitYear){const p=Iy(r.year,f);return e.setFullYear(p,0,1),e.setHours(0,0,0,0),e}const d=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(d,0,1),e.setHours(0,0,0,0),e}}let F$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,n,r){const f=d=>({year:d,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Gn(Nn(4,e),f);case"Yo":return Gn(r.ordinalNumber(e,{unit:"year"}),f);default:return Gn(Nn(n.length,e),f)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,f){const d=au(e,f);if(r.isTwoDigitYear){const b=Iy(r.year,d);return e.setFullYear(b,0,f.firstWeekContainsDate),e.setHours(0,0,0,0),Oo(e,f)}const p=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(p,0,f.firstWeekContainsDate),e.setHours(0,0,0,0),Oo(e,f)}},P$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,n){return Ey(n==="R"?4:n.length,e)}set(e,n,r){const f=er(e,0);return f.setFullYear(r,0,4),f.setHours(0,0,0,0),Hs(f)}},B$=class extends on{constructor(){super(...arguments),ot(this,"priority",130),ot(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,n){return Ey(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}},W$=class extends on{constructor(){super(...arguments),ot(this,"priority",120),ot(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"Q":case"QQ":return Nn(n.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,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},j$=class extends on{constructor(){super(...arguments),ot(this,"priority",120),ot(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"q":case"qq":return Nn(n.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,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},z$=class extends on{constructor(){super(...arguments),ot(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ot(this,"priority",110)}parse(e,n,r){const f=d=>d-1;switch(n){case"M":return Gn(Ln(Kn.month,e),f);case"MM":return Gn(Nn(2,e),f);case"Mo":return Gn(r.ordinalNumber(e,{unit:"month"}),f);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,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},H$=class extends on{constructor(){super(...arguments),ot(this,"priority",110),ot(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,n,r){const f=d=>d-1;switch(n){case"L":return Gn(Ln(Kn.month,e),f);case"LL":return Gn(Nn(2,e),f);case"Lo":return Gn(r.ordinalNumber(e,{unit:"month"}),f);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,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}};function U$(t,e,n){const r=Tn(t,n==null?void 0:n.in),f=jf(r,n)-e;return r.setDate(r.getDate()-f*7),Tn(r,n==null?void 0:n.in)}let V$=class extends on{constructor(){super(...arguments),ot(this,"priority",100),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,n,r){switch(n){case"w":return Ln(Kn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,f){return Oo(U$(e,r,f),f)}};function q$(t,e,n){const r=Tn(t,void 0),f=Wf(r)-e;return r.setDate(r.getDate()-f*7),r}let K$=class extends on{constructor(){super(...arguments),ot(this,"priority",100),ot(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,n,r){switch(n){case"I":return Ln(Kn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return Hs(q$(e,r))}};const G$=[31,28,31,30,31,30,31,31,30,31,30,31],Y$=[31,29,31,30,31,30,31,31,30,31,30,31];let X$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"subPriority",1),ot(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"d":return Ln(Kn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(n.length,e)}}validate(e,n){const r=e.getFullYear(),f=Ly(r),d=e.getMonth();return f?n>=1&&n<=Y$[d]:n>=1&&n<=G$[d]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}};class Q$ extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"subpriority",1),ot(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,n,r){switch(n){case"D":case"DD":return Ln(Kn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(n.length,e)}}validate(e,n){const r=e.getFullYear();return Ly(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function hd(t,e,n){var r,f,d,p;const b=zs(),h=(n==null?void 0:n.weekStartsOn)??((f=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:f.weekStartsOn)??b.weekStartsOn??((p=(d=b.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,g=Tn(t,n==null?void 0:n.in),s=g.getDay(),a=(e%7+7)%7,c=7-h,l=e<0||e>6?e-(s+c)%7:(a+c)%7-(s+c)%7;return cd(g,l,n)}let Z$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,n,r){switch(n){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,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}},J$=class extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,n,r,f){const d=p=>{const b=Math.floor((p-1)/7)*7;return(p+f.weekStartsOn+6)%7+b};switch(n){case"e":case"ee":return Gn(Nn(n.length,e),d);case"eo":return Gn(r.ordinalNumber(e,{unit:"day"}),d);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,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}};class eM extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,n,r,f){const d=p=>{const b=Math.floor((p-1)/7)*7;return(p+f.weekStartsOn+6)%7+b};switch(n){case"c":case"cc":return Gn(Nn(n.length,e),d);case"co":return Gn(r.ordinalNumber(e,{unit:"day"}),d);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,n){return n>=0&&n<=6}set(e,n,r,f){return e=hd(e,r,f),e.setHours(0,0,0,0),e}}function tM(t,e,n){const r=Tn(t,void 0),f=M$(r),d=e-f;return cd(r,d,n)}class nM extends on{constructor(){super(...arguments),ot(this,"priority",90),ot(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,n,r){const f=d=>d===0?7:d;switch(n){case"i":case"ii":return Nn(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Gn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f);case"iiiii":return Gn(r.day(e,{width:"narrow",context:"formatting"}),f);case"iiiiii":return Gn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),f);case"iiii":default:return Gn(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"}),f)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=tM(e,r),e.setHours(0,0,0,0),e}}class rM extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,n,r){switch(n){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,n,r){return e.setHours(ud(r),0,0,0),e}}let iM=class extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,n,r){switch(n){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,n,r){return e.setHours(ud(r),0,0,0),e}};class oM extends on{constructor(){super(...arguments),ot(this,"priority",80),ot(this,"incompatibleTokens",["a","b","t","T"])}parse(e,n,r){switch(n){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,n,r){return e.setHours(ud(r),0,0,0),e}}let sM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,n,r){switch(n){case"h":return Ln(Kn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const f=e.getHours()>=12;return f&&r<12?e.setHours(r+12,0,0,0):!f&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}},aM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,n,r){switch(n){case"H":return Ln(Kn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}},lM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,n,r){switch(n){case"K":return Ln(Kn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}},cM=class extends on{constructor(){super(...arguments),ot(this,"priority",70),ot(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,n,r){switch(n){case"k":return Ln(Kn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const f=r<=24?r%24:r;return e.setHours(f,0,0,0),e}};class uM extends on{constructor(){super(...arguments),ot(this,"priority",60),ot(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"m":return Ln(Kn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}}let hM=class extends on{constructor(){super(...arguments),ot(this,"priority",50),ot(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"s":return Ln(Kn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Nn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}},dM=class extends on{constructor(){super(...arguments),ot(this,"priority",30),ot(this,"incompatibleTokens",["t","T"])}parse(e,n){const r=f=>Math.trunc(f*Math.pow(10,-n.length+3));return Gn(Nn(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}},fM=class extends on{constructor(){super(...arguments),ot(this,"priority",10),ot(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return to(eo.basicOptionalMinutes,e);case"XX":return to(eo.basic,e);case"XXXX":return to(eo.basicOptionalSeconds,e);case"XXXXX":return to(eo.extendedOptionalSeconds,e);case"XXX":default:return to(eo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:er(e,e.getTime()-gl(e)-r)}},pM=class extends on{constructor(){super(...arguments),ot(this,"priority",10),ot(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return to(eo.basicOptionalMinutes,e);case"xx":return to(eo.basic,e);case"xxxx":return to(eo.basicOptionalSeconds,e);case"xxxxx":return to(eo.extendedOptionalSeconds,e);case"xxx":default:return to(eo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:er(e,e.getTime()-gl(e)-r)}};class gM extends on{constructor(){super(...arguments),ot(this,"priority",40),ot(this,"incompatibleTokens","*")}parse(e){return My(e)}set(e,n,r){return[er(e,r*1e3),{timestampIsSet:!0}]}}let mM=class extends on{constructor(){super(...arguments),ot(this,"priority",20),ot(this,"incompatibleTokens","*")}parse(e){return My(e)}set(e,n,r){return[er(e,r),{timestampIsSet:!0}]}};const vM={G:new D$,y:new N$,Y:new F$,R:new P$,u:new B$,Q:new W$,q:new j$,M:new z$,L:new H$,w:new V$,I:new K$,d:new X$,D:new Q$,E:new Z$,e:new J$,c:new eM,i:new nM,a:new rM,b:new iM,B:new oM,h:new sM,H:new aM,K:new lM,k:new cM,m:new uM,s:new hM,S:new dM,X:new fM,x:new pM,t:new gM,T:new mM},yM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wM=/^'([^]*?)'?$/,xM=/''/g,CM=/\S/,kM=/[a-zA-Z]/;function _M(t,e,n,r){var f,d,p,b;const h=()=>er(n,NaN),g=cy(),s=g.locale??Bf,a=g.firstWeekContainsDate??((d=(f=g.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,c=g.weekStartsOn??((b=(p=g.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??0;if(!e)return t?h():Tn(n,void 0);const l={firstWeekContainsDate:a,weekStartsOn:c,locale:s},o=[new O$(void 0,n)],u=e.match(bM).map(T=>{const k=T[0];if(k in lu){const C=lu[k];return C(T,s.formatLong)}return T}).join("").match(yM),m=[];for(let T of u){Gf(T)&&cu(T,e,t),Kf(T)&&cu(T,e,t);const k=T[0],C=vM[k];if(C){const{incompatibleTokens:L}=C;if(Array.isArray(L)){const F=m.find(I=>L.includes(I.token)||I.token===k);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${T}\` at the same time`)}else if(C.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);m.push({token:k,fullToken:T});const R=C.run(t,T,s.match,l);if(!R)return h();o.push(R.setter),t=R.rest}else{if(k.match(kM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(T==="''"?T="'":k==="'"&&(T=SM(T)),t.indexOf(T)===0)t=t.slice(T.length);else return h()}}if(t.length>0&&CM.test(t))return h();const w=o.map(T=>T.priority).sort((T,k)=>k-T).filter((T,k,C)=>C.indexOf(T)===k).map(T=>o.filter(k=>k.priority===T).sort((k,C)=>C.subPriority-k.subPriority)).map(T=>T[0]);let x=Tn(n,void 0);if(isNaN(+x))return h();const E={};for(const T of w){if(!T.validate(x,l))return h();const k=T.set(x,E,l);Array.isArray(k)?(x=k[0],Object.assign(E,k[1])):x=k}return x}function SM(t){return t.match(wM)[1].replace(xM,"'")}const AM="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=",TM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return AM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=OM.indexOf(Ry[this.status]),e=1-(t-1)*.05,n=224*this.scaleFactor*e,r=32*this.scaleFactor*e,f=32*this.scaleFactor*e;return[`background-image: url(${this.icons});`,`background-position-x: -${t*f}px;`,`background-size: ${n}px ${r}px;`,`height: ${f}px;`,`width: ${f}px;`,`padding-top: ${t-1}px;`].join("")}}};function $M(t,e,n,r,f,d){return lt(),gn("div",{style:is(d.iconStyle)},null,4)}const MM=Ri(TM,[["render",$M]]),EM={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function IM(t,e,n,r,f,d){const p=Ue("rux-icon");return lt(),Xt(p,{size:n.size,icon:n.icon,style:is(d.colorStyle)},null,8,["size","icon","style"])}const LM=Ri(EM,[["render",IM],["__scopeId","data-v-9af48e85"]]),Ry={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"},dd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},RM=function(t){const e="#000000",n="#ffffff",r=dd[Ry[t]];if(r){const f=+`0x${r.slice(1,3)}`,d=+`0x${r.slice(3,5)}`,p=+`0x${r.slice(5,7)}`;if((f*299+d*587+p*114)/1e3>128)return e}return n},OM=Object.keys(dd),DM={astro:{component:t=>js(LM,{...t})},"astro-status":{component:t=>js(MM,{...t,status:t.icon})}},NM={extras:{component:t=>js(mw,{...t})}},Oy="single-spa:app-change",FM={data(){return{show:!1}},created(){window.addEventListener(Oy,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=$f().length===0},150)},unmounted(){window.removeEventListener(Oy,this.handleAppChange)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED}}},PM={class:"mx-1"};function BM(t,e,n,r,f,d){const p=Ue("v-card-title"),b=Ue("v-card-text"),h=Ue("v-card");return f.show?(lt(),Xt(h,{key:0},{default:Fe(()=>[We(p,null,{default:Fe(()=>e[0]||(e[0]=[Ht(" 404 Not Found ")])),_:1}),We(b,{class:"d-flex align-center mt-3"},{default:Fe(()=>[e[1]||(e[1]=Ht(" The requested URL ")),fr("code",PM,_n(t.$route.fullPath),1),e[2]||(e[2]=Ht(" was not routable. ")),e[3]||(e[3]=fr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Ur("",!0)}const WM=Ri(FM,[["render",BM]]),jM={props:{modelValue:Boolean},data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const t=/\w+.gem/;return this.response.tree.filter(e=>t.exec(e.path)).map(e=>({name:e.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${e.path}`}))},getResponse:function(){this.disableSearch=!0,qn.get(this.url).then(t=>{this.response=t.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(t){const e=document.createElement("a");e.href=t.url,e.setAttribute("download",t.name),e.click(),e.remove()}}},zM={class:"pa-3"},HM={class:"px-2"},UM={key:0,class:"mt-4"},VM={key:1,class:"mt-4"};function qM(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-row"),g=Ue("v-icon"),s=Ue("v-btn"),a=Ue("v-col"),c=Ue("v-list-item-title"),l=Ue("v-progress-circular"),o=Ue("v-list-item"),u=Ue("v-divider"),m=Ue("v-card-text"),w=Ue("v-card"),x=Ue("v-dialog");return lt(),Xt(x,{modelValue:d.show,"onUpdate:modelValue":e[0]||(e[0]=E=>d.show=E),width:"600"},{default:Fe(()=>[We(w,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),e[1]||(e[1]=fr("span",null," Download Gems ",-1)),We(p)]),_:1}),We(m,null,{default:Fe(()=>[fr("div",zM,[We(h,{class:"my-2"},{default:Fe(()=>e[2]||(e[2]=[Ht(" Select a download option ")])),_:1}),We(h,null,{default:Fe(()=>[We(a,null,{default:Fe(()=>[fr("div",HM,[We(s,{block:"","data-test":"searchGithub",color:"primary",disabled:f.disableSearch,onClick:d.searchGithub},{default:Fe(()=>[e[4]||(e[4]=Ht(" Github ")),We(g,{end:"",theme:"dark"},{default:Fe(()=>e[3]||(e[3]=[Ht(" mdi-github ")])),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),We(h,{class:"mt-5"},{default:Fe(()=>e[5]||(e[5]=[Ht(" Community Gems ")])),_:1}),d.listData.length<1?(lt(),gn("div",UM,[We(h,{class:"mx-2"},{default:Fe(()=>e[6]||(e[6]=[fr("span",null," I’m sorry, Dave. No gems available.... ",-1)])),_:1})])):(lt(),gn("div",VM,[(lt(!0),gn(Li,null,Xi(d.listData,(E,T)=>(lt(),gn("div",{key:T},[We(o,null,{default:Fe(()=>[We(c,null,{default:Fe(()=>[Ht(_n(E.name),1)]),_:2},1024),We(o,{icon:""},{default:Fe(()=>[f.activeDownload?(lt(),Xt(l,{key:0,indeterminate:"",color:"primary"})):(lt(),Xt(s,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:f.activeDownload,onClick:k=>d.downloadGem(E)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),T<d.listData.length-1?(lt(),Xt(u,{key:T})):Ur("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const RN=sr("h",Ri(jM,[["render",qM]])),KM={props:{modelValue:Boolean,plugin:String,targets:Array,pluginDelete:Boolean},data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},created(){for(const t of this.targets)tC.get(`/openc3-api/targets/${t.name}/modified_files`).then(e=>{e.data.length!==0&&this.modifiedTargets.push({name:t.name,files:e.data})})}};function GM(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-list-item-title"),g=Ue("v-list-item-subtitle"),s=Ue("v-list-item"),a=Ue("v-checkbox"),c=Ue("v-card-text"),l=Ue("v-btn"),o=Ue("v-card-actions"),u=Ue("v-card"),m=Ue("v-dialog");return lt(),Xt(m,{modelValue:d.show,"onUpdate:modelValue":e[3]||(e[3]=w=>d.show=w),width:"600"},{default:Fe(()=>[We(u,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),e[4]||(e[4]=fr("span",null," Modified Plugin ",-1)),We(p)]),_:1}),We(c,{class:"pa-3"},{default:Fe(()=>[fr("div",null," Plugin "+_n(n.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(lt(!0),gn(Li,null,Xi(f.modifiedTargets,(w,x)=>(lt(),Xt(s,{key:x,lines:"two"},{default:Fe(()=>[We(h,null,{default:Fe(()=>[Ht(_n(w.name),1)]),_:2},1024),(lt(!0),gn(Li,null,Xi(w.files,(E,T)=>(lt(),Xt(g,{key:T},{default:Fe(()=>[Ht(_n(E),1)]),_:2},1024))),128))]),_:2},1024))),128)),We(a,{modelValue:f.deleteModified,"onUpdate:modelValue":e[0]||(e[0]=w=>f.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),We(o,{class:"px-2"},{default:Fe(()=>[We(p),We(l,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:e[1]||(e[1]=()=>{d.show=!1,t.$emit("cancel")})},{default:Fe(()=>e[5]||(e[5]=[Ht(" Cancel ")])),_:1}),We(l,{variant:"flat","data-test":"modified-plugin-submit",onClick:e[2]||(e[2]=()=>{d.show=!1,t.$emit("submit",f.deleteModified)})},{default:Fe(()=>e[6]||(e[6]=[Ht(" Confirm ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const ON=sr("c",Ri(KM,[["render",GM]])),fd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>it(()=>rt.import("./PluginsTab-C9t0-QVm-6573a228c03271a9a721.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>it(()=>rt.import("./TargetsTab-CfBt-dZW-af29d3abcec34f39d21d.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>it(()=>rt.import("./InterfacesTab-DTixVrGo-d1c54d784fb72d35a760.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>it(()=>rt.import("./RoutersTab-D-ex_yMO-5fc215e92e7302a8075a.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>it(()=>rt.import("./MicroservicesTab-DbL48MBc-484871d8f774092c18ce.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>it(()=>rt.import("./PackagesTab-Bw34RkLc-a8bd901d60023aea57d0.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>it(()=>rt.import("./ToolsTab-CnhhRS3J-57d6ddffd01325622abb.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>it(()=>rt.import("./RedisTab-CvPLS0Qe-5d4a932e4970ba3ca803.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>it(()=>rt.import("./SecretsTab-CLkJfzf--d880a0e1441849be64f2.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>it(()=>rt.import("./SettingsTab-CysOMBFu-96c27242035cd5ef53f0.js"),void 0)}],YM={components:{TopBar:iA},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return fd.map(t=>({displayName:t.displayName,path:{name:t.name}}))}}};function XM(t,e,n,r,f,d){const p=Ue("top-bar"),b=Ue("v-tab"),h=Ue("v-tabs"),g=Ue("router-view"),s=Ue("v-card");return lt(),gn("div",null,[We(p,{title:f.title},null,8,["title"]),We(s,null,{default:Fe(()=>[We(h,{modelValue:f.curTab,"onUpdate:modelValue":e[0]||(e[0]=a=>f.curTab=a),"fixed-tabs":""},{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(d.tabs,(a,c)=>(lt(),Xt(b,{key:c,to:a.path},{default:Fe(()=>[Ht(_n(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),We(g)]),_:1})])}const QM=Ri(YM,[["render",XM]]),Pe=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};Pe.Diff=function(t,e){this[0]=t,this[1]=e},Pe.Diff.prototype.length=2,Pe.Diff.prototype.toString=function(){return this[0]+","+this[1]},Pe.prototype.diff_main=function(t,e,n,r){typeof r>"u"&&(this.Diff_Timeout<=0?r=Number.MAX_VALUE:r=new Date().getTime()+this.Diff_Timeout*1e3);let f=r;if(t==null||e==null)throw new Error("Null input. (diff_main)");if(t==e)return t?[new Pe.Diff(0,t)]:[];typeof n>"u"&&(n=!0);let d=n,p=this.diff_commonPrefix(t,e),b=t.substring(0,p);t=t.substring(p),e=e.substring(p),p=this.diff_commonSuffix(t,e);let h=t.substring(t.length-p);t=t.substring(0,t.length-p),e=e.substring(0,e.length-p);let g=this.diff_compute_(t,e,d,f);return b&&g.unshift(new Pe.Diff(0,b)),h&&g.push(new Pe.Diff(0,h)),this.diff_cleanupMerge(g),g},Pe.prototype.diff_compute_=function(t,e,n,r){let f;if(!t)return[new Pe.Diff(1,e)];if(!e)return[new Pe.Diff(-1,t)];let d=t.length>e.length?t:e,p=t.length>e.length?e:t,b=d.indexOf(p);return b!=-1?(f=[new Pe.Diff(1,d.substring(0,b)),new Pe.Diff(0,p),new Pe.Diff(1,d.substring(b+p.length))],t.length>e.length&&(f[0][0]=f[2][0]=-1),f):p.length==1?[new Pe.Diff(-1,t),new Pe.Diff(1,e)]:n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,r):this.diff_bisect_(t,e,r)},Pe.prototype.diff_lineMode_=function(t,e,n){let r=this.diff_linesToChars_(t,e);t=r.chars1,e=r.chars2;let f=r.lineArray,d=this.diff_main(t,e,!1,n);this.diff_charsToLines_(d,f),this.diff_cleanupSemantic(d),d.push(new Pe.Diff(0,""));let p=0,b=0,h=0,g="",s="";for(;p<d.length;){switch(d[p][0]){case 1:h++,s+=d[p][1];break;case-1:b++,g+=d[p][1];break;case 0:if(b>=1&&h>=1){d.splice(p-b-h,b+h),p=p-b-h;let a=this.diff_main(g,s,!1,n);for(let c=a.length-1;c>=0;c--)d.splice(p,0,a[c]);p=p+a.length}h=0,b=0,g="",s="";break}p++}return d.pop(),d},Pe.prototype.diff_bisect_=function(t,e,n){let r=t.length,f=e.length,d=Math.ceil((r+f)/2),p=d,b=2*d,h=new Array(b),g=new Array(b);for(let m=0;m<b;m++)h[m]=-1,g[m]=-1;h[p+1]=0,g[p+1]=0;let s=r-f,a=s%2!=0,c=0,l=0,o=0,u=0;for(let m=0;m<d&&!(new Date().getTime()>n);m++){for(let w=-m+c;w<=m-l;w+=2){let x=p+w,E;w==-m||w!=m&&h[x-1]<h[x+1]?E=h[x+1]:E=h[x-1]+1;let T=E-w;for(;E<r&&T<f&&t.charAt(E)==e.charAt(T);)E++,T++;if(h[x]=E,E>r)l+=2;else if(T>f)c+=2;else if(a){let k=p+s-w;if(k>=0&&k<b&&g[k]!=-1){let C=r-g[k];if(E>=C)return this.diff_bisectSplit_(t,e,E,T,n)}}}for(let w=-m+o;w<=m-u;w+=2){let x=p+w,E;w==-m||w!=m&&g[x-1]<g[x+1]?E=g[x+1]:E=g[x-1]+1;let T=E-w;for(;E<r&&T<f&&t.charAt(r-E-1)==e.charAt(f-T-1);)E++,T++;if(g[x]=E,E>r)u+=2;else if(T>f)o+=2;else if(!a){let k=p+s-w;if(k>=0&&k<b&&h[k]!=-1){let C=h[k],L=p+C-k;if(E=r-E,C>=E)return this.diff_bisectSplit_(t,e,C,L,n)}}}}return[new Pe.Diff(-1,t),new Pe.Diff(1,e)]},Pe.prototype.diff_bisectSplit_=function(t,e,n,r,f){let d=t.substring(0,n),p=e.substring(0,r),b=t.substring(n),h=e.substring(r),g=this.diff_main(d,p,!1,f),s=this.diff_main(b,h,!1,f);return g.concat(s)},Pe.prototype.diff_linesToChars_=function(t,e){let n=[],r={};n[0]="";function f(h){let g="",s=0,a=-1,c=n.length;for(;a<h.length-1;){a=h.indexOf(`
1495
+ `,s),a==-1&&(a=h.length-1);let l=h.substring(s,a+1);(r.hasOwnProperty?r.hasOwnProperty(l):r[l]!==void 0)?g+=String.fromCharCode(r[l]):(c==d&&(l=h.substring(s),a=h.length),g+=String.fromCharCode(c),r[l]=c,n[c++]=l),s=a+1}return g}let d=4e4,p=f(t);d=65535;let b=f(e);return{chars1:p,chars2:b,lineArray:n}},Pe.prototype.diff_charsToLines_=function(t,e){for(let n=0;n<t.length;n++){let r=t[n][1],f=[];for(let d=0;d<r.length;d++)f[d]=e[r.charCodeAt(d)];t[n][1]=f.join("")}},Pe.prototype.diff_commonPrefix=function(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;let n=0,r=Math.min(t.length,e.length),f=r,d=0;for(;n<f;)t.substring(d,f)==e.substring(d,f)?(n=f,d=n):r=f,f=Math.floor((r-n)/2+n);return f},Pe.prototype.diff_commonSuffix=function(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;let n=0,r=Math.min(t.length,e.length),f=r,d=0;for(;n<f;)t.substring(t.length-f,t.length-d)==e.substring(e.length-f,e.length-d)?(n=f,d=n):r=f,f=Math.floor((r-n)/2+n);return f},Pe.prototype.diff_commonOverlap_=function(t,e){let n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));let f=Math.min(n,r);if(t==e)return f;let d=0,p=1;for(;;){let b=t.substring(f-p),h=e.indexOf(b);if(h==-1)return d;p+=h,(h==0||t.substring(f-p)==e.substring(0,p))&&(d=p,p++)}},Pe.prototype.diff_halfMatch_=function(t,e){if(this.Diff_Timeout<=0)return null;let n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;let f=this;function d(o,u,m){let w=o.substring(m,m+Math.floor(o.length/4)),x=-1,E="",T,k,C,L;for(;(x=u.indexOf(w,x+1))!=-1;){let R=f.diff_commonPrefix(o.substring(m),u.substring(x)),F=f.diff_commonSuffix(o.substring(0,m),u.substring(0,x));E.length<F+R&&(E=u.substring(x-F,x)+u.substring(x,x+R),T=o.substring(0,m-F),k=o.substring(m+R),C=u.substring(0,x-F),L=u.substring(x+R))}return E.length*2>=o.length?[T,k,C,L,E]:null}let p=d(n,r,Math.ceil(n.length/4)),b=d(n,r,Math.ceil(n.length/2)),h;if(!p&&!b)return null;b?p?h=p[4].length>b[4].length?p:b:h=b:h=p;let g,s,a,c;t.length>e.length?(g=h[0],s=h[1],a=h[2],c=h[3]):(a=h[0],c=h[1],g=h[2],s=h[3]);let l=h[4];return[g,s,a,c,l]},Pe.prototype.diff_cleanupSemantic=function(t){let e=!1,n=[],r=0,f=null,d=0,p=0,b=0,h=0,g=0;for(;d<t.length;)t[d][0]==0?(n[r++]=d,p=h,b=g,h=0,g=0,f=t[d][1]):(t[d][0]==1?h+=t[d][1].length:g+=t[d][1].length,f&&f.length<=Math.max(p,b)&&f.length<=Math.max(h,g)&&(t.splice(n[r-1],0,new Pe.Diff(-1,f)),t[n[r-1]+1][0]=1,r--,r--,d=r>0?n[r-1]:-1,p=0,b=0,h=0,g=0,f=null,e=!0)),d++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),d=1;d<t.length;){if(t[d-1][0]==-1&&t[d][0]==1){let s=t[d-1][1],a=t[d][1],c=this.diff_commonOverlap_(s,a),l=this.diff_commonOverlap_(a,s);c>=l?(c>=s.length/2||c>=a.length/2)&&(t.splice(d,0,new Pe.Diff(0,a.substring(0,c))),t[d-1][1]=s.substring(0,s.length-c),t[d+1][1]=a.substring(c),d++):(l>=s.length/2||l>=a.length/2)&&(t.splice(d,0,new Pe.Diff(0,s.substring(0,l))),t[d-1][0]=1,t[d-1][1]=a.substring(0,a.length-l),t[d+1][0]=-1,t[d+1][1]=s.substring(l),d++),d++}d++}},Pe.prototype.diff_cleanupSemanticLossless=function(t){function e(r,f){if(!r||!f)return 6;let d=r.charAt(r.length-1),p=f.charAt(0),b=d.match(Pe.nonAlphaNumericRegex_),h=p.match(Pe.nonAlphaNumericRegex_),g=b&&d.match(Pe.whitespaceRegex_),s=h&&p.match(Pe.whitespaceRegex_),a=g&&d.match(Pe.linebreakRegex_),c=s&&p.match(Pe.linebreakRegex_),l=a&&r.match(Pe.blanklineEndRegex_),o=c&&f.match(Pe.blanklineStartRegex_);return l||o?5:a||c?4:b&&!g&&s?3:g||s?2:b||h?1:0}let n=1;for(;n<t.length-1;){if(t[n-1][0]==0&&t[n+1][0]==0){let r=t[n-1][1],f=t[n][1],d=t[n+1][1],p=this.diff_commonSuffix(r,f);if(p){r[r.length-p]===`
1496
+ `&&(p-=1);let a=f.substring(f.length-p);r=r.substring(0,r.length-p),f=a+f.substring(0,f.length-p),d=a+d}let b=r,h=f,g=d,s=e(r,f)+e(f,d);for(;f.charAt(0)===d.charAt(0);){r+=f.charAt(0),f=f.substring(1)+d.charAt(0),d=d.substring(1);let a=e(r,f)+e(f,d);a>=s&&(s=a,b=r,h=f,g=d)}t[n-1][1]!=b&&(b?t[n-1][1]=b:(t.splice(n-1,1),n--),t[n][1]=h,g?t[n+1][1]=g:(t.splice(n+1,1),n--))}n++}},Pe.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,Pe.whitespaceRegex_=/\s/,Pe.linebreakRegex_=/[\r\n]/,Pe.blanklineEndRegex_=/\n\r?\n$/,Pe.blanklineStartRegex_=/^\r?\n\r?\n/,Pe.prototype.diff_cleanupEfficiency=function(t){let e=!1,n=[],r=0,f=null,d=0,p=!1,b=!1,h=!1,g=!1;for(;d<t.length;)t[d][0]==0?(t[d][1].length<this.Diff_EditCost&&(h||g)?(n[r++]=d,p=h,b=g,f=t[d][1]):(r=0,f=null),h=g=!1):(t[d][0]==-1?g=!0:h=!0,f&&(p&&b&&h&&g||f.length<this.Diff_EditCost/2&&p+b+h+g==3)&&(t.splice(n[r-1],0,new Pe.Diff(-1,f)),t[n[r-1]+1][0]=1,r--,f=null,p&&b?(h=g=!0,r=0):(r--,d=r>0?n[r-1]:-1,h=g=!1),e=!0)),d++;e&&this.diff_cleanupMerge(t)},Pe.prototype.diff_cleanupMerge=function(t){t.push(new Pe.Diff(0,""));let e=0,n=0,r=0,f="",d="",p;for(;e<t.length;)switch(t[e][0]){case 1:r++,d+=t[e][1],e++;break;case-1:n++,f+=t[e][1],e++;break;case 0:n+r>1?(n!==0&&r!==0&&(p=this.diff_commonPrefix(d,f),p!==0&&(e-n-r>0&&t[e-n-r-1][0]==0?t[e-n-r-1][1]+=d.substring(0,p):(t.splice(0,0,new Pe.Diff(0,d.substring(0,p))),e++),d=d.substring(p),f=f.substring(p)),p=this.diff_commonSuffix(d,f),p!==0&&(t[e][1]=d.substring(d.length-p)+t[e][1],d=d.substring(0,d.length-p),f=f.substring(0,f.length-p))),e-=n+r,t.splice(e,n+r),f.length&&(t.splice(e,0,new Pe.Diff(-1,f)),e++),d.length&&(t.splice(e,0,new Pe.Diff(1,d)),e++),e++):e!==0&&t[e-1][0]==0?(t[e-1][1]+=t[e][1],t.splice(e,1)):e++,r=0,n=0,f="",d="";break}t[t.length-1][1]===""&&t.pop();let b=!1;for(e=1;e<t.length-1;)t[e-1][0]==0&&t[e+1][0]==0&&(t[e][1].substring(t[e][1].length-t[e-1][1].length)==t[e-1][1]?(t[e][1]=t[e-1][1]+t[e][1].substring(0,t[e][1].length-t[e-1][1].length),t[e+1][1]=t[e-1][1]+t[e+1][1],t.splice(e-1,1),b=!0):t[e][1].substring(0,t[e+1][1].length)==t[e+1][1]&&(t[e-1][1]+=t[e+1][1],t[e][1]=t[e][1].substring(t[e+1][1].length)+t[e+1][1],t.splice(e+1,1),b=!0)),e++;b&&this.diff_cleanupMerge(t)},Pe.prototype.diff_cleanupSplitSurrogates=function(t){let e;for(let n=0;n<t.length;n++){let r=t[n],f=r[1][0],d=r[1][r[1].length-1];if(r[1].length===0){t.splice(n--,1);continue}if(d&&this.isHighSurrogate(d)&&(e=d,r[1]=r[1].slice(0,-1)),e&&f&&this.isHighSurrogate(e)&&this.isLowSurrogate(f)&&(r[1]=e+r[1]),r[1].length===0){t.splice(n--,1);continue}}return t},Pe.prototype.isHighSurrogate=function(t){let e=t.charCodeAt(0);return e>=55296&&e<=56319},Pe.prototype.isLowSurrogate=function(t){let e=t.charCodeAt(0);return e>=56320&&e<=57343},Pe.prototype.digit16=function(t){switch(t){case"0":return 0;case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;case"A":case"a":return 10;case"B":case"b":return 11;case"C":case"c":return 12;case"D":case"d":return 13;case"E":case"e":return 14;case"F":case"f":return 15;default:throw new Error("Invalid hex-code")}},Pe.prototype.decodeURI=function(t){try{return decodeURI(t)}catch{let e=0,n="";for(;e<t.length;){if(t[e]!=="%"){n+=t[e++];continue}let r=(this.digit16(t[e+1])<<4)+this.digit16(t[e+2]);if((r&128)===0){n+=String.fromCharCode(r),e+=3;continue}if(t[e+3]!=="%")throw new URIError("URI malformed");let f=(this.digit16(t[e+4])<<4)+this.digit16(t[e+5]);if((f&192)!==128)throw new URIError("URI malformed");if(f=f&63,(r&224)===192){n+=String.fromCharCode((r&31)<<6|f),e+=6;continue}if(t[e+6]!=="%")throw new URIError("URI malformed");let d=(this.digit16(t[e+7])<<4)+this.digit16(t[e+8]);if((d&192)!==128)throw new URIError("URI malformed");if(d=d&63,(r&240)===224){n+=String.fromCharCode((r&15)<<12|f<<6|d),e+=9;continue}if(t[e+9]!=="%")throw new URIError("URI malformed");let p=(this.digit16(t[e+10])<<4)+this.digit16(t[e+11]);if((p&192)!==128)throw new URIError("URI malformed");if(p=p&63,(r&248)===240){let b=(r&7)<<18|f<<12|d<<6|p;if(b>=65536&&b<=1114111){n+=String.fromCharCode((b&65535)>>>10&1023|55296),n+=String.fromCharCode(56320|b&65535&1023),e+=12;continue}}throw new URIError("URI malformed")}return n}},Pe.prototype.diff_xIndex=function(t,e){let n=0,r=0,f=0,d=0,p;for(p=0;p<t.length&&(t[p][0]!==1&&(n+=t[p][1].length),t[p][0]!==-1&&(r+=t[p][1].length),!(n>e));p++)f=n,d=r;return t.length!=p&&t[p][0]===-1?d:d+(e-f)},Pe.prototype.diff_prettyHtml=function(t){t=this.diff_cleanupSplitSurrogates(t);let e=[],n=/&/g,r=/</g,f=/>/g,d=/\n/g;for(let p=0;p<t.length;p++){let b=t[p][0],h=t[p][1].replace(n,"&amp;").replace(r,"&lt;").replace(f,"&gt;").replace(d,"&para;<br>");switch(b){case 1:e[p]='<ins style="background:#e6ffe6;">'+h+"</ins>";break;case-1:e[p]='<del style="background:#ffe6e6;">'+h+"</del>";break;case 0:e[p]="<span>"+h+"</span>";break}}return e.join("")},Pe.prototype.diff_text1=function(t){let e=[];for(let n=0;n<t.length;n++)t[n][0]!==1&&(e[n]=t[n][1]);return e.join("")},Pe.prototype.diff_text2=function(t){let e=[];for(let n=0;n<t.length;n++)t[n][0]!==-1&&(e[n]=t[n][1]);return e.join("")},Pe.prototype.diff_levenshtein=function(t){let e=0,n=0,r=0;for(let f=0;f<t.length;f++){let d=t[f][0],p=t[f][1];switch(d){case 1:n+=p.length;break;case-1:r+=p.length;break;case 0:e+=Math.max(n,r),n=0,r=0;break}}return e+=Math.max(n,r),e},Pe.prototype.diff_toDelta=function(t){t=this.diff_cleanupSplitSurrogates(t);let e=[];for(let n=0;n<t.length;n++)switch(t[n][0]){case 1:e[n]="+"+encodeURI(t[n][1]);break;case-1:e[n]="-"+t[n][1].length;break;case 0:e[n]="="+t[n][1].length;break}return e.join(" ").replace(/%20/g," ")},Pe.prototype.diff_fromDelta=function(t,e){let n=0,r="",f=[],d=0,p=0,b=e.split(/\t/g);for(let h=0;h<b.length;h++){let g=b[h].substring(1);switch(b[h].charAt(0)){case"+":try{f[d++]=new Pe.Diff(1,this.decodeURI(g))}catch{throw new Error("Illegal escape in diff_fromDelta: "+g)}break;case"-":case"=":if(n=parseInt(g,10),isNaN(n)||n<0)throw new Error("Invalid number in diff_fromDelta: "+g);r=t.substring(p,p+=n),b[h].charAt(0)=="="?f[d++]=new Pe.Diff(0,r):f[d++]=new Pe.Diff(-1,r);break;default:if(b[h])throw new Error("Invalid diff operation in diff_fromDelta: "+b[h])}}if(p!=t.length)throw new Error("Delta length ("+p+") does not equal source text length ("+t.length+").");return f},Pe.prototype.match_main=function(t,e,n){if(t==null||e==null||n==null)throw new Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,t.length)),t==e?0:t.length?t.substring(n,n+e.length)==e?n:this.match_bitap_(t,e,n):-1},Pe.prototype.match_bitap_=function(t,e,n){if(e.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");let r=this.match_alphabet_(e),f=this;function d(l,o){let u=l/e.length,m=Math.abs(n-o);return f.Match_Distance?u+m/f.Match_Distance:m?1:u}let p=this.Match_Threshold,b=t.indexOf(e,n);b!=-1&&(p=Math.min(d(0,b),p),b=t.lastIndexOf(e,n+e.length),b!=-1&&(p=Math.min(d(0,b),p)));let h=1<<e.length-1;b=-1;let g,s,a=e.length+t.length,c;for(let l=0;l<e.length;l++){for(g=0,s=a;g<s;)d(l,n+s)<=p?g=s:a=s,s=Math.floor((a-g)/2+g);a=s;let o=Math.max(1,n-s+1),u=Math.min(n+s,t.length)+e.length,m=Array(u+2);m[u+1]=(1<<l)-1;for(let w=u;w>=o;w--){let x=r[t.charAt(w-1)];if(l===0?m[w]=(m[w+1]<<1|1)&x:m[w]=(m[w+1]<<1|1)&x|((c[w+1]|c[w])<<1|1)|c[w+1],m[w]&h){let E=d(l,w-1);if(E<=p)if(p=E,b=w-1,b>n)o=Math.max(1,2*n-b);else break}}if(d(l+1,n)>p)break;c=m}return b},Pe.prototype.match_alphabet_=function(t){let e={};for(let n=0;n<t.length;n++)e[t.charAt(n)]=0;for(let n=0;n<t.length;n++)e[t.charAt(n)]|=1<<t.length-n-1;return e},Pe.prototype.patch_addContext_=function(t,e){if(e.length==0)return;if(t.start2===null)throw Error("patch not initialized");let n=e.substring(t.start2,t.start2+t.length1),r=0;for(;e.indexOf(n)!=e.lastIndexOf(n)&&n.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)r+=this.Patch_Margin,n=e.substring(t.start2-r,t.start2+t.length1+r);r+=this.Patch_Margin,t.start2-r>0&&Pe.prototype.isLowSurrogate(e[t.start2-r])&&r++;let f=e.substring(t.start2-r,t.start2);f&&t.diffs.unshift(new Pe.Diff(0,f)),t.start2+t.length1+r<e.length&&Pe.prototype.isHighSurrogate(e[t.start2+t.length1+r])&&r++;let d=e.substring(t.start2+t.length1,t.start2+t.length1+r);d&&t.diffs.push(new Pe.Diff(0,d)),t.start1-=f.length,t.start2-=f.length,t.length1+=f.length+d.length,t.length2+=f.length+d.length},Pe.prototype.patch_make=function(t,e,n){let r,f;if(typeof t=="string"&&typeof e=="string"&&typeof n>"u")r=t,f=this.diff_main(r,e,!0),f.length>2&&(this.diff_cleanupSemantic(f),this.diff_cleanupEfficiency(f));else if(t&&typeof t=="object"&&typeof e>"u"&&typeof n>"u")f=t,r=this.diff_text1(f);else if(typeof t=="string"&&e&&typeof e=="object"&&typeof n>"u")r=t,f=e;else if(typeof t=="string"&&typeof e=="string"&&n&&typeof n=="object")r=t,f=n;else throw new Error("Unknown call format to patch_make.");if(f.length===0)return[];f=this.diff_cleanupSplitSurrogates(f);let d=[],p=new Pe.patch_obj,b=0,h=0,g=0,s=r,a=r;for(let c=0;c<f.length;c++){let l=f[c][0],o=f[c][1];switch(!b&&l!==0&&(p.start1=h,p.start2=g),l){case 1:p.diffs[b++]=f[c],p.length2+=o.length,a=a.substring(0,g)+o+a.substring(g);break;case-1:p.length1+=o.length,p.diffs[b++]=f[c],a=a.substring(0,g)+a.substring(g+o.length);break;case 0:o.length<=2*this.Patch_Margin&&b&&f.length!=c+1?(p.diffs[b++]=f[c],p.length1+=o.length,p.length2+=o.length):o.length>=2*this.Patch_Margin&&b&&(this.patch_addContext_(p,s),d.push(p),p=new Pe.patch_obj,b=0,s=a,h=g);break}l!==1&&(h+=o.length),l!==-1&&(g+=o.length)}return b&&(this.patch_addContext_(p,s),d.push(p)),d},Pe.prototype.patch_deepCopy=function(t){let e=[];for(let n=0;n<t.length;n++){let r=t[n],f=new Pe.patch_obj;f.diffs=[];for(let d=0;d<r.diffs.length;d++)f.diffs[d]=new Pe.Diff(r.diffs[d][0],r.diffs[d][1]);f.start1=r.start1,f.start2=r.start2,f.length1=r.length1,f.length2=r.length2,e[n]=f}return e},Pe.prototype.patch_apply=function(t,e){if(t.length==0)return[e,[]];t=this.patch_deepCopy(t);let n=this.patch_addPadding(t);e=n+e+n,this.patch_splitMax(t);let r=0,f=[];for(let d=0;d<t.length;d++){let p=t[d].start2+r,b=this.diff_text1(t[d].diffs),h,g=-1;if(b.length>this.Match_MaxBits?(h=this.match_main(e,b.substring(0,this.Match_MaxBits),p),h!=-1&&(g=this.match_main(e,b.substring(b.length-this.Match_MaxBits),p+b.length-this.Match_MaxBits),(g==-1||h>=g)&&(h=-1))):h=this.match_main(e,b,p),h==-1)f[d]=!1,r-=t[d].length2-t[d].length1;else{f[d]=!0,r=h-p;let s;if(g==-1?s=e.substring(h,h+b.length):s=e.substring(h,g+this.Match_MaxBits),b==s)e=e.substring(0,h)+this.diff_text2(t[d].diffs)+e.substring(h+b.length);else{let a=this.diff_main(b,s,!1);if(b.length>this.Match_MaxBits&&this.diff_levenshtein(a)/b.length>this.Patch_DeleteThreshold)f[d]=!1;else{this.diff_cleanupSemanticLossless(a);let c=0,l;for(let o=0;o<t[d].diffs.length;o++){let u=t[d].diffs[o];u[0]!==0&&(l=this.diff_xIndex(a,c)),u[0]===1?e=e.substring(0,h+l)+u[1]+e.substring(h+l):u[0]===-1&&(e=e.substring(0,h+l)+e.substring(h+this.diff_xIndex(a,c+u[1].length))),u[0]!==-1&&(c+=u[1].length)}}}}}return e=e.substring(n.length,e.length-n.length),[e,f]},Pe.prototype.patch_addPadding=function(t){let e=this.Patch_Margin,n="";for(let d=1;d<=e;d++)n+=String.fromCharCode(d);for(let d=0;d<t.length;d++)t[d].start1+=e,t[d].start2+=e;let r=t[0],f=r.diffs;if(f.length==0||f[0][0]!=0)f.unshift(new Pe.Diff(0,n)),r.start1-=e,r.start2-=e,r.length1+=e,r.length2+=e;else if(e>f[0][1].length){let d=e-f[0][1].length;f[0][1]=n.substring(f[0][1].length)+f[0][1],r.start1-=d,r.start2-=d,r.length1+=d,r.length2+=d}if(r=t[t.length-1],f=r.diffs,f.length==0||f[f.length-1][0]!=0)f.push(new Pe.Diff(0,n)),r.length1+=e,r.length2+=e;else if(e>f[f.length-1][1].length){let d=e-f[f.length-1][1].length;f[f.length-1][1]+=n.substring(0,d),r.length1+=d,r.length2+=d}return n},Pe.prototype.patch_splitMax=function(t){let e=this.Match_MaxBits;for(let n=0;n<t.length;n++){if(t[n].length1<=e)continue;let r=t[n];t.splice(n--,1);let f=r.start1,d=r.start2,p="";for(;r.diffs.length!==0;){let b=new Pe.patch_obj,h=!0;for(b.start1=f-p.length,b.start2=d-p.length,p!==""&&(b.length1=b.length2=p.length,b.diffs.push(new Pe.Diff(0,p)));r.diffs.length!==0&&b.length1<e-this.Patch_Margin;){let s=r.diffs[0][0],a=r.diffs[0][1];s===1?(b.length2+=a.length,d+=a.length,b.diffs.push(r.diffs.shift()),h=!1):s===-1&&b.diffs.length==1&&b.diffs[0][0]==0&&a.length>2*e?(b.length1+=a.length,f+=a.length,h=!1,b.diffs.push(new Pe.Diff(s,a)),r.diffs.shift()):(a=a.substring(0,e-b.length1-this.Patch_Margin),b.length1+=a.length,f+=a.length,s===0?(b.length2+=a.length,d+=a.length):h=!1,b.diffs.push(new Pe.Diff(s,a)),a==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(a.length))}p=this.diff_text2(b.diffs),p=p.substring(p.length-this.Patch_Margin);let g=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);g!==""&&(b.length1+=g.length,b.length2+=g.length,b.diffs.length!==0&&b.diffs[b.diffs.length-1][0]===0?b.diffs[b.diffs.length-1][1]+=g:b.diffs.push(new Pe.Diff(0,g))),h||t.splice(++n,0,b)}}},Pe.prototype.patch_toText=function(t){let e=[];for(let n=0;n<t.length;n++)e[n]=t[n];return e.join("")},Pe.prototype.patch_fromText=function(t){let e=[];if(!t)return e;let n=t.split(`
1497
+ `),r=0,f=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;for(;r<n.length;){let d=n[r].match(f);if(!d)throw new Error("Invalid patch string: "+n[r]);let p=new Pe.patch_obj;for(e.push(p),p.start1=parseInt(d[1],10),d[2]===""?(p.start1--,p.length1=1):d[2]=="0"?p.length1=0:(p.start1--,p.length1=parseInt(d[2],10)),p.start2=parseInt(d[3],10),d[4]===""?(p.start2--,p.length2=1):d[4]=="0"?p.length2=0:(p.start2--,p.length2=parseInt(d[4],10)),r++;r<n.length;){let b=n[r].charAt(0),h="";try{h=decodeURI(n[r].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+h)}if(b=="-")p.diffs.push(new Pe.Diff(-1,h));else if(b=="+")p.diffs.push(new Pe.Diff(1,h));else if(b==" ")p.diffs.push(new Pe.Diff(0,h));else{if(b=="@")break;if(b!=="")throw new Error('Invalid patch mode "'+b+'" in: '+h)}r++}}return e},Pe.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},Pe.patch_obj.prototype.toString=function(){let t,e;this.length1===0?t=this.start1+",0":this.length1==1?t=this.start1+1:t=this.start1+1+","+this.length1,this.length2===0?e=this.start2+",0":this.length2==1?e=this.start2+1:e=this.start2+1+","+this.length2;let n=["@@ -"+t+" +"+e+` @@
1498
+ `],r;Pe.prototype.diff_cleanupSplitSurrogates(this.diffs);for(let f=0;f<this.diffs.length;f++){switch(this.diffs[f][0]){case 1:r="+";break;case-1:r="-";break;case 0:r=" ";break}n[f+1]=r+encodeURI(this.diffs[f][1])+`
1499
+ `}return n.join("").replace(/%20/g," ")};function mc(t){return t&&typeof t=="object"&&!Array.isArray(t)&&t!==null}function pd(t,e){return mc(t)&&mc(e)&&Object.keys(e).forEach(n=>{n==="__proto__"||n==="constructor"||(mc(e[n])?((!t[n]||!mc(t[n]))&&(t[n]=e[n]),pd(t[n],e[n])):Object.assign(t,{[n]:e[n]}))}),t}function Dy(t,e,n=!1){let r=null,f=!0;return(...d)=>{const p=n&&f,b=()=>{t.apply(this,d),r=null};p&&(f=!1,b()),r||(r=setTimeout(b,e))}}function ZM(t,e){let n;return(...r)=>{const f=this;clearTimeout(n),n=setTimeout(()=>t.apply(f,r),e)}}function Ny(t=""){return t.replace(/\r\n/g,`
1500
+ `)}function Fy(t,e,n,r){const f=n-t,d=t+f/2;return`M ${t} ${e} C ${d},${e} ${d},${r} ${n},${r}`}const yn={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 Py(t,e){let{mode:n}=t.options;return e===yn.EDITOR_LEFT&&t.options.left.mode!==null&&(n=t.options.left.mode),e===yn.EDITOR_RIGHT&&t.options.right.mode!==null&&(n=t.options.right.mode),n}function By(t,e){let{theme:n}=t.options;return e===yn.EDITOR_LEFT&&t.options.left.theme!==null&&(n=t.options.left.theme),e===yn.EDITOR_RIGHT&&t.options.right.theme!==null&&(n=t.options.right.theme),n}function Wy(t,e){return t.ace.getSession().doc.getLine(e)}function JM(t){return document.getElementById(t.options.left.id).offsetHeight}function jy(t){const e=document.createElement("div"),n={class:t.className,style:`top:${t.topOffset}px`,title:t.tooltip,"data-diff-index":t.diffIndex};for(const r in n)e.setAttribute(r,n[r]);return e.innerHTML=t.arrowContent,e}function gd(t,e){const n=Math.random().toString(36).substr(2,5),r=`js-${e}-${n}`,f=t.querySelector(`.${e}`);if(f)return f.id=f.id||r,f.id;const d=document.createElement("div");return t.appendChild(d),d.className=e,d.id=r,d.id}function zy(t,e,n,r){const f=t==="document"?document:document.querySelector(t);f.addEventListener(e,d=>{const p=f.querySelectorAll(n),{target:b}=d;for(let h=0,g=p.length;h<g;h+=1){let s=b;const a=p[h];for(;s&&s!==f;)s===a&&r.call(a,d),s=s.parentNode}})}let vc;function eE(t){if(t.Range)return t.Range;const e=t.acequire||t.require;return e?e("ace/range"):!1}function yc(t={}){if(!(this instanceof yc))return new yc(t);const e=this,n=()=>window?window.ace:void 0;e.options=pd({ace:n(),mode:null,theme:null,element:null,diffGranularity:yn.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},t);const{ace:r}=e.options;if(!r){const f="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";return console.error(f),new Error(f)}if(vc=eE(r),!vc){const f="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(f),new Error(f)}if(e.options.element===null){const f="You need to specify an element for Ace-diff - `options.element` is missing";return console.error(f),new Error(f)}if(e.options.element instanceof HTMLElement?e.el=e.options.element:e.el=document.body.querySelector(e.options.element),!e.el){const f=`Can't find the specified element ${e.options.element}`;return console.error(f),new Error(f)}e.options.left.id=gd(e.el,"acediff__left"),e.options.classes.gutterID=gd(e.el,"acediff__gutter"),e.options.right.id=gd(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(Py(e,yn.EDITOR_LEFT)),e.editors.right.ace.getSession().setMode(Py(e,yn.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(By(e,yn.EDITOR_LEFT)),e.editors.right.ace.setTheme(By(e,yn.EDITOR_RIGHT)),e.editors.left.ace.setValue(Ny(e.options.left.content),-1),e.editors.right.ace.setValue(Ny(e.options.right.content),-1),e.editors.editorHeight=JM(e),setTimeout(()=>{e.lineHeight=e.editors.left.ace.renderer.lineHeight,tE(e),oE(e),Zy(e),e.diff()},1)}yc.prototype={setOptions(t){pd(this.options,t),this.diff()},getNumDiffs(){return this.diffs.length},getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff(){const t=new Pe,e=this.editors.left.ace.getSession().getValue(),n=this.editors.right.ace.getSession().getValue(),r=t.diff_main(n,e);t.diff_cleanupSemantic(r),this.editors.left.lineLengths=Vy(this.editors.left),this.editors.right.lineLengths=Vy(this.editors.right);const f=[],d={left:0,right:0};r.forEach(p=>{const b=p[0];let h=p[1];h.length!==0&&(b===yn.DIFF_EQUAL?(d.left+=h.length,d.right+=h.length):b===yn.DIFF_DELETE?(f.push(Yy(this,yn.DIFF_DELETE,d.left,d.right,h)),d.right+=h.length):b===yn.DIFF_INSERT&&(f.push(Yy(this,yn.DIFF_INSERT,d.left,d.right,h)),d.left+=h.length))},this),this.diffs=lE(this,f),!(this.diffs.length>this.options.maxDiffs)&&(Gy(this),e0(this))},destroy(){const t=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let e=this.editors.left.ace.container,n=e.cloneNode(!1);n.textContent=t,e.parentNode.replaceChild(n,e);const r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),e=this.editors.right.ace.container,n=e.cloneNode(!1),n.textContent=r,e.parentNode.replaceChild(n,e),document.getElementById(this.options.classes.gutterID).innerHTML="",Hy()}};let Hy=()=>{};function tE(t){t.editors.left.ace.getSession().on("changeScrollTop",Dy(()=>{Ky(t)},16)),t.editors.right.ace.getSession().on("changeScrollTop",Dy(()=>{Ky(t)},16));const e=t.diff.bind(t);t.editors.left.ace.on("change",e),t.editors.right.ace.on("change",e),t.options.left.copyLinkEnabled&&zy(`#${t.options.classes.gutterID}`,"click",`.${t.options.classes.newCodeConnectorLink}`,r=>{Uy(t,r,yn.LTR)}),t.options.right.copyLinkEnabled&&zy(`#${t.options.classes.gutterID}`,"click",`.${t.options.classes.deletedCodeConnectorLink}`,r=>{Uy(t,r,yn.RTL)});const n=ZM(()=>{t.editors.availableHeight=document.getElementById(t.options.left.id).offsetHeight,t.diff()},250);window.addEventListener("resize",n),Hy=()=>{window.removeEventListener("resize",n)}}function Uy(t,e,n){const r=parseInt(e.target.getAttribute("data-diff-index"),10),f=t.diffs[r];let d,p,b,h,g,s;n===yn.LTR?(d=t.editors.left,p=t.editors.right,b=f.leftStartLine,h=f.leftEndLine,g=f.rightStartLine,s=f.rightEndLine):(d=t.editors.right,p=t.editors.left,b=f.rightStartLine,h=f.rightEndLine,g=f.leftStartLine,s=f.leftEndLine);let a="";for(let l=b;l<h;l+=1)a+=Wy(d,l),l===b&&a===""&&g!=0&&(a+=`
1501
+ `),l<d.ace.getSession().getLength()-1&&(a+=`
1502
+ `);const c=p.ace.getSession().getScrollTop();p.ace.getSession().replace(new vc(g,0,s,0),a),p.ace.getSession().setScrollTop(parseInt(c,10)),t.diff()}function Vy(t){const e=t.ace.getSession().doc.getAllLines(),n=[];return e.forEach(r=>{n.push(r.length+1)}),n}function qy(t,e,n,r,f){const d=t.editors[e];r<n&&(r=n);const p=`${f} ${r>n?"lines":"targetOnly"}`;r>n&&(r-=1),d.markers.push(d.ace.session.addMarker(new vc(n,0,r,1),p,"fullLine"))}function Ky(t){Gy(t),e0(t),iE(t)}function Gy(t){t.editors.left.markers.forEach(e=>{t.editors.left.ace.getSession().removeMarker(e)},t),t.editors.right.markers.forEach(e=>{t.editors.right.ace.getSession().removeMarker(e)},t)}function nE(t,e,n,r,f){const d=t.editors.left.ace.getSession().getScrollTop(),p=t.editors.right.ace.getSession().getScrollTop();t.connectorYOffset=1;const b=-1,h=e*t.lineHeight-d+.5,g=t.gutterWidth+1,s=r*t.lineHeight-p+.5,a=-1,c=n*t.lineHeight-d+t.connectorYOffset+.5,l=t.gutterWidth+1,o=f*t.lineHeight-p+t.connectorYOffset+.5,u=Fy(b,h,g,s),m=Fy(l,o,a,c),w=`L${g},${s} ${l},${o}`,x=`L${a},${c} ${b},${h}`,E=`${u} ${w} ${m} ${x}`,T=document.createElementNS(yn.SVG_NS,"path");T.setAttribute("d",E),T.setAttribute("class",t.options.classes.connector),t.gutterSVG.appendChild(T)}function rE(t,e,n){if(e.leftEndLine>e.leftStartLine&&t.options.left.copyLinkEnabled){const r=jy({className:t.options.classes.newCodeConnectorLink,topOffset:e.leftStartLine*t.lineHeight,tooltip:"Copy to right",diffIndex:n,arrowContent:t.options.classes.newCodeConnectorLinkContent});t.copyRightContainer.appendChild(r)}if(e.rightEndLine>e.rightStartLine&&t.options.right.copyLinkEnabled){const r=jy({className:t.options.classes.deletedCodeConnectorLink,topOffset:e.rightStartLine*t.lineHeight,tooltip:"Copy to left",diffIndex:n,arrowContent:t.options.classes.deletedCodeConnectorLinkContent});t.copyLeftContainer.appendChild(r)}}function iE(t){const e=t.editors.left.ace.getSession().getScrollTop(),n=t.editors.right.ace.getSession().getScrollTop();t.copyRightContainer.style.cssText=`top: ${-e}px`,t.copyLeftContainer.style.cssText=`top: ${-n}px`}function Yy(t,e,n,r,f){let d={};if(e===yn.DIFF_INSERT){let p=Xy(t.editors.left,n,f),b=Qy(t.editors.right,r),h=qa(t.editors.right,b);const g=qa(t.editors.left,p.startLine);let s=b,a=p.startLine===p.endLine,c=0;(p.startChar>0||a&&f.length<g)&&h>0&&p.startChar<g&&c++,d={leftStartLine:p.startLine,leftEndLine:p.endLine+1,rightStartLine:s,rightEndLine:s+c}}else{let p=Xy(t.editors.right,r,f),b=Qy(t.editors.left,n),h=qa(t.editors.left,b);const g=qa(t.editors.right,p.startLine);let s=b,a=p.startLine===p.endLine,c=0;(p.startChar>0||a&&f.length<g)&&h>0&&p.startChar<g&&c++,d={leftStartLine:s,leftEndLine:s+c,rightStartLine:p.startLine,rightEndLine:p.endLine+1}}return d}function Xy(t,e,n){const r={startLine:0,startChar:0,endLine:0,endChar:0},f=e+n.length;let d=0,p=!1,b=!1;t.lineLengths.forEach((g,s)=>{d+=g,!p&&e<d&&(r.startLine=s,r.startChar=e-d+g,p=!0),!b&&f<=d&&(r.endLine=s,r.endChar=f-d+g,b=!0)}),r.startChar>0&&qa(t,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;const h=/\n$/.test(n);return r.startChar>0&&h&&r.endLine++,r}function qa(t,e){return Wy(t,e).length}function Qy(t,e){const n=t.ace.getSession().doc.getAllLines();let r=0,f=0;for(let d=0;d<n.length;d+=1)if(f+=n[d].length+1,e<f){r=d;break}return f>t.ace.getSession().getValue().length&&(r+=1),r}function Zy(t){t.gutterHeight=document.getElementById(t.options.classes.gutterID).clientHeight,t.gutterWidth=document.getElementById(t.options.classes.gutterID).clientWidth;const e=Jy(t,yn.EDITOR_LEFT),n=Jy(t,yn.EDITOR_RIGHT),r=Math.max(e,n,t.gutterHeight);t.gutterSVG=document.createElementNS(yn.SVG_NS,"svg"),t.gutterSVG.setAttribute("width",t.gutterWidth),t.gutterSVG.setAttribute("height",r),document.getElementById(t.options.classes.gutterID).appendChild(t.gutterSVG)}function Jy(t,e){return(e===yn.EDITOR_LEFT?t.editors.left:t.editors.right).ace.getSession().getLength()*t.lineHeight}function oE(t){t.copyRightContainer=document.createElement("div"),t.copyRightContainer.setAttribute("class",t.options.classes.copyRightContainer),t.copyLeftContainer=document.createElement("div"),t.copyLeftContainer.setAttribute("class",t.options.classes.copyLeftContainer),document.getElementById(t.options.classes.gutterID).appendChild(t.copyRightContainer),document.getElementById(t.options.classes.gutterID).appendChild(t.copyLeftContainer)}function sE(t){document.getElementById(t.options.classes.gutterID).removeChild(t.gutterSVG),Zy(t)}function aE(t){t.copyLeftContainer.innerHTML="",t.copyRightContainer.innerHTML=""}function lE(t,e){const n=[];function r(d){return t.options.diffGranularity===yn.DIFF_GRANULARITY_SPECIFIC?d<1:d<=1}e.forEach((d,p)=>{if(p===0){n.push(d);return}let b=!1;for(let h=0;h<n.length;h+=1)if(r(Math.abs(d.leftStartLine-n[h].leftEndLine))&&r(Math.abs(d.rightStartLine-n[h].rightEndLine))){n[h].leftStartLine=Math.min(d.leftStartLine,n[h].leftStartLine),n[h].rightStartLine=Math.min(d.rightStartLine,n[h].rightStartLine),n[h].leftEndLine=Math.max(d.leftEndLine,n[h].leftEndLine),n[h].rightEndLine=Math.max(d.rightEndLine,n[h].rightEndLine),b=!0;break}b||n.push(d)});const f=[];return n.forEach(d=>{d.leftStartLine===d.leftEndLine&&d.rightStartLine===d.rightEndLine||f.push(d)}),f}function e0(t){sE(t),aE(t),t.diffs.forEach((e,n)=>{t.options.showDiffs&&(qy(t,yn.EDITOR_LEFT,e.leftStartLine,e.leftEndLine,t.options.classes.diff),qy(t,yn.EDITOR_RIGHT,e.rightStartLine,e.rightEndLine,t.options.classes.diff),t.options.showConnectors&&nE(t,e.leftStartLine,e.leftEndLine,e.rightStartLine,e.rightEndLine),rE(t,e,n))},t)}const cE={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1},modelValue:Boolean},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(t){this.$emit("update:modelValue",t)}}},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 t=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=ls.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new t),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(),Zl.applyVimModeIfEnabled(this.editor),this.editor.focus()):(this.tab=1,this.differ=new yc({element:this.$refs.editor,mode:new t,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),Zl.applyVimModeIfEnabled(this.differ.getEditors().left),Zl.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 t=this.differ.diffs[this.curDiff].leftStartLine,e=this.differ.diffs[this.curDiff].rightStartLine;t>5&&(t-=5),e>5&&(e-=5),this.differ.getEditors().left.scrollToLine(t),this.differ.getEditors().right.scrollToLine(e)},buildPluginMode(){let t=ls.require("ace/lib/oop"),e=ls.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,n=["VARIABLE"],r=new RegExp(`(\\b${n.join("\\b|\\b")}\\b)`),f=function(){e.call(this);for(let s in this.$rules)this.$rules[s].unshift({regex:r,token:"support.function"})};t.inherits(f,e);let d=ls.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,p=ls.require("ace/mode/behaviour/cstyle").CstyleBehaviour,b=ls.require("ace/mode/folding/ruby").FoldMode,h=function(){this.HighlightRules=f,this.$outdent=new d,this.$behaviour=new p,this.foldingRules=new b,this.indentKeywords=this.foldingRules.indentKeywords},g=ls.require("ace/mode/ruby").Mode;return t.inherits(h,g),(function(){this.$id="ace/mode/openc3"}).call(h.prototype),h},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
1503
+ `)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1504
+ `)):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(t=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
1505
+ `))}).catch(t=>{})},emitSubmit(t){let e={name:this.pluginName,variables:mf(this.localVariables),plugin_txt_lines:t};this.$emit("callback",e)},close:function(){this.show=!this.show},showContextMenu:function(t){this.menuX=t.pageX,this.menuY=t.pageY;let e=this.editor.getCursorPosition(),n=this.editor.session.getTokenAt(e.row,e.column);if(n){let r=n.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&Zl.toggleVimMode(this.editor)}}},uE={style:{flex:"1"}},hE={class:"pa-3"},dE={ref:"editor",class:"editor"},fE={key:0};function pE(t,e,n,r,f,d){const p=Ue("v-card-title"),b=Ue("v-icon"),h=Ue("v-row"),g=Ue("v-tab"),s=Ue("v-tabs"),a=Ue("v-text-field"),c=Ue("v-col"),l=Ue("v-window-item"),o=Ue("v-list-item-title"),u=Ue("v-list-item"),m=Ue("v-divider"),w=Ue("v-list"),x=Ue("v-menu"),E=Ue("v-window"),T=Ue("v-btn"),k=Ue("v-spacer"),C=Ue("v-card-actions"),L=Ue("v-card-text"),R=Ue("v-card"),F=Ue("v-dialog");return lt(),Xt(F,{modelValue:d.show,"onUpdate:modelValue":e[5]||(e[5]=I=>d.show=I),persistent:"",width:"80vw"},{default:Fe(()=>[We(R,null,{default:Fe(()=>[We(L,null,{default:Fe(()=>[We(p,null,{default:Fe(()=>[Ht(_n(n.pluginName),1)]),_:1}),n.existingPluginTxt!==null?(lt(),Xt(h,{key:0,class:"notice d-flex flex-row"},{default:Fe(()=>[We(b,{size:"x-large",start:"",color:"yellow"},{default:Fe(()=>e[6]||(e[6]=[Ht(" mdi-alert-box ")])),_:1}),fr("div",uE," The existing plugin.txt is different from the "+_n(n.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+_n(n.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Ur("",!0),We(h,{class:"pb-3 pr-3"},{default:Fe(()=>[We(s,{modelValue:f.tab,"onUpdate:modelValue":e[0]||(e[0]=I=>f.tab=I),class:"ml-3"},{default:Fe(()=>[(lt(),Xt(g,{key:0},{default:Fe(()=>e[7]||(e[7]=[Ht(" Variables ")])),_:1})),(lt(),Xt(g,{key:1},{default:Fe(()=>e[8]||(e[8]=[Ht(" plugin.txt ")])),_:1}))]),_:1},8,["modelValue"])]),_:1}),fr("form",{onSubmit:e[4]||(e[4]=ka((...I)=>t.onSubmit&&t.onSubmit(...I),["prevent"]))},[We(E,{modelValue:f.tab,"onUpdate:modelValue":e[3]||(e[3]=I=>f.tab=I)},{default:Fe(()=>[(lt(),Xt(l,{key:0,eager:"true",class:"tab"},{default:Fe(()=>[fr("div",hE,[We(h,{class:"mt-3"},{default:Fe(()=>[(lt(!0),gn(Li,null,Xi(f.localVariables,(I,H)=>(lt(),gn("div",{key:H},[We(c,{style:{width:"220px"}},{default:Fe(()=>[We(a,{modelValue:f.localVariables[H],"onUpdate:modelValue":P=>f.localVariables[H]=P,clearable:"",type:"text",label:H},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)]))),128))]),_:1})])]),_:1})),n.existingPluginTxt===null?(lt(),Xt(l,{key:"1-new",eager:"true",class:"tab"},{default:Fe(()=>[We(h,{class:"pa-3"},{default:Fe(()=>[We(c,null,{default:Fe(()=>e[9]||(e[9]=[Ht(" This can be edited before installation. ")])),_:1})]),_:1}),fr("pre",{ref:"editor",class:"editor",onContextmenu:e[1]||(e[1]=ka((...I)=>d.showContextMenu&&d.showContextMenu(...I),["prevent"]))},null,544),We(x,{modelValue:f.contextMenu,"onUpdate:modelValue":e[2]||(e[2]=I=>f.contextMenu=I),target:[f.menuX,f.menuY]},{default:Fe(()=>[We(w,null,{default:Fe(()=>[We(u,{link:""},{default:Fe(()=>[We(o,{onClick:t.openDocumentation},{default:Fe(()=>[Ht(_n(t.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),We(m),We(u,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:d.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(lt(),Xt(l,{key:"1-existing",eager:"true",class:"tab"},{default:Fe(()=>[We(h,{class:"pa-3"},{default:Fe(()=>[We(c,null,{default:Fe(()=>e[10]||(e[10]=[Ht(" Existing plugin.txt. This can be edited before installation. ")])),_:1}),We(c,{class:"ml-6"},{default:Fe(()=>e[11]||(e[11]=[Ht(" Uneditable plugin.txt from the new plugin. ")])),_:1})]),_:1}),fr("pre",dE,null,512)]),_:1}))]),_:1},8,["modelValue"]),We(C,{class:"px-2 mt-2"},{default:Fe(()=>[n.existingPluginTxt!==null?(lt(),gn("div",fE,[We(T,{variant:"text",onClick:d.nextDiff},{default:Fe(()=>e[12]||(e[12]=[Ht(" Next Diff ")])),_:1},8,["onClick"]),We(T,{variant:"text",onClick:d.previousDiff},{default:Fe(()=>e[13]||(e[13]=[Ht(" Previous Diff ")])),_:1},8,["onClick"])])):Ur("",!0),We(k),We(T,{variant:"outlined","data-test":"edit-cancel",onClick:ka(d.close,["prevent"])},{default:Fe(()=>e[14]||(e[14]=[Ht(" Cancel ")])),_:1},8,["onClick"]),We(T,{variant:"flat","data-test":"edit-submit",onClick:d.submit},{default:Fe(()=>e[15]||(e[15]=[Ht(" Install ")])),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue"])}const DN=sr("p",Ri(cE,[["render",pE],["__scopeId","data-v-5b18ccf5"]])),gE=fd.find(t=>t.name==="PluginsTab"),t0=[{path:"/",component:QM,children:[{component:gE.component,path:""},...fd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:WM}];t0.forEach(Lf);const mE=Af({history:Tf(),routes:t0}),vE={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"}},yE={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:t=>!!t||"Required.",match:t=>t===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(t,e,n){this.params=t,this.show=!0,this.resolve=e,this.reject=n},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=""}}},bE=["innerHTML"],wE={key:2},xE={key:3,class:"validate mt-4"};function CE(t,e,n,r,f,d){const p=Ue("v-spacer"),b=Ue("v-toolbar"),h=Ue("v-icon"),g=Ue("v-text-field"),s=Ue("v-card-text"),a=Ue("v-btn"),c=Ue("v-card-actions"),l=Ue("v-card"),o=Ue("v-dialog"),u=Ue("v-app");return lt(),Xt(u,null,{default:Fe(()=>[We(o,{modelValue:t.show,"onUpdate:modelValue":e[1]||(e[1]=m=>t.show=m),width:"600"},{default:Fe(()=>[We(l,null,{default:Fe(()=>[We(b,{height:"24"},{default:Fe(()=>[We(p),fr("span",null,_n(t.params.title),1),We(p)]),_:1}),We(s,{class:"mt-4 pa-3"},{default:Fe(()=>[t.params.validateText?(lt(),Xt(h,{key:0,class:"mr-2"},{default:Fe(()=>e[2]||(e[2]=[Ht(" mdi-alert ")])),_:1})):Ur("",!0),t.params.html?(lt(),gn("span",{key:1,innerHTML:t.params.text},null,8,bE)):(lt(),gn("span",wE,_n(t.params.text),1)),t.params.validateText?(lt(),gn("div",xE,[Ht(" Enter "+_n(t.params.validateText)+" to confirm! ",1),We(g,{modelValue:t.validationText,"onUpdate:modelValue":e[0]||(e[0]=m=>t.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[t.rules.required,t.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Ur("",!0)]),_:1}),We(c,{class:"px-2"},{default:Fe(()=>[We(p),t.params.cancelText?(lt(),Xt(a,{key:0,variant:"outlined","data-test":d.dataTestCancel,onClick:d.cancel},{default:Fe(()=>[Ht(_n(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Ur("",!0),We(a,{variant:"flat",color:t.params.okClass,"data-test":d.dataTestOk,onClick:d.ok},{default:Fe(()=>[Ht(_n(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const kE=Ri(yE,[["render",CE],["__scopeId","data-v-de532a0f"]]);class _E{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const e=window.Vue.createApp(kE);e.use(vd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({title:e,text:n,okText:r,okClass:f,validateText:d,cancelText:p,html:b}){return this.mount(),new Promise((h,g)=>{this.$root.dialog({title:e,text:n,okText:r,okClass:f,validateText:d,cancelText:p,html:b},h,g)})}confirm(e,{okText:n="Ok",cancelText:r="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:f,validateText:null,cancelText:r,html:!1})}alert(e,{okText:n="Ok",html:r=!1,okClass:f="primary"}){return this.open({title:"Alert",text:e,okText:n,okClass:f,validateText:null,cancelText:null,html:r})}validate(e,{okText:n="Ok",validateText:r="CONFIRM",cancelText:f="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:d,validateText:r,cancelText:f,html:!1})}}const SE={install(t,e){const n=new _E;t.provide("dialog",n),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=n)}},AE={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`
1506
+ --toast-bg-color:${dd[this.toastNotification.level]};
1507
+ --toast-fg-color:${RM(this.toastNotification.level)};
1508
+ `},contentStyle:function(){return`
1509
+ white-space: ${this.expanded?"normal":"nowrap"};
1510
+ overflow-x: ${this.expanded?"visible":"hidden"};
1511
+ text-overflow: ${this.expanded?"unset":"ellipsis"};
1512
+ `}},methods:{toast:function(t,e){this.noToastPaths.includes(window.location.pathname)||(e===void 0&&(e=5e3),this.toastNotification=t,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}}},TE={key:0,class:"text-subtitle-1 mr-1 notification-text"},$E={key:1,class:"text-body-2 notification-text"},ME={key:2,class:"text-body-2 notification-text"};function EE(t,e,n,r,f,d){const p=Ue("v-icon"),b=Ue("v-spacer"),h=Ue("v-btn"),g=Ue("v-sheet"),s=Ue("v-slide-y-transition");return lt(),Xt(s,null,{default:Fe(()=>[_f(We(g,{style:is(d.toastStyle),class:"toast-notification",onClick:d.expand},{default:Fe(()=>[We(p,{class:"mr-1 notification-text"},{default:Fe(()=>[Ht(_n(d.toastNotificationIcon),1)]),_:1}),fr("div",{class:"toast-content",style:is(d.contentStyle)},[t.toastNotification.title?(lt(),gn("span",TE,_n(t.toastNotification.title)+": ",1)):Ur("",!0),t.toastNotification.body?(lt(),gn("span",$E,_n(t.toastNotification.body),1)):Ur("",!0),t.toastNotification.message?(lt(),gn("span",ME,_n(t.toastNotification.message),1)):Ur("",!0)],4),We(b),We(h,{variant:"text",onClick:ka(d.hide,["stop"]),class:"notification-text"},{default:Fe(()=>e[0]||(e[0]=[Ht(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[Sf,t.showToast]])]),_:1})}const IE=Ri(AE,[["render",EE],["__scopeId","data-v-b0459ba8"]]);class LE{constructor(e={}){var n;this.$store=e.store,this.mounted=!1,this.$root=null,(n=window.$cosmosNotify)!=null&&n.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const e=ru(IE);e.use(vd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({method:e,title:n,body:r,message:f,level:d,duration:p,type:b="alert",logToConsole:h=!1,saveToHistory:g=!0}){this.mount(),h&&console.log(f?`${d.toUpperCase()} - ${f}`:`${d.toUpperCase()} - ${n}: ${r}`),g&&this.$store.commit("notifyAddHistory",{title:n,body:r,message:f,level:d}),this[e]({title:n,body:r,message:f,level:d,duration:p,type:b})}toast({title:e,body:n,message:r,level:f,duration:d,type:p}){this.$root.toast({title:e,body:n,message:r,level:f,type:p},d)}critical({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"critical",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}FATAL(e){this.critical(e)}ERROR(e){this.critical(e)}serious({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"serious",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}caution({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"caution",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}WARN(e){this.caution(e)}normal({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"normal",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}INFO(e){this.normal(e)}DEBUG(e){this.normal(e)}standby({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"standby",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}off({title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b}){this.open({method:"toast",level:"off",title:e,body:n,message:r,type:f,duration:d,logToConsole:p,saveToHistory:b})}}const RE={install(t,e){const n=new LE(e);t.provide("notify",n),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=n)}},n0=100,r0=Mf({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:t=>e=>t.namedWidgets[e]},mutations:{notifyAddHistory:(t,e)=>{t.notifyHistory.length>=n0&&(t.notifyHistory.length=n0-1),t.notifyHistory.unshift(e)},notifyClearHistory:t=>{t.notifyHistory=[]},setNamedWidget:(t,e)=>{Object.assign(t.namedWidgets,e)},clearNamedWidget:(t,e)=>{delete t.namedWidgets[e]}},modules:{}});function i0(t){let e;return t!==null&&typeof t=="object"&&((e=Object.getPrototypeOf(t))===Object.prototype||e===null)}function OE(t,e){const n={};for(const r of e)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o0(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const f in t)r[f]=t[f];for(const f in e){const d=t[f],p=e[f];if(i0(d)&&i0(p)){r[f]=o0(d,p,n);continue}if(n&&Array.isArray(d)&&Array.isArray(p)){r[f]=n(d,p);continue}r[f]=p}return r}function Ka(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ka.cache.has(t))return Ka.cache.get(t);const e=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ka.cache.set(t,e),e}Ka.cache=new Map;function DE(t){yf(`Vuetify: ${t}`)}function s0(t,e){return n=>Object.keys(t).reduce((r,f)=>{const d=typeof t[f]=="object"&&t[f]!=null&&!Array.isArray(t[f])?t[f]:{type:t[f]};return n&&f in n?r[f]={...d,default:n[f]}:r[f]=d,e&&!r[f].source&&(r[f].source=e),r},{})}function a0(t,e){const n=Cf();if(!n)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return n}function NE(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a0("injectSelf");const{provides:n}=e;if(n&&t in n)return n[t]}const md=Symbol.for("vuetify:defaults");function l0(){const t=bf(md);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function FE(t,e){return t.props&&(typeof t.props[e]<"u"||typeof t.props[Ka(e)]<"u")}function PE(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l0();const r=a0("useDefaults");if(e=e??r.type.name??r.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const f=nu(()=>{var h;return(h=n.value)==null?void 0:h[t._as??e]}),d=new Proxy(t,{get(h,g){var s,a,c,l;const o=Reflect.get(h,g);if(g==="class"||g==="style")return[(s=f.value)==null?void 0:s[g],o].filter(w=>w!=null);if(FE(r.vnode,g))return o;const u=(a=f.value)==null?void 0:a[g];if(u!==void 0)return u;const m=(l=(c=n.value)==null?void 0:c.global)==null?void 0:l[g];return m!==void 0?m:o}}),p=wf();xf(()=>{if(f.value){const h=Object.entries(f.value).filter(g=>{let[s]=g;return s.startsWith(s[0].toUpperCase())});p.value=h.length?Object.fromEntries(h):void 0}else p.value=void 0});function b(){const h=NE(md,r);kf(md,nu(()=>p.value?o0((h==null?void 0:h.value)??{},p.value):h==null?void 0:h.value))}return{props:d,provideSubDefaults:b}}function bc(t){if(t._setup=t._setup??t.setup,!t.name)return DE("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=s0(t.props??{},t.name)();const e=Object.keys(t.props).filter(n=>n!=="class"&&n!=="style");t.filterProps=function(n){return OE(n,e)},t.props._as=String,t.setup=function(n,r){const f=l0();if(!f.value)return t._setup(n,r);const{props:d,provideSubDefaults:p}=PE(n,n._as??t.name,f),b=t._setup(d,r);return p(),b}}return t}function BE(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(t?bc:vf)(e)}const WE=[String,Function,Object,Array],wc=s0({icon:{type:WE},tag:{type:[String,Object,Function],required:!0}},"icon");BE()({name:"VComponentIcon",props:wc(),setup(t,e){let{slots:n}=e;return()=>{const r=t.icon;return We(t.tag,null,{default:()=>{var f;return[t.icon?We(r,null,null):(f=n.default)==null?void 0:f.call(n)]}})}}}),bc({name:"VSvgIcon",inheritAttrs:!1,props:wc(),setup(t,e){let{attrs:n}=e;return()=>We(t.tag,fl(n,{style:null}),{default:()=>[We("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(t.icon)?t.icon.map(r=>Array.isArray(r)?We("path",{d:r[0],"fill-opacity":r[1]},null):We("path",{d:r},null)):We("path",{d:t.icon},null)])]})}}),bc({name:"VLigatureIcon",props:wc(),setup(t){return()=>We(t.tag,null,{default:()=>[t.icon]})}});const jE=bc({name:"VClassIcon",props:wc(),setup(t){return()=>We(t.tag,{class:t.icon},null)}}),zE={component:t=>js(jE,{...t,class:"mdi"})},vd=Ef({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:vE}},icons:{defaultSet:"mdi",sets:{mdi:zE,...DM,...NM}}}),yd=nw({createApp:ru,appOptions:{render(){return js(uw,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(mE),t.use(r0),t.use(vd),t.use(SE),t.use(RE,{store:r0})}}),NN=sr("i",yd.bootstrap),FN=sr("j",yd.mount),PN=sr("u",yd.unmount)}}});