openc3-cosmos-tool-dataextractor 7.4.0 → 7.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/tools/dataextractor/{ArrayWidget-CIDdZjk3-a365d6ff2b67a493871c.js → ArrayWidget-9OSo49r--b63f7e6bf77a4479ac7b.js} +2 -2
  3. data/tools/dataextractor/{ArrayplotWidget-BfO1atvG-6a08522672acf412ee31.js → ArrayplotWidget-D5C_WTX2-f98bc5cb7b0562f57a8b.js} +1 -1
  4. data/tools/dataextractor/{BarColumn-CHX_3ye3-efbf3df88e1db66e93b7.js → BarColumn-CvHnnifr-9acf7240445d099bb3cb.js} +1 -1
  5. data/tools/dataextractor/{BlockWidget-DSbunlY_-22efee4c2014dc1373a7.js → BlockWidget-DuEDZ4dJ-0824686c3ac342317084.js} +2 -2
  6. data/tools/dataextractor/{ButtonWidget-BB4ZOCI8-942359ad22d6846f2adc.js → ButtonWidget-CZIUtd9z-79e715ef7f35635d483f.js} +1 -1
  7. data/tools/dataextractor/{CanvasWidget-DsyMt7xW-bd39bce7dccaf632c4fc.js → CanvasWidget-C4-pXiKY-155e552f593ab6157896.js} +1 -1
  8. data/tools/dataextractor/CanvasdotWidget-Bh0HHx67-1cd9f78e8bdf8f3abfcd.js +1 -0
  9. data/tools/dataextractor/{CanvasimageWidget-DY1DDf0a-376e192da5d8c3579651.js → CanvasimageWidget-Bu5NmsDs-60dc89c33d7d2f845fe6.js} +1 -1
  10. data/tools/dataextractor/{CanvasimagevalueWidget-0lc2cCPV-9d3edd16eee4a4f28dfe.js → CanvasimagevalueWidget-Dv8dQrnj-d84a6acf0df5ce17287a.js} +1 -1
  11. data/tools/dataextractor/{CanvaslabelWidget-C6TDW9WO-06ba64b610cfcbd8690a.js → CanvaslabelWidget-68IeeM3a-20403349bd420ee46330.js} +1 -1
  12. data/tools/dataextractor/{CanvaslabelvalueWidget-Cf_dcDW2-d4abd338766f66d68193.js → CanvaslabelvalueWidget-C6j_A4z6-5f28ab44c16e551b05ad.js} +1 -1
  13. data/tools/dataextractor/{CanvaslineWidget-jg2ozQ0N-af40156bc5036e8afe1a.js → CanvaslineWidget-BgQ6wLDv-4bb1076104920a9f1398.js} +1 -1
  14. data/tools/dataextractor/{CanvaslinevalueWidget-CKpjqlKA-ba1fffbf8bf143563f2f.js → CanvaslinevalueWidget-C6-HkTJp-4bbd1732ca5dbfd42cd9.js} +1 -1
  15. data/tools/dataextractor/{CheckbuttonWidget-BWXinMaT-06aa9f5b43e6ef7ee36b.js → CheckbuttonWidget-DJmT73t9-0f16b1f225312d647f09.js} +1 -1
  16. data/tools/dataextractor/{ComboboxWidget-BzKkyRDT-54a91389040556de2534.js → ComboboxWidget-vTtsjxRm-f02c2a116cf0f3786b3c.js} +1 -1
  17. data/tools/dataextractor/DataExtractor-91032d97b7a5cff39728.js +14 -0
  18. data/tools/dataextractor/DateWidget-BjKIDtsf-b824fa1490cc15a1ec25.js +1 -0
  19. data/tools/dataextractor/{DetailsDialog-CLPj0nP0-4bf5ea98e5ff56a47f05.js → DetailsDialog-S1nw1d0h-005852e689a8be93c88a.js} +1 -1
  20. data/tools/dataextractor/{DynamicWidget-yna_ejyc-41f93b7bf1514ee52ac0.js → DynamicWidget-yna_ejyc-fe60456e77fd0b43042d.js} +1 -1
  21. data/tools/dataextractor/{FilechecksumWidget-DqNThsOX-c679ca6bff3a875eb9c4.js → FilechecksumWidget-obppYSP4-4cca3c7e2468ea5856c4.js} +1 -1
  22. data/tools/dataextractor/{FiledisplayWidget-BRhhiVEs-316e90e38c4eca99bd0b.js → FiledisplayWidget-BstroKFo-9c68f076ed09ec63cc16.js} +1 -1
  23. data/tools/dataextractor/{FormatvalueWidget-pEjAh0h2-06f06dc0a5a1827cdf25.js → FormatvalueWidget-MJIJg6Bf-a85c19eed691e8482446.js} +1 -1
  24. data/tools/dataextractor/Graph-BL-czUPp-00b220fc345bff28fc0d.js +1 -0
  25. data/tools/dataextractor/{GraphWidget-BZjBkefj-152c6140396136b6e842.js → GraphWidget-C8KRp-QN-ff0594c7786932ea9dab.js} +1 -1
  26. data/tools/dataextractor/{HorizontalWidget-Brag6E4y-a9141bd384f055413c6f.js → HorizontalWidget-Cn9qnYVh-c0036ab7dd6e222b6801.js} +1 -1
  27. data/tools/dataextractor/{HorizontalboxWidget-BnkH4cVq-13270435a51ec5890b03.js → HorizontalboxWidget-gz8uYYFZ-e626b91ce9fc5dc59307.js} +1 -1
  28. data/tools/dataextractor/HorizontallineWidget-CrDua5-L-89d8e0395552cdabadff.js +1 -0
  29. data/tools/dataextractor/{IframeWidget-Ciu5u58E-0a7070640afefb67e88e.js → IframeWidget-CtS7MjKL-ff7d6ae04e519c53884f.js} +1 -1
  30. data/tools/dataextractor/ImageLoader-Vpn27aUN-4311980339a9f9889608.js +1 -0
  31. data/tools/dataextractor/{ImageviewerWidget-vWMGPveb-805995e452eeb9c96950.js → ImageviewerWidget-Kmzt8wuP-f0dbd3dba95361962068.js} +1 -1
  32. data/tools/dataextractor/{LabelWidget-DVp0CmFH-ad94520313e6050c0342.js → LabelWidget-DIZpHxYX-8a4eb34ad238e8d7ac51.js} +1 -1
  33. data/tools/dataextractor/LabelledWidget-CGxDI8XZ-a51c07338535d99c719d.js +1 -0
  34. data/tools/dataextractor/LabelprogressbarWidget-CXOc5p8G-8dc5db3a112e44ae406b.js +1 -0
  35. data/tools/dataextractor/LabelsparklineWidget-B_LuqFcA-e2ee90ca47c85e760b20.js +1 -0
  36. data/tools/dataextractor/LabelvalueWidget--G4wHMZL-e6b09113e4ad2f23f098.js +1 -0
  37. data/tools/dataextractor/{LabelvaluedescWidget-c5BUCRxB-bb4bc7800b9fcb8834ff.js → LabelvaluedescWidget-DqLK0wvi-35573cdb56bb7f4db56a.js} +1 -1
  38. data/tools/dataextractor/{LabelvaluelimitsbarWidget-DBKZLpXJ-1145ebe0da314afb3b31.js → LabelvaluelimitsbarWidget-BWOQJkLP-9f36e15034ef28601187.js} +1 -1
  39. data/tools/dataextractor/LabelvaluelimitscolumnWidget-BfF73Y2F-ec9757f289a42952111a.js +1 -0
  40. data/tools/dataextractor/LabelvaluerangebarWidget-CKsFRW6t-b3b0b8f355b509a490c5.js +1 -0
  41. data/tools/dataextractor/{Layout-Df-lJgpB-3443a03561b770b828ae.js → Layout-CGL1JfeU-b97cbbab214b06c5d3bd.js} +1 -1
  42. data/tools/dataextractor/{LedWidget-C97EJXBo-7c9b12b76be262fb0539.js → LedWidget-DrAJ8_fN-1a6e41898187146865b5.js} +1 -1
  43. data/tools/dataextractor/{LimitsBar-DNV39okL-42e6976651a1fe948f8e.js → LimitsBar-CxPzG0Zv-c94af7fb8889ad53f866.js} +1 -1
  44. data/tools/dataextractor/{LimitsbarWidget-BIO6xztx-bc1a02229036f0dd4023.js → LimitsbarWidget-1IayV5D7-1d00b4075e027a63b362.js} +1 -1
  45. data/tools/dataextractor/{LimitscolorWidget-BGrNA65J-f459bdc35b6389c77718.js → LimitscolorWidget-C7LY3BQ7-b7519212dac6268d565d.js} +1 -1
  46. data/tools/dataextractor/{LimitscolumnWidget-Bw6EXJs9-aea5bb3bcbfd9ded4639.js → LimitscolumnWidget-JhIc5Sjl-f75a8580fb17d8a9aa76.js} +1 -1
  47. data/tools/dataextractor/LinegraphWidget-BaROxuUn-c41ddb04f94577eac1cf.js +1 -0
  48. data/tools/dataextractor/{MatrixbycolumnsWidget-C33-g7kK-2243491e9688c4485a52.js → MatrixbycolumnsWidget-i0gGPMOV-5e66e42a5ebe115015e1.js} +1 -1
  49. data/tools/dataextractor/{OpenC3TimePicker-cOr0aOVn-25acc4b1827c96c6823a.js → OpenC3TimePicker-DDTLwTEw-6ebacfc4eb0436b802b0.js} +1 -1
  50. data/tools/dataextractor/{ProgressbarWidget-DqfSMI10-435b3abb259019c8dd67.js → ProgressbarWidget-QxEq8C4A-ba568608a03d0623d388.js} +1 -1
  51. data/tools/dataextractor/{RadiobuttonWidget-CSQeEacF-bf748e1aa8fa763e632c.js → RadiobuttonWidget-DYf3qvBq-f8e7a4483d8e58386537.js} +1 -1
  52. data/tools/dataextractor/{RadiogroupWidget-DlQN9z-Z-737a18df0967dcab93a0.js → RadiogroupWidget-C0b_ckej-3e75f46536b7cf154913.js} +1 -1
  53. data/tools/dataextractor/{RangebarWidget-CJSUof1--661a6e4b51cab637183e.js → RangebarWidget-DcSEHktI-4907ae394ecf8c7431d0.js} +1 -1
  54. data/tools/dataextractor/{RollupWidget-C977Lkcx-3ae75d3c4a2c4fd3048c.js → RollupWidget-AVS4drYX-68ea203c4fde2230fc16.js} +1 -1
  55. data/tools/dataextractor/{ScrollwindowWidget-BFxz61oW-11083dcc92493b36f51b.js → ScrollwindowWidget-Dpf3BScA-8b23b3bfb3f989697695.js} +1 -1
  56. data/tools/dataextractor/{SignalWidget-BT6AcbBx-87df19489741e9c87fa5.js → SignalWidget-Q1YtPsNw-a69f8440456233734947.js} +1 -1
  57. data/tools/dataextractor/SpacerWidget-DGEOqhu_-afce57a24882aa266bf9.js +1 -0
  58. data/tools/dataextractor/SparklineWidget-DbNWbNzY-16629f0d1a98b06bd16e.js +1 -0
  59. data/tools/dataextractor/TabbookWidget-CrkPPZIF-33a7e08aabbcda9589dd.js +1 -0
  60. data/tools/dataextractor/TargetPacketItemChooser-H0APWwGe-51b3dfea0f8ef33ede09.js +1 -0
  61. data/tools/dataextractor/TextboxWidget-CfQEzaRr-89015a64572bbd7d3b2e.js +1 -0
  62. data/tools/dataextractor/TextfieldWidget-BQL8dOTg-8bf1de960c352f347bdb.js +1 -0
  63. data/tools/dataextractor/{TimeWidget-BTaXBxVm-f4a9bc93fa17dbee8c11.js → TimeWidget-DiE_oc7J-c88d2a6845ec6ee58136.js} +1 -1
  64. data/tools/dataextractor/TitleWidget-C5a_ZsqM-cc8ffe3b7169323b0a0f.js +1 -0
  65. data/tools/dataextractor/VWidget-D4ipW0SF-657a7be814dd34db90cf.js +1 -0
  66. data/tools/dataextractor/ValueWidget-9JNo-Sk8-da4713bbfd265556e5d7.js +1 -0
  67. data/tools/dataextractor/{ValuelimitsbarWidget-CqRkPwWS-3718efa59bfa32b811f9.js → ValuelimitsbarWidget-CqiFVnaT-d5f3967e5c32f857fa7e.js} +1 -1
  68. data/tools/dataextractor/ValuelimitscolumnWidget-DWDFVRNg-de0d55d647bc63fc236a.js +1 -0
  69. data/tools/dataextractor/ValuerangebarWidget-BAVMrD0L-e515101dab1cf51e5e15.js +1 -0
  70. data/tools/dataextractor/{VerticalWidget-CoJiy2TT-d8e0025943059c8b8699.js → VerticalWidget-Dw0j42K2-a317af9834c4a78dd4ea.js} +1 -1
  71. data/tools/dataextractor/{VerticalboxWidget-BD5Eq3BH-904a6e5160ae7db4a651.js → VerticalboxWidget-xusQtXo0-802a9f7db2148a6de00a.js} +1 -1
  72. data/tools/dataextractor/{Widget-ClRi417b-ca09328deaed4efe3ede.js → Widget-Dy-YgkeU-3dd1f9256b93c3004793.js} +1 -1
  73. data/tools/dataextractor/main-fe951c1cf23527b40eb2.js +1491 -0
  74. data/tools/dataextractor/main.js +1 -1
  75. metadata +73 -73
  76. data/tools/dataextractor/CanvasdotWidget-BZpkCAoH-4e5ef4f101d1c45c58ef.js +0 -1
  77. data/tools/dataextractor/DataExtractor-2088fe0995e64bab5096.js +0 -14
  78. data/tools/dataextractor/DateWidget-qUbLzQsX-fa054ed3b5c152e3ad52.js +0 -1
  79. data/tools/dataextractor/Graph-GVQZltap-a899a85c24f92402cd6b.js +0 -1
  80. data/tools/dataextractor/HorizontallineWidget-k7fL4EPN-e6835950fab23e268e2f.js +0 -1
  81. data/tools/dataextractor/ImageLoader-DH5e4lg8-ab7bd82e4b6c97a1d343.js +0 -1
  82. data/tools/dataextractor/LabelledWidget-1DeE1-6G-37c387bb59733698156e.js +0 -1
  83. data/tools/dataextractor/LabelprogressbarWidget-DME-BrZe-c080e3f10caa92cab91a.js +0 -1
  84. data/tools/dataextractor/LabelsparklineWidget-4iDHGnPL-a4b3c7297887ce897715.js +0 -1
  85. data/tools/dataextractor/LabelvalueWidget-C6NQSHTb-c5d0fe4cae5fcd4bbf4d.js +0 -1
  86. data/tools/dataextractor/LabelvaluelimitscolumnWidget-NdEu06go-05b4cb5c6acba5f7cb0b.js +0 -1
  87. data/tools/dataextractor/LabelvaluerangebarWidget-CL5HLK0t-10272441ee3df15c0c2d.js +0 -1
  88. data/tools/dataextractor/LinegraphWidget-Drf9tTPN-6ef8c7ff76dc3dd45a89.js +0 -1
  89. data/tools/dataextractor/SpacerWidget-B_f09KAi-e7a9e18824431e35eb57.js +0 -1
  90. data/tools/dataextractor/SparklineWidget-Bji9DILO-cffcd58ebba764704623.js +0 -1
  91. data/tools/dataextractor/TabbookWidget-B74U8t2i-4ec2d216f654b67378fc.js +0 -1
  92. data/tools/dataextractor/TargetPacketItemChooser-XyyCP_cB-6fdc892d26307a74d591.js +0 -1
  93. data/tools/dataextractor/TextboxWidget-CbKE9aSW-61d80b11342c80f46880.js +0 -1
  94. data/tools/dataextractor/TextfieldWidget-CpdmfNk5-ba0b072fd637b2dbd9a0.js +0 -1
  95. data/tools/dataextractor/TitleWidget-ulO_gdVY-3aa67ccbdf5e87b899f5.js +0 -1
  96. data/tools/dataextractor/VWidget-C4VLQ7-b-1126b116a416d121c008.js +0 -1
  97. data/tools/dataextractor/ValueWidget-B3-Jjoux-e8c93f5f6dc1f642c0b2.js +0 -1
  98. data/tools/dataextractor/ValuelimitscolumnWidget-CF4CN14a-6108b13eebe9aa97b31d.js +0 -1
  99. data/tools/dataextractor/ValuerangebarWidget-DJtrknKH-fa7968c1ee5f4d2361f7.js +0 -1
  100. data/tools/dataextractor/main-58ef2ae57480aa824e7d.js +0 -1491
@@ -0,0 +1,1491 @@
1
+ System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(ir,gt){"use strict";var Gt,xt,or,It,De,tn,dt,Hg,Ug,Eo,Xn,Er,ai,Ir,qr,jc,Tl,Ls,El,Vg,Hi,on,mt,xi,Gg,Il,Xs,Ot,li,Ba,Wc,Ml,Os,Ut,Fa,Hc,qg,ea,Rl,ja,Yg,cs,Hh,Kg,Jg,Qg,ta,Uh,Zg,Xg,em,fr,tm,ln,Vh,Ci,nm,Ll,Uc,rm,im,om,sm,am,Gh,lm;return{setters:[at=>{Gt=at.resolveComponent,xt=at.openBlock,or=at.createBlock,It=at.withCtx,De=at.createVNode,tn=at.createElementBlock,dt=at.createElementVNode,Hg=at.useCssVars,Ug=at.defineAsyncComponent,Eo=at.h,Xn=at.normalizeStyle,Er=at.Fragment,ai=at.createTextVNode,Ir=at.toDisplayString,qr=at.createCommentVNode,jc=at.withKeys,Tl=at.withModifiers,Ls=at.withDirectives,El=at.vShow,Vg=at.toRefs,Hi=at.shallowRef,on=at.ref,mt=at.computed,xi=at.watch,Gg=at.onBeforeMount,Il=at.nextTick,Xs=at.onBeforeUnmount,Ot=at.toRef,li=at.watchEffect,Ba=at.isVNode,Wc=at.TransitionGroup,Ml=at.Transition,Os=at.defineComponent,Ut=at.unref,Fa=at.provide,Hc=at.isRef,qg=at.getCurrentInstance,ea=at.inject,Rl=at.reactive,ja=at.onMounted,Yg=at.onUpdated,cs=at.toValue,Hh=at.onScopeDispose,Kg=at.readonly,Jg=at.toRaw,Qg=at.useId,ta=at.resolveDynamicComponent,Uh=at.capitalize,Zg=at.camelize,Xg=at.markRaw,em=at.warn,fr=at.mergeProps,tm=at.effectScope,ln=at.normalizeClass,Vh=at.createApp,Ci=at.renderSlot,nm=at.useAttrs,Ll=at.renderList,Uc=at.normalizeProps,rm=at.Text},at=>{im=at.createRouter,om=at.createWebHistory},at=>{sm=at.defineStore,am=at.createPinia},at=>{Gh=at.getMountedApps},at=>{lm=at.createVuetify}],execute:(function(){ir({B:Wv,D:qa,F:lv,G:Kv,H:Hv,J:ci,K:Jv,S:xd,Z:Qv,c:Yl,d:jv,l:Jr,n:T0,o:Ga,s:qo,v:kd});var at=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cm(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),t.push.apply(t,r)}return t}function na(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?cm(Object(t),!0).forEach((function(r){uk(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):cm(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function uk(e,n,t){return(n=(function(r){var c=(function(u,g){if(ra(u)!=="object"||u===null)return u;var v=u[Symbol.toPrimitive];if(v!==void 0){var s=v.call(u,g);if(ra(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(u)})(r,"string");return ra(c)==="symbol"?c:String(c)})(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ra(e){return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ra(e)}(function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var n=function(t){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,c=String(t),u=c.length,g=-1,v="",s=c.charCodeAt(0);++g<u;)(r=c.charCodeAt(g))!=0?v+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&s==45?"\\"+r.toString(16)+" ":g==0&&u==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+c.charAt(g):c.charAt(g):v+="�";return v};e.CSS||(e.CSS={}),e.CSS.escape=n})(at);var hk={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function dk(e){if(ra(e)!=="object")throw new Error("single-spa-vue requires a configuration object");var n=na(na({},hk),e);if(!n.Vue&&!n.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!n.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(n.appOptions.el&&typeof n.appOptions.el!="string"&&!(n.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(ra(n.appOptions.el)));n.createApp=n.createApp||n.Vue&&n.Vue.createApp;var t={};return{bootstrap:fk.bind(null,n,t),mount:pk.bind(null,n,t),unmount:mk.bind(null,n,t),update:gk.bind(null,n,t)}}function fk(e){return e.loadRootComponent?e.loadRootComponent().then((function(n){return e.rootComponent=n})):Promise.resolve()}function pk(e,n,t){var r={};return Promise.resolve().then((function(){return(function(c,u){return typeof c.appOptions=="function"?c.appOptions(u):Promise.resolve(na({},c.appOptions))})(e,t).then((function(c){var u;if(t.domElement&&!c.el&&(c.el=t.domElement),c.el)if(typeof c.el=="string"){if(!(u=document.querySelector(c.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(c.el))}else(u=c.el).id||(u.id="single-spa-application:".concat(t.name)),c.el="#".concat(CSS.escape(u.id));else{var g="single-spa-application:".concat(t.name);c.el="#".concat(CSS.escape(g)),(u=document.getElementById(g))||((u=document.createElement("div")).id=g,document.body.appendChild(u))}if(!e.replaceMode&&(c.el=c.el+" .single-spa-container",!u.querySelector(".single-spa-container"))){var v=document.createElement("div");v.className="single-spa-container",u.appendChild(v)}r.domEl=u,c.render||c.template||!e.rootComponent||(c.render=function(d){return d(e.rootComponent)}),c.data||(c.data={});var s=c.data;if(c.data=function(){return na(na({},typeof s=="function"?s.call(this,this):s),t)},e.createApp){if(r.vueInstance=e.createApp(c),e.handleInstance)return Promise.resolve(e.handleInstance(r.vueInstance,t)).then((function(){return r.root=r.vueInstance.mount(c.el),n[t.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(c.el)}else if(r.vueInstance=new e.Vue(c),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),e.handleInstance)return Promise.resolve(e.handleInstance(r.vueInstance,t)).then((function(){return n[t.name]=r,r.vueInstance}));return n[t.name]=r,r.vueInstance}))}))}function gk(e,n,t){return Promise.resolve().then((function(){var r=n[t.name],c=na(na({},e.appOptions.data||{}),t),u=r.root||r.vueInstance;for(var g in c)u[g]=c[g]}))}function mk(e,n,t){return Promise.resolve().then((function(){var r=n[t.name];e.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)}))}const vk=ir("_",(e,n)=>{const t=e.__vccOpts||e;for(const[r,c]of n)t[r]=c;return t}),yk={};function bk(e,n){const t=Gt("router-view"),r=Gt("v-app");return xt(),or(r,{id:"innerapp"},{default:It(()=>[De(t)]),_:1})}const wk=vk(yk,[["render",bk]]),XW="modulepreload",e3=function(e){return"/"+e},t3={},vt=function(n,t,r){let c=Promise.resolve();function u(g){const v=new Event("vite:preloadError",{cancelable:!0});if(v.payload=g,window.dispatchEvent(v),!v.defaultPrevented)throw g}return c.then(g=>{for(const v of g||[])v.status==="rejected"&&u(v.reason);return n().catch(u)})},um=function(e){e.name!=="NotFound"&&(e.path=`/tools/dataextractor/${e.path.replace(/^\//,"")}`),e.children?.forEach(um)},Ns=ir("g",(e,n)=>{const t=e.__vccOpts||e;for(const[r,c]of n)t[r]=c;return t}),xk="/icons/customIcons.svg",qh={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return xk+"#"+this.icon}}},hm=()=>{Hg(e=>({v4ccb3d08:e.color}))},dm=qh.setup;qh.setup=dm?(e,n)=>(hm(),dm(e,n)):hm;const Ck={class:"cosmos-custom-icon"},kk={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},_k=["href"];function Ak(e,n,t,r,c,u){return xt(),tn("span",Ck,[(xt(),tn("svg",kk,[dt("use",{href:u.iconSrc},null,8,_k)]))])}const $k=Ns(qh,[["render",Ak],["__scopeId","data-v-54b83b01"]]);function fm(e,n){return function(){return e.apply(n,arguments)}}const{toString:Sk}=Object.prototype,{getPrototypeOf:Ds}=Object,{iterator:Ol,toStringTag:pm}=Symbol,Nl=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),gm=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),mm=(e,n,t)=>e===Object.prototype||!t&&n===null,Tk=e=>{if(!Object.isExtensible(e))return!1;const n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&n.push(...Object.getOwnPropertySymbols(e)),n.every(t=>{if(gm(t))return!1;const r=Object.getOwnPropertyDescriptor(e,t);return!!r&&r.configurable&&r.writable===!0})},Dl=(e,n)=>{let t=e;const r=[];for(;t!=null;){if(r.indexOf(t)!==-1)return!1;r.push(t);const c=Ds(t);if(mm(t,c,t===e))return!1;if(Nl(t,n))return!0;t=c}return!1},Ek=(e,n)=>e!=null&&Dl(e,n)?e[n]:void 0,Ik=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const n=Ds(e);if(n===null&&Tk(e))return e;const t=Object.create(null),r=Object.create(null),c=[];let u=e;for(;u!=null&&c.indexOf(u)===-1;){c.push(u);const g=u===e?n:Ds(u);if(mm(u,g,u===e))break;const v=Object.getOwnPropertyNames(u);Object.getOwnPropertySymbols&&v.push(...Object.getOwnPropertySymbols(u));for(const s of v)gm(s)||Nl(r,s)||(t[s]=e[s],r[s]=!0);u=g}return t},Yh=(e=>n=>{const t=Sk.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ao=e=>(e=e.toLowerCase(),n=>Yh(n)===e),Vc=e=>n=>typeof n===e,{isArray:ia}=Array,oa=Vc("undefined");function Wa(e){return e!==null&&!oa(e)&&e.constructor!==null&&!oa(e.constructor)&&ki(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vm=ao("ArrayBuffer");function Mk(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&vm(e.buffer),n}const Rk=Vc("string"),ki=Vc("function"),ym=Vc("number"),Ha=e=>e!==null&&typeof e=="object",Lk=e=>e===!0||e===!1,Gc=e=>{if(!Ha(e))return!1;const n=Ds(e);return(n===null||n===Object.prototype||Ds(n)===null)&&!Dl(e,pm)&&!Dl(e,Ol)},Ok=e=>{if(!Ha(e)||Wa(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Nk=ao("Date"),Dk=ao("File"),Pk=e=>!!(e&&typeof e.uri<"u"),zk=e=>e&&typeof e.getParts<"u",Bk=ao("Blob"),Fk=ao("FileList"),jk=ao("Set"),Wk=e=>Ha(e)&&ki(e.pipe);function Hk(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const bm=Hk(),wm=typeof bm.FormData<"u"?bm.FormData:void 0,Uk=e=>{if(!e)return!1;if(wm&&e instanceof wm)return!0;const n=Ds(e);if(!n||n===Object.prototype||!ki(e.append))return!1;const t=Yh(e);return t==="formdata"||t==="object"&&ki(e.toString)&&e.toString()==="[object FormData]"},Vk=ao("URLSearchParams"),[Gk,qk,Yk,Kk]=["ReadableStream","Request","Response","Headers"].map(ao),Jk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pl(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,c;if(typeof e!="object"&&(e=[e]),ia(e))for(r=0,c=e.length;r<c;r++)n.call(null,e[r],r,e);else{if(Wa(e))return;const u=t?Object.getOwnPropertyNames(e):Object.keys(e),g=u.length;let v;for(r=0;r<g;r++)v=u[r],n.call(null,e[v],v,e)}}function xm(e,n){if(Wa(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,c;for(;r-- >0;)if(c=t[r],n===c.toLowerCase())return c;return null}const sa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cm=e=>!oa(e)&&e!==sa;function Kh(...e){const{caseless:n,skipUndefined:t}=Cm(this)&&this||{},r={},c=(u,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const v=n&&typeof g=="string"&&xm(r,g)||g,s=Nl(r,v)?r[v]:void 0;Gc(s)&&Gc(u)?r[v]=Kh(s,u):Gc(u)?r[v]=Kh({},u):ia(u)?r[v]=u.slice():(!t||!oa(u))&&(r[v]=u)};for(let u=0,g=e.length;u<g;u++){const v=e[u];if(!v||Wa(v)||(Pl(v,c),typeof v!="object"||ia(v)))continue;const s=Object.getOwnPropertySymbols(v);for(let d=0;d<s.length;d++){const a=s[d];l_.call(v,a)&&c(v[a],a)}}return r}const Qk=(e,n,t,{allOwnKeys:r}={})=>(Pl(n,(c,u)=>{t&&ki(c)?Object.defineProperty(e,u,{__proto__:null,value:fm(c,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,u,{__proto__:null,value:c,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Zk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Xk=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:n.prototype}),t&&Object.assign(e.prototype,t)},e_=(e,n,t,r)=>{let c,u,g;const v={};if(n=n||{},e==null)return n;do{for(c=Object.getOwnPropertyNames(e),u=c.length;u-- >0;)g=c[u],(!r||r(g,e,n))&&!v[g]&&(n[g]=e[g],v[g]=!0);e=t!==!1&&Ds(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},t_=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},n_=e=>{if(!e)return null;if(ia(e))return e;let n=e.length;if(!ym(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},r_=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&Ds(Uint8Array)),i_=(e,n)=>{const t=(e&&e[Ol]).call(e);let r;for(;(r=t.next())&&!r.done;){const c=r.value;n.call(e,c[0],c[1])}},o_=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},s_=ao("HTMLFormElement"),a_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,t,r){return t.toUpperCase()+r}),{propertyIsEnumerable:l_}=Object.prototype,c_=ao("RegExp"),km=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};Pl(t,(c,u)=>{let g;(g=n(c,u,e))!==!1&&(r[u]=g||c)}),Object.defineProperties(e,r)},u_=e=>{km(e,(n,t)=>{if(ki(e)&&["arguments","caller","callee"].includes(t))return!1;const r=e[t];if(ki(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},h_=(e,n)=>{const t={},r=c=>{c.forEach(u=>{t[u]=!0})};return ia(e)?r(e):r(String(e).split(n)),t},d_=()=>{},f_=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function p_(e){return!!(e&&ki(e.append)&&e[pm]==="FormData"&&e[Ol])}const g_=e=>{const n=new WeakSet,t=r=>{if(Ha(r)){if(n.has(r))return;if(Wa(r))return r;if(!("toJSON"in r)){n.add(r);let c;if(jk(r)){c=[];for(const u of r){const g=t(u);!oa(g)&&c.push(g)}}else c=ia(r)?[]:{},Pl(r,(u,g)=>{const v=t(u);!oa(v)&&(c[g]=v)});return n.delete(r),c}}return r};return t(e)},m_=ao("AsyncFunction"),v_=e=>e&&(Ha(e)||ki(e))&&ki(e.then)&&ki(e.catch),_m=((e,n)=>e?setImmediate:n?((t,r)=>(sa.addEventListener("message",({source:c,data:u})=>{c===sa&&u===t&&r.length&&r.shift()()},!1),c=>{r.push(c),sa.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",ki(sa.postMessage)),y_=typeof queueMicrotask<"u"?queueMicrotask.bind(sa):typeof process<"u"&&process.nextTick||_m,Am=e=>e!=null&&ki(e[Ol]),b_=e=>e!=null&&Dl(e,Ol)&&Am(e),me={isArray:ia,isArrayBuffer:vm,isBuffer:Wa,isFormData:Uk,isArrayBufferView:Mk,isString:Rk,isNumber:ym,isBoolean:Lk,isObject:Ha,isPlainObject:Gc,isEmptyObject:Ok,isReadableStream:Gk,isRequest:qk,isResponse:Yk,isHeaders:Kk,isUndefined:oa,isDate:Nk,isFile:Dk,isReactNativeBlob:Pk,isReactNative:zk,isBlob:Bk,isRegExp:c_,isFunction:ki,isStream:Wk,isURLSearchParams:Vk,isTypedArray:r_,isFileList:Fk,forEach:Pl,merge:Kh,extend:Qk,trim:Jk,stripBOM:Zk,inherits:Xk,toFlatObject:e_,kindOf:Yh,kindOfTest:ao,endsWith:t_,toArray:n_,forEachEntry:i_,matchAll:o_,isHTMLForm:s_,hasOwnProperty:Nl,hasOwnProp:Nl,hasOwnInPrototypeChain:Dl,getSafeProp:Ek,toSafeFlatObject:Ik,reduceDescriptors:km,freezeMethods:u_,toObjectSet:h_,toCamelCase:a_,noop:d_,toFiniteNumber:f_,findKey:xm,global:sa,isContextDefined:Cm,isSpecCompliantForm:p_,toJSONObject:g_,isAsyncFn:m_,isThenable:v_,setImmediate:_m,asap:y_,isIterable:Am,isSafeIterable:b_},w_=me.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),x_=e=>{const n={};let t,r,c;return e&&e.split(`
2
+ `).forEach(function(u){c=u.indexOf(":"),t=u.substring(0,c).trim().toLowerCase(),r=u.substring(c+1).trim();const g=me.hasOwnProp(n,t);!t||g&&me.hasOwnProp(w_,t)||(t==="set-cookie"?g?n[t].push(r):n[t]=[r]:n[t]=g?n[t]+", "+r:r)}),n};function C_(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}const k_=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),__=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Jh(e,n){return me.isArray(e)?e.map(t=>Jh(t,n)):C_(String(e).replace(n,""))}const A_=e=>Jh(e,k_),$_=e=>Jh(e,__);function $m(e){const n=Object.create(null);return me.forEach(e.toJSON(),(t,r)=>{n[r]=$_(t)}),n}const Sm=Symbol("internals");function zl(e){return e&&String(e).trim().toLowerCase()}function qc(e){return e===!1||e==null?e:me.isArray(e)?e.map(qc):A_(String(e))}function S_(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const T_=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Qh(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}function E_(e){const n=e.length-1;if(n<1||e.charCodeAt(0)!==34||e.charCodeAt(n)!==34)return e;let t="";for(let r=1;r<n;r++){const c=e.charCodeAt(r);if(c===34||c===92&&(r+=1,r>=n))return e;t+=e[r]}return t}function I_(e){const n=Object.create(null),t=String(e);let r=0,c=!1,u=!1;function g(v){const s=Qh(t.slice(r,v)),d=s.indexOf("=");if(d<1)return;const a=Qh(s.slice(0,d));if(!T_.test(a))return;const l=a.toLowerCase();if(l==="__proto__"||l==="constructor"||l==="prototype")return;const h=Qh(s.slice(d+1));n[l]=E_(h)}for(let v=0;v<t.length;v++){const s=t.charCodeAt(v);c?u?u=!1:s===92?u=!0:s===34&&(c=!1):s===34?c=!0:(s===44||s===59)&&(g(v),r=v+1)}return g(t.length),n}const M_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Zh(e,n,t,r,c){if(me.isFunction(r))return r.call(this,n,t);if(c&&(n=t),!!me.isString(n)){if(me.isString(r))return n.indexOf(r)!==-1;if(me.isRegExp(r))return r.test(n)}}function R_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function L_(e,n){const t=me.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{__proto__:null,value:function(c,u,g){return this[r].call(this,n,c,u,g)},configurable:!0})})}let Yr=class{constructor(n){n&&this.set(n)}set(n,t,r){const c=this;function u(v,s,d){const a=zl(s);if(!a)return;const l=me.findKey(c,a);(!l||c[l]===void 0||d===!0||d===void 0&&c[l]!==!1)&&(c[l||s]=qc(v))}const g=(v,s)=>me.forEach(v,(d,a)=>u(d,a,s));if(me.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(me.isString(n)&&(n=n.trim())&&!M_(n))g(x_(n),t);else if(me.isObject(n)&&me.isSafeIterable(n)){let v=Object.create(null),s,d;for(const a of n){if(!me.isArray(a))throw new TypeError("Object iterator must return a key-value pair");d=a[0],me.hasOwnProp(v,d)?(s=v[d],v[d]=me.isArray(s)?[...s,a[1]]:[s,a[1]]):v[d]=a[1]}g(v,t)}else n!=null&&u(t,n,r);return this}get(n,t){if(n=zl(n),n){const r=me.findKey(this,n);if(r){const c=this[r];if(!t)return c;if(t===!0)return S_(c);if(me.isFunction(t))return t.call(this,c,r);if(me.isRegExp(t))return t.exec(c);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=zl(n),n){const r=me.findKey(this,n);return!!(r&&this[r]!==void 0&&(!t||Zh(this,this[r],r,t)))}return!1}delete(n,t){const r=this;let c=!1;function u(g){if(g=zl(g),g){const v=me.findKey(r,g);v&&(!t||Zh(r,r[v],v,t))&&(delete r[v],c=!0)}}return me.isArray(n)?n.forEach(u):u(n),c}clear(n){const t=Object.keys(this);let r=t.length,c=!1;for(;r--;){const u=t[r];(!n||Zh(this,this[u],u,n,!0))&&(delete this[u],c=!0)}return c}normalize(n){const t=this,r={};return me.forEach(this,(c,u)=>{const g=me.findKey(r,u);if(g){t[g]=qc(c),delete t[u];return}const v=n?R_(u):String(u).trim();v!==u&&delete t[u],t[v]=qc(c),r[v]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return me.forEach(this,(r,c)=>{r!=null&&r!==!1&&(t[c]=n&&me.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
3
+ `)}getSetCookie(){const n=this.get("set-cookie");return me.isArray(n)?n:n==null||n===!1?[]:[n]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static parseParameters(n){return I_(n)}static concat(n,...t){const r=new this(n);return t.forEach(c=>r.set(c)),r}static accessor(n){const t=(this[Sm]=this[Sm]={accessors:{}}).accessors,r=this.prototype;function c(u){const g=zl(u);t[g]||(L_(r,u),t[g]=!0)}return me.isArray(n)?n.forEach(c):c(n),this}};Yr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),me.reduceDescriptors(Yr.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),me.freezeMethods(Yr);const Yc="[REDACTED ****]";function O_(e){if(me.hasOwnProp(e,"toJSON"))return!0;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;){if(me.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function N_(e,n){const t=new Set(n.map(u=>String(u).toLowerCase())),r=[],c=u=>{if(u===null||typeof u!="object"||me.isBuffer(u))return u;if(r.indexOf(u)!==-1)return;u instanceof Yr&&(u=u.toJSON()),r.push(u);let g;if(me.isArray(u))g=[],u.forEach((v,s)=>{const d=c(v);me.isUndefined(d)||(g[s]=d)});else{if(!me.isPlainObject(u)&&O_(u))return r.pop(),u;g=Object.create(null);for(const[v,s]of Object.entries(u)){const d=t.has(v.toLowerCase())?Yc:c(s);me.isUndefined(d)||(g[v]=d)}}return r.pop(),g};return c(e)}function Tm(e){try{return String(e)}catch{return""}}function D_(e){return e.errors.map(n=>{try{return n&&n.message?Tm(n.message):Tm(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let tt=class sk extends Error{static from(n,t,r,c,u,g){let v=n.message;!v&&me.isArray(n.errors)&&n.errors.length&&(v=D_(n));const s=new sk(v,t||n.code,r,c,u);return Object.defineProperty(s,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),s.name=n.name,n.status!=null&&s.status==null&&(s.status=n.status),g&&Object.assign(s,g),s}constructor(n,t,r,c,u){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),c&&(this.request=c),u&&(this.response=u,this.status=u.status)}toJSON(){const n=this.config,t=n&&me.hasOwnProp(n,"redact")?n.redact:void 0,r=me.isArray(t)&&t.length>0?N_(n,t):me.toJSONObject(n);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",tt.ERR_BAD_OPTION="ERR_BAD_OPTION",tt.ECONNABORTED="ECONNABORTED",tt.ETIMEDOUT="ETIMEDOUT",tt.ECONNREFUSED="ECONNREFUSED",tt.ERR_NETWORK="ERR_NETWORK",tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",tt.ERR_DEPRECATED="ERR_DEPRECATED",tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",tt.ERR_CANCELED="ERR_CANCELED",tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",tt.ERR_INVALID_URL="ERR_INVALID_URL",tt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const P_=null,Em=100;function Xh(e){return me.isPlainObject(e)||me.isArray(e)}function Im(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function ed(e,n,t){return e?e.concat(n).map(function(r,c){return r=Im(r),!t&&c?"["+r+"]":r}).join(t?".":""):n}function z_(e){return me.isArray(e)&&!e.some(Xh)}const B_=me.toFlatObject(me,{},null,function(e){return/^is[A-Z]/.test(e)});function Kc(e,n,t){if(!me.isObject(e))throw new TypeError("target must be an object");n=n||new FormData;const r=(x,R)=>{const T=me.getSafeProp(t,x);return me.isUndefined(T)?R:T},c=r("metaTokens",!0),u=r("visitor")||f,g=r("dots",!1),v=r("indexes",!1),s=r("Blob")||typeof Blob<"u"&&Blob,d=r("maxDepth",Em),a=s&&me.isSpecCompliantForm(n),l=[];if(!me.isFunction(u))throw new TypeError("visitor must be a function");function h(x){if(x===null)return"";if(me.isDate(x))return x.toISOString();if(me.isBoolean(x))return x.toString();if(!a&&me.isBlob(x))throw new tt("Blob is not supported. Use a Buffer instead.");if(me.isArrayBuffer(x)||me.isTypedArray(x)){if(a&&typeof s=="function")return new s([x]);throw new tt("Blob is not supported. Use a Buffer instead.",tt.ERR_NOT_SUPPORT)}return x}function p(x){if(x>d)throw new tt("Object is too deeply nested ("+x+" levels). Max depth: "+d,tt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function o(x,R){if(d===1/0)return JSON.stringify(x);const T=[];return JSON.stringify(x,function(_,C){if(!me.isObject(C))return C;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(C),p(R+T.length-1),C})}function f(x,R,T){let _=x;if(me.isReactNative(n)&&me.isReactNativeBlob(x))return n.append(ed(T,R,g),h(x)),!1;if(x&&!T&&typeof x=="object"){if(me.endsWith(R,"{}"))R=c?R:R.slice(0,-2),x=o(x,1);else if(me.isArray(x)&&z_(x)||(me.isFileList(x)||me.endsWith(R,"[]"))&&(_=me.toArray(x)))return R=Im(R),_.forEach(function(C,P){!(me.isUndefined(C)||C===null)&&n.append(v===!0?ed([R],P,g):v===null?R:R+"[]",h(C))}),!1}return Xh(x)?!0:(n.append(ed(T,R,g),h(x)),!1)}const m=Object.assign(B_,{defaultVisitor:f,convertValue:h,isVisitable:Xh});function w(x,R,T=0){if(!me.isUndefined(x)){if(p(T),l.indexOf(x)!==-1)throw new Error("Circular reference detected in "+R.join("."));l.push(x),me.forEach(x,function(_,C){(!(me.isUndefined(_)||_===null)&&u.call(n,_,me.isString(C)?C.trim():C,R,m))===!0&&w(_,R?R.concat(C):[C],T+1)}),l.pop()}}if(!me.isObject(e))throw new TypeError("data must be an object");return w(e),n}function Mm(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(t){return n[t]})}function td(e,n){this._pairs=[],e&&Kc(e,this,n)}const Rm=td.prototype;Rm.append=function(e,n){this._pairs.push([e,n])},Rm.toString=function(e){const n=e?t=>e.call(this,t,Mm):Mm;return this._pairs.map(function(t){return n(t[0])+"="+n(t[1])},"").join("&")};function F_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lm(e,n,t){if(!n)return e;e=e||"";const r=me.isFunction(t)?{serialize:t}:t,c=me.getSafeProp(r,"encode")||F_,u=me.getSafeProp(r,"serialize");let g;if(u?g=u(n,r):g=me.isURLSearchParams(n)?n.toString():new td(n,r).toString(c),g){const v=e.indexOf("#");v!==-1&&(e=e.slice(0,v)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}const Bl=Symbol("internals");function Om(e){return e?e.length:0}function Nm(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Fl(e,n){const t=e.handlers,r=Om(t);t!==n.handlersRef?(n.handlersRef=t,n.handlerEntries.clear()):r!==n.handlersLength&&(r?n.handlerEntries.forEach(function(c,u){t[c.index]!==c.handler&&n.handlerEntries.delete(u)}):n.handlerEntries.clear()),n.handlersLength=r}let Dm=class{constructor(){this.handlers=[],this[Bl]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(n,t,r){const c={fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},u=this[Bl];this.handlers==null&&(this.handlers=[]),Fl(this,u);const g=u.nextId++;return this.handlers.push(c),u.handlerEntries.set(g,{handler:c,index:this.handlers.length-1}),u.handlersLength=this.handlers.length,g}eject(n){const t=this[Bl];Fl(this,t);const r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(Nm(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Fl(this,this[Bl]))}forEach(n){const t=this[Bl];Fl(this,t),t.iterationDepth++;try{me.forEach(this.handlers,function(r){r!==null&&n(r)})}finally{--t.iterationDepth||(Fl(this,t),Nm(this.handlers),t.handlersLength=Om(this.handlers))}}};const nd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},j_=typeof URLSearchParams<"u"?URLSearchParams:td,W_=typeof FormData<"u"?FormData:null,H_=typeof Blob<"u"?Blob:null,U_={isBrowser:!0,classes:{URLSearchParams:j_,FormData:W_,Blob:H_},protocols:["http","https","file","blob","url","data"]},rd=typeof window<"u"&&typeof document<"u",id=typeof navigator=="object"&&navigator||void 0,V_=rd&&(!id||["ReactNative","NativeScript","NS"].indexOf(id.product)<0),G_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",q_=rd&&window.location.href||"http://localhost",Y_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rd,hasStandardBrowserEnv:V_,hasStandardBrowserWebWorkerEnv:G_,navigator:id,origin:q_},Symbol.toStringTag,{value:"Module"})),Mr={...Y_,...U_};function K_(e,n){return Kc(e,new Mr.classes.URLSearchParams,{visitor:function(t,r,c,u){return Mr.isNode&&me.isBuffer(t)?(this.append(r,t.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...n})}const Pm=Em;function zm(e){if(e>Pm)throw new tt("FormData field is too deeply nested ("+e+" levels). Max depth: "+Pm,tt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function J_(e){const n=[],t=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=t.exec(e))!==null;)zm(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function Q_(e){const n={},t=Object.keys(e);let r;const c=t.length;let u;for(r=0;r<c;r++)u=t[r],n[u]=e[u];return n}function Bm(e){function n(t,r,c,u){zm(u);let g=t[u++];if(g==="__proto__")return!0;const v=Number.isFinite(+g),s=u>=t.length;return g=!g&&me.isArray(c)?c.length:g,s?(me.hasOwnProp(c,g)?c[g]=me.isArray(c[g])?c[g].concat(r):[c[g],r]:c[g]=r,!v):((!me.hasOwnProp(c,g)||!me.isObject(c[g]))&&(c[g]=[]),n(t,r,c[g],u)&&me.isArray(c[g])&&(c[g]=Q_(c[g])),!v)}if(me.isFormData(e)&&me.isFunction(e.entries)){const t={};return me.forEachEntry(e,(r,c)=>{n(J_(r),c,t,0)}),t}return null}const Fm=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Ua=(e,n)=>e!=null&&me.hasOwnProp(e,n)?e[n]:void 0;function Z_(e,n,t){if(me.isString(e))try{return(n||JSON.parse)(e),me.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const jl={transitional:nd,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const t=n.getContentType()||"",r=t.indexOf("application/json")>-1,c=me.isObject(e);if(c&&me.isHTMLForm(e)&&(e=new FormData(e)),me.isFormData(e))return r?JSON.stringify(Bm(e)):e;if(me.isArrayBuffer(e)||me.isBuffer(e)||me.isStream(e)||me.isFile(e)||me.isBlob(e)||me.isReadableStream(e))return e;if(me.isArrayBufferView(e))return e.buffer;if(me.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(c){const g=Ua(this,"formSerializer");if(t.indexOf("application/x-www-form-urlencoded")>-1)return K_(e,g).toString();if((u=me.isFileList(e))||t.indexOf("multipart/form-data")>-1){const v=Ua(this,"env"),s=v&&v.FormData;return Kc(u?{"files[]":e}:e,s&&new s,g)}}return c||r?(n.setContentType("application/json",!1),Z_(e)):e}],transformResponse:[function(e){const n=Ua(this,"transitional")||jl.transitional,t=n&&n.forcedJSONParsing,r=Ua(this,"responseType"),c=r==="json";if(me.isResponse(e)||me.isReadableStream(e))return e;if(e&&me.isString(e)&&(t&&!r||c)){const u=!(n&&n.silentJSONParsing)&&c;try{return JSON.parse(e,Ua(this,"parseReviver"))}catch(g){if(u)throw g.name==="SyntaxError"?tt.from(g,tt.ERR_BAD_RESPONSE,this,null,Ua(this,"response")):g}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mr.classes.FormData,Blob:Mr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(Fm,e=>{jl.headers[e]={}});function od(e,n){const t=this||jl,r=n||t,c=Yr.from(r.headers);let u=r.data;return me.forEach(e,function(g){u=g.call(t,u,c.normalize(),n?n.status:void 0)}),c.normalize(),u}function jm(e){return!!(e&&e.__CANCEL__)}let Wl=class extends tt{constructor(n,t,r){super(n??"canceled",tt.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Wm(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new tt("Request failed with status code "+t.status,t.status>=400&&t.status<500?tt.ERR_BAD_REQUEST:tt.ERR_BAD_RESPONSE,t.config,t.request,t))}const X_=/[\t\n\r]/g;function Hm(e){if(typeof e!="string")return e;let n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;return e.slice(n).replace(X_,"")}function sd(e){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return n&&n[1]||""}function eA(e,n){e=e||10;const t=new Array(e),r=new Array(e);let c=0,u=0,g;return n=n!==void 0?n:1e3,function(v){const s=Date.now(),d=r[u];g||(g=s),t[c]=v,r[c]=s;let a=u,l=0;for(;a!==c;)l+=t[a++],a=a%e;if(c=(c+1)%e,c===u&&(u=(u+1)%e),s-g<n)return;const h=d&&s-d;return h?Math.round(l*1e3/h):void 0}}function tA(e,n){let t=0,r=1e3/n,c,u;const g=(v,s=Date.now())=>{t=s,c=null,u&&(clearTimeout(u),u=null),e(...v)};return[(...v)=>{const s=Date.now(),d=s-t;d>=r?g(v,s):(c=v,u||(u=setTimeout(()=>{u=null,g(c)},r-d)))},()=>c&&g(c),(...v)=>g(v)]}const Jc=(e,n,t=3)=>{let r=0;const c=eA(50,250);return tA(u=>{if(!u||!me.isNumber(u.loaded))return;const g=u.loaded,v=u.lengthComputable?u.total:void 0,s=Math.max(0,v!=null?Math.min(g,v):g),d=Math.max(0,s-r),a=c(d);r=Math.max(r,s);const l={loaded:s,total:v,progress:v?s/v:void 0,bytes:d,rate:a||void 0,estimated:a&&v?(v-s)/a:void 0,event:u,lengthComputable:v!=null,[n?"download":"upload"]:!0};e(l)},t)},Um=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},Vm=(e,n=me.asap)=>(...t)=>n(()=>e(...t)),nA=Mr.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,Mr.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(Mr.origin),Mr.navigator&&/(msie|trident)/i.test(Mr.navigator.userAgent)):()=>!0,rA=Mr.hasStandardBrowserEnv?{write(e,n,t,r,c,u,g){if(typeof document>"u")return;const v=[`${e}=${encodeURIComponent(n)}`];me.isNumber(t)&&v.push(`expires=${new Date(t).toUTCString()}`),me.isString(r)&&v.push(`path=${r}`),me.isString(c)&&v.push(`domain=${c}`),u===!0&&v.push("secure"),me.isString(g)&&v.push(`SameSite=${g}`),document.cookie=v.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let t=0;t<n.length;t++){const r=n[t].replace(/^\s+/,""),c=r.indexOf("=");if(c!==-1&&r.slice(0,c)===e)try{return decodeURIComponent(r.slice(c+1))}catch{return r.slice(c+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function iA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function oA(e,n){if(!n)return e;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return e.slice(0,t)+"/"+n.replace(/^\/+/,"")}const sA=/^https?:(?!\/\/)/i;function aA(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(n,t,r="")=>`${t}${r}${Yc}`)}function lA(e){const n=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Yc}@`),t=n.indexOf("#"),r=(t===-1?n:n.slice(0,t)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Yc}`);return t===-1?r:`${r}#${aA(n.slice(t+1))}`}function Gm(e,n){if(typeof e=="string"){const t=Hm(e);if(sA.test(t))throw new tt(`Invalid URL ${JSON.stringify(lA(t))}: missing "//" after protocol`,tt.ERR_INVALID_URL,n)}}function qm(e,n,t,r){Gm(n,r);let c=!iA(n);return e&&(c||t===!1)?(Gm(e,r),oA(e,n)):n}const Ym=e=>e instanceof Yr?{...e}:e,cA=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(n=>Object.getOwnPropertyDescriptor(e,n).enumerable)):Object.keys(e);function aa(e,n){e=e||{},n=n||{};const t=Object.create(null);Object.defineProperty(t,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(a,l,h,p){return me.isPlainObject(a)&&me.isPlainObject(l)?me.merge.call({caseless:p},a,l):me.isPlainObject(l)?me.merge({},l):me.isArray(l)?l.slice():l}function c(a,l,h,p){if(me.isUndefined(l)){if(!me.isUndefined(a))return r(void 0,a,h,p)}else return r(a,l,h,p)}function u(a,l){if(!me.isUndefined(l))return r(void 0,l)}function g(a,l){if(me.isUndefined(l)){if(!me.isUndefined(a))return r(void 0,a)}else return r(void 0,l)}function v(a){const l=me.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!me.isUndefined(l))if(me.isPlainObject(l)){if(me.hasOwnProp(l,a))return l[a]}else return;const h=me.hasOwnProp(e,"transitional")?e.transitional:void 0;if(me.isPlainObject(h)&&me.hasOwnProp(h,a))return h[a]}function s(a,l,h){if(me.hasOwnProp(n,h))return r(a,l);if(me.hasOwnProp(e,h))return r(void 0,a)}const d={url:u,method:u,data:u,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutErrorMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:s,headers:(a,l,h)=>c(Ym(a),Ym(l),h,!0)};return me.forEach(cA({...e,...n}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=me.hasOwnProp(d,a)?d[a]:c,h=me.hasOwnProp(e,a)?e[a]:void 0,p=me.hasOwnProp(n,a)?n[a]:void 0,o=l(h,p,a);me.isUndefined(o)&&l!==s||(t[a]=o)}),me.hasOwnProp(n,"validateStatus")&&me.isUndefined(n.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(me.hasOwnProp(e,"validateStatus")?t.validateStatus=r(void 0,e.validateStatus):delete t.validateStatus),t}const uA=["content-type","content-length"];function hA(e,n,t){if(t!=="content-only"){e.set(n);return}Object.entries(n||{}).forEach(([r,c])=>{uA.includes(r.toLowerCase())&&e.set(r,c)})}const dA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16)));function Km(e){const n=aa({},e),t=h=>me.hasOwnProp(n,h)?n[h]:void 0,r=t("data");let c=t("withXSRFToken");const u=t("xsrfHeaderName"),g=t("xsrfCookieName");let v=t("headers");const s=t("auth"),d=t("baseURL"),a=t("allowAbsoluteUrls"),l=t("url");if(n.headers=v=Yr.from(v),n.url=Lm(qm(d,l,a,n),t("params"),t("paramsSerializer")),s){const h=me.getSafeProp(s,"username")||"",p=me.getSafeProp(s,"password")||"";try{v.set("Authorization","Basic "+btoa(h+":"+(p?dA(p):"")))}catch(o){throw tt.from(o,tt.ERR_BAD_OPTION_VALUE,e)}}if(me.isFormData(r)){const h=me.getSafeProp(r,"getHeaders");Mr.hasStandardBrowserEnv||Mr.hasStandardBrowserWebWorkerEnv||me.isReactNative(r)?v.setContentType(void 0):me.isFunction(h)&&hA(v,h.call(r),t("formDataHeaderPolicy"))}if(Mr.hasStandardBrowserEnv&&(me.isFunction(c)&&(c=c(n)),c===!0||c==null&&nA(n.url))){const h=u&&g&&rA.read(g);h&&v.set(u,h)}return n}const fA=typeof XMLHttpRequest<"u",pA=fA&&function(e){return new Promise(function(n,t){const r=Km(e);let c=r.data;const u=Yr.from(r.headers).normalize();let{responseType:g,onUploadProgress:v,onDownloadProgress:s}=r,d,a,l,h,p,o;function f(){h&&h(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function w(R){if(!m)return;if(m.status===0&&(sd(Hm(r.url))||sd(Mr.origin))!=="file"&&!(m.responseURL&&m.responseURL.startsWith("file:"))){t(new tt("Request aborted",tt.ECONNABORTED,e,m)),f(),m=null;return}try{R?o&&o(R):p&&p()}catch(C){setTimeout(()=>{throw C})}if(!m)return;const T=Yr.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!g||g==="text"||g==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:e,request:m};Wm(function(C){n(C),f()},function(C){t(C),f()},_),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(w)},m.onabort=function(){m&&(t(new tt("Request aborted",tt.ECONNABORTED,e,m)),f(),m=null)},m.onerror=function(R){const T=R&&R.message?R.message:"Network Error",_=new tt(T,tt.ERR_NETWORK,e,m);_.event=R||null,t(_),f(),m=null},m.ontimeout=function(){let R=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||nd;r.timeoutErrorMessage&&(R=r.timeoutErrorMessage),t(new tt(R,T.clarifyTimeoutError?tt.ETIMEDOUT:tt.ECONNABORTED,e,m)),f(),m=null},c===void 0&&u.setContentType(null),"setRequestHeader"in m&&me.forEach($m(u),function(R,T){m.setRequestHeader(T,R)}),me.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),g&&g!=="json"&&(m.responseType=r.responseType),s&&([l,p,o]=Jc(s,!0),m.addEventListener("progress",l)),v&&m.upload&&([a,h]=Jc(v),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(d=R=>{m&&(t(!R||R.type?new Wl(null,e,m):R),m.abort(),f(),m=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const x=sd(r.url);if(x&&!Mr.protocols.includes(x)){t(new tt("Unsupported protocol "+x+":",tt.ERR_BAD_REQUEST,e)),f();return}m.send(c||null)})},gA=(e,n)=>{if(e=e?e.filter(Boolean):[],!n&&!e.length)return;const t=new AbortController;let r=!1;const c=function(s){if(!r){r=!0,g();const d=s instanceof Error?s:this.reason;t.abort(d instanceof tt?d:new Wl(d instanceof Error?d.message:d))}};let u=n&&setTimeout(()=>{u=null,c(new tt(`timeout of ${n}ms exceeded`,tt.ETIMEDOUT))},n);const g=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(c):s.removeEventListener("abort",c)}),e=null)};e.forEach(s=>{if(!r){if(s.aborted){c.call(s);return}s.addEventListener("abort",c,{once:!0})}});const{signal:v}=t;return v.unsubscribe=()=>me.asap(g),v},mA=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,c;for(;r<t;)c=r+n,yield e.slice(r,c),r=c},vA=async function*(e,n){for await(const t of yA(e))yield*mA(t,n)},yA=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},Jm=(e,n,t,r)=>{const c=vA(e,n);let u=0,g,v=s=>{g||(g=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:d,value:a}=await c.next();if(d){v(),s.close();return}let l=a.byteLength;if(t){let h=u+=l;t(h)}s.enqueue(new Uint8Array(a))}catch(d){throw v(d),d}},cancel(s){return v(s),c.return()}},{highWaterMark:2})},Qm=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Zm=(e,n,t)=>n+2<t&&Qm(e.charCodeAt(n+1))&&Qm(e.charCodeAt(n+2)),Xm=e=>e<=57?e-48:(e&223)-55,bA=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,wA=e=>e===9||e===10||e===12||e===13||e===32,xA=e=>{const n=Math.floor(e/4),t=e%4;return n*3+(t===2?1:t===3?2:0)},CA=e=>{const n=e.length;let t=0;return n>0&&e.charCodeAt(n-1)===61&&(t++,n>1&&e.charCodeAt(n-2)===61&&t++),Math.floor((n-t)*3/4)},kA=e=>{const n=e.length;let t=0,r=0,c=!1;for(let u=0;u<n;u++){let g=e.charCodeAt(u);if(g===37&&Zm(e,u,n)&&(g=Xm(e.charCodeAt(u+1))*16+Xm(e.charCodeAt(u+2)),u+=2),!wA(g)){if(g===61){r++;continue}if(!bA(g)||r>0){c=!0;continue}t++}}return c||r>2||r>0&&(t+r)%4!==0||t%4===1?CA(e):xA(t)},_A=(e,n)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),c=e.slice(t+1);if(/;base64/i.test(r))return n(c);let u=0;for(let g=0,v=c.length;g<v;g++){const s=c.charCodeAt(g);if(s===37&&Zm(c,g,v))u+=1,g+=2;else if(s<128)u+=1;else if(s<2048)u+=2;else if(s>=55296&&s<=56319&&g+1<v){const d=c.charCodeAt(g+1);d>=56320&&d<=57343?(u+=4,g++):u+=3}else u+=3}return u};function AA(e){const n=typeof e=="string"?e.indexOf("#"):-1;return _A(n===-1?e:e.slice(0,n),kA)}const ad="1.20.0",ev=64*1024,$A={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Qc}=me,SA=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16))),tv=e=>{if(!me.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},nv=(e,...n)=>{try{return!!e(...n)}catch{return!1}},TA=e=>{const n=e.indexOf("://");let t=e;return n!==-1&&(t=t.slice(n+3)),t.includes("@")||t.includes(":")},EA=e=>{const n=me.global!==void 0&&me.global!==null?me.global:globalThis,{ReadableStream:t,TextEncoder:r}=n;e=me.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},e);const{fetch:c,Request:u,Response:g}=e,v=c?Qc(c):typeof fetch=="function",s=Qc(u),d=Qc(g);if(!v)return!1;const a=v&&Qc(t),l=v&&(typeof r=="function"?(w=>x=>w.encode(x))(new r):async w=>new Uint8Array(await new u(w).arrayBuffer())),h=s&&a&&nv(()=>{let w=!1;const x=new u(Mr.origin,{body:new t,method:"POST",get duplex(){return w=!0,"half"}}),R=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),w&&!R}),p=d&&a&&nv(()=>me.isReadableStream(new g("").body)),o={stream:p&&(w=>w.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!o[w]&&(o[w]=(x,R)=>{let T=x&&x[w];if(T)return T.call(x);throw new tt(`Response type '${w}' is not supported`,tt.ERR_NOT_SUPPORT,R)})});const f=async w=>{if(w==null)return 0;if(me.isBlob(w))return w.size;if(me.isSpecCompliantForm(w))return(await new u(Mr.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(me.isArrayBufferView(w)||me.isArrayBuffer(w))return w.byteLength;if(me.isURLSearchParams(w)&&(w=w+""),me.isString(w))return(await l(w)).byteLength},m=async(w,x)=>me.toFiniteNumber(w.getContentLength())??f(x);return async w=>{let{url:x,method:R,data:T,signal:_,cancelToken:C,timeout:P,onDownloadProgress:O,onUploadProgress:E,responseType:k,headers:B,withCredentials:N="same-origin",fetchOptions:M,maxContentLength:$,maxBodyLength:A,maxRedirects:D}=Km(w);const j=me.isNumber($)&&$>-1,U=me.isNumber(A)&&A>-1,q=ee=>me.hasOwnProp(w,ee)?w[ee]:void 0;let Q=c||fetch;k=k?(k+"").toLowerCase():"text";let re=gA([_,C&&C.toAbortSignal()],P),le=null;const ne=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let ue,he=null;const oe=()=>new tt("Request body larger than maxBodyLength limit",tt.ERR_BAD_REQUEST,w,le);try{let ee;const ye=q("auth");if(ye){const Ie=me.getSafeProp(ye,"username")||"",Ct=me.getSafeProp(ye,"password")||"";ee={username:Ie,password:Ct}}if(TA(x)){const Ie=new URL(x,Mr.origin);if(!ee&&(Ie.username||Ie.password)){const Ct=tv(Ie.username),St=tv(Ie.password);ee={username:Ct,password:St}}(Ie.username||Ie.password)&&(Ie.username="",Ie.password="",x=Ie.href)}if(ee&&(B.delete("authorization"),B.set("Authorization","Basic "+btoa(SA((ee.username||"")+":"+(ee.password||""))))),j&&typeof x=="string"&&x.startsWith("data:")&&AA(x)>$)throw new tt("maxContentLength size of "+$+" exceeded",tt.ERR_BAD_RESPONSE,w,le);if(U&&R!=="get"&&R!=="head"){const Ie=await f(T);if(typeof Ie=="number"&&isFinite(Ie)&&(ue=Ie,Ie>A))throw oe()}const we=U&&(me.isReadableStream(T)||me.isStream(T)),Ae=(Ie,Ct,St)=>Jm(Ie,ev,qt=>{if(U&&qt>A)throw he=oe();Ct&&Ct(qt)},St);if(h&&R!=="get"&&R!=="head"&&(E||we)){if(ue=ue??await m(B,T),ue!==0||we){let Ie=new u(x,{method:"POST",body:T,duplex:"half"}),Ct;if(me.isFormData(T)&&(Ct=Ie.headers.get("content-type"))&&B.setContentType(Ct),Ie.body){const[St,qt]=E&&Um(ue,Jc(Vm(E)))||[];T=Ae(Ie.body,St,qt)}}}else if(we&&!s&&a&&R!=="get"&&R!=="head")T=Ae(T);else if(we&&s&&!h&&R!=="get"&&R!=="head")throw new tt("Stream request bodies are not supported by the current fetch implementation",tt.ERR_NOT_SUPPORT,w,le);me.isString(N)||(N=N?"include":"omit");const Je=s&&"credentials"in u.prototype;if(me.isFormData(T)){const Ie=B.getContentType();Ie&&/^multipart\/form-data/i.test(Ie)&&!/boundary=/i.test(Ie)&&B.delete("content-type")}B.set("User-Agent","axios/"+ad,!1);const Be=M==null?M:Object.assign(Object.create(null),M);Be&&(delete Be.body,delete Be.headers,delete Be.method,delete Be.signal,delete Be.duplex,delete Be.credentials);const Ye=Object.assign(Object.create(null),Be,{signal:re,method:R.toUpperCase(),headers:$m(B.normalize()),body:T,duplex:"half",credentials:Je?N:void 0});s&&(me.forEach($A,(Ie,Ct)=>{Ye[Ct]===void 0&&(Ye[Ct]=Ie)}),Ye.signal===void 0&&(Ye.signal=null),Ye.body===void 0&&(Ye.body=null)),D===0&&(Ye.redirect="manual",Be&&(Be.redirect="manual")),le=s&&new u(x,Ye);let Ze=await(s?Q(le,Be):Q(x,Ye));const lt=Yr.from(Ze.headers);if(j){const Ie=me.toFiniteNumber(lt.getContentLength());if(Ie!=null&&Ie>$)throw new tt("maxContentLength size of "+$+" exceeded",tt.ERR_BAD_RESPONSE,w,le)}const ct=p&&(k==="stream"||k==="response");if(p&&Ze.body&&(O||j||ct&&ne)){const Ie={};["status","statusText","headers"].forEach(pt=>{Ie[pt]=Ze[pt]});const Ct=me.toFiniteNumber(lt.getContentLength()),[St,qt]=O&&Um(Ct,Jc(Vm(O),!0))||[];let dn=0;const Sn=pt=>{if(j&&(dn=pt,dn>$))throw new tt("maxContentLength size of "+$+" exceeded",tt.ERR_BAD_RESPONSE,w,le);St&&St(pt)};Ze=new g(Jm(Ze.body,ev,Sn,()=>{qt&&qt(),ne&&ne()}),Ie)}k=k||"text";let jt=await o[me.findKey(o,k)||"text"](Ze,w);if(j&&!p&&!ct){let Ie;if(jt!=null&&(typeof jt.byteLength=="number"?Ie=jt.byteLength:typeof jt.size=="number"?Ie=jt.size:typeof jt=="string"&&(Ie=typeof r=="function"?new r().encode(jt).byteLength:jt.length)),typeof Ie=="number"&&Ie>$)throw new tt("maxContentLength size of "+$+" exceeded",tt.ERR_BAD_RESPONSE,w,le)}return!ct&&ne&&ne(),await new Promise((Ie,Ct)=>{Wm(Ie,Ct,{data:jt,headers:Yr.from(Ze.headers),status:Ze.status,statusText:Ze.statusText,config:w,request:le})})}catch(ee){if(ne&&ne(),re&&re.aborted&&re.reason instanceof tt){const ye=re.reason;throw ye.config=w,le&&(ye.request=le),ee!==ye&&Object.defineProperty(ye,"cause",{__proto__:null,value:ee,writable:!0,enumerable:!1,configurable:!0}),ye}if(he)throw le&&!he.request&&(he.request=le),he;if(ee instanceof tt)throw le&&!ee.request&&(ee.request=le),ee;if(ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)){const ye=new tt("Network Error",tt.ERR_NETWORK,w,le,ee&&ee.response);throw Object.defineProperty(ye,"cause",{__proto__:null,value:ee.cause||ee,writable:!0,enumerable:!1,configurable:!0}),ye}throw tt.from(ee,ee&&ee.code,w,le,ee&&ee.response)}}},IA=new Map,rv=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:c}=n,u=[r,c,t];let g=u.length,v=g,s,d,a=IA;for(;v--;)s=u[v],d=a.get(s),d===void 0&&a.set(s,d=v?new Map:EA(n)),a=d;return d};rv();const ld={http:P_,xhr:pA,fetch:{get:rv}};me.forEach(ld,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:n})}});const iv=e=>`- ${e}`,MA=e=>me.isFunction(e)||e===null||e===!1;function RA(e,n){e=me.isArray(e)?e:[e];const{length:t}=e;let r,c;const u={};for(let g=0;g<t;g++){r=e[g];let v;if(c=r,!MA(r)&&(c=ld[(v=String(r)).toLowerCase()],c===void 0))throw new tt(`Unknown adapter '${v}'`);if(c&&(me.isFunction(c)||(c=c.get(n))))break;u[v||"#"+g]=c}if(!c){const g=Object.entries(u).map(([s,d])=>`adapter ${s} `+(d===!1?"is not supported by the environment":"is not available in the build"));let v=t?g.length>1?`since :
4
+ `+g.map(iv).join(`
5
+ `):" "+iv(g[0]):"as no adapter specified";throw new tt("There is no suitable adapter to dispatch the request "+v,tt.ERR_NOT_SUPPORT)}return c}const ov={getAdapter:RA,adapters:ld};function cd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wl(null,e)}function ud(e){const n=me.toSafeFlatObject(e);return cd(n),n.headers=Yr.from(me.getSafeProp(n,"headers")),n.data=od.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),ov.getAdapter(n.adapter||jl.adapter,n)(n).then(function(t){cd(n),n.response=t;try{t.data=od.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Yr.from(t.headers),t},function(t){if(!jm(t)&&(cd(n),t&&t.response)){n.response=t.response;try{t.response.data=od.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Yr.from(t.response.headers)}return Promise.reject(t)})}const Zc={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{Zc[e]=function(t){return typeof t===e||"a"+(n<1?"n ":" ")+e}});const sv={};Zc.transitional=function(e,n,t){function r(c,u){return"[Axios v"+ad+"] Transitional option '"+c+"'"+u+(t?". "+t:"")}return(c,u,g)=>{if(e===!1)throw new tt(r(u," has been removed"+(n?" in "+n:"")),tt.ERR_DEPRECATED);return n&&!sv[u]&&(sv[u]=!0,console.warn(r(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(c,u,g):!0}},Zc.spelling=function(e){return(n,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function LA(e,n,t){if(typeof e!="object"||e===null)throw new tt("options must be an object",tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let c=r.length;for(;c-- >0;){const u=r[c],g=Object.prototype.hasOwnProperty.call(n,u)?n[u]:void 0;if(g){const v=e[u],s=v===void 0||g(v,u,e);if(s!==!0)throw new tt("option "+u+" must be "+s,tt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new tt("Unknown option "+u,tt.ERR_BAD_OPTION)}}const Xc={assertOptions:LA,validators:Zc},Kr=Xc.validators;let la=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Dm,response:new Dm}}async request(n,t){try{return await this._request(n,t)}catch(r){if(r instanceof Error)try{let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const u=c.stack;let g="";if(typeof u=="string"){const v=u.indexOf(`
6
+ `);g=v===-1?"":u.slice(v+1)}if(!r.stack)r.stack=g;else if(g){const v=g.indexOf(`
7
+ `),s=v===-1?-1:g.indexOf(`
8
+ `,v+1),d=s===-1?"":g.slice(s+1);String(r.stack).endsWith(d)||(r.stack+=`
9
+ `+g)}}catch{}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=aa(this.defaults,t);const{transitional:r,paramsSerializer:c,headers:u}=t;r!==void 0&&Xc.assertOptions(r,{silentJSONParsing:Kr.transitional(Kr.boolean),forcedJSONParsing:Kr.transitional(Kr.boolean),clarifyTimeoutError:Kr.transitional(Kr.boolean),legacyInterceptorReqResOrdering:Kr.transitional(Kr.boolean),advertiseZstdAcceptEncoding:Kr.transitional(Kr.boolean),validateStatusUndefinedResolves:Kr.transitional(Kr.boolean)},!1),c!=null&&(me.isFunction(c)?t.paramsSerializer={serialize:c}:Xc.assertOptions(c,{encode:Kr.function,serialize:Kr.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Xc.assertOptions(t,{baseUrl:Kr.spelling("baseURL"),withXsrfToken:Kr.spelling("withXSRFToken")},!0),t.method=(me.getSafeProp(t,"method")||me.getSafeProp(this.defaults,"method")||"get").toLowerCase();let g=u&&me.merge(u.common,u[t.method]);u&&me.forEach(Fm.concat("common"),o=>{delete u[o]}),t.headers=Yr.concat(g,u);const v=[];let s=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(t)===!1)return;s=s&&o.synchronous;const f=t.transitional||nd;f&&f.legacyInterceptorReqResOrdering?v.unshift(o.fulfilled,o.rejected):v.push(o.fulfilled,o.rejected)});const d=[];this.interceptors.response.forEach(function(o){d.push(o.fulfilled,o.rejected)});let a,l=0,h;if(!s){const o=[ud.bind(this),void 0];for(o.unshift(...v),o.push(...d),h=o.length,a=Promise.resolve(t);l<h;)a=a.then(o[l++],o[l++]);return a}h=v.length;let p=t;for(;l<h;){const o=v[l++],f=v[l++];try{p=o?o(p):p}catch(m){if(!f){a=Promise.reject(m);break}try{const w=f.call(this,m);me.isThenable(w)&&(a=Promise.resolve(w).then(()=>ud.call(this,p)))}catch(w){a=Promise.reject(w)}break}}if(!a)try{a=ud.call(this,p)}catch(o){a=Promise.reject(o)}for(l=0,h=d.length;l<h;)a=a.then(d[l++],d[l++]);return a}getUri(n){n=aa(this.defaults,n);const t=qm(n.baseURL,n.url,n.allowAbsoluteUrls,n);return Lm(t,n.params,n.paramsSerializer)}};me.forEach(["delete","get","head","options"],function(e){la.prototype[e]=function(n,t){return this.request(aa(t||{},{method:e,url:n,data:t&&me.hasOwnProp(t,"data")?t.data:void 0}))}}),me.forEach(["post","put","patch","query"],function(e){function n(t){return function(r,c,u){return this.request(aa(u||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:c}))}}la.prototype[e]=n(),e!=="query"&&(la.prototype[e+"Form"]=n(!0))});let OA=class ak{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(c){t=c});const r=this;this.promise.then(c=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](c);r._listeners=null}),this.promise.then=c=>{let u;const g=new Promise(v=>{r.subscribe(v),u=v}).then(c);return g.cancel=function(){r.unsubscribe(u)},g},n(function(c,u,g){r.reason||(r.reason=new Wl(c,u,g),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new ak(function(t){n=t}),cancel:n}}};function NA(e){return function(n){return e.apply(null,n)}}function DA(e){return me.isObject(e)&&e.isAxiosError===!0}const eu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(eu).forEach(([e,n])=>{eu[n]===void 0&&(eu[n]=e)});function av(e){const n=new la(e),t=fm(la.prototype.request,n);return me.extend(t,la.prototype,n,{allOwnKeys:!0}),me.extend(t,n,null,{allOwnKeys:!0}),t.create=function(r){return av(aa(e,r))},t}const cr=av(jl);cr.Axios=la,cr.CanceledError=Wl,cr.CancelToken=OA,cr.isCancel=jm,cr.VERSION=ad,cr.toFormData=Kc,cr.AxiosError=tt,cr.Cancel=cr.CanceledError,cr.all=function(e){return Promise.all(e)},cr.spread=NA,cr.isAxiosError=DA,cr.mergeConfig=aa,cr.AxiosHeaders=Yr,cr.formToJSON=e=>Bm(me.isHTMLForm(e)?new FormData(e):e),cr.getAdapter=ov.getAdapter,cr.HttpStatusCode=eu,cr.default=cr;const{Axios:n3,AxiosError:r3,CanceledError:i3,isCancel:o3,CancelToken:s3,VERSION:a3,all:l3,Cancel:c3,isAxiosError:u3,spread:h3,toFormData:d3,AxiosHeaders:f3,HttpStatusCode:p3,formToJSON:g3,getAdapter:m3,mergeConfig:v3,create:y3}=cr;function Hl(e){return e?.name==="AuthRequiredError"}const PA=new Set(["OpenC3::AuthError","OpenC3::ForbiddenError"]);function zA(e){return e?.response?.status===401||e?.status===401||PA.has(e?.name)}function lv(e){!Hl(e)&&!zA(e)&&console.error(e)}let cv=class extends Error{constructor(n="Authentication required"){super(n),this.name="AuthRequiredError"}};globalThis.__openc3AuthRejectionHandler||(globalThis.__openc3AuthRejectionHandler=!0,globalThis.addEventListener?.("unhandledrejection",e=>{Hl(e.reason)&&e.preventDefault()}));let uv=!1;function hv(){uv||(uv=!0,OpenC3Auth.login())}async function hd(){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch(e){throw Hl(e)?e:(hv(),new cv(e?.message))}if(!localStorage.openc3Token)throw hv(),new cv}const dv=200,dd=cr.create({baseURL:location.origin,timeout:6e4,params:{}});dd.interceptors.response.use(e=>e,e=>{if(e.response){if(e.response.config.headers["Ignore-Errors"]&&e.response.config.headers["Ignore-Errors"].includes(e.response.status.toString()))return Promise.reject(e);if(e.response.status===401)return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(u){u&&OpenC3Auth.setTokens()}).catch(lv),Promise.reject(e);const n=e.response?.data?.error?.data?.class;if(n==="HazardousError"||n==="CriticalCmdError")return Promise.reject(e);let t=`HTTP ${e.response.status} - `;e.response?.statusText&&(t+=`${e.response.statusText} `);const r=e.response?.config?.data;typeof r=="string"&&r.length>0&&(r.length>dv?t+=`${r.slice(0,dv)}... `:t+=`${r} `),e.response?.data?.message?t+=`${e.response.data.message}`:e.response?.data?.exception?t+=`${e.response.data.exception}`:e.response?.data?.error?.message?(e.response.data.error.class&&(t+=`${e.response.data.error.class} `),t+=`${e.response.data.error.message}`):t+=`${e.response?.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:t}),e}else throw e});const tu=async function(e,n,{data:t,params:r={},headers:c,noAuth:u=!1,optionalAuth:g=!1,noScope:v=!1,onUploadProgress:s=!1,responseType:d}={}){if(!u)if(g){try{await hd()}catch(a){if(!Hl(a))throw a}localStorage.openc3Token&&(c.Authorization=localStorage.openc3Token)}else await hd(),c.Authorization=localStorage.openc3Token;return c.manual=!0,!v&&!r.scope&&(r.scope=window.openc3Scope),dd({method:e,url:n,data:t,params:r,headers:c,onUploadProgress:s,responseType:d})},fd={Accept:"application/json"},fv={...fd,"Content-Type":"application/json"},b3=ir("E",{get:function(e,{params:n,headers:t=fd,noScope:r,noAuth:c,optionalAuth:u,onUploadProgress:g,responseType:v}={}){return tu("get",e,{params:n,headers:t,noScope:r,noAuth:c,optionalAuth:u,onUploadProgress:g,responseType:v})},put:function(e,{data:n,params:t,headers:r=fv,noScope:c,noAuth:u,onUploadProgress:g}={}){return tu("put",e,{data:n,params:t,headers:r,noScope:c,noAuth:u,onUploadProgress:g})},post:function(e,{data:n,params:t,headers:r=fv,noScope:c,noAuth:u,onUploadProgress:g,responseType:v}={}){return tu("post",e,{data:n,params:t,headers:r,noScope:c,noAuth:u,onUploadProgress:g,responseType:v})},delete:function(e,{params:n,headers:t=fd,noScope:r,noAuth:c,onUploadProgress:u}={}){return tu("delete",e,{params:n,headers:t,noScope:r,noAuth:c,onUploadProgress:u})}});let nu=()=>({emit(e,...n){for(let t=this.events[e]||[],r=0,c=t.length;r<c;r++)t[r](...n)},events:{},on(e,n){return(this.events[e]||=[]).push(n),()=>{this.events[e]=this.events[e]?.filter(t=>n!==t)}}}),Ul=class extends Error{constructor(n,t){n instanceof Error?(super(n.message),this.cause=n):super(n),this.reason=t,this.name="ReasonError"}},pd=class extends Ul{constructor(n){super("Rejected",n),this.name="SubscriptionRejectedError"}},BA=class extends Ul{constructor(n){super(n||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}},Io=class extends Ul{constructor(n,t){t?super(n,t):super("Disconnected",n),this.name="DisconnectedError"}},FA=class extends Io{constructor(n){super(n,"stale_connection"),this.name="StaleConnectionError"}};function pv(e){return e?`{${Object.keys(e).sort().filter(n=>e[n]!==void 0).map(n=>{let t=JSON.stringify(e[n]);return`${JSON.stringify(n)}:${t}`}).join(",")}}`:""}let jA=class{constructor(n){this.channel=n,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",n=>{if(n.type==="info"){this._state||(this._state=this.stateFromInfo(n));return}this._state&&(n.type==="join"?this._state[n.id]=n.info:n.type==="leave"&&delete this._state[n.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(n=>n()),this.listeners.length=0}async join(n,t){if(!this._info)return this._info={id:String(n),info:t},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let n=await this.channel.perform("$presence:leave");return delete this._info,n}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let n=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(n),this._state}finally{delete this._promise}}stateFromInfo(n){return n.records.reduce((t,{id:r,info:c})=>(t[r]=c,t),{})}};const ca=Symbol("state");let gv=class{constructor(n={}){this.emitter=nu(),this.params=Object.freeze(n),this.presence=new jA(this),this.initialConnect=!0,this[ca]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=pv({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ca]}attached(n){if(this.receiver){if(this.receiver!==n)throw Error("Already connected to a different receiver");return!1}return this.receiver=n,!0}connecting(){this[ca]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ca]="connected";let n=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(){if(this.state==="connected")throw Error("Already connected");this[ca]="connected";let n=!0,t=!0;this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:n})}disconnected(n){this.state==="disconnected"||this.state==="closed"||(this[ca]="disconnected",this.presence.reset(),this.emit("disconnect",n))}closed(n){this.state!=="closed"&&(this[ca]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",n))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(n,t){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,n,t)}async send(n){return this.perform(void 0,n)}async whisper(n){try{await this.perform("$whisper",n)}catch(t){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",t)}}receive(n,t){this.emit("message",n,t)}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...c)=>{r(),t(...c)});return r}emit(n,...t){return this.emitter.emit(n,...t)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((n,t)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(c=>c()),n()})),r.push(this.on("close",c=>{r.forEach(u=>u()),t(c||new Ul("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}},WA=class{constructor(n){this.id=n,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(n){this.channels.includes(n)||this.channels.push(n)}remove(n){let t=this.channels.indexOf(n);t>-1&&this.channels.splice(t,1)}notify(n,...t){this.state=n==="restored"?"connected":n,t.length===1?this.channels.forEach(r=>r[n](t[0])):this.channels.forEach(r=>r[n]())}pending(n){this._checkIntent(n);let t=this._pendings[0];return!t||t.intent!==n?Promise.resolve():t.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(n){this._checkIntent(n);let t,r={promise:new Promise(u=>{t=u}),intent:n,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),t(r)},canceled:!1,acquired:!1},c=this._pendingTop;return this._pendings.push(r),c&&await c.promise,this.gvl&&await this.gvl.acquire(r,n),r.acquired=!0,r}close(n){this.disposed=!0,this.intent=void 0,this.notify("closed",n)}_checkIntent(n){if(!(n==="unsubscribed"||n==="subscribed"))throw Error(`Unknown subscription intent: ${n}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(n){let t=this._pendingTop;return!t||t.acquired||t.intent!==n?!1:(this._pendings.pop(),t.canceled=!0,!0)}},HA=class{constructor(){this.queue=[]}async acquire(n,t){t==="subscribed"&&(this.queue.push(n.promise.then(()=>{this.queue.splice(this.queue.indexOf(n),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}},UA=class{constructor(n){n.concurrentSubscribes===!1&&(this.glv=new HA),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(n){return this._subscriptions[n]}create(n,{subscribe:t,unsubscribe:r}){let c=this._subscriptions[n]=new WA(n);return c.remoteId=this._localToRemote[n],c.subscriber=t,c.unsubscriber=r,c.gvl=this.glv,c}remove(n){delete this._subscriptions[n],delete this._localToRemote[n]}storeRemoteId(n,t){this._localToRemote[n]=t;let r=this.get(n);r&&(r.remoteId=t)}},VA=class{constructor(n={}){this.subscriptions=new UA(n),this._pendingMessages=[],this._remoteToLocal={}}subscribe(n,t){this._remoteToLocal[t]=n,this.subscriptions.storeRemoteId(n,t),this.flush(t)}unsubscribe(n){let t=this.subscriptions.get(n);if(!t)return;let r=t.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(n)}transmit(n,t,r){let c=this._remoteToLocal[n];if(!c){this._pendingMessages.push([n,t,r]);return}let u=this.subscriptions.get(c);u&&u.channels.forEach(g=>{g.receive(t,r)})}notify(n,t,r){let c=this._remoteToLocal[n];if(!c)return;let u=this.subscriptions.get(c);u&&u.channels.forEach(g=>g.emit(t,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(n=>n.channels)}flush(n){let t=[];for(let r of this._pendingMessages)r[0]===n?this.transmit(r[0],r[1],r[2]):t.push(r);this._pendingMessages=t}};const mv={debug:0,info:1,warn:2,error:3};let vv=class{constructor(n){this.level=n||"warn"}log(n,t,r){mv[n]<mv[this.level]||this.writeLogEntry(n,t,r)}writeLogEntry(){throw Error("Not implemented")}debug(n,t){this.log("debug",n,t)}info(n,t){this.log("info",n,t)}warn(n,t){this.log("warn",n,t)}error(n,t){this.log("error",n,t)}},Vl=class extends vv{writeLogEntry(){}},GA=class{encode(n){return JSON.stringify(n)}decode(n){try{return JSON.parse(n)}catch{}}},qA=0,yv=class{constructor(n={}){let{logger:t}=n;this.logger=t||new Vl,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=n.subscribeCooldownInterval||250,this.subscribeRetryInterval=n.subscribeRetryInterval||5e3}attached(n){this.cable=n}subscribe(n,t){let r={channel:n};t&&Object.assign(r,t);let c=pv(r);if(this.pendingUnsubscriptions[c]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,c),new Promise(v=>{setTimeout(()=>{v(this.subscribe(n,t))},g)})}if(this.pendingSubscriptions[c])return this.logger.warn("subscription is already pending, skipping",c),Promise.reject(Error("Already subscribing"));let u=this.subscribeRetryInterval;return new Promise((g,v)=>{let s=++qA;this.pendingSubscriptions[c]={resolve:g,reject:v,id:s},this.cable.send(this.buildSubscribeRequest(c)),this.maybeRetrySubscribe(s,c,u)})}buildSubscribeRequest(n){return{command:"subscribe",identifier:n}}maybeRetrySubscribe(n,t,r){setTimeout(()=>{let c=this.pendingSubscriptions[t];c&&c.id===n&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,t),this.cable.send(this.buildSubscribeRequest(t)),this.maybeExpireSubscribe(n,t,r))},r)}maybeExpireSubscribe(n,t,r){setTimeout(()=>{let c=this.pendingSubscriptions[t];c&&c.id===n&&(delete this.pendingSubscriptions[t],c.reject(new BA(`Haven't received subscription ack in ${r*2}ms for ${t}`)))},r)}unsubscribe(n){return this.cable.send({command:"unsubscribe",identifier:n}),this.pendingUnsubscriptions[n]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[n]},this.subscribeCooldownInterval),Promise.resolve()}perform(n,t,r){return t==="$whisper"?this.whisper(n,r):(r||(r={}),r.action||=t,this.cable.send({command:"message",identifier:n,data:JSON.stringify(r)}),Promise.resolve())}whisper(n,t){return this.cable.send({command:"whisper",identifier:n,data:t}),Promise.resolve()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:t,identifier:r,message:c,reason:u,reconnect:g}=n;if(t==="ping")return this.cable.keepalive(n.message);if(this.cable.keepalive(),t==="welcome"){let v=n.sid;return v&&this.cable.setSessionId(v),this.cable.connected()}if(t==="disconnect"){let v=new Io(u);this.reset(v),g===!1?this.cable.closed(v):this.cable.disconnected(v);return}if(t==="confirm_subscription"){let v=this.pendingSubscriptions[r];if(!v){this.logger.error("subscription not found, unsubscribing",{type:t,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],v.resolve(r)}if(t==="reject_subscription"){let v=this.pendingSubscriptions[r];return v?(delete this.pendingSubscriptions[r],v.reject(new pd)):this.logger.error("subscription not found",{type:t,identifier:r})}if(c)return{identifier:r,message:c};this.logger.warn(`unknown message type: ${t}`,{message:n})}reset(n){for(let t in this.pendingSubscriptions)this.pendingSubscriptions[t].reject(n);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const bv=()=>Date.now()/1e3|0;let YA=class extends yv{constructor(n={}){super(n),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=n.historyTimestamp,this.disableSessionRecovery=n.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=bv()),this.sessionId=void 0,this.sendPongs=n.pongs}reset(n){for(let t in this.pendingPresence)this.pendingPresence[t].reject(n);return this.pendingPresence={},super.reset()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:t,identifier:r,message:c}=n;if(t==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(n);if(t==="reject_subscription")return super.receive(n);if(t==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(n);if(t==="ping")return this.restoreSince&&(this.restoreSince=bv()),this.sendPongs&&this.sendPong(),this.cable.keepalive(n.message);if(this.cable.keepalive(),t==="confirm_history"){this.logger.debug("history result received",n),this.cable.notify("history_received",r);return}if(t==="reject_history"){this.logger.warn("failed to retrieve history",n),this.cable.notify("history_not_found",r);return}if(t==="welcome"){if(this.disableSessionRecovery||(this.sessionId=n.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),n.restored){let u=n.restored_ids||Object.keys(this.subscriptionStreams);for(let g of u)this.cable.send({identifier:g,command:"history",history:this.historyRequestFor(g)}),this.presenceInfo[g]&&this.cable.send({identifier:g,command:"join",presence:this.presenceInfo[g]});return this.cable.restored(u)}return this.cable.connected(this.sessionId)}if(t==="presence"){let u=c.type;if(u==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(c))}else if(u==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:t,identifier:r,message:c}}if(c){let u=this.trackStreamPosition(r,n.stream_id,n.epoch,n.offset);return{identifier:r,message:c,meta:u}}this.logger.warn(`unknown message type: ${t}`,{message:n})}perform(n,t,r){switch(t){case"$presence:join":return this.join(n,r);case"$presence:leave":return this.leave(n,r);case"$presence:info":return this.presence(n,r)}return super.perform(n,t,r)}unsubscribe(n){return delete this.presenceInfo[n],super.unsubscribe(n)}buildSubscribeRequest(n){let t=super.buildSubscribeRequest(n),r=this.historyRequestFor(n);r&&(t.history=r,this.pendingHistory[n]=!0);let c=this.presenceInfo[n];return c&&(t.presence=c),t}recoverableClosure(){return!!this.sessionId}historyRequestFor(n){let t={},r=!1;if(this.subscriptionStreams[n])for(let c of this.subscriptionStreams[n]){let u=this.streamsPositions[c];u&&(r=!0,t[c]=u)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:t}}trackStreamPosition(n,t,r,c){if(!(!t||!r))return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),this.subscriptionStreams[n].add(t),this.streamsPositions[t]={epoch:r,offset:c},{stream:t,epoch:r,offset:c}}async sendPong(){await new Promise(n=>setTimeout(n,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(n,t){return this.presenceInfo[n]=t,this.cable.send({command:"join",identifier:n,presence:t}),Promise.resolve()}async leave(n,t){return delete this.presenceInfo[n],this.cable.send({command:"leave",identifier:n,presence:t}),Promise.resolve()}presence(n,t){return this.pendingPresence[n]?(this.logger.warn("presence is already pending, skipping",n),Promise.reject(Error("presence request is already pending"))):new Promise((r,c)=>{this.pendingPresence[n]={resolve:r,reject:c},this.cable.send({command:"presence",identifier:n,data:t})})}},KA=class extends Ul{constructor(){super("No connection","closed"),this.name="NoConnectionError"}},wv=class extends gv{static identifier="__ghost__";constructor(n,t){super(t),this.channelId=n}set channelId(n){this._channelId=n}get channelId(){return this._channelId}};const JA="$pubsub";let xv=class extends gv{static identifier=JA;async perform(n,t){if(n.startsWith("$"))return super.perform(n,t);throw Error("not implemented")}};const ua=Symbol("state");let QA=class{constructor({transport:n,protocol:t,encoder:r,logger:c,lazy:u,hubOptions:g,performFailures:v,transportConfigurator:s}){this.emitter=nu(),this.transport=n,this.encoder=r,this.logger=c||new Vl,this.protocol=t,this.performFailures=v||"throw",this.protocol.attached(this),this.hub=new VA(g||{}),this[ua]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=s,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,u===!1&&this.connect().catch(()=>{})}get state(){return this[ua]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[ua]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(r){this.handleClose(r)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[ua]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Io("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[ua]="connected",this.hub.subscriptions.all().forEach(c=>{n&&c.remoteId&&n.includes(c.remoteId)?c.notify("restored"):(c.notify("disconnected",new Io("recovery_failed")),this._resubscribe(c))});let t=!this.initialConnect,r=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:r})}notify(n,t,r){t&&typeof t!="string"&&(r=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:r}):this.emit("info",{type:n,data:r})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Io(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[ua]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof Io?n:new Io(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[ua]="closed";let r=t||new Io("cable_closed");this.hub.subscriptions.all().forEach(c=>c.notify("disconnected",r)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let r=this.protocol.receive(t);if(r){this.logger.debug("processed incoming message",r);let{type:c,identifier:u,message:g,meta:v}=r;c?this.hub.notify(u,c,g):this.hub.transmit(u,g,v)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let t=this.encoder.encode(n);if(t===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(t)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let t=new xv({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new xv({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let r,c;return typeof n=="string"&&(c=n,n=wv),r=c?new n(c,t):new n(t),this.subscribe(r)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let r=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:c=>this._subscribe(c,n.channelId,n.params),unsubscribe:c=>this._unsubscribe(c)});return r.add(n),r.intent==="subscribed"&&r.state==="connected"&&n.connected(),r.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,r){let c=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:c});return}this.logger.debug("acquiring subscribe lock",{identifier:c});let u=await n.acquire("subscribed");if(u.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:c}),u.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:c}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),u.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:c}),u.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:c}),n.notify("connected"),u.release();return}let g={identifier:t,params:r};this.logger.debug("subscribing",g);try{let v=await this.protocol.subscribe(t,r);this.hub.subscribe(c,v),this.logger.debug("subscribed",{...g,remoteId:v}),n.notify("connected")}catch(v){if(v){if(v instanceof pd&&this.logger.warn("rejected",g),v instanceof Io){this.logger.debug("disconnected during subscription; will retry on connect",g),u.release();return}this.logger.error("failed to subscribe",{error:v,...g})}n.close(v),this.hub.unsubscribe(c)}u.release()}unsubscribe(n){let t=n.identifier,r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);r.remove(n),n.closed(),r.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let r=await n.acquire("unsubscribed");if(r.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),r.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),r.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),r.release();return}let c=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:c}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),r.release();return}try{await this.protocol.unsubscribe(c),this.logger.debug("unsubscribed remotely",{id:t})}catch(u){u&&(u instanceof Io?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:u}):this.logger.error("unsubscribe failed",{id:t,error:u}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",r.release()}async perform(n,t,r){if(this.performFailures==="throw")return this._perform(n,t,r);try{return await this._perform(n,t,r)}catch(c){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:c});return}}async _perform(n,t,r){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new KA;let c=this.hub.subscriptions.get(n);if(!c)throw Error(`Subscription not found: ${n}`);if(await c.pending("subscribed"),c.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let u=c.remoteId,g={id:u,action:t,payload:r};this.logger.debug("perform",g);try{let v=await this.protocol.perform(u,t,r);return v&&this.logger.debug("perform result",{message:v,request:g}),v}catch(v){throw this.logger.error("perform failed",{error:v,request:g}),v}}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...c)=>{r(),t(...c)});return r}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let r=[()=>delete this._pendingConnect];r.push(this.on("connect",()=>{r.forEach(c=>c()),n()})),r.push(this.on("close",c=>{r.forEach(u=>u()),t(c)})),r.push(this.on("disconnect",c=>{r.forEach(u=>u()),t(c)}))}),this._pendingConnect)}};const ZA={maxMissingPings:2,maxReconnectAttempts:1/0},Va=()=>Date.now(),Cv=(e,n)=>{n=n||{};let{backoffRate:t,jitterRatio:r,maxInterval:c}=n;return t=t||2,r===void 0&&(r=.5),u=>{let g=e*t**u,v=g*t,s=g+(v-g)*Math.random(),d=2*(Math.random()-.5)*r;return s=s*(1+d),c&&c<s&&(s=c),s}};let kv=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},ZA,t),this.strategy=t.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=t.maxMissingPings,this.maxReconnectAttempts=t.maxReconnectAttempts,this.logger=t.logger||new Vl,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Va()}watch(n){this.target=n,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=Va(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Va(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Va(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Va()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=Va()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new FA))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}},XA=class{constructor(n,t={}){this.transports=n,this.transport=null,this.emitter=nu(),this.unbind=[],this.logger=t.logger||new Vl}displayName(){return"fallbacked transport"}async open(){for(let n=0;n<this.transports.length;n++){let t=this.transports[n];try{this.transport=t,this.resetListeners(),this.logger.debug(`Trying to connect via ${t.displayName()}`),await t.open(),this.logger.debug(`Connected via ${t.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${t.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(n){if(!this.transport)throw new Error("No transport is open");this.transport.send(n)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(n,t){this.transports.forEach(r=>{r.setParam(n,t)})}setToken(n,t){this.transports.forEach(r=>{r.setToken(n,t)})}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...c)=>{r(),t(...c)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(n=>n()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",n=>{this.emitter.emit("data",n)}),this.transport.on("close",n=>{this.emitter.emit("close",n)}),this.transport.on("error",n=>{this.emitter.emit("error",n)}))}},e$=class{constructor(n,t={}){this.url=n;let r=t.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=nu();let{format:c,subprotocol:u,authStrategy:g}=t;this.format=c||"text",this.connectionOptions=t.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=u}displayName(){return"WebSocket("+this.url+")"}open(){let n=this.subprotocol;return this.authStrategy==="sub-protocol"&&(n=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,n,this.connectionOptions):this.ws=new this.Impl(this.url,n),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((t,r)=>{let c=[];c.push(this.once("open",()=>{c.forEach(u=>u()),t()})),c.push(this.once("close",()=>{c.forEach(u=>u()),r(Error("WS connection closed"))}))})}setURL(n){this.url=n}setParam(n,t){let r=new URL(this.url);r.searchParams.set(n,t);let c=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(c)}setToken(n,t="jid"){if(this.authStrategy==="param")this.setParam(t,n);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${t}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(c=>c.toLowerCase()===r)||r,this.connectionOptions.headers[r]=n}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${n}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(n){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(n)}close(){this.ws?this.onclose():this.connected=!1}on(n,t){return this.emitter.on(n,t)}once(n,t){let r=this.emitter.on(n,(...c)=>{r(),t(...c)});return r}initListeners(){this.ws.onerror=n=>{this.connected&&this.emitter.emit("error",n.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=n=>{let t=n.data;this.format==="binary"&&(t=new Uint8Array(t)),this.emitter.emit("data",t)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}},t$=class{constructor(n){this.channel=n}notify(n,...t){typeof this[n]=="function"&&this[n](...t)}perform(n,t={}){this.channel.perform(n,t)}send(n){this.channel.send(n)}whisper(n){return this.channel.whisper(n)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}},n$=class extends wv{constructor(n,t,r){super(n,t),this.subscription=new t$(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:c})=>this.subscription.notify("connected",{reconnected:c})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",c=>this.subscription.notify("received",c)),this.on("close",c=>{c&&c instanceof pd?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}},r$=class{constructor(n){this.cable=n}create(n,t){let r,c;typeof n=="object"?(r=n.channel,delete n.channel,c=n):(r=n,c={});let u=new n$(r,c,t);return u.subscription.notify("initialized"),this.cable.subscribe(u),u.subscription}findAll(n){return this.cable.hub.channels.filter(t=>t.identifier===n).map(t=>t.subscription)}},i$=class{constructor(n){this.cable=n,this.subscriptions=new r$(n)}send(n){return this.cable.send(n)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}};const _v={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function o$(e,n){if(typeof e=="object"&&typeof n>"u"&&(n=e,e=void 0),n=n||{},!e&&!n.transport)throw Error("URL or transport must be specified");n=Object.assign({},_v,n);let{protocol:t,websocketImplementation:r,websocketFormat:c,websocketOptions:u,websocketAuthStrategy:g,fallbacks:v,logLevel:s,logger:d,transport:a,encoder:l,lazy:h,monitor:p,pingInterval:o,reconnectStrategy:f,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:R,historyTimestamp:T,protocolOptions:_,concurrentSubscribes:C,performFailures:P,transportConfigurator:O,auth:E}=n;if(d=d||new Vl(s),typeof t=="string"){x=x||t;let N=t.substring(0,t.lastIndexOf("-")),M=t.substring(t.lastIndexOf("-")+1);if(_=_||{},N==="actioncable-v1")t=new yv({logger:d,..._});else if(N==="actioncable-v1-ext")t=new YA({logger:d,historyTimestamp:T,..._});else throw Error(`Protocol is not supported yet: ${t}`);if(M==="json")l=l||new GA,c=c||"text";else if(M==="msgpack"){if(c="binary",!l)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(M==="protobuf"){if(c=c||"binary",!l)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${t}`)}if(!t)throw Error("Protocol must be specified");a=a||new e$(e,{websocketImplementation:r,websocketOptions:u,subprotocol:x,authStrategy:g,format:c}),v&&(a=new XA([a,...v],{logger:d})),E&&E.token&&a.setToken(E.token,E.param||"jid"),f=f||Cv(o),p!==!1&&(p=p||new kv({pingInterval:o,reconnectStrategy:f,maxMissingPings:m,maxReconnectAttempts:w,logger:d}));let k={concurrentSubscribes:C},B=new QA({protocol:t,transport:a,encoder:l,logger:d,lazy:h,hubOptions:k,performFailures:P,transportConfigurator:O});return p&&(p.watch(B),B.monitor=p),R&&s$(B,async()=>{try{await R(a)}catch(N){return d.error("Failed to refresh authentication token: "+N),!1}return B.connect().catch(()=>{}),!0}),B}function s$(e,n){let t=!1;e.on("connect",()=>t=!1),e.on("close",async r=>{if(r){if(t){e.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(t=!0,await n())}})}let a$=class extends vv{writeLogEntry(n,t,r){r?console[n](t,r):console[n](t)}},l$=class extends kv{watch(n){super.watch(n),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let n=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},t=c=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:c})},r=()=>this.disconnect(new Io("page_frozen"));document.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",t,!1),window.addEventListener("resume",t,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",n,!1),window.removeEventListener("focus",t,!1),window.removeEventListener("online",t,!1),window.removeEventListener("resume",t,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(n){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:n.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(n))}};const c$=["cable","action-cable"],u$="/cable",ru=(e,n)=>{for(let t of c$){let r=e.head.querySelector(`meta[name='${t}-${n}']`);if(r)return r.getAttribute("content")}},Av=e=>e.match(/wss?:\/\//)?e:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${e}`:e,h$=()=>{if(typeof document<"u"&&document.head){let e=ru(document,"url");if(e)return Av(e)}return Av(u$)},d$=()=>{if(typeof document<"u"&&document.head){let e=ru(document,"history-timestamp");if(e)return e|0}},f$=()=>{if(typeof document<"u"&&document.head)return ru(document,"token")},p$=()=>{if(typeof document<"u"&&document.head)return ru(document,"token-param")};function g$(e,n){typeof e=="object"&&typeof n>"u"&&(n=e,e=void 0),e=e||h$(),n=n||{},n.historyTimestamp||=d$();let t=f$();if(t){let d=p$();n.auth=Object.assign({token:t,param:d},n.auth||{})}n=Object.assign({},_v,n);let{logLevel:r,logger:c,pingInterval:u,reconnectStrategy:g,maxMissingPings:v,maxReconnectAttempts:s}=n;return c=n.logger=n.logger||new a$(r),g=n.reconnectStrategy=n.reconnectStrategy||Cv(u),n.monitor!==!1&&(n.monitor=n.monitor||new l$({pingInterval:u,reconnectStrategy:g,maxMissingPings:v,maxReconnectAttempts:s,logger:c})),o$(e,n)}function m$(e,n){let t=g$(e,n);return new i$(t)}const v$=1e3,$v="/openc3-api/cable",y$=6e4,b$="__openc3_cable__";let w$=class{constructor(n,t,r,c,u){this._cable=n,this._channel=t,this._scope=r,this._callbacks=c,this._additionalOptions=u,this._subscription=null,this._unsubscribed=!1,this._heartbeat=null}get identifier(){return this._subscription?.identifier}perform(n,t){return this._unsubscribed?Promise.resolve():this._subscription?.perform(n,t)}send(n){return this._unsubscribed?Promise.resolve():this._subscription?.send(n)}unsubscribe(){return this._unsubscribed=!0,this._stopHeartbeat(),this._cable._forget(this),this._subscription?.unsubscribe()}_subscribe(n){this._unsubscribed||(this._subscription=n.subscriptions.create({channel:this._channel,token:localStorage.openc3Token,...this._cable._heartbeatInterval?{heartbeat:!0}:{},...this._additionalOptions},{...this._callbacks,received:t=>{if(t?.[b$]==="resubscribe"){this._cable._scheduleRecovery();return}this._callbacks.received?.(t)},disconnected:t=>{this._unsubscribed||(t?.allowReconnect===!1&&this._cable._scheduleRecovery(),this._callbacks.disconnected?.(t))}}),this._startHeartbeat())}_startHeartbeat(){const n=this._cable._heartbeatInterval;!n||this._heartbeat||(this._heartbeat=setInterval(()=>{if(this._unsubscribed){this._stopHeartbeat();return}Promise.resolve().then(()=>this._subscription?.perform("heartbeat",{})).catch(()=>{})},n))}_stopHeartbeat(){this._heartbeat&&(clearInterval(this._heartbeat),this._heartbeat=null)}};ir("x",class{constructor(n=$v,{heartbeatInterval:t=n===$v?y$:0}={}){this._cable=null,this._url=n,this._heartbeatInterval=t,this._subscriptions=new Set,this._recovery=null}disconnect(){this._cancelRecovery(),this._subscriptions.forEach(n=>{n._unsubscribed=!0,n._stopHeartbeat()}),this._subscriptions.clear(),this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(n,t,r={},c={}){const u=new w$(this,n,t,r,c);return this._subscriptions.add(u),this._resubscribe(u).then(()=>u)}_resubscribe(n){if(this._cable==null){const t=new URL(this._url,document.baseURI);t.searchParams.set("scope",n._scope),this._cable=m$(t.href)}return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(t=>{t&&OpenC3Auth.setTokens(),this._cable&&n._subscribe(this._cable)}).catch(t=>{if(!Hl(t))throw t})}_scheduleRecovery(){this._recovery||(this._recovery=setTimeout(()=>{const n=[...this._subscriptions];this._cable&&(this._cable.cable.disconnect(),this._cable=null),n.reduce((t,r)=>t.then(()=>this._resubscribe(r)),Promise.resolve()).catch(t=>console.error("failed to recover cable",t)).finally(()=>{this._recovery=null})},v$))}_cancelRecovery(){this._recovery&&(clearTimeout(this._recovery),this._recovery=null)}_forget(n){this._subscriptions.delete(n),this._subscriptions.size===0&&this._cancelRecovery()}recordPing(){}}),ir("j",class{constructor(n,t,r="",c=""){this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=t,this.usage=r,this.url=c}});function iu(e){return x$.test(e)}const x$=/^-?[0-9]+$/;function Sv(e){return C$.test(e)}const C$=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Tv(e,n){if(iu(e))return Number.isSafeInteger(Number.parseInt(e,10));const t=Number.parseFloat(e);if(Number.isInteger(t)&&!Number.isSafeInteger(t))return!1;const r=String(t);if(e===r)return!0;const c=Ev(e),u=Ev(r);return!!(c===u||n?.approx===!0&&u.length>=14&&c.startsWith(u.substring(0,14)))}let Gl=(function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e})({});function k$(e){if(Tv(e,{approx:!1}))return;if(iu(e))return Gl.truncate_integer;const n=Number.parseFloat(e);return Number.isFinite(n)?n===0?Gl.underflow:Gl.truncate_float:Gl.overflow}function Ev(e){const{start:n,end:t}=_$(e),r=e.substring(n,t),c=r.indexOf(".");return c===-1?r:r.substring(0,c)+r.substring(c+1)}function _$(e){let n=0;for(e[0]==="-"&&n++;e[n]==="0"||e[n]===".";)n++;let t=e.lastIndexOf("e");for(t===-1&&(t=e.lastIndexOf("E")),t===-1&&(t=e.length);(e[t-1]==="0"||e[t-1]===".")&&t>n;)t--;return{start:n,end:t}}const Iv=Symbol.for("lossless-json.LosslessNumber");let A$=class{value;isLosslessNumber=!0;get[Iv](){return!0}constructor(n){if(!Sv(n))throw new Error(`Invalid number (value: "${n}")`);this.value=n}valueOf(){const n=k$(this.value);if(n===void 0||n===Gl.truncate_float)return Number.parseFloat(this.value);if(iu(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${n} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}};function Mv(e){return e!==null&&typeof e=="object"&&e[Iv]===!0}function $$(e){return new A$(e)}function S$(e,n){return gd({"":e},"",e,n)}function gd(e,n,t,r){return Array.isArray(t)?r.call(e,n,E$(t,r)):t&&typeof t=="object"&&!Mv(t)?r.call(e,n,T$(t,r)):r.call(e,n,t)}function T$(e,n){for(const t of Object.keys(e)){const r=gd(e,t,e[t],n);r!==void 0?e[t]=r:delete e[t]}return e}function E$(e,n){for(let t=0;t<e.length;t++){const r=gd(e,String(t),e[t],n);r===void 0?delete e[t]:e[t]=r}return e}function I$(e,n,t){const r=typeof t=="function"?{parseNumber:t}:t,c=r?.parseNumber??$$,u=r?.onDuplicateKey??P;let g=0;const v=a();return w(v),R(),n?S$(v,n):v;function s(){if(e.charCodeAt(g)===D$){g++,h();const j={};let U=!0;for(;g<e.length&&e.charCodeAt(g)!==Ov;){U?U=!1:(f(),h());const q=g,Q=p();if(Q===void 0){C();return}h(),m();const re=a();if(re===void 0){N();return}if(Object.prototype.hasOwnProperty.call(j,Q)&&!md(re,j[Q])){const le=u({key:Q,position:q+1,oldValue:j[Q],newValue:re});le!==void 0&&Rv(j,Q,le)}else Rv(j,Q,re)}return e.charCodeAt(g)!==Ov&&O(),g++,j}}function d(){if(e.charCodeAt(g)===P$){g++,h();const j=[];let U=!0;for(;g<e.length&&e.charCodeAt(g)!==Nv;){U?U=!1:f();const q=a();x(q),j.push(q)}return e.charCodeAt(g)!==Nv&&E(),g++,j}}function a(){h();const j=p()??o()??s()??d()??l("true",!0)??l("false",!1)??l("null",null);return h(),j}function l(j,U){if(e.slice(g,g+j.length)===j)return g+=j.length,U}function h(){for(;M$(e.charCodeAt(g));)g++}function p(){if(e.charCodeAt(g)===vd){g++;let j="";for(;g<e.length&&e.charCodeAt(g)!==vd;){if(e.charCodeAt(g)===N$){const U=e[g+1],q=O$[U];q!==void 0?(j+=q,g++):U==="u"?ou(e.charCodeAt(g+2))&&ou(e.charCodeAt(g+3))&&ou(e.charCodeAt(g+4))&&ou(e.charCodeAt(g+5))?(j+=String.fromCharCode(Number.parseInt(e.slice(g+2,g+6),16)),g+=5):M(g):B(g)}else L$(e.charCodeAt(g))?j+=e[g]:k(e[g]);g++}return _(),g++,j}}function o(){const j=g;if(e.charCodeAt(g)===Dv&&(g++,T(j)),e.charCodeAt(g)===yd)g++;else if(R$(e.charCodeAt(g)))for(g++;su(e.charCodeAt(g));)g++;else return;if(e.charCodeAt(g)===V$)for(g++,T(j);su(e.charCodeAt(g));)g++;if(e.charCodeAt(g)===J$||e.charCodeAt(g)===K$)for(g++,(e.charCodeAt(g)===Dv||e.charCodeAt(g)===W$)&&g++,T(j);su(e.charCodeAt(g));)g++;if(g>j)return c(e.slice(j,g))}function f(){if(e.charCodeAt(g)!==U$)throw new SyntaxError(`Comma ',' expected after value ${D()}`);g++}function m(){if(e.charCodeAt(g)!==G$)throw new SyntaxError(`Colon ':' expected after property name ${D()}`);g++}function w(j){if(j===void 0)throw new SyntaxError(`JSON value expected ${D()}`)}function x(j){if(j===void 0)throw new SyntaxError(`Array item expected ${D()}`)}function R(){if(g<e.length)throw new SyntaxError(`Expected end of input ${D()}`)}function T(j){if(!su(e.charCodeAt(g))){const U=e.slice(j,g);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${D()}`)}}function _(){if(e.charCodeAt(g)!==vd)throw new SyntaxError(`End of string '"' expected ${D()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${D()}`)}function P({key:j,position:U}){throw new SyntaxError(`Duplicate key '${j}' encountered at position ${U}`)}function O(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${D()}`)}function E(){throw new SyntaxError(`Array item or end of array ']' expected ${D()}`)}function k(j){throw new SyntaxError(`Invalid character '${j}' ${$()}`)}function B(j){const U=e.slice(j,j+2);throw new SyntaxError(`Invalid escape character '${U}' ${$()}`)}function N(){throw new SyntaxError(`Object value expected after ':' ${$()}`)}function M(j){const U=e.slice(j,j+6);throw new SyntaxError(`Invalid unicode character '${U}' ${$()}`)}function $(){return`at position ${g}`}function A(){return g<e.length?`but got '${e[g]}'`:"but reached end of input"}function D(){return`${A()} ${$()}`}}function Rv(e,n,t){n==="__proto__"?Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0}):e[n]=t}function M$(e){return e===z$||e===B$||e===F$||e===j$}function ou(e){return e>=yd&&e<=bd||e>=q$&&e<=Q$||e>=Y$&&e<=Z$}function su(e){return e>=yd&&e<=bd}function R$(e){return e>=H$&&e<=bd}function L$(e){return e>=32&&e<=1114111}function md(e,n){return e===n?!0:Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every((t,r)=>md(t,n[r])):Lv(e)&&Lv(n)?[...new Set([...Object.keys(e),...Object.keys(n)])].every(t=>md(e[t],n[t])):!1}function Lv(e){return typeof e=="object"&&e!==null}const O$={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
10
+ `,r:"\r",t:" "},N$=92,D$=123,Ov=125,P$=91,Nv=93,z$=32,B$=10,F$=9,j$=13,vd=34,W$=43,Dv=45,yd=48,H$=49,bd=57,U$=44,V$=46,G$=58,q$=65,Y$=97,K$=69,J$=101,Q$=70,Z$=102;function X$(e,n,t,r){return c(e);function c(s,d){if(Array.isArray(r)){const a=r.find(l=>l.test(s));if(a){const l=a.stringify(s);if(typeof l!="string"||!Sv(l))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${l})`);return l}}if(typeof s=="boolean"||typeof s=="number"||typeof s=="string"||s===null||s instanceof Date||s instanceof Boolean||s instanceof Number||s instanceof String)return JSON.stringify(s);if(Mv(s)||typeof s=="bigint")return s.toString();if(Array.isArray(s))return u(s);if(s&&typeof s=="object")return g(s)}function u(s,d){if(s.length===0)return"[]";let a="[";for(let l=0;l<s.length;l++){const h=s[l];if(typeof h<"u"&&typeof h!="function"){const p=c(h);a+=p===void 0?"null":p}else a+="null";l<s.length-1&&(a+=",")}return a+="]",a}function g(s,d){if(typeof s.toJSON=="function")return c(s.toJSON());const a=Array.isArray(n)?[...new Set(n.map(String))]:Object.keys(s);if(a.length===0)return"{}";let l=!0,h="{";for(const p of a){const o=s[p];if(v(p,o)){const f=c(o);if(f===void 0)continue;l?l=!1:h+=",";const m=JSON.stringify(p);h+=`${m}:`,h+=f}}return h+="}",h}function v(s,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function eS(e){return iu(e)&&!Tv(e)?BigInt(e):Number.parseFloat(e)}let ql=class{id=1;constructor(){}async exec(n,t,r={},c={},u=6e4){await hd(),this.id=this.id+1;try{return r.scope=window.openc3Scope,c.manual=!0,(await dd.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:t,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...c},timeout:u,transformRequest:[(g,v)=>X$(g)],transformResponse:[g=>{try{return I$(g,void 0,eS)}catch{const v=typeof g=="string"?g.substring(0,200):String(g),s=new Error(`Server returned non-JSON response: ${v}`);throw s.name="ServerError",s}}]})).data.result}catch(g){let v=new Error;throw g.response?(v.name=g.response.data.error.data.class,v.message=g.response.data.error.data.message,v.object=g.response.data.error):g.request?(v.name="Request error",v.message="Request error, no response received"):v=g,v}}decode_openc3_type(n){if(n!==null&&typeof n=="object"&&n.json_class=="Float"&&n.raw){if(n.raw=="NaN")return NaN;if(n.raw=="Infinity")return 1/0;if(n.raw=="-Infinity")return-1/0}return null}encode_openc3_type(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(n=>{n&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(n){return this.exec("set_offline_access",[n])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(n,t,r,c,u){return this.exec("map_target_to_interface",[n,t],{cmd_only:r,tlm_only:c,unmap_old:u})}unmap_target_from_interface(n,t,r,c){return this.exec("unmap_target_from_interface",[n,t],{cmd_only:r,tlm_only:c})}connect_interface(n,...t){return t.length>0?this.exec("connect_interface",[n,...t]):this.exec("connect_interface",[n])}disconnect_interface(n){return this.exec("disconnect_interface",[n])}interface_cmd(n,t,...r){return this.exec("interface_cmd",[n,t,...r])}interface_target_enable(n,t,r=!1,c=!1){return this.exec("interface_target_enable",[n,t],{cmd_only:r,tlm_only:c})}interface_target_disable(n,t,r=!1,c=!1){return this.exec("interface_target_disable",[n,t],{cmd_only:r,tlm_only:c})}interface_details(n){return this.exec("interface_details",[n])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(n,t,r,c,u){return this.exec("map_target_to_router",[n,t],{cmd_only:r,tlm_only:c,unmap_old:u})}unmap_target_from_router(n,t,r,c){return this.exec("unmap_target_from_router",[n,t],{cmd_only:r,tlm_only:c})}connect_router(n){return this.exec("connect_router",[n])}disconnect_router(n){return this.exec("disconnect_router",[n])}router_target_enable(n,t,r=!1,c=!1){return this.exec("router_target_enable",[n,t],{cmd_only:r,tlm_only:c})}router_target_disable(n,t,r=!1,c=!1){return this.exec("router_target_disable",[n,t],{cmd_only:r,tlm_only:c})}router_details(n){return this.exec("router_details",[n])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(n){return this.exec("get_tlm_cnts",[n])}get_item(n,t,r){return this.exec("get_item",[n,t,r])}get_param(n,t,r){return this.exec("get_param",[n,t,r])}get_parameter(n,t,r){return this.get_param(n,t,r)}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(n){return this.exec("set_limits_set",[n])}delete_limits_set(n){return this.exec("delete_limits_set",[n])}get_target(n){return this.exec("get_target",[n])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.get_target_names()}get_tlm(n,t){return this.exec("get_tlm",[n,t])}get_telemetry(n,t){return this.get_tlm(n,t)}get_all_tlm(n){return this.exec("get_all_tlm",[n])}get_all_telemetry(n){return this.get_all_tlm(n)}get_all_tlm_names(n,t=!1){return this.exec("get_all_tlm_names",[n],{hidden:t})}get_all_telemetry_names(n){return this.get_all_tlm_names(n)}get_all_tlm_item_names(n){return this.exec("get_all_tlm_item_names",[n])}async get_tlm_packet(n,t,r,c=30){const u=await this.exec("get_tlm_packet",[n,t],{type:r,stale_time:c});if(u!=null){let g=u.length,v=null;for(let s=0;s<g;s++)v=this.decode_openc3_type(u[s][1]),v!==null&&(u[s][1]=v)}return u}get_packet_derived_items(n,t){return this.exec("get_packet_derived_items",[n,t])}get_tlm_buffer(n,t){return this.exec("get_tlm_buffer",[n,t])}get_tlm_available(n,t={},r={}){return this.exec("get_tlm_available",[n],t,r)}async get_tlm_values(n,t=30,r=null,c=null,u=null,g={}){let v={stale_time:t};r!==null&&(v.cache_timeout=r),c!==null&&(v.start_time=c.toISOString()),u!==null&&(v.end_time=u.toISOString());const s=await this.exec("get_tlm_values",[n],v,g,1e4);if(s&&s.length>0){let d=s.length,a=null;for(let l=0;l<d;l++)a=this.decode_openc3_type(s[l][0]),a!==null&&(s[l][0]=a)}return s}get_limits(n,t,r){return this.exec("get_limits",[n,t,r])}async tlm(n,t,r,c="CONVERTED"){let u=null;if(t===void 0)u=await this.exec("tlm",[n]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(t))u=await this.exec("tlm",[n],{type:t});else{let v=new Error;throw v.name="TypeError",v.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED or FORMATTED.`,v}else u=await this.exec("tlm",[n,t,r],{type:c});let g=this.decode_openc3_type(u);return g!==null&&(u=g),u}async inject_tlm(n,t,r=null,c="CONVERTED",u=!1){await this.exec("inject_tlm",[n,t,r],{type:c,stored:u})}set_tlm(n,t,r,c){return this.exec("set_tlm",[n,t,r],{type:c})}override_tlm(n,t,r,c){return this.exec("override_tlm",[n,t,r],{type:c})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(n,t,r,c){return this.exec("normalize_tlm",[n,t,r],{type:c})}get_all_cmds(n){return this.exec("get_all_cmds",[n])}get_all_commands(n){return this.get_all_cmds(n)}get_all_cmd_names(n,t=!1){return this.exec("get_all_cmd_names",[n],{hidden:t})}get_all_command_names(n){return this.get_all_cmd_names(n)}get_cmd(n,t){return this.exec("get_cmd",[n,t])}get_command(n,t){return this.get_cmd(n,t)}get_cmd_cnts(n){return this.exec("get_cmd_cnts",[n])}get_cmd_value(n,t,r,c="CONVERTED"){return this.exec("get_cmd_value",[n,t,r,c])}get_cmd_buffer(n,t){return this.exec("get_cmd_buffer",[n,t])}_cmd(n,t,r,c,u,g={}){let v=null;for(let s in c)Object.prototype.hasOwnProperty.call(c,s)&&(v=this.encode_openc3_type(c[s]),v!==null&&(c[s]=v));return this.exec(n,[t,r,c],g,u)}get_cmd_hazardous(n,t,r,c={}){return t===void 0?this.exec("get_cmd_hazardous",n,{},c):this._cmd("get_cmd_hazardous",n,t,r,c)}cmd(n,t,r,c={},u={}){return t===void 0?this.exec("cmd",n,u,c):this._cmd("cmd",n,t,r,c,u)}cmd_no_range_check(n,t,r,c={},u={}){return t===void 0?this.exec("cmd_no_range_check",n,u,c):this._cmd("cmd_no_range_check",n,t,r,c,u)}cmd_raw(n,t,r,c={},u={}){return t===void 0?this.exec("cmd_raw",n,u,c):this._cmd("cmd_raw",n,t,r,c,u)}cmd_raw_no_range_check(n,t,r,c={},u={}){return t===void 0?this.exec("cmd_raw_no_range_check",n,u,c):this._cmd("cmd_raw_no_range_check",n,t,r,c,u)}cmd_no_hazardous_check(n,t,r,c={},u={}){return t===void 0?this.exec("cmd_no_hazardous_check",n,u,c):this._cmd("cmd_no_hazardous_check",n,t,r,c,u)}cmd_no_checks(n,t,r,c={},u={}){return t===void 0?this.exec("cmd_no_checks",n,u,c):this._cmd("cmd_no_checks",n,t,r,c,u)}cmd_raw_no_hazardous_check(n,t,r,c={},u={}){return t===void 0?this.exec("cmd_raw_no_hazardous_check",n,u,c):this._cmd("cmd_raw_no_hazardous_check",n,t,r,c,u)}cmd_raw_no_checks(n,t,r,c={},u={}){return t===void 0?this.exec("cmd_raw_no_checks",n,u,c):this._cmd("cmd_raw_no_checks",n,t,r,c,u)}build_cmd(n,t,r,c={},u={}){return t===void 0?this.exec("build_cmd",n,u,c):this._cmd("build_cmd",n,t,r,c,u)}build_command(n,t,r,c={},u={}){return this.build_cmd(n,t,r,c,u)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(n,t){return this.exec("send_raw",[n,t])}list_configs(n){return this.exec("list_configs",[n])}load_config(n,t){return this.exec("load_config",[n,t])}save_config(n,t,r){return this.exec("save_config",[n,t,r])}delete_config(n,t){return this.exec("delete_config",[n,t])}enable_limits(n,t,r){return this.exec("enable_limits",[n,t,r])}disable_limits(n,t,r){return this.exec("disable_limits",[n,t,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(n){return this.exec("get_overall_limits_state",[n])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(n,t){return this.exec("get_setting",[n],t)}get_settings(n,t){return this.exec("get_settings",n,t)}set_setting(n,t){return this.exec("set_setting",[n,t])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(n,t){return this.set_setting(n,t)}get_metrics(n=!1){return this.exec("get_metrics",[],{detailed:n})}open_tab(n){window.open(n,"_blank")}async hashString(n){if(window.isSecureContext){const t=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",t),c=new Uint8Array(r);return Array.from(c).map(u=>u.toString(16).padStart(2,"0")).join("")}}};ir("P",ql);const Pv=6048e5,tS=864e5,au=6e4,wd=36e5,nS=1e3,zv=Symbol.for("constructDateFrom");ir({a:au,C:wd,k:nS});function qo(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&zv in e?e[zv](n):e instanceof Date?new e.constructor(n):new Date(n)}function ci(e,n){return qo(n||e,e)}let rS={};function Ga(){return rS}function qa(e,n){const t=Ga(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,c=ci(e,n?.in),u=c.getDay(),g=(u<r?7:0)+u-r;return c.setDate(c.getDate()-g),c.setHours(0,0,0,0),c}function Yl(e,n){return qa(e,{...n,weekStartsOn:1})}function Bv(e,n){const t=ci(e,n?.in),r=t.getFullYear(),c=qo(t,0);c.setFullYear(r+1,0,4),c.setHours(0,0,0,0);const u=Yl(c),g=qo(t,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const v=Yl(g);return t.getTime()>=u.getTime()?r+1:t.getTime()>=v.getTime()?r:r-1}function xd(e){const n=ci(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function iS(e,...n){const t=qo.bind(null,n.find(r=>typeof r=="object"));return n.map(t)}function Fv(e,n){const t=ci(e,n?.in);return t.setHours(0,0,0,0),t}function oS(e,n,t){const[r,c]=iS(t?.in,e,n),u=Fv(r),g=Fv(c),v=+u-xd(u),s=+g-xd(g);return Math.round((v-s)/tS)}function sS(e,n){const t=Bv(e,n),r=qo(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Yl(r)}function aS(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function jv(e){return!(!aS(e)&&typeof e!="number"||isNaN(+ci(e)))}function lS(e,n){const t=ci(e,n?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const cS={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"}},uS=(e,n,t)=>{let r;const c=cS[e];return typeof c=="string"?r=c:n===1?r=c.one:r=c.other.replace("{{count}}",n.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function Cd(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const hS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},fS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pS={date:Cd({formats:hS,defaultWidth:"full"}),time:Cd({formats:dS,defaultWidth:"full"}),dateTime:Cd({formats:fS,defaultWidth:"full"})},gS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mS=(e,n,t,r)=>gS[e];function Kl(e){return(n,t)=>{const r=t?.context?String(t.context):"standalone";let c;if(r==="formatting"&&e.formattingValues){const g=e.defaultFormattingWidth||e.defaultWidth,v=t?.width?String(t.width):g;c=e.formattingValues[v]||e.formattingValues[g]}else{const g=e.defaultWidth,v=t?.width?String(t.width):e.defaultWidth;c=e.values[v]||e.values[g]}const u=e.argumentCallback?e.argumentCallback(n):n;return c[u]}}const vS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},yS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},bS={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"]},wS={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"]},xS={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"}},CS={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"}},kS=(e,n)=>{const t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},_S={ordinalNumber:kS,era:Kl({values:vS,defaultWidth:"wide"}),quarter:Kl({values:yS,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Kl({values:bS,defaultWidth:"wide"}),day:Kl({values:wS,defaultWidth:"wide"}),dayPeriod:Kl({values:xS,defaultWidth:"wide",formattingValues:CS,defaultFormattingWidth:"wide"})};function Jl(e){return(n,t={})=>{const r=t.width,c=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],u=n.match(c);if(!u)return null;const g=u[0],v=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(v)?$S(v,l=>l.test(g)):AS(v,l=>l.test(g));let d;d=e.valueCallback?e.valueCallback(s):s,d=t.valueCallback?t.valueCallback(d):d;const a=n.slice(g.length);return{value:d,rest:a}}}function AS(e,n){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function $S(e,n){for(let t=0;t<e.length;t++)if(n(e[t]))return t}function SS(e){return(n,t={})=>{const r=n.match(e.matchPattern);if(!r)return null;const c=r[0],u=n.match(e.parsePattern);if(!u)return null;let g=e.valueCallback?e.valueCallback(u[0]):u[0];g=t.valueCallback?t.valueCallback(g):g;const v=n.slice(c.length);return{value:g,rest:v}}}const TS=/^(\d+)(th|st|nd|rd)?/i,ES=/\d+/i,IS={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},MS={any:[/^b/i,/^(a|c)/i]},RS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},LS={any:[/1/i,/2/i,/3/i,/4/i]},OS={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},NS={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]},DS={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},PS={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]},zS={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},BS={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}},FS={ordinalNumber:SS({matchPattern:TS,parsePattern:ES,valueCallback:e=>parseInt(e,10)}),era:Jl({matchPatterns:IS,defaultMatchWidth:"wide",parsePatterns:MS,defaultParseWidth:"any"}),quarter:Jl({matchPatterns:RS,defaultMatchWidth:"wide",parsePatterns:LS,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Jl({matchPatterns:OS,defaultMatchWidth:"wide",parsePatterns:NS,defaultParseWidth:"any"}),day:Jl({matchPatterns:DS,defaultMatchWidth:"wide",parsePatterns:PS,defaultParseWidth:"any"}),dayPeriod:Jl({matchPatterns:zS,defaultMatchWidth:"any",parsePatterns:BS,defaultParseWidth:"any"})},jS=ir("$",{code:"en-US",formatDistance:uS,formatLong:pS,formatRelative:mS,localize:_S,match:FS,options:{weekStartsOn:0,firstWeekContainsDate:1}});function WS(e,n){const t=ci(e,n?.in);return oS(t,lS(t))+1}function Wv(e,n){const t=ci(e,n?.in),r=+Yl(t)-+sS(t);return Math.round(r/Pv)+1}function kd(e,n){const t=ci(e,n?.in),r=t.getFullYear(),c=Ga(),u=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??c.firstWeekContainsDate??c.locale?.options?.firstWeekContainsDate??1,g=qo(n?.in||e,0);g.setFullYear(r+1,0,u),g.setHours(0,0,0,0);const v=qa(g,n),s=qo(n?.in||e,0);s.setFullYear(r,0,u),s.setHours(0,0,0,0);const d=qa(s,n);return+t>=+v?r+1:+t>=+d?r:r-1}function HS(e,n){const t=Ga(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,c=kd(e,n),u=qo(n?.in||e,0);return u.setFullYear(c,0,r),u.setHours(0,0,0,0),qa(u,n)}function Hv(e,n){const t=ci(e,n?.in),r=+qa(t,n)-+HS(t,n);return Math.round(r/Pv)+1}function $n(e,n){const t=e<0?"-":"",r=Math.abs(e).toString().padStart(n,"0");return t+r}const Ps={y(e,n){const t=e.getFullYear(),r=t>0?t:1-t;return $n(n==="yy"?r%100:r,n.length)},M(e,n){const t=e.getMonth();return n==="M"?String(t+1):$n(t+1,2)},d(e,n){return $n(e.getDate(),n.length)},a(e,n){const t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];default:return t==="am"?"a.m.":"p.m."}},h(e,n){return $n(e.getHours()%12||12,n.length)},H(e,n){return $n(e.getHours(),n.length)},m(e,n){return $n(e.getMinutes(),n.length)},s(e,n){return $n(e.getSeconds(),n.length)},S(e,n){const t=n.length,r=e.getMilliseconds(),c=Math.trunc(r*Math.pow(10,t-3));return $n(c,n.length)}},Ya={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Uv={G:function(e,n,t){const r=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});default:return t.era(r,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){const r=e.getFullYear(),c=r>0?r:1-r;return t.ordinalNumber(c,{unit:"year"})}return Ps.y(e,n)},Y:function(e,n,t,r){const c=kd(e,r),u=c>0?c:1-c;if(n==="YY"){const g=u%100;return $n(g,2)}return n==="Yo"?t.ordinalNumber(u,{unit:"year"}):$n(u,n.length)},R:function(e,n){const t=Bv(e);return $n(t,n.length)},u:function(e,n){const t=e.getFullYear();return $n(t,n.length)},Q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return $n(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return $n(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,n,t){const r=e.getMonth();switch(n){case"M":case"MM":return Ps.M(e,n);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(e,n,t){const r=e.getMonth();switch(n){case"L":return String(r+1);case"LL":return $n(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(e,n,t,r){const c=Hv(e,r);return n==="wo"?t.ordinalNumber(c,{unit:"week"}):$n(c,n.length)},I:function(e,n,t){const r=Wv(e);return n==="Io"?t.ordinalNumber(r,{unit:"week"}):$n(r,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):Ps.d(e,n)},D:function(e,n,t){const r=WS(e);return n==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):$n(r,n.length)},E:function(e,n,t){const r=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(e,n,t,r){const c=e.getDay(),u=(c-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(u);case"ee":return $n(u,2);case"eo":return t.ordinalNumber(u,{unit:"day"});case"eee":return t.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(c,{width:"short",context:"formatting"});default:return t.day(c,{width:"wide",context:"formatting"})}},c:function(e,n,t,r){const c=e.getDay(),u=(c-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(u);case"cc":return $n(u,n.length);case"co":return t.ordinalNumber(u,{unit:"day"});case"ccc":return t.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(c,{width:"narrow",context:"standalone"});case"cccccc":return t.day(c,{width:"short",context:"standalone"});default:return t.day(c,{width:"wide",context:"standalone"})}},i:function(e,n,t){const r=e.getDay(),c=r===0?7:r;switch(n){case"i":return String(c);case"ii":return $n(c,n.length);case"io":return t.ordinalNumber(c,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(e,n,t){const r=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,n,t){const r=e.getHours();let c;switch(r===12?c=Ya.noon:r===0?c=Ya.midnight:c=r/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(c,{width:"narrow",context:"formatting"});default:return t.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(e,n,t){const r=e.getHours();let c;switch(r>=17?c=Ya.evening:r>=12?c=Ya.afternoon:r>=4?c=Ya.morning:c=Ya.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(c,{width:"narrow",context:"formatting"});default:return t.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let r=e.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Ps.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):Ps.H(e,n)},K:function(e,n,t){const r=e.getHours()%12;return n==="Ko"?t.ordinalNumber(r,{unit:"hour"}):$n(r,n.length)},k:function(e,n,t){let r=e.getHours();return r===0&&(r=24),n==="ko"?t.ordinalNumber(r,{unit:"hour"}):$n(r,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ps.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):Ps.s(e,n)},S:function(e,n){return Ps.S(e,n)},X:function(e,n,t){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return Gv(r);case"XXXX":case"XX":return ha(r);default:return ha(r,":")}},x:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"x":return Gv(r);case"xxxx":case"xx":return ha(r);default:return ha(r,":")}},O:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Vv(r,":");default:return"GMT"+ha(r,":")}},z:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Vv(r,":");default:return"GMT"+ha(r,":")}},t:function(e,n,t){const r=Math.trunc(+e/1e3);return $n(r,n.length)},T:function(e,n,t){return $n(+e,n.length)}};function Vv(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),c=Math.trunc(r/60),u=r%60;return u===0?t+String(c):t+String(c)+n+$n(u,2)}function Gv(e,n){return e%60===0?(e>0?"-":"+")+$n(Math.abs(e)/60,2):ha(e,n)}function ha(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),c=$n(Math.trunc(r/60),2),u=$n(r%60,2);return t+c+n+u}const qv=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},Yv=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},US=(e,n)=>{const t=e.match(/(P+)(p+)?/)||[],r=t[1],c=t[2];if(!c)return qv(e,n);let u;switch(r){case"P":u=n.dateTime({width:"short"});break;case"PP":u=n.dateTime({width:"medium"});break;case"PPP":u=n.dateTime({width:"long"});break;default:u=n.dateTime({width:"full"});break}return u.replace("{{date}}",qv(r,n)).replace("{{time}}",Yv(c,n))},VS=ir("b",{p:Yv,P:US}),GS=/^D+$/,qS=/^Y+$/,YS=["D","DD","YY","YYYY"];function Kv(e){return GS.test(e)}function Jv(e){return qS.test(e)}function Qv(e,n,t){const r=KS(e,n,t);if(console.warn(r),YS.includes(e))throw new RangeError(r)}function KS(e,n,t){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const JS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,QS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ZS=/^'([^]*?)'?$/,XS=/''/g,eT=/[a-zA-Z]/;function da(e,n,t){const r=Ga(),c=t?.locale??r.locale??jS,u=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,g=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,v=ci(e,t?.in);if(!jv(v))throw new RangeError("Invalid time value");let s=n.match(QS).map(a=>{const l=a[0];if(l==="p"||l==="P"){const h=VS[l];return h(a,c.formatLong)}return a}).join("").match(JS).map(a=>{if(a==="''")return{isToken:!1,value:"'"};const l=a[0];if(l==="'")return{isToken:!1,value:tT(a)};if(Uv[l])return{isToken:!0,value:a};if(l.match(eT))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:a}});c.localize.preprocessor&&(s=c.localize.preprocessor(v,s));const d={firstWeekContainsDate:u,weekStartsOn:g,locale:c};return s.map(a=>{if(!a.isToken)return a.value;const l=a.value;(!t?.useAdditionalWeekYearTokens&&Jv(l)||!t?.useAdditionalDayOfYearTokens&&Kv(l))&&Qv(l,n,String(e));const h=Uv[l[0]];return h(v,l,c.localize,d)}).join("")}function tT(e){const n=e.match(ZS);return n?n[1].replace(XS,"'"):e}var zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zv={exports:{}},Xv;function nT(){return Xv||(Xv=1,(function(e,n){(function(){var t="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var c=function(a,l,h){if(typeof a!="string"){c.original?c.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=l),c.modules[a]||(c.payloads[a]=h,c.modules[a]=null)};c.modules={},c.payloads={};var u=function(a,l,h){if(typeof l=="string"){var p=s(a,l);if(p!=null)return h&&h(),p}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var o=[],f=0,m=l.length;f<m;++f){var w=s(a,l[f]);if(w==null&&g.original)return;o.push(w)}return h&&h.apply(null,o)||!0}},g=function(a,l){var h=u("",a,l);return h==null&&g.original?g.original.apply(this,arguments):h},v=function(a,l){if(l.indexOf("!")!==-1){var h=l.split("!");return v(a,h[0])+"!"+v(a,h[1])}if(l.charAt(0)=="."){var p=a.split("/").slice(0,-1).join("/");for(l=p+"/"+l;l.indexOf(".")!==-1&&o!=l;){var o=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},s=function(a,l){l=v(a,l);var h=c.modules[l];if(!h){if(h=c.payloads[l],typeof h=="function"){var p={},o={id:l,uri:"",exports:p,packaged:!0},f=function(w,x){return u(l,w,x)},m=h(f,p,o);p=m||o.exports,c.modules[l]=p,delete c.payloads[l]}h=c.modules[l]=p||h}return h};function d(a){var l=r;r[a]||(r[a]={}),l=r[a],(!l.define||!l.define.packaged)&&(c.original=l.define,l.define=c,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(g.original=l.require,l.require=g,l.require.packaged=!0)}d(t)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(t,r,c){function u(g,v,s){Object.defineProperty(g,v,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||u(String.prototype,"startsWith",function(g,v){return v=v||0,this.lastIndexOf(g,v)===v}),String.prototype.endsWith||u(String.prototype,"endsWith",function(g,v){var s=this;(v===void 0||v>s.length)&&(v=s.length),v-=g.length;var d=s.indexOf(g,v);return d!==-1&&d===v}),String.prototype.repeat||u(String.prototype,"repeat",function(g){for(var v="",s=this;g>0;)g&1&&(v+=s),(g>>=1)&&(s+=s);return v}),String.prototype.includes||u(String.prototype,"includes",function(g,v){return this.indexOf(g,v)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var v=Object(g),s=1;s<arguments.length;s++){var d=arguments[s];d!=null&&Object.keys(d).forEach(function(a){v[a]=d[a]})}return v}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(v){return g[v]})}),Array.prototype.find||u(Array.prototype,"find",function(g){for(var v=this.length,s=arguments[1],d=0;d<v;d++){var a=this[d];if(g.call(s,a,d,this))return a}}),Array.prototype.findIndex||u(Array.prototype,"findIndex",function(g){for(var v=this.length,s=arguments[1],d=0;d<v;d++){var a=this[d];if(g.call(s,a,d,this))return d}}),Array.prototype.includes||u(Array.prototype,"includes",function(g,v){return this.indexOf(g,v)!=-1}),Array.prototype.fill||u(Array.prototype,"fill",function(g){for(var v=this,s=v.length>>>0,d=arguments[1],a=d>>0,l=a<0?Math.max(s+a,0):Math.min(a,s),h=arguments[2],p=h===void 0?s:h>>0,o=p<0?Math.max(s+p,0):Math.min(p,s);l<o;)v[l]=g,l++;return v}),Array.of||u(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(t,r,c){t("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(t,r,c){r.deepCopy=function u(g){if(typeof g!="object"||!g)return g;var v;if(Array.isArray(g)){v=[];for(var s=0;s<g.length;s++)v[s]=u(g[s]);return v}if(Object.prototype.toString.call(g)!=="[object Object]")return g;v={};for(var s in g)v[s]=u(g[s]);return v}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(t,r,c){r.last=function(v){return v[v.length-1]},r.stringReverse=function(v){return v.split("").reverse().join("")},r.stringRepeat=function(v,s){for(var d="";s>0;)s&1&&(d+=v),(s>>=1)&&(v+=v);return d};var u=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(v){return v.replace(u,"")},r.stringTrimRight=function(v){return v.replace(g,"")},r.copyObject=function(v){var s={};for(var d in v)s[d]=v[d];return s},r.copyArray=function(v){for(var s=[],d=0,a=v.length;d<a;d++)v[d]&&typeof v[d]=="object"?s[d]=this.copyObject(v[d]):s[d]=v[d];return s},r.deepCopy=t("./deep_copy").deepCopy,r.arrayToMap=function(v){for(var s={},d=0;d<v.length;d++)s[v[d]]=1;return s},r.createMap=function(v){var s=Object.create(null);for(var d in v)s[d]=v[d];return s},r.arrayRemove=function(v,s){for(var d=0;d<=v.length;d++)s===v[d]&&v.splice(d,1)},r.escapeRegExp=function(v){return v.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(v){return(""+v).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(v,s){var d=[];return v.replace(s,function(a){d.push({offset:arguments[arguments.length-2],length:a.length})}),d},r.deferredCall=function(v){var s=null,d=function(){s=null,v()},a=function(l){return a.cancel(),s=setTimeout(d,l||0),a};return a.schedule=a,a.call=function(){return this.cancel(),v(),a},a.cancel=function(){return clearTimeout(s),s=null,a},a.isPending=function(){return s},a},r.delayedCall=function(v,s){var d=null,a=function(){d=null,v()},l=function(h){d==null&&(d=setTimeout(a,h||s))};return l.delay=function(h){d&&clearTimeout(d),d=setTimeout(a,h||s)},l.schedule=l,l.call=function(){this.cancel(),v()},l.cancel=function(){d&&clearTimeout(d),d=null},l.isPending=function(){return d},l},r.sleep=function(v){return new Promise(function(s){setTimeout(s,v)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(v,s,d){return d&&v.codePointAt(s)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(t,r,c){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var u=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(u.platform)||["other"])[0].toLowerCase(),v=u.userAgent||"",s=u.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="linux",r.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((v.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((v.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=v.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(v.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(v.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(v.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(v.split(" Edge/")[1])||void 0,r.isAIR=v.indexOf("AdobeAIR")>=0,r.isAndroid=v.indexOf("Android")>=0,r.isChromeOS=v.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(v)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,r,c){var u=t("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function h(p,o,f){if(typeof p=="string"&&p){var m=document.createTextNode(p);return o&&o.appendChild(m),m}if(!Array.isArray(p))return p&&p.appendChild&&o&&o.appendChild(p),p;if(typeof p[0]!="string"||!p[0]){for(var w=[],x=0;x<p.length;x++){var R=h(p[x],o,f);R&&w.push(R)}return w}var T=document.createElement(p[0]),_=p[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var x=C;x<p.length;x++)h(p[x],T,f);return C==2&&Object.keys(_).forEach(function(P){var O=_[P];P==="class"?T.className=Array.isArray(O)?O.join(" "):O:typeof O=="function"||P=="value"||P[0]=="$"?T[P]=O:P==="ref"?f&&(f[O]=T):P==="style"?typeof O=="string"&&(T.style.cssText=O):O!=null&&T.setAttribute(P,O)}),o&&o.appendChild(T),T},r.getDocumentHead=function(h){return h||(h=document),h.head||h.getElementsByTagName("head")[0]||h.documentElement},r.createElement=function(h,p){return document.createElementNS?document.createElementNS(p||g,h):document.createElement(h)},r.removeChildren=function(h){h.innerHTML=""},r.createTextNode=function(h,p){var o=p?p.ownerDocument:document;return o.createTextNode(h)},r.createFragment=function(h){var p=h?h.ownerDocument:document;return p.createDocumentFragment()},r.hasCssClass=function(h,p){var o=(h.className+"").split(/\s+/g);return o.indexOf(p)!==-1},r.addCssClass=function(h,p){r.hasCssClass(h,p)||(h.className+=" "+p)},r.removeCssClass=function(h,p){for(var o=h.className.split(/\s+/g);;){var f=o.indexOf(p);if(f==-1)break;o.splice(f,1)}h.className=o.join(" ")},r.toggleCssClass=function(h,p){for(var o=h.className.split(/\s+/g),f=!0;;){var m=o.indexOf(p);if(m==-1)break;f=!1,o.splice(m,1)}return f&&o.push(p),h.className=o.join(" "),f},r.setCssClass=function(h,p,o){o?r.addCssClass(h,p):r.removeCssClass(h,p)},r.hasCssString=function(h,p){var o=0,f;if(p=p||document,f=p.querySelectorAll("style")){for(;o<f.length;)if(f[o++].id===h)return!0}},r.removeElementById=function(h,p){p=p||document,p.getElementById(h)&&p.getElementById(h).remove()};var v,s=[];r.useStrictCSP=function(h){v=h,h==!1?d():s||(s=[])};function d(){var h=s;s=null,h&&h.forEach(function(p){a(p[0],p[1])})}function a(h,p,o){if(!(typeof document>"u")){if(s){if(o)d();else if(o===!1)return s.push([h,p])}if(!v){var f=o;!o||!o.getRootNode?f=document:(f=o.getRootNode(),(!f||f==o)&&(f=document));var m=f.ownerDocument||f;if(p&&r.hasCssString(p,f))return null;p&&(h+=`
11
+ /*# sourceURL=ace/css/`+p+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(h)),p&&(w.id=p),f==m&&(f=r.getDocumentHead(m)),f.insertBefore(w,f.firstChild)}}}if(r.importCssString=a,r.importCssStylsheet=function(h,p){r.buildDom(["link",{rel:"stylesheet",href:h}],r.getDocumentHead(p))},r.$fixPositionBug=function(h){var p=h.getBoundingClientRect();if(h.style.left){var o=parseFloat(h.style.left),f=+p.left;Math.abs(o-f)>1&&(h.style.left=2*o-f+"px")}if(h.style.right){var o=parseFloat(h.style.right),f=window.innerWidth-p.right;Math.abs(o-f)>1&&(h.style.right=2*o-f+"px")}if(h.style.top){var o=parseFloat(h.style.top),f=+p.top;Math.abs(o-f)>1&&(h.style.top=2*o-f+"px")}if(h.style.bottom){var o=parseFloat(h.style.bottom),f=window.innerHeight-p.bottom;Math.abs(o-f)>1&&(h.style.bottom=2*o-f+"px")}},r.scrollbarWidth=function(h){var p=r.createElement("ace_inner");p.style.width="100%",p.style.minWidth="0px",p.style.height="200px",p.style.display="block";var o=r.createElement("ace_outer"),f=o.style;f.position="absolute",f.left="-10000px",f.overflow="hidden",f.width="200px",f.minWidth="0px",f.height="150px",f.display="block",o.appendChild(p);var m=h&&h.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var w=p.offsetWidth;f.overflow="scroll";var x=p.offsetWidth;return w===x&&(x=o.clientWidth),m.removeChild(o),w-x},r.computedStyle=function(h,p){return window.getComputedStyle(h,"")||{}},r.setStyle=function(h,p,o){h[p]!==o&&(h[p]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=u.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,u.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");r.HI_DPI&&l.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!u.isEdge&&typeof l.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),l=null}r.HAS_CSS_TRANSFORMS?r.translate=function(h,p,o){h.style.transform="translate("+Math.round(p)+"px, "+Math.round(o)+"px)"}:r.translate=function(h,p,o){h.style.top=Math.round(o)+"px",h.style.left=Math.round(p)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,r,c){var u=t("./dom");r.get=function(g,v){var s=new XMLHttpRequest;s.open("GET",g,!0),s.onreadystatechange=function(){s.readyState===4&&v(s.responseText)},s.send(null)},r.loadScript=function(g,v){var s=u.getDocumentHead(),d=document.createElement("script");d.src=g,s.appendChild(d),d.onload=d.onreadystatechange=function(a,l){(l||!d.readyState||d.readyState=="loaded"||d.readyState=="complete")&&(d=d.onload=d.onreadystatechange=null,l||v())}},r.qualifyURL=function(g){var v=document.createElement("a");return v.href=g,v.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,r,c){r.inherits=function(u,g){u.super_=g,u.prototype=Object.create(g.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(u,g){for(var v in g)u[v]=g[v];return u},r.implement=function(u,g){r.mixin(u,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,r,c){var u={},g=function(){this.propagationStopped=!0},v=function(){this.defaultPrevented=!0};u._emit=u._dispatchEvent=function(s,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[s]||[],l=this._defaultHandlers[s];if(!(!a.length&&!l)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=s),d.stopPropagation||(d.stopPropagation=g),d.preventDefault||(d.preventDefault=v),a=a.slice();for(var h=0;h<a.length&&(a[h](d,this),!d.propagationStopped);h++);if(l&&!d.defaultPrevented)return l(d,this)}},u._signal=function(s,d){var a=(this._eventRegistry||{})[s];if(a){a=a.slice();for(var l=0;l<a.length;l++)a[l](d,this)}},u.once=function(s,d){var a=this;if(this.on(s,function l(){a.off(s,l),d.apply(null,arguments)}),!d)return new Promise(function(l){d=l})},u.setDefaultHandler=function(s,d){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[s]){var l=a[s],h=a._disabled_[s];h||(a._disabled_[s]=h=[]),h.push(l);var p=h.indexOf(d);p!=-1&&h.splice(p,1)}a[s]=d},u.removeDefaultHandler=function(s,d){var a=this._defaultHandlers;if(a){var l=a._disabled_[s];if(a[s]==d)l&&this.setDefaultHandler(s,l.pop());else if(l){var h=l.indexOf(d);h!=-1&&l.splice(h,1)}}},u.on=u.addEventListener=function(s,d,a){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[s];return l||(l=this._eventRegistry[s]=[]),l.indexOf(d)==-1&&l[a?"unshift":"push"](d),d},u.off=u.removeListener=u.removeEventListener=function(s,d){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[s];if(a){var l=a.indexOf(d);l!==-1&&a.splice(l,1)}},u.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0)},r.EventEmitter=u}),ace.define("ace/lib/report_error",["require","exports","module"],function(t,r,c){r.reportError=function(u,g){var v=new Error(u);v.data=g,typeof console=="object"&&console.error&&console.error(v),setTimeout(function(){throw v})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(t,r,c){var u={"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=u}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(t,r,c){"no use strict";var u=t("./oop"),g=t("./event_emitter").EventEmitter,v=t("./report_error").reportError,s=t("./default_english_messages").defaultEnglishMessages,d={setOptions:function(o){Object.keys(o).forEach(function(f){this.setOption(f,o[f])},this)},getOptions:function(o){var f={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var m=this.$options;o=Object.keys(m).filter(function(w){return!m[w].hidden})}return o.forEach(function(w){f[w]=this.getOption(w)},this),f},setOption:function(o,f){if(this["$"+o]!==f){var m=this.$options[o];if(!m)return a('misspelled option "'+o+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(o,f);m.handlesSet||(this["$"+o]=f),m&&m.set&&m.set.call(this,f)}},getOption:function(o){var f=this.$options[o];return f?f.forwardTo?this[f.forwardTo]&&this[f.forwardTo].getOption(o):f&&f.get?f.get.call(this):this["$"+o]:a('misspelled option "'+o+'"')}};function a(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var l,h,p=(function(){function o(){this.$defaultOptions={},l=s,h="dollarSigns"}return o.prototype.defineOptions=function(f,m,w){return f.$options||(this.$defaultOptions[m]=f.$options={}),Object.keys(w).forEach(function(x){var R=w[x];typeof R=="string"&&(R={forwardTo:R}),R.name||(R.name=x),f.$options[R.name]=R,"initialValue"in R&&(f["$"+R.name]=R.initialValue)}),u.implement(f,d),this},o.prototype.resetOptions=function(f){Object.keys(f.$options).forEach(function(m){var w=f.$options[m];"value"in w&&f.setOption(m,w.value)})},o.prototype.setDefaultValue=function(f,m,w){if(!f){for(f in this.$defaultOptions)if(this.$defaultOptions[f][m])break;if(!this.$defaultOptions[f][m])return!1}var x=this.$defaultOptions[f]||(this.$defaultOptions[f]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},o.prototype.setDefaultValues=function(f,m){Object.keys(m).forEach(function(w){this.setDefaultValue(f,w,m[w])},this)},o.prototype.setMessages=function(f,m){l=f,m&&m.placeholders&&(h=m.placeholders)},o.prototype.nls=function(f,m,w){l[f]||(a("No message found for the key '"+f+"' in messages with id "+l.$id+", trying to find a translation for the default string '"+m+"'."),l[m]||a("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=l[f]||l[m]||m;return w&&(h==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(R,T){return T=="$"?"$":w[T]})),h==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(R,T){return w[T]}))),x},o})();p.prototype.warn=a,p.prototype.reportError=v,u.implement(p.prototype,g),r.AppConfig=p}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(t,r,c){c.exports=`.ace-tm .ace_gutter {
12
+ background: #f0f0f0;
13
+ color: #333;
14
+ }
15
+
16
+ .ace-tm .ace_print-margin {
17
+ width: 1px;
18
+ background: #e8e8e8;
19
+ }
20
+
21
+ .ace-tm .ace_fold {
22
+ background-color: #6B72E6;
23
+ }
24
+
25
+ .ace-tm {
26
+ background-color: #FFFFFF;
27
+ color: black;
28
+ }
29
+
30
+ .ace-tm .ace_cursor {
31
+ color: black;
32
+ }
33
+
34
+ .ace-tm .ace_invisible {
35
+ color: rgb(191, 191, 191);
36
+ }
37
+
38
+ .ace-tm .ace_storage,
39
+ .ace-tm .ace_keyword {
40
+ color: blue;
41
+ }
42
+
43
+ .ace-tm .ace_constant {
44
+ color: rgb(197, 6, 11);
45
+ }
46
+
47
+ .ace-tm .ace_constant.ace_buildin {
48
+ color: rgb(88, 72, 246);
49
+ }
50
+
51
+ .ace-tm .ace_constant.ace_language {
52
+ color: rgb(88, 92, 246);
53
+ }
54
+
55
+ .ace-tm .ace_constant.ace_library {
56
+ color: rgb(6, 150, 14);
57
+ }
58
+
59
+ .ace-tm .ace_invalid {
60
+ background-color: rgba(255, 0, 0, 0.1);
61
+ color: red;
62
+ }
63
+
64
+ .ace-tm .ace_support.ace_function {
65
+ color: rgb(60, 76, 114);
66
+ }
67
+
68
+ .ace-tm .ace_support.ace_constant {
69
+ color: rgb(6, 150, 14);
70
+ }
71
+
72
+ .ace-tm .ace_support.ace_type,
73
+ .ace-tm .ace_support.ace_class {
74
+ color: rgb(109, 121, 222);
75
+ }
76
+
77
+ .ace-tm .ace_keyword.ace_operator {
78
+ color: rgb(104, 118, 135);
79
+ }
80
+
81
+ .ace-tm .ace_string {
82
+ color: rgb(3, 106, 7);
83
+ }
84
+
85
+ .ace-tm .ace_comment {
86
+ color: rgb(76, 136, 107);
87
+ }
88
+
89
+ .ace-tm .ace_comment.ace_doc {
90
+ color: rgb(0, 102, 255);
91
+ }
92
+
93
+ .ace-tm .ace_comment.ace_doc.ace_tag {
94
+ color: rgb(128, 159, 191);
95
+ }
96
+
97
+ .ace-tm .ace_constant.ace_numeric {
98
+ color: rgb(0, 0, 205);
99
+ }
100
+
101
+ .ace-tm .ace_variable {
102
+ color: rgb(49, 132, 149);
103
+ }
104
+
105
+ .ace-tm .ace_xml-pe {
106
+ color: rgb(104, 104, 91);
107
+ }
108
+
109
+ .ace-tm .ace_entity.ace_name.ace_function {
110
+ color: #0000A2;
111
+ }
112
+
113
+
114
+ .ace-tm .ace_heading {
115
+ color: rgb(12, 7, 255);
116
+ }
117
+
118
+ .ace-tm .ace_list {
119
+ color:rgb(185, 6, 144);
120
+ }
121
+
122
+ .ace-tm .ace_meta.ace_tag {
123
+ color:rgb(0, 22, 142);
124
+ }
125
+
126
+ .ace-tm .ace_string.ace_regex {
127
+ color: rgb(255, 0, 0)
128
+ }
129
+
130
+ .ace-tm .ace_marker-layer .ace_selection {
131
+ background: rgb(181, 213, 255);
132
+ }
133
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
134
+ box-shadow: 0 0 3px 0px white;
135
+ }
136
+ .ace-tm .ace_marker-layer .ace_step {
137
+ background: rgb(252, 255, 0);
138
+ }
139
+
140
+ .ace-tm .ace_marker-layer .ace_stack {
141
+ background: rgb(164, 229, 101);
142
+ }
143
+
144
+ .ace-tm .ace_marker-layer .ace_bracket {
145
+ margin: -1px 0 0 -1px;
146
+ border: 1px solid rgb(192, 192, 192);
147
+ }
148
+
149
+ .ace-tm .ace_marker-layer .ace_active-line {
150
+ background: rgba(0, 0, 0, 0.07);
151
+ }
152
+
153
+ .ace-tm .ace_gutter-active-line {
154
+ background-color : #dcdcdc;
155
+ }
156
+
157
+ .ace-tm .ace_marker-layer .ace_selected-word {
158
+ background: rgb(250, 250, 255);
159
+ border: 1px solid rgb(200, 200, 250);
160
+ }
161
+
162
+ .ace-tm .ace_indent-guide {
163
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
164
+ }
165
+
166
+ .ace-tm .ace_indent-guide-active {
167
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
168
+ }
169
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,r,c){r.isDark=!1,r.cssClass="ace-tm",r.cssText=t("./textmate-css"),r.$id="ace/theme/textmate";var u=t("../lib/dom");u.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(t,r,c){"no use strict";var u=t("./lib/lang"),g=t("./lib/net"),v=t("./lib/dom"),s=t("./lib/app_config").AppConfig;c.exports=r=new s;var d={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(p){if(!d.hasOwnProperty(p))throw new Error("Unknown config key: "+p);return d[p]},r.set=function(p,o){if(d.hasOwnProperty(p))d[p]=o;else if(this.setDefaultValue("",p,o)==!1)throw new Error("Unknown config key: "+p);p=="useStrictCSP"&&v.useStrictCSP(o)},r.all=function(){return u.copyObject(d)},r.$modes={},r.moduleUrl=function(p,o){if(d.$moduleUrls[p])return d.$moduleUrls[p];var f=p.split("/");o=o||f[f.length-2]||"";var m=o=="snippets"?"/":"-",w=f[f.length-1];if(o=="worker"&&m=="-"){var x=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(x,"")}(!w||w==o)&&f.length>1&&(w=f[f.length-2]);var R=d[o+"Path"];return R==null?R=d.basePath:m=="/"&&(o=m=""),R&&R.slice(-1)!="/"&&(R+="/"),R+o+m+w+this.get("suffix")},r.setModuleUrl=function(p,o){return d.$moduleUrls[p]=o};var a=function(p,o){if(p==="ace/theme/textmate"||p==="./theme/textmate")return o(null,t("./theme/textmate"));if(l)return l(p,o);console.error("loader is not configured")},l;r.setLoader=function(p){l=p},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(p,o){var f;if(Array.isArray(p))var m=p[0],w=p[1];else if(typeof p=="string")var w=p;var x=function(R){if(R&&!r.$loading[w])return o&&o(R);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var T=function(){a(w,function(_,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var P=r.$loading[w];r.$loading[w]=null,P.forEach(function(O){O&&O(C)})})};if(!r.get("packaged"))return T();g.loadScript(r.moduleUrl(w,m),T),h()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(R){R.default?x(R.default):x(R)});else{try{f=this.$require(w)}catch{}x(f||r.$loaded[w])}},r.$require=function(p){if(typeof c.require=="function"){var o="require";return c[o](p)}},r.setModuleLoader=function(p,o){r.dynamicModules[p]=o};var h=function(){!d.basePath&&!d.workerPath&&!d.modePath&&!d.themePath&&!Object.keys(d.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),h=function(){})};r.version="1.45.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,r,c){t("./lib/fixoldbrowsers");var u=t("./config");u.setLoader(function(d,a){t([d],function(l){a(null,l)})});var g=(function(){return this||typeof window<"u"&&window})();c.exports=function(d){u.init=v,u.$require=t,d.require=t},v(!0);function v(d){if(!(!g||!g.document)){u.set("packaged",d||t.packaged||c.packaged||g.define&&(void 0).packaged);var a={},l="",h=document.currentScript||document._currentScript,p=h&&h.ownerDocument||document;h&&h.src&&(l=h.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=p.getElementsByTagName("script"),f=0;f<o.length;f++){var m=o[f],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,R=0,T=x.length;R<T;R++){var _=x[R];_.name.indexOf("data-ace-")===0&&(a[s(_.name.replace(/^data-ace-/,""))]=_.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(l=C[1])}}l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var P in a)typeof a[P]<"u"&&u.set(P,a[P])}}function s(d){return d.replace(/-(.)/g,function(a,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(t,r,c){var u=(function(){function g(v,s,d,a){this.start={row:v,column:s},this.end={row:d,column:a}}return g.prototype.isEqual=function(v){return this.start.row===v.start.row&&this.end.row===v.end.row&&this.start.column===v.start.column&&this.end.column===v.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(v,s){return this.compare(v,s)==0},g.prototype.compareRange=function(v){var s,d=v.end,a=v.start;return s=this.compare(d.row,d.column),s==1?(s=this.compare(a.row,a.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(a.row,a.column),s==-1?-1:s==1?42:0)},g.prototype.comparePoint=function(v){return this.compare(v.row,v.column)},g.prototype.containsRange=function(v){return this.comparePoint(v.start)==0&&this.comparePoint(v.end)==0},g.prototype.intersects=function(v){var s=this.compareRange(v);return s==-1||s==0||s==1},g.prototype.isEnd=function(v,s){return this.end.row==v&&this.end.column==s},g.prototype.isStart=function(v,s){return this.start.row==v&&this.start.column==s},g.prototype.setStart=function(v,s){typeof v=="object"?(this.start.column=v.column,this.start.row=v.row):(this.start.row=v,this.start.column=s)},g.prototype.setEnd=function(v,s){typeof v=="object"?(this.end.column=v.column,this.end.row=v.row):(this.end.row=v,this.end.column=s)},g.prototype.inside=function(v,s){return this.compare(v,s)==0?!(this.isEnd(v,s)||this.isStart(v,s)):!1},g.prototype.insideStart=function(v,s){return this.compare(v,s)==0?!this.isEnd(v,s):!1},g.prototype.insideEnd=function(v,s){return this.compare(v,s)==0?!this.isStart(v,s):!1},g.prototype.compare=function(v,s){return!this.isMultiLine()&&v===this.start.row?s<this.start.column?-1:s>this.end.column?1:0:v<this.start.row?-1:v>this.end.row?1:this.start.row===v?s>=this.start.column?0:-1:this.end.row===v?s<=this.end.column?0:1:0},g.prototype.compareStart=function(v,s){return this.start.row==v&&this.start.column==s?-1:this.compare(v,s)},g.prototype.compareEnd=function(v,s){return this.end.row==v&&this.end.column==s?1:this.compare(v,s)},g.prototype.compareInside=function(v,s){return this.end.row==v&&this.end.column==s?1:this.start.row==v&&this.start.column==s?-1:this.compare(v,s)},g.prototype.clipRows=function(v,s){if(this.end.row>s)var d={row:s+1,column:0};else if(this.end.row<v)var d={row:v,column:0};if(this.start.row>s)var a={row:s+1,column:0};else if(this.start.row<v)var a={row:v,column:0};return g.fromPoints(a||this.start,d||this.end)},g.prototype.extend=function(v,s){var d=this.compare(v,s);if(d==0)return this;if(d==-1)var a={row:v,column:s};else var l={row:v,column:s};return g.fromPoints(a||this.start,l||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(v){var s=v.documentToScreenPosition(this.start),d=v.documentToScreenPosition(this.end);return new g(s.row,s.column,d.row,d.column)},g.prototype.moveBy=function(v,s){this.start.row+=v,this.start.column+=s,this.end.row+=v,this.end.column+=s},g})();u.fromPoints=function(g,v){return new u(g.row,g.column,v.row,v.column)},u.comparePoints=function(g,v){return g.row-v.row||g.column-v.column},r.Range=u}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,r,c){for(var u=t("./oop"),g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},v={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},s=0;s<10;s++)v["Digit"+s]=48+s,v["Numpad"+s]=96+s,g.PRINTABLE_KEYS[48+s]=""+s,g.FUNCTION_KEYS[96+s]="Numpad"+s;for(var s=65;s<91;s++){var d=String.fromCharCode(s+32);v["Key"+d.toUpperCase()]=s,g.PRINTABLE_KEYS[s]=d}for(var s=1;s<13;s++)v["F"+s]=111+s,g.FUNCTION_KEYS[111+s]="F"+s;var a={Shift:16,Control:17,Alt:18,Meta:224};for(var l in a)v[l]=v[l+"Left"]=v[l+"Right"]=a[l];r.$codeToKeyCode=v,g.PRINTABLE_KEYS[173]="-";for(var h in g.FUNCTION_KEYS){var p=g.FUNCTION_KEYS[h].toLowerCase();g[p]=parseInt(h,10)}for(var h in g.PRINTABLE_KEYS){var p=g.PRINTABLE_KEYS[h].toLowerCase();g[p]=parseInt(h,10)}u.mixin(g,g.MODIFIER_KEYS),u.mixin(g,g.PRINTABLE_KEYS),u.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],f=Math.pow(2,o.length);f--;)g.KEY_MODS[f]=o.filter(function(m){return f&g.KEY_MODS[m]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",u.mixin(r,g),r.default=r,r.keyCodeToString=function(o){var f=g[o];return typeof f!="string"&&(f=String.fromCharCode(o)),f.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,c){var u=t("./keys"),g=t("./useragent"),v=null,s=0,d;function a(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function l(){return d==null&&a(),d}function h(R,T,_){this.elem=R,this.type=T,this.callback=_}h.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var p=r.addListener=function(R,T,_,C){R.addEventListener(T,_,l()),C&&C.$toDestroy.push(new h(R,T,_))},o=r.removeListener=function(R,T,_){R.removeEventListener(T,_,l())};r.stopEvent=function(R){return r.stopPropagation(R),r.preventDefault(R),!1},r.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},r.preventDefault=function(R){R.preventDefault&&R.preventDefault()},r.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||g.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},r.capture=function(R,T,_){var C=R&&R.ownerDocument||document;function P(O){T&&T(O),_&&_(O),o(C,"mousemove",T),o(C,"mouseup",P),o(C,"dragstart",P)}return p(C,"mousemove",T),p(C,"mouseup",P),p(C,"dragstart",P),P},r.addMouseWheelListener=function(R,T,_){p(R,"wheel",function(C){var P=.15,O=C.deltaX||0,E=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=O*P,C.wheelY=E*P;break;case C.DOM_DELTA_LINE:var k=15;C.wheelX=O*k,C.wheelY=E*k;break;case C.DOM_DELTA_PAGE:var B=150;C.wheelX=O*B,C.wheelY=E*B;break}T(C)},_)},r.addMultiMouseDownListener=function(R,T,_,C,P){var O=0,E,k,B,N={2:"dblclick",3:"tripleclick",4:"quadclick"};function M($){if(r.getButton($)!==0?O=0:$.detail>1?(O++,O>4&&(O=1)):O=1,g.isIE){var A=Math.abs($.clientX-E)>5||Math.abs($.clientY-k)>5;(!B||A)&&(O=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},T[O-1]||600),O==1&&(E=$.clientX,k=$.clientY)}if($._clicks=O,_[C]("mousedown",$),O>4)O=0;else if(O>1)return _[C](N[O],$)}Array.isArray(R)||(R=[R]),R.forEach(function($){p($,"mousedown",M,P)})};function f(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}r.getModifierString=function(R){return u.KEY_MODS[f(R)]};function m(R,T,_){var C=f(T);if(!_&&T.code&&(_=u.$codeToKeyCode[T.code]||_),!g.isMac&&v){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(C|=8),v.altGr)if((3&C)!=3)v.altGr=0;else return;if(_===18||_===17){var P=T.location;if(_===17&&P===1)v[_]==1&&(s=T.timeStamp);else if(_===18&&C===3&&P===2){var O=T.timeStamp-s;O<50&&(v.altGr=!0)}}}if(_ in u.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&T.location===3&&(R(T,C,-_),T.defaultPrevented))){if(g.isChromeOS&&C&8){if(R(T,C,_),T.defaultPrevented)return;C&=-9}return!C&&!(_ in u.FUNCTION_KEYS)&&!(_ in u.PRINTABLE_KEYS)?!1:R(T,C,_)}}r.addCommandKeyListener=function(R,T,_){var C=null;p(R,"keydown",function(P){v[P.keyCode]=(v[P.keyCode]||0)+1;var O=m(T,P,P.keyCode);return C=P.defaultPrevented,O},_),p(R,"keypress",function(P){C&&(P.ctrlKey||P.altKey||P.shiftKey||P.metaKey)&&(r.stopEvent(P),C=null)},_),p(R,"keyup",function(P){v[P.keyCode]=null},_),v||(w(),p(window,"focus",w))};function w(){v=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(R,T){T=T||window;var _="zero-timeout-message-"+x++,C=function(P){P.data==_&&(r.stopPropagation(P),o(T,"message",C),R())};p(T,"message",C),T.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(R,T){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):R()},T)},r.$idleBlockId=null,r.blockIdle=function(R){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},R||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(t,r,c){var u;c.exports={lineMode:!1,pasteCancelled:function(){return u&&u>Date.now()-50?!0:u=!1},cancel:function(){u=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,r,c){var u=t("../lib/event"),g=t("../config").nls,v=t("../lib/useragent"),s=t("../lib/dom"),d=t("../lib/lang"),a=t("../clipboard"),l=v.isChrome<18,h=v.isIE,p=v.isChrome>63,o=400,f=t("../lib/keys"),m=f.KEY_MODS,w=v.isIOS,x=w?/\s/:/\n/,R=v.isMobile,T=(function(){function _(C,P){var O=this;this.host=P,this.text=s.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",R||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),u.addListener(this.text,"blur",function(E){O.ignoreFocusEvents||(P.onBlur(E),O.$isFocused=!1)},P),u.addListener(this.text,"focus",function(E){if(!O.ignoreFocusEvents){if(O.$isFocused=!0,v.isEdge)try{if(!document.hasFocus())return}catch{}P.onFocus(E),v.isEdge?setTimeout(O.resetSelection.bind(O)):O.resetSelection()}},P),this.$focusScroll=!1,P.on("beforeEndOperation",function(){var E=P.curOp,k=E&&E.command&&E.command.name;if(k!="insertstring"){var B=k&&(E.docChanged||E.selectionChanged);O.inComposition&&B&&(O.lastValue=O.text.value="",O.onCompositionEnd()),O.resetSelection()}}),P.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&P.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,u.addCommandKeyListener(this.text,function(E,k,B){if(!O.inComposition)return P.onCommandKey(E,k,B)},P),u.addListener(this.text,"select",this.onSelect.bind(this),P),u.addListener(this.text,"input",this.onInput.bind(this),P),u.addListener(this.text,"cut",this.onCut.bind(this),P),u.addListener(this.text,"copy",this.onCopy.bind(this),P),u.addListener(this.text,"paste",this.onPaste.bind(this),P),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&u.addListener(C,"keydown",function(E){if(!(v.isMac&&!E.metaKey||!E.ctrlKey))switch(E.keyCode){case 67:O.onCopy(E);break;case 86:O.onPaste(E);break;case 88:O.onCut(E);break}},P),this.syncComposition=d.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),u.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),P),u.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),P),u.addListener(this.text,"keyup",this.onKeyup.bind(this),P),u.addListener(this.text,"keydown",this.syncComposition.bind(this),P),u.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),P),this.closeTimeout,u.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),P),u.addListener(this.text,"mousedown",function(E){E.preventDefault(),O.onContextMenuClose()},P),u.addListener(P.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),P),u.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),P),w&&this.addIosSelectionHandler(C,P,this.text)}return _.prototype.addIosSelectionHandler=function(C,P,O){var E=this,k=null,B=!1;O.addEventListener("keydown",function(M){k&&clearTimeout(k),B=!0},!0),O.addEventListener("keyup",function(M){k=setTimeout(function(){B=!1},100)},!0);var N=function(M){if(document.activeElement===O&&!(B||E.inComposition||P.$mouseHandler.isMousePressed)&&!E.copied){var $=O.selectionStart,A=O.selectionEnd,D=null,j=0;if($==0?D=f.up:$==1?D=f.home:A>E.lastSelectionEnd&&E.lastValue[A]==`
170
+ `?D=f.end:$<E.lastSelectionStart&&E.lastValue[$-1]==" "?(D=f.left,j=m.option):$<E.lastSelectionStart||$==E.lastSelectionStart&&E.lastSelectionEnd!=E.lastSelectionStart&&$==A?D=f.left:A>E.lastSelectionEnd&&E.lastValue.slice(0,A).split(`
171
+ `).length>2?D=f.down:A>E.lastSelectionEnd&&E.lastValue[A-1]==" "?(D=f.right,j=m.option):(A>E.lastSelectionEnd||A==E.lastSelectionEnd&&E.lastSelectionEnd!=E.lastSelectionStart&&$==A)&&(D=f.right),$!==A&&(j|=m.shift),D){var U=P.onCommandKey({},j,D);if(!U&&P.commands){D=f.keyCodeToString(D);var q=P.commands.findKeyCommand(j,D);q&&P.execCommand(q)}E.lastSelectionStart=$,E.lastSelectionEnd=A,E.resetSelection("")}}};document.addEventListener("selectionchange",N),P.on("destroy",function(){document.removeEventListener("selectionchange",N)})},_.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},_.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},_.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},_.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},_.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var P=this.host.getSelectionRange();P.end.row=P.start.row,P.end.column=P.start.column,this.inComposition.markerRange=P,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},_.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},_.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},_.prototype.onCut=function(C){this.doCopy(C,!0)},_.prototype.onCopy=function(C){this.doCopy(C,!1)},_.prototype.onPaste=function(C){var P=this.handleClipboardData(C);a.pasteCancelled()||(typeof P=="string"?(P&&this.host.onPaste(P,C),v.isIE&&setTimeout(this.resetSelection),u.preventDefault(C)):(this.text.value="",this.pasted=!0))},_.prototype.doCopy=function(C,P){var O=this,E=this.host.getCopyText();if(!E)return u.preventDefault(C);this.handleClipboardData(C,E)?(w&&(this.resetSelection(E),this.copied=E,setTimeout(function(){O.copied=!1},10)),P?this.host.onCut():this.host.onCopy(),u.preventDefault(C)):(this.copied=!0,this.text.value=E,this.text.select(),setTimeout(function(){O.copied=!1,O.resetSelection(),P?O.host.onCut():O.host.onCopy()}))},_.prototype.handleClipboardData=function(C,P,O){var E=C.clipboardData||window.clipboardData;if(!(!E||l)){var k=h||O?"Text":"text/plain";try{return P?E.setData(k,P)!==!1:E.getData(k)}catch(B){if(!O)return this.handleClipboardData(B,P,!0)}}},_.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var P=this.text.value,O=this.sendText(P,!0);(P.length>o+100||x.test(O)||R&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},_.prototype.sendText=function(C,P){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var O=this.text.selectionStart,E=this.text.selectionEnd,k=this.lastSelectionStart,B=this.lastValue.length-this.lastSelectionEnd,N=C,M=C.length-O,$=C.length-E,A=0;k>0&&this.lastValue[A]==C[A];)A++,k--;for(N=N.slice(A),A=1;B>0&&this.lastValue.length-A>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-A]==C[C.length-A];)A++,B--;M-=A-1,$-=A-1;var D=N.length-A+1;if(D<0&&(k=-D,D=0),N=N.slice(0,D),!P&&!N&&!M&&!k&&!B&&!$)return"";this.sendingText=!0;var j=!1;return v.isAndroid&&N==". "&&(N=" ",j=!0),N&&!k&&!B&&!M&&!$||this.commandMode?this.host.onTextInput(N):this.host.onTextInput(N,{extendLeft:k,extendRight:B,restoreStart:M,restoreEnd:$}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=O,this.lastSelectionEnd=E,this.lastRestoreEnd=$,j?`
172
+ `:N},_.prototype.onSelect=function(C){var P=this;if(!this.inComposition){var O=function(E){return E.selectionStart===0&&E.selectionEnd>=P.lastValue.length&&E.value===P.lastValue&&P.lastValue&&E.selectionEnd!==P.lastSelectionEnd};this.copied?this.copied=!1:O(this.text)?(this.host.selectAll(),this.resetSelection()):R&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},_.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var P=`
173
+ ab`+C+`cde fg
174
+ `;P!=this.text.value&&(this.text.value=this.lastValue=P);var O=4,E=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=O||this.lastSelectionEnd!=E)&&this.text.setSelectionRange(O,E),this.lastSelectionStart=O,this.lastSelectionEnd=E}},_.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var P=0,O=0,E="",k=function(q,Q){for(var re=Q,le=1;le<=q-C.rowStart&&le<2*C.numberOfExtraLines+1;le++)re+=C.host.session.getLine(q-le).length+1;return re};if(this.host.session){var B=this.host.selection,N=B.getRange(),M=B.cursor.row;M===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):M===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(M<this.rowStart-1||M>this.rowEnd+1)&&(this.rowStart=M>this.numberOfExtraLines?M-this.numberOfExtraLines:0,this.rowEnd=M>this.numberOfExtraLines?M+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var $=[],A=this.rowStart;A<=this.rowEnd;A++)$.push(this.host.session.getLine(A));if(E=$.join(`
175
+ `),P=k(N.start.row,N.start.column),O=k(N.end.row,N.end.column),N.start.row<this.rowStart){var D=this.host.session.getLine(this.rowStart-1);P=N.start.row<this.rowStart-1?0:P,O+=D.length+1,E=D+`
176
+ `+E}else if(N.end.row>this.rowEnd){var j=this.host.session.getLine(this.rowEnd+1);O=N.end.row>this.rowEnd+1?j.length:N.end.column,O+=E.length+1,E=E+`
177
+ `+j}else R&&M>0&&(E=`
178
+ `+E,O+=1,P+=1);E.length>o&&(P<o&&O<o?E=E.slice(0,o):(E=`
179
+ `,P==O?P=O=0:(P=0,O=1)));var U=E+`
180
+
181
+ `;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=O||this.lastSelectionStart!=P||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(P,O),this.lastSelectionStart=P,this.lastSelectionEnd=O}catch{}this.inComposition=!1}},_.prototype.setHost=function(C){this.host=C},_.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},_.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var P=this.host.session.selection.cursor.row;C+=g("text-input.aria-label","Cursor at row $0",[P+1])}this.text.setAttribute("aria-label",C)},_.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},_.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||p||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var P=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var O=this.text.getBoundingClientRect().top!=0}catch{return}var E=[];if(O)for(var k=this.text.parentElement;k&&k.nodeType==1;)E.push(k),k.setAttribute("ace_nocontext","true"),!k.parentElement&&k.getRootNode?k=k.getRootNode().host:k=k.parentElement;this.text.focus({preventScroll:!0}),O&&E.forEach(function(B){B.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=P)},0)},_.prototype.blur=function(){this.text.blur()},_.prototype.isFocused=function(){return this.$isFocused},_.prototype.setInputHandler=function(C){this.inputHandler=C},_.prototype.getInputHandler=function(){return this.inputHandler},_.prototype.getElement=function(){return this.text},_.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},_.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},_.prototype.setCopyWithEmptySelection=function(C){},_.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},_.prototype.moveToMouse=function(C,P){var O=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(P?"z-index:100000;":"")+(v.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var E=this.host.container.getBoundingClientRect(),k=s.computedStyle(this.host.container),B=E.top+(parseInt(k.borderTopWidth)||0),N=E.left+(parseInt(k.borderLeftWidth)||0),M=E.bottom-B-this.text.clientHeight-2,$=function(A){s.translate(O.text,A.clientX-N-2,Math.min(A.clientY-B-2,M))};$(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),v.isWin&&u.capture(this.host.container,$,this.onContextMenuClose.bind(this)))},_.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},_})();r.TextInput=T,r.$setUserAgentForTests=function(_,C){R=_,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,r,c){var u=t("../lib/useragent"),g=0,v=550,s=(function(){function l(h){h.$clickSelection=null;var p=h.editor;p.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),p.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),p.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),p.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),p.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(f){h[f]=this[f]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return l.prototype.onMouseDown=function(h){var p=h.inSelection(),o=h.getDocumentPosition();this.mousedownEvent=h;var f=this.editor,m=h.getButton();if(m!==0){var w=f.getSelectionRange(),x=w.isEmpty();(x||m==1)&&f.selection.moveToPosition(o),m==2&&(f.textInput.onContextMenu(h.domEvent),u.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),p&&!f.isFocused()&&(f.focus(),this.$focusTimeout&&!this.$clickSelection&&!f.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(o,h.domEvent._clicks>1),h.preventDefault()},l.prototype.startSelect=function(h,p){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(h):p||o.selection.moveToPosition(h),p||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var h,p=this.editor,o=p.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(o);if(f==-1)h=this.$clickSelection.end;else if(f==1)h=this.$clickSelection.start;else{var m=a(this.$clickSelection,o,p.session);o=m.cursor,h=m.anchor}p.selection.setSelectionAnchor(h.row,h.column)}p.selection.selectToPosition(o),p.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(h){var p,o=this.editor,f=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[h](f.row,f.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)p=this.$clickSelection.end,(m.end.row!=f.row||m.end.column!=f.column)&&(f=m.start);else if(x==1&&w>=0)p=this.$clickSelection.start,(m.start.row!=f.row||m.start.column!=f.column)&&(f=m.end);else if(w==-1&&x==1)f=m.end,p=m.start;else{var R=a(this.$clickSelection,f,o.session);f=R.cursor,p=R.anchor}o.selection.setSelectionAnchor(p.row,p.column)}o.selection.selectToPosition(f),o.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var h=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),p=Date.now();(h>g||p-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(h){var p=h.getDocumentPosition(),o=this.editor,f=o.session,m=f.getBracketRange(p);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(p.row,p.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},l.prototype.onTripleClick=function(h){var p=h.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var f=o.getSelectionRange();f.isMultiLine()&&f.contains(p.row,p.column)?(this.$clickSelection=o.selection.getLineRange(f.start.row),this.$clickSelection.end=o.selection.getLineRange(f.end.row).end):this.$clickSelection=o.selection.getLineRange(p.row),this.select()},l.prototype.onQuadClick=function(h){var p=this.editor;p.selectAll(),this.$clickSelection=p.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var p=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,f=h.domEvent.timeStamp,m=f-o.t,w=m?h.wheelX/m:o.vx,x=m?h.wheelY/m:o.vy;m<v&&(w=(w+o.vx)/2,x=(x+o.vy)/2);var R=Math.abs(w/x),T=!1;if(R>=1&&p.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(T=!0),R<=1&&p.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(T=!0),T)o.allowed=f;else if(f-o.allowed<v){var _=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(x)<=1.5*Math.abs(o.vy);_?(T=!0,o.allowed=f):o.allowed=0}if(o.t=f,o.vx=w,o.vy=x,T)return p.renderer.scrollBy(h.wheelX*h.speed,h.wheelY*h.speed),h.stop()}},l})();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,r.DefaultHandlers=s;function d(l,h,p,o){return Math.sqrt(Math.pow(p-l,2)+Math.pow(o-h,2))}function a(l,h,p){if(l.start.row==l.end.row)var o=2*h.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var o=3*h.column-2*p.getLine(l.start.row).length;else var o=2*h.row-l.start.row-l.end.row;return o<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,c){var u=t("../lib/event"),g=t("../lib/useragent"),v=(function(){function s(d,a){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=a,this.x=this.clientX=d.clientX,this.y=this.clientY=d.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return s.prototype.stopPropagation=function(){u.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){u.preventDefault(this.domEvent),this.defaultPrevented=!0},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.getGutterRow=function(){var d=this.getDocumentPosition().row,a=this.editor.session.documentToScreenRow(d,0),l=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return a-l},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,a=d.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=a.contains(l.row,l.column)}return this.$inSelection},s.prototype.getButton=function(){return u.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},s})();r.MouseEvent=v}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,r,c){r.preventParentScroll=function(u){u.stopPropagation();var g=u.currentTarget,v=g.scrollHeight>g.clientHeight;v||u.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,r,c){var u=this&&this.__extends||(function(){var f=function(m,w){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,R){x.__proto__=R}||function(x,R){for(var T in R)Object.prototype.hasOwnProperty.call(R,T)&&(x[T]=R[T])},f(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");f(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}})(),g=this&&this.__values||function(f){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&f[m],x=0;if(w)return w.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&x>=f.length&&(f=void 0),{value:f&&f[x++],done:!f}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},v=t("./lib/dom");t("./lib/event");var s=t("./range").Range,d=t("./lib/scroll").preventParentScroll,a="ace_tooltip",l=(function(){function f(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return f.prototype.$init=function(){return this.$element=v.createElement("div"),this.$element.className=a,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},f.prototype.getElement=function(){return this.$element||this.$init()},f.prototype.setText=function(m){this.getElement().textContent=m},f.prototype.setHtml=function(m){this.getElement().innerHTML=m},f.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},f.prototype.setClassName=function(m){v.addCssClass(this.getElement(),m)},f.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&v.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&v.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&v.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&v.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},f.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)},f.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=a,this.isOpen=!1)},f.prototype.getHeight=function(){return this.getElement().offsetHeight},f.prototype.getWidth=function(){return this.getElement().offsetWidth},f.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},f})(),h=(function(){function f(){this.popups=[]}return f.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},f.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},f.prototype.updatePopups=function(){var m,w,x,R;this.popups.sort(function(N,M){return M.priority-N.priority});var T=[];try{for(var _=g(this.popups),C=_.next();!C.done;C=_.next()){var P=C.value,O=!0;try{for(var E=(x=void 0,g(T)),k=E.next();!k.done;k=E.next()){var B=k.value;if(this.doPopupsOverlap(B,P)){O=!1;break}}}catch(N){x={error:N}}finally{try{k&&!k.done&&(R=E.return)&&R.call(E)}finally{if(x)throw x.error}}O?T.push(P):P.hide()}}catch(N){m={error:N}}finally{try{C&&!C.done&&(w=_.return)&&w.call(_)}finally{if(m)throw m.error}}},f.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),R=w.getElement().getBoundingClientRect();return x.left<R.right&&x.right>R.left&&x.top<R.bottom&&x.bottom>R.top},f})(),p=new h;r.popupManager=p,r.Tooltip=l;var o=(function(f){u(m,f);function m(w){w===void 0&&(w=document.body);var x=f.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var R=x.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",x.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(x)),R.addEventListener("wheel",d),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var R=x.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,R=w.getDocumentPosition(),T=x.session.getLine(R.row);if(R.column==T.length){var _=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(R.row,R.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,R,T){if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var _=w.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(_.theme)),this.isOpen=!0,this.range=s.fromPoints(x.start,x.end);var C=_.textToScreenCoordinates(x.start.row,x.start.column),P=_.scroller.getBoundingClientRect();C.pageX<P.left&&(C.pageX=P.left);var O=this.getElement();O.innerHTML="",O.appendChild(R),O.style.maxHeight="",O.style.display="block",this.$setPosition(w,C,!0,x),v.$fixPositionBug(O)}},m.prototype.$setPosition=function(w,x,R,T){var _=10;R&&this.addMarker(T,w.session);var C=w.renderer,P=this.getElement(),O=P.offsetHeight,E=P.offsetWidth,k=x.pageY,B=x.pageX,N=window.innerHeight-k-C.lineHeight,M=this.$shouldPlaceAbove(O,k,N-_);P.style.maxHeight=(M?k:N)-_+"px",P.style.top=M?"":k+C.lineHeight+"px",P.style.bottom=M?window.innerHeight-k+"px":"",P.style.left=Math.min(B,window.innerWidth-E-_)+"px"},m.prototype.$shouldPlaceAbove=function(w,x,R){return!(x-w<0&&x<R)},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){w&&this.$fromKeyboard&&w.type=="keydown"&&w.code=="Escape"||!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,p.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m})(l);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(t,r,c){var u=this&&this.__extends||(function(){var o=function(f,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},o(f,m)};return function(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(f,m);function w(){this.constructor=f}f.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),g=this&&this.__values||function(o){var f=typeof Symbol=="function"&&Symbol.iterator,m=f&&o[f],w=0;if(m)return m.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&w>=o.length&&(o=void 0),{value:o&&o[w++],done:!o}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},v=t("../lib/dom"),s=t("./mouse_event").MouseEvent,d=t("../tooltip").HoverTooltip,a=t("../config").nls,l=t("../range").Range;function h(o){var f=o.editor,m=f.renderer.$gutterLayer;o.$tooltip=new p(f),o.$tooltip.addToEditor(f),o.$tooltip.setDataProvider(function(w,x){var R=w.getDocumentPosition().row;o.$tooltip.showTooltip(R)}),o.editor.setDefaultHandler("guttermousedown",function(w){if(!(!f.isFocused()||w.getButton()!=0)){var x=m.getRegion(w);if(x!="foldWidgets"){var R=w.getDocumentPosition().row,T=f.session.selection;if(w.getShiftKey())T.selectTo(R,0);else{if(w.domEvent.detail==2)return f.selectAll(),w.preventDefault();o.$clickSelection=f.selection.getLineRange(R)}return o.setState("selectByLines"),o.captureMouse(w),w.preventDefault()}}})}r.GutterHandler=h;var p=(function(o){u(f,o);function f(m){var w=o.call(this,m.container)||this;w.id="gt"+ ++f.$uid,w.editor=m,w.visibleTooltipRow;var x=w.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",w.id),x.style.pointerEvents="auto",w.idleTime=50,w.onDomMouseMove=w.onDomMouseMove.bind(w),w.onDomMouseOut=w.onDomMouseOut.bind(w),w.setClassName("ace_gutter-tooltip"),w}return f.prototype.onDomMouseMove=function(m){var w=new s(m,this.editor);this.onMouseMove(w,this.editor)},f.prototype.onDomMouseOut=function(m){var w=new s(m,this.editor);this.onMouseOut(w)},f.prototype.addToEditor=function(m){var w=m.renderer.$gutter;w.addEventListener("mousemove",this.onDomMouseMove),w.addEventListener("mouseout",this.onDomMouseOut),o.prototype.addToEditor.call(this,m)},f.prototype.removeFromEditor=function(m){var w=m.renderer.$gutter;w.removeEventListener("mousemove",this.onDomMouseMove),w.removeEventListener("mouseout",this.onDomMouseOut),o.prototype.removeFromEditor.call(this,m)},f.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),o.prototype.destroy.call(this)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(m){var w,x=this.editor.renderer.$gutterLayer,R=x.$annotations[m],T;R?T={displayText:Array.from(R.displayText),type:Array.from(R.type)}:T={displayText:[],type:[]};var _=x.session.getFoldLine(m);if(_&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},P={error:1,security:2,warning:3,info:4,hint:5},O,E=m+1;E<=_.end.row;E++)if(x.$annotations[E])for(var k=0;k<x.$annotations[E].text.length;k++){var B=x.$annotations[E].type[k];C[B].push(x.$annotations[E].text[k]),(!O||P[B]<P[O])&&(O=B)}if(["error","security","warning"].includes(O)){var N="".concat(f.annotationsToSummaryString(C)," in folded code.");T.displayText.push(N),T.type.push(O+"_fold")}}if(T.displayText.length===0)return this.hide();for(var M={error:[],security:[],warning:[],info:[],hint:[]},$=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<T.displayText.length;E++){var A=v.createElement("span"),D=v.createElement("span");(w=D.classList).add.apply(w,["ace_".concat(T.type[E]),$]),D.setAttribute("aria-label","".concat(f.annotationLabels[T.type[E].replace("_fold","")].singular)),D.setAttribute("role","img"),D.appendChild(v.createTextNode(" ")),A.appendChild(D),A.appendChild(v.createTextNode(T.displayText[E])),A.appendChild(v.createElement("br")),M[T.type[E].replace("_fold","")].push(A)}var j=v.createElement("span");M.error.forEach(function(Q){return j.appendChild(Q)}),M.security.forEach(function(Q){return j.appendChild(Q)}),M.warning.forEach(function(Q){return j.appendChild(Q)}),M.info.forEach(function(Q){return j.appendChild(Q)}),M.hint.forEach(function(Q){return j.appendChild(Q)}),j.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(m);U&&U.setAttribute("aria-describedby",this.id);var q=l.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,q,j),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},f.prototype.$setPosition=function(m,w,x,R){var T=this.$findCellByRow(R.start.row);if(T){var _=T&&T.element,C=_&&_.querySelector(".ace_gutter_annotation");if(C){var P=C.getBoundingClientRect();if(P){var O={pageX:P.right,pageY:P.top};return o.prototype.$setPosition.call(this,m,O,!1,R)}}}},f.prototype.$shouldPlaceAbove=function(m,w,x){return x<m},f.prototype.$findLinkedAnnotationNode=function(m){var w=this.$findCellByRow(m);if(w){var x=w.element;if(x.childNodes.length>2)return x.childNodes[2]}},f.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(w){return w.row===m})},f.prototype.hide=function(m){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),o.prototype.hide.call(this,m)}},f.annotationsToSummaryString=function(m){var w,x,R=[],T=["error","security","warning","info","hint"];try{for(var _=g(T),C=_.next();!C.done;C=_.next()){var P=C.value;if(m[P].length){var O=m[P].length===1?f.annotationLabels[P].singular:f.annotationLabels[P].plural;R.push("".concat(m[P].length," ").concat(O))}}}catch(E){w={error:E}}finally{try{C&&!C.done&&(x=_.return)&&x.call(_)}finally{if(w)throw w.error}}return R.join(", ")},f.prototype.isOutsideOfText=function(m){var w=m.editor,x=w.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},f})(d);p.$uid=0,r.GutterTooltip=p}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,r,c){var u=t("../lib/dom"),g=t("../lib/event"),v=t("../lib/useragent"),s=200,d=200,a=5;function l(p){var o=p.editor,f=u.createElement("div");f.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",f.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){p[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(p));var w=o.container,x,R,T,_,C,P,O=0,E,k,B,N,M;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ue=this;return setTimeout(function(){ue.startSelect(),ue.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var he=ne.dataTransfer;he.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(f),he.setDragImage&&he.setDragImage(f,0,0),setTimeout(function(){o.container.removeChild(f)}),he.clearData(),he.setData("Text",o.session.getTextRange()),k=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,k=!1,this.setState(null),!o.getReadOnly()){var ue=ne.dataTransfer.dropEffect;!E&&ue=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!re(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,x||j(),O++,ne.dataTransfer.dropEffect=E=le(ne),g.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!re(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,x||(j(),O++),q!==null&&(q=null),ne.dataTransfer.dropEffect=E=le(ne),g.preventDefault(ne)},this.onDragLeave=function(ne){if(O--,O<=0&&x)return U(),E=null,g.preventDefault(ne)},this.onDrop=function(ne){if(P){var ue=ne.dataTransfer;if(k)switch(E){case"move":C.contains(P.row,P.column)?C={start:P,end:P}:C=o.moveText(C,P);break;case"copy":C=o.moveText(C,P,!0);break}else{var he=ue.getData("Text");C={start:P,end:o.session.insert(P,he)},o.focus(),E=null}return U(),g.preventDefault(ne)}},g.addListener(w,"dragstart",this.onDragStart.bind(p),o),g.addListener(w,"dragend",this.onDragEnd.bind(p),o),g.addListener(w,"dragenter",this.onDragEnter.bind(p),o),g.addListener(w,"dragover",this.onDragOver.bind(p),o),g.addListener(w,"dragleave",this.onDragLeave.bind(p),o),g.addListener(w,"drop",this.onDrop.bind(p),o);function $(ne,ue){var he=Date.now(),oe=!ue||ne.row!=ue.row,ee=!ue||ne.column!=ue.column;if(!N||oe||ee)o.moveCursorToPosition(ne),N=he,M={x:R,y:T};else{var ye=h(M.x,M.y,R,T);ye>a?N=null:he-N>=d&&(o.renderer.scrollCursorIntoView(),N=null)}}function A(ne,ue){var he=Date.now(),oe=o.renderer.layerConfig.lineHeight,ee=o.renderer.layerConfig.characterWidth,ye=o.renderer.scroller.getBoundingClientRect(),we={x:{left:R-ye.left,right:ye.right-R},y:{top:T-ye.top,bottom:ye.bottom-T}},Ae=Math.min(we.x.left,we.x.right),Je=Math.min(we.y.top,we.y.bottom),Be={row:ne.row,column:ne.column};Ae/ee<=2&&(Be.column+=we.x.left<we.x.right?-3:2),Je/oe<=1&&(Be.row+=we.y.top<we.y.bottom?-1:1);var Ye=ne.row!=Be.row,Ze=ne.column!=Be.column,lt=!ue||ne.row!=ue.row;Ye||Ze&&!lt?B?he-B>=s&&o.renderer.scrollCursorIntoView(Be):B=he:B=null}function D(){var ne=P;P=o.renderer.screenToTextCoordinates(R,T),$(P,ne),A(P,ne)}function j(){C=o.selection.toOrientedRange(),x=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),D(),_=setInterval(D,20),O=0,g.addListener(document,"mousemove",Q)}function U(){clearInterval(_),o.session.removeMarker(x),x=null,o.selection.fromOrientedRange(C),o.isFocused()&&!k&&o.$resetCursorStyle(),C=null,P=null,O=0,B=null,N=null,g.removeListener(document,"mousemove",Q)}var q=null;function Q(){q==null&&(q=setTimeout(function(){q!=null&&x&&U()},20))}function re(ne){var ue=ne.types;return!ue||Array.prototype.some.call(ue,function(he){return he=="text/plain"||he=="Text"})}function le(ne){var ue=["copy","copymove","all","uninitialized"],he=["move","copymove","linkmove","all","uninitialized"],oe=v.isMac?ne.altKey:ne.ctrlKey,ee="uninitialized";try{ee=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var ye="none";return oe&&ue.indexOf(ee)>=0?ye="copy":he.indexOf(ee)>=0?ye="move":ue.indexOf(ee)>=0&&(ye="copy"),ye}}(function(){this.dragWait=function(){var p=Date.now()-this.mousedownEvent.time;p>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var p=this.editor.container;p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(p){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var p=this.editor,o=p.container;o.draggable=!0,p.renderer.$cursorLayer.setBlinking(!1),p.setStyle("ace_dragging");var f=v.isWin?"default":"move";p.renderer.setCursorStyle(f),this.setState("dragReady")},this.onMouseDrag=function(p){var o=this.editor.container;if(v.isIE&&this.state=="dragReady"){var f=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>3&&o.dragDrop()}if(this.state==="dragWait"){var f=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(p){if(this.$dragEnabled){this.mousedownEvent=p;var o=this.editor,f=p.inSelection(),m=p.getButton(),w=p.domEvent.detail||1;if(w===1&&m===0&&f){if(p.editor.inMultiSelectMode&&(p.getAccelKey()||p.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=p.domEvent.target||p.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),o.getDragDelay()){if(v.isWebKit){this.cancelDrag=!0;var R=o.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(p,this.onMouseDrag.bind(this)),p.defaultPrevented=!0}}}}).call(l.prototype);function h(p,o,f,m){return Math.sqrt(Math.pow(f-p,2)+Math.pow(m-o,2))}r.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,r,c){var u=t("./mouse_event").MouseEvent,g=t("../lib/event"),v=t("../lib/dom");r.addTouchListeners=function(s,d){var a="scroll",l,h,p,o,f,m,w=0,x,R=0,T=0,_=0,C,P;function O(){var $=window.navigator&&window.navigator.clipboard,A=!1,D=function(){var q=d.getCopyText(),Q=d.session.getUndoManager().hasUndo();P.replaceChild(v.buildDom(A?["span",!q&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],q&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],q&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Q&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),P.firstChild)},j=function(q){return d.commands.canExecute(q,d)},U=function(q){var Q=q.target.getAttribute("action");if(Q=="more"||!A)return A=!A,D();Q=="paste"?$.readText().then(function(re){d.execCommand(Q,re)}):Q&&((Q=="cut"||Q=="copy")&&($?$.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(Q)),P.firstChild.style.display="none",A=!1,Q!="openCommandPalette"&&d.focus()};P=v.buildDom(["div",{class:"ace_mobile-menu",onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],d.container),P.addEventListener("touchstart",function(q){a="menu",q.stopPropagation(),q.preventDefault(),d.textInput.focus()}),P.addEventListener("touchend",function(q){q.stopPropagation(),q.preventDefault(),U(q)})}function E(){if(!d.getOption("enableMobileMenu")){P&&k();return}P||O();var $=d.selection.cursor,A=d.renderer.textToScreenCoordinates($.row,$.column),D=d.renderer.textToScreenCoordinates(0,0).pageX,j=d.renderer.scrollLeft,U=d.container.getBoundingClientRect();P.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(P.style.left="",P.style.right="10px"):(P.style.right="",P.style.left=D+j-U.left+"px"),P.style.display="",P.firstChild.style.display="none",d.on("input",k)}function k($){P&&(P.style.display="none"),d.off("input",k)}function B(){f=null,clearTimeout(f);var $=d.selection.getRange(),A=$.contains(x.row,x.column);($.isEmpty()||!A)&&(d.selection.moveToPosition(x),d.selection.selectWord()),a="wait",E()}function N(){f=null,clearTimeout(f),d.selection.moveToPosition(x);var $=R>=2?d.selection.getLineRange(x.row):d.session.getBracketRange(x);$&&!$.isEmpty()?d.selection.setRange($):d.selection.selectWord(),a="wait"}g.addListener(s,"contextmenu",function($){if(C){var A=d.textInput.getElement();A.focus()}},d),g.addListener(s,"touchstart",function($){var A=$.touches;if(f||A.length>1){clearTimeout(f),f=null,p=-1,a="zoom";return}C=d.$mouseHandler.isMousePressed=!0;var D=d.renderer.layerConfig.lineHeight,j=d.renderer.layerConfig.lineHeight,U=$.timeStamp;o=U;var q=A[0],Q=q.clientX,re=q.clientY;Math.abs(l-Q)+Math.abs(h-re)>D&&(p=-1),l=$.clientX=Q,h=$.clientY=re,T=_=0;var le=new u($,d);if(x=le.getDocumentPosition(),U-p<500&&A.length==1&&!w)R++,$.preventDefault(),$.button=0,N();else{R=0;var ne=d.selection.cursor,ue=d.selection.isEmpty()?ne:d.selection.anchor,he=d.renderer.$cursorLayer.getPixelPosition(ne,!0),oe=d.renderer.$cursorLayer.getPixelPosition(ue,!0),ee=d.renderer.scroller.getBoundingClientRect(),ye=d.renderer.layerConfig.offset,we=d.renderer.scrollLeft,Ae=function(Ye,Ze){return Ye=Ye/j,Ze=Ze/D-.75,Ye*Ye+Ze*Ze};if($.clientX<ee.left){a="zoom";return}var Je=Ae($.clientX-ee.left-he.left+we,$.clientY-ee.top-he.top+ye),Be=Ae($.clientX-ee.left-oe.left+we,$.clientY-ee.top-oe.top+ye);Je<3.5&&Be<3.5&&(a=Je>Be?"cursor":"anchor"),Be<3.5?a="anchor":Je<3.5?a="cursor":a="scroll",f=setTimeout(B,450)}p=U},d),g.addListener(s,"touchend",function($){C=d.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),a=="zoom"?(a="",w=0):f?(d.selection.moveToPosition(x),w=0,E()):a=="scroll"?(M(),k()):E(),clearTimeout(f),f=null},d),g.addListener(s,"touchmove",function($){f&&(clearTimeout(f),f=null);var A=$.touches;if(!(A.length>1||a=="zoom")){var D=A[0],j=l-D.clientX,U=h-D.clientY;if(a=="wait")if(j*j+U*U>4)a="cursor";else return $.preventDefault();l=D.clientX,h=D.clientY,$.clientX=D.clientX,$.clientY=D.clientY;var q=$.timeStamp,Q=q-o;if(o=q,a=="scroll"){var re=new u($,d);re.speed=1,re.wheelX=j,re.wheelY=U,10*Math.abs(j)<Math.abs(U)&&(j=0),10*Math.abs(U)<Math.abs(j)&&(U=0),Q!=0&&(T=j/Q,_=U/Q),d._emit("mousewheel",re),re.propagationStopped||(T=_=0)}else{var le=new u($,d),ne=le.getDocumentPosition();a=="cursor"?d.selection.moveCursorToPosition(ne):a=="anchor"&&d.selection.setSelectionAnchor(ne.row,ne.column),d.renderer.scrollCursorIntoView(ne),$.preventDefault()}}},d);function M(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs(T)<.01&&(T=0),Math.abs(_)<.01&&(_=0),w<20&&(T=.9*T),w<20&&(_=.9*_);var $=d.session.getScrollTop();d.renderer.scrollBy(10*T,10*_),$==d.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(t,r,c){var u=t("../lib/event"),g=t("../lib/useragent"),v=t("./default_handlers").DefaultHandlers,s=t("./default_gutter_handler").GutterHandler,d=t("./mouse_event").MouseEvent,a=t("./dragdrop_handler").DragdropHandler,l=t("./touch_handler").addTouchListeners,h=t("../config"),p=(function(){function o(f){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=f,new v(this),new s(this),new a(this);var w=function(T){var _=!document.hasFocus||!document.hasFocus()||!f.isFocused()&&document.activeElement==(f.textInput&&f.textInput.getElement());_&&window.focus(),f.focus(),setTimeout(function(){f.isFocused()||f.focus()})},x=f.renderer.getMouseEventTarget();u.addListener(x,"click",this.onMouseEvent.bind(this,"click"),f),u.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),f),u.addMultiMouseDownListener([x,f.renderer.scrollBarV&&f.renderer.scrollBarV.inner,f.renderer.scrollBarH&&f.renderer.scrollBarH.inner,f.textInput&&f.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",f),u.addMouseWheelListener(f.container,this.onMouseWheel.bind(this,"mousewheel"),f),l(f.container,f);var R=f.renderer.$gutter;u.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),f),u.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),f),u.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),f),u.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),f),u.addListener(x,"mousedown",w,f),u.addListener(R,"mousedown",w,f),g.isIE&&f.renderer.scrollBarV&&(u.addListener(f.renderer.scrollBarV.element,"mousedown",w,f),u.addListener(f.renderer.scrollBarH.element,"mousedown",w,f)),f.on("mousemove",function(T){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var _=f.renderer.screenToTextCoordinates(T.x,T.y),C=f.session.selection.getRange(),P=f.renderer;P.scroller.style.cursor!="crosshair"&&(!C.isEmpty()&&C.insideStart(_.row,_.column)?P.setCursorStyle("default"):P.setCursorStyle(""))}})}return o.prototype.onMouseEvent=function(f,m){this.editor.session&&this.editor._emit(f,new d(m,this.editor))},o.prototype.onMouseMove=function(f,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(f,new d(m,this.editor))},o.prototype.onMouseWheel=function(f,m){var w=new d(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(f,w)},o.prototype.setState=function(f){this.state=f},o.prototype.captureMouse=function(f,m){this.x=f.x,this.y=f.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var R=this,T=!0,_=function(k){if(k){if(g.isWebKit&&!k.which&&R.releaseMouse)return R.releaseMouse();R.x=k.clientX,R.y=k.clientY,m&&m(k),R.mouseEvent=new d(k,R.editor),R.$mouseMoved=!0}},C=function(k){w.off("beforeEndOperation",E),T=!1,w.session&&P(),R[R.state+"End"]&&R[R.state+"End"](k),R.state="",R.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,k&&R.onMouseEvent("mouseup",k),w.endOperation()},P=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1},O=function(){T&&(P(),u.nextFrame(O))};if(g.isOldIE&&f.domEvent.type=="dblclick")return setTimeout(function(){C(f)});var E=function(k){R.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};w.on("beforeEndOperation",E),w.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=_,R.releaseMouse=u.capture(this.editor.container,_,C),O()},o.prototype.cancelContextMenu=function(){var f=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",f),m&&m.domEvent&&u.stopEvent(m.domEvent))}).bind(this);setTimeout(f,10),this.editor.on("nativecontextmenu",f)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},o})();p.prototype.releaseMouse=null,h.defineOptions(p.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=p}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,r,c){var u=t("../lib/dom"),g=(function(){function v(s){s.on("click",function(d){var a=d.getDocumentPosition(),l=s.session,h=l.getFoldAt(a.row,a.column,1);h&&(d.getAccelKey()?l.removeFold(h):l.expandFold(h),d.stop());var p=d.domEvent&&d.domEvent.target;p&&u.hasCssClass(p,"ace_inline_button")&&u.hasCssClass(p,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(d){var a=s.renderer.$gutterLayer.getRegion(d);if(a=="foldWidgets"){var l=d.getDocumentPosition().row,h=s.session;h.foldWidgets&&h.foldWidgets[l]&&s.session.onFoldWidgetClick(l,d),s.isFocused()||s.focus(),d.stop()}}),s.on("gutterdblclick",function(d){var a=s.renderer.$gutterLayer.getRegion(d);if(a=="foldWidgets"){var l=d.getDocumentPosition().row,h=s.session,p=h.getParentFoldRangeData(l,!0),o=p.range||p.firstRange;if(o){l=o.start.row;var f=h.getFoldAt(l,h.getLine(l).length,1);f?h.removeFold(f):(h.addFold("...",o),s.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}d.stop()}})}return v})();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,r,c){var u=t("../lib/keys"),g=t("../lib/event"),v=(function(){function s(d){this.$editor=d,this.$data={editor:d},this.$handlers=[],this.setDefaultHandler(d.commands)}return s.prototype.setDefaultHandler=function(d){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=d,this.addKeyboardHandler(d,0)},s.prototype.setKeyboardHandler=function(d){var a=this.$handlers;if(a[a.length-1]!=d){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(d,1)}},s.prototype.addKeyboardHandler=function(d,a){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var l=this.$handlers.indexOf(d);l!=-1&&this.$handlers.splice(l,1),a==null?this.$handlers.push(d):this.$handlers.splice(a,0,d),l==-1&&d.attach&&d.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(d){var a=this.$handlers.indexOf(d);return a==-1?!1:(this.$handlers.splice(a,1),d.detach&&d.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var d=this.$data,a=d.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(a,d)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(d,a,l,h){for(var p,o=!1,f=this.$editor.commands,m=this.$handlers.length;m--&&(p=this.$handlers[m].handleKeyboard(this.$data,d,a,l,h),!(!(!p||!p.command)&&(p.command=="null"?o=!0:o=f.exec(p.command,this.$editor,p.args,h),o&&h&&d!=-1&&p.passEvent!=!0&&p.command.passEvent!=!0&&g.stopEvent(h),o))););return!o&&d==-1&&(p={command:"insertstring"},o=f.exec("insertstring",this.$editor,a)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",p),o},s.prototype.onCommandKey=function(d,a,l){var h=u.keyCodeToString(l);return this.$callKeyboardHandlers(a,h,l,d)},s.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},s})();r.KeyBinding=v}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(t,r,c){var u=0,g=0,v=!1,s=!1,d=!1,a=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h=0,p=1,o=0,f=1,m=2,w=3,x=4,R=5,T=6,_=7,C=8,P=9,O=10,E=11,k=12,B=13,N=14,M=15,$=16,A=17,D=18,j=[D,D,D,D,D,D,D,D,D,T,R,T,C,R,D,D,D,D,D,D,D,D,D,D,D,D,D,D,R,R,R,T,C,x,x,E,E,E,x,x,x,x,x,O,P,O,P,P,m,m,m,m,m,m,m,m,m,m,P,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,x,x,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,x,x,x,x,D,D,D,D,D,D,R,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,P,x,E,E,E,E,x,x,x,x,o,x,x,D,x,x,E,E,m,m,x,o,x,x,x,m,o,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,o,f,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,R,B,N,M,$,A,P,E,E,E,E,E,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,P,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function q(ne,ue,he,oe){var ee=u?l:a,ye=null,we=null,Ae=null,Je=0,Be=null,Ye=null,Ze=-1,lt=null,ct=null,jt=[];if(!oe)for(lt=0,oe=[];lt<he;lt++)oe[lt]=le(ne[lt]);for(g=u,v=!1,s=!1,d=!1,ct=0;ct<he;ct++){if(ye=Je,jt[ct]=we=re(ne,oe,jt,ct),Je=ee[ye][we],Be=Je&240,Je&=15,ue[ct]=Ae=ee[Je][5],Be>0)if(Be==16){for(lt=Ze;lt<ct;lt++)ue[lt]=1;Ze=-1}else Ze=-1;if(Ye=ee[Je][6],Ye)Ze==-1&&(Ze=ct);else if(Ze>-1){for(lt=Ze;lt<ct;lt++)ue[lt]=Ae;Ze=-1}oe[ct]==R&&(ue[ct]=0),g|=Ae}if(d){for(lt=0;lt<he;lt++)if(oe[lt]==T){ue[lt]=u;for(var Ie=lt-1;Ie>=0&&oe[Ie]==C;Ie--)ue[Ie]=u}}}function Q(ne,ue,he){if(!(g<ne)){if(ne==1&&u==p&&!s){he.reverse();return}for(var oe=he.length,ee=0,ye,we,Ae,Je;ee<oe;){if(ue[ee]>=ne){for(ye=ee+1;ye<oe&&ue[ye]>=ne;)ye++;for(we=ee,Ae=ye-1;we<Ae;we++,Ae--)Je=he[we],he[we]=he[Ae],he[Ae]=Je;ee=ye}ee++}}}function re(ne,ue,he,oe){var ee=ue[oe],ye,we,Ae,Je;switch(ee){case o:case f:v=!1;case x:case w:return ee;case m:return v?w:m;case _:return v=!0,f;case C:return x;case P:return oe<1||oe+1>=ue.length||(ye=he[oe-1])!=m&&ye!=w||(we=ue[oe+1])!=m&&we!=w?x:(v&&(we=w),we==ye?we:x);case O:return ye=oe>0?he[oe-1]:R,ye==m&&oe+1<ue.length&&ue[oe+1]==m?m:x;case E:if(oe>0&&he[oe-1]==m)return m;if(v)return x;for(Je=oe+1,Ae=ue.length;Je<Ae&&ue[Je]==E;)Je++;return Je<Ae&&ue[Je]==m?m:x;case k:for(Ae=ue.length,Je=oe+1;Je<Ae&&ue[Je]==k;)Je++;if(Je<Ae){var Be=ne[oe],Ye=Be>=1425&&Be<=2303||Be==64286;if(ye=ue[Je],Ye&&(ye==f||ye==_))return f}return oe<1||(ye=ue[oe-1])==R?x:he[oe-1];case R:return v=!1,s=!0,u;case T:return d=!0,x;case B:case N:case $:case A:case M:v=!1;case D:return x}}function le(ne){var ue=ne.charCodeAt(0),he=ue>>8;return he==0?ue>191?o:j[ue]:he==5?/[\u0591-\u05f4]/.test(ne)?f:o:he==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?k:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ue==1642?E:/[\u06f0-\u06f9]/.test(ne)?m:_:he==32&&ue<=8287?U[ue&255]:he==254&&ue>=65136?_:x}r.L=o,r.R=f,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ue,he){if(ne.length<2)return{};var oe=ne.split(""),ee=new Array(oe.length),ye=new Array(oe.length),we=[];u=he?p:h,q(oe,we,oe.length,ue);for(var Ae=0;Ae<ee.length;ee[Ae]=Ae,Ae++);Q(2,we,ee),Q(1,we,ee);for(var Ae=0;Ae<ee.length-1;Ae++)ue[Ae]===w?we[Ae]=r.AN:we[Ae]===f&&(ue[Ae]>_&&ue[Ae]<B||ue[Ae]===x||ue[Ae]===D)?we[Ae]=r.ON_R:Ae>0&&oe[Ae-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(oe[Ae])&&(we[Ae-1]=we[Ae]=r.R_H,Ae++);oe[oe.length-1]===r.DOT&&(we[oe.length-1]=r.B),oe[0]==="‫"&&(we[0]=r.RLE);for(var Ae=0;Ae<ee.length;Ae++)ye[Ae]=we[ee[Ae]];return{logicalFromVisual:ee,bidiLevels:ye}},r.hasBidiCharacters=function(ne,ue){for(var he=!1,oe=0;oe<ne.length;oe++)ue[oe]=le(ne.charAt(oe)),!he&&(ue[oe]==f||ue[oe]==_||ue[oe]==w)&&(he=!0);return he},r.getVisualFromLogicalIdx=function(ne,ue){for(var he=0;he<ue.logicalFromVisual.length;he++)if(ue.logicalFromVisual[he]==ne)return he;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,r,c){var u=t("./lib/bidiutil");t("./lib/lang");var g=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,v=(function(){function s(d){this.session=d,this.bidiMap={},this.currentRow=null,this.bidiUtil=u,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=g.test(d.getValue())}return s.prototype.isBidiRow=function(d,a,l){return!!this.seenBidi},s.prototype.onChange=function(d){this.seenBidi?this.currentRow=null:d.action=="insert"&&g.test(d.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},s.prototype.getDocumentRow=function(){var d=0,a=this.session.$screenRowCache;if(a.length){var l=this.session.$getRowCacheIndex(a,this.currentRow);l>=0&&(d=this.session.$docRowCache[l])}return d},s.prototype.getSplitIndex=function(){var d=0,a=this.session.$screenRowCache;if(a.length)for(var l,h=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-d>0&&(l=this.session.$getRowCacheIndex(a,this.currentRow-d-1),l===h);)h=l,d++;else d=this.currentRow;return d},s.prototype.markAsDirty=function(){this.currentRow=null},s.prototype.setShowInvisibles=function(d){this.showInvisibles=d,this.currentRow=null},s.prototype.setEolChar=function(d){this.EOL=d},s.prototype.setContentWidth=function(d){this.contentWidth=d},s.prototype.isRtlLine=function(d){return this.$isRtl?!0:d!=null?this.session.getLine(d).charAt(0)==this.RLE:this.isRtlDir},s.prototype.setRtlDirection=function(d,a){for(var l=d.getCursorPosition(),h=d.selection.getSelectionAnchor().row;h<=l.row;h++)!a&&d.session.getLine(h).charAt(0)===d.session.$bidiHandler.RLE?d.session.doc.removeInLine(h,0,1):a&&d.session.getLine(h).charAt(0)!==d.session.$bidiHandler.RLE&&d.session.doc.insert({column:0,row:h},d.session.$bidiHandler.RLE)},s})();r.BidiHandler=v}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,r,c){var u=t("./lib/oop"),g=t("./lib/lang"),v=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,d=(function(){function a(l){this.session=l,this.doc=l.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var h=this;this.cursor.on("change",function(p){h.$cursorChanged=!0,h.$silent||h._emit("changeCursor"),!h.$isEmpty&&!h.$silent&&h._emit("changeSelection"),!h.$keepDesiredColumnOnChange&&p.old.column!=p.value.column&&(h.$desiredColumn=null)}),this.anchor.on("change",function(){h.$anchorChanged=!0,!h.$isEmpty&&!h.$silent&&h._emit("changeSelection")})}return a.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},a.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},a.prototype.getCursor=function(){return this.lead.getPosition()},a.prototype.setAnchor=function(l,h){this.$isEmpty=!1,this.anchor.setPosition(l,h)},a.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},a.prototype.getSelectionLead=function(){return this.lead.getPosition()},a.prototype.isBackwards=function(){var l=this.anchor,h=this.lead;return l.row>h.row||l.row==h.row&&l.column>h.column},a.prototype.getRange=function(){var l=this.anchor,h=this.lead;return this.$isEmpty?s.fromPoints(h,h):this.isBackwards()?s.fromPoints(h,l):s.fromPoints(l,h)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(l,h){var p=h?l.end:l.start,o=h?l.start:l.end;this.$setSelection(p.row,p.column,o.row,o.column)},a.prototype.$setSelection=function(l,h,p,o){if(!this.$silent){var f=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(l,h),this.cursor.setPosition(p,o),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||f!=this.$isEmpty||m)&&this._emit("changeSelection")}},a.prototype.$moveSelection=function(l){var h=this.lead;this.$isEmpty&&this.setSelectionAnchor(h.row,h.column),l.call(this)},a.prototype.selectTo=function(l,h){this.$moveSelection(function(){this.moveCursorTo(l,h)})},a.prototype.selectToPosition=function(l){this.$moveSelection(function(){this.moveCursorToPosition(l)})},a.prototype.moveTo=function(l,h){this.clearSelection(),this.moveCursorTo(l,h)},a.prototype.moveToPosition=function(l){this.clearSelection(),this.moveCursorToPosition(l)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(l,h){if(typeof h>"u"){var p=l||this.lead;l=p.row,h=p.column}return this.session.getWordRange(l,h)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var l=this.getCursor(),h=this.session.getAWordRange(l.row,l.column);this.setSelectionRange(h)},a.prototype.getLineRange=function(l,h){var p=typeof l=="number"?l:this.lead.row,o,f=this.session.getFoldLine(p);return f?(p=f.start.row,o=f.end.row):o=p,h===!0?new s(p,0,o,this.session.getLine(o).length):new s(p,0,o+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.prototype.wouldMoveIntoSoftTab=function(l,h,p){var o=l.column,f=l.column+h;return p<0&&(o=l.column-h,f=l.column),this.session.isTabStop(l)&&this.doc.getLine(l.row).slice(o,f).split(" ").length-1==h},a.prototype.moveCursorLeft=function(){var l=this.lead.getPosition(),h;if(h=this.session.getFoldAt(l.row,l.column,-1))this.moveCursorTo(h.start.row,h.start.column);else if(l.column===0)l.row>0&&this.moveCursorTo(l.row-1,this.doc.getLine(l.row-1).length);else{var p=this.session.getTabSize();this.wouldMoveIntoSoftTab(l,p,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-p):this.moveCursorBy(0,-1)}},a.prototype.moveCursorRight=function(){var l=this.lead.getPosition(),h;if(h=this.session.getFoldAt(l.row,l.column,1))this.moveCursorTo(h.end.row,h.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 p=this.session.getTabSize(),l=this.lead;this.wouldMoveIntoSoftTab(l,p,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,p):this.moveCursorBy(0,1)}},a.prototype.moveCursorLineStart=function(){var l=this.lead.row,h=this.lead.column,p=this.session.documentToScreenRow(l,h),o=this.session.screenToDocumentPosition(p,0),f=this.session.getDisplayLine(l,null,o.row,o.column),m=f.match(/^\s*/);m[0].length!=h&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},a.prototype.moveCursorLineEnd=function(){var l=this.lead,h=this.session.getDocumentLastRowColumnPosition(l.row,l.column);if(this.lead.column==h.column){var p=this.session.getLine(h.row);if(h.column==p.length){var o=p.search(/\s+$/);o>0&&(h.column=o)}}this.moveCursorTo(h.row,h.column)},a.prototype.moveCursorFileEnd=function(){var l=this.doc.getLength()-1,h=this.doc.getLine(l).length;this.moveCursorTo(l,h)},a.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},a.prototype.moveCursorLongWordRight=function(){var l=this.lead.row,h=this.lead.column,p=this.doc.getLine(l),o=p.substring(h);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(l,h,1);if(f){this.moveCursorTo(f.end.row,f.end.column);return}if(this.session.nonTokenRe.exec(o)&&(h+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=p.substring(h)),h>=p.length){this.moveCursorTo(l,p.length),this.moveCursorRight(),l<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(h+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,h)},a.prototype.moveCursorLongWordLeft=function(){var l=this.lead.row,h=this.lead.column,p;if(p=this.session.getFoldAt(l,h,-1)){this.moveCursorTo(p.start.row,p.start.column);return}var o=this.session.getFoldStringAt(l,h,-1);o==null&&(o=this.doc.getLine(l).substring(0,h));var f=g.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(f)&&(h-=this.session.nonTokenRe.lastIndex,f=f.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),h<=0){this.moveCursorTo(l,0),this.moveCursorLeft(),l>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(f)&&(h-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,h)},a.prototype.$shortWordEndIndex=function(l){var h=0,p,o=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,this.session.tokenRe.exec(l))h=this.session.tokenRe.lastIndex;else{for(;(p=l[h])&&o.test(p);)h++;if(h<1){for(f.lastIndex=0;(p=l[h])&&!f.test(p);)if(f.lastIndex=0,h++,o.test(p))if(h>2){h--;break}else{for(;(p=l[h])&&o.test(p);)h++;if(h>2)break}}}return f.lastIndex=0,h},a.prototype.moveCursorShortWordRight=function(){var l=this.lead.row,h=this.lead.column,p=this.doc.getLine(l),o=p.substring(h),f=this.session.getFoldAt(l,h,1);if(f)return this.moveCursorTo(f.end.row,f.end.column);if(h==p.length){var m=this.doc.getLength();do l++,o=this.doc.getLine(l);while(l<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),h=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(l,h+w)},a.prototype.moveCursorShortWordLeft=function(){var l=this.lead.row,h=this.lead.column,p;if(p=this.session.getFoldAt(l,h,-1))return this.moveCursorTo(p.start.row,p.start.column);var o=this.session.getLine(l).substring(0,h);if(h===0){do l--,o=this.doc.getLine(l);while(l>0&&/^\s*$/.test(o));h=o.length,/\s+$/.test(o)||(o="")}var f=g.stringReverse(o),m=this.$shortWordEndIndex(f);return this.moveCursorTo(l,h-m)},a.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},a.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},a.prototype.moveCursorBy=function(l,h){var p=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o,f=this.session.$fontMetrics,m=h===0&&l!==0&&f;if(h===0&&(m&&this.$desiredColumn==null&&(o=f.textWidth(p.row,p.column),isFinite(o)&&(this.$desiredColumn=o/f.config.characterWidth)),this.$desiredColumn?p.column=this.$desiredColumn:this.$desiredColumn=p.column),l!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var w=this.session.lineWidgets[this.lead.row];l<0?l-=w.rowsAbove||0:l>0&&(l+=w.rowCount-(w.rowsAbove||0))}var x=p.row+l;if(m&&this.$desiredColumn!=null){o=this.$desiredColumn*f.config.characterWidth;var R=f.renderer&&f.renderer.$blockCursor;p.column=f.$pixelToColumn(x,p.column,o,R,!0)}var T=this.session.screenToDocumentPosition(x,p.column);this.moveCursorTo(T.row,T.column+h,h===0)},a.prototype.moveCursorToPosition=function(l){this.moveCursorTo(l.row,l.column)},a.prototype.moveCursorTo=function(l,h,p){var o=this.session.getFoldAt(l,h,1);o&&(l=o.start.row,h=o.start.column),this.$keepDesiredColumnOnChange=!0;var f=this.session.getLine(l);/[\uDC00-\uDFFF]/.test(f.charAt(h))&&f.charAt(h-1)&&(this.lead.row==l&&this.lead.column==h+1?h=h-1:h=h+1),this.lead.setPosition(l,h),this.$keepDesiredColumnOnChange=!1,p||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(l,h,p){var o=this.session.screenToDocumentPosition(l,h);this.moveCursorTo(o.row,o.column,p)},a.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},a.prototype.fromOrientedRange=function(l){this.setSelectionRange(l,l.cursor==l.start),this.$desiredColumn=l.desiredColumn||this.$desiredColumn},a.prototype.toOrientedRange=function(l){var h=this.getRange();return l?(l.start.column=h.start.column,l.start.row=h.start.row,l.end.column=h.end.column,l.end.row=h.end.row):l=h,l.cursor=this.isBackwards()?l.start:l.end,l.desiredColumn=this.$desiredColumn,l},a.prototype.getRangeOfMovements=function(l){var h=this.getCursor();try{l(this);var p=this.getCursor();return s.fromPoints(h,p)}catch{return s.fromPoints(h,h)}finally{this.moveCursorToPosition(h)}},a.prototype.toJSON=function(){if(this.rangeCount)var l=this.ranges.map(function(h){var p=h.clone();return p.isBackwards=h.cursor==h.start,p});else{var l=this.getRange();l.isBackwards=this.isBackwards()}return l},a.prototype.fromJSON=function(l){if(l.start==null)if(this.rangeList&&l.length>1){this.toSingleRange(l[0]);for(var h=l.length;h--;){var p=s.fromPoints(l[h].start,l[h].end);l[h].isBackwards&&(p.cursor=p.start),this.addRange(p,!0)}return}else l=l[0];this.rangeList&&this.toSingleRange(l),this.setSelectionRange(l,l.isBackwards)},a.prototype.isEqual=function(l){if((l.length||this.rangeCount)&&l.length!=this.rangeCount)return!1;if(!l.length||!this.ranges)return this.getRange().isEqual(l);for(var h=this.ranges.length;h--;)if(!this.ranges[h].isEqual(l[h]))return!1;return!0},a})();d.prototype.setSelectionAnchor=d.prototype.setAnchor,d.prototype.getSelectionAnchor=d.prototype.getAnchor,d.prototype.setSelectionRange=d.prototype.setRange,u.implement(d.prototype,v),r.Selection=d}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,r,c){var u=t("./lib/report_error").reportError,g=2e3,v=(function(){function s(d){this.splitRegex,this.states=d,this.regExps={},this.matchMappings={};for(var a in this.states){for(var l=this.states[a],h=[],p=0,o=this.matchMappings[a]={defaultToken:"text"},f="g",m=[],w=0;w<l.length;w++){var x=l[w];if(x.defaultToken&&(o.defaultToken=x.defaultToken),x.caseInsensitive&&f.indexOf("i")===-1&&(f+="i"),x.unicode&&f.indexOf("u")===-1&&(f+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var R=x.regex,T=new RegExp("(?:("+R+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||T==1?x.token=x.token[0]:T-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:T-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(T>1?x.onMatch=this.$applyToken:x.onMatch=x.token),T>1&&(/\\\d/.test(x.regex)?R=x.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+p+1)}):(T=1,R=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),o[p]=w,p+=T,h.push(R),x.onMatch||(x.onMatch=null)}}h.length||(o[0]=0,h.push("$")),m.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,f)},this),this.regExps[a]=new RegExp("("+h.join(")|(")+")|($)",f)}}return s.prototype.$setMaxTokenCount=function(d){g=d|0},s.prototype.$applyToken=function(d){var a=this.splitRegex.exec(d).slice(1),l=this.token.apply(this,a);if(typeof l=="string")return[{type:l,value:d}];for(var h=[],p=0,o=l.length;p<o;p++)a[p]&&(h[h.length]={type:l[p],value:a[p]});return h},s.prototype.$arrayTokens=function(d){if(!d)return[];var a=this.splitRegex.exec(d);if(!a)return"text";for(var l=[],h=this.tokenArray,p=0,o=h.length;p<o;p++)a[p+1]&&(l[l.length]={type:h[p],value:a[p+1]});return l},s.prototype.removeCapturingGroups=function(d){var a=d.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,h){return h?"(?:":l});return a},s.prototype.createSplitterRegexp=function(d,a){if(d.indexOf("(?=")!=-1){var l=0,h=!1,p={};d.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(C,P,O,E,k,B){return h?h=k!="]":k?h=!0:E?(l==p.stack&&(p.end=B+1,p.stack=-1),l--):O&&(l++,O.length!=1&&(p.stack=l,p.start=B)),C}),p.end!=null&&/^\)*$/.test(d.substr(p.end))&&(d=d.substring(0,p.start)+d.substr(p.end))}for(var o;o=/^(?:\((?:\?:)?)*\(\?<[=!]/.exec(d);){var f=o[0].length-4,m=-1,w=0,x=!1,R=/\\.|[\[\]()]/g;R.lastIndex=f;for(var T;T=R.exec(d);){var _=T[0];if(!(_.length>1)){if(x)x=_!="]";else if(_=="[")x=!0;else if(_=="(")w++;else if(_==")"&&--w==0){m=T.index+1;break}}}if(m==-1)break;d=d.substring(0,f)+d.substr(m)}return d.charAt(0)!="^"&&(d="^"+d),d.charAt(d.length-1)!="$"&&(d+="$"),new RegExp(d,(a||"").replace("g",""))},s.prototype.getLineTokens=function(d,a){if(a&&typeof a!="string"){var l=a.slice(0);a=l[0],a==="#tmp"&&(l.shift(),a=l.shift())}else var l=[];var h=a||"start",p=this.states[h];p||(h="start",p=this.states[h]);var o=this.matchMappings[h],f=this.regExps[h];f.lastIndex=0;for(var m,w=[],x=0,R=0,T={type:null,value:""};m=f.exec(d);){var _=o.defaultToken,C=null,P=m[0],O=f.lastIndex;if(O-P.length>x){var E=d.substring(x,O-P.length);T.type==_?T.value+=E:(T.type&&w.push(T),T={type:_,value:E})}for(var k=0;k<m.length-2;k++)if(m[k+1]!==void 0){C=p[o[k]],C.onMatch?_=C.onMatch(P,h,l,d):_=C.token,C.next&&(typeof C.next=="string"?h=C.next:h=C.next(h,l),p=this.states[h],p||(this.reportError("state doesn't exist",h),h="start",p=this.states[h]),o=this.matchMappings[h],x=O,f=this.regExps[h],f.lastIndex=O),C.consumeLineEnd&&(x=O);break}if(P){if(typeof _=="string")(!C||C.merge!==!1)&&T.type===_?T.value+=P:(T.type&&w.push(T),T={type:_,value:P});else if(_){T.type&&w.push(T),T={type:null,value:""};for(var k=0;k<_.length;k++)w.push(_[k])}}if(x==d.length)break;if(x=O,R++>g){for(R>2*d.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:d});x<d.length;)T.type&&w.push(T),T={value:d.substring(x,x+=500),type:"overflow"};h="start",l=[];break}}return T.type&&w.push(T),l.length>1&&l[0]!==h&&l.unshift("#tmp",h),{tokens:w,state:l.length?l:h}},s})();v.prototype.reportError=u,r.Tokenizer=v}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,r,c){var u=t("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(d,a){if(!a){for(var l in d)this.$rules[l]=d[l];return}for(var l in d){for(var h=d[l],p=0;p<h.length;p++){var o=h[p];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(a)!==0&&(o.next=a+o.next),o.nextState&&o.nextState.indexOf(a)!==0&&(o.nextState=a+o.nextState))}this.$rules[a+l]=h}},this.getRules=function(){return this.$rules},this.embedRules=function(d,a,l,h,p){var o=typeof d=="function"?new d().getRules():d;if(h)for(var f=0;f<h.length;f++)h[f]=a+h[f];else{h=[];for(var m in o)h.push(a+m)}if(this.addRules(o,a),l)for(var w=Array.prototype[p?"push":"unshift"],f=0;f<h.length;f++)w.apply(this.$rules[h[f]],u(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var v=function(d,a){return(d!="start"||a.length)&&a.unshift(this.nextState,d),this.nextState},s=function(d,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var d=0,a=this.$rules;function l(h){var p=a[h];p.processed=!0;for(var o=0;o<p.length;o++){var f=p[o],m=null;Array.isArray(f)&&(m=f,f={}),!f.regex&&f.start&&(f.regex=f.start,f.next||(f.next=[]),f.next.push({defaultToken:f.token},{token:f.token+".end",regex:f.end||f.start,next:"pop"}),f.token=f.token+".start",f.push=!0);var w=f.next||f.push;if(w&&Array.isArray(w)){var x=f.stateName;x||(x=f.token,typeof x!="string"&&(x=x[0]||""),a[x]&&(x+=d++)),a[x]=w,f.next=x,l(x)}else w=="pop"&&(f.next=s);if(f.push&&(f.nextState=f.next||f.push,f.next=v,delete f.push),f.rules)for(var R in f.rules)a[R]?a[R].push&&a[R].push.apply(a[R],f.rules[R]):a[R]=f.rules[R];var T=typeof f=="string"?f:f.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?m=T.map(function(C){return a[C]}):m=a[T]),m){var _=[o,1].concat(m);f.noEscape&&(_=_.filter(function(C){return!C.next})),p.splice.apply(p,_),o--}f.keywordMap&&(f.token=this.createKeywordMapper(f.keywordMap,f.defaultToken||"text",f.caseInsensitive),delete f.defaultToken)}}Object.keys(a).forEach(l,this)},this.createKeywordMapper=function(d,a,l,h){var p=Object.create(null);return this.$keywordList=[],Object.keys(d).forEach(function(o){for(var f=d[o],m=f.split(h||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),l&&(x=x.toLowerCase()),p[x]=o}},this),d=null,l?function(o){return p[o.toLowerCase()]||a}:function(o){return p[o]||a}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(t,r,c){var u;u=function(){this.$behaviours={}},(function(){this.add=function(g,v,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][v]=s},this.addBehaviours=function(g){for(var v in g)for(var s in g[v])this.add(v,s,g[v][s])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,v){if(typeof g=="function")var s=new g().getBehaviours(v);else var s=g.getBehaviours(v);this.addBehaviours(s)},this.getBehaviours=function(g){if(g){for(var v={},s=0;s<g.length;s++)this.$behaviours[g[s]]&&(v[g[s]]=this.$behaviours[g[s]]);return v}else return this.$behaviours}}).call(u.prototype),r.Behaviour=u}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(t,r,c){var u=t("./range").Range,g=(function(){function v(s,d,a){this.$session=s,this.$row=d,this.$rowTokens=s.getTokens(d);var l=s.getTokenAt(d,a);this.$tokenIndex=l?l.index:-1}return v.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},v.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentTokenRow=function(){return this.$row},v.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,d=this.$tokenIndex,a=s[d].start;if(a!==void 0)return a;for(a=0;d>0;)d-=1,a+=s[d].value.length;return a},v.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},v.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],d=this.getCurrentTokenColumn();return new u(this.$row,d,this.$row,d+s.value.length)},v})();r.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,r,c){var u=t("../../lib/oop"),g=t("../behaviour").Behaviour,v=t("../../token_iterator").TokenIterator,s=t("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,h={},p={'"':'"',"'":"'"},o=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,h.rangeCount!=w.multiSelect.rangeCount&&(h={rangeCount:w.multiSelect.rangeCount})),h[x])return l=h[x];l=h[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(w,x,R,T){var _=w.end.row-w.start.row;return{text:R+x+T,selection:[0,w.start.column+1,_,w.end.column+(_?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,R,T,_,C){var P=T.getCursorPosition(),O=_.doc.getLine(P.row);if(C=="{"){o(T);var E=T.getSelectionRange(),k=_.doc.getTextRange(E),B=_.getTokenAt(P.row,P.column);if(k!==""&&k!=="{"&&T.getWrapBehavioursEnabled())return f(E,k,"{","}");if(B&&/(?:string)\.quasi|\.xml/.test(B.type)){var N=[/tag\-(?:open|name)/,/attribute\-name/];return N.some(function(q){return q.test(B.type)})||/(string)\.quasi/.test(B.type)&&B.value[P.column-B.start-1]!=="$"?void 0:(m.recordAutoInsert(T,_,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(T,_))return/[\]\}\)]/.test(O[P.column])||T.inMultiSelectMode||w.braces?(m.recordAutoInsert(T,_,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(T,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(T);var M=O.substring(P.column,P.column+1);if(M=="}"){var $=_.$findOpeningBracket("}",{column:P.column+1,row:P.row});if($!==null&&m.isAutoInsertedClosing(P,O,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
183
+ `||C==`\r
184
+ `){o(T);var A="";m.isMaybeInsertedClosing(P,O)&&(A=s.stringRepeat("}",l.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var M=O.substring(P.column,P.column+1);if(M==="}"){var D=_.findMatchingBracket({row:P.row,column:P.column+1},"}");if(!D)return null;var j=this.$getIndent(_.getLine(D.row))}else if(A)var j=this.$getIndent(O);else{m.clearMaybeInsertedClosing();return}var U=j+_.getTabString();return{text:`
185
+ `+U+`
186
+ `+j+A,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,R,T,_,C){var P=_.doc.getTextRange(C);if(!C.isMultiLine()&&P=="{"){o(T);var O=_.doc.getLine(C.start.row),E=O.substring(C.end.column,C.end.column+1);if(E=="}")return C.end.column++,C;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,R,T,_,C){if(C=="("){o(T);var P=T.getSelectionRange(),O=_.doc.getTextRange(P);if(O!==""&&T.getWrapBehavioursEnabled())return f(P,O,"(",")");if(m.isSaneInsertion(T,_))return m.recordAutoInsert(T,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){o(T);var E=T.getCursorPosition(),k=_.doc.getLine(E.row),B=k.substring(E.column,E.column+1);if(B==")"){var N=_.$findOpeningBracket(")",{column:E.column+1,row:E.row});if(N!==null&&m.isAutoInsertedClosing(E,k,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,R,T,_,C){var P=_.doc.getTextRange(C);if(!C.isMultiLine()&&P=="("){o(T);var O=_.doc.getLine(C.start.row),E=O.substring(C.start.column+1,C.start.column+2);if(E==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,R,T,_,C){if(C=="["){o(T);var P=T.getSelectionRange(),O=_.doc.getTextRange(P);if(O!==""&&T.getWrapBehavioursEnabled())return f(P,O,"[","]");if(m.isSaneInsertion(T,_))return m.recordAutoInsert(T,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o(T);var E=T.getCursorPosition(),k=_.doc.getLine(E.row),B=k.substring(E.column,E.column+1);if(B=="]"){var N=_.$findOpeningBracket("]",{column:E.column+1,row:E.row});if(N!==null&&m.isAutoInsertedClosing(E,k,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,R,T,_,C){var P=_.doc.getTextRange(C);if(!C.isMultiLine()&&P=="["){o(T);var O=_.doc.getLine(C.start.row),E=O.substring(C.start.column+1,C.start.column+2);if(E=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,R,T,_,C){var P=_.$mode.$quotes||p;if(C.length==1&&P[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o(T);var O=C,E=T.getSelectionRange(),k=_.doc.getTextRange(E);if(k!==""&&(k.length!=1||!P[k])&&T.getWrapBehavioursEnabled())return f(E,k,O,O);if(!k){var B=T.getCursorPosition(),N=_.doc.getLine(B.row),M=N.substring(B.column-1,B.column),$=N.substring(B.column,B.column+1),A=_.getTokenAt(B.row,B.column),D=_.getTokenAt(B.row,B.column+1);if(M=="\\"&&A&&/escape/.test(A.type))return null;var j=A&&/string|escape/.test(A.type),U=!D||/string|escape/.test(D.type),q;if($==O)q=j!==U,q&&/string\.end/.test(D.type)&&(q=!1);else{if(j&&!U||j&&U)return null;var Q=_.$mode.tokenRe;Q.lastIndex=0;var re=Q.test(M);Q.lastIndex=0;var le=Q.test($),ne=_.$mode.$pairQuotesAfter,ue=ne&&ne[O]&&ne[O].test(M);if(!ue&&re||le||$&&!/[\s;,.})\]\\]/.test($))return null;var he=N[B.column-2];if(M==O&&(he==O||Q.test(he)))return null;q=!0}return{text:q?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,R,T,_,C){var P=_.$mode.$quotes||p,O=_.doc.getTextRange(C);if(!C.isMultiLine()&&P.hasOwnProperty(O)){o(T);var E=_.doc.getLine(C.start.row),k=E.substring(C.start.column+1,C.start.column+2);if(k==O)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,R,T,_,C){if(x==="doc-start"&&(C===`
187
+ `||C===`\r
188
+ `)&&T.selection.isEmpty()){var P=T.getCursorPosition();if(P.column===0)return;for(var O=_.doc.getLine(P.row),E=_.doc.getLine(P.row+1),k=_.getTokens(P.row),B=0,N=0;N<k.length;N++){B+=k[N].value.length;var M=k[N];if(B>=P.column){if(B===P.column){if(!/\.doc/.test(M.type))return;if(/\*\//.test(M.value)){var $=k[N+1];if(!$||!/\.doc/.test($.type))return}}var A=P.column-(B-M.value.length),D=M.value.indexOf("*/"),j=M.value.indexOf("/**",D>-1?D+2:0);if(j!==-1&&A>j&&A<j+3||D!==-1&&j!==-1&&A>=D&&A<=j||!/\.doc/.test(M.type))return;break}}var U=this.$getIndent(O);if(/\s*\*/.test(E))return/^\s*\*/.test(O)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(O.substring(0,P.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(w,x){var R=w.getCursorPosition(),T=new v(x,R.row,R.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",d)){if(/[)}\]]/.test(w.session.getLine(R.row)[R.column]))return!0;var _=new v(x,R.row,R.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",d))return!1}return T.stepForward(),T.getCurrentTokenRow()!==R.row||this.$matchTokenType(T.getCurrentToken()||"text",a)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,R){var T=w.getCursorPosition(),_=x.doc.getLine(T.row);this.isAutoInsertedClosing(T,_,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=T.row,l.autoInsertedLineEnd=R+_.substr(T.column),l.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,R){var T=w.getCursorPosition(),_=x.doc.getLine(T.row);this.isMaybeInsertedClosing(T,_)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=T.row,l.maybeInsertedLineStart=_.substr(0,T.column)+R,l.maybeInsertedLineEnd=_.substr(T.column),l.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,R){return l.autoInsertedBrackets>0&&w.row===l.autoInsertedRow&&R===l.autoInsertedLineEnd[0]&&x.substr(w.column)===l.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(w,x){return l.maybeInsertedBrackets>0&&w.row===l.maybeInsertedRow&&x.substr(w.column)===l.maybeInsertedLineEnd&&x.substr(0,w.column)==l.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},u.inherits(m,g),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(t,r,c){for(var u=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],g=0,v=[],s=0;s<u.length;s+=2)v.push(g+=u[s]),u[s+1]&&v.push(45,g+=u[s+1]);r.wordChars=String.fromCharCode.apply(null,v)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(t,r,c){var u=t("../config"),g=t("../tokenizer").Tokenizer,v=t("./text_highlight_rules").TextHighlightRules,s=t("./behaviour/cstyle").CstyleBehaviour,d=t("../unicode"),a=t("../lib/lang"),l=t("../token_iterator").TokenIterator,h=t("../range").Range,p;p=function(){this.HighlightRules=v},(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+d.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,f,m,w){var x=f.doc,R=!0,T=!0,_=1/0,C=f.getTabSize(),P=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var O=this.lineCommentStart.map(a.escapeRegExp).join("|"),E=this.lineCommentStart[0];else var O=a.escapeRegExp(this.lineCommentStart),E=this.lineCommentStart;O=new RegExp("^(\\s*)(?:"+O+") ?"),P=f.getUseSoftTabs();var k=function(q,Q){var re=q.match(O);if(re){var le=re[1].length,ne=re[0].length;!$(q,le,ne)&&re[0][ne-1]==" "&&ne--,x.removeInLine(Q,le,ne)}},B=E+" ",N=function(q,Q){(!R||/\S/.test(q))&&($(q,_,_)?x.insertInLine({row:Q,column:_},B):x.insertInLine({row:Q,column:_},E))},M=function(q,Q){return O.test(q)},$=function(q,Q,re){for(var le=0;Q--&&q.charAt(Q)==" ";)le++;if(le%C!=0)return!1;for(var le=0;q.charAt(re++)==" ";)le++;return C>2?le%C!=C-1:le%C==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,A=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+a.escapeRegExp(E)+")"),D=new RegExp("(?:"+a.escapeRegExp(A)+")\\s*$"),N=function(ue,he){M(ue,he)||(!R||/\S/.test(ue))&&(x.insertInLine({row:he,column:ue.length},A),x.insertInLine({row:he,column:_},E))},k=function(ue,he){var oe;(oe=ue.match(D))&&x.removeInLine(he,ue.length-oe[0].length,ue.length),(oe=ue.match(O))&&x.removeInLine(he,oe[1].length,oe[0].length)},M=function(ue,he){if(O.test(ue))return!0;for(var oe=f.getTokens(he),ee=0;ee<oe.length;ee++)if(oe[ee].type==="comment")return!0}}function j(q){for(var Q=m;Q<=w;Q++)q(x.getLine(Q),Q)}var U=1/0;j(function(q,Q){var re=q.search(/\S/);re!==-1?(re<_&&(_=re),T&&!M(q,Q)&&(T=!1)):U>q.length&&(U=q.length)}),_==1/0&&(_=U,R=!1,T=!1),P&&_%C!=0&&(_=Math.floor(_/C)*C),j(T?k:N)},this.toggleBlockComment=function(o,f,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var R=new l(f,w.row,w.column),T=R.getCurrentToken();f.selection;var _=f.selection.toOrientedRange(),C,P;if(T&&/comment/.test(T.type)){for(var O,E;T&&/comment/.test(T.type);){var k=T.value.indexOf(x.start);if(k!=-1){var B=R.getCurrentTokenRow(),N=R.getCurrentTokenColumn()+k;O=new h(B,N,B,N+x.start.length);break}T=R.stepBackward()}for(var R=new l(f,w.row,w.column),T=R.getCurrentToken();T&&/comment/.test(T.type);){var k=T.value.indexOf(x.end);if(k!=-1){var B=R.getCurrentTokenRow(),N=R.getCurrentTokenColumn()+k;E=new h(B,N,B,N+x.end.length);break}T=R.stepForward()}E&&f.remove(E),O&&(f.remove(O),C=O.start.row,P=-x.start.length)}else P=x.start.length,C=m.start.row,f.insert(m.end,x.end),f.insert(m.start,x.start);_.start.row==C&&(_.start.column+=P),_.end.row==C&&(_.end.column+=P),f.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(o,f,m){return this.$getIndent(f)},this.checkOutdent=function(o,f,m){return!1},this.autoOutdent=function(o,f,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 f in o)if(o[f]){var m=o[f],w=m.prototype.$id,x=u.$modes[w];x||(u.$modes[w]=x=new m),u.$modes[f]||(u.$modes[f]=x),this.$embeds.push(f),this.$modes[f]=x}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(P){(function(O){var E=R[P],k=O[E];O[R[P]]=function(){return this.$delegator(E,arguments,k)}})(_)},_=this,f=0;f<R.length;f++)T(f)},this.$delegator=function(o,f,m){var w=f[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],R=this.$modes[x];if(R)return R[o].apply(R,[w[1]].concat([].slice.call(f,1)))}w=w[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var _=w.split(this.$embeds[T]);if(!_[0]&&_[1]){f[0]=_[1];var R=this.$modes[this.$embeds[T]];return R[o].apply(R,f)}}var C=m.apply(this,f);return m?C:void 0},this.transformAction=function(o,f,m,w,x){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var T in R)if(R[T][f]){var _=R[T][f].apply(this,arguments);if(_)return _}}},this.getKeywords=function(o){if(!this.completionKeywords){var f=this.$tokenizer.rules,m=[];for(var w in f)for(var x=f[w],R=0,T=x.length;R<T;R++)if(typeof x[R].token=="string")/keyword|support|storage/.test(x[R].token)&&m.push(x[R].regex);else if(typeof x[R].token=="object"){for(var _=0,C=x[R].token.length;_<C;_++)if(/keyword|support|storage/.test(x[R].token[_])){var w=x[R].regex.match(/\(.+?\)/g)[_];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return o?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,f,m,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(p.prototype),r.Mode=p}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,r,c){var u=t("./lib/dom"),g=(function(){function v(s){this.session=s,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return v.prototype.getRowLength=function(s){var d;return this.lineWidgets?d=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:d=0,!this.$useWrapMode||!this.$wrapData[s]?1+d:this.$wrapData[s].length+1+d},v.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(s+=d.rowCount)}),s},v.prototype.$onChangeEditor=function(s){this.attach(s.editor)},v.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},v.prototype.detach=function(s){var d=this.editor;if(d){this.editor=null,d.widgetManager=null,d.renderer.off("beforeRender",this.measureWidgets),d.renderer.off("afterRender",this.renderWidgets);var a=this.session.lineWidgets;a&&a.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},v.prototype.updateOnFold=function(s,d){var a=d.lineWidgets;if(!(!a||!s.action)){for(var l=s.data,h=l.start.row,p=l.end.row,o=s.action=="add",f=h+1;f<p;f++)a[f]&&(a[f].hidden=o);a[p]&&(o?a[h]?a[p].hidden=o:a[h]=a[p]:(a[h]==a[p]&&(a[h]=void 0),a[p].hidden=o))}},v.prototype.updateOnChange=function(s){var d=this.session.lineWidgets;if(d){var a=s.start.row,l=s.end.row-a;if(l!==0)if(s.action=="remove"){var h=d.splice(a+1,l);!d[a]&&h[h.length-1]&&(d[a]=h.pop()),h.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var p=new Array(l);d[a]&&d[a].column!=null&&s.start.column>d[a].column&&a++,p.unshift(a,0),d.splice.apply(d,p),this.$updateRows()}}},v.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var d=!0;s.forEach(function(a,l){if(a)for(d=!1,a.row=l;a.$oldWidget;)a.$oldWidget.row=l,a=a.$oldWidget}),d&&(this.session.lineWidgets=null)}},v.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var d=this.session.lineWidgets[s.row];return d&&(s.$oldWidget=d,d.el&&d.el.parentNode&&(d.el.parentNode.removeChild(d.el),d._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},v.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var d=this.editor.renderer;s.html&&!s.el&&(s.el=u.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=u.createElement("div"),s.el.textContent=s.text),s.el&&(u.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&u.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",d.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/d.layerConfig.lineHeight);var a=this.session.getFoldAt(s.row,0);if(s.$fold=a,a){var l=this.session.lineWidgets;s.row==a.end.row&&!l[a.start.row]?l[a.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,d),this.onWidgetChanged(s),s},v.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var d=this.session.lineWidgets[s.row];if(d==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;d;){if(d.$oldWidget==s){d.$oldWidget=s.$oldWidget;break}d=d.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},v.prototype.getWidgetsAtRow=function(s){for(var d=this.session.lineWidgets,a=d&&d[s],l=[];a;)l.push(a),a=a.$oldWidget;return l},v.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},v.prototype.measureWidgets=function(s,d){var a=this.session._changedWidgets,l=d.layerConfig;if(!(!a||!a.length)){for(var h=1/0,p=0;p<a.length;p++){var o=a[p];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,d.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/l.characterWidth));var f=o.h/l.lineHeight;o.coverLine&&(f-=this.session.getRowLineCount(o.row),f<0&&(f=0)),o.rowCount!=f&&(o.rowCount=f,o.row<h&&(h=o.row))}}h!=1/0&&(this.session._emit("changeFold",{data:{start:{row:h}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},v.prototype.renderWidgets=function(s,d){var a=d.layerConfig,l=this.session.lineWidgets;if(l){for(var h=Math.min(this.firstRow,a.firstRow),p=Math.max(this.lastRow,a.lastRow,l.length);h>0&&!l[h];)h--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,d.$cursorLayer.config=a;for(var o=h;o<=p;o++){var f=l[o];if(!(!f||!f.el)){if(f.hidden){f.el.style.top=-100-(f.pixelHeight||0)+"px";continue}f._inDocument||(f._inDocument=!0,d.container.appendChild(f.el));var m=d.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;f.coverLine||(m+=a.lineHeight*this.session.getRowLineCount(f.row)),f.el.style.top=m-a.offset+"px";var w=f.coverGutter?0:d.gutterWidth;f.fixedWidth||(w-=d.scrollLeft),f.el.style.left=w+"px",f.fullWidth&&f.screenWidth&&(f.el.style.minWidth=a.width+2*a.padding+"px"),f.fixedWidth?f.el.style.right=d.scrollBar.getWidth()+"px":f.el.style.right=""}}}},v})();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(t,r,c){r.applyDelta=function(u,g,v){var s=g.start.row,d=g.start.column,a=u[s]||"";switch(g.action){case"insert":var l=g.lines;if(l.length===1)u[s]=a.substring(0,d)+g.lines[0]+a.substring(d);else{var h=[s,1].concat(g.lines);u.splice.apply(u,h),u[s]=a.substring(0,d)+u[s],u[s+g.lines.length-1]+=a.substring(d)}break;case"remove":var p=g.end.column,o=g.end.row;s===o?u[s]=a.substring(0,d)+a.substring(p):u.splice(s,o-s+1,a.substring(0,d)+u[o].substring(p));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,c){var u=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,v=(function(){function a(l,h,p){this.$onChange=this.onChange.bind(this),this.attach(l),typeof h!="number"?this.setPosition(h.row,h.column):this.setPosition(h,p)}return a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var h=d(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},a.prototype.setPosition=function(l,h,p){var o;if(p?o={row:l,column:h}:o=this.$clipPositionToDocument(l,h),!(this.row==o.row&&this.column==o.column)){var f={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:f,value:o})}},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(l,h){var p={};return l>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):l<0?(p.row=0,p.column=0):(p.row=l,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,h))),h<0&&(p.column=0),p},a})();v.prototype.$insertRight=!1,u.implement(v.prototype,g);function s(a,l,h){var p=h?a.column<=l.column:a.column<l.column;return a.row<l.row||a.row==l.row&&p}function d(a,l,h){var p=a.action=="insert",o=(p?1:-1)*(a.end.row-a.start.row),f=(p?1:-1)*(a.end.column-a.start.column),m=a.start,w=p?m:a.end;return s(l,m,h)?{row:l.row,column:l.column}:s(w,l,!h)?{row:l.row+o,column:l.column+(l.row==w.row?f:0)}:{row:m.row,column:m.column}}r.Anchor=v}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,r,c){var u=t("./lib/oop"),g=t("./apply_delta").applyDelta,v=t("./lib/event_emitter").EventEmitter,s=t("./range").Range,d=t("./anchor").Anchor,a=(function(){function l(h){this.$lines=[""],h.length===0?this.$lines=[""]:Array.isArray(h)?this.insertMergedLines({row:0,column:0},h):this.insert({row:0,column:0},h)}return l.prototype.setValue=function(h){var p=this.getLength()-1;this.remove(new s(0,0,p,this.getLine(p).length)),this.insert({row:0,column:0},h||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(h,p){return new d(this,h,p)},l.prototype.$detectNewLine=function(h){var p=h.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=p?p[1]:`
189
+ `,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
+ `;case"unix":return`
191
+ `;default:return this.$autoNewLine||`
192
+ `}},l.prototype.setNewLineMode=function(h){this.$newLineMode!==h&&(this.$newLineMode=h,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(h){return h==`\r
193
+ `||h=="\r"||h==`
194
+ `},l.prototype.getLine=function(h){return this.$lines[h]||""},l.prototype.getLines=function(h,p){return this.$lines.slice(h,p+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(h){return this.getLinesForRange(h).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(h){var p;if(h.start.row===h.end.row)p=[this.getLine(h.start.row).substring(h.start.column,h.end.column)];else{p=this.getLines(h.start.row,h.end.row),p[0]=(p[0]||"").substring(h.start.column);var o=p.length-1;h.end.row-h.start.row==o&&(p[o]=p[o].substring(0,h.end.column))}return p},l.prototype.insertLines=function(h,p){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(h,p)},l.prototype.removeLines=function(h,p){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(h,p)},l.prototype.insertNewLine=function(h){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(h,["",""])},l.prototype.insert=function(h,p){return this.getLength()<=1&&this.$detectNewLine(p),this.insertMergedLines(h,this.$split(p))},l.prototype.insertInLine=function(h,p){var o=this.clippedPos(h.row,h.column),f=this.pos(h.row,h.column+p.length);return this.applyDelta({start:o,end:f,action:"insert",lines:[p]},!0),this.clonePos(f)},l.prototype.clippedPos=function(h,p){var o=this.getLength();h===void 0?h=o:h<0?h=0:h>=o&&(h=o-1,p=void 0);var f=this.getLine(h);return p==null&&(p=f.length),p=Math.min(Math.max(p,0),f.length),{row:h,column:p}},l.prototype.clonePos=function(h){return{row:h.row,column:h.column}},l.prototype.pos=function(h,p){return{row:h,column:p}},l.prototype.$clipPosition=function(h){var p=this.getLength();return h.row>=p?(h.row=Math.max(0,p-1),h.column=this.getLine(p-1).length):(h.row=Math.max(0,h.row),h.column=Math.min(Math.max(h.column,0),this.getLine(h.row).length)),h},l.prototype.insertFullLines=function(h,p){h=Math.min(Math.max(h,0),this.getLength());var o=0;h<this.getLength()?(p=p.concat([""]),o=0):(p=[""].concat(p),h--,o=this.$lines[h].length),this.insertMergedLines({row:h,column:o},p)},l.prototype.insertMergedLines=function(h,p){var o=this.clippedPos(h.row,h.column),f={row:o.row+p.length-1,column:(p.length==1?o.column:0)+p[p.length-1].length};return this.applyDelta({start:o,end:f,action:"insert",lines:p}),this.clonePos(f)},l.prototype.remove=function(h){var p=this.clippedPos(h.start.row,h.start.column),o=this.clippedPos(h.end.row,h.end.column);return this.applyDelta({start:p,end:o,action:"remove",lines:this.getLinesForRange({start:p,end:o})}),this.clonePos(p)},l.prototype.removeInLine=function(h,p,o){var f=this.clippedPos(h,p),m=this.clippedPos(h,o);return this.applyDelta({start:f,end:m,action:"remove",lines:this.getLinesForRange({start:f,end:m})},!0),this.clonePos(f)},l.prototype.removeFullLines=function(h,p){h=Math.min(Math.max(0,h),this.getLength()-1),p=Math.min(Math.max(0,p),this.getLength()-1);var o=p==this.getLength()-1&&h>0,f=p<this.getLength()-1,m=o?h-1:h,w=o?this.getLine(m).length:0,x=f?p+1:p,R=f?0:this.getLine(x).length,T=new s(m,w,x,R),_=this.$lines.slice(h,p+1);return this.applyDelta({start:T.start,end:T.end,action:"remove",lines:this.getLinesForRange(T)}),_},l.prototype.removeNewLine=function(h){h<this.getLength()-1&&h>=0&&this.applyDelta({start:this.pos(h,this.getLine(h).length),end:this.pos(h+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(h,p){if(h instanceof s||(h=s.fromPoints(h.start,h.end)),p.length===0&&h.isEmpty())return h.start;if(p==this.getTextRange(h))return h.end;this.remove(h);var o;return p?o=this.insert(h.start,p):o=h.start,o},l.prototype.applyDeltas=function(h){for(var p=0;p<h.length;p++)this.applyDelta(h[p])},l.prototype.revertDeltas=function(h){for(var p=h.length-1;p>=0;p--)this.revertDelta(h[p])},l.prototype.applyDelta=function(h,p){var o=h.action=="insert";(o?h.lines.length<=1&&!h.lines[0]:!s.comparePoints(h.start,h.end))||(o&&h.lines.length>2e4?this.$splitAndapplyLargeDelta(h,2e4):(g(this.$lines,h,p),this._signal("change",h)))},l.prototype.$safeApplyDelta=function(h){var p=this.$lines.length;(h.action=="remove"&&h.start.row<p&&h.end.row<p||h.action=="insert"&&h.start.row<=p)&&this.applyDelta(h)},l.prototype.$splitAndapplyLargeDelta=function(h,p){for(var o=h.lines,f=o.length-p+1,m=h.start.row,w=h.start.column,x=0,R=0;x<f;x=R){R+=p-1;var T=o.slice(x,R);T.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+R,w=0),action:h.action,lines:T},!0)}h.lines=o.slice(x),h.start.row=m+x,h.start.column=w,this.applyDelta(h,!0)},l.prototype.revertDelta=function(h){this.$safeApplyDelta({start:this.clonePos(h.start),end:this.clonePos(h.end),action:h.action=="insert"?"remove":"insert",lines:h.lines.slice()})},l.prototype.indexToPosition=function(h,p){for(var o=this.$lines||this.getAllLines(),f=this.getNewLineCharacter().length,m=p||0,w=o.length;m<w;m++)if(h-=o[m].length+f,h<0)return{row:m,column:h+o[m].length+f};return{row:w-1,column:h+o[w-1].length+f}},l.prototype.positionToIndex=function(h,p){for(var o=this.$lines||this.getAllLines(),f=this.getNewLineCharacter().length,m=0,w=Math.min(h.row,o.length),x=p||0;x<w;++x)m+=o[x].length+f;return m+h.column},l.prototype.$split=function(h){return h.split(/\r\n|\r|\n/)},l})();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",u.implement(a.prototype,v),r.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,r,c){var u=t("./lib/oop"),g=t("./lib/event_emitter").EventEmitter,v=(function(){function s(d,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=d;var l=this;this.$worker=function(){if(l.running){for(var h=new Date,p=l.currentLine,o=-1,f=l.doc,m=p;l.lines[p];)p++;var w=f.getLength(),x=0;for(l.running=!1;p<w;){l.$tokenizeRow(p),o=p;do p++;while(l.lines[p]);if(x++,x%5===0&&new Date-h>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=p,o==-1&&(o=p),m<=o&&l.fireUpdateEvent(m,o)}}}return s.prototype.setTokenizer=function(d){this.tokenizer=d,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(d){this.doc=d,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(d,a){var l={first:d,last:a};this._signal("update",{data:l})},s.prototype.start=function(d){this.currentLine=Math.min(d||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(d){var a=d.start.row,l=d.end.row-a;if(l===0)this.lines[a]=null;else if(d.action=="remove")this.lines.splice(a,l+1,null),this.states.splice(a,l+1,null);else{var h=Array(l+1);h.unshift(a,1),this.lines.splice.apply(this.lines,h),this.states.splice.apply(this.states,h)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(d){return this.lines[d]||this.$tokenizeRow(d)},s.prototype.getState=function(d){return this.currentLine==d&&this.$tokenizeRow(d),this.states[d]||"start"},s.prototype.$tokenizeRow=function(d){var a=this.doc.getLine(d),l=this.states[d-1],h=this.tokenizer.getLineTokens(a,l,d);return this.states[d]+""!=h.state+""?(this.states[d]=h.state,this.lines[d+1]=null,this.currentLine>d+1&&(this.currentLine=d+1)):this.currentLine==d&&(this.currentLine=d+1),this.lines[d]=h.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s})();u.implement(v.prototype,g),r.BackgroundTokenizer=v}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,r,c){var u=t("./lib/lang"),g=t("./range").Range,v=(function(){function s(d,a,l){l===void 0&&(l="text"),this.setRegexp(d),this.clazz=a,this.type=l,this.docLen=0}return s.prototype.setRegexp=function(d){this.regExp+""!=d+""&&(this.regExp=d,this.cache=[])},s.prototype.update=function(d,a,l,h){if(this.regExp){for(var p=h.firstRow,o=h.lastRow,f={},m=l.$editor&&l.$editor.$search,w=m&&m.$isMultilineSearch(l.$editor.getLastSearchOptions()),x=l.getValue().length,R=x!=this.docLen,T=p;T<=o;T++){var _=this.cache[T];if(_==null||R){if(w){_=[];var C=m.$multiLineForward(l,this.regExp,T,o);if(C){var P=C.endRow<=o?C.endRow-1:o;P>T&&(T=P),_.push(new g(C.startRow,C.startCol,C.endRow,C.endCol))}_.length>this.MAX_RANGES&&(_=_.slice(0,this.MAX_RANGES))}else _=u.getMatchOffsets(l.getLine(T),this.regExp),_.length>this.MAX_RANGES&&(_=_.slice(0,this.MAX_RANGES)),_=_.map(function(B){return new g(T,B.offset,T,B.offset+B.length)});this.cache[T]=_.length?_:""}if(_.length!==0)for(var O=_.length;O--;){var E=_[O].toScreenRange(l),k=E.toString();f[k]||(f[k]=!0,a.drawSingleLineMarker(d,E,this.clazz,h))}}this.docLen=x}},s})();v.prototype.MAX_RANGES=500,r.SearchHighlight=v}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,r,c){var u=(function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(C){this.$session=C},_.prototype.add=function(C,P,O){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),P===!1||!this.lastDeltas){this.lastDeltas=[];var E=this.$undoStack.length;E>this.$undoDepth-1&&this.$undoStack.splice(0,E-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},_.prototype.addSelection=function(C,P){this.selections.push({value:C,rev:P||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(C,P){P==null&&(P=this.$rev+1);for(var O=this.$undoStack,E=O.length;E--;){var k=O[E][0];if(k.id<=C)break;k.id<P&&(k.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,P){for(var O=this.selections,E=O.length;E--;){var k=O[E];if(k.rev<C)return P&&(k=O[E+1]),k}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,P){P==null&&(P=this.$rev+1);for(var O=this.$undoStack,E=null,k=0,B=O.length;B--;){var N=O[B][0];if(N.id<P&&!E&&(E=B+1),N.id<=C){k=B+1;break}}return O.slice(k,E)},_.prototype.getChangedRanges=function(C,P){P==null&&(P=this.$rev+1)},_.prototype.getChangedLines=function(C,P){P==null&&(P=this.$rev+1)},_.prototype.undo=function(C,P){this.lastDeltas=null;var O=this.$undoStack;if(g(O,O.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var E=O.pop(),k=null;return E&&(k=C.undoChanges(E,P),this.$redoStack.push(E),this.$syncRev()),this.$fromUndo=!1,k}},_.prototype.redo=function(C,P){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var O=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);T(this.$redoStack,O),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(B){B[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),k=null;return E&&(k=C.redoChanges(E,P),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,k},_.prototype.$syncRev=function(){var C=this.$undoStack,P=C[C.length-1],O=P&&P[0].id||0;this.$redoStackBaseRev=O,this.$rev=O},_.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(C){this.reset(),C&&(this.$undoStack=C.$undoStack||[],this.$redoStack=C.$redoStack||[])},_.prototype.$prettyPrint=function(C){return C?l(C):l(this.$undoStack)+`
195
+ ---
196
+ `+l(this.$redoStack)},_})();u.prototype.hasUndo=u.prototype.canUndo,u.prototype.hasRedo=u.prototype.canRedo,u.prototype.isClean=u.prototype.isAtBookmark,u.prototype.markClean=u.prototype.bookmark;function g(_,C){for(var P=C;P--;){var O=_[P];if(O&&!O[0].ignore){for(;P<C-1;){var E=o(_[P],_[P+1]);_[P]=E[0],_[P+1]=E[1],P++}return!0}}}var v=t("./range").Range,s=v.comparePoints;v.comparePoints;function d(_){return{row:_.row,column:_.column}}function a(_){return{start:d(_.start),end:d(_.end),action:_.action,lines:_.lines.slice()}}function l(_){if(_=_||this,Array.isArray(_))return _.map(l).join(`
197
+ `);var C="";return _.action?(C=_.action=="insert"?"+":"-",C+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?C=_.value.map(h).join(`
198
+ `):C=h(_.value)),_.start&&(C+=h(_)),(_.id||_.rev)&&(C+=" ("+(_.id||_.rev)+")"),C}function h(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function p(_,C){var P=_.action=="insert",O=C.action=="insert";if(P&&O)if(s(C.start,_.end)>=0)m(C,_,-1);else if(s(C.start,_.start)<=0)m(_,C,1);else return null;else if(P&&!O)if(s(C.start,_.end)>=0)m(C,_,-1);else if(s(C.end,_.start)<=0)m(_,C,-1);else return null;else if(!P&&O)if(s(C.start,_.start)>=0)m(C,_,1);else if(s(C.start,_.start)<=0)m(_,C,1);else return null;else if(!P&&!O)if(s(C.start,_.start)>=0)m(C,_,1);else if(s(C.end,_.start)<=0)m(_,C,-1);else return null;return[C,_]}function o(_,C){for(var P=_.length;P--;)for(var O=0;O<C.length;O++)if(!p(_[P],C[O])){for(;P<_.length;){for(;O--;)p(C[O],_[P]);O=C.length,P++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function f(_,C){var P=_.action=="insert",O=C.action=="insert";if(P&&O)s(_.start,C.start)<0?m(C,_,1):m(_,C,1);else if(P&&!O)s(_.start,C.end)>=0?m(_,C,-1):(s(_.start,C.start)<=0||m(_,v.fromPoints(C.start,_.start),-1),m(C,_,1));else if(!P&&O)s(C.start,_.end)>=0?m(C,_,-1):(s(C.start,_.start)<=0||m(C,v.fromPoints(_.start,C.start),-1),m(_,C,1));else if(!P&&!O)if(s(C.start,_.end)>=0)m(C,_,-1);else if(s(C.end,_.start)<=0)m(_,C,-1);else{var E,k;return s(_.start,C.start)<0&&(E=_,_=x(_,C.start)),s(_.end,C.end)>0&&(k=x(_,C.end)),w(C.end,_.start,_.end,-1),k&&!E&&(_.lines=k.lines,_.start=k.start,_.end=k.end,k=_),[C,E,k].filter(Boolean)}return[C,_]}function m(_,C,P){w(_.start,C.start,C.end,P),w(_.end,C.start,C.end,P)}function w(_,C,P,O){_.row==(O==1?C:P).row&&(_.column+=O*(P.column-C.column)),_.row+=O*(P.row-C.row)}function x(_,C){var P=_.lines,O=_.end;_.end=d(C);var E=_.end.row-_.start.row,k=P.splice(E,P.length),B=E?C.column:C.column-_.start.column;P.push(k[0].substring(0,B)),k[0]=k[0].substr(B);var N={start:d(C),end:O,lines:k,action:_.action};return N}function R(_,C){C=a(C);for(var P=_.length;P--;){for(var O=_[P],E=0;E<O.length;E++){var k=O[E],B=f(k,C);C=B[0],B.length!=2&&(B[2]?(O.splice(E+1,1,B[1],B[2]),E++):B[1]||(O.splice(E,1),E--))}O.length||_.splice(P,1)}return _}function T(_,C){for(var P=0;P<C.length;P++)for(var O=C[P],E=0;E<O.length;E++)R(_,O[E])}r.UndoManager=u}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,r,c){var u=t("../range").Range,g=(function(){function v(s,d){this.foldData=s,Array.isArray(d)?this.folds=d:d=this.folds=[d];var a=d[d.length-1];this.range=new u(d[0].start.row,d[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return v.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(d){d.start.row+=s,d.end.row+=s})},v.prototype.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(d,a){return-d.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},v.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},v.prototype.walk=function(s,d,a){var l=0,h=this.folds,p,o,f,m=!0;d==null&&(d=this.end.row,a=this.end.column);for(var w=0;w<h.length;w++){if(p=h[w],o=p.range.compareStart(d,a),o==-1){s(null,d,a,l,m);return}if(f=s(null,p.start.row,p.start.column,l,m),f=!f&&s(p.placeholder,p.start.row,p.start.column,l),f||o===0)return;m=!p.sameRow,l=p.end.column}s(null,d,a,l,m)},v.prototype.getNextFoldTo=function(s,d){for(var a,l,h=0;h<this.folds.length;h++){if(a=this.folds[h],l=a.range.compareEnd(s,d),l==-1)return{fold:a,kind:"after"};if(l===0)return{fold:a,kind:"inside"}}return null},v.prototype.addRemoveChars=function(s,d,a){var l=this.getNextFoldTo(s,d),h,p;if(l){if(h=l.fold,l.kind=="inside"&&h.start.column!=d&&h.start.row!=s)window.console&&window.console.log(s,d,h);else if(h.start.row==s){p=this.folds;var o=p.indexOf(h);for(o===0&&(this.start.column+=a),o;o<p.length;o++){if(h=p[o],h.start.column+=a,!h.sameRow)return;h.end.column+=a}this.end.column+=a}}},v.prototype.split=function(s,d){var a=this.getNextFoldTo(s,d);if(!a||a.kind=="inside")return null;var l=a.fold,h=this.folds,p=this.foldData,o=h.indexOf(l),f=h[o-1];this.end.row=f.end.row,this.end.column=f.end.column,h=h.splice(o,h.length-o);var m=new v(p,h);return p.splice(p.indexOf(this)+1,0,m),m},v.prototype.merge=function(s){for(var d=s.folds,a=0;a<d.length;a++)this.addFold(d[a]);var l=this.foldData;l.splice(l.indexOf(s),1)},v.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(d){s.push(" "+d.toString())}),s.push("]"),s.join(`
199
+ `)},v.prototype.idxToPosition=function(s){for(var d=0,a=0;a<this.folds.length;a++){var l=this.folds[a];if(s-=l.start.column-d,s<0)return{row:l.start.row,column:l.start.column+s};if(s-=l.placeholder.length,s<0)return l.start;d=l.end.column}return{row:this.end.row,column:this.end.column+s}},v})();r.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(t,r,c){var u=t("./range").Range,g=u.comparePoints,v=(function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(d,a,l){for(var h=this.ranges,p=l||0;p<h.length;p++){var o=h[p],f=g(d,o.end);if(!(f>0)){var m=g(d,o.start);return f===0?a&&m!==0?-p-2:p:m>0||m===0&&!a?p:-p-1}}return-p-1},s.prototype.add=function(d){var a=!d.isEmpty(),l=this.pointIndex(d.start,a);l<0&&(l=-l-1);var h=this.pointIndex(d.end,a,l);return h<0?h=-h-1:h++,this.ranges.splice(l,h-l,d)},s.prototype.addList=function(d){for(var a=[],l=d.length;l--;)a.push.apply(a,this.add(d[l]));return a},s.prototype.substractPoint=function(d){var a=this.pointIndex(d);if(a>=0)return this.ranges.splice(a,1)},s.prototype.merge=function(){var d=[],a=this.ranges;a=a.sort(function(f,m){return g(f.start,m.start)});for(var l=a[0],h,p=1;p<a.length;p++){h=l,l=a[p];var o=g(h.end,l.start);o<0||o==0&&!h.isEmpty()&&!l.isEmpty()||(g(h.end,l.end)<0&&(h.end.row=l.end.row,h.end.column=l.end.column),a.splice(p,1),d.push(l),l=h,p--)}return this.ranges=a,d},s.prototype.contains=function(d,a){return this.pointIndex({row:d,column:a})>=0},s.prototype.containsPoint=function(d){return this.pointIndex(d)>=0},s.prototype.rangeAtPoint=function(d){var a=this.pointIndex(d);if(a>=0)return this.ranges[a]},s.prototype.clipRows=function(d,a){var l=this.ranges;if(l[0].start.row>a||l[l.length-1].start.row<d)return[];var h=this.pointIndex({row:d,column:0});h<0&&(h=-h-1);var p=this.pointIndex({row:a,column:0},h);p<0&&(p=-p-1);for(var o=[],f=h;f<p;f++)o.push(l[f]);return o},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(d){this.session&&this.detach(),this.session=d,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},s.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},s.prototype.$onChange=function(d){for(var a=d.start,l=d.end,h=a.row,p=l.row,o=this.ranges,f=0,m=o.length;f<m;f++){var w=o[f];if(w.end.row>=h)break}if(d.action=="insert")for(var x=p-h,R=-a.column+l.column;f<m;f++){var w=o[f];if(w.start.row>h)break;if(w.start.row==h&&w.start.column>=a.column&&(w.start.column==a.column&&this.$bias<=0||(w.start.column+=R,w.start.row+=x)),w.end.row==h&&w.end.column>=a.column){if(w.end.column==a.column&&this.$bias<0)continue;w.end.column==a.column&&R>0&&f<m-1&&w.end.column>w.start.column&&w.end.column==o[f+1].start.column&&(w.end.column-=R),w.end.column+=R,w.end.row+=x}}else for(var x=h-p,R=a.column-l.column;f<m;f++){var w=o[f];if(w.start.row>p)break;w.end.row<p&&(h<w.end.row||h==w.end.row&&a.column<w.end.column)?(w.end.row=h,w.end.column=a.column):w.end.row==p?w.end.column<=l.column?(x||w.end.column>a.column)&&(w.end.column=a.column,w.end.row=a.row):(w.end.column+=R,w.end.row+=x):w.end.row>p&&(w.end.row+=x),w.start.row<p&&(h<w.start.row||h==w.start.row&&a.column<w.start.column)?(w.start.row=h,w.start.column=a.column):w.start.row==p?w.start.column<=l.column?(x||w.start.column>a.column)&&(w.start.column=a.column,w.start.row=a.row):(w.start.column+=R,w.start.row+=x):w.start.row>p&&(w.start.row+=x)}if(x!=0&&f<m)for(;f<m;f++){var w=o[f];w.start.row+=x,w.end.row+=x}},s})();v.prototype.comparePoints=g,r.RangeList=v}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(t,r,c){var u=this&&this.__extends||(function(){var h=function(p,o){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(f[w]=m[w])},h(p,o)};return function(p,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");h(p,o);function f(){this.constructor=p}p.prototype=o===null?Object.create(o):(f.prototype=o.prototype,new f)}})(),g=t("../range_list").RangeList,v=(function(h){u(p,h);function p(o,f){var m=h.call(this)||this;return m.foldLine=null,m.placeholder=f,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 p.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},p.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(f){f.setFoldLine(o)})},p.prototype.clone=function(){var o=this.range.clone(),f=new p(o,this.placeholder);return this.subFolds.forEach(function(m){f.subFolds.push(m.clone())}),f.collapseChildren=this.collapseChildren,f},p.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){d(o,this.start);for(var f=o.start.row,m=o.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(f,m),x==1);w++);var R=this.subFolds[w],T=0;if(x==0){if(R.range.containsRange(o))return R.addSubFold(o);T=1}for(var f=o.range.end.row,m=o.range.end.column,_=w,x=-1;_<this.subFolds.length&&(x=this.subFolds[_].range.compare(f,m),x==1);_++);x==0&&_++;for(var C=this.subFolds.splice(w,_-w,o),P=x==0?C.length-1:C.length,O=T;O<P;O++)o.addSubFold(C[O]);return o.setFoldLine(this.foldLine),o}},p.prototype.restoreRange=function(o){return l(o,this.start)},p})(g);function s(h,p){h.row-=p.row,h.row==0&&(h.column-=p.column)}function d(h,p){s(h.start,p),s(h.end,p)}function a(h,p){h.row==0&&(h.column+=p.column),h.row+=p.row}function l(h,p){a(h.start,p),a(h.end,p)}r.Fold=v}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(t,r,c){var u=t("../range").Range,g=t("./fold_line").FoldLine,v=t("./fold").Fold,s=t("../token_iterator").TokenIterator,d=t("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(l,h,p){var o=this.getFoldLine(l);if(!o)return null;for(var f=o.folds,m=0;m<f.length;m++){var w=f[m].range;if(w.contains(l,h)){if(p==1&&w.isEnd(l,h)&&!w.isEmpty()||p==-1&&w.isStart(l,h)&&!w.isEmpty())continue;return f[m]}}},this.getFoldsInRange=function(l){var h=l.start,p=l.end,o=this.$foldData,f=[];h.column+=1,p.column-=1;for(var m=0;m<o.length;m++){var w=o[m].range.compareRange(l);if(w!=2){if(w==-2)break;for(var x=o[m].folds,R=0;R<x.length;R++){var T=x[R];if(w=T.range.compareRange(l),w==-2)break;if(w!=2){if(w==42)break;f.push(T)}}}}return h.column-=1,p.column+=1,f},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var h=[];l.forEach(function(o){h=h.concat(this.getFoldsInRange(o))},this)}else var h=this.getFoldsInRange(l);return h},this.getAllFolds=function(){for(var l=[],h=this.$foldData,p=0;p<h.length;p++)for(var o=0;o<h[p].folds.length;o++)l.push(h[p].folds[o]);return l},this.getFoldStringAt=function(l,h,p,o){if(o=o||this.getFoldLine(l),!o)return null;for(var f={end:{column:0}},m,w,x=0;x<o.folds.length;x++){w=o.folds[x];var R=w.range.compareEnd(l,h);if(R==-1){m=this.getLine(w.start.row).substring(f.end.column,w.start.column);break}else if(R===0)return null;f=w}return m||(m=this.getLine(w.start.row).substring(f.end.column)),p==-1?m.substring(0,h-f.end.column):p==1?m.substring(h-f.end.column):m},this.getFoldLine=function(l,h){var p=this.$foldData,o=0;for(h&&(o=p.indexOf(h)),o==-1&&(o=0),o;o<p.length;o++){var f=p[o];if(f.start.row<=l&&f.end.row>=l)return f;if(f.end.row>l)return null}return null},this.getNextFoldLine=function(l,h){var p=this.$foldData,o=0;for(h&&(o=p.indexOf(h)),o==-1&&(o=0),o;o<p.length;o++){var f=p[o];if(f.end.row>=l)return f}return null},this.getFoldedRowCount=function(l,h){for(var p=this.$foldData,o=h-l+1,f=0;f<p.length;f++){var m=p[f],w=m.end.row,x=m.start.row;if(w>=h){x<h&&(x>=l?o-=h-x:o=0);break}else w>=l&&(x>=l?o-=w-x:o-=w-l+1)}return o},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(h,p){return h.start.row-p.start.row}),l},this.addFold=function(l,h){var p=this.$foldData,o=!1,f;l instanceof v?f=l:(f=new v(h,l),f.collapseChildren=h.collapseChildren),this.$clipRangeToDocument(f.range);var m=f.start.row,w=f.start.column,x=f.end.row,R=f.end.column,T=this.getFoldAt(m,w,1),_=this.getFoldAt(x,R,-1);if(T&&_==T)return T.addSubFold(f);T&&!T.range.isStart(m,w)&&this.removeFold(T),_&&!_.range.isEnd(x,R)&&this.removeFold(_);var C=this.getFoldsInRange(f.range);C.length>0&&(this.removeFolds(C),f.collapseChildren||C.forEach(function(k){f.addSubFold(k)}));for(var P=0;P<p.length;P++){var O=p[P];if(x==O.start.row){O.addFold(f),o=!0;break}else if(m==O.end.row){if(O.addFold(f),o=!0,!f.sameRow){var E=p[P+1];if(E&&E.start.row==x){O.merge(E);break}}break}else if(x<=O.start.row)break}return o||(O=this.$addFoldLine(new g(this.$foldData,f))),this.$useWrapMode?this.$updateWrapData(O.start.row,O.start.row):this.$updateRowLengthCache(O.start.row,O.start.row),this.$modified=!0,this._signal("changeFold",{data:f,action:"add"}),f},this.addFolds=function(l){l.forEach(function(h){this.addFold(h)},this)},this.removeFold=function(l){var h=l.foldLine,p=h.start.row,o=h.end.row,f=this.$foldData,m=h.folds;if(m.length==1)f.splice(f.indexOf(h),1);else if(h.range.isEnd(l.end.row,l.end.column))m.pop(),h.end.row=m[m.length-1].end.row,h.end.column=m[m.length-1].end.column;else if(h.range.isStart(l.start.row,l.start.column))m.shift(),h.start.row=m[0].start.row,h.start.column=m[0].start.column;else if(l.sameRow)m.splice(m.indexOf(l),1);else{var w=h.split(l.start.row,l.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(p,o):this.$updateRowLengthCache(p,o)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var h=[],p=0;p<l.length;p++)h.push(l[p]);h.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(h){l.restoreRange(h),this.addFold(h)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(h){this.expandFold(h)},this)},this.unfold=function(l,h){var p,o;if(l==null)p=new u(0,0,this.getLength(),0),h==null&&(h=!0);else if(typeof l=="number")p=new u(l,0,l,this.getLine(l).length);else if("row"in l)p=u.fromPoints(l,l);else{if(Array.isArray(l))return o=[],l.forEach(function(m){o=o.concat(this.unfold(m))},this),o;p=l}o=this.getFoldsInRangeList(p);for(var f=o;o.length==1&&u.comparePoints(o[0].start,p.start)<0&&u.comparePoints(o[0].end,p.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(p);if(h!=!1?this.removeFolds(o):this.expandFolds(o),f.length)return f},this.isRowFolded=function(l,h){return!!this.getFoldLine(l,h)},this.getRowFoldEnd=function(l,h){var p=this.getFoldLine(l,h);return p?p.end.row:l},this.getRowFoldStart=function(l,h){var p=this.getFoldLine(l,h);return p?p.start.row:l},this.getFoldDisplayLine=function(l,h,p,o,f){o==null&&(o=l.start.row),f==null&&(f=0),h==null&&(h=l.end.row),p==null&&(p=this.getLine(h).length);var m=this.doc,w="";return l.walk(function(x,R,T,_){if(!(R<o)){if(R==o){if(T<f)return;_=Math.max(f,_)}x!=null?w+=x:w+=m.getLine(R).substring(_,T)}},h,p),w},this.getDisplayLine=function(l,h,p,o){var f=this.getFoldLine(l);if(f)return this.getFoldDisplayLine(f,l,h,p,o);var m;return m=this.doc.getLine(l),m.substring(o||0,h||m.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(h){var p=h.folds.map(function(o){return o.clone()});return new g(l,p)}),l},this.toggleFold=function(l){var h=this.selection,p=h.getRange(),o,f;if(p.isEmpty()){var m=p.start;if(o=this.getFoldAt(m.row,m.column),o){this.expandFold(o);return}else if(l){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(f=this.findMatchingBracket(m))?p.comparePoint(f)==1?p.end=f:(p.start=f,p.start.column++,p.end.column--):(f=this.findMatchingBracket({row:m.row,column:m.column+1}))?(p.comparePoint(f)==1?p.end=f:p.start=f,p.start.column++):p=this.getCommentFoldRange(m.row,m.column)||p}else{var x=this.getFoldsInRange(p);if(l&&x.length){this.expandFolds(x);return}else x.length==1&&(o=x[0])}if(o||(o=this.getFoldAt(p.start.row,p.start.column)),o&&o.range.toString()==p.toString()){this.expandFold(o);return}var R="...";if(!p.isMultiLine()){if(R=this.getTextRange(p),R.length<4)return;R=R.trim().substring(0,2)+".."}this.addFold(R,p)},this.getCommentFoldRange=function(l,h,p){var o=new s(this,l,h),f=o.getCurrentToken(),m=f&&f.type;if(f&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),x=new u;if(p!=1){do f=o.stepBackward();while(f&&w.test(f.type));f=o.stepForward()}x.start.row=o.getCurrentTokenRow(),x.start.column=o.getCurrentTokenColumn()+f.value.length,o=new s(this,l,h);var R=this.getState(o.$row);if(p!=-1){var T=-1;do if(f=o.stepForward(),T==-1){var _=this.getState(o.$row);R.toString()!==_.toString()&&(T=o.$row)}else if(o.$row>T)break;while(f&&w.test(f.type));f=o.stepBackward()}else f=o.getCurrentToken();return x.end.row=o.getCurrentTokenRow(),x.end.column=o.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(l,h,p,o){p==null&&(p=1e5);var f=this.foldWidgets;if(f){h=h||this.getLength(),l=l||0;for(var m=l;m<h;m++)if(f[m]==null&&(f[m]=this.getFoldWidget(m)),f[m]=="start"&&!(o&&!o(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=h&&w.start.row>=l&&(m=w.end.row,w.collapseChildren=p,this.addFold("...",w))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(h){for(var p=l.getTokens(h),o=0;o<p.length;o++){var f=p[o];if(!(f.type=="text"&&/^\s+$/.test(f.value)))return!!/comment/.test(f.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var h=this.$foldMode;this.$setFolding(null),this.$setFolding(h)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(l,h){var p=this.foldWidgets;if(!p||h&&p[l])return{};for(var o=l-1,f;o>=0;){var m=p[o];if(m==null&&(m=p[o]=this.getFoldWidget(o)),m=="start"){var w=this.getFoldWidgetRange(o);if(f||(f=w),w&&w.end.row>=l)break}o--}return{range:o!==-1&&w,firstRange:f}},this.onFoldWidgetClick=function(l,h){h instanceof d&&(h=h.domEvent);var p={children:h.shiftKey,all:h.ctrlKey||h.metaKey,siblings:h.altKey},o=this.$toggleFoldWidget(l,p);if(!o){var f=h.target||h.srcElement;f&&/ace_fold-widget/.test(f.className)&&(f.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,h){if(this.getFoldWidget){var p=this.getFoldWidget(l),o=this.getLine(l),f=p==="end"?-1:1,m=this.getFoldAt(l,f===-1?0:o.length,f);if(m)return h.children||h.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(l,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(h.siblings){var x=this.getParentFoldRangeData(l);if(x.range)var R=x.range.start.row+1,T=x.range.end.row;this.foldAll(R,T,h.all?1e4:0)}else h.children?(T=w?w.end.row:this.getLength(),this.foldAll(l+1,T,h.all?1e4:0)):w&&(h.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(l){var h=this.selection.getCursor().row;h=this.getRowFoldStart(h);var p=this.$toggleFoldWidget(h,{});if(!p){var o=this.getParentFoldRangeData(h,!0);if(p=o.range||o.firstRange,p){h=p.start.row;var f=this.getFoldAt(h,this.getLine(h).length,1);f?this.removeFold(f):this.addFold("...",p)}}},this.updateFoldWidgets=function(l){var h=l.start.row,p=l.end.row-h;if(p===0)this.foldWidgets[h]=null;else if(l.action=="remove")this.foldWidgets.splice(h,p+1,null);else{var o=Array(p+1);o.unshift(h,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(l){var h=l.data;h.first!=h.last&&this.foldWidgets.length>h.first&&this.foldWidgets.splice(h.first,this.foldWidgets.length)}}r.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,r,c){var u=t("../token_iterator").TokenIterator,g=t("../range").Range;function v(){this.findMatchingBracket=function(s,d){if(s.column==0)return null;var a=d||this.getLine(s.row).charAt(s.column-1);if(a=="")return null;var l=a.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],s):this.$findOpeningBracket(l[2],s):null},this.getBracketRange=function(s){var d=this.getLine(s.row),a=!0,l,h=d.charAt(s.column-1),p=h&&h.match(/([\(\[\{])|([\)\]\}])/);if(p||(h=d.charAt(s.column),s={row:s.row,column:s.column+1},p=h&&h.match(/([\(\[\{])|([\)\]\}])/),a=!1),!p)return null;if(p[1]){var o=this.$findClosingBracket(p[1],s);if(!o)return null;l=g.fromPoints(s,o),a||(l.end.column++,l.start.column--),l.cursor=l.end}else{var o=this.$findOpeningBracket(p[2],s);if(!o)return null;l=g.fromPoints(o,s),a||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(s,d){var a=this.getLine(s.row),l=/([\(\[\{])|([\)\]\}])/,h=!d&&a.charAt(s.column-1),p=h&&h.match(l);if(p||(h=(d===void 0||d)&&a.charAt(s.column),s={row:s.row,column:s.column+1},p=h&&h.match(l)),!p)return null;var o=new g(s.row,s.column-1,s.row,s.column),f=p[1]?this.$findClosingBracket(p[1],s):this.$findOpeningBracket(p[2],s);if(!f)return[o];var m=new g(f.row,f.column,f.row,f.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,d,a){var l=this.$brackets[s],h=1,p=new u(this,d.row,d.column),o=p.getCurrentToken();if(o||(o=p.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var f=d.column-p.getCurrentTokenColumn()-2,m=o.value;;){for(;f>=0;){var w=m.charAt(f);if(w==l){if(h-=1,h==0)return{row:p.getCurrentTokenRow(),column:f+p.getCurrentTokenColumn()}}else w==s&&(h+=1);f-=1}do o=p.stepBackward();while(o&&!a.test(o.type));if(o==null)break;m=o.value,f=m.length-1}return null}},this.$findClosingBracket=function(s,d,a){var l=this.$brackets[s],h=1,p=new u(this,d.row,d.column),o=p.getCurrentToken();if(o||(o=p.stepForward()),!!o){a||(a=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var f=d.column-p.getCurrentTokenColumn();;){for(var m=o.value,w=m.length;f<w;){var x=m.charAt(f);if(x==l){if(h-=1,h==0)return{row:p.getCurrentTokenRow(),column:f+p.getCurrentTokenColumn()}}else x==s&&(h+=1);f+=1}do o=p.stepForward();while(o&&!a.test(o.type));if(o==null)break;f=0}return null}},this.getMatchingTags=function(s){var d=new u(this,s.row,s.column),a=this.$findTagName(d);if(a){var l=d.stepBackward();return l.value==="<"?this.$findClosingTag(d,a):this.$findOpeningTag(d,a)}},this.$findTagName=function(s){var d=s.getCurrentToken(),a=!1,l=!1;if(d&&d.type.indexOf("tag-name")===-1)do l?d=s.stepBackward():d=s.stepForward(),d&&(d.value==="/>"?l=!0:d.type.indexOf("tag-name")!==-1&&(a=!0));while(d&&!a);return d},this.$findClosingTag=function(s,d){var a,l=d.value,h=d.value,p=0,o=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);d=s.stepForward();var f=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+d.value.length),m=!1;do{if(a=d,a.type.indexOf("tag-close")!==-1&&!m){var w=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);m=!0}if(d=s.stepForward(),d){if(d.value===">"&&!m){var w=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);m=!0}if(d.type.indexOf("tag-name")!==-1){if(l=d.value,h===l){if(a.value==="<")p++;else if(a.value==="</"&&(p--,p<0)){s.stepBackward();var x=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);d=s.stepForward();var R=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=s.stepForward()),d&&d.value===">")var T=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(h===l&&d.value==="/>"&&(p--,p<0))var x=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),R=x,T=R,w=new g(f.end.row,f.end.column,f.end.row,f.end.column+1)}}while(d&&p>=0);if(o&&w&&x&&T&&f&&R)return{openTag:new g(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new g(x.start.row,x.start.column,T.end.row,T.end.column),openTagName:f,closeTagName:R}},this.$findOpeningTag=function(s,d){var a=s.getCurrentToken(),l=d.value,h=0,p=s.getCurrentTokenRow(),o=s.getCurrentTokenColumn(),f=o+2,m=new g(p,o,p,f);s.stepForward();var w=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=s.stepForward()),!(!d||d.value!==">")){var x=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(d=a,p=s.getCurrentTokenRow(),o=s.getCurrentTokenColumn(),f=o+d.value.length,a=s.stepBackward(),d){if(d.type.indexOf("tag-name")!==-1){if(l===d.value)if(a.value==="<"){if(h++,h>0){var R=new g(p,o,p,f),T=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do d=s.stepForward();while(d&&d.value!==">");var _=new g(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else a.value==="</"&&h--}else if(d.value==="/>"){for(var C=0,P=a;P;){if(P.type.indexOf("tag-name")!==-1&&P.value===l){h--;break}else if(P.value==="<")break;P=s.stepBackward(),C++}for(var O=0;O<C;O++)s.stepForward()}}while(a&&h<=0);if(T&&_&&m&&x&&R&&w)return{openTag:new g(T.start.row,T.start.column,_.end.row,_.end.column),closeTag:new g(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:R,closeTagName:w}}}}r.BracketMatch=v}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(t,r,c){var u=t("./lib/oop"),g=t("./lib/lang"),v=t("./bidihandler").BidiHandler,s=t("./config"),d=t("./lib/event_emitter").EventEmitter,a=t("./selection").Selection,l=t("./mode/text").Mode,h=t("./range").Range,p=t("./line_widgets").LineWidgets,o=t("./document").Document,f=t("./background_tokenizer").BackgroundTokenizer,m=t("./search_highlight").SearchHighlight,w=t("./undomanager").UndoManager,x=(function(){function N(M,$){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++N.$uid,this.$foldData.toString=function(){return this.join(`
200
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new f(new l().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(D){A._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof M!="object"||!M.getLine)&&(M=new o(M)),this.setDocument(M),this.selection=new a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new v(this),s.resetOptions(this),this.setMode($),s._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return N.prototype.$initOperationListeners=function(){var M=this;this.curOp=null,this.on("change",function(){M.curOp||(M.startOperation(),M.curOp.selectionBefore=M.$lastSel),M.curOp.docChanged=!0},!0),this.on("changeSelection",function(){M.curOp||(M.startOperation(),M.curOp.selectionBefore=M.$lastSel),M.curOp.selectionChanged=!0},!0),this.$operationResetTimer=g.delayedCall(this.endOperation.bind(this,!0))},N.prototype.startOperation=function(M){if(this.curOp){if(!M||this.curOp.command)return;this.prevOp=this.curOp}M||(M={}),this.$operationResetTimer.schedule(),this.curOp={command:M.command||{},args:M.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",M)},N.prototype.endOperation=function(M){if(this.curOp){if(M&&M.returnValue===!1){this.curOp=null,this._signal("endOperation",M);return}if(M==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection($),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",M)}},N.prototype.setDocument=function(M){this.doc&&this.doc.off("change",this.$onChange),this.doc=M,M.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},N.prototype.getDocument=function(){return this.doc},Object.defineProperty(N.prototype,"widgetManager",{get:function(){var M=new p(this);return this.widgetManager=M,this.$editor&&M.attach(this.$editor),M},set:function(M){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:M})},enumerable:!1,configurable:!0}),N.prototype.$resetRowCache=function(M){if(!M){this.$docRowCache=[],this.$screenRowCache=[];return}var $=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,M)+1;$>A&&(this.$docRowCache.splice(A,$),this.$screenRowCache.splice(A,$))},N.prototype.$getRowCacheIndex=function(M,$){for(var A=0,D=M.length-1;A<=D;){var j=A+D>>1,U=M[j];if($>U)A=j+1;else if($<U)D=j-1;else return j}return A-1},N.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},N.prototype.onChangeFold=function(M){var $=M.data;this.$resetRowCache($.start.row)},N.prototype.onChange=function(M){this.$modified=!0,this.$bidiHandler.onChange(M),this.$resetRowCache(M.start.row);var $=this.$updateInternalDataOnChange(M);!this.$fromUndo&&this.$undoManager&&($&&$.length&&(this.$undoManager.add({action:"removeFolds",folds:$},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(M,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(M),this._signal("change",M)},N.prototype.onSelectionChange=function(){this._signal("changeSelection")},N.prototype.setValue=function(M){this.doc.setValue(M),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},N.fromJSON=function(M){typeof M=="string"&&(M=JSON.parse(M));var $=new w;M.history&&($.$undoStack=M.history.$undoStack||[],$.$redoStack=M.history.$redoStack||[],$.mark=M.history.mark||0,$.$rev=M.history.rev||0);var A=new N(M.value);return M.folds.forEach(function(D){A.addFold("...",h.fromPoints(D.start,D.end))}),A.setAnnotations(M.annotations),A.setBreakpoints(M.breakpoints),A.setMode(M.mode),A.setScrollLeft(M.scrollLeft),A.setScrollTop(M.scrollTop),A.setUndoManager($),A.selection.fromJSON(M.selection),A},N.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(M){return M.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},N.prototype.toString=function(){return this.doc.getValue()},N.prototype.getSelection=function(){return this.selection},N.prototype.getState=function(M){return this.bgTokenizer.getState(M)},N.prototype.getTokens=function(M){return this.bgTokenizer.getTokens(M)},N.prototype.getTokenAt=function(M,$){var A=this.bgTokenizer.getTokens(M),D,j=0;if($==null){var U=A.length-1;j=this.getLine(M).length}else for(var U=0;U<A.length&&(j+=A[U].value.length,!(j>=$));U++);return D=A[U],D?(D.index=U,D.start=j-D.value.length,D):null},N.prototype.setUndoManager=function(M){if(this.$undoManager=M,this.$informUndoManager&&this.$informUndoManager.cancel(),M){var $=this;M.addSession(this),this.$syncInformUndoManager=function(){$.$informUndoManager.cancel(),$.mergeUndoDeltas=!1},this.$informUndoManager=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},N.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},N.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},N.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},N.prototype.setUseSoftTabs=function(M){this.setOption("useSoftTabs",M)},N.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},N.prototype.setTabSize=function(M){this.setOption("tabSize",M)},N.prototype.getTabSize=function(){return this.$tabSize},N.prototype.isTabStop=function(M){return this.$useSoftTabs&&M.column%this.$tabSize===0},N.prototype.setNavigateWithinSoftTabs=function(M){this.setOption("navigateWithinSoftTabs",M)},N.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},N.prototype.setOverwrite=function(M){this.setOption("overwrite",M)},N.prototype.getOverwrite=function(){return this.$overwrite},N.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},N.prototype.addGutterDecoration=function(M,$){this.$decorations[M]||(this.$decorations[M]=""),this.$decorations[M]+=" "+$,this._signal("changeBreakpoint",{})},N.prototype.removeGutterCustomWidget=function(M){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(M)},N.prototype.addGutterCustomWidget=function(M,$){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(M,$)},N.prototype.removeGutterDecoration=function(M,$){this.$decorations[M]=(this.$decorations[M]||"").replace(" "+$,""),this._signal("changeBreakpoint",{})},N.prototype.getBreakpoints=function(){return this.$breakpoints},N.prototype.setBreakpoints=function(M){this.$breakpoints=[];for(var $=0;$<M.length;$++)this.$breakpoints[M[$]]="ace_breakpoint";this._signal("changeBreakpoint",{})},N.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},N.prototype.setBreakpoint=function(M,$){$===void 0&&($="ace_breakpoint"),$?this.$breakpoints[M]=$:delete this.$breakpoints[M],this._signal("changeBreakpoint",{})},N.prototype.clearBreakpoint=function(M){delete this.$breakpoints[M],this._signal("changeBreakpoint",{})},N.prototype.addMarker=function(M,$,A,D){var j=this.$markerId++,U={range:M,type:A||"line",renderer:typeof A=="function"?A:null,clazz:$,inFront:!!D,id:j};return D?(this.$frontMarkers[j]=U,this._signal("changeFrontMarker")):(this.$backMarkers[j]=U,this._signal("changeBackMarker")),j},N.prototype.addDynamicMarker=function(M,$){if(M.update){var A=this.$markerId++;return M.id=A,M.inFront=!!$,$?(this.$frontMarkers[A]=M,this._signal("changeFrontMarker")):(this.$backMarkers[A]=M,this._signal("changeBackMarker")),M}},N.prototype.removeMarker=function(M){var $=this.$frontMarkers[M]||this.$backMarkers[M];if($){var A=$.inFront?this.$frontMarkers:this.$backMarkers;delete A[M],this._signal($.inFront?"changeFrontMarker":"changeBackMarker")}},N.prototype.getMarkers=function(M){return M?this.$frontMarkers:this.$backMarkers},N.prototype.highlight=function(M){if(!this.$searchHighlight){var $=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker($)}this.$searchHighlight.setRegexp(M)},N.prototype.highlightLines=function(M,$,A,D){typeof $!="number"&&(A=$,$=M),A||(A="ace_step");var j=new h(M,0,$,1/0);return j.id=this.addMarker(j,A,"fullLine",D),j},N.prototype.setAnnotations=function(M){this.$annotations=M,this._signal("changeAnnotation",{})},N.prototype.getAnnotations=function(){return this.$annotations||[]},N.prototype.clearAnnotations=function(){this.setAnnotations([])},N.prototype.$detectNewLine=function(M){var $=M.match(/^.*?(\r?\n)/m);$?this.$autoNewLine=$[1]:this.$autoNewLine=`
201
+ `},N.prototype.getWordRange=function(M,$){var A=this.getLine(M),D=!1;if($>0&&(D=!!A.charAt($-1).match(this.tokenRe)),D||(D=!!A.charAt($).match(this.tokenRe)),D)var j=this.tokenRe;else if(/^\s+$/.test(A.slice($-1,$+1)))var j=/\s/;else var j=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&A.charAt(U).match(j));U++}for(var q=$;q<A.length&&A.charAt(q).match(j);)q++;return new h(M,U,M,q)},N.prototype.getAWordRange=function(M,$){for(var A=this.getWordRange(M,$),D=this.getLine(A.end.row);D.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},N.prototype.setNewLineMode=function(M){this.doc.setNewLineMode(M)},N.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},N.prototype.setUseWorker=function(M){this.setOption("useWorker",M)},N.prototype.getUseWorker=function(){return this.$useWorker},N.prototype.onReloadTokenizer=function(M){var $=M.data;this.bgTokenizer.start($.first),this._signal("tokenizerUpdate",M)},N.prototype.setMode=function(M,$){if(M&&typeof M=="object"){if(M.getTokenizer)return this.$onChangeMode(M);var A=M,D=A.path}else D=M||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[D]&&!A){this.$onChangeMode(this.$modes[D]),$&&$();return}this.$modeId=D,s.loadModule(["mode",D],(function(j){if(!this.destroyed){if(this.$modeId!==D)return $&&$();this.$modes[D]&&!A?this.$onChangeMode(this.$modes[D]):j&&j.Mode&&(j=new j.Mode(A),A||(this.$modes[D]=j,j.$id=D),this.$onChangeMode(j)),$&&$()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},N.prototype.$onChangeMode=function(M,$){if($||(this.$modeId=M.$id),this.$mode!==M){var A=this.$mode;this.$mode=M,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=M.getTokenizer();if(D.on!==void 0){var j=this.onReloadTokenizer.bind(this);D.on("update",j)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=M.tokenRe,this.nonTokenRe=M.nonTokenRe,$||(M.attachToSession&&M.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(M.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:A,mode:M}))}},N.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},N.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(M){s.warn("Could not load worker",M),this.$worker=null}},N.prototype.getMode=function(){return this.$mode},N.prototype.setScrollTop=function(M){this.$scrollTop===M||isNaN(M)||(this.$scrollTop=M,this._signal("changeScrollTop",M))},N.prototype.getScrollTop=function(){return this.$scrollTop},N.prototype.setScrollLeft=function(M){this.$scrollLeft===M||isNaN(M)||(this.$scrollLeft=M,this._signal("changeScrollLeft",M))},N.prototype.getScrollLeft=function(){return this.$scrollLeft},N.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},N.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var M=0;return this.lineWidgets.forEach(function($){$&&$.screenWidth>M&&(M=$.screenWidth)}),this.lineWidgetWidth=M},N.prototype.$computeWidth=function(M){if(this.$modified||M){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var $=this.doc.getAllLines(),A=this.$rowLengthCache,D=0,j=0,U=this.$foldData[j],q=U?U.start.row:1/0,Q=$.length,re=0;re<Q;re++){if(re>q){if(re=U.end.row+1,re>=Q)break;U=this.$foldData[j++],q=U?U.start.row:1/0}A[re]==null&&(A[re]=this.$getStringScreenWidth($[re])[0]),A[re]>D&&(D=A[re])}this.screenWidth=D}},N.prototype.getLine=function(M){return this.doc.getLine(M)},N.prototype.getLines=function(M,$){return this.doc.getLines(M,$)},N.prototype.getLength=function(){return this.doc.getLength()},N.prototype.getTextRange=function(M){return this.doc.getTextRange(M||this.selection.getRange())},N.prototype.insert=function(M,$){return this.doc.insert(M,$)},N.prototype.remove=function(M){return this.doc.remove(M)},N.prototype.removeFullLines=function(M,$){return this.doc.removeFullLines(M,$)},N.prototype.undoChanges=function(M,$){if(M.length){this.$fromUndo=!0;for(var A=M.length-1;A!=-1;A--){var D=M[A];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!$&&this.$undoSelect&&(M.selectionBefore?this.selection.fromJSON(M.selectionBefore):this.selection.setRange(this.$getUndoSelection(M,!0))),this.$fromUndo=!1}},N.prototype.redoChanges=function(M,$){if(M.length){this.$fromUndo=!0;for(var A=0;A<M.length;A++){var D=M[A];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!$&&this.$undoSelect&&(M.selectionAfter?this.selection.fromJSON(M.selectionAfter):this.selection.setRange(this.$getUndoSelection(M,!1))),this.$fromUndo=!1}},N.prototype.setUndoSelect=function(M){this.$undoSelect=M},N.prototype.$getUndoSelection=function(M,$){function A(Q){return $?Q.action!=="insert":Q.action==="insert"}for(var D,j,U=0;U<M.length;U++){var q=M[U];if(q.start){if(!D){A(q)?D=h.fromPoints(q.start,q.end):D=h.fromPoints(q.start,q.start);continue}A(q)?(j=q.start,D.compare(j.row,j.column)==-1&&D.setStart(j),j=q.end,D.compare(j.row,j.column)==1&&D.setEnd(j)):(j=q.start,D.compare(j.row,j.column)==-1&&(D=h.fromPoints(q.start,q.start)))}}return D},N.prototype.replace=function(M,$){return this.doc.replace(M,$)},N.prototype.moveText=function(M,$,A){var D=this.getTextRange(M),j=this.getFoldsInRange(M),U=h.fromPoints($,$);if(!A){this.remove(M);var q=M.start.row-M.end.row,Q=q?-M.end.column:M.start.column-M.end.column;Q&&(U.start.row==M.end.row&&U.start.column>M.end.column&&(U.start.column+=Q),U.end.row==M.end.row&&U.end.column>M.end.column&&(U.end.column+=Q)),q&&U.start.row>=M.end.row&&(U.start.row+=q,U.end.row+=q)}if(U.end=this.insert(U.start,D),j.length){var re=M.start,le=U.start,q=le.row-re.row,Q=le.column-re.column;this.addFolds(j.map(function(he){return he=he.clone(),he.start.row==re.row&&(he.start.column+=Q),he.end.row==re.row&&(he.end.column+=Q),he.start.row+=q,he.end.row+=q,he}))}return U},N.prototype.indentRows=function(M,$,A){A=A.replace(/\t/g,this.getTabString());for(var D=M;D<=$;D++)this.doc.insertInLine({row:D,column:0},A)},N.prototype.outdentRows=function(M){for(var $=M.collapseRows(),A=new h(0,0,0,0),D=this.getTabSize(),j=$.start.row;j<=$.end.row;++j){var U=this.getLine(j);A.start.row=j,A.end.row=j;for(var q=0;q<D&&U.charAt(q)==" ";++q);q<D&&U.charAt(q)==" "?(A.start.column=q,A.end.column=q+1):(A.start.column=0,A.end.column=q),this.remove(A)}},N.prototype.$moveLines=function(M,$,A){if(M=this.getRowFoldStart(M),$=this.getRowFoldEnd($),A<0){var D=this.getRowFoldStart(M+A);if(D<0)return 0;var j=D-M}else if(A>0){var D=this.getRowFoldEnd($+A);if(D>this.doc.getLength()-1)return 0;var j=D-$}else{M=this.$clipRowToDocument(M),$=this.$clipRowToDocument($);var j=$-M+1}var U=new h(M,0,$,Number.MAX_VALUE),q=this.getFoldsInRange(U).map(function(re){return re=re.clone(),re.start.row+=j,re.end.row+=j,re}),Q=A==0?this.doc.getLines(M,$):this.doc.removeFullLines(M,$);return this.doc.insertFullLines(M+j,Q),q.length&&this.addFolds(q),j},N.prototype.moveLinesUp=function(M,$){return this.$moveLines(M,$,-1)},N.prototype.moveLinesDown=function(M,$){return this.$moveLines(M,$,1)},N.prototype.duplicateLines=function(M,$){return this.$moveLines(M,$,0)},N.prototype.$clipRowToDocument=function(M){return Math.max(0,Math.min(M,this.doc.getLength()-1))},N.prototype.$clipColumnToRow=function(M,$){return $<0?0:Math.min(this.doc.getLine(M).length,$)},N.prototype.$clipPositionToDocument=function(M,$){if($=Math.max(0,$),M<0)M=0,$=0;else{var A=this.doc.getLength();M>=A?(M=A-1,$=this.doc.getLine(A-1).length):$=Math.min(this.doc.getLine(M).length,$)}return{row:M,column:$}},N.prototype.$clipRangeToDocument=function(M){M.start.row<0?(M.start.row=0,M.start.column=0):M.start.column=this.$clipColumnToRow(M.start.row,M.start.column);var $=this.doc.getLength()-1;return M.end.row>$?(M.end.row=$,M.end.column=this.doc.getLine($).length):M.end.column=this.$clipColumnToRow(M.end.row,M.end.column),M},N.prototype.setUseWrapMode=function(M){if(M!=this.$useWrapMode){if(this.$useWrapMode=M,this.$modified=!0,this.$resetRowCache(0),M){var $=this.getLength();this.$wrapData=Array($),this.$updateWrapData(0,$-1)}this._signal("changeWrapMode")}},N.prototype.getUseWrapMode=function(){return this.$useWrapMode},N.prototype.setWrapLimitRange=function(M,$){(this.$wrapLimitRange.min!==M||this.$wrapLimitRange.max!==$)&&(this.$wrapLimitRange={min:M,max:$},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},N.prototype.adjustWrapLimit=function(M,$){var A=this.$wrapLimitRange;A.max<0&&(A={min:$,max:$});var D=this.$constrainWrapLimit(M,A.min,A.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},N.prototype.$constrainWrapLimit=function(M,$,A){return $&&(M=Math.max($,M)),A&&(M=Math.min(A,M)),M},N.prototype.getWrapLimit=function(){return this.$wrapLimit},N.prototype.setWrapLimit=function(M){this.setWrapLimitRange(M,M)},N.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},N.prototype.$updateInternalDataOnChange=function(M){var $=this.$useWrapMode,A=M.action,D=M.start,j=M.end,U=D.row,q=j.row,Q=q-U,re=null;if(this.$updating=!0,Q!=0)if(A==="remove"){this[$?"$wrapData":"$rowLengthCache"].splice(U,Q);var le=this.$foldData;re=this.getFoldsInRange(M),this.removeFolds(re);var ne=this.getFoldLine(j.row),ue=0;if(ne){ne.addRemoveChars(j.row,j.column,D.column-j.column),ne.shiftRow(-Q);var he=this.getFoldLine(U);he&&he!==ne&&(he.merge(ne),ne=he),ue=le.indexOf(ne)+1}for(ue;ue<le.length;ue++){var ne=le[ue];ne.start.row>=j.row&&ne.shiftRow(-Q)}q=U}else{var oe=Array(Q);oe.unshift(U,0);var ee=$?this.$wrapData:this.$rowLengthCache;ee.splice.apply(ee,oe);var le=this.$foldData,ne=this.getFoldLine(U),ue=0;if(ne){var ye=ne.range.compareInside(D.row,D.column);ye==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Q),ne.addRemoveChars(q,0,j.column-D.column))):ye==-1&&(ne.addRemoveChars(U,0,j.column-D.column),ne.shiftRow(Q)),ue=le.indexOf(ne)+1}for(ue;ue<le.length;ue++){var ne=le[ue];ne.start.row>=U&&ne.shiftRow(Q)}}else{Q=Math.abs(M.start.column-M.end.column),A==="remove"&&(re=this.getFoldsInRange(M),this.removeFolds(re),Q=-Q);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,D.column,Q)}return $&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,$?this.$updateWrapData(U,q):this.$updateRowLengthCache(U,q),re},N.prototype.$updateRowLengthCache=function(M,$){this.$rowLengthCache[M]=null,this.$rowLengthCache[$]=null},N.prototype.$updateWrapData=function(M,$){var A=this.doc.getAllLines(),D=this.getTabSize(),j=this.$wrapData,U=this.$wrapLimit,q,Q,re=M;for($=Math.min($,A.length-1);re<=$;)Q=this.getFoldLine(re,Q),Q?(q=[],Q.walk((function(le,ne,ue,he){var oe;if(le!=null){oe=this.$getDisplayTokens(le,q.length),oe[0]=_;for(var ee=1;ee<oe.length;ee++)oe[ee]=C}else oe=this.$getDisplayTokens(A[ne].substring(he,ue),q.length);q=q.concat(oe)}).bind(this),Q.end.row,A[Q.end.row].length+1),j[Q.start.row]=this.$computeWrapSplits(q,U,D),re=Q.end.row+1):(q=this.$getDisplayTokens(A[re]),j[re]=this.$computeWrapSplits(q,U,D),re++)},N.prototype.$computeWrapSplits=function(M,$,A){if(M.length==0)return[];var D=[],j=M.length,U=0,q=0,Q=this.$wrapAsCode,re=this.$indentedSoftWrap,le=$<=Math.max(2*A,8)||re===!1?0:Math.floor($/2);function ne(){var ye=0;if(le===0)return ye;if(re)for(var we=0;we<M.length;we++){var Ae=M[we];if(Ae==O)ye+=1;else if(Ae==E)ye+=A;else{if(Ae==k)continue;break}}return Q&&re!==!1&&(ye+=A),Math.min(ye,le)}function ue(ye){for(var we=ye-U,Ae=U;Ae<ye;Ae++){var Je=M[Ae];(Je===12||Je===2)&&(we-=1)}D.length||(he=ne(),D.indent=he),q+=we,D.push(q),U=ye}for(var he=0;j-U>$-he;){var oe=U+$-he;if(M[oe-1]>=O&&M[oe]>=O){ue(oe);continue}if(M[oe]==_||M[oe]==C){for(oe;oe!=U-1&&M[oe]!=_;oe--);if(oe>U){ue(oe);continue}for(oe=U+$,oe;oe<M.length&&M[oe]==C;oe++);if(oe==M.length)break;ue(oe);continue}for(var ee=Math.max(oe-($-($>>2)),U-1);oe>ee&&M[oe]<_;)oe--;if(Q){for(;oe>ee&&M[oe]<_;)oe--;for(;oe>ee&&M[oe]==P;)oe--}else for(;oe>ee&&M[oe]<O;)oe--;if(oe>ee){ue(++oe);continue}oe=U+$,M[oe]==T&&oe--,ue(oe-he)}return D},N.prototype.$getDisplayTokens=function(M,$){var A=[],D;$=$||0;for(var j=0;j<M.length;j++){var U=M.charCodeAt(j);if(U==9){D=this.getScreenTabSize(A.length+$),A.push(E);for(var q=1;q<D;q++)A.push(k)}else U==32?A.push(O):U>39&&U<48||U>57&&U<64?A.push(P):U>=4352&&B(U)?A.push(R,T):A.push(R)}return A},N.prototype.$getStringScreenWidth=function(M,$,A){if($==0)return[0,0];$==null&&($=1/0),A=A||0;var D,j;for(j=0;j<M.length&&(D=M.charCodeAt(j),D==9?A+=this.getScreenTabSize(A):A+=1,!(A>$));j++);return[A,j]},N.prototype.getRowLength=function(M){var $=1;return this.lineWidgets&&($+=this.lineWidgets[M]&&this.lineWidgets[M].rowCount||0),!this.$useWrapMode||!this.$wrapData[M]?$:this.$wrapData[M].length+$},N.prototype.getRowLineCount=function(M){return!this.$useWrapMode||!this.$wrapData[M]?1:this.$wrapData[M].length+1},N.prototype.getRowWrapIndent=function(M){if(this.$useWrapMode){var $=this.screenToDocumentPosition(M,Number.MAX_VALUE),A=this.$wrapData[$.row];return A.length&&A[0]<$.column?A.indent:0}else return 0},N.prototype.getScreenLastRowColumn=function(M){var $=this.screenToDocumentPosition(M,Number.MAX_VALUE);return this.documentToScreenColumn($.row,$.column)},N.prototype.getDocumentLastRowColumn=function(M,$){var A=this.documentToScreenRow(M,$);return this.getScreenLastRowColumn(A)},N.prototype.getDocumentLastRowColumnPosition=function(M,$){var A=this.documentToScreenRow(M,$);return this.screenToDocumentPosition(A,Number.MAX_VALUE/10)},N.prototype.getRowSplitData=function(M){if(this.$useWrapMode)return this.$wrapData[M]},N.prototype.getScreenTabSize=function(M){return this.$tabSize-(M%this.$tabSize|0)},N.prototype.screenToDocumentRow=function(M,$){return this.screenToDocumentPosition(M,$).row},N.prototype.screenToDocumentColumn=function(M,$){return this.screenToDocumentPosition(M,$).column},N.prototype.screenToDocumentPosition=function(M,$){if(M<0)return{row:0,column:0};var A,ne=0,D=0,j,le=0,U=0,q=this.$screenRowCache,Q=this.$getRowCacheIndex(q,M),re=q.length;if(re&&Q>=0)var le=q[Q],ne=this.$docRowCache[Q],ue=M>q[re-1];else var ue=!re;for(var he=this.getLength()-1,oe=this.getNextFoldLine(ne),ee=oe?oe.start.row:1/0;le<=M&&(U=this.getRowLength(ne),!(le+U>M||ne>=he));)le+=U,ne++,ne>ee&&(ne=oe.end.row+1,oe=this.getNextFoldLine(ne,oe),ee=oe?oe.start.row:1/0),ue&&(this.$docRowCache.push(ne),this.$screenRowCache.push(le));if(oe&&oe.start.row<=ne)A=this.getFoldDisplayLine(oe),ne=oe.start.row;else{if(le+U<=M||ne>he)return{row:he,column:this.getLine(he).length};A=this.getLine(ne),oe=null}var ye=0,we=Math.floor(M-le);if(this.$useWrapMode){var Ae=this.$wrapData[ne];Ae&&(j=Ae[we],we>0&&Ae.length&&(ye=Ae.indent,D=Ae[we-1]||Ae[Ae.length-1],A=A.substring(D)))}return D+=this.$getStringScreenWidth(A,$-ye)[1],this.$useWrapMode&&D>=j&&(D=j-1),oe?oe.idxToPosition(D):{row:ne,column:D}},N.prototype.documentToScreenPosition=function(M,$){if(typeof $>"u")var A=this.$clipPositionToDocument(M.row,M.column);else A=this.$clipPositionToDocument(M,$);M=A.row,$=A.column;var ne=0,D=null,j=null;j=this.getFoldAt(M,$,1),j&&(M=j.start.row,$=j.start.column);var U,le=0,q=this.$docRowCache,Q=this.$getRowCacheIndex(q,M),re=q.length;if(re&&Q>=0)var le=q[Q],ne=this.$screenRowCache[Q],ue=M>q[re-1];else var ue=!re;for(var he=this.getNextFoldLine(le),oe=he?he.start.row:1/0;le<M;){if(le>=oe){if(U=he.end.row+1,U>M)break;he=this.getNextFoldLine(U,he),oe=he?he.start.row:1/0}else U=le+1;ne+=this.getRowLength(le),le=U,ue&&(this.$docRowCache.push(le),this.$screenRowCache.push(ne))}var ee="";he&&le>=oe?(ee=this.getFoldDisplayLine(he,M,$),D=he.start.row):(ee=this.getLine(M).substring(0,$),D=M);var ye=0;if(this.$useWrapMode){var we=this.$wrapData[D];if(we){for(var Ae=0;ee.length>=we[Ae];)ne++,Ae++;ee=ee.substring(we[Ae-1]||0,ee.length),ye=Ae>0?we.indent:0}}return this.lineWidgets&&this.lineWidgets[le]&&this.lineWidgets[le].rowsAbove&&(ne+=this.lineWidgets[le].rowsAbove),{row:ne,column:ye+this.$getStringScreenWidth(ee)[0]}},N.prototype.documentToScreenColumn=function(M,$){return this.documentToScreenPosition(M,$).column},N.prototype.documentToScreenRow=function(M,$){return this.documentToScreenPosition(M,$).row},N.prototype.getScreenLength=function(){var M=0,$=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,D=0,j=0,$=this.$foldData[j++],U=$?$.start.row:1/0;D<A;){var q=this.$wrapData[D];M+=q?q.length+1:1,D++,D>U&&(D=$.end.row+1,$=this.$foldData[j++],U=$?$.start.row:1/0)}else{M=this.getLength();for(var Q=this.$foldData,j=0;j<Q.length;j++)$=Q[j],M-=$.end.row-$.start.row}return this.lineWidgets&&(M+=this.$getWidgetScreenLength()),M},N.prototype.$setFontMetrics=function(M){this.$enableVarChar&&(this.$getStringScreenWidth=function($,A,D){if(A===0)return[0,0];A||(A=1/0),D=D||0;var j,U;for(U=0;U<$.length&&(j=$.charAt(U),j===" "?D+=this.getScreenTabSize(D):D+=M.getCharacterWidth(j),!(D>A));U++);return[D,U]})},N.prototype.getPrecedingCharacter=function(){var M=this.selection.getCursor();if(M.column===0)return M.row===0?"":this.doc.getNewLineCharacter();var $=this.getLine(M.row);return $[M.column-1]},N.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},N})();x.$uid=0,x.prototype.$modes=s.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=B,u.implement(x.prototype,d);var R=1,T=2,_=3,C=4,P=9,O=10,E=11,k=12;function B(N){return N<4352?!1:N>=4352&&N<=4447||N>=4515&&N<=4519||N>=4602&&N<=4607||N>=9001&&N<=9002||N>=11904&&N<=11929||N>=11931&&N<=12019||N>=12032&&N<=12245||N>=12272&&N<=12283||N>=12288&&N<=12350||N>=12353&&N<=12438||N>=12441&&N<=12543||N>=12549&&N<=12589||N>=12593&&N<=12686||N>=12688&&N<=12730||N>=12736&&N<=12771||N>=12784&&N<=12830||N>=12832&&N<=12871||N>=12880&&N<=13054||N>=13056&&N<=19903||N>=19968&&N<=42124||N>=42128&&N<=42182||N>=43360&&N<=43388||N>=44032&&N<=55203||N>=55216&&N<=55238||N>=55243&&N<=55291||N>=63744&&N<=64255||N>=65040&&N<=65049||N>=65072&&N<=65106||N>=65108&&N<=65126||N>=65128&&N<=65131||N>=65281&&N<=65376||N>=65504&&N<=65510}t("./edit_session/folding").Folding.call(x.prototype),t("./edit_session/bracket_match").BracketMatch.call(x.prototype),s.defineOptions(x.prototype,"session",{wrap:{set:function(N){if(!N||N=="off"?N=!1:N=="free"?N=!0:N=="printMargin"?N=-1:typeof N=="string"&&(N=parseInt(N,10)||!1),this.$wrap!=N)if(this.$wrap=N,!N)this.setUseWrapMode(!1);else{var M=typeof N=="number"?N:null;this.setWrapLimitRange(M,M),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(N){N=N=="auto"?this.$mode.type!="text":N!="text",N!=this.$wrapAsCode&&(this.$wrapAsCode=N,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(N){this.$useWorker=N,this.$stopWorker(),N&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(N){N=parseInt(N),N>0&&this.$tabSize!==N&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=N,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(N){this.setFoldStyle(N)},handlesSet:!0},overwrite:{set:function(N){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(N){this.doc.setNewLineMode(N)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(N){this.setMode(N)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,r,c){var u=t("./lib/lang"),g=t("./lib/oop"),v=t("./range").Range,s=(function(){function h(){this.$options={}}return h.prototype.set=function(p){return g.mixin(this.$options,p),this},h.prototype.getOptions=function(){return u.copyObject(this.$options)},h.prototype.setOptions=function(p){this.$options=p},h.prototype.find=function(p){var o=this.$options,f=this.$matchIterator(p,o);if(!f)return!1;var m=null;return f.forEach(function(w,x,R,T){return m=new v(w,x,R,T),x==T&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},h.prototype.findAll=function(p){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var f=o.range,m=f?p.getLines(f.start.row,f.end.row):p.doc.getAllLines(),w=[],x=o.re;if(o.$isMultiLine){var R=x.length,T=m.length-R,_;e:for(var C=x.offset||0;C<=T;C++){for(var P=0;P<R;P++)if(m[C+P].search(x[P])==-1)continue e;var O=m[C],E=m[C+R-1],k=O.length-O.match(x[0])[0].length,B=E.match(x[R-1])[0].length;_&&_.end.row===C&&_.end.column>k||(w.push(_=new v(C,k,C+R-1,B)),R>2&&(C=C+R-2))}}else for(var N,M=0;M<m.length;M++)if(this.$isMultilineSearch(o)){var $=m.length-1;if(N=this.$multiLineForward(p,x,M,$),N){var A=N.endRow<=$?N.endRow-1:$;A>M&&(M=A),w.push(new v(N.startRow,N.startCol,N.endRow,N.endCol))}}else{N=u.getMatchOffsets(m[M],x);for(var P=0;P<N.length;P++){var D=N[P];w.push(new v(M,D.offset,M,D.offset+D.length))}}if(f){for(var j=f.start.column,U=f.end.column,M=0,P=w.length-1;M<P&&w[M].start.column<j&&w[M].start.row==0;)M++;for(var q=f.end.row-f.start.row;M<P&&w[P].end.column>U&&w[P].end.row==q;)P--;for(w=w.slice(M,P+1),M=0,P=w.length;M<P;M++)w[M].start.row+=f.start.row,w[M].end.row+=f.start.row}return w},h.prototype.parseReplaceString=function(p){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},f="",m=0,w=p.length;m<w;m++){var x=p.charCodeAt(m);if(x===o.Backslash){if(m++,m>=w){f+="\\";break}var R=p.charCodeAt(m);switch(R){case o.Backslash:f+="\\";break;case o.n:f+=`
202
+ `;break;case o.t:f+=" ";break}continue}if(x===o.DollarSign){if(m++,m>=w){f+="$";break}var T=p.charCodeAt(m);if(T===o.DollarSign){f+="$$";continue}if(T===o.Digit0||T===o.Ampersand){f+="$&";continue}if(o.Digit1<=T&&T<=o.Digit9){f+="$"+p[m];continue}}f+=p[m]}return f||p},h.prototype.replace=function(p,o){var f=this.$options,m=this.$assembleRegExp(f);if(f.$isMultiLine)return o;if(m){var w=this.$isMultilineSearch(f);w&&(p=p.replace(/\r\n|\r|\n/g,`
203
+ `));var x=m.exec(p);if(!x||!w&&x[0].length!=p.length)return null;if(o=f.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=p.replace(m,o),f.preserveCase){o=o.split("");for(var R=Math.min(p.length,p.length);R--;){var T=p[R];T&&T.toLowerCase()!=T?o[R]=o[R].toUpperCase():o[R]=o[R].toLowerCase()}o=o.join("")}return o}},h.prototype.$assembleRegExp=function(p,o){if(p.needle instanceof RegExp)return p.re=p.needle;var f=p.needle;if(!p.needle)return p.re=!1;p.regExp||(f=u.escapeRegExp(f));var m=p.caseSensitive?"gm":"gmi";try{new RegExp(f,"u"),p.$supportsUnicodeFlag=!0,m+="u"}catch{p.$supportsUnicodeFlag=!1}if(p.wholeWord&&(f=d(f,p)),p.$isMultiLine=!o&&/[\n\r]/.test(f),p.$isMultiLine)return p.re=this.$assembleMultilineRegExp(f,m);try{var w=new RegExp(f,m)}catch{w=!1}return p.re=w},h.prototype.$assembleMultilineRegExp=function(p,o){for(var f=p.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),m=[],w=0;w<f.length;w++)try{m.push(new RegExp(f[w],o))}catch{return!1}return m},h.prototype.$isMultilineSearch=function(p){return p.re&&/\\r\\n|\\r|\\n/.test(p.re.source)&&p.regExp&&!p.$isMultiLine},h.prototype.$multiLineForward=function(p,o,f,m){for(var w,x=l(p,f),R=f;R<=m;){for(var T=0;T<x&&!(R>m);T++){var _=p.getLine(R++);w=w==null?_:w+`
206
+ `+_}var C=o.exec(w);if(o.lastIndex=0,C){var P=w.slice(0,C.index).split(`
207
+ `),O=C[0].split(`
208
+ `),E=f+P.length-1,k=P[P.length-1].length,B=E+O.length-1,N=O.length==1?k+O[0].length:O[O.length-1].length;return{startRow:E,startCol:k,endRow:B,endCol:N}}}return null},h.prototype.$multiLineBackward=function(p,o,f,m,w){for(var x,R=l(p,m),T=p.getLine(m).length-f,_=m;_>=w;){for(var C=0;C<R&&_>=w;C++){var P=p.getLine(_--);x=x==null?P:P+`
209
+ `+x}var O=a(x,o,T);if(O){var E=x.slice(0,O.index).split(`
210
+ `),k=O[0].split(`
211
+ `),B=_+E.length,N=E[E.length-1].length,M=B+k.length-1,$=k.length==1?N+k[0].length:k[k.length-1].length;return{startRow:B,startCol:N,endRow:M,endCol:$}}}return null},h.prototype.$matchIterator=function(p,o){var f=this.$assembleRegExp(o);if(!f)return!1;var m=this.$isMultilineSearch(o),w=this.$multiLineForward,x=this.$multiLineBackward,R=o.backwards==!0,T=o.skipCurrent!=!1,_=f.unicode,C=o.range,P=o.start;P||(P=C?C[R?"end":"start"]:p.selection.getRange()),P.start&&(P=P[T!=R?"end":"start"]);var O=C?C.start.row:0,E=C?C.end.row:p.getLength()-1;if(R)var k=function(M){var $=P.row;if(!N($,P.column,M)){for($--;$>=O;$--)if(N($,Number.MAX_VALUE,M))return;if(o.wrap!=!1){for($=E,O=P.row;$>=O;$--)if(N($,Number.MAX_VALUE,M))return}}};else var k=function(M){var $=P.row;if(!N($,P.column,M)){for($=$+1;$<=E;$++)if(N($,0,M))return;if(o.wrap!=!1){for($=O,E=P.row;$<=E;$++)if(N($,0,M))return}}};if(o.$isMultiLine)var B=f.length,N=function(M,$,A){var D=R?M-B+1:M;if(!(D<0||D+B>p.getLength())){var j=p.getLine(D),U=j.search(f[0]);if(!(!R&&U<$||U===-1)){for(var q=1;q<B;q++)if(j=p.getLine(D+q),j.search(f[q])==-1)return;var Q=j.match(f[B-1])[0].length;if(!(R&&Q>$)&&A(D,U,D+B-1,Q))return!0}}};else if(R)var N=function(M,$,A){if(m){var D=x(p,f,$,M,O);if(!D)return!1;if(A(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var j=p.getLine(M),U=[],q,Q=0;for(f.lastIndex=0;q=f.exec(j);){var re=q[0].length;if(Q=q.index,!re){if(Q>=j.length)break;f.lastIndex=Q+=u.skipEmptyMatch(j,Q,_)}if(q.index+re>$)break;U.push(q.index,re)}for(var le=U.length-1;le>=0;le-=2){var ne=U[le-1],re=U[le];if(A(M,ne,M,ne+re))return!0}}};else var N=function(M,$,A){if(f.lastIndex=$,m){var D=w(p,f,M,E);if(D){var j=D.endRow<=E?D.endRow-1:E;j>M&&(M=j)}if(!D)return!1;if(A(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=p.getLine(M),q,Q;Q=f.exec(U);){var re=Q[0].length;if(q=Q.index,A(M,q,M,q+re))return!0;if(!re&&(f.lastIndex=q+=u.skipEmptyMatch(U,q,_),q>=U.length))return!1}};return{forEach:k}},h})();function d(h,p){var o=u.supportsLookbehind();function f(R,T){T===void 0&&(T=!0);var _=o&&p.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(R)||p.regExp?o&&p.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(h),w=m[0],x=m[m.length-1];return f(w)+h+f(x,!1)}function a(h,p,o){for(var f=null,m=0;m<=h.length;){p.lastIndex=m;var w=p.exec(h);if(!w)break;var x=w.index+w[0].length;if(x>h.length-o)break;(!f||x>f.index+f[0].length)&&(f=w),m=w.index+1}return f}function l(h,p){var o=5e3,f={row:p,column:0},m=h.doc.positionToIndex(f),w=m+o,x=h.doc.indexToPosition(w),R=x.row;return R+1}r.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,r,c){var u=this&&this.__extends||(function(){var h=function(p,o){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(f[w]=m[w])},h(p,o)};return function(p,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");h(p,o);function f(){this.constructor=p}p.prototype=o===null?Object.create(o):(f.prototype=o.prototype,new f)}})(),g=t("../lib/keys"),v=t("../lib/useragent"),s=g.KEY_MODS,d=(function(){function h(p,o){this.$init(p,o,!1)}return h.prototype.$init=function(p,o,f){this.platform=o||(v.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(p),this.$singleCommand=f},h.prototype.addCommand=function(p){this.commands[p.name]&&this.removeCommand(p),this.commands[p.name]=p,p.bindKey&&this._buildKeyHash(p)},h.prototype.removeCommand=function(p,o){var f=p&&(typeof p=="string"?p:p.name);p=this.commands[f],o||delete this.commands[f];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==p)delete m[w];else if(Array.isArray(x)){var R=x.indexOf(p);R!=-1&&(x.splice(R,1),x.length==1&&(m[w]=x[0]))}}},h.prototype.bindKey=function(p,o,f){if(typeof p=="object"&&p&&(f==null&&(f=p.position),p=p[this.platform]),!!p){if(typeof o=="function")return this.addCommand({exec:o,bindKey:p,name:o.name||p});p.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(_){var C=this.parseKeys(_),P=s[C.hashId]+C.key;w+=(w?" ":"")+P,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var R=this.parseKeys(m),T=s[R.hashId]+R.key;this._addCommandToBinding(w+T,o,f)},this)}},h.prototype._addCommandToBinding=function(p,o,f){var m=this.commandKeyBinding,w;if(!o)delete m[p];else if(!m[p]||this.$singleCommand)m[p]=o;else{Array.isArray(m[p])?(w=m[p].indexOf(o))!=-1&&m[p].splice(w,1):m[p]=[m[p]],typeof f!="number"&&(f=a(o));var x=m[p];for(w=0;w<x.length;w++){var R=x[w],T=a(R);if(T>f)break}x.splice(w,0,o)}},h.prototype.addCommands=function(p){p&&Object.keys(p).forEach(function(o){var f=p[o];if(f){if(typeof f=="string")return this.bindKey(f,o);typeof f=="function"&&(f={exec:f}),typeof f=="object"&&(f.name||(f.name=o),this.addCommand(f))}},this)},h.prototype.removeCommands=function(p){Object.keys(p).forEach(function(o){this.removeCommand(p[o])},this)},h.prototype.bindKeys=function(p){Object.keys(p).forEach(function(o){this.bindKey(o,p[o])},this)},h.prototype._buildKeyHash=function(p){this.bindKey(p.bindKey,p)},h.prototype.parseKeys=function(p){var o=p.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),f=o.pop(),m=g[f];if(g.FUNCTION_KEYS[m])f=g.FUNCTION_KEYS[m].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:f.toUpperCase(),hashId:-1}}else return{key:f,hashId:-1};for(var w=0,x=o.length;x--;){var R=g.KEY_MODS[o[x]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+o[x]+" in "+p),!1;w|=R}return{key:f,hashId:w}},h.prototype.findKeyCommand=function(p,o){var f=s[p]+o;return this.commandKeyBinding[f]},h.prototype.handleKeyboard=function(p,o,f,m){if(!(m<0)){var w=s[o]+f,x=this.commandKeyBinding[w];return p.$keyChain&&(p.$keyChain+=" "+w,x=this.commandKeyBinding[p.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(p.$keyChain=p.$keyChain||w,{command:"null"}):(p.$keyChain&&((!o||o==4)&&f.length==1?p.$keyChain=p.$keyChain.slice(0,-w.length-1):(o==-1||m>0)&&(p.$keyChain="")),{command:x})}},h.prototype.getStatusText=function(p,o){return o.$keyChain||""},h})();function a(h){return typeof h=="object"&&h.bindKey&&h.bindKey.position||(h.isDefault?-100:0)}var l=(function(h){u(p,h);function p(o,f){var m=h.call(this,o,f)||this;return m.$singleCommand=!0,m}return p})(d);l.call=function(h,p,o){d.prototype.$init.call(h,p,o,!0)},d.call=function(h,p,o){d.prototype.$init.call(h,p,o,!1)},r.HashHandler=l,r.MultiHashHandler=d}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,r,c){var u=this&&this.__extends||(function(){var a=function(l,h){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&(p[f]=o[f])},a(l,h)};return function(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");a(l,h);function p(){this.constructor=l}l.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})(),g=t("../lib/oop"),v=t("../keyboard/hash_handler").MultiHashHandler,s=t("../lib/event_emitter").EventEmitter,d=(function(a){u(l,a);function l(h,p){var o=a.call(this,p,h)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(f){return f.args?f.command.exec(f.editor,f.args,f.event,!1):f.command.exec(f.editor,{},f.event,!0)}),o}return l.prototype.exec=function(h,p,o){if(Array.isArray(h)){for(var f=h.length;f--;)if(this.exec(h[f],p,o))return!0;return!1}typeof h=="string"&&(h=this.commands[h]);var m={editor:p,command:h,args:o};return this.canExecute(h,p)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},l.prototype.canExecute=function(h,p){return typeof h=="string"&&(h=this.commands[h]),!(!h||p&&p.$readOnly&&!h.readOnly||this.$checkCommandState!=!1&&h.isAvailable&&!h.isAvailable(p))},l.prototype.toggleRecording=function(h){if(!this.$inReplay)return h&&h._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(p){this.macro.push([p.command,p.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(h){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(h);try{this.$inReplay=!0,this.macro.forEach(function(p){typeof p=="string"?this.exec(p,h):this.exec(p[0],h,p[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(h){return h.map(function(p){return typeof p[0]!="string"&&(p[0]=p[0].name),p[1]||(p=p[0]),p})},l})(v);g.implement(d.prototype,s),r.CommandManager=d}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,r,c){var u=t("../lib/lang"),g=t("../config"),v=t("../range").Range;function s(a,l){return{win:a,mac:l}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(a){g.loadModule("ace/ext/settings_menu",function(l){l.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(a,l){typeof l=="number"&&!isNaN(l)&&a.gotoLine(l),a.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(l){l.Search(a)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(a,l){a.navigateUp(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(a,l){a.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(a,l){a.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(a,l){a.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(a){},readOnly:!0},{name:"cut",description:"Cut",exec:function(a){var l=a.$copyWithEmptySelection&&a.selection.isEmpty(),h=l?a.selection.getLineRange():a.selection.getRange();a._emit("cut",h),h.isEmpty()||a.session.remove(h),a.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(a,l){a.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(l){l.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(a){if(a.selection.isEmpty())a.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(a){var l=a.selection.getRange();l.start.column=0,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(a){var l=a.selection.getRange();l.end.column=Number.MAX_VALUE,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(a,l){a.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(a,l){a.insert(u.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(a){a.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var l=a.selection.getRange();l.start.column=l.end.column=0,l.end.row++,a.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(a){for(var l=a.selection.isBackwards(),h=l?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),p=l?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),o=a.session.doc.getLine(h.row).length,f=a.session.doc.getTextRange(a.selection.getRange()),m=f.replace(/\n\s*/," ").length,w=a.session.doc.getLine(h.row),x=h.row+1;x<=p.row+1;x++){var R=u.stringTrimLeft(u.stringTrimRight(a.session.doc.getLine(x)));R.length!==0&&(R=" "+R),w+=R}p.row+1<a.session.doc.getLength()-1&&(w+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new v(h.row,0,p.row+2,0),w),m>0?(a.selection.moveCursorTo(h.row,h.column),a.selection.selectTo(h.row,h.column+m)):(o=a.session.doc.getLine(h.row).length>o?o+1:o,a.selection.moveCursorTo(h.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(a){var l=a.session.doc.getLength()-1,h=a.session.doc.getLine(l).length,p=a.selection.rangeList.ranges,o=[];p.length<1&&(p=[a.selection.getRange()]);for(var f=0;f<p.length;f++)f==p.length-1&&(p[f].end.row===l&&p[f].end.column===h||o.push(new v(p[f].end.row,p[f].end.column,l,h))),f===0?p[f].start.row===0&&p[f].start.column===0||o.push(new v(0,0,p[f].start.row,p[f].start.column)):o.push(new v(p[f-1].end.row,p[f-1].end.column,p[f].start.row,p[f].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var f=0;f<o.length;f++)a.selection.addRange(o[f],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(a){a.selection.clearSelection(),a.navigateLineEnd(),a.insert(`
212
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(a){a.selection.clearSelection();var l=a.getCursorPosition();a.selection.moveTo(l.row-1,Number.MAX_VALUE),a.insert(`
213
+ `),l.row===0&&a.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(a){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),a.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(a){a.prompt({$type:"modes"})},readOnly:!0}];for(var d=1;d<9;d++)r.commands.push({name:"foldToLevel"+d,description:"Fold To Level "+d,level:d,exec:function(a){a.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(t,r,c){var u=t("../lib/keys"),g=(function(){function s(d){this.editor=d,this.gutterLayer=d.renderer.$gutterLayer,this.element=d.renderer.$gutter,this.lines=d.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return s.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},s.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},s.prototype.$onGutterKeyDown=function(d){if(this.annotationTooltip.isOpen){d.preventDefault(),d.keyCode===u.escape&&this.annotationTooltip.hide();return}if(d.target===this.element){if(d.keyCode!=u.enter)return;d.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var l=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),h=this.$findNearestFoldLaneWidget(l),p=this.$findNearestAnnotation(l);if(!(h===null&&p===null)){var o=this.$findClosestNumber(h,p,l);if(o===h)if(this.activeLane="fold",this.activeRowIndex=h,this.$isCustomWidgetVisible(h)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(d),setTimeout((function(){this.editor._signal("gutterkeydown",new v(d,this))}).bind(this),10)},s.prototype.$handleGutterKeyboardInteraction=function(d){if(d.keyCode===u.tab){d.preventDefault();return}if(d.keyCode===u.escape){d.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(d.keyCode===u.up){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(d.keyCode===u.down){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(d.keyCode===u.left){d.preventDefault(),this.$switchLane("annotation");return}if(d.keyCode===u.right){d.preventDefault(),this.$switchLane("fold");return}if(d.keyCode===u.enter||d.keyCode===u.space){switch(d.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),l=this.editor.session.$gutterCustomWidgets[a];if(l)l.callbacks&&l.callbacks.onClick&&l.callbacks.onClick(d,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),d),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},s.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},s.prototype.$isFoldWidgetVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getFoldWidget(d).style.display!=="none";return a&&l},s.prototype.$isCustomWidgetVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=!!this.$getCustomWidget(d);return a&&l},s.prototype.$isAnnotationVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getAnnotation(d).style.display!=="none";return a&&l},s.prototype.$getFoldWidget=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[1]},s.prototype.$getCustomWidget=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[3]},s.prototype.$getAnnotation=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[2]},s.prototype.$findNearestFoldLaneWidget=function(d){if(this.$isCustomWidgetVisible(d)||this.$isFoldWidgetVisible(d))return d;for(var a=0;d-a>0||d+a<this.lines.getLength()-1;){if(a++,d-a>=0&&this.$isCustomWidgetVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(d+a))return d+a;if(d-a>=0&&this.$isFoldWidgetVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(d+a))return d+a}return null},s.prototype.$findNearestAnnotation=function(d){if(this.$isAnnotationVisible(d))return d;for(var a=0;d-a>0||d+a<this.lines.getLength()-1;){if(a++,d-a>=0&&this.$isAnnotationVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(d+a))return d+a}return null},s.prototype.$focusFoldWidget=function(d){if(d!=null){var a=this.$getFoldWidget(d);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},s.prototype.$focusCustomWidget=function(d){if(d!=null){var a=this.$getCustomWidget(d);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},s.prototype.$focusAnnotation=function(d){if(d!=null){var a=this.$getAnnotation(d);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},s.prototype.$blurFoldWidget=function(d){var a=this.$getFoldWidget(d);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},s.prototype.$blurCustomWidget=function(d){var a=this.$getCustomWidget(d);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},s.prototype.$blurAnnotation=function(d){var a=this.$getAnnotation(d);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},s.prototype.$moveFoldWidgetUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveFoldWidgetDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},s.prototype.$moveAnnotationUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$moveAnnotationDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},s.prototype.$findClosestNumber=function(d,a,l){return d===null?a:a===null||Math.abs(l-d)<=Math.abs(l-a)?d:a},s.prototype.$switchLane=function(d){switch(d){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var l=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(l===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$isCustomWidgetVisible(l)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},s.prototype.$rowIndexToRow=function(d){var a=this.lines.get(d);return a?a.row:null},s.prototype.$rowToRowIndex=function(d){for(var a=0;a<this.lines.getLength();a++){var l=this.lines.get(a);if(l.row==d)return a}return null},s})();r.GutterKeyboardHandler=g;var v=(function(){function s(d,a){this.gutterKeyboardHandler=a,this.domEvent=d}return s.prototype.getKey=function(){return u.keyCodeToString(this.domEvent.keyCode)},s.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},s.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},s.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},s})();r.GutterKeyboardEvent=v}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(t,r,c){var u=this&&this.__values||function($){var A=typeof Symbol=="function"&&Symbol.iterator,D=A&&$[A],j=0;if(D)return D.call($);if($&&typeof $.length=="number")return{next:function(){return $&&j>=$.length&&($=void 0),{value:$&&$[j++],done:!$}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},g=t("./lib/oop"),v=t("./lib/dom"),s=t("./lib/lang"),d=t("./lib/useragent"),a=t("./keyboard/textinput").TextInput,l=t("./mouse/mouse_handler").MouseHandler,h=t("./mouse/fold_handler").FoldHandler,p=t("./keyboard/keybinding").KeyBinding,o=t("./edit_session").EditSession,f=t("./search").Search,m=t("./range").Range,w=t("./lib/event_emitter").EventEmitter,x=t("./commands/command_manager").CommandManager,R=t("./commands/default_commands").commands,T=t("./config"),_=t("./token_iterator").TokenIterator,C=t("./keyboard/gutter_handler").GutterKeyboardHandler,P=t("./config").nls,O=t("./clipboard"),E=t("./lib/keys"),k=t("./lib/event"),B=t("./tooltip").HoverTooltip,N=(function(){function $(A,D,j){this.id="editor"+ ++$.$uid,this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.commands=new x(d.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new a(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new h(this)),this.keyBinding=new p(this),this.$search=new f().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(q,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(D||j&&j.session||new o("")),T.resetOptions(this),j&&this.setOptions(j),T._signal("editor",this)}return $.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},$.prototype.startOperation=function(A){this.session.startOperation(A)},$.prototype.endOperation=function(A){this.session.endOperation(A)},$.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},$.prototype.onEndOperation=function(A){if(this.curOp&&this.session){if(A&&A.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var D=this.curOp.command,j=D&&D.scrollIntoView;if(j){switch(j){case"center-animate":j="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),q=this.renderer.layerConfig;(U.start.row>=q.lastRow||U.end.row<=q.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}j=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},$.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var D=this.prevOp,j=this.$mergeableCommands,U=D.command&&A.command.name==D.command.name;if(A.command.name=="insertstring"){var q=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(q)||/\s/.test(D.args)),this.mergeNextCommand=!0}else U=U&&j.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:j.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(A,D){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var j=this;T.loadModule(["keybinding",A],function(U){j.$keybindingId==A&&j.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),D&&D()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var j=this.session.getSelection();this.session.$fontMetrics=null,j.off("changeCursor",this.$onCursorChange),j.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),A.$fontMetrics=this.renderer.$fontMetrics,this.$onChangeMode=this.onChangeMode.bind(this),A.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),A.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),A.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),A.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),A.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),A.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=A.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(A)),this._signal("changeSession",{session:A,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},$.prototype.getSession=function(){return this.session},$.prototype.setValue=function(A,D){return this.session.doc.setValue(A),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),A},$.prototype.getValue=function(){return this.session.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.resize=function(A){this.renderer.onResize(A)},$.prototype.setTheme=function(A,D){this.renderer.setTheme(A,D)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(A,D){this.renderer.setStyle(A,D)},$.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||v.computedStyle(this.container).fontSize},$.prototype.setFontSize=function(A){this.setOption("fontSize",A)},$.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var D=A.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(he){D.removeMarker(he)}),D.$bracketHighlight=null);var j=A.getCursorPosition(),U=A.getKeyboardHandler(),q=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),Q=D.getMatchingBracketRanges(j,q);if(!Q){var re=new _(D,j.row,j.column),le=re.getCurrentToken();if(le&&/\b(?:tag-open|tag-name)/.test(le.type)){var ne=D.getMatchingTags(j);ne&&(Q=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Q&&D.$mode.getMatching&&(Q=D.$mode.getMatching(A.session)),!Q){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var ue="ace_bracket";Array.isArray(Q)?Q.length==1&&(ue="ace_error_bracket"):Q=[Q],Q.length==2&&(m.comparePoints(Q[0].end,Q[1].start)==0?Q=[m.fromPoints(Q[0].start,Q[1].end)]:m.comparePoints(Q[0].start,Q[1].end)==0&&(Q=[m.fromPoints(Q[1].start,Q[0].end)])),D.$bracketHighlight={ranges:Q,markerIds:Q.map(function(he){return D.addMarker(he,ue,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},$.prototype.focus=function(){this.textInput.focus()},$.prototype.isFocused=function(){return this.textInput.isFocused()},$.prototype.blur=function(){this.textInput.blur()},$.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},$.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},$.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},$.prototype.onDocumentChange=function(A){var D=this.session.$useWrapMode,j=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,j,D),this._signal("change",A),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(A){var D=A.data;this.renderer.updateLines(D.first,D.last)},$.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},$.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},$.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},$.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),A.$highlightLineMarker&&!D)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&D){var j=new m(D.row,D.column,D.row,1/0);j.id=A.addMarker(j,"ace_active-line","screenLine"),A.$highlightLineMarker=j}else D&&(A.$highlightLineMarker.start.row=D.row,A.$highlightLineMarker.end.row=D.row,A.$highlightLineMarker.start.column=D.column,A._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(A){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var j=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(j,"ace_selection",U)}var q=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(q),this._signal("changeSelection")},$.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var j=D.start.column,U=D.end.column,q=A.getLine(D.start.row),Q=q.substring(j,U);if(!(Q.length>5e3||!/[\w\d]/.test(Q))){var re=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Q}),le=q.substring(j-1,U+1);if(re.test(le))return re}}},$.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},$.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},$.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},$.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},$.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},$.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},$.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},$.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},$.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},$.prototype.getCopyText=function(){var A=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),j=!1;if(!A&&this.$copyWithEmptySelection){j=!0;for(var U=this.selection.getAllRanges(),q=0;q<U.length;q++){var Q=U[q];q&&U[q-1].start.row==Q.start.row||(A+=this.session.getLine(Q.start.row)+D)}}var re={text:A};return this._signal("copy",re),O.lineMode=j?re.text:!1,re.text},$.prototype.onCopy=function(){this.commands.exec("copy",this)},$.prototype.onCut=function(){this.commands.exec("cut",this)},$.prototype.onPaste=function(A,D){var j={text:A,event:D};this.commands.exec("paste",this,j)},$.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var D=A.text,j=D===O.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)j?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(j)this.selection.rangeList.ranges.forEach(function(ue){U.insert({row:ue.start.row,column:0},D)});else{var q=D.split(/\r\n|\r|\n/),Q=this.selection.rangeList.ranges,re=q.length==2&&(!q[0]||!q[1]);if(q.length!=Q.length||re)return this.commands.exec("insertstring",this,D);for(var le=Q.length;le--;){var ne=Q[le];ne.isEmpty()||U.remove(ne),U.insert(ne.start,q[le])}}},$.prototype.execCommand=function(A,D){return this.commands.exec(A,this,D)},$.prototype.insert=function(A,D){var j=this.session,U=j.getMode(),q=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var Q=U.transformAction(j.getState(q.row),"insertion",this,j,A);Q&&(A!==Q.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=Q.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
214
+ `)==-1){var re=m.fromPoints(q,q);re.end.column+=A.length,this.session.remove(re)}}else{var re=this.getSelectionRange();q=this.session.remove(re),this.clearSelection()}if(A==`
215
+ `||A==`\r
216
+ `){var he=j.getLine(q.row);if(q.column>he.search(/\S|$/)){var le=he.substr(q.column).search(/\S|$/);j.doc.removeInLine(q.row,q.column,q.column+le)}}this.clearSelection();var ne=q.column,ue=j.getState(q.row),he=j.getLine(q.row),oe=U.checkOutdent(ue,he,A);if(j.insert(q,A),Q&&Q.selection&&(Q.selection.length==2?this.selection.setSelectionRange(new m(q.row,ne+Q.selection[0],q.row,ne+Q.selection[1])):this.selection.setSelectionRange(new m(q.row+Q.selection[0],Q.selection[1],q.row+Q.selection[2],Q.selection[3]))),this.$enableAutoIndent){if(j.getDocument().isNewLine(A)){var ee=U.getNextLineIndent(ue,he.slice(0,q.column),j.getTabString());j.insert({row:q.row+1,column:0},ee)}oe&&U.autoOutdent(ue,j,q.row)}},$.prototype.autoIndent=function(){for(var A=this.session,D=A.getMode(),j=this.selection.isEmpty()?[new m(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",q="",Q="",re=A.getTabString(),le=0;le<j.length;le++)for(var ne=j[le].start.row,ue=j[le].end.row,he=ne;he<=ue;he++){he>0&&(U=A.getState(he-1),q=A.getLine(he-1),Q=D.getNextLineIndent(U,q,re));var oe=A.getLine(he),ee=D.$getIndent(oe);if(Q!==ee){if(ee.length>0){var ye=new m(he,0,he,ee.length);A.remove(ye)}Q.length>0&&A.insert({row:he,column:0},Q)}D.autoOutdent(U,A,he)}},$.prototype.onTextInput=function(A,D){if(!D)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var j=this.applyComposition.bind(this,A,D);this.selection.rangeCount?this.forEachSelection(j):j(),this.endOperation()},$.prototype.applyComposition=function(A,D){if(D.extendLeft||D.extendRight){var j=this.selection.getRange();j.start.column-=D.extendLeft,j.end.column+=D.extendRight,j.start.column<0&&(j.start.row--,j.start.column+=this.session.getLine(j.start.row).length+1),this.selection.setRange(j),!A&&!j.isEmpty()&&this.execCommand(D.extendLeft?"backspace":"del")}if((A||!this.selection.isEmpty())&&this.insert(A,!0),D.restoreStart||D.restoreEnd){var j=this.selection.getRange();j.start.column-=D.restoreStart,j.end.column-=D.restoreEnd,this.selection.setRange(j)}},$.prototype.onCommandKey=function(A,D,j){return this.keyBinding.onCommandKey(A,D,j)},$.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},$.prototype.getOverwrite=function(){return this.session.getOverwrite()},$.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},$.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},$.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},$.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},$.prototype.getDragDelay=function(){return this.getOption("dragDelay")},$.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},$.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},$.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},$.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},$.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},$.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},$.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},$.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},$.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},$.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},$.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},$.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},$.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},$.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},$.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},$.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},$.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},$.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},$.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},$.prototype.getReadOnly=function(){return this.getOption("readOnly")},$.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},$.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},$.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},$.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},$.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},$.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},$.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var j=this.session,U=j.getState(D.start.row),q=j.getMode().transformAction(U,"deletion",this,j,D);if(D.end.column===0){var Q=j.getTextRange(D);if(Q[Q.length-1]==`
217
+ `){var re=j.getLine(D.end.row);/^\s+$/.test(re)&&(D.end.column=re.length)}}q&&(D=q)}this.session.remove(D),this.clearSelection()},$.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var A=this.getSelectionRange();A.start.column==A.end.column&&A.start.row==A.end.row&&(A.end.column=0,A.end.row++),this.session.remove(A),this.clearSelection()},$.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
218
+ `),this.moveCursorToPosition(A)},$.prototype.setGhostText=function(A,D){this.renderer.setGhostText(A,D)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),D=A.column;if(D!==0){var j=this.session.getLine(A.row),U,q;D<j.length?(U=j.charAt(D)+j.charAt(D-1),q=new m(A.row,D-1,A.row,D+1)):(U=j.charAt(D-1)+j.charAt(D-2),q=new m(A.row,D-2,A.row,D)),this.session.replace(q,U),this.session.selection.moveToPosition(q.end)}}},$.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toLowerCase()),this.selection.setSelectionRange(A)},$.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toUpperCase()),this.selection.setSelectionRange(A)},$.prototype.indent=function(){var A=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var j=this.$getSelectedRows();A.indentRows(j.first,j.last," ");return}else if(D.start.column<D.end.column){var U=A.getTextRange(D);if(!/^\s+$/.test(U)){var j=this.$getSelectedRows();A.indentRows(j.first,j.last," ");return}}var q=A.getLine(D.start.row),Q=D.start,re=A.getTabSize(),le=A.documentToScreenColumn(Q.row,Q.column);if(this.session.getUseSoftTabs())var ne=re-le%re,ue=s.stringRepeat(" ",ne);else{for(var ne=le%re;q[D.start.column-1]==" "&&ne;)D.start.column--,ne--;this.selection.setSelectionRange(D),ue=" "}return this.insert(ue)},$.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},$.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},$.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),D=this.session,j=[],U=A.first;U<=A.last;U++)j.push(D.getLine(U));j.sort(function(re,le){return re.toLowerCase()<le.toLowerCase()?-1:re.toLowerCase()>le.toLowerCase()?1:0});for(var q=new m(0,0,0,0),U=A.first;U<=A.last;U++){var Q=D.getLine(U);q.start.row=U,q.end.row=U,q.end.column=Q.length,D.replace(q,j[U-A.first])}},$.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,D.first,D.last)},$.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),D=this.session.getState(A.row),j=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,j,A)},$.prototype.getNumberAt=function(A,D){var j=/[\-]?[0-9]+(?:\.[0-9]+)?/g;j.lastIndex=0;for(var U=this.session.getLine(A);j.lastIndex<D;){var q=j.exec(U);if(q.index<=D&&q.index+q[0].length>=D){var Q={value:q[0],start:q.index,end:q.index+q[0].length};return Q}}return null},$.prototype.modifyNumber=function(A){var D=this.selection.getCursor().row,j=this.selection.getCursor().column,U=new m(D,j-1,D,j),q=this.session.getTextRange(U);if(!isNaN(parseFloat(q))&&isFinite(q)){var Q=this.getNumberAt(D,j);if(Q){var re=Q.value.indexOf(".")>=0?Q.start+Q.value.indexOf(".")+1:Q.end,le=Q.start+Q.value.length-re,ne=parseFloat(Q.value);ne*=Math.pow(10,le),re!==Q.end&&j<re?A*=Math.pow(10,Q.end-j-1):A*=Math.pow(10,Q.end-j),ne+=A,ne/=Math.pow(10,le);var ue=ne.toFixed(le),he=new m(D,Q.start,D,Q.end);this.session.replace(he,ue),this.moveCursorTo(D,Math.max(Q.start+1,j+ue.length-Q.value.length))}}else this.toggleWord()},$.prototype.toggleWord=function(){var A=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var j=this.getSelectedText(),U=this.selection.getWordRange().start.column,q=j.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Q=D-U-1;Q<0&&(Q=0);var re=0,le=0,ne=this;j.match(/[A-Za-z0-9_]+/)&&q.forEach(function(Be,Ye){le=re+Be.length,Q>=re&&Q<=le&&(j=Be,ne.selection.clearSelection(),ne.moveCursorTo(A,re+U),ne.selection.selectTo(A,le+U)),re=le});for(var ue=this.$toggleWordPairs,he,oe=0;oe<ue.length;oe++)for(var ee=ue[oe],ye=0;ye<=1;ye++){var we=+!ye,Ae=j.match(new RegExp("^\\s?_?("+s.escapeRegExp(ee[ye])+")\\s?$","i"));if(Ae){var Je=j.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(Ae[1])+")($|\\s)","g"));Je&&(he=j.replace(new RegExp(s.escapeRegExp(ee[ye]),"i"),function(Be){var Ye=ee[we];return Be.toUpperCase()==Be?Ye=Ye.toUpperCase():Be.charAt(0).toUpperCase()==Be.charAt(0)&&(Ye=Ye.substr(0,0)+ee[we].charAt(0).toUpperCase()+Ye.substr(1)),Ye}),this.insert(he),he="")}}},$.prototype.findLinkAt=function(A,D){var j,U,q=this.session.getLine(A),Q=q.split(/((?:https?|ftp):\/\/[\S]+)/),re=D;re<0&&(re=0);var le=0,ne=0,ue;try{for(var he=u(Q),oe=he.next();!oe.done;oe=he.next()){var ee=oe.value;if(ne=le+ee.length,re>=le&&re<=ne&&ee.match(/((?:https?|ftp):\/\/[\S]+)/)){ue=ee.replace(/[\s:.,'";}\]]+$/,"");break}le=ne}}catch(ye){j={error:ye}}finally{try{oe&&!oe.done&&(U=he.return)&&U.call(he)}finally{if(j)throw j.error}}return ue},$.prototype.openLink=function(){var A=this.selection.getCursor(),D=this.findLinkAt(A.row,A.column);return D&&window.open(D,"_blank"),D!=null},$.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var A=this.selection,D=this.session,j=A.getRange(),U=A.isBackwards();if(j.isEmpty()){var q=j.start.row;D.duplicateLines(q,q)}else{var Q=U?j.start:j.end,re=D.insert(Q,D.getTextRange(j));j.start=Q,j.end=re,A.setSelectionRange(j,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(A,D,j){return this.session.moveText(A,D,j)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(A,D){var j,U,q=this.selection;if(!q.inMultiSelectMode||this.inVirtualSelectionMode){var Q=q.toOrientedRange();j=this.$getSelectedRows(Q),U=this.session.$moveLines(j.first,j.last,D?0:A),D&&A==-1&&(U=0),Q.moveBy(U,0),q.fromOrientedRange(Q)}else{var re=q.rangeList.ranges;q.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var le=0,ne=0,ue=re.length,he=0;he<ue;he++){var oe=he;re[he].moveBy(le,0),j=this.$getSelectedRows(re[he]);for(var ee=j.first,ye=j.last;++he<ue;){ne&&re[he].moveBy(ne,0);var we=this.$getSelectedRows(re[he]);if(D&&we.first!=ye||!D&&we.first>ye+1)break;ye=we.last}for(he--,le=this.session.$moveLines(ee,ye,D?0:A),D&&A==-1&&(oe=he+1);oe<=he;)re[oe].moveBy(le,0),oe++;D||(le=0),ne+=le}q.fromOrientedRange(q.ranges[0]),q.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},$.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},$.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},$.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},$.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},$.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},$.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},$.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},$.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},$.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},$.prototype.$moveByPage=function(A,D){var j=this.renderer,U=this.renderer.layerConfig,q=A*Math.floor(U.height/U.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(q,0)}):D===!1&&(this.selection.moveCursorBy(q,0),this.selection.clearSelection());var Q=j.scrollTop;j.scrollBy(0,q*U.lineHeight),D!=null&&j.scrollCursorIntoView(null,.5),j.animateScrolling(Q)},$.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},$.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},$.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},$.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},$.prototype.scrollPageDown=function(){this.$moveByPage(1)},$.prototype.scrollPageUp=function(){this.$moveByPage(-1)},$.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},$.prototype.scrollToLine=function(A,D,j,U){this.renderer.scrollToLine(A,D,j,U)},$.prototype.centerSelection=function(){var A=this.getSelectionRange(),D={row:Math.floor(A.start.row+(A.end.row-A.start.row)/2),column:Math.floor(A.start.column+(A.end.column-A.start.column)/2)};this.renderer.alignCursor(D,.5)},$.prototype.getCursorPosition=function(){return this.selection.getCursor()},$.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},$.prototype.getSelectionRange=function(){return this.selection.getRange()},$.prototype.selectAll=function(){this.selection.selectAll()},$.prototype.clearSelection=function(){this.selection.clearSelection()},$.prototype.moveCursorTo=function(A,D){this.selection.moveCursorTo(A,D)},$.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},$.prototype.jumpToMatching=function(A,D){var j=this.getCursorPosition(),U=new _(this.session,j.row,j.column),q=U.getCurrentToken(),Q=0;q&&q.type.indexOf("tag-name")!==-1&&(q=U.stepBackward());var re=q||U.stepForward();if(re){var le,ne=!1,ue={},he=j.column-re.start,oe,ee={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(re.value.match(/[{}()\[\]]/g)){for(;he<re.value.length&&!ne;he++)if(ee[re.value[he]])switch(oe=ee[re.value[he]]+"."+re.type.replace("rparen","lparen"),isNaN(ue[oe])&&(ue[oe]=0),re.value[he]){case"(":case"[":case"{":ue[oe]++;break;case")":case"]":case"}":ue[oe]--,ue[oe]===-1&&(le="bracket",ne=!0);break}}else re.type.indexOf("tag-name")!==-1&&(isNaN(ue[re.value])&&(ue[re.value]=0),q.value==="<"&&Q>1?ue[re.value]++:q.value==="</"&&ue[re.value]--,ue[re.value]===-1&&(le="tag",ne=!0));ne||(q=re,Q++,re=U.stepForward(),he=0)}while(re&&!ne);if(le){var ye,we;if(le==="bracket")ye=this.session.getBracketRange(j),ye||(ye=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+he-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+he-1),we=ye.start,(D||we.row===j.row&&Math.abs(we.column-j.column)<2)&&(ye=this.session.getBracketRange(we)));else if(le==="tag"){if(!re||re.type.indexOf("tag-name")===-1)return;if(ye=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),ye.compare(j.row,j.column)===0){var Ae=this.session.getMatchingTags(j);Ae&&(Ae.openTag.contains(j.row,j.column)?(ye=Ae.closeTag,we=ye.start):(ye=Ae.openTag,Ae.closeTag.start.row===j.row&&Ae.closeTag.start.column===j.column?we=ye.end:we=ye.start))}we=we||ye.start}we=ye&&ye.cursor||we,we&&(A?ye&&D?this.selection.setRange(ye):ye&&ye.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(we.row,we.column):this.selection.moveTo(we.row,we.column))}}},$.prototype.gotoLine=function(A,D,j){this.selection.clearSelection(),this.session.unfold({row:A-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,D||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,j)},$.prototype.navigateTo=function(A,D){this.selection.moveTo(A,D)},$.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},$.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},$.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},$.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},$.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},$.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},$.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},$.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},$.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},$.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},$.prototype.replace=function(A,D){D&&this.$search.set(D);var j=this.$search.find(this.session),U=0;return j&&(this.$tryReplace(j,A)&&(U=1),this.selection.setSelectionRange(j),this.renderer.scrollSelectionIntoView(j.start,j.end)),U},$.prototype.replaceAll=function(A,D){D&&this.$search.set(D);var j=this.$search.findAll(this.session),U=0;if(!j.length)return U;var q=this.getSelectionRange();this.selection.moveTo(0,0);for(var Q=j.length-1;Q>=0;--Q)this.$tryReplace(j[Q],A)&&U++;return this.selection.setSelectionRange(q),U},$.prototype.$tryReplace=function(A,D){var j=this.session.getTextRange(A);return D=this.$search.replace(j,D),D!==null?(A.end=this.session.replace(A,D),A):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(A,D,j){D||(D={}),typeof A=="string"||A instanceof RegExp?D.needle=A:typeof A=="object"&&g.mixin(D,A);var U=this.selection.getRange();D.needle==null&&(A=this.session.getTextRange(U)||this.$search.$options.needle,A||(U=this.session.getWordRange(U.start.row,U.start.column),A=this.session.getTextRange(U)),this.$search.set({needle:A})),this.$search.set(D),D.start||this.$search.set({start:U});var q=this.$search.find(this.session);if(D.preventScroll)return q;if(q)return this.revealRange(q,j),q;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},$.prototype.findNext=function(A,D){this.find({skipCurrent:!0,backwards:!1},A,D)},$.prototype.findPrevious=function(A,D){this.find(A,{skipCurrent:!0,backwards:!0},D)},$.prototype.revealRange=function(A,D){this.session.unfold(A),this.selection.setSelectionRange(A);var j=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),D!==!1&&this.renderer.animateScrolling(j)},$.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},$.prototype.setAutoScrollEditorIntoView=function(A){if(A){var D,j=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var q=this.$scrollAnchor;q.style.cssText="position:absolute",this.container.insertBefore(q,this.container.firstChild);var Q=this.on("changeSelection",function(){U=!0}),re=this.renderer.on("beforeRender",function(){U&&(D=j.renderer.container.getBoundingClientRect())}),le=this.renderer.on("afterRender",function(){if(U&&D&&(j.isFocused()||j.searchBox&&j.searchBox.isFocused())){var ne=j.renderer,ue=ne.$cursorLayer.$pixelPos,he=ne.layerConfig,oe=ue.top-he.offset;ue.top>=0&&oe+D.top<0?U=!0:ue.top<he.height&&ue.top+D.top+he.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(q.style.top=oe+"px",q.style.left=ue.left+"px",q.style.height=he.lineHeight+"px",q.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",le),this.renderer.off("beforeRender",re))}}},$.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(A)),D.isBlinking=!this.$readOnly&&A!="wide",v.setCssClass(D.element,"ace_slim-cursors",/slim/.test(A)))},$.prototype.prompt=function(A,D,j){var U=this;T.loadModule("ace/ext/prompt",function(q){q.prompt(U,A,D,j)})},Object.defineProperty($.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new B(this.container))},set:function(A){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=A},enumerable:!1,configurable:!0}),$})();N.$uid=0,N.prototype.curOp=null,N.prototype.prevOp={},N.prototype.$mergeableCommands=["backspace","del","insertstring"],N.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],g.implement(N.prototype,w),T.defineOptions(N.prototype,"editor",{selectionStyle:{set:function($){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:$})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function($){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function($){var A=this;if(this.textInput.setReadOnly($),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(j){var U=!1;if(j&&j.type=="keydown"){if(j&&j.key&&!j.ctrlKey&&!j.metaKey&&(j.key==" "&&j.preventDefault(),U=j.key.length==1),!U)return}else j&&j.type!=="exec"&&(U=!0);if(U){var q=v.createElement("div");q.textContent=P("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),q)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var D=this.textInput.getElement();$?(k.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(k.removeListener(D,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function($){this.textInput.setCopyWithEmptySelection($)},initialValue:!1},cursorStyle:{set:function($){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function($){this.setAutoScrollEditorIntoView($)}},keyboardHandler:{set:function($){this.setKeyboardHandler($)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function($){this.session.setValue($)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function($){this.setSession($)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function($){this.renderer.$gutterLayer.setShowLineNumbers($),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),$&&this.$relativeLineNumbers?M.attach(this):M.detach(this)},initialValue:!0},relativeLineNumbers:{set:function($){this.$showLineNumbers&&$?M.attach(this):M.detach(this)}},placeholder:{set:function($){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var A=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(A&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),v.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!A&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),v.addCssClass(this.container,"ace_hasPlaceholder");var D=v.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function($){var A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},D=function(U){if(U.target==this.renderer.scroller&&U.keyCode===E.enter){U.preventDefault();var q=this.getCursorPosition().row;this.isRowVisible(q)||this.scrollToLine(q,!0,!0),this.focus()}},j;$?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(d.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",P("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",P("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",D.bind(this)),this.commands.addCommand(A),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",P("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",P("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),j||(j=new C(this)),j.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",D.bind(this)),this.commands.removeCommand(A),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),j&&j.removeListener())},initialValue:!1},textInputAriaLabel:{set:function($){this.$textInputAriaLabel=$},initialValue:""},enableMobileMenu:{set:function($){this.$enableMobileMenu=$},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var M={getText:function($,A){return(Math.abs($.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function($,A,D){return Math.max(A.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function($,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function($){$.renderer.$gutterLayer.$renderer=this,$.on("changeSelection",this.update),this.update(null,$)},detach:function($){$.renderer.$gutterLayer.$renderer==this&&($.renderer.$gutterLayer.$renderer=null),$.off("changeSelection",this.update),this.update(null,$)}};r.Editor=N}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,r,c){var u=t("../lib/dom"),g=(function(){function v(s,d){this.element=s,this.canvasHeight=d||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return v.prototype.moveContainer=function(s){u.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},v.prototype.pageChanged=function(s,d){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},v.prototype.computeLineTop=function(s,d,a){var l=d.firstRowScreen*d.lineHeight,h=Math.floor(l/this.canvasHeight),p=a.documentToScreenRow(s,0)*d.lineHeight;return p-h*this.canvasHeight},v.prototype.$getCellByScreenRow=function(s,d){for(var a=d.firstRowScreen*d.lineHeight,l=Math.floor(a/this.canvasHeight),h=s*d.lineHeight-l*this.canvasHeight,p=this.cells.length-1;p>=0;p--){var o=this.cells[p],f=parseInt(o.element.style.top),m=parseInt(o.element.style.height);if(f<=h){if(f+m<h)return null;var w=h-f;return{cell:o,offset:w}}}return null},v.prototype.computeLineHeight=function(s,d,a){return d.lineHeight*a.getRowLineCount(s)},v.prototype.getLength=function(){return this.cells.length},v.prototype.get=function(s){return this.cells[s]},v.prototype.shift=function(){this.$cacheCell(this.cells.shift())},v.prototype.pop=function(){this.$cacheCell(this.cells.pop())},v.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var d=u.createFragment(this.element),a=0;a<s.length;a++)d.appendChild(s[a].element);this.element.appendChild(d)}else this.cells.push(s),this.element.appendChild(s.element)},v.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var d=u.createFragment(this.element),a=0;a<s.length;a++)d.appendChild(s[a].element);this.element.firstChild?this.element.insertBefore(d,this.element.firstChild):this.element.appendChild(d)}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element)},v.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},v.prototype.$cacheCell=function(s){s&&(s.element.remove(),this.cellCache.push(s))},v.prototype.createCell=function(s,d,a,l){var h=this.cellCache.pop();if(!h){var p=u.createElement("div");l&&l(p),this.element.appendChild(p),h={element:p,text:"",row:s}}return h.row=s,h},v})();r.Lines=g}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(t,r,c){var u=t("../lib/dom"),g=t("../lib/oop"),v=t("../lib/lang"),s=t("../lib/event_emitter").EventEmitter,d=t("./lines").Lines,a=t("../config").nls,l=(function(){function p(o){this.$showCursorMarker=null,this.element=u.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 d(this.element),this.$lines.$offsetCoefficient=1}return p.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},p.prototype.addGutterDecoration=function(o,f){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,f)},p.prototype.removeGutterDecoration=function(o,f){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,f)},p.prototype.setAnnotations=function(o){this.$annotations=[];for(var f=0;f<o.length;f++){var m=o[f],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var R=m.text,T=m.text,_=m.type;R=R?v.escapeHTML(R):m.html||"",T=T||m.html||"",x.text.indexOf(R)===-1&&(x.text.push(R),x.type.push(_),x.displayText.push(T));var C=m.className;C?x.className=C:_==="error"?x.className=" ace_error":_==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":_==="info"&&!x.className?x.className=" ace_info":_==="hint"&&!x.className&&(x.className=" ace_hint")}},p.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var f=o.start.row,m=o.end.row-f;if(m!==0)if(o.action=="remove")this.$annotations.splice(f,m+1,null);else{var w=new Array(m+1);w.unshift(f,1),this.$annotations.splice.apply(this.$annotations,w)}}},p.prototype.update=function(o){this.config=o;var f=this.session,m=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,f.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var x=f.getNextFoldLine(m),R=x?x.start.row:1/0,T=null,_=-1,C=m;;){if(C>R&&(C=x.end.row+1,x=f.getNextFoldLine(C,x),R=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}T=this.$lines.get(++_),T?T.row=C:(T=this.$lines.createCell(C,o,this.session,h),this.$lines.push(T)),this.$renderCell(T,o,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},p.prototype.$updateGutterWidth=function(o){var f=this.session,m=f.gutterRenderer||this.$renderer,w=f.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||f.$useWrapMode)&&(x=f.getLength()+w-1);var R=m?m.getWidth(f,x,o):x.toString().length*o.characterWidth,T=this.$padding||this.$computePadding();R+=T.left+T.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},p.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},p.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var f=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<f.length;m++){var w=f[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==f[m-1].row)w=f[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},p.prototype.$updateCursorMarker=function(){if(this.session){var o=this.session;this.$highlightElement||(this.$highlightElement=u.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var f=o.selection.cursor,m=this.config,w=this.$lines,x=m.firstRowScreen*m.lineHeight,R=Math.floor(x/w.canvasHeight),T=o.documentToScreenRow(f)*m.lineHeight,_=T-R*w.canvasHeight;u.setStyle(this.$highlightElement.style,"height",m.lineHeight+"px"),u.setStyle(this.$highlightElement.style,"top",_+"px")}},p.prototype.scrollLines=function(o){var f=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(f,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,!f||w<o.firstRow)return this.update(o);if(m<f.firstRow)return this.update(o);if(f.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(f.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<f.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,f.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(o,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},p.prototype.$renderLines=function(o,f,m){for(var w=[],x=f,R=this.session.getNextFoldLine(x),T=R?R.start.row:1/0;x>T&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),T=R?R.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,o,this.session,h);this.$renderCell(_,o,R,x),w.push(_),x++}return w},p.prototype.$renderCell=function(o,f,m,w){var x=o.element,R=this.session,T=x.childNodes[0],_=x.childNodes[1],C=x.childNodes[2],P=x.childNodes[3],O=C.firstChild,E=R.$firstLineNumber,k=R.$breakpoints,B=R.$decorations,N=R.gutterRenderer||this.$renderer,M=this.$showFoldWidgets&&R.foldWidgets,$=m?m.start.row:Number.MAX_VALUE,A=f.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(N?N.getText(R,w):w+E).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=$&&this.$cursorRow<=m.end.row)&&(D+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),k[w]&&(D+=k[w]),B[w]&&(D+=B[w]),this.$annotations[w]&&w!==$&&(D+=this.$annotations[w].className),M){var q=M[w];q==null&&(q=M[w]=R.getFoldWidget(w))}if(q){var Q="ace_fold-widget ace_"+q,re=q=="start"&&w==$&&w<m.end.row;if(re){Q+=" ace_closed";for(var le="",ne=!1,ue=w+1;ue<=m.end.row;ue++)if(this.$annotations[ue]){if(this.$annotations[ue].className===" ace_error"){ne=!0,le=" ace_error_fold";break}this.$annotations[ue].className===" ace_security"?(ne=!0,le=" ace_security_fold"):this.$annotations[ue].className===" ace_warning"&&le!==" ace_security_fold"&&(ne=!0,le=" ace_warning_fold")}D+=le}else Q+=" ace_open";_.className!=Q&&(_.className=Q),u.setStyle(_.style,"height",A),u.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var he=R.getFoldWidgetRange(w);he?_.setAttribute("aria-label",a("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[he.start.row+1,he.end.row+1])):m?_.setAttribute("aria-label",a("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):_.setAttribute("aria-label",a("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),re?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",a("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",a("gutter.code-folding.open.title","Fold code")))}else _&&(u.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));var oe=this.session.$gutterCustomWidgets[w];if(oe?this.$addCustomWidget(w,oe,o):P&&this.$removeCustomWidget(w,o),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",O.className=j,O.className+=le,u.setStyle(O.style,"height",A),u.setStyle(C.style,"display","block"),u.setStyle(C.style,"height",A);var ee;switch(le){case" ace_error_fold":ee=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":ee=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":ee=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",ee),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",O.className=j,this.$useSvgGutterIcons?O.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),u.setStyle(O.style,"height",A),u.setStyle(C.style,"display","block"),u.setStyle(C.style,"height",A);var ee;switch(this.$annotations[w].className){case" ace_error":ee=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":ee=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":ee=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":ee=a("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":ee=a("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",ee),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else u.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),u.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,f,R)+"px"),u.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,f,R)+"px"),o.text=U,C.style.display==="none"&&_.style.display==="none"&&!oe?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},p.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o,!o&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},p.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},p.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},p.prototype.setShowFoldWidgets=function(o){o?u.addCssClass(this.element,"ace_folding-enabled"):u.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},p.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},p.prototype.$hideFoldWidget=function(o,f){var m=f||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&u.setStyle(w.style,"display","none")}},p.prototype.$showFoldWidget=function(o,f){var m=f||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&u.setStyle(w.style,"display","inline-block")}},p.prototype.$getGutterCell=function(o){var f=this.$lines.cells,m=0,w=f.length-1;if(!(o<f[0].row||o>f[w].row)){for(;m<=w;){var x=Math.floor((m+w)/2),R=f[x];if(R.row>o)w=x-1;else if(R.row<o)m=x+1;else return R}return R}},p.prototype.$addCustomWidget=function(o,f,m){var w=f.className,x=f.label,R=f.title,T=f.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:x,title:R,callbacks:T},this.$hideFoldWidget(o,m);var _=m||this.$getGutterCell(o);if(_&&_.element){var C=_.element.querySelector(".ace_custom-widget");C&&C.remove(),C=u.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",R),u.setStyle(C.style,"display","inline-block"),u.setStyle(C.style,"height","inherit"),T&&T.onClick&&C.addEventListener("click",function(P){T.onClick(P,o),P.stopPropagation()}),_.element.appendChild(C)}},p.prototype.$removeCustomWidget=function(o,f){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,f);var m=f||this.$getGutterCell(o);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},p.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=u.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},p.prototype.getRegion=function(o){var f=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(o.x<f.left+m.left)return"markers";if(this.$showFoldWidgets&&o.x>m.right-f.right)return"foldWidgets"},p})();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,g.implement(l.prototype,s);function h(p){var o=document.createTextNode("");p.appendChild(o);var f=u.createElement("span");p.appendChild(f);var m=u.createElement("span");p.appendChild(m);var w=u.createElement("span");return m.appendChild(w),p}r.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,r,c){var u=t("../range").Range,g=t("../lib/dom"),v=(function(){function d(a){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return d.prototype.setPadding=function(a){this.$padding=a},d.prototype.setSession=function(a){this.session=a},d.prototype.setMarkers=function(a){this.markers=a},d.prototype.elt=function(a,l){var h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=l,h.className=a},d.prototype.update=function(a){if(a){this.config=a,this.element.style.display="none",this.i=0;var l;for(var h in this.markers){var p=this.markers[h];if(!p.range){p.update(l,this,this.session,a);continue}var o=p.range.clipRows(a.firstRow,a.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),p.renderer){var f=this.$getTop(o.start.row,a),m=this.$padding+a.fontMetrics.textWidth(o.start.row,o.start.column);p.renderer(l,o,m,f,a)}else p.type=="fullLine"?this.drawFullLineMarker(l,o,p.clazz,a):p.type=="screenLine"?this.drawScreenLineMarker(l,o,p.clazz,a):o.isMultiLine()?p.type=="text"?this.drawTextMarker(l,o,p.clazz,a):this.drawMultiLineMarker(l,o,p.clazz,a):this.drawSingleLineMarker(l,o,p.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild);this.element.style.display=""}},d.prototype.$getTop=function(a,l){return(a-l.firstRowScreen)*l.lineHeight},d.prototype.drawTextMarker=function(a,l,h,p,o){for(var f=this.session,m=l.start.row,w=l.end.row,x=m,R=0,T=0,_=f.getScreenLastRowColumn(x),C=new u(x,l.start.column,x,T);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?l.start.column:f.getRowWrapIndent(x),C.end.column=_,R=T,T=_,_=x+1<w?f.getScreenLastRowColumn(x+1):x==w?0:l.end.column,this.drawSingleLineMarker(a,C,h+(x==m?" ace_start":"")+" ace_br"+s(x==m||x==m+1&&l.start.column,R<T,T>_,x==w),p,x==w?0:1,o)},d.prototype.drawMultiLineMarker=function(a,l,h,p,o){var f=this.$padding,m=p.lineHeight,w=this.$getTop(l.start.row,p),x=f+p.fontMetrics.textWidth(l.start.row,l.start.column);if(o=o||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var R=l.clone();R.end.row=R.start.row,R.end.column=Number.MAX_VALUE,this.drawBidiSingleLineMarker(a,R,h+" ace_br1 ace_start",p,null,o)}else this.elt(h+" ace_br1 ace_start","height:"+m+"px;right:"+f+"px;top:"+w+"px;left:"+x+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var R=l.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(a,R,h+" ace_br12",p,null,o)}else{w=this.$getTop(l.end.row,p);var T=p.fontMetrics.textWidth(l.end.row,l.end.column);this.elt(h+" ace_br12","height:"+m+"px;width:"+T+"px;top:"+w+"px;left:"+f+"px;"+(o||""))}if(m=(l.end.row-l.start.row-1)*p.lineHeight,!(m<=0)){w=this.$getTop(l.start.row+1,p);var _=(l.start.column?1:0)|(l.end.column?0:8);this.elt(h+(_?" ace_br"+_:""),"height:"+m+"px;right:"+f+"px;top:"+w+"px;left:"+f+"px;"+(o||""))}},d.prototype.drawSingleLineMarker=function(a,l,h,p,o,f){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(a,l,h,p,o,f);var m=p.lineHeight,w=p.fontMetrics.textWidth(l.start.row,l.end.column)+(o||0)*p.characterWidth,x=this.$getTop(l.start.row,p),R=p.fontMetrics.textWidth(l.start.row,l.start.column);this.elt(h,"height:"+m+"px;width:"+(w-R)+"px;top:"+x+"px;left:"+(this.$padding+R)+"px;"+(f||""))},d.prototype.drawBidiSingleLineMarker=function(a,l,h,p,o,f){var m=p.lineHeight,w=this.$getTop(l.start.row,p),x=this.$padding,R=this.config.fontMetrics.getRects(l.start,l.end);R.forEach(function(T){this.elt(h,"height:"+m+"px;width:"+(T.width+(o||0))+"px;top:"+w+"px;left:"+(x+T.left)+"px;"+(f||""))},this)},d.prototype.drawFullLineMarker=function(a,l,h,p,o){var f=this.$getTop(l.start.row,p),m=p.lineHeight;l.start.row!=l.end.row&&(m+=this.$getTop(l.end.row,p)-f),this.elt(h,"height:"+m+"px;top:"+f+"px;left:0;right:0;"+(o||""))},d.prototype.drawScreenLineMarker=function(a,l,h,p,o){var f=this.$getTop(l.start.row,p),m=p.lineHeight;this.elt(h,"height:"+m+"px;top:"+f+"px;left:0;right:0;"+(o||""))},d})();v.prototype.$padding=0;function s(d,a,l,h){return(d?1:0)|(a?2:0)|(l?4:0)|(h?8:0)}r.Marker=v}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,r,c){var u=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return u.has(g)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,r,c){var u=t("../lib/oop"),g=t("../lib/dom"),v=t("../lib/lang"),s=t("./lines").Lines,d=t("../lib/event_emitter").EventEmitter,a=t("../config").nls,l=t("./text_util").isTextToken,h=(function(){function p(o){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return p.prototype.$updateEolChar=function(){var o=this.session.doc,f=o.getNewLineCharacter()==`
219
+ `&&o.getNewLineMode()!="windows",m=f?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},p.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},p.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},p.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},p.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(f){this._signal("changeCharacterSize",f)}).bind(this)),this.$pollSizeChanges()},p.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},p.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},p.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},p.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)},p.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},p.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},p.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var f=this.$tabStrings=[0],m=1;m<o+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=v.stringRepeat(this.TAB_CHAR,m),f.push(w)}else f.push(this.dom.createTextNode(v.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",R=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?v.stringRepeat(this.SPACE_CHAR,this.tabSize):v.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?v.stringRepeat(this.TAB_CHAR,this.tabSize):T,w=this.dom.createElement("span");w.className=x+R,w.textContent=T,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+_,w.textContent=C,this.$tabStrings[" "]=w}},p.prototype.updateLines=function(o,f,m){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(f,o.firstRow),x=Math.min(m,o.lastRow),R=this.element.childNodes,T=0,_=o.firstRow;_<w;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(w)){w=C.start.row;break}else _=C.end.row;T++}for(var P=!1,_=w,C=this.session.getNextFoldLine(_),O=C?C.start.row:1/0;_>O&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),O=C?C.start.row:1/0),!(_>x);){var E=R[T++];if(E){this.dom.removeChildren(E),this.$renderLine(E,_,_==O?C:!1),P&&(E.style.top=this.$lines.computeLineTop(_,o,this.session)+"px");var k=o.lineHeight*this.session.getRowLength(_)+"px";E.style.height!=k&&(P=!0,E.style.height=k)}_++}if(P)for(;T<this.$lines.cells.length;){var B=this.$lines.cells[T++];B.element.style.top=this.$lines.computeLineTop(B.row,o,this.session)+"px"}},p.prototype.scrollLines=function(o){var f=this.config;if(this.config=o,this.$lines.pageChanged(f,o))return this.update(o);this.$lines.moveContainer(o);var m=o.lastRow,w=f?f.lastRow:-1;if(!f||w<o.firstRow)return this.update(o);if(m<f.firstRow)return this.update(o);if(!f||f.lastRow<o.firstRow)return this.update(o);if(o.lastRow<f.firstRow)return this.update(o);if(f.firstRow<o.firstRow)for(var x=this.session.getFoldedRowCount(f.firstRow,o.firstRow-1);x>0;x--)this.$lines.shift();if(f.lastRow>o.lastRow)for(var x=this.session.getFoldedRowCount(o.lastRow+1,f.lastRow);x>0;x--)this.$lines.pop();o.firstRow<f.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,f.firstRow-1)),o.lastRow>f.lastRow&&this.$lines.push(this.$renderLinesFragment(o,f.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},p.prototype.$renderLinesFragment=function(o,f,m){for(var w=[],x=f,R=this.session.getNextFoldLine(x),T=R?R.start.row:1/0;x>T&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),T=R?R.start.row:1/0),!(x>m);){var _=this.$lines.createCell(x,o,this.session),C=_.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,o,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,o,this.session)+"px"),this.$renderLine(C,x,x==T?R:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(_),x++}return w},p.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var f=o.firstRow,m=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,f,m))},p.prototype.$renderToken=function(o,f,m,w){for(var x=this,R=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200C\u200E\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000+)/g,T=this.dom.createFragment(this.element),_,C=0;_=R.exec(w);){var P=_[1],O=_[2],E=_[3],k=_[4];if(!(!x.showSpaces&&O)){var B=C!=_.index?w.slice(C,_.index):"";if(C=_.index+_[0].length,B&&T.appendChild(this.dom.createTextNode(B,this.element)),P){var N=x.session.getScreenTabSize(f+_.index),M=x.$tabStrings[N].cloneNode(!0);M.charCount=1,T.appendChild(M),f+=N-1}else if(O)if(x.showSpaces){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space",$.textContent=v.stringRepeat(x.SPACE_CHAR,O.length),T.appendChild($)}else T.appendChild(this.dom.createTextNode(O,this.element));else if(E){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space ace_invalid",$.textContent=v.stringRepeat(x.SPACE_CHAR,E.length),T.appendChild($)}else if(k)if(x.showSpaces){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space",$.textContent=v.stringRepeat(x.CJK_SPACE_CHAR,k.length),T.appendChild($)}else T.appendChild(this.dom.createTextNode(k,this.element))}}var A=C?w.slice(C):w;if(A.length>256)for(var D=0;D<A.length;)T.appendChild(this.dom.createTextNode(A.slice(D,D+=256),this.element));else T.appendChild(this.dom.createTextNode(A,this.element));if(l(m.type))o.appendChild(T);else{var j="ace_"+m.type.replace(/\./g," ace_"),$=this.dom.createElement("span");m.type=="fold"&&($.style.width=m.value.length*this.config.characterWidth+"px",$.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),$.className=j,$.appendChild(T),o.appendChild($)}return f+w.length},p.prototype.renderIndentGuide=function(o,f,m){var w=f.search(this.$indentGuideRe);if(w<=0||w>=m)return f;if(f[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,R=0;R<x;R++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),f.substr(w)}else if(f[0]==" "){for(var R=0;R<w;R++){var T=this.$tabStrings[" "].cloneNode(!0);T.charCount=1,o.appendChild(T)}return this.$highlightIndentGuide(),f.substr(w)}return this.$highlightIndentGuide(),f},p.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 f=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(f.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:f.row};var x=this.session.$bracketHighlight;if(x){for(var R=this.session.$bracketHighlight.ranges,T=0;T<R.length;T++)if(f.row!==R[T].start.row){this.$highlightIndentGuideMarker.end=R[T].start.row+1,f.row>R[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[f.row]!==""&&f.column===o[f.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=f.row+1;T<o.length;T++){var _=o[T],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=T,C<=m))break}}this.$renderHighlightIndentGuide()}}},p.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),f=0;f<o.length;f++)o[f].classList.remove("ace_indent-guide-active")},p.prototype.$setIndentGuideActive=function(o,f){var m=this.session.doc.getLine(o.row);if(m!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var x=w.childNodes;if(x){var R=x[f-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},p.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var f=this.$highlightIndentGuideMarker.indentLevel;if(f!==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,f)}}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,f)}}}},p.prototype.$createLineElement=function(o){var f=this.dom.createElement("div");return f.className="ace_line",f.style.height=this.config.lineHeight+"px",f},p.prototype.$renderWrappedLine=function(o,f,m){var w=0,x=0,R=m[0],T=0,_=this.$createLineElement();o.appendChild(_);for(var C=0;C<f.length;C++){var P=f[C],O=P.value;if(C==0&&this.displayIndentGuides){if(w=O.length,O=this.renderIndentGuide(_,O,R),!O)continue;w-=O.length}if(w+O.length<R)T=this.$renderToken(_,T,P,O),w+=O.length;else{for(;w+O.length>=R;){T=this.$renderToken(_,T,P,O.substring(0,R-w)),O=O.substring(R-w),w=R,_=this.$createLineElement(),o.appendChild(_);var E=this.dom.createTextNode(v.stringRepeat(" ",m.indent),this.element);E.charCount=0,_.appendChild(E),x++,T=0,R=m[x]||Number.MAX_VALUE}O.length!=0&&(w+=O.length,T=this.$renderToken(_,T,P,O))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,T,null,"",!0)},p.prototype.$renderSimpleLine=function(o,f){for(var m=0,w=0;w<f.length;w++){var x=f[w],R=x.value;if(!(w==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(o,R),!R))){if(m+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,x,R);m=this.$renderToken(o,m,x,R)}}},p.prototype.$renderOverflowMessage=function(o,f,m,w,x){m&&this.$renderToken(o,f,m,w.slice(0,this.MAX_LINE_LENGTH-f));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=x?"<hide>":"<click to see more...>",o.appendChild(R)},p.prototype.$renderLine=function(o,f,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(f)),m)var w=this.$getFoldLineTokens(f,m);else var w=this.session.getTokens(f);var x=o;if(w.length){var R=this.session.getRowSplitData(f);if(R&&R.length){this.$renderWrappedLine(o,w,R);var x=o.lastChild}else{var x=o;this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),o.appendChild(x));if(this.showEOL&&x){m&&(f=m.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=f==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(T)}},p.prototype.$getFoldLineTokens=function(o,f){var m=this.session,w=[];function x(T,_,C){for(var P=0,O=0;O+T[P].value.length<_;)if(O+=T[P].value.length,P++,P==T.length)return;if(O!=_){var E=T[P].value.substring(_-O);E.length>C-_&&(E=E.substring(0,C-_)),w.push({type:T[P].type,value:E}),O=_+E.length,P+=1}for(;O<C&&P<T.length;){var E=T[P].value;E.length+O>C?w.push({type:T[P].type,value:E.substring(0,C-O)}):w.push(T[P]),O+=E.length,P+=1}}var R=m.getTokens(o);return f.walk(function(T,_,C,P,O){T!=null?w.push({type:"fold",value:T}):(O&&(R=m.getTokens(_)),R.length&&x(R,P,C))},f.end.row,this.session.getLine(f.end.row).length),w},p.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},p})();h.prototype.EOF_CHAR="¶",h.prototype.EOL_CHAR_LF="¬",h.prototype.EOL_CHAR_CRLF="¤",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="—",h.prototype.SPACE_CHAR="·",h.prototype.CJK_SPACE_CHAR="・",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,u.implement(h.prototype,d),r.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,r,c){var u=t("../lib/dom"),g=(function(){function v(s){this.element=u.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),u.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return v.prototype.$updateOpacity=function(s){for(var d=this.cursors,a=d.length;a--;)u.setStyle(d[a].style,"opacity",s?"":"0")},v.prototype.$startCssAnimation=function(){for(var s=this.cursors,d=s.length;d--;)s[d].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&u.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},v.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,u.removeCssClass(this.element,"ace_animate-blinking")},v.prototype.setPadding=function(s){this.$padding=s},v.prototype.setSession=function(s){this.session=s},v.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},v.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},v.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,u.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},v.prototype.addCursor=function(){var s=u.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},v.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},v.prototype.hideCursor=function(){this.isVisible=!1,u.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.showCursor=function(){this.isVisible=!0,u.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,u.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&u.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),u.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var d=(function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){s(!0),d()},this.blinkInterval),d()}},v.prototype.getPixelPosition=function(s,d){if(!this.config||!this.session)return{left:0,top:0,width:0};s||(s=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(s),l=this.config.fontMetrics.textWidth(a.row,a.column),h=this.$padding+l,p=(a.row-(d?this.config.firstRowScreen:0))*this.config.lineHeight,o=this.config.fontMetrics.textWidth(a.row,a.column+1)-l;return{left:h,top:p,width:Math.abs(o)||this.config.characterWidth}},v.prototype.isCursorInView=function(s,d){return s.top>=0&&s.top<d.maxHeight},v.prototype.update=function(s){this.config=s;var d=this.session.$selectionMarkers,a=0,l=0;(d===void 0||d.length===0)&&(d=[{cursor:null}]);for(var a=0,h=d.length;a<h;a++){var p=this.getPixelPosition(d[a].cursor,!0);if(!((p.top>s.height+s.offset||p.top<0)&&a>1)){var o=this.cursors[l++]||this.addCursor(),f=o.style;this.drawCursor?this.drawCursor(o,p,s,d[a],this.session):this.isCursorInView(p,s)?(u.setStyle(f,"display","block"),u.translate(o,p.left,p.top),u.setStyle(f,"width",Math.round(p.width)+"px"),u.setStyle(f,"height",s.lineHeight+"px")):u.setStyle(f,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=p,this.restartTimer()},v.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?u.addCssClass(this.element,"ace_overwrite-cursors"):u.removeCssClass(this.element,"ace_overwrite-cursors"))},v.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},v})();g.prototype.$padding=0,g.prototype.drawCursor=null,r.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,c){var u=this&&this.__extends||(function(){var o=function(f,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},o(f,m)};return function(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(f,m);function w(){this.constructor=f}f.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),g=t("./lib/oop"),v=t("./lib/dom"),s=t("./lib/event"),d=t("./lib/event_emitter").EventEmitter,a=32768,l=(function(){function o(f,m){this.element=v.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.element.tabIndex=-1,this.inner=v.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return o.prototype.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1},o})();g.implement(l.prototype,d);var h=(function(o){u(f,o);function f(m,w){var x=o.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=v.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return f.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},f.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},f.prototype.setHeight=function(m){this.element.style.height=m+"px"},f.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>a?(this.coeff=a/m,m=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},f.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},f})(l);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var p=(function(o){u(f,o);function f(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 f.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},f.prototype.getHeight=function(){return this.isVisible?this.height:0},f.prototype.setWidth=function(m){this.element.style.width=m+"px"},f.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},f.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},f.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},f})(l);r.ScrollBar=h,r.ScrollBarV=h,r.ScrollBarH=p,r.VScrollBar=h,r.HScrollBar=p}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,r,c){var u=this&&this.__extends||(function(){var p=function(o,f){return p=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])},p(o,f)};return function(o,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");p(o,f);function m(){this.constructor=o}o.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})(),g=t("./lib/oop"),v=t("./lib/dom"),s=t("./lib/event"),d=t("./lib/event_emitter").EventEmitter;v.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
220
+ position: absolute;
221
+ background: rgba(128, 128, 128, 0.6);
222
+ -moz-box-sizing: border-box;
223
+ box-sizing: border-box;
224
+ border: 1px solid #bbb;
225
+ border-radius: 2px;
226
+ z-index: 8;
227
+ }
228
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
229
+ position: absolute;
230
+ z-index: 6;
231
+ background: none;
232
+ overflow: hidden!important;
233
+ }
234
+ .ace_editor>.ace_sb-v {
235
+ z-index: 6;
236
+ right: 0;
237
+ top: 0;
238
+ width: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-v div {
241
+ z-index: 8;
242
+ right: 0;
243
+ width: 100%;
244
+ }
245
+ .ace_editor>.ace_sb-h {
246
+ bottom: 0;
247
+ left: 0;
248
+ height: 12px;
249
+ }
250
+ .ace_editor>.ace_sb-h div {
251
+ bottom: 0;
252
+ height: 100%;
253
+ }
254
+ .ace_editor>.ace_sb_grabbed {
255
+ z-index: 8;
256
+ background: #000;
257
+ }`,"ace_scrollbar.css",!1);var a=(function(){function p(o,f){this.element=v.createElement("div"),this.element.className="ace_sb"+f,this.inner=v.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return p.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},p})();g.implement(a.prototype,d);var l=(function(p){u(o,p);function o(f,m){var w=p.call(this,f,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=f,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(f,m){if(f==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,R=function(k){x=k.clientY},T=function(){clearInterval(O)},_=m.clientY,C=this.thumbTop,P=function(){if(x!==void 0){var k=w.scrollTopFromThumbTop(C+x-_);k!==w.scrollTop&&w._emit("scroll",{data:k})}};s.capture(this.inner,R,T);var O=setInterval(P,20);return s.preventDefault(m)}var E=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(E)}),s.preventDefault(m)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(f){var m=f*(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(f){this.height=Math.max(0,f),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(f,m){this.pageHeight===f&&!m||(this.pageHeight=f,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(f){this.scrollTop=f,f<0&&(f=0),this.thumbTop=f*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(a);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var h=(function(p){u(o,p);function o(f,m){var w=p.call(this,f,"-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(f,m){if(f==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,R=function(k){x=k.clientX},T=function(){clearInterval(O)},_=m.clientX,C=this.thumbLeft,P=function(){if(x!==void 0){var k=w.scrollLeftFromThumbLeft(C+x-_);k!==w.scrollLeft&&w._emit("scroll",{data:k})}};s.capture(this.inner,R,T);var O=setInterval(P,20);return s.preventDefault(m)}var E=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(E)}),s.preventDefault(m)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(f){var m=f*(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(f){this.width=Math.max(0,f),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(f,m){this.pageWidth===f&&!m||(this.pageWidth=f,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(f){this.scrollLeft=f,f<0&&(f=0),this.thumbLeft=f*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(a);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=l,r.ScrollBarV=l,r.ScrollBarH=h,r.VScrollBar=l,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,r,c){var u=t("./lib/event"),g=(function(){function v(s,d){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var a=this;this._flush=function(l){a.pending=!1;var h=a.changes;if(h&&(u.blockIdle(100),a.changes=0,a.onRender(h)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return v.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(u.nextFrame(this._flush),this.pending=!0)},v.prototype.clear=function(s){var d=this.changes;return this.changes=0,d},v})();r.RenderLoop=g}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/event_emitter"],function(t,r,c){var u=this&&this.__read||function(O,E){var k=typeof Symbol=="function"&&O[Symbol.iterator];if(!k)return O;var B=k.call(O),N,M=[],$;try{for(;(E===void 0||E-- >0)&&!(N=B.next()).done;)M.push(N.value)}catch(A){$={error:A}}finally{try{N&&!N.done&&(k=B.return)&&k.call(B)}finally{if($)throw $.error}}return M},g=t("../lib/oop"),v=t("../lib/dom"),s=t("../lib/lang"),d=t("../lib/event"),a=t("../lib/event_emitter").EventEmitter,l=512,h=typeof ResizeObserver=="function",p=200,o=(function(){function O(E,k,B){this.config={characterWidth:1},this.$characterSize={width:0,height:0},this.textLayer=k,this.renderer=B,this.el=v.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=v.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=v.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),E.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",l),h?this.$addObserver():this.checkForSizeChanges(),this.textLayer.$setFontMetrics(this),this.$scratchRange=document.createRange()}return O.prototype.$setMeasureNodeStyles=function(E,k){E.width=E.height="auto",E.left=E.top="0px",E.visibility="hidden",E.position="absolute",E.whiteSpace="pre",E.font="inherit",E.overflow=k?"hidden":"visible"},O.prototype.checkForSizeChanges=function(E){if(E===void 0&&(E=this.$measureSizes()),E&&(this.$characterSize.width!==E.width||this.$characterSize.height!==E.height)){this.$measureNode.style.fontWeight="bold";var k=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=E,this.charSizes=Object.create(null),this.allowBoldFonts=k&&k.width===E.width&&k.height===E.height,this._emit("changeCharacterSize",{data:E})}},O.prototype.$addObserver=function(){var E=this;this.$observer=new window.ResizeObserver(function(k){E.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},O.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var E=this;return this.$pollSizeChangesTimer=d.onIdle(function k(){E.checkForSizeChanges(),d.onIdle(k,500)},500)},O.prototype.setPolling=function(E){E?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},O.prototype.$measureSizes=function(E){var k={height:(E||this.$measureNode).clientHeight,width:(E||this.$measureNode).clientWidth/l};return k.width===0||k.height===0?null:k},O.prototype.$measureCharWidth=function(E){this.$main.textContent=s.stringRepeat(E,l);var k=this.$main.getBoundingClientRect();return k.width/l},O.prototype.getCharacterWidth=function(E){var k=this.charSizes[E];return k===void 0&&(k=this.charSizes[E]=this.$measureCharWidth(E)/this.$characterSize.width),k},O.prototype.getTextWidth=function(E){return E?(this.$main.textContent=E,this.$main.clientWidth):0},O.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},O.prototype.$initTransformMeasureNodes=function(){var E=function(k,B){return["div",{style:"position: absolute;left:"+k+"px;top:"+B+"px;"}]};this.els=v.buildDom([E(0,0),E(p,0),E(0,p),E(p,p)],this.el)},O.prototype.getTransform=function(){if(this.config.$transformData)return this.config.$transformData;this.els||this.$initTransformMeasureNodes();function E(Q){var re=Q.getBoundingClientRect();return[re.left,re.top]}var k=E(this.els[0]),B=E(this.els[1]),N=E(this.els[2]),M=E(this.els[3]),$=m(w(M,B),w(M,N),w(x(B,N),x(M,k))),A=R((1+$[0])/p,w(B,k)),D=R((1+$[1])/p,w(N,k)),j=[A[0],D[0],0,A[1],D[1],0,$[0]/p,$[1]/p,1],U=1/(j[0]*j[4]-j[3]*j[1]),q=[j[4]*U,-j[1]*U,0,-j[3]*U,j[0]*U,0,(j[3]*j[7]-j[4]*j[6])*U,(j[1]*j[6]-j[0]*j[7])*U,1];return this.config.$transformData={M:j,MInv:q,t:k},this.config.$transformData},O.prototype.transformCoordinates=function(E,k){this.config.$transformData||this.getTransform();var B=this.config.$transformData;return k?x(_(B.M,k[0],k[1]),B.t):_(B.MInv,E[0]-B.t[0],E[1]-B.t[1])},O.prototype.recoverRect=function(E,k){var B=E.M,N=Math.abs(B[6])<1e-10&&Math.abs(B[7])<1e-10,M=k.left,$=k.top,A=k.width,D=k.height;if(M-=E.t[0],$-=E.t[1],N){var j=u(B,6),U=j[0],q=j[1],Q=j[2],re=j[3],le=j[4],ne=j[5],ue=[Math.abs(U),Math.abs(q),Math.abs(re),Math.abs(le)],he=ue[0]*ue[3]-ue[2]*ue[1],oe=void 0,ee=void 0;Math.abs(he)<1e-10?(ee=this.config&&this.config.lineHeight||0,oe=(A-ue[1]*ee)/ue[0]):(oe=(ue[3]*A-ue[1]*D)/he,ee=(-ue[2]*A+ue[0]*D)/he);var ye=U*le-q*re,we=M+A/2-Q,Ae=$+D/2-ne,Je=(le*we-q*Ae)/ye,Be=(-re*we+U*Ae)/ye;return{left:Je-oe/2,top:Be-ee/2,width:oe,height:ee,right:Je+oe/2,bottom:Be+ee/2}}return T(E,k)},O.prototype.$findElementForScreenRow=function(E){var k=this.textLayer;if(!this.config)return null;var B=k.$lines.$getCellByScreenRow(E,this.config),N=B&&B.cell.element;if(N&&k.$useLineGroups()){var M=Math.floor(B.offset/this.config.lineHeight);N=N.children[Math.max(M,0)]}return N},O.prototype.textWidth=function(E,k){var B=this.$findElementForScreenRow(E);return!B||!document.createRange?k*this.config.characterWidth:this.$measureLineToColumn(B,k)},O.prototype.$measureLineToColumn=function(E,k){var B=this.textLayer;try{var N=this.$findColumnPosition(E,k);if(!N)return k*this.config.characterWidth;this.$scratchRange.setStart(N.node,N.offset),this.$scratchRange.setEnd(N.node,N.offset);var M=this.$scratchRange.getBoundingClientRect();if(this.renderer.$hasCssTransforms){var $=this.getTransform(),A=this.recoverRect($,M),D=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft;return A.left-D+N.overflow*this.config.characterWidth}var j=B.element.getBoundingClientRect();return M.left-j.left+N.overflow*this.config.characterWidth}catch(U){return console.error("Error measuring text width:",U),k*this.config.characterWidth}},O.prototype.$findColumnPosition=function(E,k){for(var B=document.createTreeWalker(E,NodeFilter.SHOW_TEXT,null),N=0,M,$;M=B.nextNode();){var A=M.nodeValue,D=A.length;if(N+D>=k)return{node:M,offset:k-N,overflow:0};N+=D,$=M}return $&&{node:$,offset:$.nodeValue.length,overflow:k-N}},O.prototype.$pixelToColumn=function(E,k,B,N,M){var $=this,A=this.$scratchRange,D=this.$findElementForScreenRow(E);if(!D||k<0)return k;var j=this.renderer.$hasCssTransforms,U=j&&this.getTransform();M&&(j?B+=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft:B+=this.textLayer.element.getBoundingClientRect().left);var q=0,Q=function(ne){var ue=[];if(ne.nodeType===Node.TEXT_NODE?(A.setStart(ne,0),A.setEnd(ne,ne.nodeValue.length),ue=Array.from(A.getClientRects())):ne.nodeType===Node.ELEMENT_NODE&&(ue=Array.from(ne.getClientRects())),j){for(var he=[],oe=0;oe<ue.length;oe++){var ee=ue[oe];he.push($.recoverRect(U,ee))}ue=he}return ue},re=this;function le(ne){if(ne.nodeType===Node.TEXT_NODE){for(var ue=ne.nodeValue.length,he=Number.MAX_VALUE,oe=-1,ee=void 0,ye=ne.nodeValue,we=0;we<=ue;we++)if(A.setStart(ne,we),A.setEnd(ne,we),!(we>0&&we<ue&&/[\uDC00-\uDFFF]/.test(ye.charAt(we))&&/[\uD800-\uDBFF]/.test(ye.charAt(we-1)))){var Ae=A.getBoundingClientRect();j&&(Ae=re.recoverRect(U,Ae));var Je=B-Ae.left,Be=Math.abs(Je);Be<he&&(oe=we,he=Be,ee=Je)}return N&&ee<0&&(oe=Math.max(0,oe-1)),q=q+oe}else if(ne.nodeType===Node.ELEMENT_NODE)for(var Ye=ne.childNodes,Ze=0;Ze<Ye.length;Ze++){for(var lt=Ye[Ze],ct=Q(lt),we=0;we<ct.length;we++){var Ae=ct[we];if(Ae.left<=B&&B<=Ae.left+Ae.width)return le(lt),q}q+=lt.nodeType===Node.TEXT_NODE?lt.nodeValue.length:lt.textContent.length}}return le(D),q},O.prototype.getRects=function(E,k){var B=E.row,N=this.textLayer,M=this.$findElementForScreenRow(B);if(M)try{var $=this.$findColumnPosition(M,E.column),A=this.$findColumnPosition(M,k.column);if($&&A){this.$scratchRange.setStart($.node,$.offset),this.$scratchRange.setEnd(A.node,A.offset);var D=this.$scratchRange.getClientRects(),j=this.renderer&&this.renderer.$hasCssTransforms;if(j){for(var U=this.getTransform(),q=[],Q=0;Q<D.length;Q++){var re=this.recoverRect(U,D[Q]);re.right=re.left+re.width,q.push(re)}var le=this.renderer.gutterWidth+this.renderer.margin.left+this.renderer.$padding-this.renderer.scrollLeft,ue=f(q).map(function(oe){return{left:oe.left-le,width:oe.right-oe.left}});return ue}var ne=N.element.getBoundingClientRect(),ue=f(D).map(function(he){return{left:he.left-ne.left,width:he.right-he.left}});return ue}}catch(he){console.error("Error measuring text width:",he)}return[{left:E.column*this.config.characterWidth,width:(k.column-E.column)*this.config.characterWidth}]},O})();function f(O){for(var E=[],k=0;k<O.length;k++){for(var B=O[k],N=!1,M=0;M<E.length;M++){var $=E[M];if($.left<=B.left&&B.left<=$.right||$.left<=B.right&&B.right<=$.right||B.left<=$.left&&$.right<=B.right){$.left=Math.min($.left,B.left),$.right=Math.max($.right,B.right),N=!0;break}}N||E.push({left:B.left,right:B.right,top:B.top,height:B.height})}return E}function m(O,E,k){var B=O[1]*E[0]-O[0]*E[1];return[(-E[1]*k[0]+E[0]*k[1])/B,(+O[1]*k[0]-O[0]*k[1])/B]}function w(O,E){return[O[0]-E[0],O[1]-E[1]]}function x(O,E){return[O[0]+E[0],O[1]+E[1]]}function R(O,E){return[O*E[0],O*E[1]]}g.implement(o.prototype,a),r.FontMetrics=o;function T(O,E){var k=E.left,B=E.top,N=E.width,M=E.height,$=O.M;k-=O.t[0],B-=O.t[1],E={left:k,top:B,width:N,height:M};for(var A=[B,k+N,B+M,k],D=[!0,!1,!0,!1],j=[[0,0],[1,0],[1,1],[0,1]],U=null,q=[27,57,23,53,43,9,10,11,14,37,31,56,40,41,47],Q=-q.length;Q<256;Q++){var re=Q<0?q[q.length+Q]:Q,le=[re>>0&3,re>>2&3,re>>4&3,re>>6&3],ne=le.map(function(Be){return j[Be]}),ue=ne.map(function(Be,Ye){var Ze=u(Be,2),lt=Ze[0],ct=Ze[1],jt=A[Ye],Ie=D[Ye]?$.slice(3,6):$.slice(0,3),Ct=$.slice(6,9),St=Ie[0]-jt*Ct[0],qt=Ie[1]-jt*Ct[1];return[St,qt,lt*St,ct*qt,jt*Ct[2]-Ie[2]]}),he=P(ue),U;if(he){var oe=u(he,4),ee=oe[0],ye=oe[1],we=oe[2],Ae=oe[3];if(we<0&&(ee+=we,we=-we),Ae<0&&(ye+=Ae,Ae=-Ae),C($,ee,ye,we,Ae,E)){U={left:ee,top:ye,width:we,height:Ae,right:ee+we,bottom:ye+Ae,mappingIdx:Q};break}}}return U||console.warn("No valid mapping found in 256 combinations."),U}var _=function(O,E,k){var B=O[6]*E+O[7]*k+O[8];return[(O[0]*E+O[1]*k+O[2])/B,(O[3]*E+O[4]*k+O[5])/B]};function C(O,E,k,B,N,M){var $=[[E,k],[E+B,k],[E+B,k+N],[E,k+N]];return $.every(function(A){var D=_(O,A[0],A[1]);return M.left-.5<=D[0]&&D[0]<=M.left+M.width+.5&&M.top-.5<=D[1]&&D[1]<=M.top+M.height+.5})}function P(O){for(var E,k=4,B=0;B<k;B++){for(var N=B,M=B+1;M<k;M++)Math.abs(O[M][B])>Math.abs(O[N][B])&&(N=M);E=u([O[N],O[B]],2),O[B]=E[0],O[N]=E[1];var $=O[B][B];if(Math.abs($)<1e-10)return null;for(var M=B;M<=k;M++)O[B][M]/=$;for(var A=0;A<k;A++)if(A!==B)for(var D=O[A][B],M=B;M<=k;M++)O[A][M]-=D*O[B][M]}return O.map(function(j){return j[k]})}}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,r,c){c.exports=`
258
+ .ace_br1 {border-top-left-radius : 3px;}
259
+ .ace_br2 {border-top-right-radius : 3px;}
260
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
261
+ .ace_br4 {border-bottom-right-radius: 3px;}
262
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
263
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
264
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
265
+ .ace_br8 {border-bottom-left-radius : 3px;}
266
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
271
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
272
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
273
+
274
+
275
+ .ace_editor {
276
+ position: relative;
277
+ overflow: hidden;
278
+ padding: 0;
279
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
280
+ direction: ltr;
281
+ text-align: left;
282
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
283
+ forced-color-adjust: none;
284
+ }
285
+
286
+ .ace_scroller {
287
+ position: absolute;
288
+ overflow: hidden;
289
+ top: 0;
290
+ bottom: 0;
291
+ background-color: inherit;
292
+ -ms-user-select: none;
293
+ -moz-user-select: none;
294
+ -webkit-user-select: none;
295
+ user-select: none;
296
+ cursor: text;
297
+ }
298
+
299
+ .ace_content {
300
+ position: absolute;
301
+ box-sizing: border-box;
302
+ min-width: 100%;
303
+ contain: style size layout;
304
+ font-variant-ligatures: no-common-ligatures;
305
+ }
306
+ .ace_invisible {
307
+ font-variant-ligatures: none;
308
+ }
309
+
310
+ .ace_keyboard-focus:focus {
311
+ box-shadow: inset 0 0 0 2px #5E9ED6;
312
+ outline: none;
313
+ }
314
+
315
+ .ace_dragging .ace_scroller:before{
316
+ position: absolute;
317
+ top: 0;
318
+ left: 0;
319
+ right: 0;
320
+ bottom: 0;
321
+ content: '';
322
+ background: rgba(250, 250, 250, 0.01);
323
+ z-index: 1000;
324
+ }
325
+ .ace_dragging.ace_dark .ace_scroller:before{
326
+ background: rgba(0, 0, 0, 0.01);
327
+ }
328
+
329
+ .ace_gutter {
330
+ position: absolute;
331
+ overflow : hidden;
332
+ width: auto;
333
+ top: 0;
334
+ bottom: 0;
335
+ left: 0;
336
+ cursor: default;
337
+ z-index: 4;
338
+ -ms-user-select: none;
339
+ -moz-user-select: none;
340
+ -webkit-user-select: none;
341
+ user-select: none;
342
+ contain: style size layout;
343
+ }
344
+
345
+ .ace_gutter-active-line {
346
+ position: absolute;
347
+ left: 0;
348
+ right: 0;
349
+ }
350
+
351
+ .ace_scroller.ace_scroll-left:after {
352
+ content: "";
353
+ position: absolute;
354
+ top: 0;
355
+ right: 0;
356
+ bottom: 0;
357
+ left: 0;
358
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
359
+ pointer-events: none;
360
+ }
361
+
362
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
363
+ position: absolute;
364
+ top: 0;
365
+ left: 0;
366
+ right: 0;
367
+ padding-left: 19px;
368
+ padding-right: 6px;
369
+ background-repeat: no-repeat;
370
+ }
371
+
372
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
373
+ margin-left: -14px;
374
+ float: left;
375
+ }
376
+
377
+ .ace_gutter-cell .ace_gutter_annotation {
378
+ margin-left: -19px;
379
+ float: left;
380
+ }
381
+
382
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
383
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
384
+ background-repeat: no-repeat;
385
+ background-position: 2px center;
386
+ }
387
+
388
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
389
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
390
+ background-repeat: no-repeat;
391
+ background-position: 2px center;
392
+ }
393
+
394
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
395
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
396
+ background-repeat: no-repeat;
397
+ background-position: 2px center;
398
+ }
399
+
400
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
401
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
402
+ }
403
+
404
+ .ace_icon_svg.ace_error {
405
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
406
+ background-color: crimson;
407
+ }
408
+ .ace_icon_svg.ace_security {
409
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
410
+ background-color: crimson;
411
+ }
412
+ .ace_icon_svg.ace_warning {
413
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
414
+ background-color: darkorange;
415
+ }
416
+ .ace_icon_svg.ace_info {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
418
+ background-color: royalblue;
419
+ }
420
+ .ace_icon_svg.ace_hint {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
422
+ background-color: silver;
423
+ }
424
+
425
+ .ace_icon_svg.ace_error_fold {
426
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
427
+ background-color: crimson;
428
+ }
429
+ .ace_icon_svg.ace_security_fold {
430
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
431
+ background-color: crimson;
432
+ }
433
+ .ace_icon_svg.ace_warning_fold {
434
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
435
+ background-color: darkorange;
436
+ }
437
+
438
+ .ace_scrollbar {
439
+ contain: strict;
440
+ position: absolute;
441
+ right: 0;
442
+ bottom: 0;
443
+ z-index: 6;
444
+ }
445
+
446
+ .ace_scrollbar-inner {
447
+ position: absolute;
448
+ cursor: text;
449
+ left: 0;
450
+ top: 0;
451
+ }
452
+
453
+ .ace_scrollbar-v{
454
+ overflow-x: hidden;
455
+ overflow-y: scroll;
456
+ top: 0;
457
+ }
458
+
459
+ .ace_scrollbar-h {
460
+ overflow-x: scroll;
461
+ overflow-y: hidden;
462
+ left: 0;
463
+ }
464
+
465
+ .ace_print-margin {
466
+ position: absolute;
467
+ height: 100%;
468
+ }
469
+
470
+ .ace_text-input {
471
+ position: absolute;
472
+ z-index: 0;
473
+ width: 0.5em;
474
+ height: 1em;
475
+ opacity: 0;
476
+ background: transparent;
477
+ -moz-appearance: none;
478
+ appearance: none;
479
+ border: none;
480
+ resize: none;
481
+ outline: none;
482
+ overflow: hidden;
483
+ font: inherit;
484
+ padding: 0 1px;
485
+ margin: 0 -1px;
486
+ contain: strict;
487
+ -ms-user-select: text;
488
+ -moz-user-select: text;
489
+ -webkit-user-select: text;
490
+ user-select: text;
491
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
492
+ white-space: pre!important;
493
+ }
494
+ .ace_text-input.ace_composition {
495
+ background: transparent;
496
+ color: inherit;
497
+ z-index: 1000;
498
+ opacity: 1;
499
+ }
500
+ .ace_composition_placeholder { color: transparent }
501
+ .ace_composition_marker {
502
+ border-bottom: 1px solid;
503
+ position: absolute;
504
+ border-radius: 0;
505
+ margin-top: 1px;
506
+ }
507
+
508
+ [ace_nocontext=true] {
509
+ transform: none!important;
510
+ filter: none!important;
511
+ clip-path: none!important;
512
+ mask : none!important;
513
+ contain: none!important;
514
+ perspective: none!important;
515
+ mix-blend-mode: initial!important;
516
+ z-index: auto;
517
+ }
518
+
519
+ .ace_layer {
520
+ z-index: 1;
521
+ position: absolute;
522
+ overflow: hidden;
523
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
524
+ word-wrap: normal;
525
+ white-space: pre;
526
+ height: 100%;
527
+ width: 100%;
528
+ box-sizing: border-box;
529
+ /* setting pointer-events: auto; on node under the mouse, which changes
530
+ during scroll, will break mouse wheel scrolling in Safari */
531
+ pointer-events: none;
532
+ }
533
+
534
+ .ace_gutter-layer {
535
+ position: relative;
536
+ width: auto;
537
+ text-align: right;
538
+ pointer-events: auto;
539
+ height: 1000000px;
540
+ contain: style size layout;
541
+ }
542
+
543
+ .ace_text-layer {
544
+ font: inherit !important;
545
+ position: absolute;
546
+ height: 1000000px;
547
+ width: 1000000px;
548
+ contain: style size layout;
549
+ }
550
+
551
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
552
+ contain: style size layout;
553
+ position: absolute;
554
+ top: 0;
555
+ left: 0;
556
+ right: 0;
557
+ }
558
+
559
+ .ace_hidpi .ace_text-layer,
560
+ .ace_hidpi .ace_gutter-layer,
561
+ .ace_hidpi .ace_content,
562
+ .ace_hidpi .ace_gutter {
563
+ contain: strict;
564
+ }
565
+ .ace_hidpi .ace_text-layer > .ace_line,
566
+ .ace_hidpi .ace_text-layer > .ace_line_group {
567
+ contain: strict;
568
+ }
569
+
570
+ .ace_cjk {
571
+ display: inline-block;
572
+ text-align: center;
573
+ }
574
+
575
+ .ace_cursor-layer {
576
+ z-index: 4;
577
+ }
578
+
579
+ .ace_cursor {
580
+ z-index: 4;
581
+ position: absolute;
582
+ box-sizing: border-box;
583
+ border-left: 2px solid;
584
+ /* workaround for smooth cursor repaintng whole screen in chrome */
585
+ transform: translatez(0);
586
+ }
587
+
588
+ .ace_multiselect .ace_cursor {
589
+ border-left-width: 1px;
590
+ }
591
+
592
+ .ace_slim-cursors .ace_cursor {
593
+ border-left-width: 1px;
594
+ }
595
+
596
+ .ace_overwrite-cursors .ace_cursor {
597
+ border-left-width: 0;
598
+ border-bottom: 1px solid;
599
+ }
600
+
601
+ .ace_hidden-cursors .ace_cursor {
602
+ opacity: 0.2;
603
+ }
604
+
605
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
606
+ opacity: 0;
607
+ }
608
+
609
+ .ace_smooth-blinking .ace_cursor {
610
+ transition: opacity 0.18s;
611
+ }
612
+
613
+ .ace_animate-blinking .ace_cursor {
614
+ animation-duration: 1000ms;
615
+ animation-timing-function: step-end;
616
+ animation-name: blink-ace-animate;
617
+ animation-iteration-count: infinite;
618
+ }
619
+
620
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
621
+ animation-duration: 1000ms;
622
+ animation-timing-function: ease-in-out;
623
+ animation-name: blink-ace-animate-smooth;
624
+ }
625
+
626
+ @keyframes blink-ace-animate {
627
+ from, to { opacity: 1; }
628
+ 60% { opacity: 0; }
629
+ }
630
+
631
+ @keyframes blink-ace-animate-smooth {
632
+ from, to { opacity: 1; }
633
+ 45% { opacity: 1; }
634
+ 60% { opacity: 0; }
635
+ 85% { opacity: 0; }
636
+ }
637
+
638
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
639
+ position: absolute;
640
+ z-index: 3;
641
+ }
642
+
643
+ .ace_marker-layer .ace_selection {
644
+ position: absolute;
645
+ z-index: 5;
646
+ }
647
+
648
+ .ace_marker-layer .ace_bracket {
649
+ position: absolute;
650
+ z-index: 6;
651
+ }
652
+
653
+ .ace_marker-layer .ace_error_bracket {
654
+ position: absolute;
655
+ border-bottom: 1px solid #DE5555;
656
+ border-radius: 0;
657
+ }
658
+
659
+ .ace_marker-layer .ace_active-line {
660
+ position: absolute;
661
+ z-index: 2;
662
+ }
663
+
664
+ .ace_marker-layer .ace_selected-word {
665
+ position: absolute;
666
+ z-index: 4;
667
+ box-sizing: border-box;
668
+ }
669
+
670
+ .ace_line .ace_fold {
671
+ box-sizing: border-box;
672
+
673
+ display: inline-block;
674
+ height: 11px;
675
+ margin-top: -2px;
676
+ vertical-align: middle;
677
+
678
+ background-image:
679
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
680
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
681
+ background-repeat: no-repeat, repeat-x;
682
+ background-position: center center, top left;
683
+ color: transparent;
684
+
685
+ border: 1px solid black;
686
+ border-radius: 2px;
687
+
688
+ cursor: pointer;
689
+ pointer-events: auto;
690
+ }
691
+
692
+ .ace_dark .ace_fold {
693
+ }
694
+
695
+ .ace_fold:hover{
696
+ background-image:
697
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
698
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
699
+ }
700
+
701
+ .ace_tooltip {
702
+ background-color: #f5f5f5;
703
+ border: 1px solid gray;
704
+ border-radius: 1px;
705
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
706
+ color: black;
707
+ padding: 3px 4px;
708
+ position: fixed;
709
+ z-index: 999999;
710
+ box-sizing: border-box;
711
+ cursor: default;
712
+ white-space: pre-wrap;
713
+ word-wrap: break-word;
714
+ line-height: normal;
715
+ font-style: normal;
716
+ font-weight: normal;
717
+ letter-spacing: normal;
718
+ pointer-events: none;
719
+ overflow: auto;
720
+ max-width: min(33em, 66vw);
721
+ overscroll-behavior: contain;
722
+ }
723
+ .ace_tooltip pre {
724
+ white-space: pre-wrap;
725
+ }
726
+
727
+ .ace_tooltip.ace_dark {
728
+ background-color: #636363;
729
+ color: #fff;
730
+ }
731
+
732
+ .ace_tooltip:focus {
733
+ outline: 1px solid #5E9ED6;
734
+ }
735
+
736
+ .ace_icon {
737
+ display: inline-block;
738
+ width: 18px;
739
+ vertical-align: top;
740
+ }
741
+
742
+ .ace_icon_svg {
743
+ display: inline-block;
744
+ width: 12px;
745
+ vertical-align: top;
746
+ -webkit-mask-repeat: no-repeat;
747
+ -webkit-mask-size: 12px;
748
+ -webkit-mask-position: center;
749
+ }
750
+
751
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
752
+ padding-right: 13px;
753
+ }
754
+
755
+ .ace_fold-widget, .ace_custom-widget {
756
+ box-sizing: border-box;
757
+
758
+ margin: 0 -12px 0 1px;
759
+ display: none;
760
+ width: 11px;
761
+ vertical-align: top;
762
+
763
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
764
+ background-repeat: no-repeat;
765
+ background-position: center;
766
+
767
+ border-radius: 3px;
768
+
769
+ border: 1px solid transparent;
770
+ cursor: pointer;
771
+ pointer-events: auto;
772
+ }
773
+
774
+ .ace_custom-widget {
775
+ background: none;
776
+ }
777
+
778
+ .ace_folding-enabled .ace_fold-widget {
779
+ display: inline-block;
780
+ }
781
+
782
+ .ace_fold-widget.ace_end {
783
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
784
+ }
785
+
786
+ .ace_fold-widget.ace_closed {
787
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
788
+ }
789
+
790
+ .ace_fold-widget:hover {
791
+ border: 1px solid rgba(0, 0, 0, 0.3);
792
+ background-color: rgba(255, 255, 255, 0.2);
793
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
794
+ }
795
+
796
+ .ace_fold-widget:active {
797
+ border: 1px solid rgba(0, 0, 0, 0.4);
798
+ background-color: rgba(0, 0, 0, 0.05);
799
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
800
+ }
801
+ /**
802
+ * Dark version for fold widgets
803
+ */
804
+ .ace_dark .ace_fold-widget {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_end {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget.ace_closed {
811
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
812
+ }
813
+ .ace_dark .ace_fold-widget:hover {
814
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
+ background-color: rgba(255, 255, 255, 0.1);
816
+ }
817
+ .ace_dark .ace_fold-widget:active {
818
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
819
+ }
820
+
821
+ .ace_inline_button {
822
+ border: 1px solid lightgray;
823
+ display: inline-block;
824
+ margin: -1px 8px;
825
+ padding: 0 5px;
826
+ pointer-events: auto;
827
+ cursor: pointer;
828
+ }
829
+ .ace_inline_button:hover {
830
+ border-color: gray;
831
+ background: rgba(200,200,200,0.2);
832
+ display: inline-block;
833
+ pointer-events: auto;
834
+ }
835
+
836
+ .ace_fold-widget.ace_invalid {
837
+ background-color: #FFB4B4;
838
+ border-color: #DE5555;
839
+ }
840
+
841
+ .ace_fade-fold-widgets .ace_fold-widget {
842
+ transition: opacity 0.4s ease 0.05s;
843
+ opacity: 0;
844
+ }
845
+
846
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
847
+ transition: opacity 0.05s ease 0.05s;
848
+ opacity:1;
849
+ }
850
+
851
+ .ace_underline {
852
+ text-decoration: underline;
853
+ }
854
+
855
+ .ace_bold {
856
+ font-weight: bold;
857
+ }
858
+
859
+ .ace_nobold .ace_bold {
860
+ font-weight: normal;
861
+ }
862
+
863
+ .ace_italic {
864
+ font-style: italic;
865
+ }
866
+
867
+
868
+ .ace_error-marker {
869
+ background-color: rgba(255, 0, 0,0.2);
870
+ position: absolute;
871
+ z-index: 9;
872
+ }
873
+
874
+ .ace_highlight-marker {
875
+ background-color: rgba(255, 255, 0,0.2);
876
+ position: absolute;
877
+ z-index: 8;
878
+ }
879
+
880
+ .ace_mobile-menu {
881
+ position: absolute;
882
+ line-height: 1.5;
883
+ border-radius: 4px;
884
+ -ms-user-select: none;
885
+ -moz-user-select: none;
886
+ -webkit-user-select: none;
887
+ user-select: none;
888
+ background: white;
889
+ box-shadow: 1px 3px 2px grey;
890
+ border: 1px solid #dcdcdc;
891
+ color: black;
892
+ }
893
+ .ace_dark > .ace_mobile-menu {
894
+ background: #333;
895
+ color: #ccc;
896
+ box-shadow: 1px 3px 2px grey;
897
+ border: 1px solid #444;
898
+
899
+ }
900
+ .ace_mobile-button {
901
+ padding: 2px;
902
+ cursor: pointer;
903
+ overflow: hidden;
904
+ }
905
+ .ace_mobile-button:hover {
906
+ background-color: #eee;
907
+ opacity:1;
908
+ }
909
+ .ace_mobile-button:active {
910
+ background-color: #ddd;
911
+ }
912
+
913
+ .ace_placeholder {
914
+ position: relative;
915
+ font-family: arial;
916
+ transform: scale(0.9);
917
+ transform-origin: left;
918
+ white-space: pre;
919
+ opacity: 0.7;
920
+ margin: 0 10px;
921
+ z-index: 1;
922
+ }
923
+
924
+ .ace_ghost_text {
925
+ opacity: 0.5;
926
+ font-style: italic;
927
+ }
928
+
929
+ .ace_ghost_text_container > div {
930
+ white-space: pre;
931
+ }
932
+
933
+ .ghost_text_line_wrapped::after {
934
+ content: "↩";
935
+ position: absolute;
936
+ }
937
+
938
+ .ace_lineWidgetContainer.ace_ghost_text {
939
+ margin: 0px 4px
940
+ }
941
+
942
+ .ace_screenreader-only {
943
+ position:absolute;
944
+ left:-10000px;
945
+ top:auto;
946
+ width:1px;
947
+ height:1px;
948
+ overflow:hidden;
949
+ }
950
+
951
+ .ace_hidden_token {
952
+ display: none;
953
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,r,c){var u=t("../lib/dom"),g=t("../lib/oop"),v=t("../lib/event_emitter").EventEmitter,s=(function(){function d(a,l){this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(a)}return d.prototype.$createCanvas=function(){this.canvas=u.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},d.prototype.setScrollBarV=function(a){this.$createCanvas(),this.scrollbarV=a,a.element.appendChild(this.canvas),this.setDimensions()},d.prototype.$updateDecorators=function(a){if(typeof this.canvas.getContext!="function")return;var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(a);var h=this.canvas.getContext("2d");function p(M,$){return M.priority<$.priority?-1:M.priority>$.priority?1:0}var o=this.renderer.session.$annotations;if(h.clearRect(0,0,this.canvas.width,this.canvas.height),o){var f={info:1,warning:2,error:3};o.forEach(function(M){M.priority=f[M.type]||null}),o=o.sort(p);for(var m=0;m<o.length;m++){var w=o[m].row,x=this.getVerticalOffsetForRow(w),R=x+this.lineHeight,T=Math.round(this.heightRatio*x),_=Math.round(this.heightRatio*R),C=Math.round((T+_)/2),P=_-C;P<this.halfMinDecorationHeight&&(P=this.halfMinDecorationHeight),C-P<0&&(C=P),C+P>this.canvasHeight&&(C=this.canvasHeight-P);var O=C-P,E=C+P,k=E-O;h.fillStyle=l[o[m].type]||null,h.fillRect(0,O,Math.round(this.oneZoneWidth-1),k)}}var B=this.renderer.session.selection.getCursor();if(B){var N=Math.round(this.getVerticalOffsetForRow(B.row)*this.heightRatio);h.fillStyle="rgba(0, 0, 0, 0.5)",h.fillRect(0,N,this.canvasWidth,2)}},d.prototype.getVerticalOffsetForRow=function(a){a=a|0;var l=this.renderer.session.documentToScreenRow(a,0)*this.lineHeight;return l},d.prototype.setDimensions=function(a){a=a||this.renderer.layerConfig,this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},d.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},d.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},d})();g.implement(s.prototype,v),r.Decorator=s}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(t,r,c){var u=t("./lib/oop"),g=t("./lib/dom"),v=t("./lib/lang"),s=t("./config"),d=t("./layer/gutter").Gutter,a=t("./layer/marker").Marker,l=t("./layer/text").Text,h=t("./layer/cursor").Cursor,p=t("./scrollbar").HScrollBar,o=t("./scrollbar").VScrollBar,f=t("./scrollbar_custom").HScrollBar,m=t("./scrollbar_custom").VScrollBar,w=t("./renderloop").RenderLoop,x=t("./layer/font_metrics").FontMetrics,R=t("./lib/event_emitter").EventEmitter,T=t("./css/editor-css"),_=t("./layer/decorators").Decorator,C=t("./lib/useragent"),P=t("./layer/text_util").isTextToken;g.importCssString(T,"ace_editor.css",!1);var O=(function(){function E(k,B){var N=this;this.container=k||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(B),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var M=this.$textLayer=new l(this.content);this.canvas=M.element,this.$markerFront=new a(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.on("scroll",function($){N.$scrollAnimation||N.session.setScrollTop($.data-N.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){N.$scrollAnimation||N.session.setScrollLeft($.data-N.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container,this.$textLayer,this),this.$textLayer.on("changeCharacterSize",function($){N.updateCharacterSize(),N.onResize(!0,N.gutterWidth,N.$size.width,N.$size.height),N._signal("changeCharacterSize",$)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,fontMetrics:this.$fontMetrics,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.$fontMetrics.config=this.layerConfig,this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return E.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.prototype.setSession=function(k){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=k,k&&this.scrollMargin.top&&k.getScrollTop()<=0&&k.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(k),this.$markerBack.setSession(k),this.$markerFront.setSession(k),this.$gutterLayer.setSession(k),this.$textLayer.setSession(k),k&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},E.prototype.updateLines=function(k,B,N){if(B===void 0&&(B=1/0),this.$changedLines?(this.$changedLines.firstRow>k&&(this.$changedLines.firstRow=k),this.$changedLines.lastRow<B&&(this.$changedLines.lastRow=B)):this.$changedLines={firstRow:k,lastRow:B},this.$changedLines.lastRow<this.layerConfig.firstRow)if(N)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},E.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},E.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},E.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},E.prototype.updateFull=function(k){k?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},E.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},E.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},E.prototype.onResize=function(k,B,N,M){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=k?1:0;var $=this.container;M||(M=$.clientHeight||$.scrollHeight),!M&&this.$maxLines&&this.lineHeight>1&&(!$.style.height||$.style.height=="0px")&&($.style.height="1px",M=$.clientHeight||$.scrollHeight),N||(N=$.clientWidth||$.scrollWidth);var A=this.$updateCachedSize(k,B,N,M);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!N&&!M)return this.resizing=0;k&&(this.$gutterLayer.$padding=null),k?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},E.prototype.$updateCachedSize=function(k,B,N,M){M-=this.$extraHeight||0;var $=0,A=this.$size,D={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(M&&(k||A.height!=M)&&(A.height=M,$|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),N&&(k||A.width!=N)){$|=this.CHANGE_SIZE,A.width=N,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,g.setStyle(this.scrollBarH.element.style,"left",B+"px"),g.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),A.scrollerWidth=Math.max(0,N-B-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var j=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",j),g.setStyle(this.scroller.style,"right",j),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||k)&&($|=this.CHANGE_FULL)}return A.$dirty=!N||!M,$&&this._signal("resize",D),$},E.prototype.onGutterResize=function(k){var B=this.$showGutter?k:0;B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},E.prototype.adjustWrapLimit=function(){var k=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(k/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function(k){this.setOption("animatedScroll",k)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function(k){this.setOption("showInvisibles",k),this.session.$bidiHandler.setShowInvisibles(k)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function(k){this.setOption("displayIndentGuides",k)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function(k){this.setOption("highlightIndentGuides",k)},E.prototype.setShowPrintMargin=function(k){this.setOption("showPrintMargin",k)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function(k){this.setOption("printMarginColumn",k)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function(k){return this.setOption("showGutter",k)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},E.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var k=g.createElement("div");k.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",k.appendChild(this.$printMarginEl),this.content.insertBefore(k,this.content.firstChild)}var B=this.$printMarginEl.style;B.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},E.prototype.getContainerElement=function(){return this.container},E.prototype.getMouseEventTarget=function(){return this.scroller},E.prototype.getTextAreaContainer=function(){return this.container},E.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var k=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){g.translate(this.textarea,-100,0);return}var N=this.$cursorLayer.$pixelPos;if(N){B&&B.markerRange&&(N=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0));var M=this.layerConfig,$=N.top,A=N.left;$-=M.offset;var D=B&&B.useTextareaForIME||C.isMobile?this.lineHeight:1;if($<0||$>M.height-D){g.translate(this.textarea,0,0);return}var j=1,U=this.$size.height-D;if(!B)$+=this.lineHeight;else if(B.useTextareaForIME){var q=this.textarea.value;j=this.$fontMetrics.getTextWidth(q)+1}else $+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-j&&(A=this.$size.scrollerWidth-j),A+=this.gutterWidth+this.margin.left,g.setStyle(k,"height",D+"px"),g.setStyle(k,"width",j+"px"),g.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-j),Math.min($,U))}}},E.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},E.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},E.prototype.getLastFullyVisibleRow=function(){var k=this.layerConfig,B=k.lastRow,N=this.session.documentToScreenRow(B,0)*k.lineHeight;return N-this.session.getScrollTop()>k.height-k.lineHeight?B-1:B},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.prototype.setPadding=function(k){this.$padding=k,this.$textLayer.setPadding(k),this.$cursorLayer.setPadding(k),this.$markerFront.setPadding(k),this.$markerBack.setPadding(k),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},E.prototype.setScrollMargin=function(k,B,N,M){var $=this.scrollMargin;$.top=k|0,$.bottom=B|0,$.right=M|0,$.left=N|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},E.prototype.setMargin=function(k,B,N,M){var $=this.margin;$.top=k|0,$.bottom=B|0,$.right=M|0,$.left=N|0,$.v=$.top+$.bottom,$.h=$.left+$.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},E.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},E.prototype.setHScrollBarAlwaysVisible=function(k){this.setOption("hScrollBarAlwaysVisible",k)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function(k){this.setOption("vScrollBarAlwaysVisible",k)},E.prototype.$updateScrollBarV=function(){var k=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(k-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>k-B&&(k=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(k+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},E.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},E.prototype.freeze=function(){this.$frozen=!0},E.prototype.unfreeze=function(){this.$frozen=!1},E.prototype.$renderChanges=function(k,B){if(this.$changes&&(k|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!k&&!B){this.$changes|=k;return}if(this.$size.$dirty)return this.$changes|=k,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",k);var N=this.layerConfig;if(k&this.CHANGE_FULL||k&this.CHANGE_SIZE||k&this.CHANGE_TEXT||k&this.CHANGE_LINES||k&this.CHANGE_SCROLL||k&this.CHANGE_H_SCROLL){if(k|=this.$computeLayerConfig()|this.$loop.clear(),N.firstRow!=this.layerConfig.firstRow&&N.firstRowScreen==this.layerConfig.firstRowScreen){var M=this.scrollTop+(N.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;M>0&&(this.scrollTop=M,k=k|this.CHANGE_SCROLL,k|=this.$computeLayerConfig()|this.$loop.clear())}N=this.layerConfig}if(k&this.CHANGE_H_SCROLL&&(this.$updateContentTransformAndSize(N,k),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),k&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(N),this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$markerBack.update(N),this.$markerFront.update(N),this.$cursorLayer.update(N),this.$updateContentTransformAndSize(N,k),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}if(k&this.CHANGE_SCROLL){this.$changedLines=null,k&this.CHANGE_TEXT||k&this.CHANGE_LINES?this.$textLayer.update(N):this.$textLayer.scrollLines(N),this.$showGutter&&(k&this.CHANGE_GUTTER||k&this.CHANGE_LINES?this.$gutterLayer.update(N):this.$gutterLayer.scrollLines(N)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$markerBack.update(N),this.$markerFront.update(N),this.$cursorLayer.update(N),this.$updateContentTransformAndSize(N,k),this.$moveTextAreaToCursor(),this._signal("afterRender",k);return}k&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(N),this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$updateContentTransformAndSize(N,k)):k&this.CHANGE_LINES?((this.$updateLines()||k&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$updateContentTransformAndSize(N,k)):k&this.CHANGE_TEXT||k&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)):k&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)),k&this.CHANGE_CURSOR&&(this.$cursorLayer.update(N),this.$moveTextAreaToCursor()),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(N),k&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(N),this._signal("afterRender",k)},E.prototype.$autosize=function(){var k=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,N=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,k))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(N+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&N>this.$maxPixelHeight&&(N=this.$maxPixelHeight);var M=N<=2*this.lineHeight,$=!M&&k>B;if(N!=this.desiredHeight||this.$size.height!=this.desiredHeight||$!=this.$vScroll){$!=this.$vScroll&&(this.$vScroll=$,this.scrollBarV.setVisible($));var A=this.container.clientWidth;this.container.style.height=N+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,N),this.desiredHeight=N,this._signal("autosize")}},E.prototype.$updateContentTransformAndSize=function(k,B){var N=this.scrollMargin;if(this.session&&!this.session.getUseWrapMode()){var M=this.$getLongestRenderedLine();k.width<M&&(k.width=M)}this.session&&this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,k.width+2*this.$padding-this.$size.scrollerWidth+N.right))),g.translate(this.content,-this.scrollLeft,-k.offset);var $=k.width+2*this.$padding+"px",A=k.minHeight+"px";g.setStyle(this.content.style,"width",$),g.setStyle(this.content.style,"height",A),this.$updateScrollBarV(),B&this.CHANGE_H_SCROLL&&this.$updateScrollBarH()},E.prototype.$getLongestRenderedLine=function(){for(var k=0,B=this.$hasCssTransforms&&this.$fontMetrics.getTransform(),N=this.$textLayer.$lines.cells,M=0;M<N.length;M++){var $=N[M].element;this.$fontMetrics.$scratchRange.setStart($,0),this.$fontMetrics.$scratchRange.setEnd($,$.childNodes.length);var A=this.$fontMetrics.$scratchRange.getBoundingClientRect();this.$hasCssTransforms&&(A=this.$fontMetrics.recoverRect(B,A)||A);var D=A.width;D>k&&(k=D)}return k},E.prototype.$computeLayerConfig=function(){var k=this.session,B=this.$size,N=B.height<=2*this.lineHeight,M=this.session.getScreenLength(),$=M*this.lineHeight,A=this.$getLongestLine(),D=!N&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-A-2*this.$padding<0),j=this.$horizScroll!==D;j&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),N=B.height<=2*this.lineHeight);var q=B.scrollerHeight+this.lineHeight,Q=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;$+=Q;var re=this.scrollMargin;this.session.setScrollTop(Math.max(-re.top,Math.min(this.scrollTop,$-B.scrollerHeight+re.bottom)));var le=!N&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-$+Q<0||this.scrollTop>re.top),ne=U!==le;ne&&(this.$vScroll=le,this.scrollBarV.setVisible(le));var ue=this.scrollTop%this.lineHeight,he=Math.ceil(q/this.lineHeight)-1,oe=Math.max(0,Math.round((this.scrollTop-ue)/this.lineHeight)),ee=oe+he,ye,we,Ae=this.lineHeight;oe=k.screenToDocumentRow(oe,0);var Je=k.getFoldLine(oe);Je&&(oe=Je.start.row),ye=k.documentToScreenRow(oe,0),we=k.getRowLength(oe)*Ae,ee=Math.min(k.screenToDocumentRow(ee,0),k.getLength()-1),q=B.scrollerHeight+k.getRowLength(ee)*Ae+we,ue=this.scrollTop-ye*Ae,ue<0&&ye>0&&(ye=Math.max(0,ye+Math.floor(ue/Ae)),ue=this.scrollTop-ye*Ae);var Be=0;return(this.layerConfig.width!=A||j)&&(Be=this.CHANGE_H_SCROLL),(j||ne)&&(Be|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),ne&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:oe,firstRowScreen:ye,lastRow:ee,lineHeight:Ae,characterWidth:this.characterWidth,fontMetrics:this.$fontMetrics,minHeight:q,maxHeight:$,offset:ue,gutterOffset:Ae?Math.max(0,Math.ceil((ue+B.height-B.scrollerHeight)/Ae)):0,height:this.$size.scrollerHeight},this.$fontMetrics.config=this.layerConfig,this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),Be},E.prototype.$updateLines=function(){if(this.$changedLines){var k=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var N=this.layerConfig;if(!(k>N.lastRow+1)&&!(B<N.firstRow)){if(B===1/0){this.$showGutter&&this.$gutterLayer.update(N),this.$textLayer.update(N);return}return this.$textLayer.updateLines(N,k,B),!0}}},E.prototype.$getLongestLine=function(){var k=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(k+=1),this.$textLayer&&k>this.$textLayer.MAX_LINE_LENGTH&&(k=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(k*this.characterWidth))},E.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},E.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},E.prototype.addGutterDecoration=function(k,B){this.$gutterLayer.addGutterDecoration(k,B)},E.prototype.removeGutterDecoration=function(k,B){this.$gutterLayer.removeGutterDecoration(k,B)},E.prototype.updateBreakpoints=function(k){this._rows=k,this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function(k){this.$gutterLayer.setAnnotations(k),this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},E.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},E.prototype.showCursor=function(){this.$cursorLayer.showCursor()},E.prototype.scrollSelectionIntoView=function(k,B,N){this.scrollCursorIntoView(k,N),this.scrollCursorIntoView(B,N)},E.prototype.scrollCursorIntoView=function(k,B,N){if(this.$size.scrollerHeight!==0){var M=this.$cursorLayer.getPixelPosition(k),$=M.left,A=M.top,D=N&&N.top||0,j=N&&N.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>A?(B&&U+D>A+this.lineHeight&&(A-=B*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-j<A+this.lineHeight&&(B&&U+this.$size.scrollerHeight-j<A-this.lineHeight&&(A+=B*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+j-this.$size.scrollerHeight));var q=this.scrollLeft,Q=2*this.layerConfig.characterWidth;$-Q<q?($-=Q,$<this.$padding+Q&&($=-this.scrollMargin.left),this.session.setScrollLeft($)):($+=Q,q+this.$size.scrollerWidth<$+this.characterWidth?this.session.setScrollLeft(Math.round($+this.characterWidth-this.$size.scrollerWidth)):q<=this.$padding&&$-q<this.characterWidth&&this.session.setScrollLeft(0))}},E.prototype.getScrollTop=function(){return this.session.getScrollTop()},E.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},E.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},E.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},E.prototype.scrollToRow=function(k){this.session.setScrollTop(k*this.lineHeight)},E.prototype.alignCursor=function(k,B){typeof k=="number"&&(k={row:k,column:0});var N=this.$cursorLayer.getPixelPosition(k),M=this.$size.scrollerHeight-this.lineHeight,$=N.top-M*(B||0);return this.session.setScrollTop($),$},E.prototype.$calcSteps=function(k,B){var N=0,M=this.STEPS,$=[],A=function(D,j,U){return U*(Math.pow(D-1,3)+1)+j};for(N=0;N<M;++N)$.push(A(N/this.STEPS,k,B-k));return $},E.prototype.scrollToLine=function(k,B,N,M){var $=this.$cursorLayer.getPixelPosition({row:k,column:0}),A=$.top;B&&(A-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(A),N!==!1&&this.animateScrolling(D,M)},E.prototype.animateScrolling=function(k,B){var N=this.scrollTop;if(!this.$animatedScroll)return;var M=this;if(k==N)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(k=$[0],k==N))return}var A=M.$calcSteps(k,N);this.$scrollAnimation={from:k,to:N,steps:A},clearInterval(this.$timer),M.session.setScrollTop(A.shift()),M.session.$scrollTop=N;function D(){M.$timer=clearInterval(M.$timer),M.$scrollAnimation=null,M.$stopAnimation=!1,B&&B()}this.$timer=setInterval(function(){if(M.$stopAnimation){D();return}if(!M.session)return clearInterval(M.$timer);A.length?(M.session.setScrollTop(A.shift()),M.session.$scrollTop=N):N!=null?(M.session.$scrollTop=-1,M.session.setScrollTop(N),N=null):D()},10)},E.prototype.scrollToY=function(k){this.scrollTop!==k&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=k)},E.prototype.scrollToX=function(k){this.scrollLeft!==k&&(this.scrollLeft=k),this.$loop.schedule(this.CHANGE_H_SCROLL)},E.prototype.scrollTo=function(k,B){this.session.setScrollTop(B),this.session.setScrollLeft(k)},E.prototype.scrollBy=function(k,B){B&&this.session.setScrollTop(this.session.getScrollTop()+B),k&&this.session.setScrollLeft(this.session.getScrollLeft()+k)},E.prototype.isScrollableBy=function(k,B){if(B<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||B>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||k<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||k>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},E.prototype.pixelToScreenCoordinates=function(k,B){var N;if(this.$hasCssTransforms){N={top:this.margin.top,left:this.gutterWidth+this.margin.left};var M=this.$fontMetrics.transformCoordinates([k,B]);k=M[0],B=M[1]}else N=this.scroller.getBoundingClientRect();var $=k+this.scrollLeft-N.left-this.$padding,A=$/this.characterWidth,D=(B+this.scrollTop-N.top)/this.lineHeight,j=this.$blockCursor?Math.floor(A):Math.round(A);return j=this.$fontMetrics.$pixelToColumn(D,j,k,this.$blockCursor),{row:D,column:j,side:A-j>0?1:-1,offsetX:$}},E.prototype.screenToTextCoordinates=function(k,B){var N=this.pixelToScreenCoordinates(k,B);return this.session.screenToDocumentPosition(N.row,Math.max(N.column,0))},E.prototype.textToScreenCoordinates=function(k,B){var N=this.session.documentToScreenPosition(k,B),M=this.$padding+this.$fontMetrics.textWidth(N.row,N.column),$=N.row*this.lineHeight;if(this.$hasCssTransforms){var A=this.$fontMetrics.transformCoordinates(null,[this.gutterWidth+this.margin.left+M-this.scrollLeft,this.margin.top+$-this.scrollTop]);return{pageX:A[0],pageY:A[1]}}var D=this.scroller.getBoundingClientRect();return{pageX:D.left+M-this.scrollLeft,pageY:D.top+$-this.scrollTop}},E.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function(k){this.$composition=k,k.cssText||(k.cssText=this.textarea.style.cssText),k.useTextareaForIME==null&&(k.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):k.markerId=this.session.addMarker(k.markerRange,"ace_composition_marker","text")},E.prototype.setCompositionText=function(k){var B=this.session.selection.cursor;this.addToken(k,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var k=this.session.selection.cursor;this.removeExtraToken(k.row,k.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function(k,B){var N=this.session.selection.cursor,M=B||{row:N.row,column:N.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(k,M);this.addToken($[0].text,"ghost_text",M.row,M.column),this.$ghostText={text:k,position:{row:M.row,column:M.column}};var A=g.createElement("div");if($.length>1){var D=this.hideTokensAfterPosition(M.row,M.column),j;$.slice(1).forEach(function(ne){var ue=g.createElement("div"),he=g.createElement("span");he.className="ace_ghost_text",ne.wrapped&&(ue.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),he.appendChild(g.createTextNode(ne.text)),ue.appendChild(he),A.appendChild(ue),j=ue}),D.forEach(function(ne){var ue=g.createElement("span");P(ne.type)||(ue.className="ace_"+ne.type.replace(/\./g," ace_")),ue.appendChild(g.createTextNode(ne.value)),j.appendChild(ue)}),this.$ghostTextWidget={el:A,row:M.row,column:M.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(M,!0),q=this.container,Q=q.getBoundingClientRect().height,re=$.length*this.lineHeight,le=re<Q-U.top;if(le)return;re<Q?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(M.row)}},E.prototype.$calculateWrappedTextChunks=function(k,B){var N=this.$size.scrollerWidth-this.$padding*2,M=Math.floor(N/this.characterWidth)-2;M=M<=0?60:M;for(var $=k.split(/\r?\n/),A=[],D=0;D<$.length;D++){var j=this.session.$getDisplayTokens($[D],B.column),U=this.session.$computeWrapSplits(j,M,this.session.$tabSize);if(U.length>0){var q=0;U.push($[D].length);for(var Q=0;Q<U.length;Q++){var re=$[D].slice(q,U[Q]);A.push({text:re,wrapped:!0}),q=U[Q]}}else A.push({text:$[D],wrapped:!1})}return A},E.prototype.removeGhostText=function(){if(this.$ghostText){var k=this.$ghostText.position;this.removeExtraToken(k.row,k.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},E.prototype.addToken=function(k,B,N,M){var $=this.session;$.bgTokenizer.lines[N]=null;var A={type:B,value:k},D=$.getTokens(N);if(M==null||!D.length)D.push(A);else for(var j=0,U=0;U<D.length;U++){var q=D[U];if(j+=q.value.length,M<=j){var Q=q.value.length-(j-M),re=q.value.slice(0,Q),le=q.value.slice(Q);D.splice(U,1,{type:q.type,value:re},A,{type:q.type,value:le});break}}this.updateLines(N,N)},E.prototype.hideTokensAfterPosition=function(k,B){for(var N=this.session.getTokens(k),M=0,$=!1,A=[],D=0;D<N.length;D++){var j=N[D];if(M+=j.value.length,j.type!=="ghost_text"){if($){A.push({type:j.type,value:j.value}),j.type="hidden_token";continue}M===B&&($=!0)}}return this.updateLines(k,k),A},E.prototype.removeExtraToken=function(k,B){this.session.bgTokenizer.lines[k]=null,this.updateLines(k,k)},E.prototype.setTheme=function(k,B){var N=this;if(this.$themeId=k,N._dispatchEvent("themeChange",{theme:k}),!k||typeof k=="string"){var M=k||this.$options.theme.initialValue;s.loadModule(["theme",M],$)}else $(k);function $(A){if(N.$themeId!=k)return B&&B();if(!A||!A.cssClass)throw new Error("couldn't load module "+k+" or it didn't call define");A.$id&&(N.$themeId=A.$id),g.importCssString(A.cssText,A.cssClass,N.container),N.theme&&g.removeCssClass(N.container,N.theme.cssClass);var D="padding"in A?A.padding:"padding"in(N.theme||{})?4:N.$padding;if(N.$padding&&D!=N.$padding&&N.setPadding(D),N.$gutterLayer){var j=A.$showGutterCursorMarker;j&&!N.$gutterLayer.$showCursorMarker?N.$gutterLayer.$showCursorMarker="theme":!j&&N.$gutterLayer.$showCursorMarker=="theme"&&(N.$gutterLayer.$showCursorMarker=null)}N.$theme=A.cssClass,N.theme=A,g.addCssClass(N.container,A.cssClass),g.setCssClass(N.container,"ace_dark",A.isDark),N.$size&&(N.$size.width=0,N.$updateSizeAsync()),N._dispatchEvent("themeLoaded",{theme:A}),B&&B(),C.isSafari&&N.scroller&&(N.scroller.style.background="red",N.scroller.style.background="")}},E.prototype.getTheme=function(){return this.$themeId},E.prototype.setStyle=function(k,B){g.setCssClass(this.container,k,B!==!1)},E.prototype.unsetStyle=function(k){g.removeCssClass(this.container,k)},E.prototype.setCursorStyle=function(k){g.setStyle(this.scroller.style,"cursor",k)},E.prototype.setMouseCursor=function(k){g.setStyle(this.scroller.style,"cursor",k)},E.prototype.attachToShadowRoot=function(){g.importCssString(T,"ace_editor.css",this.container)},E.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},E.prototype.$updateCustomScrollbar=function(k){var B=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),k===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(N){B.$scrollAnimation||B.session.setScrollTop(N.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(N){B.$scrollAnimation||B.session.setScrollLeft(N.data-B.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.addEventListener("scroll",function(N){B.$scrollAnimation||B.session.setScrollTop(N.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(N){B.$scrollAnimation||B.session.setScrollLeft(N.data-B.scrollMargin.left)}))},E.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var k=this;this.$resizeTimer=v.delayedCall(function(){k.destroyed||k.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(B){var N=B[0].contentRect.width,M=B[0].contentRect.height;Math.abs(k.$size.width-N)>1||Math.abs(k.$size.height-M)>1?k.$resizeTimer.delay():k.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E})();O.prototype.CHANGE_CURSOR=1,O.prototype.CHANGE_MARKER=2,O.prototype.CHANGE_GUTTER=4,O.prototype.CHANGE_SCROLL=8,O.prototype.CHANGE_LINES=16,O.prototype.CHANGE_TEXT=32,O.prototype.CHANGE_SIZE=64,O.prototype.CHANGE_MARKER_BACK=128,O.prototype.CHANGE_MARKER_FRONT=256,O.prototype.CHANGE_FULL=512,O.prototype.CHANGE_H_SCROLL=1024,O.prototype.$changes=0,O.prototype.$padding=null,O.prototype.$frozen=!1,O.prototype.STEPS=8,u.implement(O.prototype,R),s.defineOptions(O.prototype,"renderer",{useResizeObserver:{set:function(E){!E&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):E&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(E){this.$textLayer.setShowInvisibles(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(E){typeof E=="number"&&(this.$printMarginColumn=E),this.$showPrintMargin=!!E,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(E){this.$gutter.style.display=E?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(E){this.$gutterLayer.$useSvgGutterIcons=E},initialValue:!1},showFoldedAnnotations:{set:function(E){this.$gutterLayer.$showFoldedAnnotations=E},initialValue:!1},fadeFoldWidgets:{set:function(E){g.setCssClass(this.$gutter,"ace_fade-fold-widgets",E)},initialValue:!1},showFoldWidgets:{set:function(E){this.$gutterLayer.setShowFoldWidgets(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(E){this.$textLayer.setDisplayIndentGuides(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(E){this.$textLayer.setHighlightIndentGuides(E)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(E){this.$gutterLayer.setHighlightGutterLine(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(E){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(E){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(E){typeof E=="number"&&(E=E+"px"),this.container.style.fontSize=E,this.updateFontSize()},initialValue:12},fontFamily:{set:function(E){this.container.style.fontFamily=E,this.updateFontSize()}},maxLines:{set:function(E){this.updateFull()}},minLines:{set:function(E){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(E){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(E){E=+E||0,this.$scrollPastEnd!=E&&(this.$scrollPastEnd=E,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(E){this.$gutterLayer.$fixedWidth=!!E,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(E){this.$updateCustomScrollbar(E)},initialValue:!1},theme:{set:function(E){this.setTheme(E)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=O}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,r,c){var u=t("../lib/oop"),g=t("../lib/net"),v=t("../lib/event_emitter").EventEmitter,s=t("../config");function d(p){var o="importScripts('"+g.qualifyURL(p)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var f=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new f;return m.append(o),m.getBlob("application/javascript")}}function a(p){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var o=d(p),f=window.URL||window.webkitURL,m=f.createObjectURL(o);return new Worker(m)}return new Worker(p)}var l=function(p){p.postMessage||(p=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=p,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(){u.implement(this,v),this.$createWorkerFromOldConfig=function(p,o,f,m,w){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),s.get("packaged")||!t.toUrl)m=m||s.moduleUrl(o,"worker");else{var x=this.$normalizePath;m=m||x(t.toUrl("ace/worker/worker.js",null,"_"));var R={};p.forEach(function(T){R[T]=x(t.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:R,module:o,classname:f}),this.$worker},this.onMessage=function(p){var o=p.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var f=this.callbacks[o.id];f&&(f(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(p){window.console&&console.error&&console.error(p)},this.$normalizePath=function(p){return g.qualifyURL(p)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(p){p.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(p,o){this.$worker.postMessage({command:p,args:o})},this.call=function(p,o,f){if(f){var m=this.callbackId++;this.callbacks[m]=f,o.push(m)}this.send(p,o)},this.emit=function(p,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:p,data:{data:o.data}})}catch(f){console.error(f.stack)}},this.attachToDocument=function(p){this.$doc&&this.terminate(),this.$doc=p,this.call("setValue",[p.getValue()]),p.on("change",this.changeListener,!0)},this.changeListener=function(p){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),p.action=="insert"?this.deltaQueue.push(p.start,p.lines):this.deltaQueue.push(p.start,p.end)},this.$sendDeltaQueue=function(){var p=this.deltaQueue;p&&(this.deltaQueue=null,p.length>50&&p.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:p}))}}).call(l.prototype);var h=function(p,o,f){var m=null,w=!1,x=Object.create(v),R=[],T=new l({messageBuffer:R,terminate:function(){},postMessage:function(C){R.push(C),m&&(w?setTimeout(_):_())}});T.setEmitSync=function(C){w=C};var _=function(){var C=R.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){T.onMessage({data:C})},x.callback=function(C,P){this.postMessage({type:"call",id:P,data:C})},x.emit=function(C,P){this.postMessage({type:"event",name:C,data:P})},s.loadModule(["worker",o],function(C){for(m=new C[f](x);R.length;)_()}),T};r.UIWorkerClient=h,r.WorkerClient=l,r.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,r,c){var u=t("./range").Range,g=t("./lib/event_emitter").EventEmitter,v=t("./lib/oop"),s=(function(){function d(a,l,h,p,o,f){var m=this;this.length=l,this.session=a,this.doc=a.getDocument(),this.mainClass=o,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=h;var w=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var a=this,l=this.doc,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=h.addMarker(new u(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var f=l.createAnchor(o.row,o.column);f.$insertRight=!0,f.detach(),a.others.push(f)}),h.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,l=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=a.addMarker(new u(h.row,h.column,h.row,h.column+l.length),l.othersClass,null,!1)})}},d.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},d.prototype.onUpdate=function(a){if(this.$updating)return this.updateAnchors(a);var l=a;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var h=a.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,p=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,o=l.start.column-this.pos.column;if(this.updateAnchors(a),p&&(this.length+=h),p&&!this.session.$fromUndo){if(a.action==="insert")for(var f=this.others.length-1;f>=0;f--){var m=this.others[f],w={row:m.row,column:m.column+o};this.doc.insertMergedLines(w,a.lines)}else if(a.action==="remove")for(var f=this.others.length-1;f>=0;f--){var m=this.others[f],w={row:m.row,column:m.column+o};this.doc.remove(new u(w.row,w.column,w.row,w.column-h))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var l=this.others.length;l--;)this.others[l].onChange(a);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var a=this,l=this.session,h=function(o,f){l.removeMarker(o.markerId),o.markerId=l.addMarker(new u(o.row,o.column,o.row,o.column+a.length),f,null,!1)};h(this.pos,this.mainClass);for(var p=this.others.length;p--;)h(this.others[p],this.othersClass)}},d.prototype.onCursorChange=function(a){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},d.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},d.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var a=this.session.getUndoManager(),l=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,h=0;h<l;h++)a.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d})();v.implement(s.prototype,g),r.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,c){var u=t("../lib/event"),g=t("../lib/useragent");function v(d,a){return d.row==a.row&&d.column==a.column}function s(d){var a=d.domEvent,l=a.altKey,h=a.shiftKey,p=a.ctrlKey,o=d.getAccelKey(),f=d.getButton();if(p&&g.isMac&&(f=a.button),d.editor.inMultiSelectMode&&f==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!p&&!l&&!o){f===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(f===0){var m=d.editor,w=m.selection,x=m.inMultiSelectMode,R=d.getDocumentPosition(),T=w.getCursor(),_=d.inSelection()||w.isEmpty()&&v(R,T),C=d.x,P=d.y,O=function(re){C=re.clientX,P=re.clientY},E=m.session,k=m.renderer.pixelToScreenCoordinates(C,P),B=k,N;if(m.$mouseHandler.$enableJumpToDef)p&&l||o&&l?N=h?"block":"add":l&&m.$blockSelectEnabled&&(N="block");else if(o&&!l){if(N="add",!x&&h)return}else l&&m.$blockSelectEnabled&&(N="block");if(N&&g.isMac&&a.ctrlKey&&m.$mouseHandler.cancelContextMenu(),N=="add"){if(!x&&_)return;if(!x){var M=w.toOrientedRange();m.addSelectionMarker(M)}var $=w.rangeList.rangeAtPoint(R);m.inVirtualSelectionMode=!0,h&&($=null,M=w.ranges[0]||M,m.removeSelectionMarker(M)),m.once("mouseup",function(){var re=w.toOrientedRange();$&&re.isEmpty()&&v($.cursor,re.cursor)?w.substractPoint(re.cursor):(h?w.substractPoint(M.cursor):M&&(m.removeSelectionMarker(M),w.addRange(M)),w.addRange(re)),m.inVirtualSelectionMode=!1})}else if(N=="block"){d.stop(),m.inVirtualSelectionMode=!0;var A,D=[],j=function(){var re=m.renderer.pixelToScreenCoordinates(C,P),le=E.screenToDocumentPosition(re.row,re.column);v(B,re)&&v(le,w.lead)||(B=re,m.selection.moveToPosition(le),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(D),D=w.rectangularRangeBlock(B,k),m.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=m.$mouseHandler.$clickSelection.clone()),D.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!o?w.toSingleRange():!x&&o&&(A=w.toOrientedRange(),m.addSelectionMarker(A)),h?k=E.documentToScreenPosition(w.lead):w.moveToPosition(R),B={row:-1,column:-1};var U=function(re){j(),clearInterval(Q),m.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),A&&(m.removeSelectionMarker(A),w.toSingleRange(A));for(var le=0;le<D.length;le++)w.addRange(D[le]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},q=j;u.capture(m.container,O,U);var Q=setInterval(function(){q()},20);return d.preventDefault()}}}r.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,r,c){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(g){g.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(g){g.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(g){g.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var u=t("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new u(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,r,c){var u=t("./range_list").RangeList,g=t("./range").Range,v=t("./selection").Selection,s=t("./mouse/multi_select_handler").onMouseDown,d=t("./lib/event"),a=t("./lib/lang"),l=t("./commands/multi_select_commands");r.commands=l.defaultCommands.concat(l.multiSelectCommands);var h=t("./search").Search,p=new h;function o(T,_,C){return p.$options.wrap=!0,p.$options.needle=_,p.$options.backwards=C==-1,p.find(T)}var f=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,_){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}T.cursor||(T.cursor=T.end);var P=this.rangeList.add(T);return this.$onAddRange(T),P.length&&this.$onRemoveRange(P),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var _=this.rangeList.substractPoint(T);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();T.push(_),this.rangeCount=0}for(var C=T.length;C--;){var P=this.ranges.indexOf(T[C]);P!=-1&&this.ranges.splice(P,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new u,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<T.length;C++){var P=T[C],O=P.start.row,E=P.end.row;if(O===E)_.push(P.clone());else{for(_.push(new g(O,P.start.column,O,this.session.getLine(O).length));++O<E;)_.push(this.getLineRange(O,!0));_.push(new g(E,0,E,P.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var T=this.rangeList.ranges,_=T[T.length-1],C=g.fromPoints(T[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,_=T[T.length-1],C=g.fromPoints(T[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var P=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),E=this.rectangularRangeBlock(P,O);E.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,_,C){var P=[],O=T.column<_.column;if(O)var E=T.column,k=_.column;else var E=_.column,k=T.column;var B=T.row<_.row;if(B)var N=T.row,M=_.row;else var N=_.row,M=T.row;E<0&&(E=0),N<0&&(N=0),N==M&&(C=!0);for(var $,A=N;A<=M;A++){var D=g.fromPoints(this.session.screenToDocumentPosition(A,E),this.session.screenToDocumentPosition(A,k));if(D.isEmpty()){if($&&w(D.end,$))break;$=D.end}D.cursor=O?D.start:D.end,P.push(D)}if(B&&P.reverse(),!C){for(var j=P.length-1;P[j].isEmpty()&&j>0;)j--;if(j>0)for(var U=0;P[U].isEmpty();)U++;for(var q=j;q>=U;q--)P[q].isEmpty()&&P.splice(q,1)}return P}}).call(v.prototype);var m=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var _=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",_),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var _=this.session.$selectionMarkers.indexOf(T);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var _=this.session.$selectionMarkers,C=T.length;C--;){var P=T[C];if(P.marker){this.session.removeMarker(P.marker);var O=_.indexOf(P);O!=-1&&_.splice(O,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(T){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(T){var _=T.command,C=T.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?P=C.forEachSelection(_,T.args):_.multiSelectAction=="forEachLine"?P=C.forEachSelection(_,T.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),P=_.exec(C,T.args||{})):P=_.multiSelectAction(C,T.args||{});else{var P=_.exec(C,T.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return P}},this.forEachSelection=function(T,_,C){if(!this.inVirtualSelectionMode){var P=C&&C.keepOrder,O=C==!0||C&&C.$byLines,E=this.session,k=this.selection,B=k.rangeList,N=(P?k:B).ranges,M;if(!N.length)return T.exec?T.exec(this,_||{}):T(this,_||{});var $=k._eventRegistry;k._eventRegistry={};var A=new v(E);this.inVirtualSelectionMode=!0;try{for(var D=N.length;D--;){if(O)for(;D>0&&N[D].start.row==N[D-1].end.row;)D--;A.fromOrientedRange(N[D]),A.index=D,this.selection=E.selection=A;var j=T.exec?T.exec(this,_||{}):T(this,_||{});!M&&j!==void 0&&(M=j),A.toOrientedRange(N[D])}A.detach()}finally{this.selection=E.selection=k,this.inVirtualSelectionMode=!1,k._eventRegistry=$,k.mergeOverlappingRanges(),k.ranges[0]&&k.fromOrientedRange(k.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),M}}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],P=0;P<_.length;P++)C.push(this.session.getTextRange(_[P]));var O=this.session.getDocument().getNewLineCharacter();T=C.join(O),T.length==(C.length-1)*O.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(!C||this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var P=_==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;P.row!=_.row||this.session.$clipPositionToDocument(P.row,P.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,_,C){if(_=_||{},_.needle=T||_.needle,_.needle==null){var P=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(P)}this.$search.set(_);var O=this.$search.findAll(this.session);if(!O.length)return 0;var E=this.multiSelect;C||E.toSingleRange(O[0]);for(var k=O.length;k--;)E.addRange(O[k],!0);return P&&E.rangeList.rangeAtPoint(P.start)&&E.addRange(P,!0),O.length},this.selectMoreLines=function(T,_){var C=this.selection.toOrientedRange(),P=C.cursor==C.end,O=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(O.column=this.selection.$desiredColumn);var E=this.session.screenToDocumentPosition(O.row+T,O.column);if(C.isEmpty())var B=E;else var k=this.session.documentToScreenPosition(P?C.end:C.start),B=this.session.screenToDocumentPosition(k.row+T,k.column);if(P){var N=g.fromPoints(E,B);N.cursor=N.start}else{var N=g.fromPoints(B,E);N.cursor=N.end}if(N.desiredColumn=O.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var M=C.cursor;this.selection.addRange(N),M&&this.selection.substractPoint(M)},this.transposeSelections=function(T){for(var _=this.session,C=_.multiSelect,P=C.ranges,O=P.length;O--;){var E=P[O];if(E.isEmpty()){var k=_.getWordRange(E.start.row,E.start.column);E.start.row=k.start.row,E.start.column=k.start.column,E.end.row=k.end.row,E.end.column=k.end.column}}C.mergeOverlappingRanges();for(var B=[],O=P.length;O--;){var E=P[O];B.unshift(_.getTextRange(E))}T<0?B.unshift(B.pop()):B.push(B.shift());for(var O=P.length;O--;){var E=P[O],N=E.clone();_.replace(E,B[O]),E.start.row=N.start.row,E.start.column=N.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(T,_,C){var P=this.session,O=P.multiSelect,E=O.toOrientedRange();if(!(E.isEmpty()&&(E=P.getWordRange(E.start.row,E.start.column),E.cursor=T==-1?E.start:E.end,this.multiSelect.addRange(E),C))){var k=P.getTextRange(E),B=o(P,k,T);B&&(B.cursor=T==-1?B.start:B.end,this.session.unfold(B),this.multiSelect.addRange(B),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(E.cursor)}},this.alignCursors=function(){var T=this.session,_=T.multiSelect,C=_.ranges,P=-1,O=C.filter(function(q){if(q.cursor.row==P)return!0;P=q.cursor.row});if(!C.length||O.length==C.length-1){var E=this.selection.getRange(),k=E.start.row,B=E.end.row,N=k==B;if(N){var M=this.session.getLength(),$;do $=this.session.getLine(B);while(/[=:]/.test($)&&++B<M);do $=this.session.getLine(k);while(/[=:]/.test($)&&--k>0);k<0&&(k=0),B>=M&&(B=M-1)}var A=this.session.removeFullLines(k,B);A=this.$reAlignText(A,N),this.session.insert({row:k,column:0},A.join(`
954
+ `)+`
955
+ `),N||(E.start.column=0,E.end.column=A[A.length-1].length),this.selection.setRange(E)}else{O.forEach(function(q){_.substractPoint(q.cursor)});var D=0,j=1/0,U=C.map(function(q){var Q=q.cursor,re=T.getLine(Q.row),le=re.substr(Q.column).search(/\S/g);return le==-1&&(le=0),Q.column>D&&(D=Q.column),le<j&&(j=le),le});C.forEach(function(q,Q){var re=q.cursor,le=D-re.column,ne=U[Q]-j;le>ne?T.insert(re,a.stringRepeat(" ",le-ne)):T.remove(new g(re.row,re.column,re.row,re.column-le+ne)),q.start.column=q.end.column=D,q.start.row=q.end.row=re.row,q.cursor=q.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,_){var C=!0,P=!0,O,E,k;return T.map(function(A){var D=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?O==null?(O=D[1].length,E=D[2].length,k=D[3].length,D):(O+E+k!=D[1].length+D[2].length+D[3].length&&(P=!1),O!=D[1].length&&(C=!1),O>D[1].length&&(O=D[1].length),E<D[2].length&&(E=D[2].length),k>D[3].length&&(k=D[3].length),D):[A]}).map(_?N:C?P?M:N:$);function B(A){return a.stringRepeat(" ",A)}function N(A){return A[2]?B(O)+A[2]+B(E-A[2].length+k)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function M(A){return A[2]?B(O+E-A[2].length)+A[2]+B(k)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function $(A){return A[2]?B(O)+A[2]+B(k)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(m.prototype);function w(T,_){return T.row==_.row&&T.column==_.column}r.onSessionChange=function(T){var _=T.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=T.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=r.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",s),T.commands.addCommands(l.defaultCommands),R(T))}function R(T){if(!T.textInput)return;var _=T.textInput.getElement(),C=!1;d.addListener(_,"keydown",function(O){var E=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);T.$blockSelectEnabled&&E?C||(T.renderer.setMouseCursor("crosshair"),C=!0):C&&P()},T),d.addListener(_,"keyup",P,T),d.addListener(_,"blur",P,T);function P(O){C&&(T.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,t("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(T){x(this),T?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,r,c){var u=t("../../range").Range,g=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(v,s,d){var a=v.getLine(d);return this.foldingStartMarker.test(a)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(v,s,d){return null},this.indentationBlock=function(v,s,d){var a=/\S/,l=v.getLine(s),h=l.search(a);if(h!=-1){for(var p=d||l.length,o=v.getLength(),f=s,m=s;++s<o;){var w=v.getLine(s).search(a);if(w!=-1){if(w<=h){var x=v.getTokenAt(s,0);if(!x||x.type!=="string")break}m=s}}if(m>f){var R=v.getLine(m).length;return new u(f,p,m,R)}}},this.openingBracketBlock=function(v,s,d,a,l){var h={row:d,column:a+1},p=v.$findClosingBracket(s,h,l);if(p){var o=v.foldWidgets[p.row];return o==null&&(o=v.getFoldWidget(p.row)),o=="start"&&p.row>h.row&&(p.row--,p.column=v.getLine(p.row).length),u.fromPoints(h,p)}},this.closingBracketBlock=function(v,s,d,a,l){var h={row:d,column:a},p=v.$findOpeningBracket(s,h);if(p)return p.column++,h.column--,u.fromPoints(p,h)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,r,c){var u=t("../lib/dom"),g=t("../range").Range,v=t("../config").nls;function s(a,l,h){for(var p=0,o=a.length-1;p<=o;){var f=p+o>>1,m=h(l,a[f]);if(m>0)p=f+1;else if(m<0)o=f-1;else return f}return-(p+1)}function d(a,l,h){var p=a.getAnnotations().sort(g.comparePoints);if(p.length){var o=s(p,{row:l,column:-1},g.comparePoints);o<0&&(o=-o-1),o>=p.length?o=h>0?0:p.length-1:o===0&&h<0&&(o=p.length-1);var f=p[o];if(!(!f||!h)){if(f.row===l){do f=p[o+=h];while(f&&f.row===l);if(!f)return p.slice()}var m=[];l=f.row;do m[h<0?"unshift":"push"](f),f=p[o+=h];while(f&&f.row==l);return m.length&&m}}}r.showErrorMarker=function(a,l){var h=a.session,p=a.getCursorPosition(),o=p.row,f=h.widgetManager.getWidgetsAtRow(o).filter(function(O){return O.type=="errorMarker"})[0];f?f.destroy():o-=l;var m=d(h,o,l),w;if(m){var x=m[0];p.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,p.row=x.row,w=a.renderer.$gutterLayer.$annotations[p.row]}else{if(f)return;w={displayText:[v("error-marker.good-state","Looks good!")],className:"ace_ok"}}a.session.unfold(p.row),a.selection.moveToPosition(p);var R={row:p.row,fixedWidth:!0,coverGutter:!0,el:u.createElement("div"),type:"errorMarker"},T=R.el.appendChild(u.createElement("div")),_=R.el.appendChild(u.createElement("div"));_.className="error_widget_arrow "+w.className;var C=a.renderer.$cursorLayer.getPixelPosition(p).left;_.style.left=C+a.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",T.className="error_widget "+w.className,w.displayText.forEach(function(O,E){T.appendChild(u.createTextNode(O)),E<w.displayText.length-1&&T.appendChild(u.createElement("br"))}),T.appendChild(u.createElement("div"));var P=function(O,E,k){if(E===0&&(k==="esc"||k==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(P),h.widgetManager.removeLineWidget(R),a.off("changeSelection",R.destroy),a.off("changeSession",R.destroy),a.off("mouseup",R.destroy),a.off("change",R.destroy))},a.keyBinding.addKeyboardHandler(P),a.on("changeSelection",R.destroy),a.on("changeSession",R.destroy),a.on("mouseup",R.destroy),a.on("change",R.destroy),a.session.widgetManager.addLineWidget(R),R.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:R.el.offsetHeight})},u.importCssString(`
956
+ .error_widget_wrapper {
957
+ background: inherit;
958
+ color: inherit;
959
+ border:none
960
+ }
961
+ .error_widget {
962
+ border-top: solid 2px;
963
+ border-bottom: solid 2px;
964
+ margin: 5px 0;
965
+ padding: 10px 40px;
966
+ white-space: pre-wrap;
967
+ }
968
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
969
+ border-color: #ff5a5a
970
+ }
971
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
972
+ border-color: #F1D817
973
+ }
974
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
975
+ border-color: #5a5a5a
976
+ }
977
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
978
+ border-color: #5aaa5a
979
+ }
980
+ .error_widget_arrow {
981
+ position: absolute;
982
+ border: solid 5px;
983
+ border-top-color: transparent!important;
984
+ border-right-color: transparent!important;
985
+ border-left-color: transparent!important;
986
+ top: -5px;
987
+ }
988
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(t,r,c){t("./loader_build")(r);var u=t("./lib/dom"),g=t("./range").Range,v=t("./editor").Editor,s=t("./edit_session").EditSession,d=t("./undomanager").UndoManager,a=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),r.config=t("./config"),r.edit=function(h,p){if(typeof h=="string"){var o=h;if(h=document.getElementById(o),!h)throw new Error("ace.edit can't find div #"+o)}if(h&&h.env&&h.env.editor instanceof v)return h.env.editor;var f="";if(h&&/input|textarea/i.test(h.tagName)){var m=h;f=m.value,h=u.createElement("pre"),m.parentNode.replaceChild(h,m)}else h&&(f=h.textContent,h.innerHTML="");var w=r.createEditSession(f),x=new v(new a(h),w,p),R={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(R.textarea=m),x.on("destroy",function(){R.editor.container.env=null}),x.container.env=x.env=R,x},r.createEditSession=function(h,p){var o=new s(h,p);return o.setUndoManager(new d),o},r.Range=g,r.Editor=v,r.EditSession=s,r.UndoManager=d,r.VirtualRenderer=a;var l=r.config.version;r.version=l}),(function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=t);for(var c in t)t.hasOwnProperty(c)&&(r.ace[c]=t[c]);r.ace.default=r.ace,e&&(e.exports=r.ace)})})()})(Zv)),Zv.exports}var C3=ir("m",nT()),ey={exports:{}},ty;function rT(){return ty||(ty=1,(function(e,n){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var u=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var s=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},d=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},l=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},h=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},p=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"},f=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",x="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",R="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",T="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":R,"variable.language":T,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,P={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(O,E,k){k.length&&(k=[]);var B=O[O.length-1];return k.unshift(B,E),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},f,{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:/\?(?=.+:)/},h,p,v,s,o,d,a,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(O,E,k){var B=O[2]=="-"||O[2]=="~"?"indentedHeredoc":"heredoc",N=O.split(this.splitRegex);return k.push(B,N[3]),[{type:"constant",value:N[1]},{type:"string",value:N[2]},{type:"support.class",value:N[3]},{type:"string",value:N[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(O,E,k){return O===k[1]?(k.shift(),k.shift(),this.next=k[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(O,E,k){return O===k[1]?(k.shift(),k.shift(),this.next=k[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(O,E){return E[0]==="heredoc"||E[0]==="indentedHeredoc"?E[0]:O}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(O,E,k){return this.next="",O=="}"&&k.length>1&&k[1]!="start"&&(k.shift(),this.next=k.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,E),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(O,E,k){return k.length&&O===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,E),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(O,E,k){return k.length&&O===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,E),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(O,E,k){return k.length&&O===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,E),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(O,E,k){return k.length&&O===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(O,E,k){return k.length&&O===k[0]?(k.unshift(O,E),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(O,E,k){return k.length&&O[0]===P[k[0]]?(k.shift(),this.next=k.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};u.inherits(m,g),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,c){var u=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var d=v.getLine(s),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,h=v.findMatchingBracket({row:s,column:l});if(!h||h.row==s)return 0;var p=this.$getIndent(v.getLine(h.row));v.replace(new u(s,0,s,l-1),p)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(t,r,c){var u=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=t("../../range").Range,s=t("../../token_iterator").TokenIterator,d=r.FoldMode=function(){};u.inherits(d,g),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(a,l,h){var p=a.getLine(h),o=this.foldingStartMarker.test(p),f=this.foldingStopMarker.test(p);if(o&&!f){var m=p.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(p)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(p)===!1)||m[1]=="when"&&/\sthen\s/.test(p)===!0)return;if(a.getTokenAt(h,m.index+2).type==="keyword")return"start"}else if(!m[3]||a.getTokenAt(h,m.index+1).type==="comment.multiline")return"start"}if(l!="markbeginend"||!f||o&&f)return"";var m=p.match(this.foldingStopMarker);if(m[3]==="end"){if(a.getTokenAt(h,m.index+1).type==="keyword")return"end"}else if(!m[1]||a.getTokenAt(h,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(a,l,h){var p=a.doc.getLine(h),o=this.foldingStartMarker.exec(p);if(o)return o[1]||o[3]?this.rubyBlock(a,h,o.index+2):this.openingBracketBlock(a,"{",h,o.index);var o=this.foldingStopMarker.exec(p);if(o)return o[3]==="end"&&a.getTokenAt(h,o.index+1).type==="keyword"?this.rubyBlock(a,h,o.index+1):o[1]==="=end"&&a.getTokenAt(h,o.index+1).type==="comment.multiline"?this.rubyBlock(a,h,o.index+1):this.closingBracketBlock(a,"}",h,o.index+o[0].length)},this.rubyBlock=function(a,l,h,p){var o=new s(a,l,h),f=o.getCurrentToken();if(!(!f||f.type!="keyword"&&f.type!="comment.multiline")){var m=f.value,w=a.getLine(l);switch(f.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+f.value);if(!x.test(w))return;var R=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var R=1;break;case"else":var x=new RegExp("^\\s*"+f.value+"\\s*$");if(!x.test(w))return;var R=1;break;default:var R=this.indentKeywords[m]}var T=[m];if(R){var _=R===-1?a.getLine(l-1).length:a.getLine(l).length,C=l,P=[];if(P.push(o.getCurrentTokenRange()),o.step=R===-1?o.stepBackward:o.stepForward,f.type=="comment.multiline"){for(;f=o.step();)if(f.type==="comment.multiline"){if(R==1){if(_=6,f.value=="=end")break}else if(f.value=="=begin")break}}else for(;f=o.step();){var O=!1;if(f.type==="keyword"){var E=R*this.indentKeywords[f.value];switch(w=a.getLine(o.getCurrentTokenRow()),f.value){case"do":for(var k=o.$tokenIndex-1;k>=0;k--){var B=o.$rowTokens[k];if(B&&(B.value=="while"||B.value=="until"||B.value=="for")){E=0;break}}break;case"else":var x=new RegExp("^\\s*"+f.value+"\\s*$");(!x.test(w)||m=="case")&&(E=0,O=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+f.value);x.test(w)||(E=0,O=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(E=0,O=!0)}if(E>0)T.unshift(f.value);else if(E<=0&&O===!1){if(T.shift(),!T.length&&((m=="while"||m=="until"||m=="for")&&f.value!="do"||f.value=="do"&&R==-1&&E!=0||f.value!="do"))break;E===0&&T.unshift(f.value)}}}if(!f)return null;if(p)return P.push(o.getCurrentTokenRange()),P;var l=o.getCurrentTokenRow();if(R===-1){if(f.type==="comment.multiline")var N=6;else var N=a.getLine(l).length;return new v(l,N,C-1,_)}return new v(C,_,l-1,a.getLine(l-1).length)}}}}).call(d.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(t,r,c){var u=t("../lib/oop"),g=t("./text").Mode,v=t("./ruby_highlight_rules").RubyHighlightRules,s=t("./matching_brace_outdent").MatchingBraceOutdent,d=t("../range").Range,a=t("./folding/ruby").FoldMode,l=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};u.inherits(l,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,p,o){var f=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,h),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return f;if(h=="start"){var x=p.match(/^.*[\{\(\[]\s*$/),R=p.match(/^\s*(class|def|module)\s.*$/),T=p.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=p.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||R||T||_)&&(f+=o)}return f},this.checkOutdent=function(h,p,o){return/^\s+(end|else|rescue|ensure)$/.test(p+o)||this.$outdent.checkOutdent(p,o)},this.autoOutdent=function(h,p,o){var f=p.getLine(o);if(/}/.test(f))return this.$outdent.autoOutdent(p,o);var m=this.$getIndent(f),w=p.getLine(o-1),x=this.$getIndent(w),R=p.getTabString();x.length<=m.length&&m.slice(-R.length)==R&&p.remove(new d(o,m.length-R.length,o,m.length))},this.getMatching=function(h,p,o){if(p==null){var f=h.selection.lead;o=f.column,p=f.row}var m=h.getTokenAt(p,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(h,p,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/ruby"],function(t){e&&(e.exports=t)})})()})(ey)),ey.exports}rT();var ny={exports:{}},ry;function iT(){return ry||(ry=1,(function(e,n){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var u=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(){var s="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",d="True|False|None|NotImplemented|Ellipsis|__debug__",a="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",l=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":a,"variable.language":"self|cls","constant.language":d,keyword:s},"identifier"),h="[uU]?",p="[rR]",o="[fF]",f="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",R="(?:0[bB][01]+)",T="(?:"+m+"|"+w+"|"+x+"|"+R+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",P="(?:\\d+)",O="(?:(?:"+P+"?"+C+")|(?:"+P+"\\.))",E="(?:(?:"+O+"|"+P+")"+_+")",k="(?:"+E+"|"+O+")",B=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:h+'"{3}',next:"qqstring3"},{token:"string",regex:h+'"(?=.)',next:"qqstring"},{token:"string",regex:h+"'{3}",next:"qstring3"},{token:"string",regex:h+"'(?=.)",next:"qstring"},{token:"string",regex:p+'"{3}',next:"rawqqstring3"},{token:"string",regex:p+'"(?=.)',next:"rawqqstring"},{token:"string",regex:p+"'{3}",next:"rawqstring3"},{token:"string",regex:p+"'(?=.)",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:f+'"{3}',next:"rfqqstring3"},{token:"string",regex:f+'"(?=.)',next:"rfqqstring"},{token:"string",regex:f+"'{3}",next:"rfqstring3"},{token:"string",regex:f+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+k+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:k},{token:"constant.numeric",regex:T+"[lL]\\b"},{token:"constant.numeric",regex:T+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:l,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};u.inherits(v,g),r.PythonHighlightRules=v}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,c){var u=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=r.FoldMode=function(s){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+s+")(?:\\s*)(?:#.*)?$")};u.inherits(v,g),(function(){this.getFoldWidgetRange=function(s,d,a){var l=s.getLine(a),h=l.match(this.foldingStartMarker);if(h)return h[1]?this.openingBracketBlock(s,h[1],a,h.index):h[2]?this.indentationBlock(s,a,h.index+h[2].length):this.indentationBlock(s,a)}}).call(v.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(t,r,c){var u=t("../lib/oop"),g=t("./text").Mode,v=t("./python_highlight_rules").PythonHighlightRules,s=t("./folding/pythonic").FoldMode,d=t("../range").Range,a=function(){this.HighlightRules=v,this.foldingRules=new s("\\:"),this.$behaviour=this.$defaultBehaviour};u.inherits(a,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(h,p,o){var f=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,h),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return f;if(h=="start"){var x=p.match(/^.*[\{\(\[:]\s*$/);x&&(f+=o)}return f};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,p,o){if(o!==`\r
989
+ `&&o!=="\r"&&o!==`
990
+ `)return!1;var f=this.getTokenizer().getLineTokens(p.trim(),h).tokens;if(!f)return!1;do var m=f.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&l[m.value]:!1},this.autoOutdent=function(h,p,o){o+=1;var f=this.$getIndent(p.getLine(o)),m=p.getTabString();f.slice(-m.length)==m&&p.remove(new d(o,f.length-m.length,o,f.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/python"],function(t){e&&(e.exports=t)})})()})(ny)),ny.exports}iT();var iy={exports:{}},oy;function oT(){return oy||(oy=1,(function(e,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var u=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};u.inherits(v,g),r.JsonHighlightRules=v}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,c){var u=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var d=v.getLine(s),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,h=v.findMatchingBracket({row:s,column:l});if(!h||h.row==s)return 0;var p=this.$getIndent(v.getLine(h.row));v.replace(new u(s,0,s,l-1),p)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,c){var u=t("../../lib/oop"),g=t("../../range").Range,v=t("./fold_mode").FoldMode,s=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};u.inherits(s,v),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,a,l){var h=d.getLine(l);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var p=this._getFoldWidgetBase(d,a,l);return!p&&this.startRegionRe.test(h)?"start":p},this.getFoldWidgetRange=function(d,a,l,h){var p=d.getLine(l);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(d,p,l);var o=p.match(this.foldingStartMarker);if(o){var f=o.index;if(o[1])return this.openingBracketBlock(d,o[1],l,f);var m=d.getCommentFoldRange(l,f+o[0].length,1);return m&&!m.isMultiLine()&&(h?m=this.getSectionRange(d,l):a!="all"&&(m=null)),m}if(a!=="markbegin"){var o=p.match(this.foldingStopMarker);if(o){var f=o.index+o[0].length;return o[1]?this.closingBracketBlock(d,o[1],l,f):d.getCommentFoldRange(l,f,-1)}}},this.getSectionRange=function(d,a){var l=d.getLine(a),h=l.search(/\S/),p=a,o=l.length;a+=1;for(var f=a,m=d.getLength();++a<m;){l=d.getLine(a);var w=l.search(/\S/);if(w!==-1){if(h>w)break;var x=this.getFoldWidgetRange(d,"all",a);if(x){if(x.start.row<=p)break;if(x.isMultiLine())a=x.end.row;else if(h==w)break}f=a}}return new g(p,o,f,d.getLine(f).length)},this.getCommentRegionBlock=function(d,a,l){for(var h=a.search(/\s*$/),p=d.getLength(),o=l,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++l<p;){a=d.getLine(l);var w=f.exec(a);if(w&&(w[1]?m--:m++,!m))break}var x=l;if(x>o)return new g(o,h,x,a.length)}}).call(s.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(t,r,c){var u=t("../lib/oop"),g=t("./text").Mode,v=t("./json_highlight_rules").JsonHighlightRules,s=t("./matching_brace_outdent").MatchingBraceOutdent,d=t("./folding/cstyle").FoldMode,a=t("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new d};u.inherits(l,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(h,p,o){var f=this.$getIndent(p);if(h=="start"){var m=p.match(/^.*[\{\(\[]\s*$/);m&&(f+=o)}return f},this.checkOutdent=function(h,p,o){return this.$outdent.checkOutdent(p,o)},this.autoOutdent=function(h,p,o){this.$outdent.autoOutdent(p,o)},this.createWorker=function(h){var p=new a(["ace"],"ace/mode/json_worker","JsonWorker");return p.attachToDocument(h.getDocument()),p.on("annotate",function(o){h.setAnnotations(o.data)}),p.on("terminate",function(){h.clearAnnotations()}),p},this.$id="ace/mode/json"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/json"],function(t){e&&(e.exports=t)})})()})(iy)),iy.exports}oT();var sy={exports:{}},ay;function sT(){return ay||(ay=1,(function(e,n){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(t,r,c){var u=t("../lib/oop");t("../lib/lang");var g=t("./text_highlight_rules").TextHighlightRules,v=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",s=r.supportFunction="rgb|rgba|url|attr|counter|counters",d=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",a=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",p=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",f=function(){var m=this.createKeywordMapper({"support.function":s,"support.constant":d,"support.type":v,"support.constant.color":a,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{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:"("+h+")(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:h},{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:p},{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()};u.inherits(f,g),r.CssHighlightRules=f}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var u=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},v.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};u.inherits(v,g),v.getTagRule=function(s){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},v.getStartRule=function(s){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:s}},v.getEndRule=function(s){return{token:"comment.doc",regex:"\\*\\/",next:s}},r.JsDocCommentHighlightRules=v}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(t,r,c){function u(){var h=a.replace("\\d","\\d\\-"),p={onMatch:function(f,m,w){var x=f.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:f.slice(0,x)},{type:"meta.tag.tag-name.xml",value:f.substr(x)}]},regex:"</?(?:"+h+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(p);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,p,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(f,m,w){return m==w[0]&&w.shift(),f.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:f}]},nextState:"jsx"},o,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{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"}]},p],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(h){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var v=t("../lib/oop"),s=t("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,d=t("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",l=function(h){var p={"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(p,"identifier"),f="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(p).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[s.getStartRule("doc-start"),g("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{include:"numeric_constants"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+f+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),g("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{include:"numeric_constants"},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[g("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}],numeric_constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/},{token:"constant.numeric",regex:/(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(R,T,_){if(this.next=R=="{"?this.nextState:"",R=="{"&&_.length)_.unshift("start",T);else if(R=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return R=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=0)&&u.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};v.inherits(l,d),r.JavaScriptHighlightRules=l}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var u=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=function(s){var d="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+d+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:d},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+d+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+d+":)?"+d+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:d},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===v&&this.normalizeRules()};(function(){this.embedTagRules=function(s,d,a){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(<)("+a+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:d+"start"}]}),this.$rules[a+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,h,p){return p.splice(0),this.token}}],this.embedRules(s,d,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(</)("+a+"(?=\\s|>|$))",next:a+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(g.prototype),u.inherits(v,g),r.XmlHighlightRules=v}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(t,r,c){var u=t("../lib/oop"),g=t("../lib/lang"),v=t("./css_highlight_rules").CssHighlightRules,s=t("./javascript_highlight_rules").JavaScriptHighlightRules,d=t("./xml_highlight_rules").XmlHighlightRules,a=g.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),l=function(){d.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(h,p){var o=a[p];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(v,"css-","style"),this.embedTagRules(new s({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};u.inherits(l,d),r.HtmlHighlightRules=l}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(t,r,c){var u=t("../config").$modes,g=t("../lib/oop"),v=t("../lib/lang"),s=t("./text_highlight_rules").TextHighlightRules,d=t("./html_highlight_rules").HtmlHighlightRules,a=function(h){return"(?:[^"+v.escapeRegExp(h)+"\\\\]|\\\\.)*"},l=function(){d.call(this);var h={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,f,m,w){var x=o.match(/^(\s*)([`~]+)(.*)/),R=/[\w-]+|$/.exec(x[3])[0];return u[R]||(R=""),m.unshift("githubblock",[],[x[1],x[2],R],f),this.token},next:"githubblock"},p=[{token:"support.function",regex:".*",onMatch:function(o,f,m,w){var x=m[1],R=m[2][0],T=m[2][1],_=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<R.length+3&&C[2].length>=T.length&&C[2][0]==T[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",_&&u[_]){var P=u[_].getTokenizer().getLineTokens(o,x.slice(0));return m[1]=P.state,P.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},h,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+a('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},h,{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:p}),this.normalizeRules()};g.inherits(l,s),r.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(t,r,c){var u=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=t("../../range").Range,s=r.FoldMode=function(){};u.inherits(s,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(d,a,l){var h=d.getLine(l);return this.foldingStartMarker.test(h)?h[0]=="`"&&d.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(d,a,l){function h(O){return R=d.getTokens(O)[0],R&&R.type.lastIndexOf(T,0)===0}function p(){var O=R.value[0];return O=="="?6:O=="-"?5:7-R.value.search(/[^#]|$/)}var o=d.getLine(l),f=o.length,m=d.getLength(),w=l,x=l;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(d.bgTokenizer.getState(l)!=="start"){for(;++l<m&&(o=d.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new v(w,f,l,0)}for(;l-- >0&&(o=d.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new v(l,o.length,w,0)}var R,T="markup.heading";if(h(l)){for(var _=p();++l<m;)if(h(l)){var C=p();if(C>=_)break}if(x=l-(!R||["=","-"].indexOf(R.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(d.getLine(x));)x--;if(x>w){var P=d.getLine(x).length;return new v(w,f,x,P)}}}}}).call(s.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,c){var u=t("../range").Range,g=function(){};(function(){this.checkOutdent=function(v,s){return/^\s+$/.test(v)?/^\s*\}/.test(s):!1},this.autoOutdent=function(v,s){var d=v.getLine(s),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,h=v.findMatchingBracket({row:s,column:l});if(!h||h.row==s)return 0;var p=this.$getIndent(v.getLine(h.row));v.replace(new u(s,0,s,l-1),p)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(t,r,c){function u(a,l){return a&&a.type.lastIndexOf(l+".xml")>-1}var g=t("../../lib/oop"),v=t("../behaviour").Behaviour,s=t("../../token_iterator").TokenIterator,d=function(){this.add("string_dquotes","insertion",function(a,l,h,p,o){if(o=='"'||o=="'"){var f=o,m=p.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:f+m+f,selection:!1};var w=h.getCursorPosition(),x=p.doc.getLine(w.row),R=x.substring(w.column,w.column+1),T=new s(p,w.row,w.column),_=T.getCurrentToken();if(R==f&&(u(_,"attribute-value")||u(_,"string")))return{text:"",selection:[1,1]};if(_||(_=T.stepBackward()),!_)return;for(;u(_,"tag-whitespace")||u(_,"whitespace");)_=T.stepBackward();var C=!R||R.match(/\s/);if(u(_,"attribute-equals")&&(C||R==">")||u(_,"decl-attribute-equals")&&(C||R=="?"))return{text:f+f,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,l,h,p,o){var f=p.doc.getTextRange(o);if(!o.isMultiLine()&&(f=='"'||f=="'")){var m=p.doc.getLine(o.start.row),w=m.substring(o.start.column+1,o.start.column+2);if(w==f)return o.end.column++,o}}),this.add("autoclosing","insertion",function(a,l,h,p,o){if(o==">"){var f=h.getSelectionRange().start,m=new s(p,f.row,f.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(u(w,"tag-name")||u(w,"tag-whitespace")||u(w,"attribute-name")||u(w,"attribute-equals")||u(w,"attribute-value"))||u(w,"reference.attribute-value"))return;if(u(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(f.column<x)return;if(f.column==x){var R=m.stepForward();if(R&&u(R,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(p.getLine(f.row).slice(f.column)))return;for(;!u(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var T=m.getCurrentTokenRow(),_=m.getCurrentTokenColumn();if(u(m.stepBackward(),"end-tag-open"))return;var C=w.value;return T==f.row&&(C=C.substring(0,f.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,l,h,p,o){if(o==`
991
+ `){var f=h.getCursorPosition(),m=p.getLine(f.row),w=new s(p,f.row,f.column),x=w.getCurrentToken();if(u(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=w.stepBackward();if(!x)return;var R=x.value,T=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[R]||!this.voidElements){var _=p.getTokenAt(f.row,f.column+1),m=p.getLine(T),C=this.$getIndent(m),P=C+p.getTabString();return _&&_.value==="</"?{text:`
992
+ `+P+`
993
+ `+C,selection:[1,P.length,1,P.length]}:{text:`
994
+ `+P}}}}})};g.inherits(d,v),r.XmlBehaviour=d}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(t,r,c){var u=t("../../lib/oop"),g=t("../../token_iterator").TokenIterator,v=t("../behaviour/cstyle").CstyleBehaviour,s=t("../behaviour/xml").XmlBehaviour,d=function(){var a=new s({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(v),this.add("autoclosing-fragment","insertion",function(l,h,p,o,f){if(f==">"){var m=p.getSelectionRange().start,w=new g(o,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};u.inherits(d,v),r.JavaScriptBehaviour=d}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,c){function u(l,h){return l&&l.type&&l.type.lastIndexOf(h+".xml")>-1}var g=t("../../lib/oop"),v=t("../../range").Range,s=t("./fold_mode").FoldMode,d=r.FoldMode=function(l,h){s.call(this),this.voidElements=l||{},this.optionalEndTags=g.mixin({},this.voidElements),h&&g.mixin(this.optionalEndTags,h)};g.inherits(d,s);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(l,h,p){var o=this._getFirstTagInLine(l,p);return o?o.closing||!o.tagName&&o.selfClosing?h==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(l,p,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(l,p)},this.getCommentFoldWidget=function(l,h){return/comment/.test(l.getState(h))&&/<!-/.test(l.getLine(h))?"start":""},this._getFirstTagInLine=function(l,h){for(var p=l.getTokens(h),o=new a,f=0;f<p.length;f++){var m=p[f];if(u(m,"tag-open")){if(o.end.column=o.start.column+m.value.length,o.closing=u(m,"end-tag-open"),m=p[++f],!m)return null;if(o.tagName=m.value,m.value===""){if(m=p[++f],!m)return null;o.tagName=m.value}for(o.end.column+=m.value.length,f++;f<p.length;f++)if(m=p[f],o.end.column+=m.value.length,u(m,"tag-close")){o.selfClosing=m.value=="/>";break}return o}if(u(m,"tag-close"))return o.selfClosing=m.value=="/>",o;o.start.column+=m.value.length}return null},this._findEndTagInLine=function(l,h,p,o){for(var f=l.getTokens(h),m=0,w=0;w<f.length;w++){var x=f[w];if(m+=x.value.length,!(m<o-1)&&u(x,"end-tag-open")&&(x=f[w+1],u(x,"tag-name")&&x.value===""&&(x=f[w+2]),x&&x.value==p))return!0}return!1},this.getFoldWidgetRange=function(l,h,p){var o=this._getFirstTagInLine(l,p);if(!o)return this.getCommentFoldWidget(l,p)&&l.getCommentFoldRange(p,l.getLine(p).length);var f=l.getMatchingTags({row:p,column:0});if(f){var m=f.openTag.start.row;return new v(m,l.getLine(m).length,f.closeTag.start.row,f.closeTag.start.column)}}}).call(d.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,c){var u=t("../../lib/oop"),g=t("../../range").Range,v=t("./fold_mode").FoldMode,s=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};u.inherits(s,v),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,a,l){var h=d.getLine(l);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var p=this._getFoldWidgetBase(d,a,l);return!p&&this.startRegionRe.test(h)?"start":p},this.getFoldWidgetRange=function(d,a,l,h){var p=d.getLine(l);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(d,p,l);var o=p.match(this.foldingStartMarker);if(o){var f=o.index;if(o[1])return this.openingBracketBlock(d,o[1],l,f);var m=d.getCommentFoldRange(l,f+o[0].length,1);return m&&!m.isMultiLine()&&(h?m=this.getSectionRange(d,l):a!="all"&&(m=null)),m}if(a!=="markbegin"){var o=p.match(this.foldingStopMarker);if(o){var f=o.index+o[0].length;return o[1]?this.closingBracketBlock(d,o[1],l,f):d.getCommentFoldRange(l,f,-1)}}},this.getSectionRange=function(d,a){var l=d.getLine(a),h=l.search(/\S/),p=a,o=l.length;a+=1;for(var f=a,m=d.getLength();++a<m;){l=d.getLine(a);var w=l.search(/\S/);if(w!==-1){if(h>w)break;var x=this.getFoldWidgetRange(d,"all",a);if(x){if(x.start.row<=p)break;if(x.isMultiLine())a=x.end.row;else if(h==w)break}f=a}}return new g(p,o,f,d.getLine(f).length)},this.getCommentRegionBlock=function(d,a,l){for(var h=a.search(/\s*$/),p=d.getLength(),o=l,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++l<p;){a=d.getLine(l);var w=f.exec(a);if(w&&(w[1]?m--:m++,!m))break}var x=l;if(x>o)return new g(o,h,x,a.length)}}).call(s.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(t,r,c){var u=t("../../lib/oop"),g=t("./xml").FoldMode,v=t("./cstyle").FoldMode,s=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end))),this.xmlFoldMode=new g};u.inherits(s,v),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,a,l){var h=this.getFoldWidgetBase(d,a,l);return h||this.xmlFoldMode.getFoldWidget(d,a,l)},this.getFoldWidgetRange=function(d,a,l,h){var p=this.getFoldWidgetRangeBase(d,a,l,h);return p||this.xmlFoldMode.getFoldWidgetRange(d,a,l)}}).call(s.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(t,r,c){var u=t("../lib/oop"),g=t("./text").Mode,v=t("./javascript_highlight_rules").JavaScriptHighlightRules,s=t("./matching_brace_outdent").MatchingBraceOutdent,d=t("../worker/worker_client").WorkerClient,a=t("./behaviour/javascript").JavaScriptBehaviour,l=t("./folding/javascript").FoldMode,h=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};u.inherits(h,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(p,o,f){var m=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,p),x=w.tokens,R=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(p=="start"||p=="no_regex"){var T=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);T&&(m+=f)}else if(p=="doc-start"&&(R=="start"||R=="no_regex"))return"";return m},this.checkOutdent=function(p,o,f){return this.$outdent.checkOutdent(o,f)},this.autoOutdent=function(p,o,f){this.$outdent.autoOutdent(o,f)},this.createWorker=function(p){var o=new d(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(p.getDocument()),o.on("annotate",function(f){p.setAnnotations(f.data)}),o.on("terminate",function(){p.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(t,r,c){var u={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},g=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var v=document.createElement("c").style;for(var s in v)if(typeof v[s]=="string"){var d=s.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});u.hasOwnProperty(d)||(u[d]=1)}}this.completionsDefined=!0},this.getCompletions=function(v,s,d,a){if(this.completionsDefined||this.defineCompletions(),v==="ruleset"||s.$mode.$id=="ace/mode/scss"){var l=s.getLine(d.row).substr(0,d.column),h=/\([^)]*$/.test(l);return h&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?this.getPropertyValueCompletions(v,s,d,a):this.getPropertyCompletions(v,s,d,a,h)}return[]},this.getPropertyCompletions=function(v,s,d,a,l){l=l||!1;var h=Object.keys(u);return h.map(function(p){return{caption:p,snippet:p+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(v,s,d,a){var l=s.getLine(d.row).substr(0,d.column),h=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!h)return[];var p=[];return h in u&&typeof u[h]=="object"&&(p=Object.keys(u[h])),p.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(g.prototype),r.CssCompletions=g}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(t,r,c){var u=t("../../lib/oop");t("../behaviour").Behaviour;var g=t("./cstyle").CstyleBehaviour,v=t("../../token_iterator").TokenIterator,s=function(){this.inherit(g),this.add("colon","insertion",function(d,a,l,h,p){if(p===":"&&l.selection.isEmpty()){var o=l.getCursorPosition(),f=new v(h,o.row,o.column),m=f.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=f.stepBackward()),m&&m.type==="support.type"){var w=h.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(d,a,l,h,p){var o=h.doc.getTextRange(p);if(!p.isMultiLine()&&o===":"){var f=l.getCursorPosition(),m=new v(h,f.row,f.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=h.doc.getLine(p.start.row),R=x.substring(p.end.column,p.end.column+1);if(R===";")return p.end.column++,p}}}),this.add("semicolon","insertion",function(d,a,l,h,p){if(p===";"&&l.selection.isEmpty()){var o=l.getCursorPosition(),f=h.doc.getLine(o.row),m=f.substring(o.column,o.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(d,a,l,h,p){if(p==="!"&&l.selection.isEmpty()){var o=l.getCursorPosition(),f=h.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(f.substring(o.column)))return{text:"!important",selection:[10,10]}}})};u.inherits(s,g),r.CssBehaviour=s}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(t,r,c){var u=t("../lib/oop"),g=t("./text").Mode,v=t("./css_highlight_rules").CssHighlightRules,s=t("./matching_brace_outdent").MatchingBraceOutdent,d=t("../worker/worker_client").WorkerClient,a=t("./css_completions").CssCompletions,l=t("./behaviour/css").CssBehaviour,h=t("./folding/cstyle").FoldMode,p=function(){this.HighlightRules=v,this.$outdent=new s,this.$behaviour=new l,this.$completer=new a,this.foldingRules=new h};u.inherits(p,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,f,m){var w=this.$getIndent(f),x=this.getTokenizer().getLineTokens(f,o).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var R=f.match(/^.*\{\s*$/);return R&&(w+=m),w},this.checkOutdent=function(o,f,m){return this.$outdent.checkOutdent(f,m)},this.autoOutdent=function(o,f,m){this.$outdent.autoOutdent(f,m)},this.getCompletions=function(o,f,m,w){return this.$completer.getCompletions(o,f,m,w)},this.createWorker=function(o){var f=new d(["ace"],"ace/mode/css_worker","Worker");return f.attachToDocument(o.getDocument()),f.on("annotate",function(m){o.setAnnotations(m.data)}),f.on("terminate",function(){o.clearAnnotations()}),f},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(p.prototype),r.Mode=p}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,c){var u=t("../../lib/oop"),g=t("./fold_mode").FoldMode,v=r.FoldMode=function(s,d){this.defaultMode=s,this.subModes=d};u.inherits(v,g),(function(){this.$getMode=function(s){typeof s!="string"&&(s=s[0]);for(var d in this.subModes)if(s.indexOf(d)===0)return this.subModes[d];return null},this.$tryMode=function(s,d,a,l){var h=this.$getMode(s);return h?h.getFoldWidget(d,a,l):""},this.getFoldWidget=function(s,d,a){return this.$tryMode(s.getState(a-1),s,d,a)||this.$tryMode(s.getState(a),s,d,a)||this.defaultMode.getFoldWidget(s,d,a)},this.getFoldWidgetRange=function(s,d,a){var l=this.$getMode(s.getState(a-1));return(!l||!l.getFoldWidget(s,d,a))&&(l=this.$getMode(s.getState(a))),(!l||!l.getFoldWidget(s,d,a))&&(l=this.defaultMode),l.getFoldWidgetRange(s,d,a)}}).call(v.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(t,r,c){var u=t("../../lib/oop"),g=t("./mixed").FoldMode,v=t("./xml").FoldMode,s=t("./cstyle").FoldMode,d=r.FoldMode=function(a,l){g.call(this,new v(a,l),{"js-":new s,"css-":new s})};u.inherits(d,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(t,r,c){function u(f,m){return f.type.lastIndexOf(m+".xml")>-1}function g(f,m){for(var w=new s(f,m.row,m.column),x=w.getCurrentToken();x&&!u(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function v(f,m){for(var w=new s(f,m.row,m.column),x=w.getCurrentToken();x&&!u(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var s=t("../token_iterator").TokenIterator,d=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],a=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=d.concat(a),h={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:{}},p=Object.keys(h),o=function(){};(function(){this.getCompletions=function(f,m,w,x){var R=m.getTokenAt(w.row,w.column);if(!R)return[];if(u(R,"tag-name")||u(R,"tag-open")||u(R,"end-tag-open"))return this.getTagCompletions(f,m,w,x);if(u(R,"tag-whitespace")||u(R,"attribute-name"))return this.getAttributeCompletions(f,m,w,x);if(u(R,"attribute-value"))return this.getAttributeValueCompletions(f,m,w,x);var T=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(T)?this.getHTMLEntityCompletions(f,m,w,x):[]},this.getTagCompletions=function(f,m,w,x){return p.map(function(R){return{value:R,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(f,m,w,x){var R=g(m,w);if(!R)return[];var T=l;return R in h&&(T=T.concat(Object.keys(h[R]))),T.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(f,m,w,x){var R=g(m,w),T=v(m,w);if(!R)return[];var _=[];return R in h&&T in h[R]&&typeof h[R][T]=="object"&&(_=Object.keys(h[R][T])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(f,m,w,x){var R=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return R.map(function(T){return{caption:T,snippet:T,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(t,r,c){var u=t("../lib/oop"),g=t("../lib/lang"),v=t("./text").Mode,s=t("./javascript").Mode,d=t("./css").Mode,a=t("./html_highlight_rules").HtmlHighlightRules,l=t("./behaviour/xml").XmlBehaviour,h=t("./folding/html").FoldMode,p=t("./html_completions").HtmlCompletions,o=t("../worker/worker_client").WorkerClient,f=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=a,this.$behaviour=new l,this.$completer=new p,this.createModeDelegates({"js-":s,"css-":d}),this.foldingRules=new h(this.voidElements,g.arrayToMap(m))};u.inherits(w,v),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(f),this.getNextLineIndent=function(x,R,T){return this.$getIndent(R)},this.checkOutdent=function(x,R,T){return!1},this.getCompletions=function(x,R,T,_){return this.$completer.getCompletions(x,R,T,_)},this.createWorker=function(x){if(this.constructor==w){var R=new o(["ace"],"ace/mode/html_worker","Worker");return R.attachToDocument(x.getDocument()),this.fragmentContext&&R.call("setOptions",[{context:this.fragmentContext}]),R.on("error",function(T){x.setAnnotations(T.data)}),R.on("terminate",function(){x.clearAnnotations()}),R}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,c){var u=t("../lib/oop"),g=t("./text_highlight_rules").TextHighlightRules,v=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",s=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",d=function(){var a=this.createKeywordMapper({keyword:v,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",h="(?:\\.\\d+)",p="(?:\\d+)",o="(?:(?:"+p+"?"+h+")|(?:"+p+"\\.))",f="(?:(?:"+o+"|"+p+"))",m="(?:"+f+"|"+o+")",w="(?:&"+p+")",x="[a-zA-Z_][a-zA-Z0-9_]*",R="(?:"+x+"(?==))",T="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,P,O){var E=C[2]=="-"?"indentedHeredoc":"heredoc",k=C.split(this.splitRegex);return O.push(E,k[4]),[{type:"constant",value:k[1]},{type:"text",value:k[2]},{type:"string",value:k[3]},{type:"support.class",value:k[4]},{type:"string",value:k[5]}]},rules:{heredoc:[{onMatch:function(C,P,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,P,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,P){return P[0]==="heredoc"||P[0]==="indentedHeredoc"?P[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:T},{token:"variable",regex:R},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:l+"\\b"},{token:a,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};u.inherits(d,g),r.ShHighlightRules=d}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(t,r,c){var u=t("../lib/oop"),g=t("./text").Mode,v=t("./sh_highlight_rules").ShHighlightRules,s=t("../range").Range,d=t("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=v,this.foldingRules=new d,this.$behaviour=this.$defaultBehaviour};u.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,p,o){var f=this.$getIndent(p),m=this.getTokenizer().getLineTokens(p,h),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return f;if(h=="start"){var x=p.match(/^.*[\{\(\[:]\s*$/);x&&(f+=o)}return f};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,p,o){if(o!==`\r
995
+ `&&o!=="\r"&&o!==`
996
+ `)return!1;var f=this.getTokenizer().getLineTokens(p.trim(),h).tokens;if(!f)return!1;do var m=f.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&l[m.value]:!1},this.autoOutdent=function(h,p,o){o+=1;var f=this.$getIndent(p.getLine(o)),m=p.getTabString();f.slice(-m.length)==m&&p.remove(new s(o,f.length-m.length,o,f.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(a.prototype),r.Mode=a}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(t,r,c){var u=t("../lib/oop"),g=t("../lib/lang"),v=t("./text").Mode,s=t("./xml_highlight_rules").XmlHighlightRules,d=t("./behaviour/xml").XmlBehaviour,a=t("./folding/xml").FoldMode,l=t("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=s,this.$behaviour=new d,this.foldingRules=new a};u.inherits(h,v),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(p){var o=new l(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(p.getDocument()),o.on("error",function(f){p.setAnnotations(f.data)}),o.on("terminate",function(){p.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(t,r,c){var u=t("../lib/oop"),g=t("./behaviour/cstyle").CstyleBehaviour,v=t("./text").Mode,s=t("./markdown_highlight_rules").MarkdownHighlightRules,d=t("./folding/markdown").FoldMode,a=function(){this.HighlightRules=s,this.createModeDelegates({javascript:t("./javascript").Mode,html:t("./html").Mode,bash:t("./sh").Mode,sh:t("./sh").Mode,xml:t("./xml").Mode,css:t("./css").Mode}),this.foldingRules=new d,this.$behaviour=new g({braces:!0})};u.inherits(a,v),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,h,p){if(l=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(h);if(!o)return"";var f=o[2];return f||(f=parseInt(o[3],10)+1+"."),o[1]+f+o[4]}return this.$getIndent(h)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/markdown"],function(t){e&&(e.exports=t)})})()})(sy)),sy.exports}sT();var ly={exports:{}},cy;function aT(){return cy||(cy=1,(function(e,n){ace.define("ace/theme/twilight-css",["require","exports","module"],function(t,r,c){c.exports=`.ace-twilight .ace_gutter {
997
+ background: #232323;
998
+ color: #E2E2E2
999
+ }
1000
+
1001
+ .ace-twilight .ace_print-margin {
1002
+ width: 1px;
1003
+ background: #232323
1004
+ }
1005
+
1006
+ .ace-twilight {
1007
+ background-color: #141414;
1008
+ color: #F8F8F8
1009
+ }
1010
+
1011
+ .ace-twilight .ace_cursor {
1012
+ color: #A7A7A7
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_selection {
1016
+ background: rgba(221, 240, 255, 0.20)
1017
+ }
1018
+
1019
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1020
+ box-shadow: 0 0 3px 0px #141414;
1021
+ }
1022
+
1023
+ .ace-twilight .ace_marker-layer .ace_step {
1024
+ background: rgb(102, 82, 0)
1025
+ }
1026
+
1027
+ .ace-twilight .ace_marker-layer .ace_bracket {
1028
+ margin: -1px 0 0 -1px;
1029
+ border: 1px solid rgba(255, 255, 255, 0.25)
1030
+ }
1031
+
1032
+ .ace-twilight .ace_marker-layer .ace_active-line {
1033
+ background: rgba(255, 255, 255, 0.031)
1034
+ }
1035
+
1036
+ .ace-twilight .ace_gutter-active-line {
1037
+ background-color: rgba(255, 255, 255, 0.031)
1038
+ }
1039
+
1040
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1041
+ border: 1px solid rgba(221, 240, 255, 0.20)
1042
+ }
1043
+
1044
+ .ace-twilight .ace_invisible {
1045
+ color: rgba(255, 255, 255, 0.25)
1046
+ }
1047
+
1048
+ .ace-twilight .ace_keyword,
1049
+ .ace-twilight .ace_meta {
1050
+ color: #CDA869
1051
+ }
1052
+
1053
+ .ace-twilight .ace_constant,
1054
+ .ace-twilight .ace_constant.ace_character,
1055
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1056
+ .ace-twilight .ace_constant.ace_other,
1057
+ .ace-twilight .ace_heading,
1058
+ .ace-twilight .ace_markup.ace_heading,
1059
+ .ace-twilight .ace_support.ace_constant {
1060
+ color: #CF6A4C
1061
+ }
1062
+
1063
+ .ace-twilight .ace_invalid.ace_illegal {
1064
+ color: #F8F8F8;
1065
+ background-color: rgba(86, 45, 86, 0.75)
1066
+ }
1067
+
1068
+ .ace-twilight .ace_invalid.ace_deprecated {
1069
+ text-decoration: underline;
1070
+ font-style: italic;
1071
+ color: #D2A8A1
1072
+ }
1073
+
1074
+ .ace-twilight .ace_support {
1075
+ color: #9B859D
1076
+ }
1077
+
1078
+ .ace-twilight .ace_fold {
1079
+ background-color: #AC885B;
1080
+ border-color: #F8F8F8
1081
+ }
1082
+
1083
+ .ace-twilight .ace_support.ace_function {
1084
+ color: #DAD085
1085
+ }
1086
+
1087
+ .ace-twilight .ace_list,
1088
+ .ace-twilight .ace_markup.ace_list,
1089
+ .ace-twilight .ace_storage {
1090
+ color: #F9EE98
1091
+ }
1092
+
1093
+ .ace-twilight .ace_entity.ace_name.ace_function,
1094
+ .ace-twilight .ace_meta.ace_tag {
1095
+ color: #AC885B
1096
+ }
1097
+
1098
+ .ace-twilight .ace_string {
1099
+ color: #8F9D6A
1100
+ }
1101
+
1102
+ .ace-twilight .ace_string.ace_regexp {
1103
+ color: #E9C062
1104
+ }
1105
+
1106
+ .ace-twilight .ace_comment {
1107
+ font-style: italic;
1108
+ color: #5F5A60
1109
+ }
1110
+
1111
+ .ace-twilight .ace_variable {
1112
+ color: #7587A6
1113
+ }
1114
+
1115
+ .ace-twilight .ace_xml-pe {
1116
+ color: #494949
1117
+ }
1118
+
1119
+ .ace-twilight .ace_indent-guide {
1120
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1121
+ }
1122
+
1123
+ .ace-twilight .ace_indent-guide-active {
1124
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1125
+ }
1126
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(t,r,c){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=t("./twilight-css");var u=t("../lib/dom");u.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(t){e&&(e.exports=t)})})()})(ly)),ly.exports}aT();var uy={exports:{}},hy;function lT(){return hy||(hy=1,(function(e,n){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(t,r,c){function u(C){var P=new Date().toLocaleString("en-us",C);return P.length==1?"0"+P:P}var g=t("./lib/dom"),v=t("./lib/oop"),s=t("./lib/event_emitter").EventEmitter,d=t("./lib/lang"),a=t("./range").Range,l=t("./range_list").RangeList,h=t("./keyboard/hash_handler").HashHandler,p=t("./tokenizer").Tokenizer,o=t("./clipboard"),f={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,P,O){var E=C.session.getTextRange();return O?E.replace(/\n\r?([ \t]*\S)/g,`
1127
+ `+O+"$1"):E},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var P=C.session.$mode||{};return P.blockComment&&P.blockComment.start||""},BLOCK_COMMENT_END:function(C){var P=C.session.$mode||{};return P.blockComment&&P.blockComment.end||""},LINE_COMMENT:function(C){var P=C.session.$mode||{};return P.lineCommentStart||""},CURRENT_YEAR:u.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:u.bind(null,{year:"2-digit"}),CURRENT_MONTH:u.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:u.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:u.bind(null,{month:"short"}),CURRENT_DATE:u.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:u.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:u.bind(null,{weekday:"short"}),CURRENT_HOUR:u.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:u.bind(null,{minute:"2-digit"}),CURRENT_SECOND:u.bind(null,{second:"2-digit"})};f.SELECTED_TEXT=f.SELECTION;var m=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=f}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function P(k){return k=k.substr(1),/^\d+$/.test(k)?[{tabstopId:parseInt(k,10)}]:[{text:k}]}function O(k){return"(?:[^\\\\"+k+"]|\\\\.)"}var E={regex:"/("+O("/")+"+)/",onMatch:function(k,B,N){var M=N[0];return M.fmtString=!0,M.guard=k.slice(1,-1),M.flag="",""},next:"formatString"};return C.$tokenizer=new p({start:[{regex:/\\./,onMatch:function(k,B,N){var M=k[1];return(M=="}"&&N.length||"`$\\".indexOf(M)!=-1)&&(k=M),[k]}},{regex:/}/,onMatch:function(k,B,N){return[N.length?N.shift():k]}},{regex:/\$(?:\d+|\w+)/,onMatch:P},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(k,B,N){var M=P(k.substr(1));return N.unshift(M[0]),M},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+O("\\|")+"*\\|",onMatch:function(k,B,N){var M=k.slice(1,-1).replace(/\\[,|\\]|,/g,function($){return $.length==2?$[1]:"\0"}).split("\0").map(function($){return{value:$}});return N[0].choices=M,[M[0]]},next:"start"},E,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(k,B,N){return N.length&&N[0].expectElse?(N[0].expectElse=!1,N[0].ifEnd={elseEnd:N[0]},[N[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(k,B,N){var M=k[1];return M=="}"&&N.length||"`$\\".indexOf(M)!=-1?k=M:M=="n"?k=`
1128
+ `:M=="t"?k=" ":"ulULE".indexOf(M)!=-1&&(k={changeCase:M,local:M>"a"}),[k]}},{regex:"/\\w*}",onMatch:function(k,B,N){var M=N.shift();return M&&(M.flag=k.slice(1,-1)),this.next=M&&M.tabstopId?"start":"",[M||k]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(k,B,N){return[{text:k.slice(1)}]}},{regex:/\${\w+/,onMatch:function(k,B,N){var M={text:k.slice(2)};return N.unshift(M),[M]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(k,B,N){var M=N.shift();return this.next=M&&M.tabstopId?"start":"",[M||k]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(k,B,N){var M=N[0];return M.formatFunction=k.slice(2,-1),[N.shift()]},next:"formatString"},E,{regex:/:[\?\-+]?/,onMatch:function(k,B,N){k[1]=="+"&&(N[0].ifEnd=N[0]),k[1]=="?"&&(N[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(P,O){return this.getTokenizer().getLineTokens(P,O).tokens.map(function(E){return E.value||E})},C.prototype.getVariableValue=function(P,O,E){if(/^\d+$/.test(O))return(this.variables.__||{})[O]||"";if(/^[A-Z]\d+$/.test(O))return(this.variables[O[0]+"__"]||{})[O.substr(1)]||"";if(O=O.replace(/^TM_/,""),!this.variables.hasOwnProperty(O))return"";var k=this.variables[O];return typeof k=="function"&&(k=this.variables[O](P,O,E)),k??""},C.prototype.tmStrFormat=function(P,O,E){if(!O.fmt)return P;var k=O.flag||"",B=O.guard;B=new RegExp(B,k.replace(/[^gim]/g,""));var N=typeof O.fmt=="string"?this.tokenizeTmSnippet(O.fmt,"formatString"):O.fmt,M=this,$=P.replace(B,function(){var A=M.variables.__;M.variables.__=[].slice.call(arguments);for(var D=M.resolveVariables(N,E),j="E",U=0;U<D.length;U++){var q=D[U];if(typeof q=="object")if(D[U]="",q.changeCase&&q.local){var Q=D[U+1];Q&&typeof Q=="string"&&(q.changeCase=="u"?D[U]=Q[0].toUpperCase():D[U]=Q[0].toLowerCase(),D[U+1]=Q.substr(1))}else q.changeCase&&(j=q.changeCase);else j=="U"?D[U]=q.toUpperCase():j=="L"&&(D[U]=q.toLowerCase())}return M.variables.__=A,D.join("")});return $},C.prototype.tmFormatFunction=function(P,O,E){return O.formatFunction=="upcase"?P.toUpperCase():O.formatFunction=="downcase"?P.toLowerCase():P},C.prototype.resolveVariables=function(P,O){function E(j){var U=P.indexOf(j,M+1);U!=-1&&(M=U)}for(var k=[],B="",N=!0,M=0;M<P.length;M++){var $=P[M];if(typeof $=="string"){k.push($),$==`
1129
+ `?(N=!0,B=""):N&&(B=/^\t*/.exec($)[0],N=/\S/.test($));continue}if($){if(N=!1,$.fmtString){var A=P.indexOf($,M+1);A==-1&&(A=P.length),$.fmt=P.slice(M+1,A),M=A}if($.text){var D=this.getVariableValue(O,$.text,B)+"";$.fmtString&&(D=this.tmStrFormat(D,$,O)),$.formatFunction&&(D=this.tmFormatFunction(D,$,O)),D&&!$.ifEnd?(k.push(D),E($)):!D&&$.ifEnd&&E($.ifEnd)}else $.elseEnd?E($.elseEnd):($.tabstopId!=null||$.changeCase!=null)&&k.push($)}}return k},C.prototype.getDisplayTextForSnippet=function(P,O){var E=w.call(this,P,O);return E.text},C.prototype.insertSnippetForSelection=function(P,O,E){E===void 0&&(E={});var k=w.call(this,P,O,E),B=P.getSelectionRange(),N=P.session.replace(B,k.text),M=new x(P),$=P.inVirtualSelectionMode&&P.selection.index;M.addTabstops(k.tabstops,B.start,N,$)},C.prototype.insertSnippet=function(P,O,E){E===void 0&&(E={});var k=this;if(P.inVirtualSelectionMode)return k.insertSnippetForSelection(P,O,E);P.forEachSelection(function(){k.insertSnippetForSelection(P,O,E)},null,{keepOrder:!0}),P.tabstopManager&&P.tabstopManager.tabNext()},C.prototype.$getScope=function(P){var O=P.session.$mode.$id||"";if(O=O.split("/").pop(),O==="html"||O==="php"){O==="php"&&!P.session.$mode.inlinePhp&&(O="html");var E=P.getCursorPosition(),k=P.session.getState(E.row);typeof k=="object"&&(k=k[0]),k.substring&&(k.substring(0,3)=="js-"?O="javascript":k.substring(0,4)=="css-"?O="css":k.substring(0,4)=="php-"&&(O="php"))}return O},C.prototype.getActiveScopes=function(P){var O=this.$getScope(P),E=[O],k=this.snippetMap;return k[O]&&k[O].includeScopes&&E.push.apply(E,k[O].includeScopes),E.push("_"),E},C.prototype.expandWithTab=function(P,O){var E=this,k=P.forEachSelection(function(){return E.expandSnippetForSelection(P,O)},null,{keepOrder:!0});return k&&P.tabstopManager&&P.tabstopManager.tabNext(),k},C.prototype.expandSnippetForSelection=function(P,O){var E=P.getCursorPosition(),k=P.session.getLine(E.row),B=k.substring(0,E.column),N=k.substr(E.column),M=this.snippetMap,$;return this.getActiveScopes(P).some(function(A){var D=M[A];return D&&($=this.findMatchingSnippet(D,B,N)),!!$},this),$?(O&&O.dryRun||(P.session.doc.removeInLine(E.row,E.column-$.replaceBefore.length,E.column+$.replaceAfter.length),this.variables.M__=$.matchBefore,this.variables.T__=$.matchAfter,this.insertSnippetForSelection(P,$.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(P,O,E){for(var k=P.length;k--;){var B=P[k];if(!(B.startRe&&!B.startRe.test(O))&&!(B.endRe&&!B.endRe.test(E))&&!(!B.startRe&&!B.endRe))return B.matchBefore=B.startRe?B.startRe.exec(O):[""],B.matchAfter=B.endRe?B.endRe.exec(E):[""],B.replaceBefore=B.triggerRe?B.triggerRe.exec(O)[0]:"",B.replaceAfter=B.endTriggerRe?B.endTriggerRe.exec(E)[0]:"",B}},C.prototype.register=function(P,O){function E(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function k(A,D,j){return A=E(A),D=E(D),A=D+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function B(A){A.scope||(A.scope=O||"_"),O=A.scope,N[O]||(N[O]=[],M[O]={});var D=M[O];if(A.name){var j=D[A.name];j&&$.unregister(j),D[A.name]=A}N[O].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
1130
+ `):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=d.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=k(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=k(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var N=this.snippetMap,M=this.snippetNameMap,$=this;P||(P=[]),Array.isArray(P)?P.forEach(B):Object.keys(P).forEach(function(A){B(P[A])}),this._signal("registerSnippets",{scope:O})},C.prototype.unregister=function(P,O){function E(N){var M=B[N.scope||O];if(M&&M[N.name]){delete M[N.name];var $=k[N.scope||O],A=$&&$.indexOf(N);A>=0&&$.splice(A,1)}}var k=this.snippetMap,B=this.snippetNameMap;P.content?E(P):Array.isArray(P)&&P.forEach(E)},C.prototype.parseSnippetFile=function(P){P=P.replace(/\r/g,"");for(var O=[],E={},k=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,B;B=k.exec(P);){if(B[1])try{E=JSON.parse(B[1]),O.push(E)}catch{}if(B[4])E.content=B[4].replace(/^\t/gm,""),O.push(E),E={};else{var N=B[2],M=B[3];if(N=="regex"){var $=/\/((?:[^\/\\]|\\.)*)|$/g;E.guard=$.exec(M)[1],E.trigger=$.exec(M)[1],E.endTrigger=$.exec(M)[1],E.endGuard=$.exec(M)[1]}else N=="snippet"?(E.tabTrigger=M.match(/^\S*/)[0],E.name||(E.name=M)):N&&(E[N]=M)}}return O},C.prototype.getSnippetByName=function(P,O){var E=this.snippetNameMap,k;return this.getActiveScopes(O).some(function(B){var N=E[B];return N&&(k=N[P]),!!k},this),k},C})();v.implement(m.prototype,s);var w=function(C,P,O){function E(oe){for(var ee=[],ye=0;ye<oe.length;ye++){var we=oe[ye];if(typeof we=="object"){if(D[we.tabstopId])continue;var Ae=oe.lastIndexOf(we,ye-1);we=ee[Ae]||{tabstopId:we.tabstopId}}ee[ye]=we}return ee}O===void 0&&(O={});var k=C.getCursorPosition(),B=C.session.getLine(k.row),N=C.session.getTabString(),M=B.match(/^\s*/)[0];k.column<M.length&&(M=M.slice(0,k.column)),P=P.replace(/\r/g,"");var $=this.tokenizeTmSnippet(P);$=this.resolveVariables($,C),$=$.map(function(oe){return oe==`
1131
+ `&&!O.excludeExtraIndent?oe+M:typeof oe=="string"?oe.replace(/\t/g,N):oe});var A=[];$.forEach(function(oe,ee){if(typeof oe=="object"){var ye=oe.tabstopId,we=A[ye];if(we||(we=A[ye]=[],we.index=ye,we.value="",we.parents={}),we.indexOf(oe)===-1){oe.choices&&!we.choices&&(we.choices=oe.choices),we.push(oe);var Ae=$.indexOf(oe,ee+1);if(Ae!==-1){var Je=$.slice(ee+1,Ae),Be=Je.some(function(Ye){return typeof Ye=="object"});Be&&!we.value?we.value=Je:Je.length&&(!we.value||typeof we.value!="string")&&(we.value=Je.join(""))}}}}),A.forEach(function(oe){oe.length=0});for(var D={},j=0;j<$.length;j++){var U=$[j];if(typeof U=="object"){var q=U.tabstopId,Q=A[q],re=$.indexOf(U,j+1);if(D[q]){D[q]===U&&(delete D[q],Object.keys(D).forEach(function(oe){Q.parents[oe]=!0}));continue}D[q]=U;var le=Q.value;typeof le!="string"?le=E(le):U.fmt&&(le=this.tmStrFormat(le,U,C)),$.splice.apply($,[j+1,Math.max(0,re-j)].concat(le,U)),Q.indexOf(U)===-1&&Q.push(U)}}var ne=0,ue=0,he="";return $.forEach(function(oe){if(typeof oe=="string"){var ee=oe.split(`
1132
+ `);ee.length>1?(ue=ee[ee.length-1].length,ne+=ee.length-1):ue+=oe.length,he+=oe}else oe&&(oe.start?oe.end={row:ne,column:ue}:oe.start={row:ne,column:ue})}),{text:he,tabstops:A,tokens:$}},x=(function(){function C(P){if(this.index=0,this.ranges=[],this.tabstops=[],P.tabstopManager)return P.tabstopManager;P.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=d.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(P)}return C.prototype.attach=function(P){this.$openTabstops=null,this.selectedTabstop=null,this.editor=P,this.session=P.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(P){for(var O=P.action[0]=="r",E=this.selectedTabstop||{},k=E.parents||{},B=this.tabstops.slice(),N=0;N<B.length;N++){var M=B[N],$=M==E||k[M.index];if(M.rangeList.$bias=$?0:1,P.action=="remove"&&M!==E){var A=M.parents&&M.parents[E.index],D=M.rangeList.pointIndex(P.start,A);D=D<0?-D-1:D+1;var j=M.rangeList.pointIndex(P.end,A);j=j<0?-j-1:j-1;for(var U=M.rangeList.ranges.slice(D,j),q=0;q<U.length;q++)this.removeRange(U[q])}M.rangeList.$onChange(P)}var Q=this.session;!this.$inChange&&O&&Q.getLength()==1&&!Q.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var P=this.selectedTabstop;if(!(!P||!P.hasLinkedRanges||!P.firstNonLinked)){this.$inChange=!0;for(var O=this.session,E=O.getTextRange(P.firstNonLinked),k=0;k<P.length;k++){var B=P[k];if(B.linked){var N=B.original,M=r.snippetManager.tmStrFormat(E,N,this.editor);O.replace(B,M)}}this.$inChange=!1}},C.prototype.onAfterExec=function(P){P.command&&!P.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var P=this.editor.selection.lead,O=this.editor.selection.anchor,E=this.editor.selection.isEmpty(),k=0;k<this.ranges.length;k++)if(!this.ranges[k].linked){var B=this.ranges[k].contains(P.row,P.column),N=E||this.ranges[k].contains(O.row,O.column);if(B&&N)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(P){var O=this.tabstops.length,E=this.index+(P||1);E=Math.min(Math.max(E,1),O),E==O&&(E=0),this.selectTabstop(E),this.updateTabstopMarkers(),E===0&&this.detach()},C.prototype.selectTabstop=function(P){this.$openTabstops=null;var O=this.tabstops[this.index];if(O&&this.addTabstopMarkers(O),this.index=P,O=this.tabstops[this.index],!(!O||!O.length)){this.selectedTabstop=O;var E=O.firstNonLinked||O;if(O.choices&&(E.cursor=E.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(E);else{var k=this.editor.multiSelect;k.toSingleRange(E);for(var B=0;B<O.length;B++)O.hasLinkedRanges&&O[B].linked||k.addRange(O[B].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(P,O,E){var k=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!P[0]){var B=a.fromPoints(E,E);T(B.start,O),T(B.end,O),P[0]=[B],P[0].index=0}var N=this.index,M=[N+1,0],$=this.ranges,A=this.snippetId=(this.snippetId||0)+1;P.forEach(function(D,j){var U=this.$openTabstops[j]||D;U.snippetId=A;for(var q=0;q<D.length;q++){var Q=D[q],re=a.fromPoints(Q.start,Q.end||Q.start);R(re.start,O),R(re.end,O),re.original=Q,re.tabstop=U,$.push(re),U!=D?U.unshift(re):U[q]=re,Q.fmtString||U.firstNonLinked&&k?(re.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=re)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(M.push(U),this.$openTabstops[j]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new l,U.rangeList.$bias=0,U.rangeList.addList(U)},this),M.length>2&&(this.tabstops.length&&M.push(M.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,M))},C.prototype.addTabstopMarkers=function(P){var O=this.session;P.forEach(function(E){E.markerId||(E.markerId=O.addMarker(E,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(P){var O=this.session;P.forEach(function(E){O.removeMarker(E.markerId),E.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var P=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&P--,this.tabstops.forEach(function(O){O.snippetId===P?this.addTabstopMarkers(O):this.removeTabstopMarkers(O)},this)}},C.prototype.removeRange=function(P){var O=P.tabstop.indexOf(P);O!=-1&&P.tabstop.splice(O,1),O=this.ranges.indexOf(P),O!=-1&&this.ranges.splice(O,1),O=P.tabstop.rangeList.ranges.indexOf(P),O!=-1&&P.tabstop.splice(O,1),this.session.removeMarker(P.markerId),P.tabstop.length||(O=this.tabstops.indexOf(P.tabstop),O!=-1&&this.tabstops.splice(O,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new h,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var R=function(C,P){C.row==0&&(C.column+=P.column),C.row+=P.row},T=function(C,P){C.row==P.row&&(C.column-=P.column),C.row-=P.row};g.importCssString(`
1133
+ .ace_snippet-marker {
1134
+ -moz-box-sizing: border-box;
1135
+ box-sizing: border-box;
1136
+ background: rgba(194, 193, 208, 0.09);
1137
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1138
+ position: absolute;
1139
+ }`,"snippets.css",!1),r.snippetManager=new m;var _=t("./editor").Editor;(function(){this.insertSnippet=function(C,P){return r.snippetManager.insertSnippet(this,C,P)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(_.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(t,r,c){var u=t("../virtual_renderer").VirtualRenderer,g=t("../editor").Editor,v=t("../range").Range,s=t("../lib/event"),d=t("../lib/lang"),a=t("../lib/dom"),l=t("../config").nls,h=t("./../lib/useragent"),p=function(R){return"suggest-aria-id:".concat(R)},o=h.isSafari?"menu":"listbox",f=h.isSafari?"menuitem":"option",m=h.isSafari?"aria-current":"aria-selected",w=function(R){var T=new u(R);T.$maxLines=4;var _=new g(T);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},x=(function(){function R(T){var _=a.createElement("div"),C=w(_);T&&T.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",l("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",l("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var P=function(){};C.focus=P,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=P,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function($){var A=$.getDocumentPosition();C.selection.moveToPosition(A),k.start.row=k.end.row=A.row,$.stop()});var O,E=new v(-1,0,-1,1/0),k=new v(-1,0,-1,1/0);k.id=C.session.addMarker(k,"ace_active-line","fullLine"),C.setSelectOnHover=function($){$?E.id&&(C.session.removeMarker(E.id),E.id=null):E.id=C.session.addMarker(E,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function($){if(!O){O=$;return}if(!(O.x==$.x&&O.y==$.y)){O=$,O.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=O.getDocumentPosition().row;E.start.row!=A&&(E.id||C.setRow(A),N(A))}}),C.renderer.on("beforeRender",function(){if(O&&E.start.row!=-1){O.$pos=null;var $=O.getDocumentPosition().row;E.id||C.setRow($),N($,!0)}}),C.renderer.on("afterRender",function(){for(var $=C.renderer.$textLayer,A=$.config.firstRow,D=$.config.lastRow;A<=D;A++){var j=$.element.childNodes[A-$.config.firstRow];j.setAttribute("role",f),j.setAttribute("aria-roledescription",l("autocomplete.popup.item.aria-roledescription","item")),j.setAttribute("aria-setsize",C.data.length),j.setAttribute("aria-describedby","doc-tooltip"),j.setAttribute("aria-posinset",A+1);var U=C.getData(A);if(U){var q="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");j.setAttribute("aria-label",q)}var Q=j.querySelectorAll(".ace_completion-highlight");Q.forEach(function(re){re.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var $=C.getRow(),A=C.renderer.$textLayer,D=A.element.childNodes[$-A.config.firstRow],j=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(a.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),j.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=p($);a.addCssClass(D,"ace_selected"),D.id=U,A.element.setAttribute("aria-activedescendant",U),j.setAttribute("aria-activedescendant",U),D.setAttribute(m,"true")}});var B=function(){N(-1)},N=function($,A){$!==E.start.row&&(E.start.row=E.end.row=$,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return E.start.row},s.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,B()}),C.on("hide",B),C.on("changeSelection",B),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function($){var A=C.data[$];return typeof A=="string"?A:A&&A.value||""};var M=C.session.bgTokenizer;return M.$tokenizeRow=function($){function A(oe,ee){oe&&j.push({type:(D.className||"")+(ee||""),value:oe})}var D=C.data[$],j=[];if(!D)return j;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,q=U.toLowerCase(),Q=(C.filterText||"").toLowerCase(),re=0,le=0,ne=0;ne<=Q.length;ne++)if(ne!=le&&(D.matchMask&1<<ne||ne==Q.length)){var ue=Q.slice(le,ne);le=ne;var he=q.indexOf(ue,re);if(he==-1)continue;A(U.slice(re,he),""),re=he+ue.length,A(U.slice(he,re),"completion-highlight")}return A(U.slice(re,U.length),""),j.push({type:"completion-spacer",value:" "}),D.meta&&j.push({type:"completion-meta",value:D.meta}),D.message&&j.push({type:"completion-message",value:D.message}),j},M.$updateOnChange=P,M.start=P,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function($,A){C.filterText=A||"",C.setValue(d.stringRepeat(`
1140
+ `,$.length),-1),C.data=$||[],C.setRow(0)},C.getData=function($){return C.data[$]},C.getRow=function(){return k.start.row},C.setRow=function($){$=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,$)),k.start.row!=$&&(C.selection.clearSelection(),k.start.row=k.end.row=$||0,C.session._emit("changeBackMarker"),C.moveCursorTo($||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function($,A,D,j){if(!j&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===$.top&&C.anchorPos.left===$.left&&C.anchor===D)return!0;var U=this.container,q=this.renderer.scrollBar.width||10,Q=window.innerHeight-q,re=window.innerWidth-q,le=this.renderer,ne=le.$maxLines*A*1.4,ue={top:0,bottom:0},he=Q-$.top-3*this.$borderSize-A,oe=$.top-3*this.$borderSize;D||(oe<=he||he>=ne?D="bottom":D="top"),D==="top"?(ue.bottom=$.top-this.$borderSize,ue.top=ue.bottom-ne):D==="bottom"&&(ue.top=$.top+A+this.$borderSize,ue.bottom=ue.top+ne);var ee=ue.top>=0&&ue.bottom<=Q;if(!j&&!ee)return!1;ee?le.$maxPixelHeight=null:D==="top"?le.$maxPixelHeight=oe:le.$maxPixelHeight=he,D==="top"?(U.style.top="",U.style.bottom=Q+q-ue.bottom+"px",C.isTopdown=!1):(U.style.top=ue.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var ye=$.left;return ye+U.offsetWidth>re&&(ye=re-U.offsetWidth),U.style.left=ye+"px",U.style.right="",a.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),O=null),C.anchorPos=$,C.anchor=D,!0},C.show=function($,A,D){this.tryShow($,A,D?"bottom":void 0,!0)},C.goTo=function($){var A=this.getRow(),D=this.session.getLength()-1;switch($){case"up":A=A<=0?D:A-1;break;case"down":A=A>=D?-1:A+1;break;case"start":A=0;break;case"end":A=D}this.setRow(A)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return R})();a.importCssString(`
1141
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1142
+ background-color: #CAD6FA;
1143
+ z-index: 1;
1144
+ }
1145
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1146
+ background-color: #3a674e;
1147
+ }
1148
+ .ace_editor.ace_autocomplete .ace_line-hover {
1149
+ border: 1px solid #abbffe;
1150
+ margin-top: -1px;
1151
+ background: rgba(233,233,253,0.4);
1152
+ position: absolute;
1153
+ z-index: 2;
1154
+ }
1155
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1156
+ border: 1px solid rgba(109, 150, 13, 0.8);
1157
+ background: rgba(58, 103, 78, 0.62);
1158
+ }
1159
+ .ace_completion-meta {
1160
+ opacity: 0.5;
1161
+ margin-left: 0.9em;
1162
+ }
1163
+ .ace_completion-message {
1164
+ margin-left: 0.9em;
1165
+ color: blue;
1166
+ }
1167
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1168
+ color: #2d69c7;
1169
+ }
1170
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1171
+ color: #93ca12;
1172
+ }
1173
+ .ace_editor.ace_autocomplete {
1174
+ width: 300px;
1175
+ z-index: 200000;
1176
+ border: 1px lightgray solid;
1177
+ position: fixed;
1178
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1179
+ line-height: 1.4;
1180
+ background: #fefefe;
1181
+ color: #111;
1182
+ }
1183
+ .ace_dark.ace_editor.ace_autocomplete {
1184
+ border: 1px #484747 solid;
1185
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1186
+ line-height: 1.4;
1187
+ background: #25282c;
1188
+ color: #c1c1c1;
1189
+ }
1190
+ .ace_autocomplete .ace_text-layer {
1191
+ width: calc(100% - 8px);
1192
+ }
1193
+ .ace_autocomplete .ace_line {
1194
+ display: flex;
1195
+ align-items: center;
1196
+ }
1197
+ .ace_autocomplete .ace_line > * {
1198
+ min-width: 0;
1199
+ flex: 0 0 auto;
1200
+ }
1201
+ .ace_autocomplete .ace_line .ace_ {
1202
+ flex: 0 1 auto;
1203
+ overflow: hidden;
1204
+ text-overflow: ellipsis;
1205
+ }
1206
+ .ace_autocomplete .ace_completion-spacer {
1207
+ flex: 1;
1208
+ }
1209
+ .ace_autocomplete.ace_loading:after {
1210
+ content: "";
1211
+ position: absolute;
1212
+ top: 0px;
1213
+ height: 2px;
1214
+ width: 8%;
1215
+ background: blue;
1216
+ z-index: 100;
1217
+ animation: ace_progress 3s infinite linear;
1218
+ animation-delay: 300ms;
1219
+ transform: translateX(-100%) scaleX(1);
1220
+ }
1221
+ @keyframes ace_progress {
1222
+ 0% { transform: translateX(-100%) scaleX(1) }
1223
+ 50% { transform: translateX(625%) scaleX(2) }
1224
+ 100% { transform: translateX(1500%) scaleX(3) }
1225
+ }
1226
+ @media (prefers-reduced-motion) {
1227
+ .ace_autocomplete.ace_loading:after {
1228
+ transform: translateX(625%) scaleX(2);
1229
+ animation: none;
1230
+ }
1231
+ }
1232
+ `,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=p}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(t,r,c){var u=(function(){function g(v){this.editor=v,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.prototype.setScreenReaderContent=function(v){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var d=this.popup.getRow(),a=this.popup.renderer.$textLayer,l=a.element.childNodes[d-a.config.firstRow];if(l){for(var h="doc-tooltip ",p=0;p<this._lines.length;p++)h+="ace-inline-screenreader-line-".concat(p," ");l.setAttribute("aria-describedby",h)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=v.split(/\r\n|\r|\n/);var s=this.createCodeBlock();this.screenReaderDiv.appendChild(s)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.prototype.createCodeBlock=function(){var v=document.createElement("pre");v.setAttribute("id","ace-inline-screenreader");for(var s=0;s<this._lines.length;s++){var d=document.createElement("code");d.setAttribute("id","ace-inline-screenreader-line-".concat(s));var a=document.createTextNode(this._lines[s]);d.appendChild(a),v.appendChild(d)}return v},g})();r.AceInlineScreenReader=u}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(t,r,c){var u=t("../snippets").snippetManager,g=t("./inline_screenreader").AceInlineScreenReader,v=(function(){function s(){this.editor=null}return s.prototype.show=function(d,a,l){if(l=l||"",d&&this.editor&&this.editor!==d&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!d||!a)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(d));var h=a.snippet?u.getDisplayTextForSnippet(d,a.snippet):a.value;return a.hideInlinePreview||!h||!h.startsWith(l)?!1:(this.editor=d,this.inlineScreenReader.setScreenReaderContent(h),h=h.slice(l.length),h===""?d.removeGhostText():d.setGhostText(h),!0)},s.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},s.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},s.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},s})();r.AceInline=v}),ace.define("ace/autocomplete/util",["require","exports","module"],function(t,r,c){r.parForEach=function(g,v,s){var d=0,a=g.length;a===0&&s();for(var l=0;l<a;l++)v(g[l],function(h,p){d++,d===a&&s(h,p)})};var u=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,v,s){s=s||u;for(var d=[],a=v-1;a>=0&&s.test(g[a]);a--)d.push(g[a]);return d.reverse().join("")},r.retrieveFollowingIdentifier=function(g,v,s){s=s||u;for(var d=[],a=v;a<g.length&&s.test(g[a]);a++)d.push(g[a]);return d},r.getCompletionPrefix=function(g){var v=g.getCursorPosition(),s=g.session.getLine(v.row),d;return g.completers.forEach((function(a){a.identifierRegexps&&a.identifierRegexps.forEach((function(l){!d&&l&&(d=this.retrievePrecedingIdentifier(s,v.column,l))}).bind(this))}).bind(this)),d||this.retrievePrecedingIdentifier(s,v.column)},r.triggerAutocomplete=function(g,s){var s=s??g.session.getPrecedingCharacter();return g.completers.some(function(d){if(d.triggerCharacters&&Array.isArray(d.triggerCharacters))return d.triggerCharacters.includes(s)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(t,r,c){var u=t("./keyboard/hash_handler").HashHandler,g=t("./autocomplete/popup").AcePopup,v=t("./autocomplete/inline").AceInline,s=t("./autocomplete/popup").getAriaId,d=t("./autocomplete/util"),a=t("./lib/lang"),l=t("./lib/dom"),h=t("./snippets").snippetManager,p=t("./config"),o=t("./lib/event"),f=t("./lib/scroll").preventParentScroll,m=function(T,_){_.completer&&_.completer.destroy()},w=(function(){function T(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new u,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=a.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=a.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=a.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=a.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=a.delayedCall((function(){var _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new R(T.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:p.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new v,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},T.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var C=_?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},T.prototype.$updateGhostText=function(_){var C=this.base.row,P=this.base.column,O=this.editor.getCursorPosition().column,E=this.editor.session.getLine(C).slice(P,O);this.inlineRenderer.show(this.editor,_,E)?this.$seen(_):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var _=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var P=this.popup.getData(C);P&&(!_||P.hideInlinePreview)&&this.$seen(P)}},T.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,C=[];_;)C.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=C}},T.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,P=C.layerConfig.lineHeight,O=C.$cursorLayer.getPixelPosition(this.base,!0);O.left-=this.popup.getTextLeftOffset();var E=_.container.getBoundingClientRect();O.top+=E.top-C.layerConfig.offset,O.left+=E.left-_.renderer.scrollLeft,O.left+=C.gutterWidth;var k={top:O.top,left:O.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(k.top+=C.$ghostTextWidget.el.offsetHeight);var B=_.container.getBoundingClientRect().bottom-P,N=B<k.top?{top:B,left:k.left}:k;this.popup.tryShow(N,P,"bottom")||this.popup.tryShow(O,P,"top")||this.popup.show(O,P)},T.prototype.openPopup=function(_,C,P){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var O=this.popup.getRow(),E=this.popup.data[O];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:s(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var k;this.stickySelection&&(k=this.popup.data.indexOf(E)),(!k||k===-1)&&(k=0),this.popup.setRow(this.autoSelect?k:-1),k===O&&E!==this.completions.filtered[k]&&this.$onPopupChange();var B=this.inlineRenderer&&this.inlineEnabled;if(k===O&&B){var N=this.popup.getData(this.popup.getRow());this.$updateGhostText(N)}P||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},T.prototype.changeListener=function(_){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},T.prototype.blurListener=function(_){var C=document.activeElement,P=this.editor.textInput.getElement(),O=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),E=this.popup&&this.popup.container;C!=P&&C.parentNode!=E&&!O&&C!=this.tooltipNode&&_.relatedTarget!=P&&this.detach()},T.prototype.mousedownListener=function(_){this.detach()},T.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(_){this.popup.goTo(_)},T.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var P=this.completions,O=this.getCompletionProvider().insertMatch(this.editor,_,P.filterText,C);return this.completions==P&&this.detach(),O},T.prototype.showPopup=function(_,C){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},T.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new x(_)),this.completionProvider},T.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},T.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var O=this.editor.getCursorPosition(),E=this.editor.session.getTextRange({start:this.base,end:O});if(E==this.completions.filterText)return;if(this.completions.setFilter(E),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==E&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,E,_);return}if(C&&C.matches){var O=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(O.row,O.column),this.base.$insertRight=!0,this.completions=new R(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var P=this.editor.getSession(),O=this.editor.getCursorPosition(),E=d.getCompletionPrefix(this.editor);this.base=P.doc.createAnchor(O.row,O.column-E.length),this.base.$insertRight=!0;var k={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:E,pos:O}).provideCompletions(this.editor,k,(function(B,N,M){var $=N.filtered,A=d.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),M){if(!$.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(A)),D){var j=[{caption:D,value:""}];this.completions=new R(j),this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if($.length==1&&$[0].value==A&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!M&&this.showLoadingState?new R(T.completionsForLoading.concat($),N.filterText):N,this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!M)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,P=C&&(C[_.getHoveredRow()]||C[_.getRow()]),O=null;if(!P||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var E=this.editor.completers.length,k=0;k<E;k++){var B=this.editor.completers[k];if(B.getDocTooltip&&P.completerId===B.id){O=B.getDocTooltip(P);break}}if(!O&&typeof P!="string"&&(O=P),typeof O=="string"&&(O={docText:O}),!O||!O.docHTML&&!O.docText)return this.hideDocTooltip();this.showDocTooltip(O)},T.prototype.showDocTooltip=function(_){this.tooltipNode||(this.tooltipNode=l.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",f));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var P=this.tooltipNode;_.docHTML?P.innerHTML=_.docHTML:_.docText&&(P.textContent=_.docText),P.parentNode||this.popup.container.appendChild(this.tooltipNode);var O=this.popup,E=O.container.getBoundingClientRect(),k=400,B=300,N=O.renderer.scrollBar.width||10,M=E.left,$=window.innerWidth-E.right-N,A=O.isTopdown?window.innerHeight-N-E.bottom:E.top,D=[Math.min($/k,1),Math.min(M/k,1),Math.min(A/B,1)*.9],j=Math.max.apply(Math,D),U=P.style;U.display="block",j==D[0]||D[0]>=1?(U.left=E.right+1+"px",U.right="",U.maxWidth=k*j+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-N-E.top,B)+"px"):j==D[1]||D[1]>=1?(U.right=window.innerWidth-E.left+"px",U.left="",U.maxWidth=k*j+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-N-E.top,B)+"px"):j==D[2]&&(U.left=E.left+"px",U.right="",U.maxWidth=Math.min(k,window.innerWidth-E.left)+"px",O.isTopdown?(U.top=E.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-N-E.bottom,B)+"px"):(U.top="",U.bottom=window.innerHeight-E.top+"px",U.maxHeight=Math.min(E.top,B)+"px")),l.$fixPositionBug(P)},T.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},T.prototype.onTooltipClick=function(_){for(var C=_.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},T.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},T.for=function(_){return _.completer instanceof T||(_.completer&&(_.completer.destroy(),_.completer=null),p.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),_.completer=T.$sharedInstance):(_.completer=new T,_.once("destroy",m))),_.completer},T})();w.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var _=T.completer.insertMatch();if(_||T.tabstopManager)return _;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var _=d.getCompletionPrefix(T);!_&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(T,_){var C=w.for(T);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(T,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function T(_){this.initialPosition=_,this.active=!0}return T.prototype.insertByIndex=function(_,C,P){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],P)},T.prototype.insertMatch=function(_,C,P){if(!C)return!1;if(_.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(_,C);else{if(!this.completions)return!1;var O=this.completions.filterText.length,E=0;if(C.range&&C.range.start.row===C.range.end.row&&(O-=this.initialPosition.prefix.length,O+=this.initialPosition.pos.column-C.range.start.column,E+=C.range.end.column-this.initialPosition.pos.column),O||E){var k;_.selection.getAllRanges?k=_.selection.getAllRanges():k=[_.getSelectionRange()];for(var B=0,N;N=k[B];B++)N.start.column-=O,N.end.column+=E,_.session.remove(N)}C.snippet?h.insertSnippet(_,C.snippet):this.$insertString(_,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(_,C),C.command&&C.command==="startAutocomplete"&&_.execCommand(C.command)}return _.endOperation(),!0},T.prototype.$insertString=function(_,C){var P=C.value||C;_.execCommand("insertstring",P)},T.prototype.gatherCompletions=function(_,C){var P=_.getSession(),O=_.getCursorPosition(),E=d.getCompletionPrefix(_),k=[];this.completers=_.completers;var B=_.completers.length;return _.completers.forEach(function(N,M){N.getCompletions(_,P,O,E,function($,A){N.hideInlinePreview&&(A=A.map(function(D){return Object.assign(D,{hideInlinePreview:N.hideInlinePreview})})),!$&&A&&(k=k.concat(A)),C(null,{prefix:d.getCompletionPrefix(_),matches:k,finished:--B===0})})}),!0},T.prototype.provideCompletions=function(_,C,P){var O=(function(N){var M=N.prefix,$=N.matches;this.completions=new R($),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(M),(N.finished||this.completions.filtered.length)&&P(null,this.completions,N.finished)}).bind(this),E=!0,k=null;if(this.gatherCompletions(_,(function(N,M){if(this.active){N&&(P(N,[],!0),this.detach());var $=M.prefix;if($.indexOf(M.prefix)===0){if(E){k=M;return}O(M)}}}).bind(this)),E=!1,k){var B=k;k=null,O(B)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},T})(),R=(function(){function T(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=_,C=this.filterCompletions(C,this.filterText),C=C.sort(function(O,E){return E.exactMatch-O.exactMatch||E.$score-O.$score||(O.caption||O.value).localeCompare(E.caption||E.value)});var P=null;C=C.filter(function(O){var E=O.snippet||O.caption||O.value;return E===P?!1:(P=E,!0)}),this.filtered=C},T.prototype.filterCompletions=function(_,C){var P=[],O=C.toUpperCase(),E=C.toLowerCase();e:for(var k=0,B;B=_[k];k++){if(B.skipFilter){B.$score=B.score,P.push(B);continue}var N=!this.ignoreCaption&&B.caption||B.value||B.snippet;if(N){var M=-1,$=0,A=0,D,j;if(this.exactMatch){if(C!==N.substr(0,C.length))continue e}else{var U=N.toLowerCase().indexOf(E);if(U>-1)A=U;else for(var q=0;q<C.length;q++){var Q=N.indexOf(E[q],M+1),re=N.indexOf(O[q],M+1);if(D=Q>=0&&(re<0||Q<re)?Q:re,D<0)continue e;j=D-M-1,j>0&&(M===-1&&(A+=10),A+=j,$|=1<<q),M=D}}B.matchMask=$,B.exactMatch=A?0:1,B.$score=(B.score||0)-A,P.push(B)}}return P},T})();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=R}),ace.define("ace/marker_group",["require","exports","module"],function(t,r,c){var u=(function(){function g(v,s){s&&(this.markerType=s.markerType),this.markers=[],this.session=v,v.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(v){return this.markers.find(function(s){return s.range.contains(v.row,v.column)})},g.prototype.markersComparator=function(v,s){return v.range.start.row-s.range.start.row},g.prototype.setMarkers=function(v){this.markers=v.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(v,s,d,a){if(!(!this.markers||!this.markers.length))for(var l=a.firstRow,h=a.lastRow,p,o=0,f=0,m=0;m<this.markers.length;m++){var w=this.markers[m];if(!(w.range.end.row<l)&&!(w.range.start.row>h)&&(w.range.start.row===f?o++:(f=w.range.start.row,o=0),!(o>200))){var x=w.range.clipRows(l,h);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var R=x.toScreenRange(d);if(R.isEmpty()){p=d.getNextFoldLine(x.end.row,p),p&&p.end.row>x.end.row&&(l=p.end.row);continue}this.markerType==="fullLine"?s.drawFullLineMarker(v,R,w.className,a):R.isMultiLine()?this.markerType==="line"?s.drawMultiLineMarker(v,R,w.className,a):s.drawTextMarker(v,R,w.className,a):s.drawSingleLineMarker(v,R,w.className+" ace_br15",a)}}}},g})();u.prototype.MAX_MARKERS=1e4,r.MarkerGroup=u}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(t,r,c){function u(d,a){var l=d.getTextRange(v.fromPoints({row:0,column:0},a));return l.split(s).length-1}function g(d,a){var l=u(d,a),h=d.getValue().split(s),p=Object.create(null),o=h[l];return h.forEach(function(f,m){if(!(!f||f===o)){var w=Math.abs(l-m),x=h.length-w;p[f]?p[f]=Math.max(x,p[f]):p[f]=x}}),p}var v=t("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(d,a,l,h,p){var o=g(a,l),f=Object.keys(o);p(null,f.map(function(m){return{caption:m,value:m,score:o[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(t,r,c){var u=t("../snippets").snippetManager,g=t("../autocomplete").Autocomplete,v=t("../config"),s=t("../lib/lang"),d=t("../autocomplete/util"),a=t("../marker_group").MarkerGroup,l=t("../autocomplete/text_completer"),h={getCompletions:function(E,k,B,N,M){if(k.$mode.completer)return k.$mode.completer.getCompletions(E,k,B,N,M);var $=E.session.getState(B.row),A=k.$mode.getCompletions($,k,B,N);A=A.map(function(D){return D.completerId=h.id,D}),M(null,A)},id:"keywordCompleter"},p=function(E){var k={};return E.replace(/\${(\d+)(:(.*?))?}/g,function(B,N,M,$){return k[N]=$||""}).replace(/\$(\d+?)/g,function(B,N){return k[N]})},o={getCompletions:function(E,k,B,N,M){var $=[],A=k.getTokenAt(B.row,B.column);A&&A.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?$.push("html-tag"):$=u.getActiveScopes(E);var D=u.snippetMap,j=[];$.forEach(function(U){for(var q=D[U]||[],Q=q.length;Q--;){var re=q[Q],le=re.name||re.tabTrigger;le&&j.push({caption:le,snippet:re.content,meta:re.tabTrigger&&!re.name?re.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),M(null,j)},getDocTooltip:function(E){E.snippet&&!E.docHTML&&(E.docHTML=["<b>",s.escapeHTML(E.caption),"</b>","<hr></hr>",s.escapeHTML(p(E.snippet))].join(""))},id:"snippetCompleter"},f=[o,l,h];r.setCompleters=function(E){f.length=0,E&&f.push.apply(f,E)},r.addCompleter=function(E){f.push(E)},r.textCompleter=l,r.keyWordCompleter=h,r.snippetCompleter=o;var m={name:"expandSnippet",exec:function(E){return u.expandWithTab(E)},bindKey:"Tab"},w=function(E,k){x(k.session.$mode)},x=function(E){typeof E=="string"&&(E=v.$modes[E]),E&&(u.files||(u.files={}),R(E.$id,E.snippetFileId),E.modes&&E.modes.forEach(x))},R=function(E,k){!k||!E||u.files[E]||(u.files[E]={},v.loadModule(k,function(B){B&&(u.files[E]=B,!B.snippets&&B.snippetText&&(B.snippets=u.parseSnippetFile(B.snippetText)),u.register(B.snippets||[],B.scope),B.includeScopes&&(u.snippetMap[B.scope].includeScopes=B.includeScopes,B.includeScopes.forEach(function(N){x("ace/mode/"+N)})))}))},T=function(E){var k=E.editor,B=k.completer&&k.completer.activated;if(E.command.name==="backspace")B&&!d.getCompletionPrefix(k)&&k.completer.detach();else if(E.command.name==="insertstring"&&!B){_=E;var N=E.editor.$liveAutocompletionDelay;N?C.delay(N):P(E)}},_,C=s.delayedCall(function(){P(_)},0),P=function(E){var k=E.editor,B=d.getCompletionPrefix(k),N=E.args,M=d.triggerAutocomplete(k,N);if(B&&B.length>=k.$liveAutocompletionThreshold||M){var $=g.for(k);$.autoShown=!0,$.showPopup(k)}},O=t("../editor").Editor;t("../config").defineOptions(O.prototype,"editor",{enableBasicAutocompletion:{set:function(E){E?(g.for(this),this.completers||(this.completers=Array.isArray(E)?E:f),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(E){E?(this.completers||(this.completers=Array.isArray(E)?E:f),this.commands.on("afterExec",T)):this.commands.off("afterExec",T)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(E){E?(this.commands.addCommand(m),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(m),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=a}),(function(){ace.require(["ace/ext/language_tools"],function(t){e&&(e.exports=t)})})()})(uy)),uy.exports}lT();var dy={exports:{}},fy;function cT(){return fy||(fy=1,(function(e,n){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(t,r,c){c.exports=`
1233
+
1234
+ /* ------------------------------------------------------------------------------------------
1235
+ * Editor Search Form
1236
+ * --------------------------------------------------------------------------------------- */
1237
+ .ace_search {
1238
+ background-color: #ddd;
1239
+ color: #666;
1240
+ border: 1px solid #cbcbcb;
1241
+ border-top: 0 none;
1242
+ overflow: hidden;
1243
+ margin: 0;
1244
+ padding: 4px 6px 0 4px;
1245
+ position: absolute;
1246
+ top: 0;
1247
+ z-index: 99;
1248
+ white-space: normal;
1249
+ }
1250
+ .ace_search.left {
1251
+ border-left: 0 none;
1252
+ border-radius: 0px 0px 5px 0px;
1253
+ left: 0;
1254
+ }
1255
+ .ace_search.right {
1256
+ border-radius: 0px 0px 0px 5px;
1257
+ border-right: 0 none;
1258
+ right: 0;
1259
+ }
1260
+
1261
+ .ace_search_form, .ace_replace_form {
1262
+ margin: 0 20px 4px 0;
1263
+ overflow: hidden;
1264
+ line-height: 1.9;
1265
+ }
1266
+ .ace_replace_form {
1267
+ margin-right: 0;
1268
+ }
1269
+ .ace_search_form.ace_nomatch {
1270
+ outline: 1px solid red;
1271
+ }
1272
+
1273
+ .ace_search_field {
1274
+ border-radius: 3px 0 0 3px;
1275
+ background-color: white;
1276
+ color: black;
1277
+ border: 1px solid #cbcbcb;
1278
+ border-right: 0 none;
1279
+ outline: 0;
1280
+ padding: 0;
1281
+ font-size: inherit;
1282
+ margin: 0;
1283
+ line-height: inherit;
1284
+ padding: 0 6px;
1285
+ min-width: 17em;
1286
+ vertical-align: top;
1287
+ min-height: 1.8em;
1288
+ box-sizing: content-box;
1289
+ }
1290
+ .ace_searchbtn {
1291
+ border: 1px solid #cbcbcb;
1292
+ line-height: inherit;
1293
+ display: inline-block;
1294
+ padding: 0 6px;
1295
+ background: #fff;
1296
+ border-right: 0 none;
1297
+ border-left: 1px solid #dcdcdc;
1298
+ cursor: pointer;
1299
+ margin: 0;
1300
+ position: relative;
1301
+ color: #666;
1302
+ }
1303
+ .ace_searchbtn:last-child {
1304
+ border-radius: 0 3px 3px 0;
1305
+ border-right: 1px solid #cbcbcb;
1306
+ }
1307
+ .ace_searchbtn:disabled {
1308
+ background: none;
1309
+ cursor: default;
1310
+ }
1311
+ .ace_searchbtn:hover {
1312
+ background-color: #eef1f6;
1313
+ }
1314
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1315
+ padding: 0px 0.7em
1316
+ }
1317
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1318
+ content: "";
1319
+ border: solid 2px #888;
1320
+ width: 0.5em;
1321
+ height: 0.5em;
1322
+ border-width: 2px 0 0 2px;
1323
+ display:inline-block;
1324
+ transform: rotate(-45deg);
1325
+ }
1326
+ .ace_searchbtn.next:after {
1327
+ border-width: 0 2px 2px 0 ;
1328
+ }
1329
+ .ace_searchbtn_close {
1330
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1331
+ border-radius: 50%;
1332
+ border: 0 none;
1333
+ color: #656565;
1334
+ cursor: pointer;
1335
+ font: 16px/16px Arial;
1336
+ padding: 0;
1337
+ height: 14px;
1338
+ width: 14px;
1339
+ top: 9px;
1340
+ right: 7px;
1341
+ position: absolute;
1342
+ }
1343
+ .ace_searchbtn_close:hover {
1344
+ background-color: #656565;
1345
+ background-position: 50% 100%;
1346
+ color: white;
1347
+ }
1348
+
1349
+ .ace_button {
1350
+ margin-left: 2px;
1351
+ cursor: pointer;
1352
+ -webkit-user-select: none;
1353
+ -moz-user-select: none;
1354
+ -o-user-select: none;
1355
+ -ms-user-select: none;
1356
+ user-select: none;
1357
+ overflow: hidden;
1358
+ opacity: 0.7;
1359
+ border: 1px solid rgba(100,100,100,0.23);
1360
+ padding: 1px;
1361
+ box-sizing: border-box!important;
1362
+ color: black;
1363
+ }
1364
+
1365
+ .ace_button:hover {
1366
+ background-color: #eee;
1367
+ opacity:1;
1368
+ }
1369
+ .ace_button:active {
1370
+ background-color: #ddd;
1371
+ }
1372
+
1373
+ .ace_button.checked {
1374
+ border-color: #3399ff;
1375
+ opacity:1;
1376
+ }
1377
+
1378
+ .ace_search_options{
1379
+ margin-bottom: 3px;
1380
+ text-align: right;
1381
+ -webkit-user-select: none;
1382
+ -moz-user-select: none;
1383
+ -o-user-select: none;
1384
+ -ms-user-select: none;
1385
+ user-select: none;
1386
+ clear: both;
1387
+ }
1388
+
1389
+ .ace_search_counter {
1390
+ float: left;
1391
+ font-family: arial;
1392
+ padding: 0 8px;
1393
+ }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(t,r,c){var u=t("../lib/dom"),g=t("../lib/lang"),v=t("../lib/event"),s=t("./searchbox-css"),d=t("../keyboard/hash_handler").HashHandler,a=t("../lib/keys"),l=t("../config").nls,h=999;u.importCssString(s,"ace_searchbox",!1);var p=(function(){function m(w,x,R){this.activeInput,this.element=u.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:l("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},l("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:l("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},l("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},l("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:l("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:l("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:l("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:l("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:l("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(w),u.importCssString(s,"ace_searchbox",w.container),v.addListener(this.element,"touchstart",function(T){T.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;v.addListener(w,"mousedown",function(R){setTimeout(function(){x.activeInput.focus()},0),v.stopPropagation(R)}),v.addListener(w,"click",function(R){var T=R.target||R.srcElement,_=T.getAttribute("action");_&&x[_]?x[_]():x.$searchBarKb.commands[_]&&x.$searchBarKb.commands[_].exec(x),v.stopPropagation(R)}),v.addCommandKeyListener(w,function(R,T,_){var C=a.keyCodeToString(_),P=x.$searchBarKb.findKeyCommand(T,C);P&&P.exec&&(P.exec(x),v.stopEvent(R))}),this.$onChange=g.delayedCall(function(){x.find(!1,!1)}),v.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),v.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),v.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},m.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(w){u.setCssClass(this.replaceOption,"checked",this.searchRange),u.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",u.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),u.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),u.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,w)},m.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(w,x,R){if(this.editor.session){var T=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:R,range:this.searchRange}),_=!T&&this.searchInput.value;u.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,R=x.unicode,T=0,_=0;if(x){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
1394
+ `),w.session.doc.$autoNewLine=`
1395
+ `);var P=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(P-=w.session.doc.positionToIndex(this.searchRange.start));for(var O=x.lastIndex=0,E;(E=x.exec(C))&&(T++,O=E.index,O<=P&&_++,!(T>h||!E[0]&&(x.lastIndex=O+=g.skipEmptyMatch(C,O,R),O>=C.length))););}this.searchCounter.textContent=l("search-box.search-counter","$0 of $1",[_,T>h?h+"+":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;u.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},m.prototype.show=function(w,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(w=g.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m})(),o=new d;o.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},"Tab|Shift-Tab":function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var f=new d([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);p.prototype.$searchBarKb=o,p.prototype.$closeSearchBarKb=f,r.SearchBox=p,r.Search=function(m,w){var x=m.searchBox||new p(m),R=m.session.selection.getRange(),T=R.isMultiLine()?"":m.session.getTextRange(R);x.show(T,w)}}),(function(){ace.require(["ace/ext/searchbox"],function(t){e&&(e.exports=t)})})()})(dy)),dy.exports}cT();var py={exports:{}},gy;function uT(){return gy||(gy=1,(function(e,n){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(t,r,c){function u(d,a){function l(E,k,B){if(!(E.length<k)){var N=E.slice(0,k),M=E.slice(k),$=/^(?:(\s+)|(\S+)(\s+))/.exec(M),A=/(?:(\s+)|(\s+)(\S+))$/.exec(N),D=0,j=0;if(A&&!A[2]&&(D=k-A[1].length,j=k),$&&!$[2]&&(D||(D=k),j=k+$[1].length),D)return{start:D,end:j};if(A&&A[2]&&A.index>B)return{start:A.index,end:A.index+A[2].length};if($&&$[2])return D=k+$[2].length,{start:D,end:D+$[3].length}}}for(var h=a.column||d.getOption("printMarginColumn"),p=a.allowMerge!=0,o=Math.min(a.startRow,a.endRow),f=Math.max(a.startRow,a.endRow),m=d.session;o<=f;){var w=m.getLine(o);if(w.length>h){var x=l(w,h,5);if(x){var R=/^\s*/.exec(w)[0];m.replace(new v(o,x.start,o,x.end),`
1396
+ `+R)}f++}else if(p&&/\S/.test(w)&&o!=f){var T=m.getLine(o+1);if(T&&/\S/.test(T)){var _=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),P=_+" "+C,x=l(P,h,5);if(x&&x.start>_.length||P.length<h){var O=new v(o,_.length,o+1,T.length-C.length);m.replace(O," "),o--,f--}else _.length<w.length&&m.remove(new v(o,_.length,o,w.length))}}o++}}function g(d){if(d.command.name=="insertstring"&&/\S/.test(d.args)){var a=d.editor,l=a.selection.cursor;if(l.column<=a.renderer.$printMarginColumn)return;var h=a.session.$undoManager.$lastDelta;u(a,{startRow:l.row,endRow:l.row,allowMerge:!1}),h!=a.session.$undoManager.$lastDelta&&a.session.markUndoGroup()}}var v=t("../range").Range,s=t("../editor").Editor;t("../config").defineOptions(s.prototype,"editor",{hardWrap:{set:function(d){d?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=u}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(t,r,c){function u(b){return{row:b.line,column:b.ch}}function g(b){return new je(b.row,b.column)}function v(b,I,S){if(I.line===S.line&&I.ch>=S.ch-1){var z=b.getLine(I.line),F=z.charCodeAt(I.ch);55296<=F&&F<=55551&&(S.ch+=1)}return{start:I,end:S}}function s(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),Ve.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",Qi),P(b),Ve.on(b.getInputField(),"paste",a(b))}function d(b){b.setOption("disableInput",!1),b.off("cursorActivity",Qi),Ve.off(b.getInputField(),"paste",a(b)),b.state.vim=null,Cn&&clearTimeout(Cn)}function a(b){var I=b.state.vim;return I.onPasteFn||(I.onPasteFn=function(){I.insertMode||(b.setCursor(ee(b.getCursor(),0,1)),ar.enterInsertMode(b,{},I))}),I.onPasteFn}function l(b,I){return I>=b.firstLine()&&I<=b.lastLine()}function h(b){return/^[a-z]$/.test(b)}function p(b){return"()[]{}".indexOf(b)!=-1}function o(b){return is.test(b)}function f(b){return He.test(b)}function m(b){return/^\s*$/.test(b)}function w(b){return".?!".indexOf(b)!=-1}function x(b,I){for(var S=0;S<I.length;S++)if(I[S]==b)return!0;return!1}function R(b,I,S,z,F){if(I===void 0&&!F)throw Error("defaultValue is required unless callback is provided");if(S||(S="string"),rt[b]={type:S,defaultValue:I,callback:F},z)for(var W=0;W<z.length;W++)rt[z[W]]=rt[b];I&&T(b,I)}function T(b,I,S,z){var F=rt[b];z=z||{};var W=z.scope;if(!F)return new Error("Unknown option: "+b);if(F.type=="boolean"){if(I&&I!==!0)return new Error("Invalid argument: "+b+"="+I);I!==!1&&(I=!0)}F.callback?(W!=="local"&&F.callback(I,void 0),W!=="global"&&S&&F.callback(I,S)):(W!=="local"&&(F.value=F.type=="boolean"?!!I:I),W!=="global"&&S&&(S.state.vim.options[b]={value:I}))}function _(b,I,S){var z=rt[b];S=S||{};var F=S.scope;if(!z)return new Error("Unknown option: "+b);if(z.callback){var W=I&&z.callback(void 0,I);return F!=="global"&&W!==void 0?W:F!=="local"?z.callback():void 0}var W=F!=="global"&&I&&I.state.vim.options[b];return(W||F!=="local"&&z||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=wn()}function P(b){return b.state.vim||(b.state.vim={inputState:new $,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),b.state.vim}function O(){Ge={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:sn(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new q({}),searchHistoryController:new Q,exCommandHistoryController:new Q};for(var b in rt){var I=rt[b];I.value=I.defaultValue}}function E(b){function I(K){typeof K=="string"?Kt.value=K:Kt=null}if(b[0]=="<"){var S=b.toLowerCase().slice(1,-1),z=S.split("-");if(S=z.pop()||"",S=="lt")b="<";else if(S=="space")b=" ";else if(S=="cr")b=`
1397
+ `;else if(Wo[S]){var F=Kt.value,W={key:Wo[S],target:{value:F,selectionEnd:F.length,selectionStart:F.length}};Kt.onKeyDown&&Kt.onKeyDown(W,Kt.value,I),Kt&&Kt.onKeyUp&&Kt.onKeyUp(W,Kt.value,I);return}}if(b==`
1398
+ `){var G=Kt;Kt=null,G.onClose&&G.onClose(G.value)}else Kt.value=(Kt.value||"")+b}function k(b,I,S){var z=vi;if(S){if(cn.indexOf(S)!=-1)return;cn.push(S),vi=S.noremap!=0}try{for(var F=P(b),W=/<(?:[CSMA]-)*\w+>|./gi,G;G=W.exec(I);){var K=G[0],Z=F.insertMode;if(Kt){E(K);continue}var se=wt.handleKey(b,K,"mapping");if(!se&&Z&&F.insertMode){if(K[0]=="<"){var de=K.toLowerCase().slice(1,-1),ke=de.split("-");if(de=ke.pop()||"",de=="lt")K="<";else if(de=="space")K=" ";else if(de=="cr")K=`
1399
+ `;else{if(Wo.hasOwnProperty(de)){K=Wo[de],Xo(b,K);continue}K=K[0],W.lastIndex=G.index+1}}b.replaceSelection(K)}}}finally{if(cn.pop(),vi=cn.length?z:!1,!cn.length&&Kt){var Te=Kt;Kt=null,Nr(b,Te)}}}function B(b,I){var S=b.key;if(!yr[S]){S.length>1&&S[0]=="n"&&(S=S.replace("Numpad","")),S=ri[S]||S;var z="";if(b.ctrlKey&&(z+="C-"),b.altKey&&(z+="A-"),b.metaKey&&(z+="M-"),Ve.isMac&&b.altKey&&!b.metaKey&&!b.ctrlKey&&(z=z.slice(2)),(z||S.length>1)&&b.shiftKey&&(z+="S-"),I&&!I.expectLiteralNext&&S.length==1){if(En.keymap&&S in En.keymap)(En.remapCtrl!=0||!z)&&(S=En.keymap[S]);else if(S.charCodeAt(0)>255){var F=b.code&&b.code.slice(-1)||"";b.shiftKey||(F=F.toLowerCase()),F&&(S=F)}}return z+=S,z.length>1&&(z="<"+z+">"),z}}function N(b,I){En.string!==b&&(En=M(b)),En.remapCtrl=I}function M(b){function I(z){return z.split(/\\?(.)/).filter(Boolean)}var S={};return b?(b.split(/((?:[^\\,]|\\.)+),/).map(function(z){if(z){var F=z.split(/((?:[^\\;]|\\.)+);/);if(F.length==3){var W=I(F[1]),G=I(F[2]);if(W.length!==G.length)return;for(var K=0;K<W.length;++K)S[W[K]]=G[K]}else if(F.length==1){var Z=I(z);if(Z.length%2!==0)return;for(var K=0;K<Z.length;K+=2)S[Z[K]]=Z[K+1]}}}),{keymap:S,string:b}):{keymap:S,string:""}}function $(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function A(b,I){b.state.vim.inputState=new $,b.state.vim.expectLiteralNext=!1,Ve.signal(b,"vim-command-done",I)}function D(){this.removed=[],this.inserted=""}function j(b,I,S){this.clear(),this.keyBuffer=[b||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!I,this.blockwise=!!S}function U(b,I){var S=Ge.registerController.registers;if(!b||b.length!=1)throw Error("Register name must be 1 character");S[b]=I,Oe.push(b)}function q(b){this.registers=b,this.unnamedRegister=b['"']=new j,b["."]=new j,b[":"]=new j,b["/"]=new j,b["+"]=new j}function Q(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function re(b,I){Jn[b]=I}function le(b,I){for(var S=[],z=0;z<I;z++)S.push(b);return S}function ne(b,I){Gs[b]=I}function ue(b,I){ar[b]=I}function he(b,I,S){var z=b.state.vim,F=z.insertMode||z.visualMode,W=Math.min(Math.max(b.firstLine(),I.line),b.lastLine()),G=b.getLine(W),K=G.length-1+ +!!F,Z=Math.min(Math.max(0,I.ch),K),se=G.charCodeAt(Z);if(56320<=se&&se<=57343){var de=1;S&&S.line==W&&S.ch>Z&&(de=-1),Z+=de,Z>K&&(Z-=2)}return new je(W,Z)}function oe(b){var I={};for(var S in b)b.hasOwnProperty(S)&&(I[S]=b[S]);return I}function ee(b,I,S){return typeof I=="object"&&(S=I.ch,I=I.line),new je(b.line+I,b.ch+S)}function ye(b,I,S,z){z.operator&&(S="operatorPending");for(var F,W=[],G=[],K=vi?I.length-xo:0,Z=K;Z<I.length;Z++){var se=I[Z];S=="insert"&&se.context!="insert"||se.context&&se.context!=S||z.operator&&se.type=="action"||!(F=we(b,se.keys))||(F=="partial"&&W.push(se),F=="full"&&G.push(se))}return{partial:W.length&&W,full:G.length&&G}}function we(b,I){var S=I.slice(-11)=="<character>",z=I.slice(-10)=="<register>";if(S||z){var F=I.length-(S?11:10),W=b.slice(0,F),G=I.slice(0,F);return W==G&&b.length>F?"full":G.indexOf(W)==0?"partial":!1}return b==I?"full":I.indexOf(b)==0?"partial":!1}function Ae(b){var I=/^.*(<[^>]+>)$/.exec(b),S=I?I[1]:b.slice(-1);if(S.length>1)switch(S){case"<CR>":S=`
1400
+ `;break;case"<Space>":S=" ";break;default:S=""}return S}function Je(b,I,S){return function(){for(var z=0;z<S;z++)I(b)}}function Be(b){return new je(b.line,b.ch)}function Ye(b,I){return b.ch==I.ch&&b.line==I.line}function Ze(b,I){return b.line<I.line?!0:b.line==I.line&&b.ch<I.ch}function lt(b,I){return arguments.length>2&&(I=lt.apply(void 0,Array.prototype.slice.call(arguments,1))),Ze(b,I)?b:I}function ct(b,I){return arguments.length>2&&(I=ct.apply(void 0,Array.prototype.slice.call(arguments,1))),Ze(b,I)?I:b}function jt(b,I,S){var z=Ze(b,I),F=Ze(I,S);return z&&F}function Ie(b,I){return b.getLine(I).length}function Ct(b){return b.trim?b.trim():b.replace(/^\s+|\s+$/g,"")}function St(b){return b.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function qt(b,I,S){var z=Ie(b,I),F=new Array(S-z+1).join(" ");b.setCursor(new je(I,z)),b.replaceRange(F,b.getCursor())}function dn(b,I){var S=[],z=b.listSelections(),F=Be(b.clipPos(I)),W=!Ye(I,F),G=b.getCursor("head"),K=pt(z,G),Z=Ye(z[K].head,z[K].anchor),se=z.length-1,de=se-K>K?se:0,ke=z[de].anchor,Te=Math.min(ke.line,F.line),Ce=Math.max(ke.line,F.line),$e=ke.ch,Fe=F.ch,Pe=z[de].head.ch-$e,et=Fe-$e;Pe>0&&et<=0?($e++,W||Fe--):Pe<0&&et>=0?($e--,Z||Fe++):Pe<0&&et==-1&&($e--,Fe++);for(var kt=Te;kt<=Ce;kt++){var ut={anchor:new je(kt,$e),head:new je(kt,Fe)};S.push(ut)}return b.setSelections(S),I.ch=Fe,ke.ch=$e,ke}function Sn(b,I,S){for(var z=[],F=0;F<S;F++){var W=ee(I,F,0);z.push({anchor:W,head:W})}b.setSelections(z,0)}function pt(b,I,S){for(var z=0;z<b.length;z++){var F=Ye(b[z].anchor,I),W=Ye(b[z].head,I);if(F||W)return z}return-1}function it(b,I){var S=I.lastSelection,z=function(){var W=b.listSelections(),G=W[0],K=W[W.length-1],Z=Ze(G.anchor,G.head)?G.anchor:G.head,se=Ze(K.anchor,K.head)?K.head:K.anchor;return[Z,se]},F=function(){var W=b.getCursor(),G=b.getCursor(),K=S.visualBlock;if(K){var Z=K.width,se=K.height;G=new je(W.line+se,W.ch+Z);for(var de=[],ke=W.line;ke<G.line;ke++){var Te=new je(ke,W.ch),Ce=new je(ke,G.ch),$e={anchor:Te,head:Ce};de.push($e)}b.setSelections(de)}else{var Fe=S.anchorMark.find(),Pe=S.headMark.find(),et=Pe.line-Fe.line,kt=Pe.ch-Fe.ch;G={line:G.line+et,ch:et?G.ch:kt+G.ch},S.visualLine&&(W=new je(W.line,0),G=new je(G.line,Ie(b,G.line))),b.setSelection(W,G)}return[W,G]};return I.visualMode?z():F()}function Yt(b,I){var S=I.sel.anchor,z=I.sel.head;I.lastPastedText&&(z=b.posFromIndex(b.indexFromPos(S)+I.lastPastedText.length),I.lastPastedText=null),I.lastSelection={anchorMark:b.setBookmark(S),headMark:b.setBookmark(z),anchor:Be(S),head:Be(z),visualMode:I.visualMode,visualLine:I.visualLine,visualBlock:I.visualBlock}}function Fn(b,I,S,z){var F=b.state.vim.sel,W=z?I:F.head,G=z?I:F.anchor,K;return Ze(S,I)&&(K=S,S=I,I=K),Ze(W,G)?(W=lt(I,W),G=ct(G,S)):(G=lt(I,G),W=ct(W,S),W=ee(W,0,-1),W.ch==-1&&W.line!=b.firstLine()&&(W=new je(W.line-1,Ie(b,W.line-1)))),[G,W]}function Tn(b,I,F){var z=b.state.vim;I=I||z.sel;var F=F||z.visualLine?"line":z.visualBlock?"block":"char",W=Dn(b,I,F);b.setSelections(W.ranges,W.primary)}function Dn(b,I,S,z){var F=Be(I.head),W=Be(I.anchor);if(S=="char"){var G=!z&&!Ze(I.head,I.anchor)?1:0,K=Ze(I.head,I.anchor)?1:0;return F=ee(I.head,0,G),W=ee(I.anchor,0,K),{ranges:[{anchor:W,head:F}],primary:0}}if(S=="line"){if(Ze(I.head,I.anchor))F.ch=0,W.ch=Ie(b,W.line);else{W.ch=0;var Z=b.lastLine();F.line>Z&&(F.line=Z),F.ch=Ie(b,F.line)}return{ranges:[{anchor:W,head:F}],primary:0}}if(S=="block"){var se=Math.min(W.line,F.line),de=W.ch,ke=Math.max(W.line,F.line),Te=F.ch;de<Te?Te+=1:de+=1;for(var Ce=ke-se+1,$e=F.line==se?0:Ce-1,Fe=[],Pe=0;Pe<Ce;Pe++)Fe.push({anchor:new je(se+Pe,de),head:new je(se+Pe,Te)});return{ranges:Fe,primary:$e}}}function Vn(b){var I=b.getCursor("head");return b.getSelection().length==1&&(I=lt(I,b.getCursor("anchor"))),I}function Ln(b,I){var S=b.state.vim;I!==!1&&b.setCursor(he(b,S.sel.head)),Yt(b,S),S.visualMode=!1,S.visualLine=!1,S.visualBlock=!1,S.insertMode||Ve.signal(b,"vim-mode-change",{mode:"normal"})}function Gn(b,I,S){var z=b.getRange(I,S);if(/\n\s*$/.test(z)){var F=z.split(`
1401
+ `);F.pop();for(var W,W=F.pop();F.length>0&&W&&m(W);W=F.pop())S.line--,S.ch=0;W?(S.line--,S.ch=Ie(b,S.line)):S.ch=0}}function er(b,I,S){I.ch=0,S.ch=0,S.line++}function fn(b){if(!b)return 0;var I=b.search(/\S/);return I==-1?b.length:I}function Pn(b,I,S){var z=I.inclusive,F=I.innerWord,W=I.bigWord,G=I.noSymbol,K=I.multiline,Z=S||Vn(b),se=b.getLine(Z.line),de=se,ke=Z.line,Te=ke,Ce=Z.ch,$e,Fe=G?X[0]:xe[0];if(F&&/\s/.test(se.charAt(Ce)))Fe=function(Hn){return/\s/.test(Hn)};else{for(;!Fe(se.charAt(Ce));)if(Ce++,Ce>=se.length){if(!K)return null;Ce--,$e=fo(b,Z,!0,W,!0);break}W?Fe=xe[0]:(Fe=X[0],Fe(se.charAt(Ce))||(Fe=X[1]))}for(var Pe=Ce,et=Ce;Fe(se.charAt(et))&&et>=0;)et--;if(et++,$e)Pe=$e.to,Te=$e.line,de=b.getLine(Te),!de&&Pe==0&&Pe++;else for(;Fe(se.charAt(Pe))&&Pe<se.length;)Pe++;if(z){var kt=Pe,ut=Z.ch<=et&&/\s/.test(se.charAt(Z.ch));if(!ut)for(;/\s/.test(de.charAt(Pe))&&Pe<de.length;)Pe++;if(kt==Pe||ut){for(var ft=et;/\s/.test(se.charAt(et-1))&&et>0;)et--;!et&&!ut&&(et=ft)}}return{start:new je(ke,et),end:new je(Te,Pe)}}function Ei(b,I,S){var z=I;if(!Ve.findMatchingTag||!Ve.findEnclosingTag)return{start:z,end:z};var F=Ve.findMatchingTag(b,I)||Ve.findEnclosingTag(b,I);return!F||!F.open||!F.close?{start:z,end:z}:S?{start:F.open.from,end:F.close.to}:{start:F.open.to,end:F.close.from}}function Xr(b,I,S){Ye(I,S)||Ge.jumpList.add(b,I,S)}function ei(b,I){Ge.lastCharacterSearch.increment=b,Ge.lastCharacterSearch.forward=I.forward,Ge.lastCharacterSearch.selectedCharacter=I.selectedCharacter}function Ii(b,I,S,z){var F=Be(b.getCursor()),W=S?1:-1,G=S?b.lineCount():-1,K=F.ch,Z=F.line,se=b.getLine(Z),de={lineText:se,nextCh:se.charAt(K),lastCh:null,index:K,symb:z,reverseSymb:(S?{")":"(","}":"{"}:{"(":")","{":"}"})[z],forward:S,depth:0,curMoveThrough:!1},ke=to[z];if(!ke)return F;var Te=no[ke].init,Ce=no[ke].isComplete;for(Te&&Te(de);Z!==G&&I;){if(de.index+=W,de.nextCh=de.lineText.charAt(de.index),!de.nextCh){if(Z+=W,de.lineText=b.getLine(Z)||"",W>0)de.index=0;else{var $e=de.lineText.length;de.index=$e>0?$e-1:0}de.nextCh=de.lineText.charAt(de.index)}Ce(de)&&(F.line=Z,F.ch=de.index,I--)}return de.nextCh||de.curMoveThrough?new je(Z,de.index):F}function fo(b,I,S,z,F){var W=I.line,G=I.ch,K=b.getLine(W),Z=S?1:-1,se=z?xe:X;if(F&&K==""){if(W+=Z,K=b.getLine(W),!l(b,W))return null;G=S?0:K.length}for(;;){if(F&&K=="")return{from:0,to:0,line:W};for(var de=Z>0?K.length:-1,ke=de,Te=de;G!=de;){for(var Ce=!1,$e=0;$e<se.length&&!Ce;++$e)if(se[$e](K.charAt(G))){for(ke=G;G!=de&&se[$e](K.charAt(G));)G+=Z;if(Te=G,Ce=ke!=Te,ke==I.ch&&W==I.line&&Te==ke+Z)continue;return{from:Math.min(ke,Te+1),to:Math.max(ke,Te),line:W}}Ce||(G+=Z)}if(W+=Z,!l(b,W))return null;K=b.getLine(W),G=Z>0?0:K.length}}function vr(b,I,S,z,F,W){var G=Be(I),K=[];(z&&!F||!z&&F)&&S++;for(var Z=!z||!F,se=0;se<S;se++){var de=fo(b,I,z,W,Z);if(!de){var ke=Ie(b,b.lastLine());K.push(z?{line:b.lastLine(),from:ke,to:ke}:{line:0,from:0,to:0});break}K.push(de),I=new je(de.line,z?de.to-1:de.from)}var Te=K.length!=S,Ce=K[0],$e=K.pop();return z&&!F?(!Te&&(Ce.from!=G.ch||Ce.line!=G.line)&&($e=K.pop()),new je($e.line,$e.from)):z&&F?new je($e.line,$e.to-1):!z&&F?(!Te&&(Ce.to!=G.ch||Ce.line!=G.line)&&($e=K.pop()),new je($e.line,$e.to)):new je($e.line,$e.from)}function Ji(b,I,S,z,F){var W=I,G=new je(W.line+S.repeat-1,1/0),K=b.clipPos(G);return K.ch--,F||(z.lastHPos=1/0,z.lastHSPos=b.charCoords(K,"div").left),G}function jr(b,I,S,z,F){for(var W=F||b.getCursor(),G=W.ch,K,Z=0;Z<I;Z++){var se=b.getLine(W.line);if(K=Us(G,se,z,S),K==-1)return null;G=K}return new je(b.getCursor().line,K)}function po(b,I){var S=b.getCursor().line;return he(b,new je(S,I-1))}function ur(b,I,S,z){!x(S,Me)&&!Ke.test(S)||(I.marks[S]&&I.marks[S].clear(),I.marks[S]=b.setBookmark(z))}function Us(b,I,S,z,F){var W;return z?(W=I.indexOf(S,b+1),W!=-1):(W=I.lastIndexOf(S,b-1),W!=-1),W}function gs(b,I,S,z,F){function W(et){return!/\S/.test(b.getLine(et))}function G(et,kt,ut){return ut?W(et)!=W(et+kt):!W(et)&&W(et+kt)}function K(et){z=z>0?1:-1;var kt=b.ace.session.getFoldLine(et);kt&&et+z>kt.start.row&&et+z<kt.end.row&&(z=(z>0?kt.end.row:kt.start.row)-et)}var Z=I.line,se=b.firstLine(),de=b.lastLine(),ke,Te,Ce=Z;if(z){for(;se<=Ce&&Ce<=de&&S>0;)K(Ce),G(Ce,z)&&S--,Ce+=z;return new je(Ce,0)}var $e=b.state.vim;if($e.visualLine&&G(Z,1,!0)){var Fe=$e.sel.anchor;G(Fe.line,-1,!0)&&(!F||Fe.line!=Z)&&(Z+=1)}var Pe=W(Z);for(Ce=Z;Ce<=de&&S;Ce++)G(Ce,1,!0)&&(!F||W(Ce)!=Pe)&&S--;for(Te=new je(Ce,0),Ce>de&&!Pe?Pe=!0:F=!1,Ce=Z;Ce>se&&!((!F||W(Ce)==Pe||Ce==Z)&&G(Ce,-1,!0));Ce--);return ke=new je(Ce,0),{start:ke,end:Te}}function Ko(b,I,S,z,F){function W(se){se.pos+se.dir<0||se.pos+se.dir>=se.line.length?se.line=null:se.pos+=se.dir}function G(se,de,ke,Te){var Ce=se.getLine(de),$e={line:Ce,ln:de,pos:ke,dir:Te};if($e.line==="")return{ln:$e.ln,pos:$e.pos};var Fe=$e.pos;for(W($e);$e.line!==null;){if(Fe=$e.pos,w($e.line[$e.pos])){if(!F)return{ln:$e.ln,pos:$e.pos+1};for(W($e);$e.line!==null&&m($e.line[$e.pos]);)Fe=$e.pos,W($e);return{ln:$e.ln,pos:Fe+1}}W($e)}return{ln:$e.ln,pos:Fe+1}}function K(se,de,ke,Te){var Ce=se.getLine(de),$e={line:Ce,ln:de,pos:ke,dir:Te};if($e.line==="")return{ln:$e.ln,pos:$e.pos};var Fe=$e.pos;for(W($e);$e.line!==null;){if(!m($e.line[$e.pos])&&!w($e.line[$e.pos]))Fe=$e.pos;else if(w($e.line[$e.pos]))return F?m($e.line[$e.pos+1])?{ln:$e.ln,pos:$e.pos+1}:{ln:$e.ln,pos:Fe}:{ln:$e.ln,pos:Fe};W($e)}return $e.line=Ce,F&&m($e.line[$e.pos])?{ln:$e.ln,pos:$e.pos}:{ln:$e.ln,pos:Fe}}for(var Z={ln:I.line,pos:I.ch};S>0;)z<0?Z=K(b,Z.ln,Z.pos,z):Z=G(b,Z.ln,Z.pos,z),S--;return new je(Z.ln,Z.pos)}function Mi(b,I,S,z){function F(Z,se){if(se.pos+se.dir<0||se.pos+se.dir>=se.line.length){if(se.ln+=se.dir,!l(Z,se.ln)){se.line=null,se.ln=null,se.pos=null;return}se.line=Z.getLine(se.ln),se.pos=se.dir>0?0:se.line.length-1}else se.pos+=se.dir}function W(Z,se,de,ke){var Pe=Z.getLine(se),Te=Pe==="",Ce={line:Pe,ln:se,pos:de,dir:ke},$e={ln:Ce.ln,pos:Ce.pos},Fe=Ce.line==="";for(F(Z,Ce);Ce.line!==null;){if($e.ln=Ce.ln,$e.pos=Ce.pos,Ce.line===""&&!Fe)return{ln:Ce.ln,pos:Ce.pos};if(Te&&Ce.line!==""&&!m(Ce.line[Ce.pos]))return{ln:Ce.ln,pos:Ce.pos};w(Ce.line[Ce.pos])&&!Te&&(Ce.pos===Ce.line.length-1||m(Ce.line[Ce.pos+1]))&&(Te=!0),F(Z,Ce)}var Pe=Z.getLine($e.ln);$e.pos=0;for(var et=Pe.length-1;et>=0;--et)if(!m(Pe[et])){$e.pos=et;break}return $e}function G(Z,se,de,ke){var Fe=Z.getLine(se),Te={line:Fe,ln:se,pos:de,dir:ke},Ce={ln:Te.ln,pos:null},$e=Te.line==="";for(F(Z,Te);Te.line!==null;){if(Te.line===""&&!$e)return Ce.pos!==null?Ce:{ln:Te.ln,pos:Te.pos};if(!(!w(Te.line[Te.pos])||Ce.pos===null||Te.ln===Ce.ln&&Te.pos+1===Ce.pos))return Ce;Te.line!==""&&!m(Te.line[Te.pos])&&($e=!1,Ce={ln:Te.ln,pos:Te.pos}),F(Z,Te)}var Fe=Z.getLine(Ce.ln);Ce.pos=0;for(var Pe=0;Pe<Fe.length;++Pe)if(!m(Fe[Pe])){Ce.pos=Pe;break}return Ce}for(var K={ln:I.line,pos:I.ch};S>0;)z<0?K=G(b,K.ln,K.pos,z):K=W(b,K.ln,K.pos,z),S--;return new je(K.ln,K.pos)}function qn(b,I,S,z){var F=I,W,G,K={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[S],Z={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[S],se=b.getLine(F.line).charAt(F.ch),de=se===Z?1:0;if(W=b.scanForBracket(new je(F.line,F.ch+de),-1,void 0,{bracketRegex:K}),G=b.scanForBracket(new je(F.line,F.ch+de),1,void 0,{bracketRegex:K}),!W||!G)return null;if(W=W.pos,G=G.pos,W.line==G.line&&W.ch>G.ch||W.line>G.line){var ke=W;W=G,G=ke}return z?G.ch+=1:W.ch+=1,{start:W,end:G}}function Ar(b,I,S,z){var F=Be(I),W=b.getLine(F.line),G=W.split(""),K,Z,se,de,ke=G.indexOf(S);if(F.ch<ke)F.ch=ke;else if(ke<F.ch&&G[F.ch]==S){var Te=/string/.test(b.getTokenTypeAt(ee(I,0,1))),Ce=/string/.test(b.getTokenTypeAt(I)),$e=Te&&!Ce;$e||(Z=F.ch,--F.ch)}if(G[F.ch]==S&&!Z)K=F.ch+1;else for(se=F.ch;se>-1&&!K;se--)G[se]==S&&(K=se+1);if(K&&!Z)for(se=K,de=G.length;se<de&&!Z;se++)G[se]==S&&(Z=se);return!K||!Z?{start:F,end:F}:(z&&(--K,++Z),{start:new je(F.line,K),end:new je(F.line,Z)})}function Or(){}function vn(b){var I=b.state.vim;return I.searchState_||(I.searchState_=new Or)}function jn(b){return di(b,"/")}function Ri(b){return ms(b,"/")}function di(b,I){var S=ms(b,I)||[];if(!S.length)return[];var z=[];if(S[0]===0){for(var F=0;F<S.length;F++)typeof S[F]=="number"&&z.push(b.substring(S[F]+1,S[F+1]));return z}}function ms(b,I){I||(I="/");for(var S=!1,z=[],F=0;F<b.length;F++){var W=b.charAt(F);!S&&W==I&&z.push(F),S=!S&&W=="\\"}return z}function vs(b){for(var I="|(){",S="}",z=!1,F=[],W=-1;W<b.length;W++){var G=b.charAt(W)||"",K=b.charAt(W+1)||"",Z=K&&I.indexOf(K)!=-1;z?((G!=="\\"||!Z)&&F.push(G),z=!1):G==="\\"?(z=!0,K&&S.indexOf(K)!=-1&&(Z=!0),(!Z||K==="\\")&&F.push(G)):(F.push(G),Z&&K!=="\\"&&F.push("\\"))}return F.join("")}function ys(b){for(var I=!1,S=[],z=-1;z<b.length;z++){var F=b.charAt(z)||"",W=b.charAt(z+1)||"";Co[F+W]?(S.push(Co[F+W]),z++):I?(S.push(F),I=!1):F==="\\"?(I=!0,o(W)||W==="$"?S.push("$"):W!=="/"&&W!=="\\"&&S.push("\\")):(F==="$"&&S.push("$"),S.push(F),W==="/"&&S.push("\\"))}return S.join("")}function bs(b){for(var I=new Ve.StringStream(b),S=[];!I.eol();){for(;I.peek()&&I.peek()!="\\";)S.push(I.next());var z=!1;for(var F in Ia)if(I.match(F,!0)){z=!0,S.push(Ia[F]);break}z||S.push(I.next())}return S.join("")}function fi(b,I,S){var z=Ge.registerController.getRegister("/");if(z.setText(b),b instanceof RegExp)return b;var F=Ri(b),W,G;if(!F.length)W=b;else{W=b.substring(0,F[0]);var K=b.substring(F[0]);G=K.indexOf("i")!=-1}if(!W)return null;_("pcre")||(W=vs(W)),S&&(I=/^[^A-Z]*$/.test(W));var Z=new RegExp(W,I||G?"im":"m");return Z}function Li(b){typeof b=="string"&&(b=document.createElement(b));for(var I,S=1;S<arguments.length;S++)if(I=arguments[S])if(typeof I!="object"&&(I=document.createTextNode(I)),I.nodeType)b.appendChild(I);else for(var z in I)Object.prototype.hasOwnProperty.call(I,z)&&(z[0]==="$"?b.style[z.slice(1)]=I[z]:b.setAttribute(z,I[z]));return b}function Pt(b,I){var S=Li("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},I);b.openNotification?b.openNotification(S,{bottom:!0,duration:5e3}):alert(S.innerText)}function Vs(b,I){return Li("div",{$display:"flex"},Li("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},b,Li("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),I&&Li("span",{$color:"#888"},I))}function Nr(b,I){if(cn.length){I.value||(I.value=""),Kt=I;return}var S=Vs(I.prefix,I.desc);if(b.openDialog)b.openDialog(S,I.onClose,{onKeyDown:I.onKeyDown,onKeyUp:I.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:I.value});else{var z="";typeof I.prefix!="string"&&I.prefix&&(z+=I.prefix.textContent),I.desc&&(z+=" "+I.desc),I.onClose(prompt(z,""))}}function zt(b,I){if(b instanceof RegExp&&I instanceof RegExp){for(var S=["global","multiline","ignoreCase","source"],z=0;z<S.length;z++){var F=S[z];if(b[F]!==I[F])return!1}return!0}return!1}function pn(b,I,S,z){if(I){var F=vn(b),W=fi(I,!!S,!!z);if(W)return go(b,W),zt(W,F.getQuery())||F.setQuery(W),W}}function Yn(b){if(b.source.charAt(0)=="^")var I=!0;return{token:function(S){if(I&&!S.sol()){S.skipToEnd();return}var z=S.match(b,!1);if(z)return z[0].length==0?(S.next(),"searching"):!S.sol()&&(S.backUp(1),!b.exec(S.next()+z[0]))?(S.next(),null):(S.match(b),"searching");for(;!S.eol()&&(S.next(),!S.match(b,!1)););},query:b}}function go(b,I){clearTimeout(Cn);var S=vn(b);S.highlightTimeout=Cn,Cn=setTimeout(function(){if(b.state.vim){var z=vn(b);z.highlightTimeout=null;var F=z.getOverlay();(!F||I!=F.query)&&(F&&b.removeOverlay(F),F=Yn(I),b.addOverlay(F),b.showMatchesOnScrollbar&&(z.getScrollbarAnnotate()&&z.getScrollbarAnnotate().clear(),z.setScrollbarAnnotate(b.showMatchesOnScrollbar(I))),z.setOverlay(F))}},50)}function tr(b,I,S,z){return z===void 0&&(z=1),b.operation(function(){for(var F=b.getCursor(),W=b.getSearchCursor(S,F),G=0;G<z;G++){var K=W.find(I);if(G==0&&K&&Ye(W.from(),F)){var Z=I?W.from():W.to();K=W.find(I),K&&!K[0]&&Ye(W.from(),Z)&&b.getLine(Z.line).length==Z.ch&&(K=W.find(I))}if(!K&&(W=b.getSearchCursor(S,I?new je(b.lastLine()):new je(b.firstLine(),0)),!W.find(I)))return}return W.from()})}function mo(b,I,S,z,F){return z===void 0&&(z=1),b.operation(function(){var W=b.getCursor(),G=b.getSearchCursor(S,W),K=G.find(!I);!F.visualMode&&K&&Ye(G.from(),W)&&G.find(!I);for(var Z=0;Z<z;Z++)if(K=G.find(I),!K&&(G=b.getSearchCursor(S,I?new je(b.lastLine()):new je(b.firstLine(),0)),!G.find(I)))return;return[G.from(),G.to()]})}function Oi(b){var I=vn(b);I.highlightTimeout&&(clearTimeout(I.highlightTimeout),I.highlightTimeout=null),b.removeOverlay(vn(b).getOverlay()),I.setOverlay(null),I.getScrollbarAnnotate()&&(I.getScrollbarAnnotate().clear(),I.setScrollbarAnnotate(null))}function ws(b,I,S){return typeof b!="number"&&(b=b.line),I instanceof Array?x(b,I):typeof S=="number"?b>=I&&b<=S:b==I}function vo(b){var I=b.ace.renderer;return{top:I.getFirstFullyVisibleRow(),bottom:I.getLastFullyVisibleRow()}}function pi(b,I,S){if(S=="'"||S=="`")return Ge.jumpList.find(b,-1)||new je(0,0);if(S==".")return Do(b);var z=I.marks[S];return z&&z.find()}function Do(b){if(b.getLastEditEnd)return b.getLastEditEnd();for(var I=b.doc.history.done,S=I.length;S--;)if(I[S].changes)return Be(I[S].changes[0].to)}function ti(b,I,S,z,F,W,G,K,Z){function se(){b.operation(function(){for(;!Fe;)de(),Te();Ce()})}function de(){var ut=b.getRange(W.from(),W.to()),ft=ut.replace(G,K),Hn=W.to().line;W.replace(ft),et=W.to().line,F+=et-Hn,kt=et<Hn}function ke(){var ut=Pe&&Be(W.to()),ft=W.findNext();return ft&&!ft[0]&&ut&&Ye(W.from(),ut)&&(ft=W.findNext()),ft}function Te(){for(;ke()&&ws(W.from(),z,F);)if(!(!S&&W.from().line==et&&!kt)){b.scrollIntoView(W.from(),30),b.setSelection(W.from(),W.to()),Pe=W.from(),Fe=!1;return}Fe=!0}function Ce(ut){if(ut&&ut(),b.focus(),Pe){b.setCursor(Pe);var ft=b.state.vim;ft.exMode=!1,ft.lastHPos=ft.lastHSPos=Pe.ch}Z&&Z()}function $e(ut,ft,Hn){Ve.e_stop(ut);var Lt=B(ut);switch(Lt){case"y":de(),Te();break;case"n":Te();break;case"a":var un=Z;Z=void 0,b.operation(se),Z=un;break;case"l":de();case"q":case"<Esc>":case"<C-c>":case"<C-[>":Ce(Hn)}return Fe&&Ce(Hn),!0}b.state.vim.exMode=!0;var Fe=!1,Pe,et,kt;if(Te(),Fe){Pt(b,"No matches for "+G.source);return}if(!I){se(),Z&&Z();return}Nr(b,{prefix:Li("span","replace with ",Li("strong",K)," (y/n/a/q/l)"),onKeyDown:$e})}function Dr(b,I){var S=b.state.vim,z=Ge.macroModeState,F=Ge.registerController.getRegister("."),W=z.isPlaying,G=z.lastInsertModeChanges;W||(b.off("change",Qo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=null,Ve.off(b.getInputField(),"keydown",Bo)),!W&&S.insertModeRepeat>1&&(Cs(b,S,S.insertModeRepeat-1,!0),S.lastEditInputState.repeatOverride=S.insertModeRepeat),delete S.insertModeRepeat,S.insertMode=!1,I||b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption("keyMap","vim"),b.setOption("disableInput",!0),b.toggleOverwrite(!1),F.setText(G.changes.join("")),Ve.signal(b,"vim-mode-change",{mode:"normal"}),z.isRecording&&nr(z)}function yo(b){Wn.unshift(b)}function Ni(b,I,S,z,F){var W={keys:b,type:I};W[I]=S,W[I+"Args"]=z;for(var G in F)W[G]=F[G];yo(W)}function Jo(b,I,S,z){var F=Ge.registerController.getRegister(z);if(z==":"){F.keyBuffer[0]&&ii.processCommand(b,F.keyBuffer[0]),S.isPlaying=!1;return}var W=F.keyBuffer,G=0;S.isPlaying=!0,S.replaySearchQueries=F.searchQueries.slice(0);for(var K=0;K<W.length;K++)for(var Z=W[K],se,de;Z;)if(se=/<\w+-.+?>|<\w+>|./.exec(Z),de=se[0],Z=Z.substring(se.index+de.length),wt.handleKey(b,de,"macro"),I.insertMode){var ke=F.insertModeChanges[G++].changes;Ge.macroModeState.lastInsertModeChanges.changes=ke,es(b,ke,1),Dr(b)}S.isPlaying=!1}function Po(b,I){if(!b.isPlaying){var S=b.latestRegister,z=Ge.registerController.getRegister(S);z&&z.pushText(I)}}function nr(b){if(!b.isPlaying){var I=b.latestRegister,S=Ge.registerController.getRegister(I);S&&S.pushInsertModeChanges&&S.pushInsertModeChanges(b.lastInsertModeChanges)}}function zo(b,I){if(!b.isPlaying){var S=b.latestRegister,z=Ge.registerController.getRegister(S);z&&z.pushSearchQuery&&z.pushSearchQuery(I)}}function Qo(b,I){var S=Ge.macroModeState,z=S.lastInsertModeChanges;if(!S.isPlaying)for(var F=b.state.vim;I;){if(z.expectCursorActivityForChange=!0,z.ignoreCount>1)z.ignoreCount--;else if(I.origin=="+input"||I.origin=="paste"||I.origin===void 0){var W=b.listSelections().length;W>1&&(z.ignoreCount=W);var G=I.text.join(`
1402
+ `);if(z.maybeReset&&(z.changes=[],z.maybeReset=!1),G)if(b.state.overwrite&&!/\n/.test(G))z.changes.push([G]);else{if(G.length>1){var K=F&&F.insertEnd&&F.insertEnd.find(),Z=b.getCursor();if(K&&K.line==Z.line){var se=K.ch-Z.ch;se>0&&se<G.length&&(z.changes.push([G,se]),G="")}}G&&z.changes.push(G)}}I=I.next}}function Qi(b){var I=b.state.vim;if(I.insertMode){var S=Ge.macroModeState;if(S.isPlaying)return;var z=S.lastInsertModeChanges;z.expectCursorActivityForChange?z.expectCursorActivityForChange=!1:(z.maybeReset=!0,I.insertEnd&&I.insertEnd.clear(),I.insertEnd=b.setBookmark(b.getCursor(),{insertLeft:!0}))}else b.curOp.isVimOp||xs(b,I)}function xs(b,I,S){var z=b.getCursor("anchor"),F=b.getCursor("head");if(I.visualMode&&!b.somethingSelected()?Ln(b,!1):!I.visualMode&&!I.insertMode&&b.somethingSelected()&&(I.visualMode=!0,I.visualLine=!1,Ve.signal(b,"vim-mode-change",{mode:"visual"})),I.visualMode){var W=Ze(F,z)?0:-1,G=Ze(F,z)?-1:0;F=ee(F,0,W),z=ee(z,0,G),I.sel={anchor:z,head:F},ur(b,I,"<",lt(F,z)),ur(b,I,">",ct(F,z))}else!I.insertMode&&!S&&(I.lastHPos=b.getCursor().ch)}function Zo(b,I){this.keyName=b,this.key=I.key,this.ctrlKey=I.ctrlKey,this.altKey=I.altKey,this.metaKey=I.metaKey,this.shiftKey=I.shiftKey}function Bo(b){var I=Ge.macroModeState,S=I.lastInsertModeChanges,z=Ve.keyName?Ve.keyName(b):b.key;z&&(z.indexOf("Delete")!=-1||z.indexOf("Backspace")!=-1)&&(S.maybeReset&&(S.changes=[],S.maybeReset=!1),S.changes.push(new Zo(z,b)))}function Cs(b,I,S,z){function F(){K?eo.processAction(b,I,I.lastEditActionCommand):eo.evalInput(b,I)}function W(de){if(G.lastInsertModeChanges.changes.length>0){de=I.lastEditActionCommand?de:1;var ke=G.lastInsertModeChanges;es(b,ke.changes,de)}}var G=Ge.macroModeState;G.isPlaying=!0;var K=!!I.lastEditActionCommand,Z=I.inputState;if(I.inputState=I.lastEditInputState,K&&I.lastEditActionCommand.interlaceInsertRepeat)for(var se=0;se<S;se++)F(),W(1);else z||F(),W(S);I.inputState=Z,I.insertMode&&!z&&Dr(b),G.isPlaying=!1}function Xo(b,I){Ve.lookupKey(I,"vim-insert",function(S){return typeof S=="string"?Ve.commands[S](b):S(b),!0})}function es(b,I,S){var z=b.getCursor("head"),F=Ge.macroModeState.lastInsertModeChanges.visualBlock;F&&(Sn(b,z,F+1),S=b.listSelections().length,b.setCursor(z));for(var W=0;W<S;W++){F&&b.setCursor(ee(z,W,0));for(var G=0;G<I.length;G++){var K=I[G];if(K instanceof Zo)Xo(b,K.keyName);else if(typeof K=="string")b.replaceSelection(K);else{var Z=b.getCursor(),se=ee(Z,0,K[0].length-(K[1]||0));b.replaceRange(K[0],Z,K[1]?Z:se),b.setCursor(se)}}}F&&b.setCursor(ee(z,0,1))}function ks(b,I,S,z){I.length>1&&I[0]=="n"&&(I=I.replace("numpad","")),I=os[I]||I;var F="";if(S.ctrlKey&&(F+="C-"),S.altKey&&(F+="A-"),(F||I.length>1)&&S.shiftKey&&(F+="S-"),z&&!z.expectLiteralNext&&I.length==1){if(En.keymap&&I in En.keymap)(En.remapCtrl!==!1||!F)&&(I=En.keymap[I]);else if(I.charCodeAt(0)>255){var W=S.code&&S.code.slice(-1)||"";S.shiftKey||(W=W.toLowerCase()),W&&(I=W)}}return F+=I,F.length>1&&(F="<"+F+">"),F}function Di(b){var I=new b.constructor;return Object.keys(b).forEach(function(S){if(S!="insertEnd"){var z=b[S];Array.isArray(z)?z=z.slice():z&&typeof z=="object"&&z.constructor!=Object&&(z=Di(z)),I[S]=z}}),b.sel&&(I.sel={head:b.sel.head&&Be(b.sel.head),anchor:b.sel.anchor&&Be(b.sel.anchor)}),I}function Zi(b,I,S){var z=!1,F=wt.maybeInitVimState_(b),W=F.visualBlock||F.wasInVisualBlock,G=b.ace.inMultiSelectMode;if(F.wasInVisualBlock&&!G?F.wasInVisualBlock=!1:G&&F.visualBlock&&(F.wasInVisualBlock=!0),I=="<Esc>"&&!F.insertMode&&!F.visualMode&&G)b.ace.exitMultiSelectMode();else if(W||!G||b.ace.inVirtualSelectionMode)z=wt.handleKey(b,I,S);else{var K=Di(F),Z=F.inputState.changeQueueList||[];b.operation(function(){b.curOp.isVimOp=!0;var se=0;b.ace.forEachSelection(function(){var de=b.ace.selection;b.state.vim.lastHPos=de.$desiredColumn==null?de.lead.column:de.$desiredColumn,b.state.vim.inputState.changeQueue=Z[se];var ke=b.getCursor("head"),Te=b.getCursor("anchor"),Ce=Ze(ke,Te)?0:-1,$e=Ze(ke,Te)?-1:0;ke=ee(ke,0,Ce),Te=ee(Te,0,$e),b.state.vim.sel.head=ke,b.state.vim.sel.anchor=Te,z=Hr(b,I,S),de.$desiredColumn=b.state.vim.lastHPos==-1?null:b.state.vim.lastHPos,b.ace.inVirtualSelectionMode&&(Z[se]=b.state.vim.inputState.changeQueue),b.virtualSelectionMode()&&(b.state.vim=Di(K)),se++}),b.curOp.cursorActivity&&!z&&(b.curOp.cursorActivity=!1),F.status=b.state.vim.status,b.state.vim=F,F.inputState.changeQueueList=Z,F.inputState.changeQueue=null},!0)}return z&&!F.visualMode&&!F.insert&&F.visualMode!=b.somethingSelected()&&xs(b,F,!0),z}function gi(b,I){I.off("beforeEndOperation",gi);var S=I.state.cm.vimCmd;S&&I.execCommand(S.exec?S:S.name,S.args),I.curOp=I.prevOp}var sr=t("../range").Range,bo=t("../lib/event_emitter").EventEmitter,Kn=t("../lib/dom"),wo=t("../lib/oop"),Pr=t("../lib/keys"),ts=t("../lib/event"),ni=t("../search").Search,Fo=t("../lib/useragent"),jo=t("../search_highlight").SearchHighlight,Wr=t("../commands/multi_select_commands"),ns=t("../mode/text").Mode.prototype.tokenRe,Xi=t("../ext/hardwrap").hardWrap;t("../multi_select");var Ve=function(b){this.ace=b,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Ve.Pos=function(b,I){if(!(this instanceof je))return new je(b,I);this.line=b,this.ch=I},Ve.defineOption=function(b,I,S){},Ve.commands={redo:function(b){b.ace.redo()},undo:function(b){b.ace.undo()},newlineAndIndent:function(b){b.ace.insert(`
1403
+ `)},goLineLeft:function(b){b.ace.selection.moveCursorLineStart()},goLineRight:function(b){b.ace.selection.moveCursorLineEnd()}},Ve.keyMap={},Ve.addClass=Ve.rmClass=function(){},Ve.e_stop=Ve.e_preventDefault=ts.stopEvent,Ve.keyName=function(b){var I=Pr[b.keyCode]||b.key||"";return I.length==1&&(I=I.toUpperCase()),I=ts.getModifierString(b).replace(/(^|-)\w/g,function(S){return S.toUpperCase()})+I,I},Ve.keyMap.default=function(b){return function(I){var S=I.ace.commands.commandKeyBinding[b.toLowerCase()];return S&&I.ace.execCommand(S)!==!1}},Ve.lookupKey=function b(I,S,z){S||(S="default"),typeof S=="string"&&(S=Ve.keyMap[S]||Ve.keyMap.default);var F=typeof S=="function"?S(I):S[I];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&z(F))return"handled";if(S.fallthrough){if(!Array.isArray(S.fallthrough))return b(I,S.fallthrough,z);for(var W=0;W<S.fallthrough.length;W++){var G=b(I,S.fallthrough[W],z);if(G)return G}}},Ve.findMatchingTag=function(b,I){return b.findMatchingTag(I)},Ve.findEnclosingTag=function(b,I){},Ve.signal=function(b,I,S){return b._signal(I,S)},Ve.on=ts.addListener,Ve.off=ts.removeListener,Ve.isWordChar=function(b){return b<""?/^\w$/.test(b):(ns.lastIndex=0,ns.test(b))},(function(){wo.implement(Ve.prototype,bo),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(S){this.$lineHandleChanges&&this.$lineHandleChanges.push(S);var z={text:S.action[0]=="i"?S.lines:[]},F=this.curOp=this.curOp||{};F.changeHandlers||(F.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),F.lastChange?F.lastChange.next=F.lastChange=z:F.lastChange=F.change=z,this.$updateMarkers(S)},this.onSelectionChange=function(){var S=this.curOp=this.curOp||{};S.cursorActivityHandlers||(S.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Wr.keyboardHandler)},this.operation=function(S,z){if(!z&&this.curOp||z&&this.curOp&&this.curOp.force)return S();if((z||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var F=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var W=this.curOp=this.curOp||{};this.curOp.force=z;var G=S();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!W.cursorActivity&&!W.lastChange&&F&&(this.ace.prevOp=F)),(z||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),G},this.onBeforeEndOperation=function(){var S=this.curOp;S&&(S.change&&this.signal("change",S.change,S),S&&S.cursorActivity&&this.signal("cursorActivity",null,S),this.curOp=null)},this.signal=function(S,z,F){var W=F?F[S+"Handlers"]:(this._eventRegistry||{})[S];if(W){W=W.slice();for(var G=0;G<W.length;G++)W[G](this,z)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(S,z){typeof S=="object"&&(z=S.ch,S=S.line);var F=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:S,column:z}),this.ace.selection.moveTo(S,z),F&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(S){var z=this.ace.selection,F=S=="anchor"?z.isEmpty()?z.lead:z.anchor:S=="head"||!S?z.lead:z.getRange()[S];return g(F)},this.listSelections=function(S){var z=this.ace.multiSelect.rangeList.ranges;return!z.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:z.map(function(F){return{anchor:this.clipPos(g(F.cursor==F.end?F.start:F.end)),head:this.clipPos(g(F.cursor))}},this)},this.setSelections=function(S,z){var F=this.ace.multiSelect,W=S.map(function(se){var de=u(se.anchor),ke=u(se.head),Te=sr.comparePoints(de,ke)<0?new sr.fromPoints(de,ke):new sr.fromPoints(ke,de);return Te.cursor=sr.comparePoints(Te.start,ke)?Te.end:Te.start,Te});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(W[0]);return}z?W[z]&&W.push(W.splice(z,1)[0]):W=W.reverse(),F.toSingleRange(W[0].clone());for(var G=this.ace.session,K=0;K<W.length;K++){var Z=G.$clipRangeToDocument(W[K]);F.addRange(Z)}},this.setSelection=function(S,z,F){var W=this.ace.selection;W.moveTo(S.line,S.ch),W.selectTo(z.line,z.ch),F&&F.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(S){return!this.ace.selection.isEmpty()},this.clipPos=function(S){var z=this.ace.session.$clipPositionToDocument(S.line,S.ch);return g(z)},this.foldCode=function(S){this.ace.session.$toggleFoldWidget(S.line,{})},this.markText=function(S){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(S){var z=S.action=="insert",F=S.start,W=S.end,G=(W.row-F.row)*(z?1:-1),K=(W.column-F.column)*(z?1:-1);z&&(W=F);for(var Z in this.marks){var se=this.marks[Z],de=sr.comparePoints(se,F);if(!(de<0)){if(de===0&&z)if(!se.$insertRight)de=1;else{if(se.bias!=1){se.bias=-1;continue}de=1}var ke=z?de:sr.comparePoints(se,W);if(ke>0){se.row+=G,se.column+=se.row==W.row?K:0;continue}!z&&ke<=0&&(se.row=F.row,se.column=F.column,ke===0&&(se.bias=1))}}};var b=function(S,z,F,W){this.cm=S,this.id=z,this.row=F,this.column=W,S.marks[this.id]=this};b.prototype.clear=function(){delete this.cm.marks[this.id]},b.prototype.find=function(){return g(this)},this.setBookmark=function(S,z){var F=new b(this,this.$uid++,S.line,S.ch);return(!z||!z.insertLeft)&&(F.$insertRight=!0),this.marks[F.id]=F,F},this.moveH=function(S,z){if(z=="char"){var F=this.ace.selection;F.clearSelection(),F.moveCursorBy(0,S)}},this.findPosV=function(S,z,F,W){if(F=="page"){var G=this.ace.renderer,K=G.layerConfig;z*=Math.floor(K.height/K.lineHeight),F="line"}if(F=="line"){var Z=this.ace.session.documentToScreenPosition(S.line,S.ch);W!=null&&(Z.column=W),Z.row+=z,Z.row=Math.min(Math.max(0,Z.row),this.ace.session.getScreenLength()-1);var se=this.ace.session.screenToDocumentPosition(Z.row,Z.column);return g(se)}debugger},this.charCoords=function(S,z){if(z=="div"||!z){var F=this.ace.session.documentToScreenPosition(S.line,S.ch);return{left:F.column,top:F.row}}if(z=="local"){var W=this.ace.renderer,F=this.ace.session.documentToScreenPosition(S.line,S.ch),G=W.layerConfig.lineHeight,K=W.layerConfig.characterWidth,Z=G*F.row;return{left:F.column*K,top:Z,bottom:Z+G}}},this.coordsChar=function(S,z){var F=this.ace.renderer;if(z=="local"){var W=Math.max(0,Math.floor(S.top/F.lineHeight)),G=Math.max(0,Math.floor(S.left/F.characterWidth)),K=F.session.screenToDocumentPosition(W,G);return g(K)}if(z=="div")throw"not implemented"},this.getSearchCursor=function(S,z,F){var W=!1,G=!1;S instanceof RegExp&&!S.global&&(W=!S.ignoreCase,S=S.source,G=!0),S=="\\n"&&(S=`
1404
+ `,G=!1);var K=new ni;z.ch==null&&(z.ch=Number.MAX_VALUE);var Z={row:z.line,column:z.ch},se=this,de=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ke){K.setOptions({needle:S,caseSensitive:W,wrap:!1,backwards:ke,regExp:G,start:de||Z});var Te=K.find(se.ace.session);return de=Te,de&&[!de.isEmpty()]},from:function(){return de&&g(de.start)},to:function(){return de&&g(de.end)},replace:function(ke){de&&(de.end=se.ace.session.doc.replace(de,ke))}}},this.scrollTo=function(S,z){var F=this.ace.renderer,W=F.layerConfig,G=W.maxHeight;G-=(F.$size.scrollerHeight-F.lineHeight)*F.$scrollPastEnd,z!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(z,G))),S!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(S,W.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(S,z){if(S){var F=this.ace.renderer,W={top:0,bottom:z};F.scrollCursorIntoView(u(S),F.lineHeight*2/F.$size.scrollerHeight,W)}},this.getLine=function(S){return this.ace.session.getLine(S)},this.getRange=function(S,z){return this.ace.session.getTextRange(new sr(S.line,S.ch,z.line,z.ch))},this.replaceRange=function(S,z,F){F||(F=z);var W=new sr(z.line,z.ch,F.line,F.ch);return this.ace.session.$clipRangeToDocument(W),this.ace.session.replace(W,S)},this.replaceSelection=this.replaceSelections=function(S){var z=Array.isArray(S)&&S,F=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(F.getRange(),z?S[0]||"":S);return}F.inVirtualSelectionMode=!0;var W=F.rangeList.ranges;W.length||(W=[this.ace.multiSelect.getRange()]);for(var G=W.length;G--;)this.ace.session.replace(W[G],z?S[G]||"":S);F.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(S){return this.getRange(S.anchor,S.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var I={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(S,z){switch(this.state[S]=z,S){case"indentWithTabs":S=I[S],z=!z;break;case"keyMap":this.state.$keyMap=z;return;default:S=I[S]}S&&this.ace.setOption(S,z)},this.getOption=function(S){var z,F=I[S];switch(F&&(z=this.ace.getOption(F)),S){case"indentWithTabs":return S=I[S],!z;case"keyMap":return this.state.$keyMap||"vim"}return F?z:this.state[S]},this.toggleOverwrite=function(S){return this.state.overwrite=S,this.ace.setOverwrite(S)},this.addOverlay=function(S){if(!this.$searchHighlight||!this.$searchHighlight.session){var z=new jo(null,"ace_highlight-marker","text"),F=this.ace.session.addDynamicMarker(z);z.id=F.id,z.session=this.ace.session,z.destroy=function(G){z.session.off("change",z.updateOnChange),z.session.off("changeEditor",z.destroy),z.session.removeMarker(z.id),z.session=null},z.updateOnChange=function(G){var K=G.start.row;K==G.end.row?z.cache[K]=void 0:z.cache.splice(K,z.cache.length)},z.session.on("changeEditor",z.destroy),z.session.on("change",z.updateOnChange)}var W=new RegExp(S.query.source,"gmi");this.$searchHighlight=S.highlight=z,this.$searchHighlight.setRegexp(W),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(S){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var S=this.ace.renderer,z=S.layerConfig;return{left:S.scrollLeft,top:S.scrollTop,height:z.maxHeight,width:z.width,clientHeight:z.height,clientWidth:z.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(S){return this.ace.setValue(S,-1)},this.getTokenTypeAt=function(S){var z=this.ace.session.getTokenAt(S.line,S.ch);return z&&/comment|string/.test(z.type)?"string":""},this.findMatchingBracket=function(S){var z=this.ace.session.findMatchingBracket(u(S));return{to:z&&g(z)}},this.findMatchingTag=function(S){var z=this.ace.session.getMatchingTags(u(S));if(z)return{open:{from:g(z.openTag.start),to:g(z.openTag.end)},close:{from:g(z.closeTag.start),to:g(z.closeTag.end)}}},this.indentLine=function(S,z){z===!0?this.ace.session.indentRows(S,S," "):z===!1&&this.ace.session.outdentRows(new sr(S,0,S,0))},this.indexFromPos=function(S){return this.ace.session.doc.positionToIndex(u(S))},this.posFromIndex=function(S){return g(this.ace.session.doc.indexToPosition(S))},this.focus=function(S){return this.ace.textInput.focus()},this.blur=function(S){return this.ace.blur()},this.defaultTextHeight=function(S){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(S,z,F,W){var G=W.bracketRegex.source,K=/paren|text|operator|tag/;if(z==1)var Z=this.ace.session.$findClosingBracket(G.slice(1,2),u(S),K);else{var Z=this.ace.session.$findOpeningBracket(G.slice(-2,-1),{row:S.line,column:S.ch+1},K);!Z&&W.bracketRegex&&W.bracketRegex.test(this.getLine(S.line)[S.ch-1])&&(Z={row:S.line,column:S.ch-1})}return Z&&{pos:g(Z)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(S){if(Ve.commands.hasOwnProperty(S))return Ve.commands[S](this);if(S=="indentAuto")return this.ace.execCommand("autoindent");console.log(S+" is not implemented")},this.getLineNumber=function(S){var z=this.$lineHandleChanges;if(!z)return null;for(var F=S.row,W=0;W<z.length;W++){var G=z[W];if(G.start.row!=G.end.row){if(G.action[0]=="i")G.start.row<F&&(F+=G.end.row-G.start.row);else if(G.start.row<F){if(F<G.end.row||F==G.end.row&&G.start.column>0)return null;F-=G.end.row-G.start.row}}}return F},this.getLineHandle=function(S){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(S),row:S}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var S=this.ace.session.$undoManager;if(S&&S.$lastDelta)return g(S.$lastDelta.end)}}).call(Ve.prototype);var rs=Ve.StringStream=function(b,I){this.pos=this.start=0,this.string=b,this.tabSize=I||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};rs.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(b){var I=this.string.charAt(this.pos);if(typeof b=="string")var S=I==b;else var S=I&&(b.test?b.test(I):b(I));if(S)return++this.pos,I},eatWhile:function(b){for(var I=this.pos;this.eat(b););return this.pos>I},eatSpace:function(){for(var b=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>b},skipToEnd:function(){this.pos=this.string.length},skipTo:function(b){var I=this.string.indexOf(b,this.pos);if(I>-1)return this.pos=I,!0},backUp:function(b){this.pos-=b},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(b,I,S){if(typeof b!="string"){var z=this.string.slice(this.pos).match(b);return z&&z.index>0?null:(z&&I!==!1&&(this.pos+=z[0].length),z)}var F=function(G){return S?G.toLowerCase():G},W=this.string.substr(this.pos,b.length);if(F(W)==F(b))return I!==!1&&(this.pos+=b.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(b,I){this.lineStart+=b;try{return I()}finally{this.lineStart-=b}}},Ve.defineExtension=function(b,I){Ve.prototype[b]=I},Kn.importCssString(`.normal-mode .ace_cursor{
1405
+ border: none;
1406
+ background-color: rgba(255,0,0,0.5);
1407
+ }
1408
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1409
+ background-color: transparent;
1410
+ border: 1px solid red;
1411
+ opacity: 0.7
1412
+ }
1413
+ .ace_dialog {
1414
+ position: absolute;
1415
+ left: 0; right: 0;
1416
+ background: inherit;
1417
+ z-index: 15;
1418
+ padding: .1em .8em;
1419
+ overflow: hidden;
1420
+ color: inherit;
1421
+ }
1422
+ .ace_dialog-top {
1423
+ border-bottom: 1px solid #444;
1424
+ top: 0;
1425
+ }
1426
+ .ace_dialog-bottom {
1427
+ border-top: 1px solid #444;
1428
+ bottom: 0;
1429
+ }
1430
+ .ace_dialog input {
1431
+ border: none;
1432
+ outline: none;
1433
+ background: transparent;
1434
+ width: 20em;
1435
+ color: inherit;
1436
+ font-family: monospace;
1437
+ }`,"vimMode",!1),(function(){function b(S,z,F){var W=S.ace.container,G;return G=W.appendChild(document.createElement("div")),F?G.className="ace_dialog ace_dialog-bottom":G.className="ace_dialog ace_dialog-top",typeof z=="string"?G.innerHTML=z:G.appendChild(z),G}function I(S,z){S.state.currentNotificationClose&&S.state.currentNotificationClose(),S.state.currentNotificationClose=z}Ve.defineExtension("openDialog",function(S,z,F){function W(ke){if(typeof ke=="string")se.value=ke;else{if(K||ke&&ke.type=="blur"&&document.activeElement===se)return;Z.state.dialog==G&&(Z.state.dialog=null,Z.focus()),K=!0,G.remove(),F.onClose&&F.onClose(G);var Te=Z;Te.state.vim&&(Te.state.vim.status=null,Te.ace._signal("changeStatus"),Te.ace.renderer.$loop.schedule(Te.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){F||(F={}),I(this,null);var G=b(this,S,F.bottom),K=!1,Z=this;this.state.dialog=G;var se=G.getElementsByTagName("input")[0],de;return se?(F.value&&(se.value=F.value,F.selectValueOnOpen!==!1&&se.select()),F.onInput&&Ve.on(se,"input",function(ke){F.onInput(ke,se.value,W)}),F.onKeyUp&&Ve.on(se,"keyup",function(ke){F.onKeyUp(ke,se.value,W)}),Ve.on(se,"keydown",function(ke){F&&F.onKeyDown&&F.onKeyDown(ke,se.value,W)||(ke.keyCode==13&&z(se.value),(ke.keyCode==27||F.closeOnEnter!==!1&&ke.keyCode==13)&&(Ve.e_stop(ke),W()))}),F.closeOnBlur!==!1&&Ve.on(se,"blur",W),se.focus()):(de=G.getElementsByTagName("button")[0])&&(Ve.on(de,"click",function(){W(),Z.focus()}),F.closeOnBlur!==!1&&Ve.on(de,"blur",W),de.focus()),W}}),Ve.defineExtension("openNotification",function(S,z){function F(){G||(G=!0,clearTimeout(K),W.remove())}if(!this.virtualSelectionMode()){I(this,F);var W=b(this,S,z&&z.bottom),G=!1,K,Z=z&&typeof z.duration<"u"?z.duration:5e3;return Ve.on(W,"click",function(se){Ve.e_preventDefault(se),F()}),Z&&(K=setTimeout(F,Z)),F}})})();var je=Ve.Pos,Wn=[{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"}],xo=Wn.length,mi=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],En=M(""),is=/[\d]/,X=[Ve.isWordChar,function(b){return b&&!Ve.isWordChar(b)&&!/\s/.test(b)}],xe=[function(b){return/\S/.test(b)}],Me=["<",">"],Oe=["-",'"',".",":","_","/","+"],Ke=/^\w$/,He;try{He=new RegExp("^[\\p{Lu}]$","u")}catch{He=/^[A-Z]$/}var rt={};R("filetype",void 0,"string",["ft"],function(b,I){if(I!==void 0){if(b===void 0){var S=I.getOption("mode");return S=="null"?"":S}var S=b==""?"null":b;I.setOption("mode",S)}}),R("textwidth",80,"number",["tw"],function(b,I){if(I!==void 0){if(b===void 0){var S=I.getOption("textwidth");return S}var z=Math.round(b);z>1&&I.setOption("textwidth",z)}});var sn=function(){function b(Z,se,de){function ke(Fe){var Pe=++F%z,et=K[Pe];et&&et.clear(),K[Pe]=Z.setBookmark(Fe)}var Te=F%z,Ce=K[Te];if(Ce){var $e=Ce.find();$e&&!Ye($e,se)&&ke(se)}else ke(se);ke(de),W=F,G=F-z+1,G<0&&(G=0)}function I(Z,se){F+=se,F>W?F=W:F<G&&(F=G);var de=K[(z+F)%z];if(de&&!de.find()){var ke=se>0?1:-1,Te,Ce=Z.getCursor();do if(F+=ke,de=K[(z+F)%z],de&&(Te=de.find())&&!Ye(Ce,Te))break;while(F<W&&F>G)}return de}function S(Z,se){var de=F,ke=I(Z,se);return F=de,ke&&ke.find()}var z=100,F=-1,W=0,G=0,K=new Array(z);return{cachedCursor:void 0,add:b,find:S,move:I}},wn=function(b){return b?{changes:b.changes,expectCursorActivityForChange:b.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var b=Ge.macroModeState;b.onRecordingDone&&b.onRecordingDone(),b.onRecordingDone=void 0,b.isRecording=!1},enterMacroRecordMode:function(b,I){var S=Ge.registerController.getRegister(I);if(S){if(S.clear(),this.latestRegister=I,b.openDialog){var z=Li("span",{class:"cm-vim-message"},"recording @"+I);this.onRecordingDone=b.openDialog(z,null,{bottom:!0})}this.isRecording=!0}}};var Ge,Wt,wt={enterVimMode:s,leaveVimMode:d,buildKeyMap:function(){},getRegisterController:function(){return Ge.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return Ge},maybeInitVimState_:P,suppressErrorLogging:!1,InsertModeKey:Zo,map:function(b,I,S){ii.map(b,I,S)},unmap:function(b,I){return ii.unmap(b,I)},noremap:function(b,I,S){ii.map(b,I,S,!0)},mapclear:function(b){var I=Wn.length,S=xo,z=Wn.slice(0,I-S);if(Wn=Wn.slice(I-S),b)for(var F=z.length-1;F>=0;F--){var W=z[F];if(b!==W.context)if(W.context)this._mapCommand(W);else{var G=["normal","insert","visual"];for(var K in G)if(G[K]!==b){var Z={};for(var se in W)Z[se]=W[se];Z.context=G[K],this._mapCommand(Z)}}}},langmap:N,vimKeyFromEvent:B,setOption:T,getOption:_,defineOption:R,defineEx:function(b,I,S){if(!I)I=b;else if(b.indexOf(I)!==0)throw new Error('(Vim.defineEx) "'+I+'" is not a prefix of "'+b+'", command not registered');$r[b]=S,ii.commandMap_[I]={name:b,shortName:I,type:"api"}},handleKey:function(b,I,S){var z=this.findKey(b,I,S);if(typeof z=="function")return z()},multiSelectHandleKey:Zi,findKey:function(b,I,S){function z(){var se=Ge.macroModeState;if(se.isRecording){if(I=="q")return se.exitMacroRecordMode(),A(b),!0;S!="mapping"&&Po(se,I)}}function F(){if(I=="<Esc>"){if(K.visualMode)Ln(b);else{if(!K.insertMode)return;Dr(b)}return A(b),!0}}function W(){if(F())return!0;K.inputState.keyBuffer.push(I);var se=K.inputState.keyBuffer.join(""),de=I.length==1,ke=eo.matchCommand(se,Wn,K.inputState,"insert"),Te=K.inputState.changeQueue;if(ke.type=="none")return A(b),!1;if(ke.type=="partial"){if(ke.expectLiteralNext&&(K.expectLiteralNext=!0),Wt&&window.clearTimeout(Wt),Wt=de&&window.setTimeout(function(){K.insertMode&&K.inputState.keyBuffer.length&&A(b)},_("insertModeEscKeysTimeout")),de){var Ce=b.listSelections();(!Te||Te.removed.length!=Ce.length)&&(Te=K.inputState.changeQueue=new D),Te.inserted+=I;for(var $e=0;$e<Ce.length;$e++){var Fe=lt(Ce[$e].anchor,Ce[$e].head),Pe=ct(Ce[$e].anchor,Ce[$e].head),et=b.getRange(Fe,b.state.overwrite?ee(Pe,0,1):Pe);Te.removed[$e]=(Te.removed[$e]||"")+et}}return!de}if(K.expectLiteralNext=!1,Wt&&window.clearTimeout(Wt),ke.command&&Te){for(var Ce=b.listSelections(),$e=0;$e<Ce.length;$e++){var kt=Ce[$e].head;b.replaceRange(Te.removed[$e]||"",ee(kt,0,-Te.inserted.length),kt,"+input")}Ge.macroModeState.lastInsertModeChanges.changes.pop()}return ke.command||A(b),ke.command}function G(){if(z()||F())return!0;K.inputState.keyBuffer.push(I);var se=K.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(se))return!0;var de=/^(\d*)(.*)$/.exec(se);if(!de)return A(b),!1;var ke=K.visualMode?"visual":"normal",Te=de[2]||de[1];K.inputState.operatorShortcut&&K.inputState.operatorShortcut.slice(-1)==Te&&(Te=K.inputState.operatorShortcut);var Ce=eo.matchCommand(Te,Wn,K.inputState,ke);return Ce.type=="none"?(A(b),!1):Ce.type=="partial"?(Ce.expectLiteralNext&&(K.expectLiteralNext=!0),!0):Ce.type=="clear"?(A(b),!0):(K.expectLiteralNext=!1,K.inputState.keyBuffer.length=0,de=/^(\d*)(.*)$/.exec(se),de[1]&&de[1]!="0"&&K.inputState.pushRepeatDigit(de[1]),Ce.command)}var K=P(b),Z;return K.insertMode?Z=W():Z=G(),Z===!1?!K.insertMode&&I.length===1?function(){return!0}:void 0:Z===!0?function(){return!0}:function(){if(!((Z.operator||Z.isEdit)&&b.getOption("readOnly")))return b.operation(function(){b.curOp.isVimOp=!0;try{Z.type=="keyToKey"?k(b,Z.toKeys,Z):eo.processCommand(b,K,Z)}catch(se){throw b.state.vim=void 0,P(b),wt.suppressErrorLogging||console.log(se),se}return!0})}},handleEx:function(b,I){ii.processCommand(b,I)},defineMotion:re,defineAction:ue,defineOperator:ne,mapCommand:Ni,_mapCommand:yo,defineRegister:U,exitVisualMode:Ln,exitInsertMode:Dr},cn=[],vi=!1,Kt,ri={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},yr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Wo={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(ri)).forEach(function(b){Wo[(ri[b]||"").toLowerCase()]=Wo[b.toLowerCase()]=b}),R("langmap",void 0,"string",["lmap"],function(b,I){if(b===void 0)return En.string;N(b)}),$.prototype.pushRepeatDigit=function(b){this.operator?this.motionRepeat=this.motionRepeat.concat(b):this.prefixRepeat=this.prefixRepeat.concat(b)},$.prototype.getRepeat=function(){var b=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(b=1,this.prefixRepeat.length>0&&(b*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(b*=parseInt(this.motionRepeat.join(""),10))),b},j.prototype={setText:function(b,I,S){this.keyBuffer=[b||""],this.linewise=!!I,this.blockwise=!!S},pushText:function(b,I){I&&(this.linewise||this.keyBuffer.push(`
1438
+ `),this.linewise=!0),this.keyBuffer.push(b)},pushInsertModeChanges:function(b){this.insertModeChanges.push(wn(b))},pushSearchQuery:function(b){this.searchQueries.push(b)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},q.prototype={pushText:function(b,I,S,z,F){if(b!=="_"){z&&S.charAt(S.length-1)!==`
1439
+ `&&(S+=`
1440
+ `);var W=this.isValidRegister(b)?this.getRegister(b):null;if(!W){switch(I){case"yank":this.registers[0]=new j(S,z,F);break;case"delete":case"change":S.indexOf(`
1441
+ `)==-1?this.registers["-"]=new j(S,z):(this.shiftNumericRegisters_(),this.registers[1]=new j(S,z))}this.unnamedRegister.setText(S,z,F);return}var G=f(b);G?W.pushText(S,z):W.setText(S,z,F),b==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(S),this.unnamedRegister.setText(W.toString(),z)}},getRegister:function(b){return this.isValidRegister(b)?(b=b.toLowerCase(),this.registers[b]||(this.registers[b]=new j),this.registers[b]):this.unnamedRegister},isValidRegister:function(b){return b&&(x(b,Oe)||Ke.test(b))},shiftNumericRegisters_:function(){for(var b=9;b>=2;b--)this.registers[b]=this.getRegister(""+(b-1))}},Q.prototype={nextMatch:function(b,I){var S=this.historyBuffer,z=I?-1:1;this.initialPrefix===null&&(this.initialPrefix=b);for(var F=this.iterator+z;I?F>=0:F<S.length;F+=z)for(var W=S[F],G=0;G<=W.length;G++)if(this.initialPrefix==W.substring(0,G))return this.iterator=F,W;if(F>=S.length)return this.iterator=S.length,this.initialPrefix;if(F<0)return b},pushInput:function(b){var I=this.historyBuffer.indexOf(b);I>-1&&this.historyBuffer.splice(I,1),b.length&&this.historyBuffer.push(b)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var eo={matchCommand:function(b,I,S,z){var F=ye(b,I,z,S);if(!F.full&&!F.partial)return{type:"none"};if(!F.full&&F.partial)return{type:"partial",expectLiteralNext:F.partial.length==1&&F.partial[0].keys.slice(-11)=="<character>"};for(var W,G=0;G<F.full.length;G++){var K=F.full[G];W||(W=K)}if(W.keys.slice(-11)=="<character>"||W.keys.slice(-10)=="<register>"){var Z=Ae(b);if(!Z||Z.length>1)return{type:"clear"};S.selectedCharacter=Z}return{type:"full",command:W}},processCommand:function(b,I,S){switch(I.inputState.repeatOverride=S.repeatOverride,S.type){case"motion":this.processMotion(b,I,S);break;case"operator":this.processOperator(b,I,S);break;case"operatorMotion":this.processOperatorMotion(b,I,S);break;case"action":this.processAction(b,I,S);break;case"search":this.processSearch(b,I,S);break;case"ex":case"keyToEx":this.processEx(b,I,S);break}},processMotion:function(b,I,S){I.inputState.motion=S.motion,I.inputState.motionArgs=oe(S.motionArgs),this.evalInput(b,I)},processOperator:function(b,I,S){var z=I.inputState;if(z.operator){if(z.operator==S.operator){z.motion="expandToLine",z.motionArgs={linewise:!0},this.evalInput(b,I);return}A(b)}z.operator=S.operator,z.operatorArgs=oe(S.operatorArgs),S.keys.length>1&&(z.operatorShortcut=S.keys),S.exitVisualBlock&&(I.visualBlock=!1,Tn(b)),I.visualMode&&this.evalInput(b,I)},processOperatorMotion:function(b,I,S){var z=I.visualMode,F=oe(S.operatorMotionArgs);F&&z&&F.visualLine&&(I.visualLine=!0),this.processOperator(b,I,S),z||this.processMotion(b,I,S)},processAction:function(b,I,S){var z=I.inputState,F=z.getRepeat(),W=!!F,G=oe(S.actionArgs)||{};z.selectedCharacter&&(G.selectedCharacter=z.selectedCharacter),S.operator&&this.processOperator(b,I,S),S.motion&&this.processMotion(b,I,S),(S.motion||S.operator)&&this.evalInput(b,I),G.repeat=F||1,G.repeatIsExplicit=W,G.registerName=z.registerName,A(b),I.lastMotion=null,S.isEdit&&this.recordLastEdit(I,z,S),ar[S.action](b,G,I)},processSearch:function(b,I,S){function z(Pe,et,kt){Ge.searchHistoryController.pushInput(Pe),Ge.searchHistoryController.reset();try{pn(b,Pe,et,kt)}catch{Pt(b,"Invalid regex: "+Pe),A(b);return}eo.processMotion(b,I,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:S.searchArgs.toJumplist}})}function F(Pe){z(Pe,!0,!0);var et=Ge.macroModeState;et.isRecording&&zo(et,Pe)}function W(Pe,et,kt){var ut=B(Pe),ft,Hn;ut=="<Up>"||ut=="<Down>"?(ft=ut=="<Up>",Hn=Pe.target?Pe.target.selectionEnd:0,et=Ge.searchHistoryController.nextMatch(et,ft)||"",kt(et),Hn&&Pe.target&&(Pe.target.selectionEnd=Pe.target.selectionStart=Math.min(Hn,Pe.target.value.length))):ut&&ut!="<Left>"&&ut!="<Right>"&&Ge.searchHistoryController.reset();var Lt;try{Lt=pn(b,et,!0,!0)}catch{}Lt?b.scrollIntoView(tr(b,!K,Lt),30):(Oi(b),b.scrollTo(ke.left,ke.top))}function G(Pe,et,kt){var ut=B(Pe);ut=="<Esc>"||ut=="<C-c>"||ut=="<C-[>"||ut=="<BS>"&&et==""?(Ge.searchHistoryController.pushInput(et),Ge.searchHistoryController.reset(),pn(b,de),Oi(b),b.scrollTo(ke.left,ke.top),Ve.e_stop(Pe),A(b),kt(),b.focus()):ut=="<Up>"||ut=="<Down>"?Ve.e_stop(Pe):ut=="<C-u>"&&(Ve.e_stop(Pe),kt(""))}if(b.getSearchCursor){var K=S.searchArgs.forward,Z=S.searchArgs.wholeWordOnly;vn(b).setReversed(!K);var se=K?"/":"?",de=vn(b).getQuery(),ke=b.getScrollInfo();switch(S.searchArgs.querySrc){case"prompt":var Te=Ge.macroModeState;if(Te.isPlaying){var Fe=Te.replaySearchQueries.shift();z(Fe,!0,!1)}else Nr(b,{onClose:F,prefix:se,desc:"(JavaScript regexp)",onKeyUp:W,onKeyDown:G});break;case"wordUnderCursor":var Ce=Pn(b,{noSymbol:!0}),$e=!0;if(Ce||(Ce=Pn(b,{noSymbol:!1}),$e=!1),!Ce){Pt(b,"No word under cursor"),A(b);return}var Fe=b.getLine(Ce.start.line).substring(Ce.start.ch,Ce.end.ch);$e&&Z?Fe="\\b"+Fe+"\\b":Fe=St(Fe),Ge.jumpList.cachedCursor=b.getCursor(),b.setCursor(Ce.start),z(Fe,!0,!1)}}},processEx:function(b,I,S){function z(W){Ge.exCommandHistoryController.pushInput(W),Ge.exCommandHistoryController.reset(),ii.processCommand(b,W),b.state.vim&&A(b)}function F(W,G,K){var Z=B(W),se,de;(Z=="<Esc>"||Z=="<C-c>"||Z=="<C-[>"||Z=="<BS>"&&G=="")&&(Ge.exCommandHistoryController.pushInput(G),Ge.exCommandHistoryController.reset(),Ve.e_stop(W),A(b),K(),b.focus()),Z=="<Up>"||Z=="<Down>"?(Ve.e_stop(W),se=Z=="<Up>",de=W.target?W.target.selectionEnd:0,G=Ge.exCommandHistoryController.nextMatch(G,se)||"",K(G),de&&W.target&&(W.target.selectionEnd=W.target.selectionStart=Math.min(de,W.target.value.length))):Z=="<C-u>"?(Ve.e_stop(W),K("")):Z&&Z!="<Left>"&&Z!="<Right>"&&Ge.exCommandHistoryController.reset()}S.type=="keyToEx"?ii.processCommand(b,S.exArgs.input):I.visualMode?Nr(b,{onClose:z,prefix:":",value:"'<,'>",onKeyDown:F,selectValueOnOpen:!1}):Nr(b,{onClose:z,prefix:":",onKeyDown:F})},evalInput:function(b,I){var S=I.inputState,z=S.motion,F=S.motionArgs||{},W=S.operator,G=S.operatorArgs||{},K=S.registerName,Z=I.sel,se=Be(I.visualMode?he(b,Z.head):b.getCursor("head")),de=Be(I.visualMode?he(b,Z.anchor):b.getCursor("anchor")),ke=Be(se),Te=Be(de),Ce,$e,Fe;if(W&&this.recordLastEdit(I,S),S.repeatOverride!==void 0?Fe=S.repeatOverride:Fe=S.getRepeat(),Fe>0&&F.explicitRepeat?F.repeatIsExplicit=!0:(F.noRepeat||!F.explicitRepeat&&Fe===0)&&(Fe=1,F.repeatIsExplicit=!1),S.selectedCharacter&&(F.selectedCharacter=G.selectedCharacter=S.selectedCharacter),F.repeat=Fe,A(b),z){var Pe=Jn[z](b,se,F,I,S);if(I.lastMotion=Jn[z],!Pe)return;if(F.toJumplist){!W&&b.ace.curOp!=null&&(b.ace.curOp.command.scrollIntoView="center-animate");var et=Ge.jumpList,kt=et.cachedCursor;kt?(Xr(b,kt,Pe),delete et.cachedCursor):Xr(b,se,Pe)}Pe instanceof Array?($e=Pe[0],Ce=Pe[1]):Ce=Pe,Ce||(Ce=Be(se)),I.visualMode?((!I.visualBlock||Ce.ch!==1/0)&&(Ce=he(b,Ce,ke)),$e&&($e=he(b,$e)),$e=$e||Te,Z.anchor=$e,Z.head=Ce,Tn(b),ur(b,I,"<",Ze($e,Ce)?$e:Ce),ur(b,I,">",Ze($e,Ce)?Ce:$e)):W||(b.ace.curOp&&(b.ace.curOp.vimDialogScroll="center-animate"),Ce=he(b,Ce,ke),b.setCursor(Ce.line,Ce.ch))}if(W){if(G.lastSel){$e=Te;var ut=G.lastSel,ft=Math.abs(ut.head.line-ut.anchor.line),Hn=Math.abs(ut.head.ch-ut.anchor.ch);ut.visualLine?Ce=new je(Te.line+ft,Te.ch):ut.visualBlock?Ce=new je(Te.line+ft,Te.ch+Hn):ut.head.line==ut.anchor.line?Ce=new je(Te.line,Te.ch+Hn):Ce=new je(Te.line+ft,Te.ch),I.visualMode=!0,I.visualLine=ut.visualLine,I.visualBlock=ut.visualBlock,Z=I.sel={anchor:$e,head:Ce},Tn(b)}else I.visualMode&&(G.lastSel={anchor:Be(Z.anchor),head:Be(Z.head),visualBlock:I.visualBlock,visualLine:I.visualLine});var Lt,un,Ft,Nt,br;if(I.visualMode){Lt=lt(Z.head,Z.anchor),un=ct(Z.head,Z.anchor),Ft=I.visualLine||G.linewise,Nt=I.visualBlock?"block":Ft?"line":"char";var Sr=v(b,Lt,un);if(br=Dn(b,{anchor:Sr.start,head:Sr.end},Nt),Ft){var Qn=br.ranges;if(Nt=="block")for(var V=0;V<Qn.length;V++)Qn[V].head.ch=Ie(b,Qn[V].head.line);else Nt=="line"&&(Qn[0].head=new je(Qn[0].head.line+1,0))}}else{if(Lt=Be($e||Te),un=Be(Ce||ke),Ze(un,Lt)){var J=Lt;Lt=un,un=J}Ft=F.linewise||G.linewise,Ft?er(b,Lt,un):F.forward&&Gn(b,Lt,un),Nt="char";var ae=!F.inclusive||Ft,Sr=v(b,Lt,un);br=Dn(b,{anchor:Sr.start,head:Sr.end},Nt,ae)}b.setSelections(br.ranges,br.primary),I.lastMotion=null,G.repeat=Fe,G.registerName=K,G.linewise=Ft;var ce=Gs[W](b,G,br.ranges,Te,Ce);I.visualMode&&Ln(b,ce!=null),ce&&b.setCursor(ce)}},recordLastEdit:function(b,I,S){var z=Ge.macroModeState;z.isPlaying||(b.lastEditInputState=I,b.lastEditActionCommand=S,z.lastInsertModeChanges.changes=[],z.lastInsertModeChanges.expectCursorActivityForChange=!1,z.lastInsertModeChanges.visualBlock=b.visualBlock?b.sel.head.line-b.sel.anchor.line:0)}},Jn={moveToTopLine:function(b,I,S){var z=vo(b).top+S.repeat-1;return new je(z,fn(b.getLine(z)))},moveToMiddleLine:function(b){var I=vo(b),S=Math.floor((I.top+I.bottom)*.5);return new je(S,fn(b.getLine(S)))},moveToBottomLine:function(b,I,S){var z=vo(b).bottom-S.repeat+1;return new je(z,fn(b.getLine(z)))},expandToLine:function(b,I,S){var z=I;return new je(z.line+S.repeat-1,1/0)},findNext:function(b,I,S){var z=vn(b),F=z.getQuery();if(F){var W=!S.forward;return W=z.isReversed()?!W:W,go(b,F),tr(b,W,F,S.repeat)}},findAndSelectNextInclusive:function(b,I,S,z,F){var W=vn(b),G=W.getQuery();if(G){var K=!S.forward;K=W.isReversed()?!K:K;var Z=mo(b,K,G,S.repeat,z);if(Z){if(F.operator)return Z;var se=Z[0],de=new je(Z[1].line,Z[1].ch-1);if(z.visualMode){(z.visualLine||z.visualBlock)&&(z.visualLine=!1,z.visualBlock=!1,Ve.signal(b,"vim-mode-change",{mode:"visual",subMode:""}));var ke=z.sel.anchor;if(ke)return W.isReversed()?S.forward?[ke,se]:[ke,de]:S.forward?[ke,de]:[ke,se]}else z.visualMode=!0,z.visualLine=!1,z.visualBlock=!1,Ve.signal(b,"vim-mode-change",{mode:"visual",subMode:""});return K?[de,se]:[se,de]}}},goToMark:function(b,I,S,z){var F=pi(b,z,S.selectedCharacter);return F?S.linewise?{line:F.line,ch:fn(b.getLine(F.line))}:F:null},moveToOtherHighlightedEnd:function(b,I,S,z){if(z.visualBlock&&S.sameLine){var F=z.sel;return[he(b,new je(F.anchor.line,F.head.ch)),he(b,new je(F.head.line,F.anchor.ch))]}return[z.sel.head,z.sel.anchor]},jumpToMark:function(b,I,S,z){for(var F=I,W=0;W<S.repeat;W++){var G=F;for(var K in z.marks)if(h(K)){var Z=z.marks[K].find(),se=S.forward?Ze(Z,G):Ze(G,Z);if(!se&&!(S.linewise&&Z.line==G.line)){var de=Ye(G,F),ke=S.forward?jt(G,Z,F):jt(F,Z,G);(de||ke)&&(F=Z)}}}return S.linewise&&(F=new je(F.line,fn(b.getLine(F.line)))),F},moveByCharacters:function(b,I,S){var z=I,F=S.repeat,W=S.forward?z.ch+F:z.ch-F;return new je(z.line,W)},moveByLines:function(b,I,S,z){var F=I,W=F.ch;switch(z.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:W=z.lastHPos;break;default:z.lastHPos=W}var G=S.repeat+(S.repeatOffset||0),K=S.forward?F.line+G:F.line-G,Z=b.firstLine(),se=b.lastLine();if(K<Z&&F.line==Z)return this.moveToStartOfLine(b,I,S,z);if(K>se&&F.line==se)return Ji(b,I,S,z,!0);var de=b.ace.session.getFoldLine(K);return de&&(S.forward?K>de.start.row&&(K=de.end.row+1):K=de.start.row),S.toFirstChar&&(W=fn(b.getLine(K)),z.lastHPos=W),z.lastHSPos=b.charCoords(new je(K,W),"div").left,new je(K,W)},moveByDisplayLines:function(b,I,S,z){var F=I;switch(z.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:z.lastHSPos=b.charCoords(F,"div").left}var W=S.repeat,Z=b.findPosV(F,S.forward?W:-W,"line",z.lastHSPos);if(Z.hitSide)if(S.forward)var G=b.charCoords(Z,"div"),K={top:G.top+8,left:z.lastHSPos},Z=b.coordsChar(K,"div");else{var se=b.charCoords(new je(b.firstLine(),0),"div");se.left=z.lastHSPos,Z=b.coordsChar(se,"div")}return z.lastHPos=Z.ch,Z},moveByPage:function(b,I,S){var z=I,F=S.repeat;return b.findPosV(z,S.forward?F:-F,"page")},moveByParagraph:function(b,I,S){var z=S.forward?1:-1;return gs(b,I,S.repeat,z)},moveBySentence:function(b,I,S){var z=S.forward?1:-1;return Mi(b,I,S.repeat,z)},moveByScroll:function(b,I,S,z){var F=b.getScrollInfo(),W=null,G=S.repeat;G||(G=F.clientHeight/(2*b.defaultTextHeight()));var K=b.charCoords(I,"local");if(S.repeat=G,W=Jn.moveByDisplayLines(b,I,S,z),!W)return null;var Z=b.charCoords(W,"local");return b.scrollTo(null,F.top+Z.top-K.top),W},moveByWords:function(b,I,S){return vr(b,I,S.repeat,!!S.forward,!!S.wordEnd,!!S.bigWord)},moveTillCharacter:function(b,I,S){var z=S.repeat,F=jr(b,z,S.forward,S.selectedCharacter,I),W=S.forward?-1:1;return ei(W,S),F?(F.ch+=W,F):null},moveToCharacter:function(b,I,S){var z=S.repeat;return ei(0,S),jr(b,z,S.forward,S.selectedCharacter,I)||I},moveToSymbol:function(b,I,S){var z=S.repeat;return Ii(b,z,S.forward,S.selectedCharacter)||I},moveToColumn:function(b,I,S,z){var F=S.repeat;return z.lastHPos=F-1,z.lastHSPos=b.charCoords(I,"div").left,po(b,F)},moveToEol:function(b,I,S,z){return Ji(b,I,S,z,!1)},moveToFirstNonWhiteSpaceCharacter:function(b,I){var S=I;return new je(S.line,fn(b.getLine(S.line)))},moveToMatchedSymbol:function(b,I){for(var S=I,z=S.line,F=S.ch,W=b.getLine(z),G;F<W.length;F++)if(G=W.charAt(F),G&&p(G)){var K=b.getTokenTypeAt(new je(z,F+1));if(K!=="string"&&K!=="comment")break}if(F<W.length){var Z=/[<>]/.test(W[F])?/[(){}[\]<>]/:/[(){}[\]]/,se=b.findMatchingBracket(new je(z,F+1),{bracketRegex:Z});return se.to}return S},moveToStartOfLine:function(b,I){return new je(I.line,0)},moveToLineOrEdgeOfDocument:function(b,I,S){var z=S.forward?b.lastLine():b.firstLine();return S.repeatIsExplicit&&(z=S.repeat-b.getOption("firstLineNumber")),new je(z,fn(b.getLine(z)))},moveToStartOfDisplayLine:function(b){return b.execCommand("goLineLeft"),b.getCursor()},moveToEndOfDisplayLine:function(b){b.execCommand("goLineRight");var I=b.getCursor();return I.sticky=="before"&&I.ch--,I},textObjectManipulation:function(b,I,S,z){var F={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},W={"'":!0,'"':!0,"`":!0},G=S.selectedCharacter;G=="b"?G="(":G=="B"&&(G="{");var K=!S.textObjectInner,Z,se;if(F[G]){if(se=!0,Z=qn(b,I,G,K),!Z){var de=b.getSearchCursor(new RegExp("\\"+G,"g"),I);de.find()&&(Z=qn(b,de.from(),G,K))}}else if(W[G])se=!0,Z=Ar(b,I,G,K);else if(G==="W"||G==="w")for(var ke=S.repeat||1;ke-- >0;){var Te=Pn(b,{inclusive:K,innerWord:!K,bigWord:G==="W",noSymbol:G==="W",multiline:!0},Z&&Z.end);Te&&(Z||(Z=Te),Z.end=Te.end)}else if(G==="p")if(Z=gs(b,I,S.repeat,0,K),S.linewise=!0,z.visualMode)z.visualLine||(z.visualLine=!0);else{var Ce=z.inputState.operatorArgs;Ce&&(Ce.linewise=!0),Z.end.line--}else if(G==="t")Z=Ei(b,I,K);else if(G==="s"){var $e=b.getLine(I.line);I.ch>0&&w($e[I.ch])&&(I.ch-=1);var Fe=Ko(b,I,S.repeat,1,K),Pe=Ko(b,I,S.repeat,-1,K);m(b.getLine(Pe.line)[Pe.ch])&&m(b.getLine(Fe.line)[Fe.ch-1])&&(Pe={line:Pe.line,ch:Pe.ch+1}),Z={start:Pe,end:Fe}}return Z?b.state.vim.visualMode?Fn(b,Z.start,Z.end,se):[Z.start,Z.end]:null},repeatLastCharacterSearch:function(b,I,S){var z=Ge.lastCharacterSearch,F=S.repeat,W=S.forward===z.forward,G=(z.increment?1:0)*(W?-1:1);b.moveH(-G,"char"),S.inclusive=!!W;var K=jr(b,F,W,z.selectedCharacter);return K?(K.ch+=G,K):(b.moveH(G,"char"),I)}},Gs={change:function(b,I,S){var z,F,W=b.state.vim,G=S[0].anchor,K=S[0].head;if(W.visualMode)if(I.fullLine)K.ch=Number.MAX_VALUE,K.line--,b.setSelection(G,K),F=b.getSelection(),b.replaceSelection(""),z=G;else{F=b.getSelection();var Z=le("",S.length);b.replaceSelections(Z),z=lt(S[0].head,S[0].anchor)}else{F=b.getRange(G,K);var se=W.lastEditInputState||{};if(se.motion=="moveByWords"&&!m(F)){var de=/\s+$/.exec(F);de&&se.motionArgs&&se.motionArgs.forward&&(K=ee(K,0,-de[0].length),F=F.slice(0,-de[0].length))}I.linewise&&(G=new je(G.line,fn(b.getLine(G.line))),K.line>G.line&&(K=new je(K.line-1,Number.MAX_VALUE))),b.replaceRange("",G,K),z=G}Ge.registerController.pushText(I.registerName,"change",F,I.linewise,S.length>1),ar.enterInsertMode(b,{head:z},b.state.vim)},delete:function(b,I,S){var z,F,W=b.state.vim;if(W.visualBlock){F=b.getSelection();var G=le("",S.length);b.replaceSelections(G),z=lt(S[0].head,S[0].anchor)}else{var K=S[0].anchor,Z=S[0].head;I.linewise&&Z.line!=b.firstLine()&&K.line==b.lastLine()&&K.line==Z.line-1&&(K.line==b.firstLine()?K.ch=0:K=new je(K.line-1,Ie(b,K.line-1))),F=b.getRange(K,Z),b.replaceRange("",K,Z),z=K,I.linewise&&(z=Jn.moveToFirstNonWhiteSpaceCharacter(b,K))}return Ge.registerController.pushText(I.registerName,"delete",F,I.linewise,W.visualBlock),he(b,z)},indent:function(b,I,S){var z=b.state.vim,F=z.visualMode?I.repeat:1;if(z.visualBlock){for(var W=b.getOption("tabSize"),G=b.getOption("indentWithTabs")?" ":" ".repeat(W),K,Z=S.length-1;Z>=0;Z--)if(K=lt(S[Z].anchor,S[Z].head),I.indentRight)b.replaceRange(G.repeat(F),K,K);else{for(var se=b.getLine(K.line),de=0,ke=0;ke<F;ke++){var Te=se[K.ch+de];if(Te==" ")de++;else{if(Te!=" ")break;de++;for(var Ce=1;Ce<G.length&&(Te=se[K.ch+de],Te===" ");Ce++)de++}}b.replaceRange("",K,ee(K,0,de))}return K}if(b.indentMore)for(var ke=0;ke<F;ke++)I.indentRight?b.indentMore():b.indentLess();else{var $e=S[0].anchor.line,Fe=z.visualBlock?S[S.length-1].anchor.line:S[0].head.line;I.linewise&&Fe--;for(var Z=$e;Z<=Fe;Z++)for(var ke=0;ke<F;ke++)b.indentLine(Z,I.indentRight)}return Jn.moveToFirstNonWhiteSpaceCharacter(b,S[0].anchor)},indentAuto:function(b,I,S){return b.execCommand("indentAuto"),Jn.moveToFirstNonWhiteSpaceCharacter(b,S[0].anchor)},hardWrap:function(b,I,S,z,F){if(b.hardWrap){var W=S[0].anchor.line,G=S[0].head.line;I.linewise&&G--;var K=b.hardWrap({from:W,to:G});return K>W&&I.linewise&&K--,I.keepCursor?z:new je(K,0)}},changeCase:function(b,I,S,z,F){for(var W=b.getSelections(),G=[],K=I.toLower,Z=0;Z<W.length;Z++){var se=W[Z],de="";if(K===!0)de=se.toLowerCase();else if(K===!1)de=se.toUpperCase();else for(var ke=0;ke<se.length;ke++){var Te=se.charAt(ke);de+=f(Te)?Te.toLowerCase():Te.toUpperCase()}G.push(de)}return b.replaceSelections(G),I.shouldMoveCursor?F:!b.state.vim.visualMode&&I.linewise&&S[0].anchor.line+1==S[0].head.line?Jn.moveToFirstNonWhiteSpaceCharacter(b,z):I.linewise?z:lt(S[0].anchor,S[0].head)},yank:function(b,I,S,z){var F=b.state.vim,W=b.getSelection(),G=F.visualMode?lt(F.sel.anchor,F.sel.head,S[0].head,S[0].anchor):z;return Ge.registerController.pushText(I.registerName,"yank",W,I.linewise,F.visualBlock),G}},ar={jumpListWalk:function(b,I,S){if(!S.visualMode){var z=I.repeat,F=I.forward,W=Ge.jumpList,G=W.move(b,F?z:-z),K=G?G.find():void 0;K=K||b.getCursor(),b.setCursor(K),b.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(b,I,S){if(!S.visualMode){var z=I.repeat||1,F=b.defaultTextHeight(),W=b.getScrollInfo().top,G=F*z,K=I.forward?W+G:W-G,Z=Be(b.getCursor()),se=b.charCoords(Z,"local");if(I.forward)K>se.top?(Z.line+=(K-se.top)/F,Z.line=Math.ceil(Z.line),b.setCursor(Z),se=b.charCoords(Z,"local"),b.scrollTo(null,se.top)):b.scrollTo(null,K);else{var de=K+b.getScrollInfo().clientHeight;de<se.bottom?(Z.line-=(se.bottom-de)/F,Z.line=Math.floor(Z.line),b.setCursor(Z),se=b.charCoords(Z,"local"),b.scrollTo(null,se.bottom-b.getScrollInfo().clientHeight)):b.scrollTo(null,K)}}},scrollToCursor:function(b,I){var S=b.getCursor().line,z=b.charCoords(new je(S,0),"local"),F=b.getScrollInfo().clientHeight,W=z.top;switch(I.position){case"center":W=z.bottom-F/2;break;case"bottom":var G=new je(S,b.getLine(S).length-1),K=b.charCoords(G,"local"),Z=K.bottom-W;W=W-F+Z}b.scrollTo(null,W)},replayMacro:function(b,I,S){var z=I.selectedCharacter,F=I.repeat,W=Ge.macroModeState;for(z=="@"?z=W.latestRegister:W.latestRegister=z;F--;)Jo(b,S,W,z)},enterMacroRecordMode:function(b,I){var S=Ge.macroModeState,z=I.selectedCharacter;Ge.registerController.isValidRegister(z)&&S.enterMacroRecordMode(b,z)},toggleOverwrite:function(b){b.state.overwrite?(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),Ve.signal(b,"vim-mode-change",{mode:"insert"})):(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),Ve.signal(b,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(b,I,S){if(!b.getOption("readOnly")){S.insertMode=!0,S.insertModeRepeat=I&&I.repeat||1;var z=I?I.insertAt:null,F=S.sel,W=I.head||b.getCursor("head"),G=b.listSelections().length;if(z=="eol")W=new je(W.line,Ie(b,W.line));else if(z=="bol")W=new je(W.line,0);else if(z=="charAfter"){var K=v(b,W,ee(W,0,1));W=K.end}else if(z=="firstNonBlank"){var K=v(b,W,Jn.moveToFirstNonWhiteSpaceCharacter(b,W));W=K.end}else if(z=="startOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(W=new je(Math.min(F.head.line,F.anchor.line),Math.min(F.head.ch,F.anchor.ch)),G=Math.abs(F.head.line-F.anchor.line)+1):F.head.line<F.anchor.line?W=F.head:W=new je(F.anchor.line,0)}else if(z=="endOfSelectedArea"){if(!S.visualMode)return;S.visualBlock?(W=new je(Math.min(F.head.line,F.anchor.line),Math.max(F.head.ch,F.anchor.ch)+1),G=Math.abs(F.head.line-F.anchor.line)+1):F.head.line>=F.anchor.line?W=ee(F.head,0,1):W=new je(F.anchor.line,0)}else if(z=="inplace"){if(S.visualMode)return}else z=="lastEdit"&&(W=Do(b)||W);b.setOption("disableInput",!1),I&&I.replace?(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),Ve.signal(b,"vim-mode-change",{mode:"replace"})):(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),Ve.signal(b,"vim-mode-change",{mode:"insert"})),Ge.macroModeState.isPlaying||(b.on("change",Qo),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=b.setBookmark(W,{insertLeft:!0}),Ve.on(b.getInputField(),"keydown",Bo)),S.visualMode&&Ln(b),Sn(b,W,G)}},toggleVisualMode:function(b,I,S){var z=I.repeat,F=b.getCursor(),W;if(S.visualMode)S.visualLine^I.linewise||S.visualBlock^I.blockwise?(S.visualLine=!!I.linewise,S.visualBlock=!!I.blockwise,Ve.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Tn(b)):Ln(b);else{S.visualMode=!0,S.visualLine=!!I.linewise,S.visualBlock=!!I.blockwise,W=he(b,new je(F.line,F.ch+z-1));var G=v(b,F,W);S.sel={anchor:G.start,head:G.end},Ve.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Tn(b),ur(b,S,"<",lt(F,W)),ur(b,S,">",ct(F,W))}},reselectLastSelection:function(b,I,S){var z=S.lastSelection;if(S.visualMode&&Yt(b,S),z){var F=z.anchorMark.find(),W=z.headMark.find();if(!F||!W)return;S.sel={anchor:F,head:W},S.visualMode=!0,S.visualLine=z.visualLine,S.visualBlock=z.visualBlock,Tn(b),ur(b,S,"<",lt(F,W)),ur(b,S,">",ct(F,W)),Ve.signal(b,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""})}},joinLines:function(b,I,S){var z,F;if(S.visualMode){if(z=b.getCursor("anchor"),F=b.getCursor("head"),Ze(F,z)){var W=F;F=z,z=W}F.ch=Ie(b,F.line)-1}else{var G=Math.max(I.repeat,2);z=b.getCursor(),F=he(b,new je(z.line+G-1,1/0))}for(var K=0,Z=z.line;Z<F.line;Z++){K=Ie(b,z.line);var se="",de=0;if(!I.keepSpaces){var ke=b.getLine(z.line+1);de=ke.search(/\S/),de==-1?de=ke.length:se=" "}b.replaceRange(se,new je(z.line,K),new je(z.line+1,de))}var Te=he(b,new je(z.line,K));S.visualMode&&Ln(b,!1),b.setCursor(Te)},newLineAndEnterInsertMode:function(b,I,S){S.insertMode=!0;var z=Be(b.getCursor());if(z.line===b.firstLine()&&!I.after)b.replaceRange(`
1442
+ `,new je(b.firstLine(),0)),b.setCursor(b.firstLine(),0);else{z.line=I.after?z.line:z.line-1,z.ch=Ie(b,z.line),b.setCursor(z);var F=Ve.commands.newlineAndIndentContinueComment||Ve.commands.newlineAndIndent;F(b)}this.enterInsertMode(b,{repeat:I.repeat},S)},paste:function(b,I,S){var z=this,F=Ge.registerController.getRegister(I.registerName),W=function(){var G=F.toString();z.continuePaste(b,I,S,G,F)};I.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(G){z.continuePaste(b,I,S,G,F)},function(){W()}):W()},continuePaste:function(b,I,S,z,F){var W=Be(b.getCursor());if(z){if(I.matchIndent){var G=b.getOption("tabSize"),K=function(Qn){var V=Qn.split(" ").length-1,J=Qn.split(" ").length-1;return V*G+J*1},Z=b.getLine(b.getCursor().line),se=K(Z.match(/^\s*/)[0]),de=z.replace(/\n$/,""),ke=z!==de,Te=K(z.match(/^\s*/)[0]),z=de.replace(/^\s*/gm,function(Qn){var V=se+(K(Qn)-Te);if(V<0)return"";if(b.getOption("indentWithTabs")){var J=Math.floor(V/G);return Array(J+1).join(" ")}return Array(V+1).join(" ")});z+=ke?`
1443
+ `:""}if(I.repeat>1)var z=Array(I.repeat+1).join(z);var Ce=F.linewise,$e=F.blockwise;if($e){z=z.split(`
1444
+ `),Ce&&z.pop();for(var Fe=0;Fe<z.length;Fe++)z[Fe]=z[Fe]==""?" ":z[Fe];W.ch+=I.after?1:0,W.ch=Math.min(Ie(b,W.line),W.ch)}else Ce?S.visualMode?z=S.visualLine?z.slice(0,-1):`
1445
+ `+z.slice(0,z.length-1)+`
1446
+ `:I.after?(z=`
1447
+ `+z.slice(0,z.length-1),W.ch=Ie(b,W.line)):W.ch=0:W.ch+=I.after?1:0;var Pe;if(S.visualMode){S.lastPastedText=z;var et,kt=it(b,S),ut=kt[0],ft=kt[1],Hn=b.getSelection(),Lt=b.listSelections(),un=new Array(Lt.length).join("1").split("1");S.lastSelection&&(et=S.lastSelection.headMark.find()),Ge.registerController.unnamedRegister.setText(Hn),$e?(b.replaceSelections(un),ft=new je(ut.line+z.length-1,ut.ch),b.setCursor(ut),dn(b,ft),b.replaceSelections(z),Pe=ut):S.visualBlock?(b.replaceSelections(un),b.setCursor(ut),b.replaceRange(z,ut,ut),Pe=ut):(b.replaceRange(z,ut,ft),Pe=b.posFromIndex(b.indexFromPos(ut)+z.length-1)),et&&(S.lastSelection.headMark=b.setBookmark(et)),Ce&&(Pe.ch=0)}else if($e){b.setCursor(W);for(var Fe=0;Fe<z.length;Fe++){var Ft=W.line+Fe;Ft>b.lastLine()&&b.replaceRange(`
1448
+ `,new je(Ft,0));var Nt=Ie(b,Ft);Nt<W.ch&&qt(b,Ft,W.ch)}b.setCursor(W),dn(b,new je(W.line+z.length-1,W.ch)),b.replaceSelections(z),Pe=W}else if(b.replaceRange(z,W),Ce){var Ft=I.after?W.line+1:W.line;Pe=new je(Ft,fn(b.getLine(Ft)))}else Pe=Be(W),/\n/.test(z)||(Pe.ch+=z.length-(I.after?1:0));S.visualMode&&Ln(b,!1),b.setCursor(Pe)}},undo:function(b,I){b.operation(function(){Je(b,Ve.commands.undo,I.repeat)(),b.setCursor(he(b,b.getCursor("start")))})},redo:function(b,I){Je(b,Ve.commands.redo,I.repeat)()},setRegister:function(b,I,S){S.inputState.registerName=I.selectedCharacter},insertRegister:function(b,I,S){var z=I.selectedCharacter,F=Ge.registerController.getRegister(z),W=F&&F.toString();W&&b.replaceSelection(W)},oneNormalCommand:function(b,I,S){Dr(b,!0),S.insertModeReturn=!0,Ve.on(b,"vim-command-done",function z(){S.visualMode||(S.insertModeReturn&&(S.insertModeReturn=!1,S.insertMode||ar.enterInsertMode(b,{},S)),Ve.off(b,"vim-command-done",z))})},setMark:function(b,I,S){var z=I.selectedCharacter;ur(b,S,z,b.getCursor())},replace:function(b,I,S){var z=I.selectedCharacter,F=b.getCursor(),W,G,K=b.listSelections();if(S.visualMode)F=b.getCursor("start"),G=b.getCursor("end");else{var Z=b.getLine(F.line);W=F.ch+I.repeat,W>Z.length&&(W=Z.length),G=new je(F.line,W)}var se=v(b,F,G);if(F=se.start,G=se.end,z==`
1449
+ `)S.visualMode||b.replaceRange("",F,G),(Ve.commands.newlineAndIndentContinueComment||Ve.commands.newlineAndIndent)(b);else{var de=b.getRange(F,G);if(de=de.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,z),de=de.replace(/[^\n]/g,z),S.visualBlock){var ke=new Array(b.getOption("tabSize")+1).join(" ");de=b.getSelection(),de=de.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,z),de=de.replace(/\t/g,ke).replace(/[^\n]/g,z).split(`
1450
+ `),b.replaceSelections(de)}else b.replaceRange(de,F,G);S.visualMode?(F=Ze(K[0].anchor,K[0].head)?K[0].anchor:K[0].head,b.setCursor(F),Ln(b,!1)):b.setCursor(ee(G,0,-1))}},incrementNumberToken:function(b,I){for(var S=b.getCursor(),z=b.getLine(S.line),F=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,W,G,K,Z;(W=F.exec(z))!==null&&(G=W.index,K=G+W[0].length,!(S.ch<K)););if(!(!I.backtrack&&K<=S.ch)&&W){var se=W[2]||W[4],de=W[3]||W[5],ke=I.increase?1:-1,Te={"0b":2,0:8,"":10,"0x":16}[se.toLowerCase()],Ce=parseInt(W[1]+de,Te)+ke*I.repeat;Z=Ce.toString(Te);var $e=se?new Array(de.length-Z.length+1+W[1].length).join("0"):"";Z.charAt(0)==="-"?Z="-"+se+$e+Z.substr(1):Z=se+$e+Z;var Fe=new je(S.line,G),Pe=new je(S.line,K);b.replaceRange(Z,Fe,Pe),b.setCursor(new je(S.line,G+Z.length-1))}},repeatLastEdit:function(b,I,S){var z=S.lastEditInputState;if(z){var F=I.repeat;F&&I.repeatIsExplicit?S.lastEditInputState.repeatOverride=F:F=S.lastEditInputState.repeatOverride||F,Cs(b,S,F,!1)}},indent:function(b,I){b.indentLine(b.getCursor().line,I.indentRight)},exitInsertMode:Dr},to={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},no={bracket:{isComplete:function(b){if(b.nextCh===b.symb){if(b.depth++,b.depth>=1)return!0}else b.nextCh===b.reverseSymb&&b.depth--;return!1}},section:{init:function(b){b.curMoveThrough=!0,b.symb=(b.forward?"]":"[")===b.symb?"{":"}"},isComplete:function(b){return b.index===0&&b.nextCh===b.symb}},comment:{isComplete:function(b){var I=b.lastCh==="*"&&b.nextCh==="/";return b.lastCh=b.nextCh,I}},method:{init:function(b){b.symb=b.symb==="m"?"{":"}",b.reverseSymb=b.symb==="{"?"}":"{"},isComplete:function(b){return b.nextCh===b.symb}},preprocess:{init:function(b){b.index=0},isComplete:function(b){if(b.nextCh==="#"){var I=b.lineText.match(/^#(\w+)/)[1];if(I==="endif"){if(b.forward&&b.depth===0)return!0;b.depth++}else if(I==="if"){if(!b.forward&&b.depth===0)return!0;b.depth--}if(I==="else"&&b.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),Or.prototype={getQuery:function(){return Ge.query},setQuery:function(b){Ge.query=b},getOverlay:function(){return this.searchOverlay},setOverlay:function(b){this.searchOverlay=b},isReversed:function(){return Ge.isReversed},setReversed:function(b){Ge.isReversed=b},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(b){this.annotate=b}};var Co={"\\n":`
1451
+ `,"\\r":"\r","\\t":" "},Ia={"\\/":"/","\\\\":"\\","\\n":`
1452
+ `,"\\r":"\r","\\t":" ","\\&":"&"},Cn=0,bl=function(){this.buildCommandMap_()};bl.prototype={processCommand:function(b,I,S){var z=this;b.operation(function(){b.curOp.isVimOp=!0,z._processCommand(b,I,S)})},_processCommand:function(b,I,S){var z=b.state.vim,F=Ge.registerController.getRegister(":"),W=F.toString(),G=new Ve.StringStream(I);F.setText(I);var K=S||{};K.input=I;try{this.parseInput_(b,G,K)}catch(de){throw Pt(b,de.toString()),de}z.visualMode&&Ln(b);var Z,se;if(!K.commandName)K.line!==void 0&&(se="move");else if(Z=this.matchCommand_(K.commandName),Z){if(se=Z.name,Z.excludeFromCommandHistory&&F.setText(W),this.parseCommandArgs_(G,K,Z),Z.type=="exToKey"){k(b,Z.toKeys,Z);return}if(Z.type=="exToEx"){this.processCommand(b,Z.toInput);return}}if(!se){Pt(b,'Not an editor command ":'+I+'"');return}try{$r[se](b,K),(!Z||!Z.possiblyAsync)&&K.callback&&K.callback()}catch(de){throw Pt(b,de.toString()),de}},parseInput_:function(b,I,S){if(I.eatWhile(":"),I.eat("%")?(S.line=b.firstLine(),S.lineEnd=b.lastLine()):(S.line=this.parseLineSpec_(b,I),S.line!==void 0&&I.eat(",")&&(S.lineEnd=this.parseLineSpec_(b,I))),S.line==null)if(b.state.vim.visualMode){var z=pi(b,b.state.vim,"<");S.selectionLine=z&&z.line,z=pi(b,b.state.vim,">"),S.selectionLineEnd=z&&z.line}else S.selectionLine=b.getCursor().line;else S.selectionLine=S.line,S.selectionLineEnd=S.lineEnd;var F=I.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return F?S.commandName=F[1]:S.commandName=I.match(/.*/)[0],S},parseLineSpec_:function(b,I){var S=I.match(/^(\d+)/);if(S)return parseInt(S[1],10)-1;switch(I.next()){case".":return this.parseLineSpecOffset_(I,b.getCursor().line);case"$":return this.parseLineSpecOffset_(I,b.lastLine());case"'":var z=I.next(),F=pi(b,b.state.vim,z);if(!F)throw new Error("Mark not set");return this.parseLineSpecOffset_(I,F.line);case"-":case"+":return I.backUp(1),this.parseLineSpecOffset_(I,b.getCursor().line);default:return I.backUp(1),void 0}},parseLineSpecOffset_:function(b,I){var S=b.match(/^([+-])?(\d+)/);if(S){var z=parseInt(S[2],10);S[1]=="-"?I-=z:I+=z}return I},parseCommandArgs_:function(b,I,S){if(!b.eol()){I.argString=b.match(/.*/)[0];var z=S.argDelimiter||/\s+/,F=Ct(I.argString).split(z);F.length&&F[0]&&(I.args=F)}},matchCommand_:function(b){for(var I=b.length;I>0;I--){var S=b.substring(0,I);if(this.commandMap_[S]){var z=this.commandMap_[S];if(z.name.indexOf(b)===0)return z}}return null},buildCommandMap_:function(){this.commandMap_={};for(var b=0;b<mi.length;b++){var I=mi[b],S=I.shortName||I.name;this.commandMap_[S]=I}},map:function(b,I,S,z){if(b!=":"&&b.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var F=b.substring(1);I!=":"&&I.charAt(0)==":"?this.commandMap_[F]={name:F,type:"exToEx",toInput:I.substring(1),user:!0}:this.commandMap_[F]={name:F,type:"exToKey",toKeys:I,user:!0}}else{var W={keys:b,type:"keyToKey",toKeys:I,noremap:!!z};S&&(W.context=S),Wn.unshift(W)}},unmap:function(b,I){if(b!=":"&&b.charAt(0)==":"){if(I)throw Error("Mode not supported for ex mappings");var S=b.substring(1);if(this.commandMap_[S]&&this.commandMap_[S].user)return delete this.commandMap_[S],!0}else for(var z=b,F=0;F<Wn.length;F++)if(z==Wn[F].keys&&Wn[F].context===I)return Wn.splice(F,1),!0}};var $r={colorscheme:function(b,I){if(!I.args||I.args.length<1){Pt(b,b.getOption("theme"));return}b.setOption("theme",I.args[0])},map:function(b,I,S,z){var F=I.args;if(!F||F.length<2){b&&Pt(b,"Invalid mapping: "+I.input);return}ii.map(F[0],F[1],S,z)},imap:function(b,I){this.map(b,I,"insert")},nmap:function(b,I){this.map(b,I,"normal")},vmap:function(b,I){this.map(b,I,"visual")},omap:function(b,I){this.map(b,I,"operatorPending")},noremap:function(b,I){this.map(b,I,void 0,!0)},inoremap:function(b,I){this.map(b,I,"insert",!0)},nnoremap:function(b,I){this.map(b,I,"normal",!0)},vnoremap:function(b,I){this.map(b,I,"visual",!0)},onoremap:function(b,I){this.map(b,I,"operatorPending",!0)},unmap:function(b,I,S){var z=I.args;(!z||z.length<1||!ii.unmap(z[0],S))&&b&&Pt(b,"No such mapping: "+I.input)},mapclear:function(b,I){wt.mapclear()},imapclear:function(b,I){wt.mapclear("insert")},nmapclear:function(b,I){wt.mapclear("normal")},vmapclear:function(b,I){wt.mapclear("visual")},omapclear:function(b,I){wt.mapclear("operatorPending")},move:function(b,I){eo.processCommand(b,b.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:I.line+1})},set:function(b,I){var S=I.args,z=I.setCfg||{};if(!S||S.length<1){b&&Pt(b,"Invalid mapping: "+I.input);return}var F=S[0].split("="),W=F[0],G=F[1],K=!1,Z=!1;if(W.charAt(W.length-1)=="?"){if(G)throw Error("Trailing characters: "+I.argString);W=W.substring(0,W.length-1),K=!0}else W.charAt(W.length-1)=="!"&&(W=W.substring(0,W.length-1),Z=!0);G===void 0&&W.substring(0,2)=="no"&&(W=W.substring(2),G=!1);var se=rt[W]&&rt[W].type=="boolean";if(se&&(Z?G=!_(W,b,z):G==null&&(G=!0)),!se&&G===void 0||K){var de=_(W,b,z);de instanceof Error?Pt(b,de.message):de===!0||de===!1?Pt(b," "+(de?"":"no")+W):Pt(b," "+W+"="+de)}else{var ke=T(W,G,b,z);ke instanceof Error&&Pt(b,ke.message)}},setlocal:function(b,I){I.setCfg={scope:"local"},this.set(b,I)},setglobal:function(b,I){I.setCfg={scope:"global"},this.set(b,I)},registers:function(b,I){var S=I.args,z=Ge.registerController.registers,F=`----------Registers----------
1453
+
1454
+ `;if(S){var W;S=S.join("");for(var G=0;G<S.length;G++)if(W=S.charAt(G),!!Ge.registerController.isValidRegister(W)){var K=z[W]||new j;F+='"'+W+" "+K.toString()+`
1455
+ `}}else for(var W in z){var Z=z[W].toString();Z.length&&(F+='"'+W+" "+Z+`
1456
+ `)}Pt(b,F)},sort:function(b,I){function S(){if(I.argString){var Ft=new Ve.StringStream(I.argString);if(Ft.eat("!")&&(W=!0),Ft.eol())return;if(!Ft.eatSpace())return"Invalid arguments";var Nt=Ft.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Nt&&!Ft.eol())return"Invalid arguments";if(Nt[1]){G=Nt[1].indexOf("i")!=-1,K=Nt[1].indexOf("u")!=-1;var br=Nt[1].indexOf("d")!=-1||Nt[1].indexOf("n")!=-1&&1,Sr=Nt[1].indexOf("x")!=-1&&1,Qn=Nt[1].indexOf("o")!=-1&&1;if(br+Sr+Qn>1)return"Invalid arguments";Z=br&&"decimal"||Sr&&"hex"||Qn&&"octal"}Nt[2]&&(se=new RegExp(Nt[2].substr(1,Nt[2].length-2),G?"i":""))}}function z(Ft,Nt){if(W){var br;br=Ft,Ft=Nt,Nt=br}G&&(Ft=Ft.toLowerCase(),Nt=Nt.toLowerCase());var Sr=Z&&Pe.exec(Ft),Qn=Z&&Pe.exec(Nt);return Sr?(Sr=parseInt((Sr[1]+Sr[2]).toLowerCase(),et),Qn=parseInt((Qn[1]+Qn[2]).toLowerCase(),et),Sr-Qn):Ft<Nt?-1:1}function F(Ft,Nt){if(W){var br;br=Ft,Ft=Nt,Nt=br}return G&&(Ft[0]=Ft[0].toLowerCase(),Nt[0]=Nt[0].toLowerCase()),Ft[0]<Nt[0]?-1:1}var W,G,K,Z,se,de=S();if(de){Pt(b,de+": "+I.argString);return}var ke=I.line||b.firstLine(),Te=I.lineEnd||I.line||b.lastLine();if(ke!=Te){var Ce=new je(ke,0),$e=new je(Te,Ie(b,Te)),Fe=b.getRange(Ce,$e).split(`
1457
+ `),Pe=se||(Z=="decimal"?/(-?)([\d]+)/:Z=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Z=="octal"?/([0-7]+)/:null),et=Z=="decimal"?10:Z=="hex"?16:Z=="octal"?8:null,kt=[],ut=[];if(Z||se)for(var ft=0;ft<Fe.length;ft++){var Hn=se?Fe[ft].match(se):null;Hn&&Hn[0]!=""?kt.push(Hn):!se&&Pe.exec(Fe[ft])?kt.push(Fe[ft]):ut.push(Fe[ft])}else ut=Fe;if(kt.sort(se?F:z),se)for(var ft=0;ft<kt.length;ft++)kt[ft]=kt[ft].input;else Z||ut.sort(z);if(Fe=W?kt.concat(ut):ut.concat(kt),K){var Lt=Fe,un;Fe=[];for(var ft=0;ft<Lt.length;ft++)Lt[ft]!=un&&Fe.push(Lt[ft]),un=Lt[ft]}b.replaceRange(Fe.join(`
1458
+ `),Ce,$e)}},vglobal:function(b,I){this.global(b,I)},normal:function(b,I){var S=I.argString;if(S&&S[0]=="!"&&(S=S.slice(1),vi=!0),S=S.trimStart(),!S){Pt(b,"Argument is required.");return}var z=I.line;if(typeof z=="number")for(var F=isNaN(I.lineEnd)?z:I.lineEnd,W=z;W<=F;W++)b.setCursor(W,0),k(b,I.argString.trimStart()),b.state.vim.insertMode&&Dr(b,!0);else k(b,I.argString.trimStart()),b.state.vim.insertMode&&Dr(b,!0)},global:function(b,I){var S=I.argString;if(!S){Pt(b,"Regular Expression missing from global");return}var z=I.commandName[0]==="v";S[0]==="!"&&I.commandName[0]==="g"&&(z=!0,S=S.slice(1));var F=I.line!==void 0?I.line:b.firstLine(),W=I.lineEnd||I.line||b.lastLine(),G=jn(S),K=S,Z;if(G.length&&(K=G[0],Z=G.slice(1,G.length).join("/")),K)try{pn(b,K,!0,!0)}catch{Pt(b,"Invalid regex: "+K);return}for(var se=vn(b).getQuery(),de=[],ke=F;ke<=W;ke++){var Te=b.getLine(ke),Ce=se.test(Te);Ce!==z&&de.push(Z?b.getLineHandle(ke):Te)}if(!Z){Pt(b,de.join(`
1459
+ `));return}var $e=0,Fe=function(){if($e<de.length){var Pe=de[$e++],et=b.getLineNumber(Pe);if(et==null){Fe();return}var kt=et+1+Z;ii.processCommand(b,kt,{callback:Fe})}else b.releaseLineHandles&&b.releaseLineHandles()};Fe()},substitute:function(b,I){if(!b.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var S=I.argString,z=S?di(S,S[0]):[],F,W="",G,K,Z,se=!1,de=!1;if(z.length)F=z[0],_("pcre")&&F!==""&&(F=new RegExp(F).source),W=z[1],W!==void 0&&(_("pcre")?W=bs(W.replace(/([^\\])&/g,"$1$$&")):W=ys(W),Ge.lastSubstituteReplacePart=W),G=z[2]?z[2].split(" "):[];else if(S&&S.length){Pt(b,"Substitutions should be of the form :s/pattern/replace/");return}if(G&&(K=G[0],Z=parseInt(G[1]),K&&(K.indexOf("c")!=-1&&(se=!0),K.indexOf("g")!=-1&&(de=!0),_("pcre")?F=F+"/"+K:F=F.replace(/\//g,"\\/")+"/"+K)),F)try{pn(b,F,!0,!0)}catch{Pt(b,"Invalid regex: "+F);return}if(W=W||Ge.lastSubstituteReplacePart,W===void 0){Pt(b,"No previous substitute regular expression");return}var ke=vn(b),Te=ke.getQuery(),Ce=I.line!==void 0?I.line:b.getCursor().line,$e=I.lineEnd||Ce;Ce==b.firstLine()&&$e==b.lastLine()&&($e=1/0),Z&&(Ce=$e,$e=Ce+Z-1);var Fe=he(b,new je(Ce,0)),Pe=b.getSearchCursor(Te,Fe);ti(b,se,de,Ce,$e,Pe,Te,W,I.callback)},startinsert:function(b,I){k(b,I.argString=="!"?"A":"i",{})},redo:Ve.commands.redo,undo:Ve.commands.undo,write:function(b){Ve.commands.save?Ve.commands.save(b):b.save&&b.save()},nohlsearch:function(b){Oi(b)},yank:function(b){var I=Be(b.getCursor()),S=I.line,z=b.getLine(S);Ge.registerController.pushText("0","yank",z,!0,!0)},delete:function(b,I){var S=I.selectionLine,z=isNaN(I.selectionLineEnd)?S:I.selectionLineEnd;Gs.delete(b,{linewise:!0},[{anchor:new je(S,0),head:new je(z+1,0)}])},join:function(b,I){var S=I.selectionLine,z=isNaN(I.selectionLineEnd)?S:I.selectionLineEnd;b.setCursor(new je(S,0)),ar.joinLines(b,{repeat:z-S},b.state.vim)},delmarks:function(b,I){if(!I.argString||!Ct(I.argString)){Pt(b,"Argument required");return}for(var S=b.state.vim,z=new Ve.StringStream(Ct(I.argString));!z.eol();){z.eatSpace();var F=z.pos;if(!z.match(/[a-zA-Z]/,!1)){Pt(b,"Invalid argument: "+I.argString.substring(F));return}var W=z.next();if(z.match("-",!0)){if(!z.match(/[a-zA-Z]/,!1)){Pt(b,"Invalid argument: "+I.argString.substring(F));return}var G=W,K=z.next();if(!(h(G)&&h(K)||f(G)&&f(K))){Pt(b,"Invalid argument: "+G+"-");return}var Z=G.charCodeAt(0),se=K.charCodeAt(0);if(Z>=se){Pt(b,"Invalid argument: "+I.argString.substring(F));return}for(var de=0;de<=se-Z;de++){var ke=String.fromCharCode(Z+de);delete S.marks[ke]}}else delete S.marks[W]}}},ii=new bl;R("insertModeEscKeysTimeout",200,"number"),Ve.Vim=wt;var os={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},Hr=wt.handleKey.bind(wt);wt.handleKey=function(b,I,S){return b.operation(function(){return Hr(b,I,S)},!0)},O(),r.CodeMirror=Ve;var Pi=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(b,I,S,z,F){var W=this.state.vim||{},G=I.width||S.characterWidth,K=S.lineHeight,Z=I.top,se=I.left;if(!W.insertMode){var de=z.cursor?sr.comparePoints(z.cursor,z.start)<=0:F.selection.isBackwards()||F.selection.isEmpty();!de&&se>G&&(se-=G)}!W.insertMode&&W.status&&(K/=2,Z+=K),Kn.translate(b,se,Z),Kn.setStyle(b.style,"width",G+"px"),Kn.setStyle(b.style,"height",K+"px")},$getDirectionForHighlight:function(b){var I=b.state.cm,S=Pi(I);if(!S.insertMode)return b.session.selection.isBackwards()||b.session.selection.isEmpty()},handleKeyboard:function(b,I,S,z,F){var W=b.editor,G=W.state.cm,K=Pi(G);if(z!=-1){if(K.insertMode||(I==-1?(S.charCodeAt(0)>255&&b.inputKey&&(S=b.inputKey,S&&b.inputHash==4&&(S=S.toUpperCase())),b.inputChar=S):I==4||I==0?b.inputKey==S&&b.inputHash==I&&b.inputChar?(S=b.inputChar,I=-1):(b.inputChar=null,b.inputKey=S,b.inputHash=I):b.inputChar=b.inputKey=null),G.state.overwrite&&K.insertMode&&S=="backspace"&&I==0)return{command:"gotoleft"};if(S=="c"&&I==1&&!Fo.isMac&&W.getCopyText())return W.once("copy",function(){K.insertMode?W.selection.clearSelection():G.operation(function(){Ln(G)})}),{command:"null",passEvent:!0};if(S=="esc"&&!K.insertMode&&!K.visualMode&&!G.ace.inMultiSelectMode){var Z=vn(G),se=Z.getOverlay();se&&G.removeOverlay(se)}if(I==-1||I&1||I===0&&S.length>1){var de=K.insertMode,ke=ks(I,S,F||{},K);K.status==null&&(K.status="");var Te=Zi(G,ke,"user");return K=Pi(G),Te&&K.status!=null?K.status+=ke:K.status==null&&(K.status=""),G._signal("changeStatus"),!Te&&(I!=-1||de)?void 0:{command:"null",passEvent:!Te}}}},attach:function(b){function I(){var z=Pi(S).insertMode;S.ace.renderer.setStyle("normal-mode",!z),b.textInput.setCommandMode(!z),b.renderer.$keepTextAreaAtCursor=z,b.renderer.$blockCursor=!z}b.state||(b.state={});var S=new Ve(b);b.state.cm=S,b.$vimModeHandler=this,s(S),Pi(S).status=null,S.on("vim-command-done",function(){S.virtualSelectionMode()||(Pi(S).status=null,S.ace._signal("changeStatus"),S.ace.session.markUndoGroup())}),S.on("changeStatus",function(){S.ace.renderer.updateCursor(),S.ace._signal("changeStatus")}),S.on("vim-mode-change",function(){S.virtualSelectionMode()||(I(),S._signal("changeStatus"))}),I(),b.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(S)},detach:function(b){var I=b.state.cm;d(I),I.destroy(),b.state.cm=null,b.$vimModeHandler=null,b.renderer.$cursorLayer.drawCursor=null,b.renderer.setStyle("normal-mode",!1),b.textInput.setCommandMode(!1),b.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(b){var I=b.state.cm,S=Pi(I);if(S.insertMode)return"INSERT";var z="";return S.visualMode&&(z+="VISUAL",S.visualLine&&(z+=" LINE"),S.visualBlock&&(z+=" BLOCK")),S.status&&(z+=(z?" ":"")+S.status),z}},wt.defineOption({name:"wrap",set:function(b,I){I&&I.ace.setOption("wrap",b)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),Wn.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"}}),Wn.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(b,I,S,z,F){var W=S[0].anchor.line,G=S[0].head.line;return I.linewise&&G--,Xi(b.ace,{startRow:W,endRow:G}),je(G,0)}),R("textwidth",void 0,"number",["tw"],function(b,I){if(I!==void 0){if(b===void 0){var S=I.ace.getOption("printMarginColumn");return S}var z=Math.round(b);z>1&&I.ace.setOption("printMarginColumn",z)}}),ar.aceCommand=function(b,I,S){b.vimCmd=I,b.ace.inVirtualSelectionMode?b.ace.on("beforeEndOperation",gi):gi(null,b.ace)},ar.fold=function(b,I,S){b.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(I.all?2:0)+(I.open?1:0)])},xo=Wn.length,r.handler.defaultKeymap=Wn,r.handler.actions=ar,r.Vim=wt}),(function(){ace.require(["ace/keyboard/vim"],function(t){e&&(e.exports=t)})})()})(py)),py.exports}uT();var my={},vy;function hT(){return vy||(vy=1,(function(e){(function(){var n={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(v){return c(g(v),arguments)}function r(v,s){return t.apply(null,[v].concat(s||[]))}function c(v,s){var d=1,a=v.length,l,h="",p,o,f,m,w,x,R,T;for(p=0;p<a;p++)if(typeof v[p]=="string")h+=v[p];else if(typeof v[p]=="object"){if(f=v[p],f.keys)for(l=s[d],o=0;o<f.keys.length;o++){if(l==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',f.keys[o],f.keys[o-1]));l=l[f.keys[o]]}else f.param_no?l=s[f.param_no]:l=s[d++];if(n.not_type.test(f.type)&&n.not_primitive.test(f.type)&&l instanceof Function&&(l=l()),n.numeric_arg.test(f.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(t("[sprintf] expecting number but found %T",l));switch(n.number.test(f.type)&&(R=l>=0),f.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,f.width?parseInt(f.width):0);break;case"e":l=f.precision?parseFloat(l).toExponential(f.precision):parseFloat(l).toExponential();break;case"f":l=f.precision?parseFloat(l).toFixed(f.precision):parseFloat(l);break;case"g":l=f.precision?String(Number(l.toPrecision(f.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=f.precision?l.substring(0,f.precision):l;break;case"t":l=String(!!l),l=f.precision?l.substring(0,f.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=f.precision?l.substring(0,f.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=f.precision?l.substring(0,f.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}n.json.test(f.type)?h+=l:(n.number.test(f.type)&&(!R||f.sign)?(T=R?"+":"-",l=l.toString().replace(n.sign,"")):T="",w=f.pad_char?f.pad_char==="0"?"0":f.pad_char.charAt(1):" ",x=f.width-(T+l).length,m=f.width&&x>0?w.repeat(x):"",h+=f.align?T+l+m:w==="0"?T+m+l:m+T+l)}return h}var u=Object.create(null);function g(v){if(u[v])return u[v];for(var s=v,d,a=[],l=0;s;){if((d=n.text.exec(s))!==null)a.push(d[0]);else if((d=n.modulo.exec(s))!==null)a.push("%");else if((d=n.placeholder.exec(s))!==null){if(d[2]){l|=1;var h=[],p=d[2],o=[];if((o=n.key.exec(p))!==null)for(h.push(o[1]);(p=p.substring(o[0].length))!=="";)if((o=n.key_access.exec(p))!==null)h.push(o[1]);else if((o=n.index_access.exec(p))!==null)h.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");d[2]=h}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:d[0],param_no:d[1],keys:d[2],sign:d[3],pad_char:d[4],align:d[5],width:d[6],precision:d[7],type:d[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");s=s.substring(d[0].length)}return u[v]=a}e.sprintf=t,e.vsprintf=r,typeof window<"u"&&(window.sprintf=t,window.vsprintf=r)})()})(my)),my}hT();var cu={exports:{}},dT=cu.exports,yy;function fT(){return yy||(yy=1,(function(e,n){(function(){var t,r="4.18.1",c=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",v="Invalid `variable` option passed into `_.template`",s="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",a=500,l="__lodash_placeholder__",h=1,p=2,o=4,f=1,m=2,w=1,x=2,R=4,T=8,_=16,C=32,P=64,O=128,E=256,k=512,B=30,N="...",M=800,$=16,A=1,D=2,j=3,U=1/0,q=9007199254740991,Q=17976931348623157e292,re=NaN,le=4294967295,ne=le-1,ue=le>>>1,he=[["ary",O],["bind",w],["bindKey",x],["curry",T],["curryRight",_],["flip",k],["partial",C],["partialRight",P],["rearg",E]],oe="[object Arguments]",ee="[object Array]",ye="[object AsyncFunction]",we="[object Boolean]",Ae="[object Date]",Je="[object DOMException]",Be="[object Error]",Ye="[object Function]",Ze="[object GeneratorFunction]",lt="[object Map]",ct="[object Number]",jt="[object Null]",Ie="[object Object]",Ct="[object Promise]",St="[object Proxy]",qt="[object RegExp]",dn="[object Set]",Sn="[object String]",pt="[object Symbol]",it="[object Undefined]",Yt="[object WeakMap]",Fn="[object WeakSet]",Tn="[object ArrayBuffer]",Dn="[object DataView]",Vn="[object Float32Array]",Ln="[object Float64Array]",Gn="[object Int8Array]",er="[object Int16Array]",fn="[object Int32Array]",Pn="[object Uint8Array]",Ei="[object Uint8ClampedArray]",Xr="[object Uint16Array]",ei="[object Uint32Array]",Ii=/\b__p \+= '';/g,fo=/\b(__p \+=) '' \+/g,vr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ji=/&(?:amp|lt|gt|quot|#39);/g,jr=/[&<>"']/g,po=RegExp(Ji.source),ur=RegExp(jr.source),Us=/<%-([\s\S]+?)%>/g,gs=/<%([\s\S]+?)%>/g,Ko=/<%=([\s\S]+?)%>/g,Mi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qn=/^\w*$/,Ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Or=/[\\^$.*+?()[\]{}|]/g,vn=RegExp(Or.source),jn=/^\s+/,Ri=/\s/,di=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ms=/\{\n\/\* \[wrapped with (.+)\] \*/,vs=/,? & /,ys=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,bs=/[()=,{}\[\]\/\s]/,fi=/\\(\\)?/g,Li=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pt=/\w*$/,Vs=/^[-+]0x[0-9a-f]+$/i,Nr=/^0b[01]+$/i,zt=/^\[object .+?Constructor\]$/,pn=/^0o[0-7]+$/i,Yn=/^(?:0|[1-9]\d*)$/,go=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tr=/($^)/,mo=/['\n\r\u2028\u2029\\]/g,Oi="\\ud800-\\udfff",ws="\\u0300-\\u036f",vo="\\ufe20-\\ufe2f",pi="\\u20d0-\\u20ff",Do=ws+vo+pi,ti="\\u2700-\\u27bf",Dr="a-z\\xdf-\\xf6\\xf8-\\xff",yo="\\xac\\xb1\\xd7\\xf7",Ni="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jo="\\u2000-\\u206f",Po=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",nr="A-Z\\xc0-\\xd6\\xd8-\\xde",zo="\\ufe0e\\ufe0f",Qo=yo+Ni+Jo+Po,Qi="['’]",xs="["+Oi+"]",Zo="["+Qo+"]",Bo="["+Do+"]",Cs="\\d+",Xo="["+ti+"]",es="["+Dr+"]",ks="[^"+Oi+Qo+Cs+ti+Dr+nr+"]",Di="\\ud83c[\\udffb-\\udfff]",Zi="(?:"+Bo+"|"+Di+")",gi="[^"+Oi+"]",sr="(?:\\ud83c[\\udde6-\\uddff]){2}",bo="[\\ud800-\\udbff][\\udc00-\\udfff]",Kn="["+nr+"]",wo="\\u200d",Pr="(?:"+es+"|"+ks+")",ts="(?:"+Kn+"|"+ks+")",ni="(?:"+Qi+"(?:d|ll|m|re|s|t|ve))?",Fo="(?:"+Qi+"(?:D|LL|M|RE|S|T|VE))?",jo=Zi+"?",Wr="["+zo+"]?",ns="(?:"+wo+"(?:"+[gi,sr,bo].join("|")+")"+Wr+jo+")*",Xi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ve="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rs=Wr+jo+ns,je="(?:"+[Xo,sr,bo].join("|")+")"+rs,Wn="(?:"+[gi+Bo+"?",Bo,sr,bo,xs].join("|")+")",xo=RegExp(Qi,"g"),mi=RegExp(Bo,"g"),En=RegExp(Di+"(?="+Di+")|"+Wn+rs,"g"),is=RegExp([Kn+"?"+es+"+"+ni+"(?="+[Zo,Kn,"$"].join("|")+")",ts+"+"+Fo+"(?="+[Zo,Kn+Pr,"$"].join("|")+")",Kn+"?"+Pr+"+"+ni,Kn+"+"+Fo,Ve,Xi,Cs,je].join("|"),"g"),X=RegExp("["+wo+Oi+Do+zo+"]"),xe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Me=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Oe=-1,Ke={};Ke[Vn]=Ke[Ln]=Ke[Gn]=Ke[er]=Ke[fn]=Ke[Pn]=Ke[Ei]=Ke[Xr]=Ke[ei]=!0,Ke[oe]=Ke[ee]=Ke[Tn]=Ke[we]=Ke[Dn]=Ke[Ae]=Ke[Be]=Ke[Ye]=Ke[lt]=Ke[ct]=Ke[Ie]=Ke[qt]=Ke[dn]=Ke[Sn]=Ke[Yt]=!1;var He={};He[oe]=He[ee]=He[Tn]=He[Dn]=He[we]=He[Ae]=He[Vn]=He[Ln]=He[Gn]=He[er]=He[fn]=He[lt]=He[ct]=He[Ie]=He[qt]=He[dn]=He[Sn]=He[pt]=He[Pn]=He[Ei]=He[Xr]=He[ei]=!0,He[Be]=He[Ye]=He[Yt]=!1;var rt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},sn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},wn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ge={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Wt=parseFloat,wt=parseInt,cn=typeof zs=="object"&&zs&&zs.Object===Object&&zs,vi=typeof self=="object"&&self&&self.Object===Object&&self,Kt=cn||vi||Function("return this")(),ri=n&&!n.nodeType&&n,yr=ri&&!0&&e&&!e.nodeType&&e,Wo=yr&&yr.exports===ri,eo=Wo&&cn.process,Jn=(function(){try{var be=yr&&yr.require&&yr.require("util").types;return be||eo&&eo.binding&&eo.binding("util")}catch{}})(),Gs=Jn&&Jn.isArrayBuffer,ar=Jn&&Jn.isDate,to=Jn&&Jn.isMap,no=Jn&&Jn.isRegExp,Co=Jn&&Jn.isSet,Ia=Jn&&Jn.isTypedArray;function Cn(be,Re,Ee){switch(Ee.length){case 0:return be.call(Re);case 1:return be.call(Re,Ee[0]);case 2:return be.call(Re,Ee[0],Ee[1]);case 3:return be.call(Re,Ee[0],Ee[1],Ee[2])}return be.apply(Re,Ee)}function bl(be,Re,Ee,Xe){for(var _t=-1,Dt=be==null?0:be.length;++_t<Dt;){var yn=be[_t];Re(Xe,yn,Ee(yn),be)}return Xe}function $r(be,Re){for(var Ee=-1,Xe=be==null?0:be.length;++Ee<Xe&&Re(be[Ee],Ee,be)!==!1;);return be}function ii(be,Re){for(var Ee=be==null?0:be.length;Ee--&&Re(be[Ee],Ee,be)!==!1;);return be}function os(be,Re){for(var Ee=-1,Xe=be==null?0:be.length;++Ee<Xe;)if(!Re(be[Ee],Ee,be))return!1;return!0}function Hr(be,Re){for(var Ee=-1,Xe=be==null?0:be.length,_t=0,Dt=[];++Ee<Xe;){var yn=be[Ee];Re(yn,Ee,be)&&(Dt[_t++]=yn)}return Dt}function Pi(be,Re){var Ee=be==null?0:be.length;return!!Ee&&ke(be,Re,0)>-1}function b(be,Re,Ee){for(var Xe=-1,_t=be==null?0:be.length;++Xe<_t;)if(Ee(Re,be[Xe]))return!0;return!1}function I(be,Re){for(var Ee=-1,Xe=be==null?0:be.length,_t=Array(Xe);++Ee<Xe;)_t[Ee]=Re(be[Ee],Ee,be);return _t}function S(be,Re){for(var Ee=-1,Xe=Re.length,_t=be.length;++Ee<Xe;)be[_t+Ee]=Re[Ee];return be}function z(be,Re,Ee,Xe){var _t=-1,Dt=be==null?0:be.length;for(Xe&&Dt&&(Ee=be[++_t]);++_t<Dt;)Ee=Re(Ee,be[_t],_t,be);return Ee}function F(be,Re,Ee,Xe){var _t=be==null?0:be.length;for(Xe&&_t&&(Ee=be[--_t]);_t--;)Ee=Re(Ee,be[_t],_t,be);return Ee}function W(be,Re){for(var Ee=-1,Xe=be==null?0:be.length;++Ee<Xe;)if(Re(be[Ee],Ee,be))return!0;return!1}var G=Fe("length");function K(be){return be.split("")}function Z(be){return be.match(ys)||[]}function se(be,Re,Ee){var Xe;return Ee(be,function(_t,Dt,yn){if(Re(_t,Dt,yn))return Xe=Dt,!1}),Xe}function de(be,Re,Ee,Xe){for(var _t=be.length,Dt=Ee+(Xe?1:-1);Xe?Dt--:++Dt<_t;)if(Re(be[Dt],Dt,be))return Dt;return-1}function ke(be,Re,Ee){return Re===Re?Rt(be,Re,Ee):de(be,Ce,Ee)}function Te(be,Re,Ee,Xe){for(var _t=Ee-1,Dt=be.length;++_t<Dt;)if(Xe(be[_t],Re))return _t;return-1}function Ce(be){return be!==be}function $e(be,Re){var Ee=be==null?0:be.length;return Ee?ut(be,Re)/Ee:re}function Fe(be){return function(Re){return Re==null?t:Re[be]}}function Pe(be){return function(Re){return be==null?t:be[Re]}}function et(be,Re,Ee,Xe,_t){return _t(be,function(Dt,yn,Qt){Ee=Xe?(Xe=!1,Dt):Re(Ee,Dt,yn,Qt)}),Ee}function kt(be,Re){var Ee=be.length;for(be.sort(Re);Ee--;)be[Ee]=be[Ee].value;return be}function ut(be,Re){for(var Ee,Xe=-1,_t=be.length;++Xe<_t;){var Dt=Re(be[Xe]);Dt!==t&&(Ee=Ee===t?Dt:Ee+Dt)}return Ee}function ft(be,Re){for(var Ee=-1,Xe=Array(be);++Ee<be;)Xe[Ee]=Re(Ee);return Xe}function Hn(be,Re){return I(Re,function(Ee){return[Ee,be[Ee]]})}function Lt(be){return be&&be.slice(0,At(be)+1).replace(jn,"")}function un(be){return function(Re){return be(Re)}}function Ft(be,Re){return I(Re,function(Ee){return be[Ee]})}function Nt(be,Re){return be.has(Re)}function br(be,Re){for(var Ee=-1,Xe=be.length;++Ee<Xe&&ke(Re,be[Ee],0)>-1;);return Ee}function Sr(be,Re){for(var Ee=be.length;Ee--&&ke(Re,be[Ee],0)>-1;);return Ee}function Qn(be,Re){for(var Ee=be.length,Xe=0;Ee--;)be[Ee]===Re&&++Xe;return Xe}var V=Pe(rt),J=Pe(sn);function ae(be){return"\\"+Ge[be]}function ce(be,Re){return be==null?t:be[Re]}function ge(be){return X.test(be)}function Se(be){return xe.test(be)}function Le(be){for(var Re,Ee=[];!(Re=be.next()).done;)Ee.push(Re.value);return Ee}function Ue(be){var Re=-1,Ee=Array(be.size);return be.forEach(function(Xe,_t){Ee[++Re]=[_t,Xe]}),Ee}function qe(be,Re){return function(Ee){return be(Re(Ee))}}function Qe(be,Re){for(var Ee=-1,Xe=be.length,_t=0,Dt=[];++Ee<Xe;){var yn=be[Ee];(yn===Re||yn===l)&&(be[Ee]=l,Dt[_t++]=Ee)}return Dt}function ot(be){var Re=-1,Ee=Array(be.size);return be.forEach(function(Xe){Ee[++Re]=Xe}),Ee}function ht(be){var Re=-1,Ee=Array(be.size);return be.forEach(function(Xe){Ee[++Re]=[Xe,Xe]}),Ee}function Rt(be,Re,Ee){for(var Xe=Ee-1,_t=be.length;++Xe<_t;)if(be[Xe]===Re)return Xe;return-1}function gn(be,Re,Ee){for(var Xe=Ee+1;Xe--;)if(be[Xe]===Re)return Xe;return Xe}function Jt(be){return ge(be)?On(be):G(be)}function Mt(be){return ge(be)?Zn(be):K(be)}function At(be){for(var Re=be.length;Re--&&Ri.test(be.charAt(Re)););return Re}var bt=Pe(wn);function On(be){for(var Re=En.lastIndex=0;En.test(be);)++Re;return Re}function Zn(be){return be.match(En)||[]}function wr(be){return be.match(is)||[]}var kn=(function be(Re){Re=Re==null?Kt:In.defaults(Kt.Object(),Re,In.pick(Kt,Me));var Ee=Re.Array,Xe=Re.Date,_t=Re.Error,Dt=Re.Function,yn=Re.Math,Qt=Re.Object,zi=Re.RegExp,Ur=Re.String,zn=Re.TypeError,ko=Ee.prototype,Vr=Dt.prototype,_s=Qt.prototype,ch=Re["__core-js_shared__"],uh=Vr.toString,_n=_s.hasOwnProperty,KD=0,m1=(function(){var i=/[^.]+$/.exec(ch&&ch.keys&&ch.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),hh=_s.toString,JD=uh.call(Qt),QD=Kt._,ZD=zi("^"+uh.call(_n).replace(Or,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dh=Wo?Re.Buffer:t,qs=Re.Symbol,fh=Re.Uint8Array,v1=dh?dh.allocUnsafe:t,ph=qe(Qt.getPrototypeOf,Qt),y1=Qt.create,b1=_s.propertyIsEnumerable,gh=ko.splice,w1=qs?qs.isConcatSpreadable:t,Sc=qs?qs.iterator:t,Ma=qs?qs.toStringTag:t,mh=(function(){try{var i=Da(Qt,"defineProperty");return i({},"",{}),i}catch{}})(),XD=Re.clearTimeout!==Kt.clearTimeout&&Re.clearTimeout,eP=Xe&&Xe.now!==Kt.Date.now&&Xe.now,tP=Re.setTimeout!==Kt.setTimeout&&Re.setTimeout,vh=yn.ceil,yh=yn.floor,Kp=Qt.getOwnPropertySymbols,nP=dh?dh.isBuffer:t,x1=Re.isFinite,rP=ko.join,iP=qe(Qt.keys,Qt),Tr=yn.max,oi=yn.min,oP=Xe.now,sP=Re.parseInt,C1=yn.random,aP=ko.reverse,Jp=Da(Re,"DataView"),Tc=Da(Re,"Map"),Qp=Da(Re,"Promise"),wl=Da(Re,"Set"),Ec=Da(Re,"WeakMap"),Ic=Da(Qt,"create"),bh=Ec&&new Ec,xl={},lP=Pa(Jp),cP=Pa(Tc),uP=Pa(Qp),hP=Pa(wl),dP=Pa(Ec),wh=qs?qs.prototype:t,Mc=wh?wh.valueOf:t,k1=wh?wh.toString:t;function te(i){if(lr(i)&&!Bt(i)&&!(i instanceof rn)){if(i instanceof _o)return i;if(_n.call(i,"__wrapped__"))return _C(i)}return new _o(i)}var Cl=(function(){function i(){}return function(y){if(!rr(y))return{};if(y1)return y1(y);i.prototype=y;var L=new i;return i.prototype=t,L}})();function xh(){}function _o(i,y){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!y,this.__index__=0,this.__values__=t}te.templateSettings={escape:Us,evaluate:gs,interpolate:Ko,variable:"",imports:{_:te}},te.prototype=xh.prototype,te.prototype.constructor=te,_o.prototype=Cl(xh.prototype),_o.prototype.constructor=_o;function rn(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=le,this.__views__=[]}function fP(){var i=new rn(this.__wrapped__);return i.__actions__=Bi(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Bi(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Bi(this.__views__),i}function pP(){if(this.__filtered__){var i=new rn(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function gP(){var i=this.__wrapped__.value(),y=this.__dir__,L=Bt(i),H=y<0,Y=L?i.length:0,ie=Sz(0,Y,this.__views__),fe=ie.start,pe=ie.end,_e=pe-fe,Ne=H?pe:fe-1,ze=this.__iteratees__,We=ze.length,st=0,yt=oi(_e,this.__takeCount__);if(!L||!H&&Y==_e&&yt==_e)return q1(i,this.__actions__);var Et=[];e:for(;_e--&&st<yt;){Ne+=y;for(var Vt=-1,$t=i[Ne];++Vt<We;){var en=ze[Vt],an=en.iteratee,oo=en.type,wi=an($t);if(oo==D)$t=wi;else if(!wi){if(oo==A)continue e;break e}}Et[st++]=$t}return Et}rn.prototype=Cl(xh.prototype),rn.prototype.constructor=rn;function Ra(i){var y=-1,L=i==null?0:i.length;for(this.clear();++y<L;){var H=i[y];this.set(H[0],H[1])}}function mP(){this.__data__=Ic?Ic(null):{},this.size=0}function vP(i){var y=this.has(i)&&delete this.__data__[i];return this.size-=y?1:0,y}function yP(i){var y=this.__data__;if(Ic){var L=y[i];return L===d?t:L}return _n.call(y,i)?y[i]:t}function bP(i){var y=this.__data__;return Ic?y[i]!==t:_n.call(y,i)}function wP(i,y){var L=this.__data__;return this.size+=this.has(i)?0:1,L[i]=Ic&&y===t?d:y,this}Ra.prototype.clear=mP,Ra.prototype.delete=vP,Ra.prototype.get=yP,Ra.prototype.has=bP,Ra.prototype.set=wP;function As(i){var y=-1,L=i==null?0:i.length;for(this.clear();++y<L;){var H=i[y];this.set(H[0],H[1])}}function xP(){this.__data__=[],this.size=0}function CP(i){var y=this.__data__,L=Ch(y,i);if(L<0)return!1;var H=y.length-1;return L==H?y.pop():gh.call(y,L,1),--this.size,!0}function kP(i){var y=this.__data__,L=Ch(y,i);return L<0?t:y[L][1]}function _P(i){return Ch(this.__data__,i)>-1}function AP(i,y){var L=this.__data__,H=Ch(L,i);return H<0?(++this.size,L.push([i,y])):L[H][1]=y,this}As.prototype.clear=xP,As.prototype.delete=CP,As.prototype.get=kP,As.prototype.has=_P,As.prototype.set=AP;function $s(i){var y=-1,L=i==null?0:i.length;for(this.clear();++y<L;){var H=i[y];this.set(H[0],H[1])}}function $P(){this.size=0,this.__data__={hash:new Ra,map:new(Tc||As),string:new Ra}}function SP(i){var y=Oh(this,i).delete(i);return this.size-=y?1:0,y}function TP(i){return Oh(this,i).get(i)}function EP(i){return Oh(this,i).has(i)}function IP(i,y){var L=Oh(this,i),H=L.size;return L.set(i,y),this.size+=L.size==H?0:1,this}$s.prototype.clear=$P,$s.prototype.delete=SP,$s.prototype.get=TP,$s.prototype.has=EP,$s.prototype.set=IP;function La(i){var y=-1,L=i==null?0:i.length;for(this.__data__=new $s;++y<L;)this.add(i[y])}function MP(i){return this.__data__.set(i,d),this}function RP(i){return this.__data__.has(i)}La.prototype.add=La.prototype.push=MP,La.prototype.has=RP;function Ho(i){var y=this.__data__=new As(i);this.size=y.size}function LP(){this.__data__=new As,this.size=0}function OP(i){var y=this.__data__,L=y.delete(i);return this.size=y.size,L}function NP(i){return this.__data__.get(i)}function DP(i){return this.__data__.has(i)}function PP(i,y){var L=this.__data__;if(L instanceof As){var H=L.__data__;if(!Tc||H.length<c-1)return H.push([i,y]),this.size=++L.size,this;L=this.__data__=new $s(H)}return L.set(i,y),this.size=L.size,this}Ho.prototype.clear=LP,Ho.prototype.delete=OP,Ho.prototype.get=NP,Ho.prototype.has=DP,Ho.prototype.set=PP;function _1(i,y){var L=Bt(i),H=!L&&za(i),Y=!L&&!H&&Zs(i),ie=!L&&!H&&!Y&&$l(i),fe=L||H||Y||ie,pe=fe?ft(i.length,Ur):[],_e=pe.length;for(var Ne in i)(y||_n.call(i,Ne))&&!(fe&&(Ne=="length"||Y&&(Ne=="offset"||Ne=="parent")||ie&&(Ne=="buffer"||Ne=="byteLength"||Ne=="byteOffset")||Es(Ne,_e)))&&pe.push(Ne);return pe}function A1(i){var y=i.length;return y?i[lg(0,y-1)]:t}function zP(i,y){return Nh(Bi(i),Oa(y,0,i.length))}function BP(i){return Nh(Bi(i))}function Zp(i,y,L){(L!==t&&!Vo(i[y],L)||L===t&&!(y in i))&&ss(i,y,L)}function Rc(i,y,L){var H=i[y];(!(_n.call(i,y)&&Vo(H,L))||L===t&&!(y in i))&&ss(i,y,L)}function Ch(i,y){for(var L=i.length;L--;)if(Vo(i[L][0],y))return L;return-1}function FP(i,y,L,H){return Ys(i,function(Y,ie,fe){y(H,Y,L(Y),fe)}),H}function $1(i,y){return i&&ls(y,zr(y),i)}function jP(i,y){return i&&ls(y,ji(y),i)}function ss(i,y,L){y=="__proto__"&&mh?mh(i,y,{configurable:!0,enumerable:!0,value:L,writable:!0}):i[y]=L}function Xp(i,y){for(var L=-1,H=y.length,Y=Ee(H),ie=i==null;++L<H;)Y[L]=ie?t:Og(i,y[L]);return Y}function Oa(i,y,L){return i===i&&(L!==t&&(i=i<=L?i:L),y!==t&&(i=i>=y?i:y)),i}function Ao(i,y,L,H,Y,ie){var fe,pe=y&h,_e=y&p,Ne=y&o;if(L&&(fe=Y?L(i,H,Y,ie):L(i)),fe!==t)return fe;if(!rr(i))return i;var ze=Bt(i);if(ze){if(fe=Ez(i),!pe)return Bi(i,fe)}else{var We=si(i),st=We==Ye||We==Ze;if(Zs(i))return J1(i,pe);if(We==Ie||We==oe||st&&!Y){if(fe=_e||st?{}:gC(i),!pe)return _e?yz(i,jP(fe,i)):vz(i,$1(fe,i))}else{if(!He[We])return Y?i:{};fe=Iz(i,We,pe)}}ie||(ie=new Ho);var yt=ie.get(i);if(yt)return yt;ie.set(i,fe),UC(i)?i.forEach(function($t){fe.add(Ao($t,y,L,$t,i,ie))}):WC(i)&&i.forEach(function($t,en){fe.set(en,Ao($t,y,L,en,i,ie))});var Et=Ne?_e?bg:yg:_e?ji:zr,Vt=ze?t:Et(i);return $r(Vt||i,function($t,en){Vt&&(en=$t,$t=i[en]),Rc(fe,en,Ao($t,y,L,en,i,ie))}),fe}function WP(i){var y=zr(i);return function(L){return S1(L,i,y)}}function S1(i,y,L){var H=L.length;if(i==null)return!H;for(i=Qt(i);H--;){var Y=L[H],ie=y[Y],fe=i[Y];if(fe===t&&!(Y in i)||!ie(fe))return!1}return!0}function T1(i,y,L){if(typeof i!="function")throw new zn(g);return Bc(function(){i.apply(t,L)},y)}function Lc(i,y,L,H){var Y=-1,ie=Pi,fe=!0,pe=i.length,_e=[],Ne=y.length;if(!pe)return _e;L&&(y=I(y,un(L))),H?(ie=b,fe=!1):y.length>=c&&(ie=Nt,fe=!1,y=new La(y));e:for(;++Y<pe;){var ze=i[Y],We=L==null?ze:L(ze);if(ze=H||ze!==0?ze:0,fe&&We===We){for(var st=Ne;st--;)if(y[st]===We)continue e;_e.push(ze)}else ie(y,We,H)||_e.push(ze)}return _e}var Ys=tC(as),E1=tC(tg,!0);function HP(i,y){var L=!0;return Ys(i,function(H,Y,ie){return L=!!y(H,Y,ie),L}),L}function kh(i,y,L){for(var H=-1,Y=i.length;++H<Y;){var ie=i[H],fe=y(ie);if(fe!=null&&(pe===t?fe===fe&&!io(fe):L(fe,pe)))var pe=fe,_e=ie}return _e}function UP(i,y,L,H){var Y=i.length;for(L=Ht(L),L<0&&(L=-L>Y?0:Y+L),H=H===t||H>Y?Y:Ht(H),H<0&&(H+=Y),H=L>H?0:GC(H);L<H;)i[L++]=y;return i}function I1(i,y){var L=[];return Ys(i,function(H,Y,ie){y(H,Y,ie)&&L.push(H)}),L}function Gr(i,y,L,H,Y){var ie=-1,fe=i.length;for(L||(L=Rz),Y||(Y=[]);++ie<fe;){var pe=i[ie];y>0&&L(pe)?y>1?Gr(pe,y-1,L,H,Y):S(Y,pe):H||(Y[Y.length]=pe)}return Y}var eg=nC(),M1=nC(!0);function as(i,y){return i&&eg(i,y,zr)}function tg(i,y){return i&&M1(i,y,zr)}function _h(i,y){return Hr(y,function(L){return Is(i[L])})}function Na(i,y){y=Js(y,i);for(var L=0,H=y.length;i!=null&&L<H;)i=i[Uo(y[L++])];return L&&L==H?i:t}function R1(i,y,L){var H=y(i);return Bt(i)?H:S(H,L(i))}function yi(i){return i==null?i===t?it:jt:Ma&&Ma in Qt(i)?$z(i):Bz(i)}function ng(i,y){return i>y}function VP(i,y){return i!=null&&_n.call(i,y)}function GP(i,y){return i!=null&&y in Qt(i)}function qP(i,y,L){return i>=oi(y,L)&&i<Tr(y,L)}function rg(i,y,L){for(var H=L?b:Pi,Y=i[0].length,ie=i.length,fe=ie,pe=Ee(ie),_e=1/0,Ne=[];fe--;){var ze=i[fe];fe&&y&&(ze=I(ze,un(y))),_e=oi(ze.length,_e),pe[fe]=!L&&(y||Y>=120&&ze.length>=120)?new La(fe&&ze):t}ze=i[0];var We=-1,st=pe[0];e:for(;++We<Y&&Ne.length<_e;){var yt=ze[We],Et=y?y(yt):yt;if(yt=L||yt!==0?yt:0,!(st?Nt(st,Et):H(Ne,Et,L))){for(fe=ie;--fe;){var Vt=pe[fe];if(!(Vt?Nt(Vt,Et):H(i[fe],Et,L)))continue e}st&&st.push(Et),Ne.push(yt)}}return Ne}function YP(i,y,L,H){return as(i,function(Y,ie,fe){y(H,L(Y),ie,fe)}),H}function Oc(i,y,L){y=Js(y,i),i=bC(i,y);var H=i==null?i:i[Uo(So(y))];return H==null?t:Cn(H,i,L)}function L1(i){return lr(i)&&yi(i)==oe}function KP(i){return lr(i)&&yi(i)==Tn}function JP(i){return lr(i)&&yi(i)==Ae}function Nc(i,y,L,H,Y){return i===y?!0:i==null||y==null||!lr(i)&&!lr(y)?i!==i&&y!==y:QP(i,y,L,H,Nc,Y)}function QP(i,y,L,H,Y,ie){var fe=Bt(i),pe=Bt(y),_e=fe?ee:si(i),Ne=pe?ee:si(y);_e=_e==oe?Ie:_e,Ne=Ne==oe?Ie:Ne;var ze=_e==Ie,We=Ne==Ie,st=_e==Ne;if(st&&Zs(i)){if(!Zs(y))return!1;fe=!0,ze=!1}if(st&&!ze)return ie||(ie=new Ho),fe||$l(i)?dC(i,y,L,H,Y,ie):_z(i,y,_e,L,H,Y,ie);if(!(L&f)){var yt=ze&&_n.call(i,"__wrapped__"),Et=We&&_n.call(y,"__wrapped__");if(yt||Et){var Vt=yt?i.value():i,$t=Et?y.value():y;return ie||(ie=new Ho),Y(Vt,$t,L,H,ie)}}return st?(ie||(ie=new Ho),Az(i,y,L,H,Y,ie)):!1}function ZP(i){return lr(i)&&si(i)==lt}function ig(i,y,L,H){var Y=L.length,ie=Y,fe=!H;if(i==null)return!ie;for(i=Qt(i);Y--;){var pe=L[Y];if(fe&&pe[2]?pe[1]!==i[pe[0]]:!(pe[0]in i))return!1}for(;++Y<ie;){pe=L[Y];var _e=pe[0],Ne=i[_e],ze=pe[1];if(fe&&pe[2]){if(Ne===t&&!(_e in i))return!1}else{var We=new Ho;if(H)var st=H(Ne,ze,_e,i,y,We);if(!(st===t?Nc(ze,Ne,f|m,H,We):st))return!1}}return!0}function O1(i){if(!rr(i)||Oz(i))return!1;var y=Is(i)?ZD:zt;return y.test(Pa(i))}function XP(i){return lr(i)&&yi(i)==qt}function ez(i){return lr(i)&&si(i)==dn}function tz(i){return lr(i)&&jh(i.length)&&!!Ke[yi(i)]}function N1(i){return typeof i=="function"?i:i==null?Wi:typeof i=="object"?Bt(i)?z1(i[0],i[1]):P1(i):ik(i)}function og(i){if(!zc(i))return iP(i);var y=[];for(var L in Qt(i))_n.call(i,L)&&L!="constructor"&&y.push(L);return y}function nz(i){if(!rr(i))return zz(i);var y=zc(i),L=[];for(var H in i)H=="constructor"&&(y||!_n.call(i,H))||L.push(H);return L}function sg(i,y){return i<y}function D1(i,y){var L=-1,H=Fi(i)?Ee(i.length):[];return Ys(i,function(Y,ie,fe){H[++L]=y(Y,ie,fe)}),H}function P1(i){var y=xg(i);return y.length==1&&y[0][2]?vC(y[0][0],y[0][1]):function(L){return L===i||ig(L,i,y)}}function z1(i,y){return kg(i)&&mC(y)?vC(Uo(i),y):function(L){var H=Og(L,i);return H===t&&H===y?Ng(L,i):Nc(y,H,f|m)}}function Ah(i,y,L,H,Y){i!==y&&eg(y,function(ie,fe){if(Y||(Y=new Ho),rr(ie))rz(i,y,fe,L,Ah,H,Y);else{var pe=H?H(Ag(i,fe),ie,fe+"",i,y,Y):t;pe===t&&(pe=ie),Zp(i,fe,pe)}},ji)}function rz(i,y,L,H,Y,ie,fe){var pe=Ag(i,L),_e=Ag(y,L),Ne=fe.get(_e);if(Ne){Zp(i,L,Ne);return}var ze=ie?ie(pe,_e,L+"",i,y,fe):t,We=ze===t;if(We){var st=Bt(_e),yt=!st&&Zs(_e),Et=!st&&!yt&&$l(_e);ze=_e,st||yt||Et?Bt(pe)?ze=pe:hr(pe)?ze=Bi(pe):yt?(We=!1,ze=J1(_e,!0)):Et?(We=!1,ze=Q1(_e,!0)):ze=[]:Fc(_e)||za(_e)?(ze=pe,za(pe)?ze=qC(pe):(!rr(pe)||Is(pe))&&(ze=gC(_e))):We=!1}We&&(fe.set(_e,ze),Y(ze,_e,H,ie,fe),fe.delete(_e)),Zp(i,L,ze)}function B1(i,y){var L=i.length;if(L)return y+=y<0?L:0,Es(y,L)?i[y]:t}function F1(i,y,L){y.length?y=I(y,function(ie){return Bt(ie)?function(fe){return Na(fe,ie.length===1?ie[0]:ie)}:ie}):y=[Wi];var H=-1;y=I(y,un(Tt()));var Y=D1(i,function(ie,fe,pe){var _e=I(y,function(Ne){return Ne(ie)});return{criteria:_e,index:++H,value:ie}});return kt(Y,function(ie,fe){return mz(ie,fe,L)})}function iz(i,y){return j1(i,y,function(L,H){return Ng(i,H)})}function j1(i,y,L){for(var H=-1,Y=y.length,ie={};++H<Y;){var fe=y[H],pe=Na(i,fe);L(pe,fe)&&Dc(ie,Js(fe,i),pe)}return ie}function oz(i){return function(y){return Na(y,i)}}function ag(i,y,L,H){var Y=H?Te:ke,ie=-1,fe=y.length,pe=i;for(i===y&&(y=Bi(y)),L&&(pe=I(i,un(L)));++ie<fe;)for(var _e=0,Ne=y[ie],ze=L?L(Ne):Ne;(_e=Y(pe,ze,_e,H))>-1;)pe!==i&&gh.call(pe,_e,1),gh.call(i,_e,1);return i}function W1(i,y){for(var L=i?y.length:0,H=L-1;L--;){var Y=y[L];if(L==H||Y!==ie){var ie=Y;Es(Y)?gh.call(i,Y,1):hg(i,Y)}}return i}function lg(i,y){return i+yh(C1()*(y-i+1))}function sz(i,y,L,H){for(var Y=-1,ie=Tr(vh((y-i)/(L||1)),0),fe=Ee(ie);ie--;)fe[H?ie:++Y]=i,i+=L;return fe}function cg(i,y){var L="";if(!i||y<1||y>q)return L;do y%2&&(L+=i),y=yh(y/2),y&&(i+=i);while(y);return L}function Zt(i,y){return $g(yC(i,y,Wi),i+"")}function az(i){return A1(Sl(i))}function lz(i,y){var L=Sl(i);return Nh(L,Oa(y,0,L.length))}function Dc(i,y,L,H){if(!rr(i))return i;y=Js(y,i);for(var Y=-1,ie=y.length,fe=ie-1,pe=i;pe!=null&&++Y<ie;){var _e=Uo(y[Y]),Ne=L;if(_e==="__proto__"||_e==="constructor"||_e==="prototype")return i;if(Y!=fe){var ze=pe[_e];Ne=H?H(ze,_e,pe):t,Ne===t&&(Ne=rr(ze)?ze:Es(y[Y+1])?[]:{})}Rc(pe,_e,Ne),pe=pe[_e]}return i}var H1=bh?function(i,y){return bh.set(i,y),i}:Wi,cz=mh?function(i,y){return mh(i,"toString",{configurable:!0,enumerable:!1,value:Pg(y),writable:!0})}:Wi;function uz(i){return Nh(Sl(i))}function $o(i,y,L){var H=-1,Y=i.length;y<0&&(y=-y>Y?0:Y+y),L=L>Y?Y:L,L<0&&(L+=Y),Y=y>L?0:L-y>>>0,y>>>=0;for(var ie=Ee(Y);++H<Y;)ie[H]=i[H+y];return ie}function hz(i,y){var L;return Ys(i,function(H,Y,ie){return L=y(H,Y,ie),!L}),!!L}function $h(i,y,L){var H=0,Y=i==null?H:i.length;if(typeof y=="number"&&y===y&&Y<=ue){for(;H<Y;){var ie=H+Y>>>1,fe=i[ie];fe!==null&&!io(fe)&&(L?fe<=y:fe<y)?H=ie+1:Y=ie}return Y}return ug(i,y,Wi,L)}function ug(i,y,L,H){var Y=0,ie=i==null?0:i.length;if(ie===0)return 0;y=L(y);for(var fe=y!==y,pe=y===null,_e=io(y),Ne=y===t;Y<ie;){var ze=yh((Y+ie)/2),We=L(i[ze]),st=We!==t,yt=We===null,Et=We===We,Vt=io(We);if(fe)var $t=H||Et;else Ne?$t=Et&&(H||st):pe?$t=Et&&st&&(H||!yt):_e?$t=Et&&st&&!yt&&(H||!Vt):yt||Vt?$t=!1:$t=H?We<=y:We<y;$t?Y=ze+1:ie=ze}return oi(ie,ne)}function U1(i,y){for(var L=-1,H=i.length,Y=0,ie=[];++L<H;){var fe=i[L],pe=y?y(fe):fe;if(!L||!Vo(pe,_e)){var _e=pe;ie[Y++]=fe===0?0:fe}}return ie}function V1(i){return typeof i=="number"?i:io(i)?re:+i}function ro(i){if(typeof i=="string")return i;if(Bt(i))return I(i,ro)+"";if(io(i))return k1?k1.call(i):"";var y=i+"";return y=="0"&&1/i==-U?"-0":y}function Ks(i,y,L){var H=-1,Y=Pi,ie=i.length,fe=!0,pe=[],_e=pe;if(L)fe=!1,Y=b;else if(ie>=c){var Ne=y?null:Cz(i);if(Ne)return ot(Ne);fe=!1,Y=Nt,_e=new La}else _e=y?[]:pe;e:for(;++H<ie;){var ze=i[H],We=y?y(ze):ze;if(ze=L||ze!==0?ze:0,fe&&We===We){for(var st=_e.length;st--;)if(_e[st]===We)continue e;y&&_e.push(We),pe.push(ze)}else Y(_e,We,L)||(_e!==pe&&_e.push(We),pe.push(ze))}return pe}function hg(i,y){y=Js(y,i);var L=-1,H=y.length;if(!H)return!0;for(;++L<H;){var Y=Uo(y[L]);if(Y==="__proto__"&&!_n.call(i,"__proto__")||(Y==="constructor"||Y==="prototype")&&L<H-1)return!1}var ie=bC(i,y);return ie==null||delete ie[Uo(So(y))]}function G1(i,y,L,H){return Dc(i,y,L(Na(i,y)),H)}function Sh(i,y,L,H){for(var Y=i.length,ie=H?Y:-1;(H?ie--:++ie<Y)&&y(i[ie],ie,i););return L?$o(i,H?0:ie,H?ie+1:Y):$o(i,H?ie+1:0,H?Y:ie)}function q1(i,y){var L=i;return L instanceof rn&&(L=L.value()),z(y,function(H,Y){return Y.func.apply(Y.thisArg,S([H],Y.args))},L)}function dg(i,y,L){var H=i.length;if(H<2)return H?Ks(i[0]):[];for(var Y=-1,ie=Ee(H);++Y<H;)for(var fe=i[Y],pe=-1;++pe<H;)pe!=Y&&(ie[Y]=Lc(ie[Y]||fe,i[pe],y,L));return Ks(Gr(ie,1),y,L)}function Y1(i,y,L){for(var H=-1,Y=i.length,ie=y.length,fe={};++H<Y;){var pe=H<ie?y[H]:t;L(fe,i[H],pe)}return fe}function fg(i){return hr(i)?i:[]}function pg(i){return typeof i=="function"?i:Wi}function Js(i,y){return Bt(i)?i:kg(i,y)?[i]:kC(An(i))}var dz=Zt;function Qs(i,y,L){var H=i.length;return L=L===t?H:L,!y&&L>=H?i:$o(i,y,L)}var K1=XD||function(i){return Kt.clearTimeout(i)};function J1(i,y){if(y)return i.slice();var L=i.length,H=v1?v1(L):new i.constructor(L);return i.copy(H),H}function gg(i){var y=new i.constructor(i.byteLength);return new fh(y).set(new fh(i)),y}function fz(i,y){var L=y?gg(i.buffer):i.buffer;return new i.constructor(L,i.byteOffset,i.byteLength)}function pz(i){var y=new i.constructor(i.source,Pt.exec(i));return y.lastIndex=i.lastIndex,y}function gz(i){return Mc?Qt(Mc.call(i)):{}}function Q1(i,y){var L=y?gg(i.buffer):i.buffer;return new i.constructor(L,i.byteOffset,i.length)}function Z1(i,y){if(i!==y){var L=i!==t,H=i===null,Y=i===i,ie=io(i),fe=y!==t,pe=y===null,_e=y===y,Ne=io(y);if(!pe&&!Ne&&!ie&&i>y||ie&&fe&&_e&&!pe&&!Ne||H&&fe&&_e||!L&&_e||!Y)return 1;if(!H&&!ie&&!Ne&&i<y||Ne&&L&&Y&&!H&&!ie||pe&&L&&Y||!fe&&Y||!_e)return-1}return 0}function mz(i,y,L){for(var H=-1,Y=i.criteria,ie=y.criteria,fe=Y.length,pe=L.length;++H<fe;){var _e=Z1(Y[H],ie[H]);if(_e){if(H>=pe)return _e;var Ne=L[H];return _e*(Ne=="desc"?-1:1)}}return i.index-y.index}function X1(i,y,L,H){for(var Y=-1,ie=i.length,fe=L.length,pe=-1,_e=y.length,Ne=Tr(ie-fe,0),ze=Ee(_e+Ne),We=!H;++pe<_e;)ze[pe]=y[pe];for(;++Y<fe;)(We||Y<ie)&&(ze[L[Y]]=i[Y]);for(;Ne--;)ze[pe++]=i[Y++];return ze}function eC(i,y,L,H){for(var Y=-1,ie=i.length,fe=-1,pe=L.length,_e=-1,Ne=y.length,ze=Tr(ie-pe,0),We=Ee(ze+Ne),st=!H;++Y<ze;)We[Y]=i[Y];for(var yt=Y;++_e<Ne;)We[yt+_e]=y[_e];for(;++fe<pe;)(st||Y<ie)&&(We[yt+L[fe]]=i[Y++]);return We}function Bi(i,y){var L=-1,H=i.length;for(y||(y=Ee(H));++L<H;)y[L]=i[L];return y}function ls(i,y,L,H){var Y=!L;L||(L={});for(var ie=-1,fe=y.length;++ie<fe;){var pe=y[ie],_e=H?H(L[pe],i[pe],pe,L,i):t;_e===t&&(_e=i[pe]),Y?ss(L,pe,_e):Rc(L,pe,_e)}return L}function vz(i,y){return ls(i,Cg(i),y)}function yz(i,y){return ls(i,fC(i),y)}function Th(i,y){return function(L,H){var Y=Bt(L)?bl:FP,ie=y?y():{};return Y(L,i,Tt(H,2),ie)}}function kl(i){return Zt(function(y,L){var H=-1,Y=L.length,ie=Y>1?L[Y-1]:t,fe=Y>2?L[2]:t;for(ie=i.length>3&&typeof ie=="function"?(Y--,ie):t,fe&&bi(L[0],L[1],fe)&&(ie=Y<3?t:ie,Y=1),y=Qt(y);++H<Y;){var pe=L[H];pe&&i(y,pe,H,ie)}return y})}function tC(i,y){return function(L,H){if(L==null)return L;if(!Fi(L))return i(L,H);for(var Y=L.length,ie=y?Y:-1,fe=Qt(L);(y?ie--:++ie<Y)&&H(fe[ie],ie,fe)!==!1;);return L}}function nC(i){return function(y,L,H){for(var Y=-1,ie=Qt(y),fe=H(y),pe=fe.length;pe--;){var _e=fe[i?pe:++Y];if(L(ie[_e],_e,ie)===!1)break}return y}}function bz(i,y,L){var H=y&w,Y=Pc(i);function ie(){var fe=this&&this!==Kt&&this instanceof ie?Y:i;return fe.apply(H?L:this,arguments)}return ie}function rC(i){return function(y){y=An(y);var L=ge(y)?Mt(y):t,H=L?L[0]:y.charAt(0),Y=L?Qs(L,1).join(""):y.slice(1);return H[i]()+Y}}function _l(i){return function(y){return z(nk(tk(y).replace(xo,"")),i,"")}}function Pc(i){return function(){var y=arguments;switch(y.length){case 0:return new i;case 1:return new i(y[0]);case 2:return new i(y[0],y[1]);case 3:return new i(y[0],y[1],y[2]);case 4:return new i(y[0],y[1],y[2],y[3]);case 5:return new i(y[0],y[1],y[2],y[3],y[4]);case 6:return new i(y[0],y[1],y[2],y[3],y[4],y[5]);case 7:return new i(y[0],y[1],y[2],y[3],y[4],y[5],y[6])}var L=Cl(i.prototype),H=i.apply(L,y);return rr(H)?H:L}}function wz(i,y,L){var H=Pc(i);function Y(){for(var ie=arguments.length,fe=Ee(ie),pe=ie,_e=Al(Y);pe--;)fe[pe]=arguments[pe];var Ne=ie<3&&fe[0]!==_e&&fe[ie-1]!==_e?[]:Qe(fe,_e);if(ie-=Ne.length,ie<L)return lC(i,y,Eh,Y.placeholder,t,fe,Ne,t,t,L-ie);var ze=this&&this!==Kt&&this instanceof Y?H:i;return Cn(ze,this,fe)}return Y}function iC(i){return function(y,L,H){var Y=Qt(y);if(!Fi(y)){var ie=Tt(L,3);y=zr(y),L=function(pe){return ie(Y[pe],pe,Y)}}var fe=i(y,L,H);return fe>-1?Y[ie?y[fe]:fe]:t}}function oC(i){return Ts(function(y){var L=y.length,H=L,Y=_o.prototype.thru;for(i&&y.reverse();H--;){var ie=y[H];if(typeof ie!="function")throw new zn(g);if(Y&&!fe&&Lh(ie)=="wrapper")var fe=new _o([],!0)}for(H=fe?H:L;++H<L;){ie=y[H];var pe=Lh(ie),_e=pe=="wrapper"?wg(ie):t;_e&&_g(_e[0])&&_e[1]==(O|T|C|E)&&!_e[4].length&&_e[9]==1?fe=fe[Lh(_e[0])].apply(fe,_e[3]):fe=ie.length==1&&_g(ie)?fe[pe]():fe.thru(ie)}return function(){var Ne=arguments,ze=Ne[0];if(fe&&Ne.length==1&&Bt(ze))return fe.plant(ze).value();for(var We=0,st=L?y[We].apply(this,Ne):ze;++We<L;)st=y[We].call(this,st);return st}})}function Eh(i,y,L,H,Y,ie,fe,pe,_e,Ne){var ze=y&O,We=y&w,st=y&x,yt=y&(T|_),Et=y&k,Vt=st?t:Pc(i);function $t(){for(var en=arguments.length,an=Ee(en),oo=en;oo--;)an[oo]=arguments[oo];if(yt)var wi=Al($t),so=Qn(an,wi);if(H&&(an=X1(an,H,Y,yt)),ie&&(an=eC(an,ie,fe,yt)),en-=so,yt&&en<Ne){var dr=Qe(an,wi);return lC(i,y,Eh,$t.placeholder,L,an,dr,pe,_e,Ne-en)}var Go=We?L:this,Rs=st?Go[i]:i;return en=an.length,pe?an=Fz(an,pe):Et&&en>1&&an.reverse(),ze&&_e<en&&(an.length=_e),this&&this!==Kt&&this instanceof $t&&(Rs=Vt||Pc(Rs)),Rs.apply(Go,an)}return $t}function sC(i,y){return function(L,H){return YP(L,i,y(H),{})}}function Ih(i,y){return function(L,H){var Y;if(L===t&&H===t)return y;if(L!==t&&(Y=L),H!==t){if(Y===t)return H;typeof L=="string"||typeof H=="string"?(L=ro(L),H=ro(H)):(L=V1(L),H=V1(H)),Y=i(L,H)}return Y}}function mg(i){return Ts(function(y){return y=I(y,un(Tt())),Zt(function(L){var H=this;return i(y,function(Y){return Cn(Y,H,L)})})})}function Mh(i,y){y=y===t?" ":ro(y);var L=y.length;if(L<2)return L?cg(y,i):y;var H=cg(y,vh(i/Jt(y)));return ge(y)?Qs(Mt(H),0,i).join(""):H.slice(0,i)}function xz(i,y,L,H){var Y=y&w,ie=Pc(i);function fe(){for(var pe=-1,_e=arguments.length,Ne=-1,ze=H.length,We=Ee(ze+_e),st=this&&this!==Kt&&this instanceof fe?ie:i;++Ne<ze;)We[Ne]=H[Ne];for(;_e--;)We[Ne++]=arguments[++pe];return Cn(st,Y?L:this,We)}return fe}function aC(i){return function(y,L,H){return H&&typeof H!="number"&&bi(y,L,H)&&(L=H=t),y=Ms(y),L===t?(L=y,y=0):L=Ms(L),H=H===t?y<L?1:-1:Ms(H),sz(y,L,H,i)}}function Rh(i){return function(y,L){return typeof y=="string"&&typeof L=="string"||(y=To(y),L=To(L)),i(y,L)}}function lC(i,y,L,H,Y,ie,fe,pe,_e,Ne){var ze=y&T,We=ze?fe:t,st=ze?t:fe,yt=ze?ie:t,Et=ze?t:ie;y|=ze?C:P,y&=~(ze?P:C),y&R||(y&=-4);var Vt=[i,y,Y,yt,We,Et,st,pe,_e,Ne],$t=L.apply(t,Vt);return _g(i)&&wC($t,Vt),$t.placeholder=H,xC($t,i,y)}function vg(i){var y=yn[i];return function(L,H){if(L=To(L),H=H==null?0:oi(Ht(H),292),H&&x1(L)){var Y=(An(L)+"e").split("e"),ie=y(Y[0]+"e"+(+Y[1]+H));return Y=(An(ie)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-H))}return y(L)}}var Cz=wl&&1/ot(new wl([,-0]))[1]==U?function(i){return new wl(i)}:Fg;function cC(i){return function(y){var L=si(y);return L==lt?Ue(y):L==dn?ht(y):Hn(y,i(y))}}function Ss(i,y,L,H,Y,ie,fe,pe){var _e=y&x;if(!_e&&typeof i!="function")throw new zn(g);var Ne=H?H.length:0;if(Ne||(y&=-97,H=Y=t),fe=fe===t?fe:Tr(Ht(fe),0),pe=pe===t?pe:Ht(pe),Ne-=Y?Y.length:0,y&P){var ze=H,We=Y;H=Y=t}var st=_e?t:wg(i),yt=[i,y,L,H,Y,ze,We,ie,fe,pe];if(st&&Pz(yt,st),i=yt[0],y=yt[1],L=yt[2],H=yt[3],Y=yt[4],pe=yt[9]=yt[9]===t?_e?0:i.length:Tr(yt[9]-Ne,0),!pe&&y&(T|_)&&(y&=-25),!y||y==w)var Et=bz(i,y,L);else y==T||y==_?Et=wz(i,y,pe):(y==C||y==(w|C))&&!Y.length?Et=xz(i,y,L,H):Et=Eh.apply(t,yt);var Vt=st?H1:wC;return xC(Vt(Et,yt),i,y)}function uC(i,y,L,H){return i===t||Vo(i,_s[L])&&!_n.call(H,L)?y:i}function hC(i,y,L,H,Y,ie){return rr(i)&&rr(y)&&(ie.set(y,i),Ah(i,y,t,hC,ie),ie.delete(y)),i}function kz(i){return Fc(i)?t:i}function dC(i,y,L,H,Y,ie){var fe=L&f,pe=i.length,_e=y.length;if(pe!=_e&&!(fe&&_e>pe))return!1;var Ne=ie.get(i),ze=ie.get(y);if(Ne&&ze)return Ne==y&&ze==i;var We=-1,st=!0,yt=L&m?new La:t;for(ie.set(i,y),ie.set(y,i);++We<pe;){var Et=i[We],Vt=y[We];if(H)var $t=fe?H(Vt,Et,We,y,i,ie):H(Et,Vt,We,i,y,ie);if($t!==t){if($t)continue;st=!1;break}if(yt){if(!W(y,function(en,an){if(!Nt(yt,an)&&(Et===en||Y(Et,en,L,H,ie)))return yt.push(an)})){st=!1;break}}else if(!(Et===Vt||Y(Et,Vt,L,H,ie))){st=!1;break}}return ie.delete(i),ie.delete(y),st}function _z(i,y,L,H,Y,ie,fe){switch(L){case Dn:if(i.byteLength!=y.byteLength||i.byteOffset!=y.byteOffset)return!1;i=i.buffer,y=y.buffer;case Tn:return!(i.byteLength!=y.byteLength||!ie(new fh(i),new fh(y)));case we:case Ae:case ct:return Vo(+i,+y);case Be:return i.name==y.name&&i.message==y.message;case qt:case Sn:return i==y+"";case lt:var pe=Ue;case dn:var _e=H&f;if(pe||(pe=ot),i.size!=y.size&&!_e)return!1;var Ne=fe.get(i);if(Ne)return Ne==y;H|=m,fe.set(i,y);var ze=dC(pe(i),pe(y),H,Y,ie,fe);return fe.delete(i),ze;case pt:if(Mc)return Mc.call(i)==Mc.call(y)}return!1}function Az(i,y,L,H,Y,ie){var fe=L&f,pe=yg(i),_e=pe.length,Ne=yg(y),ze=Ne.length;if(_e!=ze&&!fe)return!1;for(var We=_e;We--;){var st=pe[We];if(!(fe?st in y:_n.call(y,st)))return!1}var yt=ie.get(i),Et=ie.get(y);if(yt&&Et)return yt==y&&Et==i;var Vt=!0;ie.set(i,y),ie.set(y,i);for(var $t=fe;++We<_e;){st=pe[We];var en=i[st],an=y[st];if(H)var oo=fe?H(an,en,st,y,i,ie):H(en,an,st,i,y,ie);if(!(oo===t?en===an||Y(en,an,L,H,ie):oo)){Vt=!1;break}$t||($t=st=="constructor")}if(Vt&&!$t){var wi=i.constructor,so=y.constructor;wi!=so&&"constructor"in i&&"constructor"in y&&!(typeof wi=="function"&&wi instanceof wi&&typeof so=="function"&&so instanceof so)&&(Vt=!1)}return ie.delete(i),ie.delete(y),Vt}function Ts(i){return $g(yC(i,t,SC),i+"")}function yg(i){return R1(i,zr,Cg)}function bg(i){return R1(i,ji,fC)}var wg=bh?function(i){return bh.get(i)}:Fg;function Lh(i){for(var y=i.name+"",L=xl[y],H=_n.call(xl,y)?L.length:0;H--;){var Y=L[H],ie=Y.func;if(ie==null||ie==i)return Y.name}return y}function Al(i){var y=_n.call(te,"placeholder")?te:i;return y.placeholder}function Tt(){var i=te.iteratee||zg;return i=i===zg?N1:i,arguments.length?i(arguments[0],arguments[1]):i}function Oh(i,y){var L=i.__data__;return Lz(y)?L[typeof y=="string"?"string":"hash"]:L.map}function xg(i){for(var y=zr(i),L=y.length;L--;){var H=y[L],Y=i[H];y[L]=[H,Y,mC(Y)]}return y}function Da(i,y){var L=ce(i,y);return O1(L)?L:t}function $z(i){var y=_n.call(i,Ma),L=i[Ma];try{i[Ma]=t;var H=!0}catch{}var Y=hh.call(i);return H&&(y?i[Ma]=L:delete i[Ma]),Y}var Cg=Kp?function(i){return i==null?[]:(i=Qt(i),Hr(Kp(i),function(y){return b1.call(i,y)}))}:jg,fC=Kp?function(i){for(var y=[];i;)S(y,Cg(i)),i=ph(i);return y}:jg,si=yi;(Jp&&si(new Jp(new ArrayBuffer(1)))!=Dn||Tc&&si(new Tc)!=lt||Qp&&si(Qp.resolve())!=Ct||wl&&si(new wl)!=dn||Ec&&si(new Ec)!=Yt)&&(si=function(i){var y=yi(i),L=y==Ie?i.constructor:t,H=L?Pa(L):"";if(H)switch(H){case lP:return Dn;case cP:return lt;case uP:return Ct;case hP:return dn;case dP:return Yt}return y});function Sz(i,y,L){for(var H=-1,Y=L.length;++H<Y;){var ie=L[H],fe=ie.size;switch(ie.type){case"drop":i+=fe;break;case"dropRight":y-=fe;break;case"take":y=oi(y,i+fe);break;case"takeRight":i=Tr(i,y-fe);break}}return{start:i,end:y}}function Tz(i){var y=i.match(ms);return y?y[1].split(vs):[]}function pC(i,y,L){y=Js(y,i);for(var H=-1,Y=y.length,ie=!1;++H<Y;){var fe=Uo(y[H]);if(!(ie=i!=null&&L(i,fe)))break;i=i[fe]}return ie||++H!=Y?ie:(Y=i==null?0:i.length,!!Y&&jh(Y)&&Es(fe,Y)&&(Bt(i)||za(i)))}function Ez(i){var y=i.length,L=new i.constructor(y);return y&&typeof i[0]=="string"&&_n.call(i,"index")&&(L.index=i.index,L.input=i.input),L}function gC(i){return typeof i.constructor=="function"&&!zc(i)?Cl(ph(i)):{}}function Iz(i,y,L){var H=i.constructor;switch(y){case Tn:return gg(i);case we:case Ae:return new H(+i);case Dn:return fz(i,L);case Vn:case Ln:case Gn:case er:case fn:case Pn:case Ei:case Xr:case ei:return Q1(i,L);case lt:return new H;case ct:case Sn:return new H(i);case qt:return pz(i);case dn:return new H;case pt:return gz(i)}}function Mz(i,y){var L=y.length;if(!L)return i;var H=L-1;return y[H]=(L>1?"& ":"")+y[H],y=y.join(L>2?", ":" "),i.replace(di,`{
1460
+ /* [wrapped with `+y+`] */
1461
+ `)}function Rz(i){return Bt(i)||za(i)||!!(w1&&i&&i[w1])}function Es(i,y){var L=typeof i;return y=y??q,!!y&&(L=="number"||L!="symbol"&&Yn.test(i))&&i>-1&&i%1==0&&i<y}function bi(i,y,L){if(!rr(L))return!1;var H=typeof y;return(H=="number"?Fi(L)&&Es(y,L.length):H=="string"&&y in L)?Vo(L[y],i):!1}function kg(i,y){if(Bt(i))return!1;var L=typeof i;return L=="number"||L=="symbol"||L=="boolean"||i==null||io(i)?!0:qn.test(i)||!Mi.test(i)||y!=null&&i in Qt(y)}function Lz(i){var y=typeof i;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?i!=="__proto__":i===null}function _g(i){var y=Lh(i),L=te[y];if(typeof L!="function"||!(y in rn.prototype))return!1;if(i===L)return!0;var H=wg(L);return!!H&&i===H[0]}function Oz(i){return!!m1&&m1 in i}var Nz=ch?Is:Wg;function zc(i){var y=i&&i.constructor,L=typeof y=="function"&&y.prototype||_s;return i===L}function mC(i){return i===i&&!rr(i)}function vC(i,y){return function(L){return L==null?!1:L[i]===y&&(y!==t||i in Qt(L))}}function Dz(i){var y=Bh(i,function(H){return L.size===a&&L.clear(),H}),L=y.cache;return y}function Pz(i,y){var L=i[1],H=y[1],Y=L|H,ie=Y<(w|x|O),fe=H==O&&L==T||H==O&&L==E&&i[7].length<=y[8]||H==(O|E)&&y[7].length<=y[8]&&L==T;if(!(ie||fe))return i;H&w&&(i[2]=y[2],Y|=L&w?0:R);var pe=y[3];if(pe){var _e=i[3];i[3]=_e?X1(_e,pe,y[4]):pe,i[4]=_e?Qe(i[3],l):y[4]}return pe=y[5],pe&&(_e=i[5],i[5]=_e?eC(_e,pe,y[6]):pe,i[6]=_e?Qe(i[5],l):y[6]),pe=y[7],pe&&(i[7]=pe),H&O&&(i[8]=i[8]==null?y[8]:oi(i[8],y[8])),i[9]==null&&(i[9]=y[9]),i[0]=y[0],i[1]=Y,i}function zz(i){var y=[];if(i!=null)for(var L in Qt(i))y.push(L);return y}function Bz(i){return hh.call(i)}function yC(i,y,L){return y=Tr(y===t?i.length-1:y,0),function(){for(var H=arguments,Y=-1,ie=Tr(H.length-y,0),fe=Ee(ie);++Y<ie;)fe[Y]=H[y+Y];Y=-1;for(var pe=Ee(y+1);++Y<y;)pe[Y]=H[Y];return pe[y]=L(fe),Cn(i,this,pe)}}function bC(i,y){return y.length<2?i:Na(i,$o(y,0,-1))}function Fz(i,y){for(var L=i.length,H=oi(y.length,L),Y=Bi(i);H--;){var ie=y[H];i[H]=Es(ie,L)?Y[ie]:t}return i}function Ag(i,y){if(!(y==="constructor"&&typeof i[y]=="function")&&y!="__proto__")return i[y]}var wC=CC(H1),Bc=tP||function(i,y){return Kt.setTimeout(i,y)},$g=CC(cz);function xC(i,y,L){var H=y+"";return $g(i,Mz(H,jz(Tz(H),L)))}function CC(i){var y=0,L=0;return function(){var H=oP(),Y=$-(H-L);if(L=H,Y>0){if(++y>=M)return arguments[0]}else y=0;return i.apply(t,arguments)}}function Nh(i,y){var L=-1,H=i.length,Y=H-1;for(y=y===t?H:y;++L<y;){var ie=lg(L,Y),fe=i[ie];i[ie]=i[L],i[L]=fe}return i.length=y,i}var kC=Dz(function(i){var y=[];return i.charCodeAt(0)===46&&y.push(""),i.replace(Ar,function(L,H,Y,ie){y.push(Y?ie.replace(fi,"$1"):H||L)}),y});function Uo(i){if(typeof i=="string"||io(i))return i;var y=i+"";return y=="0"&&1/i==-U?"-0":y}function Pa(i){if(i!=null){try{return uh.call(i)}catch{}try{return i+""}catch{}}return""}function jz(i,y){return $r(he,function(L){var H="_."+L[0];y&L[1]&&!Pi(i,H)&&i.push(H)}),i.sort()}function _C(i){if(i instanceof rn)return i.clone();var y=new _o(i.__wrapped__,i.__chain__);return y.__actions__=Bi(i.__actions__),y.__index__=i.__index__,y.__values__=i.__values__,y}function Wz(i,y,L){(L?bi(i,y,L):y===t)?y=1:y=Tr(Ht(y),0);var H=i==null?0:i.length;if(!H||y<1)return[];for(var Y=0,ie=0,fe=Ee(vh(H/y));Y<H;)fe[ie++]=$o(i,Y,Y+=y);return fe}function Hz(i){for(var y=-1,L=i==null?0:i.length,H=0,Y=[];++y<L;){var ie=i[y];ie&&(Y[H++]=ie)}return Y}function Uz(){var i=arguments.length;if(!i)return[];for(var y=Ee(i-1),L=arguments[0],H=i;H--;)y[H-1]=arguments[H];return S(Bt(L)?Bi(L):[L],Gr(y,1))}var Vz=Zt(function(i,y){return hr(i)?Lc(i,Gr(y,1,hr,!0)):[]}),Gz=Zt(function(i,y){var L=So(y);return hr(L)&&(L=t),hr(i)?Lc(i,Gr(y,1,hr,!0),Tt(L,2)):[]}),qz=Zt(function(i,y){var L=So(y);return hr(L)&&(L=t),hr(i)?Lc(i,Gr(y,1,hr,!0),t,L):[]});function Yz(i,y,L){var H=i==null?0:i.length;return H?(y=L||y===t?1:Ht(y),$o(i,y<0?0:y,H)):[]}function Kz(i,y,L){var H=i==null?0:i.length;return H?(y=L||y===t?1:Ht(y),y=H-y,$o(i,0,y<0?0:y)):[]}function Jz(i,y){return i&&i.length?Sh(i,Tt(y,3),!0,!0):[]}function Qz(i,y){return i&&i.length?Sh(i,Tt(y,3),!0):[]}function Zz(i,y,L,H){var Y=i==null?0:i.length;return Y?(L&&typeof L!="number"&&bi(i,y,L)&&(L=0,H=Y),UP(i,y,L,H)):[]}function AC(i,y,L){var H=i==null?0:i.length;if(!H)return-1;var Y=L==null?0:Ht(L);return Y<0&&(Y=Tr(H+Y,0)),de(i,Tt(y,3),Y)}function $C(i,y,L){var H=i==null?0:i.length;if(!H)return-1;var Y=H-1;return L!==t&&(Y=Ht(L),Y=L<0?Tr(H+Y,0):oi(Y,H-1)),de(i,Tt(y,3),Y,!0)}function SC(i){var y=i==null?0:i.length;return y?Gr(i,1):[]}function Xz(i){var y=i==null?0:i.length;return y?Gr(i,U):[]}function eB(i,y){var L=i==null?0:i.length;return L?(y=y===t?1:Ht(y),Gr(i,y)):[]}function tB(i){for(var y=-1,L=i==null?0:i.length,H={};++y<L;){var Y=i[y];ss(H,Y[0],Y[1])}return H}function TC(i){return i&&i.length?i[0]:t}function nB(i,y,L){var H=i==null?0:i.length;if(!H)return-1;var Y=L==null?0:Ht(L);return Y<0&&(Y=Tr(H+Y,0)),ke(i,y,Y)}function rB(i){var y=i==null?0:i.length;return y?$o(i,0,-1):[]}var iB=Zt(function(i){var y=I(i,fg);return y.length&&y[0]===i[0]?rg(y):[]}),oB=Zt(function(i){var y=So(i),L=I(i,fg);return y===So(L)?y=t:L.pop(),L.length&&L[0]===i[0]?rg(L,Tt(y,2)):[]}),sB=Zt(function(i){var y=So(i),L=I(i,fg);return y=typeof y=="function"?y:t,y&&L.pop(),L.length&&L[0]===i[0]?rg(L,t,y):[]});function aB(i,y){return i==null?"":rP.call(i,y)}function So(i){var y=i==null?0:i.length;return y?i[y-1]:t}function lB(i,y,L){var H=i==null?0:i.length;if(!H)return-1;var Y=H;return L!==t&&(Y=Ht(L),Y=Y<0?Tr(H+Y,0):oi(Y,H-1)),y===y?gn(i,y,Y):de(i,Ce,Y,!0)}function cB(i,y){return i&&i.length?B1(i,Ht(y)):t}var uB=Zt(EC);function EC(i,y){return i&&i.length&&y&&y.length?ag(i,y):i}function hB(i,y,L){return i&&i.length&&y&&y.length?ag(i,y,Tt(L,2)):i}function dB(i,y,L){return i&&i.length&&y&&y.length?ag(i,y,t,L):i}var fB=Ts(function(i,y){var L=i==null?0:i.length,H=Xp(i,y);return W1(i,I(y,function(Y){return Es(Y,L)?+Y:Y}).sort(Z1)),H});function pB(i,y){var L=[];if(!(i&&i.length))return L;var H=-1,Y=[],ie=i.length;for(y=Tt(y,3);++H<ie;){var fe=i[H];y(fe,H,i)&&(L.push(fe),Y.push(H))}return W1(i,Y),L}function Sg(i){return i==null?i:aP.call(i)}function gB(i,y,L){var H=i==null?0:i.length;return H?(L&&typeof L!="number"&&bi(i,y,L)?(y=0,L=H):(y=y==null?0:Ht(y),L=L===t?H:Ht(L)),$o(i,y,L)):[]}function mB(i,y){return $h(i,y)}function vB(i,y,L){return ug(i,y,Tt(L,2))}function yB(i,y){var L=i==null?0:i.length;if(L){var H=$h(i,y);if(H<L&&Vo(i[H],y))return H}return-1}function bB(i,y){return $h(i,y,!0)}function wB(i,y,L){return ug(i,y,Tt(L,2),!0)}function xB(i,y){var L=i==null?0:i.length;if(L){var H=$h(i,y,!0)-1;if(Vo(i[H],y))return H}return-1}function CB(i){return i&&i.length?U1(i):[]}function kB(i,y){return i&&i.length?U1(i,Tt(y,2)):[]}function _B(i){var y=i==null?0:i.length;return y?$o(i,1,y):[]}function AB(i,y,L){return i&&i.length?(y=L||y===t?1:Ht(y),$o(i,0,y<0?0:y)):[]}function $B(i,y,L){var H=i==null?0:i.length;return H?(y=L||y===t?1:Ht(y),y=H-y,$o(i,y<0?0:y,H)):[]}function SB(i,y){return i&&i.length?Sh(i,Tt(y,3),!1,!0):[]}function TB(i,y){return i&&i.length?Sh(i,Tt(y,3)):[]}var EB=Zt(function(i){return Ks(Gr(i,1,hr,!0))}),IB=Zt(function(i){var y=So(i);return hr(y)&&(y=t),Ks(Gr(i,1,hr,!0),Tt(y,2))}),MB=Zt(function(i){var y=So(i);return y=typeof y=="function"?y:t,Ks(Gr(i,1,hr,!0),t,y)});function RB(i){return i&&i.length?Ks(i):[]}function LB(i,y){return i&&i.length?Ks(i,Tt(y,2)):[]}function OB(i,y){return y=typeof y=="function"?y:t,i&&i.length?Ks(i,t,y):[]}function Tg(i){if(!(i&&i.length))return[];var y=0;return i=Hr(i,function(L){if(hr(L))return y=Tr(L.length,y),!0}),ft(y,function(L){return I(i,Fe(L))})}function IC(i,y){if(!(i&&i.length))return[];var L=Tg(i);return y==null?L:I(L,function(H){return Cn(y,t,H)})}var NB=Zt(function(i,y){return hr(i)?Lc(i,y):[]}),DB=Zt(function(i){return dg(Hr(i,hr))}),PB=Zt(function(i){var y=So(i);return hr(y)&&(y=t),dg(Hr(i,hr),Tt(y,2))}),zB=Zt(function(i){var y=So(i);return y=typeof y=="function"?y:t,dg(Hr(i,hr),t,y)}),BB=Zt(Tg);function FB(i,y){return Y1(i||[],y||[],Rc)}function jB(i,y){return Y1(i||[],y||[],Dc)}var WB=Zt(function(i){var y=i.length,L=y>1?i[y-1]:t;return L=typeof L=="function"?(i.pop(),L):t,IC(i,L)});function MC(i){var y=te(i);return y.__chain__=!0,y}function HB(i,y){return y(i),i}function Dh(i,y){return y(i)}var UB=Ts(function(i){var y=i.length,L=y?i[0]:0,H=this.__wrapped__,Y=function(ie){return Xp(ie,i)};return y>1||this.__actions__.length||!(H instanceof rn)||!Es(L)?this.thru(Y):(H=H.slice(L,+L+(y?1:0)),H.__actions__.push({func:Dh,args:[Y],thisArg:t}),new _o(H,this.__chain__).thru(function(ie){return y&&!ie.length&&ie.push(t),ie}))});function VB(){return MC(this)}function GB(){return new _o(this.value(),this.__chain__)}function qB(){this.__values__===t&&(this.__values__=VC(this.value()));var i=this.__index__>=this.__values__.length,y=i?t:this.__values__[this.__index__++];return{done:i,value:y}}function YB(){return this}function KB(i){for(var y,L=this;L instanceof xh;){var H=_C(L);H.__index__=0,H.__values__=t,y?Y.__wrapped__=H:y=H;var Y=H;L=L.__wrapped__}return Y.__wrapped__=i,y}function JB(){var i=this.__wrapped__;if(i instanceof rn){var y=i;return this.__actions__.length&&(y=new rn(this)),y=y.reverse(),y.__actions__.push({func:Dh,args:[Sg],thisArg:t}),new _o(y,this.__chain__)}return this.thru(Sg)}function QB(){return q1(this.__wrapped__,this.__actions__)}var ZB=Th(function(i,y,L){_n.call(i,L)?++i[L]:ss(i,L,1)});function XB(i,y,L){var H=Bt(i)?os:HP;return L&&bi(i,y,L)&&(y=t),H(i,Tt(y,3))}function eF(i,y){var L=Bt(i)?Hr:I1;return L(i,Tt(y,3))}var tF=iC(AC),nF=iC($C);function rF(i,y){return Gr(Ph(i,y),1)}function iF(i,y){return Gr(Ph(i,y),U)}function oF(i,y,L){return L=L===t?1:Ht(L),Gr(Ph(i,y),L)}function RC(i,y){var L=Bt(i)?$r:Ys;return L(i,Tt(y,3))}function LC(i,y){var L=Bt(i)?ii:E1;return L(i,Tt(y,3))}var sF=Th(function(i,y,L){_n.call(i,L)?i[L].push(y):ss(i,L,[y])});function aF(i,y,L,H){i=Fi(i)?i:Sl(i),L=L&&!H?Ht(L):0;var Y=i.length;return L<0&&(L=Tr(Y+L,0)),Wh(i)?L<=Y&&i.indexOf(y,L)>-1:!!Y&&ke(i,y,L)>-1}var lF=Zt(function(i,y,L){var H=-1,Y=typeof y=="function",ie=Fi(i)?Ee(i.length):[];return Ys(i,function(fe){ie[++H]=Y?Cn(y,fe,L):Oc(fe,y,L)}),ie}),cF=Th(function(i,y,L){ss(i,L,y)});function Ph(i,y){var L=Bt(i)?I:D1;return L(i,Tt(y,3))}function uF(i,y,L,H){return i==null?[]:(Bt(y)||(y=y==null?[]:[y]),L=H?t:L,Bt(L)||(L=L==null?[]:[L]),F1(i,y,L))}var hF=Th(function(i,y,L){i[L?0:1].push(y)},function(){return[[],[]]});function dF(i,y,L){var H=Bt(i)?z:et,Y=arguments.length<3;return H(i,Tt(y,4),L,Y,Ys)}function fF(i,y,L){var H=Bt(i)?F:et,Y=arguments.length<3;return H(i,Tt(y,4),L,Y,E1)}function pF(i,y){var L=Bt(i)?Hr:I1;return L(i,Fh(Tt(y,3)))}function gF(i){var y=Bt(i)?A1:az;return y(i)}function mF(i,y,L){(L?bi(i,y,L):y===t)?y=1:y=Ht(y);var H=Bt(i)?zP:lz;return H(i,y)}function vF(i){var y=Bt(i)?BP:uz;return y(i)}function yF(i){if(i==null)return 0;if(Fi(i))return Wh(i)?Jt(i):i.length;var y=si(i);return y==lt||y==dn?i.size:og(i).length}function bF(i,y,L){var H=Bt(i)?W:hz;return L&&bi(i,y,L)&&(y=t),H(i,Tt(y,3))}var wF=Zt(function(i,y){if(i==null)return[];var L=y.length;return L>1&&bi(i,y[0],y[1])?y=[]:L>2&&bi(y[0],y[1],y[2])&&(y=[y[0]]),F1(i,Gr(y,1),[])}),zh=eP||function(){return Kt.Date.now()};function xF(i,y){if(typeof y!="function")throw new zn(g);return i=Ht(i),function(){if(--i<1)return y.apply(this,arguments)}}function OC(i,y,L){return y=L?t:y,y=i&&y==null?i.length:y,Ss(i,O,t,t,t,t,y)}function NC(i,y){var L;if(typeof y!="function")throw new zn(g);return i=Ht(i),function(){return--i>0&&(L=y.apply(this,arguments)),i<=1&&(y=t),L}}var Eg=Zt(function(i,y,L){var H=w;if(L.length){var Y=Qe(L,Al(Eg));H|=C}return Ss(i,H,y,L,Y)}),DC=Zt(function(i,y,L){var H=w|x;if(L.length){var Y=Qe(L,Al(DC));H|=C}return Ss(y,H,i,L,Y)});function PC(i,y,L){y=L?t:y;var H=Ss(i,T,t,t,t,t,t,y);return H.placeholder=PC.placeholder,H}function zC(i,y,L){y=L?t:y;var H=Ss(i,_,t,t,t,t,t,y);return H.placeholder=zC.placeholder,H}function BC(i,y,L){var H,Y,ie,fe,pe,_e,Ne=0,ze=!1,We=!1,st=!0;if(typeof i!="function")throw new zn(g);y=To(y)||0,rr(L)&&(ze=!!L.leading,We="maxWait"in L,ie=We?Tr(To(L.maxWait)||0,y):ie,st="trailing"in L?!!L.trailing:st);function yt(dr){var Go=H,Rs=Y;return H=Y=t,Ne=dr,fe=i.apply(Rs,Go),fe}function Et(dr){return Ne=dr,pe=Bc(en,y),ze?yt(dr):fe}function Vt(dr){var Go=dr-_e,Rs=dr-Ne,ok=y-Go;return We?oi(ok,ie-Rs):ok}function $t(dr){var Go=dr-_e,Rs=dr-Ne;return _e===t||Go>=y||Go<0||We&&Rs>=ie}function en(){var dr=zh();if($t(dr))return an(dr);pe=Bc(en,Vt(dr))}function an(dr){return pe=t,st&&H?yt(dr):(H=Y=t,fe)}function oo(){pe!==t&&K1(pe),Ne=0,H=_e=Y=pe=t}function wi(){return pe===t?fe:an(zh())}function so(){var dr=zh(),Go=$t(dr);if(H=arguments,Y=this,_e=dr,Go){if(pe===t)return Et(_e);if(We)return K1(pe),pe=Bc(en,y),yt(_e)}return pe===t&&(pe=Bc(en,y)),fe}return so.cancel=oo,so.flush=wi,so}var CF=Zt(function(i,y){return T1(i,1,y)}),kF=Zt(function(i,y,L){return T1(i,To(y)||0,L)});function _F(i){return Ss(i,k)}function Bh(i,y){if(typeof i!="function"||y!=null&&typeof y!="function")throw new zn(g);var L=function(){var H=arguments,Y=y?y.apply(this,H):H[0],ie=L.cache;if(ie.has(Y))return ie.get(Y);var fe=i.apply(this,H);return L.cache=ie.set(Y,fe)||ie,fe};return L.cache=new(Bh.Cache||$s),L}Bh.Cache=$s;function Fh(i){if(typeof i!="function")throw new zn(g);return function(){var y=arguments;switch(y.length){case 0:return!i.call(this);case 1:return!i.call(this,y[0]);case 2:return!i.call(this,y[0],y[1]);case 3:return!i.call(this,y[0],y[1],y[2])}return!i.apply(this,y)}}function AF(i){return NC(2,i)}var $F=dz(function(i,y){y=y.length==1&&Bt(y[0])?I(y[0],un(Tt())):I(Gr(y,1),un(Tt()));var L=y.length;return Zt(function(H){for(var Y=-1,ie=oi(H.length,L);++Y<ie;)H[Y]=y[Y].call(this,H[Y]);return Cn(i,this,H)})}),Ig=Zt(function(i,y){var L=Qe(y,Al(Ig));return Ss(i,C,t,y,L)}),FC=Zt(function(i,y){var L=Qe(y,Al(FC));return Ss(i,P,t,y,L)}),SF=Ts(function(i,y){return Ss(i,E,t,t,t,y)});function TF(i,y){if(typeof i!="function")throw new zn(g);return y=y===t?y:Ht(y),Zt(i,y)}function EF(i,y){if(typeof i!="function")throw new zn(g);return y=y==null?0:Tr(Ht(y),0),Zt(function(L){var H=L[y],Y=Qs(L,0,y);return H&&S(Y,H),Cn(i,this,Y)})}function IF(i,y,L){var H=!0,Y=!0;if(typeof i!="function")throw new zn(g);return rr(L)&&(H="leading"in L?!!L.leading:H,Y="trailing"in L?!!L.trailing:Y),BC(i,y,{leading:H,maxWait:y,trailing:Y})}function MF(i){return OC(i,1)}function RF(i,y){return Ig(pg(y),i)}function LF(){if(!arguments.length)return[];var i=arguments[0];return Bt(i)?i:[i]}function OF(i){return Ao(i,o)}function NF(i,y){return y=typeof y=="function"?y:t,Ao(i,o,y)}function DF(i){return Ao(i,h|o)}function PF(i,y){return y=typeof y=="function"?y:t,Ao(i,h|o,y)}function zF(i,y){return y==null||S1(i,y,zr(y))}function Vo(i,y){return i===y||i!==i&&y!==y}var BF=Rh(ng),FF=Rh(function(i,y){return i>=y}),za=L1((function(){return arguments})())?L1:function(i){return lr(i)&&_n.call(i,"callee")&&!b1.call(i,"callee")},Bt=Ee.isArray,jF=Gs?un(Gs):KP;function Fi(i){return i!=null&&jh(i.length)&&!Is(i)}function hr(i){return lr(i)&&Fi(i)}function WF(i){return i===!0||i===!1||lr(i)&&yi(i)==we}var Zs=nP||Wg,HF=ar?un(ar):JP;function UF(i){return lr(i)&&i.nodeType===1&&!Fc(i)}function VF(i){if(i==null)return!0;if(Fi(i)&&(Bt(i)||typeof i=="string"||typeof i.splice=="function"||Zs(i)||$l(i)||za(i)))return!i.length;var y=si(i);if(y==lt||y==dn)return!i.size;if(zc(i))return!og(i).length;for(var L in i)if(_n.call(i,L))return!1;return!0}function GF(i,y){return Nc(i,y)}function qF(i,y,L){L=typeof L=="function"?L:t;var H=L?L(i,y):t;return H===t?Nc(i,y,t,L):!!H}function Mg(i){if(!lr(i))return!1;var y=yi(i);return y==Be||y==Je||typeof i.message=="string"&&typeof i.name=="string"&&!Fc(i)}function YF(i){return typeof i=="number"&&x1(i)}function Is(i){if(!rr(i))return!1;var y=yi(i);return y==Ye||y==Ze||y==ye||y==St}function jC(i){return typeof i=="number"&&i==Ht(i)}function jh(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=q}function rr(i){var y=typeof i;return i!=null&&(y=="object"||y=="function")}function lr(i){return i!=null&&typeof i=="object"}var WC=to?un(to):ZP;function KF(i,y){return i===y||ig(i,y,xg(y))}function JF(i,y,L){return L=typeof L=="function"?L:t,ig(i,y,xg(y),L)}function QF(i){return HC(i)&&i!=+i}function ZF(i){if(Nz(i))throw new _t(u);return O1(i)}function XF(i){return i===null}function ej(i){return i==null}function HC(i){return typeof i=="number"||lr(i)&&yi(i)==ct}function Fc(i){if(!lr(i)||yi(i)!=Ie)return!1;var y=ph(i);if(y===null)return!0;var L=_n.call(y,"constructor")&&y.constructor;return typeof L=="function"&&L instanceof L&&uh.call(L)==JD}var Rg=no?un(no):XP;function tj(i){return jC(i)&&i>=-q&&i<=q}var UC=Co?un(Co):ez;function Wh(i){return typeof i=="string"||!Bt(i)&&lr(i)&&yi(i)==Sn}function io(i){return typeof i=="symbol"||lr(i)&&yi(i)==pt}var $l=Ia?un(Ia):tz;function nj(i){return i===t}function rj(i){return lr(i)&&si(i)==Yt}function ij(i){return lr(i)&&yi(i)==Fn}var oj=Rh(sg),sj=Rh(function(i,y){return i<=y});function VC(i){if(!i)return[];if(Fi(i))return Wh(i)?Mt(i):Bi(i);if(Sc&&i[Sc])return Le(i[Sc]());var y=si(i),L=y==lt?Ue:y==dn?ot:Sl;return L(i)}function Ms(i){if(!i)return i===0?i:0;if(i=To(i),i===U||i===-U){var y=i<0?-1:1;return y*Q}return i===i?i:0}function Ht(i){var y=Ms(i),L=y%1;return y===y?L?y-L:y:0}function GC(i){return i?Oa(Ht(i),0,le):0}function To(i){if(typeof i=="number")return i;if(io(i))return re;if(rr(i)){var y=typeof i.valueOf=="function"?i.valueOf():i;i=rr(y)?y+"":y}if(typeof i!="string")return i===0?i:+i;i=Lt(i);var L=Nr.test(i);return L||pn.test(i)?wt(i.slice(2),L?2:8):Vs.test(i)?re:+i}function qC(i){return ls(i,ji(i))}function aj(i){return i?Oa(Ht(i),-q,q):i===0?i:0}function An(i){return i==null?"":ro(i)}var lj=kl(function(i,y){if(zc(y)||Fi(y)){ls(y,zr(y),i);return}for(var L in y)_n.call(y,L)&&Rc(i,L,y[L])}),YC=kl(function(i,y){ls(y,ji(y),i)}),KC=kl(function(i,y,L,H){ls(y,ji(y),i,H)}),Lg=kl(function(i,y,L,H){ls(y,zr(y),i,H)}),cj=Ts(Xp);function uj(i,y){var L=Cl(i);return y==null?L:$1(L,y)}var hj=Zt(function(i,y){i=Qt(i);var L=-1,H=y.length,Y=H>2?y[2]:t;for(Y&&bi(y[0],y[1],Y)&&(H=1);++L<H;)for(var ie=y[L],fe=ji(ie),pe=-1,_e=fe.length;++pe<_e;){var Ne=fe[pe],ze=i[Ne];(ze===t||Vo(ze,_s[Ne])&&!_n.call(i,Ne))&&(i[Ne]=ie[Ne])}return i}),dj=Zt(function(i){return i.push(t,hC),Cn(JC,t,i)});function fj(i,y){return se(i,Tt(y,3),as)}function pj(i,y){return se(i,Tt(y,3),tg)}function gj(i,y){return i==null?i:eg(i,Tt(y,3),ji)}function mj(i,y){return i==null?i:M1(i,Tt(y,3),ji)}function vj(i,y){return i&&as(i,Tt(y,3))}function yj(i,y){return i&&tg(i,Tt(y,3))}function bj(i){return i==null?[]:_h(i,zr(i))}function wj(i){return i==null?[]:_h(i,ji(i))}function Og(i,y,L){var H=i==null?t:Na(i,y);return H===t?L:H}function xj(i,y){return i!=null&&pC(i,y,VP)}function Ng(i,y){return i!=null&&pC(i,y,GP)}var Cj=sC(function(i,y,L){y!=null&&typeof y.toString!="function"&&(y=hh.call(y)),i[y]=L},Pg(Wi)),kj=sC(function(i,y,L){y!=null&&typeof y.toString!="function"&&(y=hh.call(y)),_n.call(i,y)?i[y].push(L):i[y]=[L]},Tt),_j=Zt(Oc);function zr(i){return Fi(i)?_1(i):og(i)}function ji(i){return Fi(i)?_1(i,!0):nz(i)}function Aj(i,y){var L={};return y=Tt(y,3),as(i,function(H,Y,ie){ss(L,y(H,Y,ie),H)}),L}function $j(i,y){var L={};return y=Tt(y,3),as(i,function(H,Y,ie){ss(L,Y,y(H,Y,ie))}),L}var Sj=kl(function(i,y,L){Ah(i,y,L)}),JC=kl(function(i,y,L,H){Ah(i,y,L,H)}),Tj=Ts(function(i,y){var L={};if(i==null)return L;var H=!1;y=I(y,function(ie){return ie=Js(ie,i),H||(H=ie.length>1),ie}),ls(i,bg(i),L),H&&(L=Ao(L,h|p|o,kz));for(var Y=y.length;Y--;)hg(L,y[Y]);return L});function Ej(i,y){return QC(i,Fh(Tt(y)))}var Ij=Ts(function(i,y){return i==null?{}:iz(i,y)});function QC(i,y){if(i==null)return{};var L=I(bg(i),function(H){return[H]});return y=Tt(y),j1(i,L,function(H,Y){return y(H,Y[0])})}function Mj(i,y,L){y=Js(y,i);var H=-1,Y=y.length;for(Y||(Y=1,i=t);++H<Y;){var ie=i==null?t:i[Uo(y[H])];ie===t&&(H=Y,ie=L),i=Is(ie)?ie.call(i):ie}return i}function Rj(i,y,L){return i==null?i:Dc(i,y,L)}function Lj(i,y,L,H){return H=typeof H=="function"?H:t,i==null?i:Dc(i,y,L,H)}var ZC=cC(zr),XC=cC(ji);function Oj(i,y,L){var H=Bt(i),Y=H||Zs(i)||$l(i);if(y=Tt(y,4),L==null){var ie=i&&i.constructor;Y?L=H?new ie:[]:rr(i)?L=Is(ie)?Cl(ph(i)):{}:L={}}return(Y?$r:as)(i,function(fe,pe,_e){return y(L,fe,pe,_e)}),L}function Nj(i,y){return i==null?!0:hg(i,y)}function Dj(i,y,L){return i==null?i:G1(i,y,pg(L))}function Pj(i,y,L,H){return H=typeof H=="function"?H:t,i==null?i:G1(i,y,pg(L),H)}function Sl(i){return i==null?[]:Ft(i,zr(i))}function zj(i){return i==null?[]:Ft(i,ji(i))}function Bj(i,y,L){return L===t&&(L=y,y=t),L!==t&&(L=To(L),L=L===L?L:0),y!==t&&(y=To(y),y=y===y?y:0),Oa(To(i),y,L)}function Fj(i,y,L){return y=Ms(y),L===t?(L=y,y=0):L=Ms(L),i=To(i),qP(i,y,L)}function jj(i,y,L){if(L&&typeof L!="boolean"&&bi(i,y,L)&&(y=L=t),L===t&&(typeof y=="boolean"?(L=y,y=t):typeof i=="boolean"&&(L=i,i=t)),i===t&&y===t?(i=0,y=1):(i=Ms(i),y===t?(y=i,i=0):y=Ms(y)),i>y){var H=i;i=y,y=H}if(L||i%1||y%1){var Y=C1();return oi(i+Y*(y-i+Wt("1e-"+((Y+"").length-1))),y)}return lg(i,y)}var Wj=_l(function(i,y,L){return y=y.toLowerCase(),i+(L?ek(y):y)});function ek(i){return Dg(An(i).toLowerCase())}function tk(i){return i=An(i),i&&i.replace(go,V).replace(mi,"")}function Hj(i,y,L){i=An(i),y=ro(y);var H=i.length;L=L===t?H:Oa(Ht(L),0,H);var Y=L;return L-=y.length,L>=0&&i.slice(L,Y)==y}function Uj(i){return i=An(i),i&&ur.test(i)?i.replace(jr,J):i}function Vj(i){return i=An(i),i&&vn.test(i)?i.replace(Or,"\\$&"):i}var Gj=_l(function(i,y,L){return i+(L?"-":"")+y.toLowerCase()}),qj=_l(function(i,y,L){return i+(L?" ":"")+y.toLowerCase()}),Yj=rC("toLowerCase");function Kj(i,y,L){i=An(i),y=Ht(y);var H=y?Jt(i):0;if(!y||H>=y)return i;var Y=(y-H)/2;return Mh(yh(Y),L)+i+Mh(vh(Y),L)}function Jj(i,y,L){i=An(i),y=Ht(y);var H=y?Jt(i):0;return y&&H<y?i+Mh(y-H,L):i}function Qj(i,y,L){i=An(i),y=Ht(y);var H=y?Jt(i):0;return y&&H<y?Mh(y-H,L)+i:i}function Zj(i,y,L){return L||y==null?y=0:y&&(y=+y),sP(An(i).replace(jn,""),y||0)}function Xj(i,y,L){return(L?bi(i,y,L):y===t)?y=1:y=Ht(y),cg(An(i),y)}function eW(){var i=arguments,y=An(i[0]);return i.length<3?y:y.replace(i[1],i[2])}var tW=_l(function(i,y,L){return i+(L?"_":"")+y.toLowerCase()});function nW(i,y,L){return L&&typeof L!="number"&&bi(i,y,L)&&(y=L=t),L=L===t?le:L>>>0,L?(i=An(i),i&&(typeof y=="string"||y!=null&&!Rg(y))&&(y=ro(y),!y&&ge(i))?Qs(Mt(i),0,L):i.split(y,L)):[]}var rW=_l(function(i,y,L){return i+(L?" ":"")+Dg(y)});function iW(i,y,L){return i=An(i),L=L==null?0:Oa(Ht(L),0,i.length),y=ro(y),i.slice(L,L+y.length)==y}function oW(i,y,L){var H=te.templateSettings;L&&bi(i,y,L)&&(y=t),i=An(i),y=Lg({},y,H,uC);var Y=Lg({},y.imports,H.imports,uC),ie=zr(Y),fe=Ft(Y,ie);$r(ie,function($t){if(bs.test($t))throw new _t(s)});var pe,_e,Ne=0,ze=y.interpolate||tr,We="__p += '",st=zi((y.escape||tr).source+"|"+ze.source+"|"+(ze===Ko?Li:tr).source+"|"+(y.evaluate||tr).source+"|$","g"),yt="//# sourceURL="+(_n.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Oe+"]")+`
1462
+ `;i.replace(st,function($t,en,an,oo,wi,so){return an||(an=oo),We+=i.slice(Ne,so).replace(mo,ae),en&&(pe=!0,We+=`' +
1463
+ __e(`+en+`) +
1464
+ '`),wi&&(_e=!0,We+=`';
1465
+ `+wi+`;
1466
+ __p += '`),an&&(We+=`' +
1467
+ ((__t = (`+an+`)) == null ? '' : __t) +
1468
+ '`),Ne=so+$t.length,$t}),We+=`';
1469
+ `;var Et=_n.call(y,"variable")&&y.variable;if(!Et)We=`with (obj) {
1470
+ `+We+`
1471
+ }
1472
+ `;else if(bs.test(Et))throw new _t(v);We=(_e?We.replace(Ii,""):We).replace(fo,"$1").replace(vr,"$1;"),We="function("+(Et||"obj")+`) {
1473
+ `+(Et?"":`obj || (obj = {});
1474
+ `)+"var __t, __p = ''"+(pe?", __e = _.escape":"")+(_e?`, __j = Array.prototype.join;
1475
+ function print() { __p += __j.call(arguments, '') }
1476
+ `:`;
1477
+ `)+We+`return __p
1478
+ }`;var Vt=rk(function(){return Dt(ie,yt+"return "+We).apply(t,fe)});if(Vt.source=We,Mg(Vt))throw Vt;return Vt}function sW(i){return An(i).toLowerCase()}function aW(i){return An(i).toUpperCase()}function lW(i,y,L){if(i=An(i),i&&(L||y===t))return Lt(i);if(!i||!(y=ro(y)))return i;var H=Mt(i),Y=Mt(y),ie=br(H,Y),fe=Sr(H,Y)+1;return Qs(H,ie,fe).join("")}function cW(i,y,L){if(i=An(i),i&&(L||y===t))return i.slice(0,At(i)+1);if(!i||!(y=ro(y)))return i;var H=Mt(i),Y=Sr(H,Mt(y))+1;return Qs(H,0,Y).join("")}function uW(i,y,L){if(i=An(i),i&&(L||y===t))return i.replace(jn,"");if(!i||!(y=ro(y)))return i;var H=Mt(i),Y=br(H,Mt(y));return Qs(H,Y).join("")}function hW(i,y){var L=B,H=N;if(rr(y)){var Y="separator"in y?y.separator:Y;L="length"in y?Ht(y.length):L,H="omission"in y?ro(y.omission):H}i=An(i);var ie=i.length;if(ge(i)){var fe=Mt(i);ie=fe.length}if(L>=ie)return i;var pe=L-Jt(H);if(pe<1)return H;var _e=fe?Qs(fe,0,pe).join(""):i.slice(0,pe);if(Y===t)return _e+H;if(fe&&(pe+=_e.length-pe),Rg(Y)){if(i.slice(pe).search(Y)){var Ne,ze=_e;for(Y.global||(Y=zi(Y.source,An(Pt.exec(Y))+"g")),Y.lastIndex=0;Ne=Y.exec(ze);)var We=Ne.index;_e=_e.slice(0,We===t?pe:We)}}else if(i.indexOf(ro(Y),pe)!=pe){var st=_e.lastIndexOf(Y);st>-1&&(_e=_e.slice(0,st))}return _e+H}function dW(i){return i=An(i),i&&po.test(i)?i.replace(Ji,bt):i}var fW=_l(function(i,y,L){return i+(L?" ":"")+y.toUpperCase()}),Dg=rC("toUpperCase");function nk(i,y,L){return i=An(i),y=L?t:y,y===t?Se(i)?wr(i):Z(i):i.match(y)||[]}var rk=Zt(function(i,y){try{return Cn(i,t,y)}catch(L){return Mg(L)?L:new _t(L)}}),pW=Ts(function(i,y){return $r(y,function(L){L=Uo(L),ss(i,L,Eg(i[L],i))}),i});function gW(i){var y=i==null?0:i.length,L=Tt();return i=y?I(i,function(H){if(typeof H[1]!="function")throw new zn(g);return[L(H[0]),H[1]]}):[],Zt(function(H){for(var Y=-1;++Y<y;){var ie=i[Y];if(Cn(ie[0],this,H))return Cn(ie[1],this,H)}})}function mW(i){return WP(Ao(i,h))}function Pg(i){return function(){return i}}function vW(i,y){return i==null||i!==i?y:i}var yW=oC(),bW=oC(!0);function Wi(i){return i}function zg(i){return N1(typeof i=="function"?i:Ao(i,h))}function wW(i){return P1(Ao(i,h))}function xW(i,y){return z1(i,Ao(y,h))}var CW=Zt(function(i,y){return function(L){return Oc(L,i,y)}}),kW=Zt(function(i,y){return function(L){return Oc(i,L,y)}});function Bg(i,y,L){var H=zr(y),Y=_h(y,H);L==null&&!(rr(y)&&(Y.length||!H.length))&&(L=y,y=i,i=this,Y=_h(y,zr(y)));var ie=!(rr(L)&&"chain"in L)||!!L.chain,fe=Is(i);return $r(Y,function(pe){var _e=y[pe];i[pe]=_e,fe&&(i.prototype[pe]=function(){var Ne=this.__chain__;if(ie||Ne){var ze=i(this.__wrapped__),We=ze.__actions__=Bi(this.__actions__);return We.push({func:_e,args:arguments,thisArg:i}),ze.__chain__=Ne,ze}return _e.apply(i,S([this.value()],arguments))})}),i}function _W(){return Kt._===this&&(Kt._=QD),this}function Fg(){}function AW(i){return i=Ht(i),Zt(function(y){return B1(y,i)})}var $W=mg(I),SW=mg(os),TW=mg(W);function ik(i){return kg(i)?Fe(Uo(i)):oz(i)}function EW(i){return function(y){return i==null?t:Na(i,y)}}var IW=aC(),MW=aC(!0);function jg(){return[]}function Wg(){return!1}function RW(){return{}}function LW(){return""}function OW(){return!0}function NW(i,y){if(i=Ht(i),i<1||i>q)return[];var L=le,H=oi(i,le);y=Tt(y),i-=le;for(var Y=ft(H,y);++L<i;)y(L);return Y}function DW(i){return Bt(i)?I(i,Uo):io(i)?[i]:Bi(kC(An(i)))}function PW(i){var y=++KD;return An(i)+y}var zW=Ih(function(i,y){return i+y},0),BW=vg("ceil"),FW=Ih(function(i,y){return i/y},1),jW=vg("floor");function WW(i){return i&&i.length?kh(i,Wi,ng):t}function HW(i,y){return i&&i.length?kh(i,Tt(y,2),ng):t}function UW(i){return $e(i,Wi)}function VW(i,y){return $e(i,Tt(y,2))}function GW(i){return i&&i.length?kh(i,Wi,sg):t}function qW(i,y){return i&&i.length?kh(i,Tt(y,2),sg):t}var YW=Ih(function(i,y){return i*y},1),KW=vg("round"),JW=Ih(function(i,y){return i-y},0);function QW(i){return i&&i.length?ut(i,Wi):0}function ZW(i,y){return i&&i.length?ut(i,Tt(y,2)):0}return te.after=xF,te.ary=OC,te.assign=lj,te.assignIn=YC,te.assignInWith=KC,te.assignWith=Lg,te.at=cj,te.before=NC,te.bind=Eg,te.bindAll=pW,te.bindKey=DC,te.castArray=LF,te.chain=MC,te.chunk=Wz,te.compact=Hz,te.concat=Uz,te.cond=gW,te.conforms=mW,te.constant=Pg,te.countBy=ZB,te.create=uj,te.curry=PC,te.curryRight=zC,te.debounce=BC,te.defaults=hj,te.defaultsDeep=dj,te.defer=CF,te.delay=kF,te.difference=Vz,te.differenceBy=Gz,te.differenceWith=qz,te.drop=Yz,te.dropRight=Kz,te.dropRightWhile=Jz,te.dropWhile=Qz,te.fill=Zz,te.filter=eF,te.flatMap=rF,te.flatMapDeep=iF,te.flatMapDepth=oF,te.flatten=SC,te.flattenDeep=Xz,te.flattenDepth=eB,te.flip=_F,te.flow=yW,te.flowRight=bW,te.fromPairs=tB,te.functions=bj,te.functionsIn=wj,te.groupBy=sF,te.initial=rB,te.intersection=iB,te.intersectionBy=oB,te.intersectionWith=sB,te.invert=Cj,te.invertBy=kj,te.invokeMap=lF,te.iteratee=zg,te.keyBy=cF,te.keys=zr,te.keysIn=ji,te.map=Ph,te.mapKeys=Aj,te.mapValues=$j,te.matches=wW,te.matchesProperty=xW,te.memoize=Bh,te.merge=Sj,te.mergeWith=JC,te.method=CW,te.methodOf=kW,te.mixin=Bg,te.negate=Fh,te.nthArg=AW,te.omit=Tj,te.omitBy=Ej,te.once=AF,te.orderBy=uF,te.over=$W,te.overArgs=$F,te.overEvery=SW,te.overSome=TW,te.partial=Ig,te.partialRight=FC,te.partition=hF,te.pick=Ij,te.pickBy=QC,te.property=ik,te.propertyOf=EW,te.pull=uB,te.pullAll=EC,te.pullAllBy=hB,te.pullAllWith=dB,te.pullAt=fB,te.range=IW,te.rangeRight=MW,te.rearg=SF,te.reject=pF,te.remove=pB,te.rest=TF,te.reverse=Sg,te.sampleSize=mF,te.set=Rj,te.setWith=Lj,te.shuffle=vF,te.slice=gB,te.sortBy=wF,te.sortedUniq=CB,te.sortedUniqBy=kB,te.split=nW,te.spread=EF,te.tail=_B,te.take=AB,te.takeRight=$B,te.takeRightWhile=SB,te.takeWhile=TB,te.tap=HB,te.throttle=IF,te.thru=Dh,te.toArray=VC,te.toPairs=ZC,te.toPairsIn=XC,te.toPath=DW,te.toPlainObject=qC,te.transform=Oj,te.unary=MF,te.union=EB,te.unionBy=IB,te.unionWith=MB,te.uniq=RB,te.uniqBy=LB,te.uniqWith=OB,te.unset=Nj,te.unzip=Tg,te.unzipWith=IC,te.update=Dj,te.updateWith=Pj,te.values=Sl,te.valuesIn=zj,te.without=NB,te.words=nk,te.wrap=RF,te.xor=DB,te.xorBy=PB,te.xorWith=zB,te.zip=BB,te.zipObject=FB,te.zipObjectDeep=jB,te.zipWith=WB,te.entries=ZC,te.entriesIn=XC,te.extend=YC,te.extendWith=KC,Bg(te,te),te.add=zW,te.attempt=rk,te.camelCase=Wj,te.capitalize=ek,te.ceil=BW,te.clamp=Bj,te.clone=OF,te.cloneDeep=DF,te.cloneDeepWith=PF,te.cloneWith=NF,te.conformsTo=zF,te.deburr=tk,te.defaultTo=vW,te.divide=FW,te.endsWith=Hj,te.eq=Vo,te.escape=Uj,te.escapeRegExp=Vj,te.every=XB,te.find=tF,te.findIndex=AC,te.findKey=fj,te.findLast=nF,te.findLastIndex=$C,te.findLastKey=pj,te.floor=jW,te.forEach=RC,te.forEachRight=LC,te.forIn=gj,te.forInRight=mj,te.forOwn=vj,te.forOwnRight=yj,te.get=Og,te.gt=BF,te.gte=FF,te.has=xj,te.hasIn=Ng,te.head=TC,te.identity=Wi,te.includes=aF,te.indexOf=nB,te.inRange=Fj,te.invoke=_j,te.isArguments=za,te.isArray=Bt,te.isArrayBuffer=jF,te.isArrayLike=Fi,te.isArrayLikeObject=hr,te.isBoolean=WF,te.isBuffer=Zs,te.isDate=HF,te.isElement=UF,te.isEmpty=VF,te.isEqual=GF,te.isEqualWith=qF,te.isError=Mg,te.isFinite=YF,te.isFunction=Is,te.isInteger=jC,te.isLength=jh,te.isMap=WC,te.isMatch=KF,te.isMatchWith=JF,te.isNaN=QF,te.isNative=ZF,te.isNil=ej,te.isNull=XF,te.isNumber=HC,te.isObject=rr,te.isObjectLike=lr,te.isPlainObject=Fc,te.isRegExp=Rg,te.isSafeInteger=tj,te.isSet=UC,te.isString=Wh,te.isSymbol=io,te.isTypedArray=$l,te.isUndefined=nj,te.isWeakMap=rj,te.isWeakSet=ij,te.join=aB,te.kebabCase=Gj,te.last=So,te.lastIndexOf=lB,te.lowerCase=qj,te.lowerFirst=Yj,te.lt=oj,te.lte=sj,te.max=WW,te.maxBy=HW,te.mean=UW,te.meanBy=VW,te.min=GW,te.minBy=qW,te.stubArray=jg,te.stubFalse=Wg,te.stubObject=RW,te.stubString=LW,te.stubTrue=OW,te.multiply=YW,te.nth=cB,te.noConflict=_W,te.noop=Fg,te.now=zh,te.pad=Kj,te.padEnd=Jj,te.padStart=Qj,te.parseInt=Zj,te.random=jj,te.reduce=dF,te.reduceRight=fF,te.repeat=Xj,te.replace=eW,te.result=Mj,te.round=KW,te.runInContext=be,te.sample=gF,te.size=yF,te.snakeCase=tW,te.some=bF,te.sortedIndex=mB,te.sortedIndexBy=vB,te.sortedIndexOf=yB,te.sortedLastIndex=bB,te.sortedLastIndexBy=wB,te.sortedLastIndexOf=xB,te.startCase=rW,te.startsWith=iW,te.subtract=JW,te.sum=QW,te.sumBy=ZW,te.template=oW,te.times=NW,te.toFinite=Ms,te.toInteger=Ht,te.toLength=GC,te.toLower=sW,te.toNumber=To,te.toSafeInteger=aj,te.toString=An,te.toUpper=aW,te.trim=lW,te.trimEnd=cW,te.trimStart=uW,te.truncate=hW,te.unescape=dW,te.uniqueId=PW,te.upperCase=fW,te.upperFirst=Dg,te.each=RC,te.eachRight=LC,te.first=TC,Bg(te,(function(){var i={};return as(te,function(y,L){_n.call(te.prototype,L)||(i[L]=y)}),i})(),{chain:!1}),te.VERSION=r,$r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){te[i].placeholder=te}),$r(["drop","take"],function(i,y){rn.prototype[i]=function(L){L=L===t?1:Tr(Ht(L),0);var H=this.__filtered__&&!y?new rn(this):this.clone();return H.__filtered__?H.__takeCount__=oi(L,H.__takeCount__):H.__views__.push({size:oi(L,le),type:i+(H.__dir__<0?"Right":"")}),H},rn.prototype[i+"Right"]=function(L){return this.reverse()[i](L).reverse()}}),$r(["filter","map","takeWhile"],function(i,y){var L=y+1,H=L==A||L==j;rn.prototype[i]=function(Y){var ie=this.clone();return ie.__iteratees__.push({iteratee:Tt(Y,3),type:L}),ie.__filtered__=ie.__filtered__||H,ie}}),$r(["head","last"],function(i,y){var L="take"+(y?"Right":"");rn.prototype[i]=function(){return this[L](1).value()[0]}}),$r(["initial","tail"],function(i,y){var L="drop"+(y?"":"Right");rn.prototype[i]=function(){return this.__filtered__?new rn(this):this[L](1)}}),rn.prototype.compact=function(){return this.filter(Wi)},rn.prototype.find=function(i){return this.filter(i).head()},rn.prototype.findLast=function(i){return this.reverse().find(i)},rn.prototype.invokeMap=Zt(function(i,y){return typeof i=="function"?new rn(this):this.map(function(L){return Oc(L,i,y)})}),rn.prototype.reject=function(i){return this.filter(Fh(Tt(i)))},rn.prototype.slice=function(i,y){i=Ht(i);var L=this;return L.__filtered__&&(i>0||y<0)?new rn(L):(i<0?L=L.takeRight(-i):i&&(L=L.drop(i)),y!==t&&(y=Ht(y),L=y<0?L.dropRight(-y):L.take(y-i)),L)},rn.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},rn.prototype.toArray=function(){return this.take(le)},as(rn.prototype,function(i,y){var L=/^(?:filter|find|map|reject)|While$/.test(y),H=/^(?:head|last)$/.test(y),Y=te[H?"take"+(y=="last"?"Right":""):y],ie=H||/^find/.test(y);Y&&(te.prototype[y]=function(){var fe=this.__wrapped__,pe=H?[1]:arguments,_e=fe instanceof rn,Ne=pe[0],ze=_e||Bt(fe),We=function(en){var an=Y.apply(te,S([en],pe));return H&&st?an[0]:an};ze&&L&&typeof Ne=="function"&&Ne.length!=1&&(_e=ze=!1);var st=this.__chain__,yt=!!this.__actions__.length,Et=ie&&!st,Vt=_e&&!yt;if(!ie&&ze){fe=Vt?fe:new rn(this);var $t=i.apply(fe,pe);return $t.__actions__.push({func:Dh,args:[We],thisArg:t}),new _o($t,st)}return Et&&Vt?i.apply(this,pe):($t=this.thru(We),Et?H?$t.value()[0]:$t.value():$t)})}),$r(["pop","push","shift","sort","splice","unshift"],function(i){var y=ko[i],L=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",H=/^(?:pop|shift)$/.test(i);te.prototype[i]=function(){var Y=arguments;if(H&&!this.__chain__){var ie=this.value();return y.apply(Bt(ie)?ie:[],Y)}return this[L](function(fe){return y.apply(Bt(fe)?fe:[],Y)})}}),as(rn.prototype,function(i,y){var L=te[y];if(L){var H=L.name+"";_n.call(xl,H)||(xl[H]=[]),xl[H].push({name:y,func:L})}}),xl[Eh(t,x).name]=[{name:"wrapper",func:t}],rn.prototype.clone=fP,rn.prototype.reverse=pP,rn.prototype.value=gP,te.prototype.at=UB,te.prototype.chain=VB,te.prototype.commit=GB,te.prototype.next=qB,te.prototype.plant=KB,te.prototype.reverse=JB,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=QB,te.prototype.first=te.prototype.head,Sc&&(te.prototype[Sc]=YB),te}),In=kn();yr?((yr.exports=In)._=In,ri._=In):Kt._=In}).call(dT)})(cu,cu.exports)),cu.exports}var pT=fT();ir("T",lu(pT)).debounce(function(){this.rebuildDisplayText()},300);var by={exports:{}},wy;function gT(){return wy||(wy=1,(function(e,n){(function(){ace.require(["ace/mode/text"],function(t){e&&(e.exports=t)})})()})(by)),by.exports}gT();const mT=!0,xr="u-",vT="uplot",yT=xr+"hz",bT=xr+"vt",wT=xr+"title",xT=xr+"wrap",CT=xr+"under",kT=xr+"over",_T=xr+"axis",fa=xr+"off",AT=xr+"select",$T=xr+"cursor-x",ST=xr+"cursor-y",TT=xr+"cursor-pt",ET=xr+"legend",IT=xr+"live",MT=xr+"inline",RT=xr+"series",LT=xr+"marker",xy=xr+"label",OT=xr+"value",Ql="width",Zl="height",Xl="top",Cy="bottom",Ka="left",_d="right",Ad="#000",ky=Ad+"0",$d="mousemove",_y="mousedown",Sd="mouseup",Ay="mouseenter",$y="mouseleave",Sy="dblclick",NT="resize",DT="scroll",Ty="change",uu="dppxchange",Td="--",Ja=typeof window<"u",Ed=Ja?document:null,Qa=Ja?window:null,PT=Ja?navigator:null;let bn,hu;function Id(){let e=devicePixelRatio;bn!=e&&(bn=e,hu&&Ld(Ty,hu,Id),hu=matchMedia(`(min-resolution: ${bn-.001}dppx) and (max-resolution: ${bn+.001}dppx)`),pa(Ty,hu,Id),Qa.dispatchEvent(new CustomEvent(uu)))}function Ui(e,n){if(n!=null){let t=e.classList;!t.contains(n)&&t.add(n)}}function Md(e,n){let t=e.classList;t.contains(n)&&t.remove(n)}function Bn(e,n,t){e.style[n]=t+"px"}function Mo(e,n,t,r){let c=Ed.createElement(e);return n!=null&&Ui(c,n),t?.insertBefore(c,r),c}function lo(e,n){return Mo("div",e,n)}const Ey=new WeakMap;function Yo(e,n,t,r,c){let u="translate("+n+"px,"+t+"px)",g=Ey.get(e);u!=g&&(e.style.transform=u,Ey.set(e,u),n<0||t<0||n>r||t>c?Ui(e,fa):Md(e,fa))}const Iy=new WeakMap;function My(e,n,t){let r=n+t,c=Iy.get(e);r!=c&&(Iy.set(e,r),e.style.background=n,e.style.borderColor=t)}const Ry=new WeakMap;function Ly(e,n,t,r){let c=n+""+t,u=Ry.get(e);c!=u&&(Ry.set(e,c),e.style.height=t+"px",e.style.width=n+"px",e.style.marginLeft=r?-n/2+"px":0,e.style.marginTop=r?-t/2+"px":0)}const Rd={passive:!0},zT={...Rd,capture:!0};function pa(e,n,t,r){n.addEventListener(e,t,r?zT:Rd)}function Ld(e,n,t,r){n.removeEventListener(e,t,Rd)}Ja&&Id();function Ro(e,n,t,r){let c;t=t||0,r=r||n.length-1;let u=r<=2147483647;for(;r-t>1;)c=u?t+r>>1:Gi((t+r)/2),n[c]<e?t=c:r=c;return e-n[t]<=n[r]-e?t:r}function Oy(e){return(n,t,r)=>{let c=-1,u=-1;for(let g=t;g<=r;g++)if(e(n[g])){c=g;break}for(let g=r;g>=t;g--)if(e(n[g])){u=g;break}return[c,u]}}const Ny=e=>e!=null,Dy=e=>e!=null&&e>0,du=Oy(Ny),BT=Oy(Dy);function FT(e,n,t,r=0,c=!1){let u=c?BT:du,g=c?Dy:Ny;[n,t]=u(e,n,t);let v=e[n],s=e[n];if(n>-1)if(r==1)v=e[n],s=e[t];else if(r==-1)v=e[t],s=e[n];else for(let d=n;d<=t;d++){let a=e[d];g(a)&&(a<v?v=a:a>s&&(s=a))}return[v??Mn,s??-Mn]}function fu(e,n,t,r){let c=By(e),u=By(n);e==n&&(c==-1?(e*=t,n/=t):(e/=t,n*=t));let g=t==10?us:Fy,v=c==1?Gi:co,s=u==1?co:Gi,d=v(g(Cr(e))),a=s(g(Cr(n))),l=Za(t,d),h=Za(t,a);return t==10&&(d<0&&(l=Rn(l,-d)),a<0&&(h=Rn(h,-a))),r||t==2?(e=l*c,n=h*u):(e=qy(e,l),n=mu(n,h)),[e,n]}function Od(e,n,t,r){let c=fu(e,n,t,r);return e==0&&(c[0]=0),n==0&&(c[1]=0),c}const Nd=.1,Py={mode:3,pad:Nd},ec={pad:0,soft:null,mode:0},jT={min:ec,max:ec};function pu(e,n,t,r){return vu(t)?zy(e,n,t):(ec.pad=t,ec.soft=r?0:null,ec.mode=r?3:0,zy(e,n,jT))}function mn(e,n){return e??n}function WT(e,n,t){for(n=mn(n,0),t=mn(t,e.length-1);n<=t;){if(e[n]!=null)return!0;n++}return!1}function zy(e,n,t){let r=t.min,c=t.max,u=mn(r.pad,0),g=mn(c.pad,0),v=mn(r.hard,-Mn),s=mn(c.hard,Mn),d=mn(r.soft,Mn),a=mn(c.soft,-Mn),l=mn(r.mode,0),h=mn(c.mode,0),p=n-e,o=us(p),f=ui(Cr(e),Cr(n)),m=us(f),w=Cr(m-o);(p<1e-24||w>10)&&(p=0,(e==0||n==0)&&(p=1e-24,l==2&&d!=Mn&&(u=0),h==2&&a!=-Mn&&(g=0)));let x=p||f||1e3,R=us(x),T=Za(10,Gi(R)),_=x*(p==0?e==0?.1:1:u),C=Rn(qy(e-_,T/10),24),P=e>=d&&(l==1||l==3&&C<=d||l==2&&C>=d)?d:Mn,O=ui(v,C<P&&e>=P?P:Lo(P,C)),E=x*(p==0?n==0?.1:1:g),k=Rn(mu(n+E,T/10),24),B=n<=a&&(h==1||h==3&&k>=a||h==2&&k<=a)?a:-Mn,N=Lo(s,k>B&&n<=B?B:ui(B,k));return O==N&&O==0&&(N=100),[O,N]}const HT=new Intl.NumberFormat(Ja?PT.language:"en-US"),Dd=e=>HT.format(e),Vi=Math,gu=Vi.PI,Cr=Vi.abs,Gi=Vi.floor,kr=Vi.round,co=Vi.ceil,Lo=Vi.min,ui=Vi.max,Za=Vi.pow,By=Vi.sign,us=Vi.log10,Fy=Vi.log2,UT=(e,n=1)=>Vi.sinh(e)*n,Pd=(e,n=1)=>Vi.asinh(e/n),Mn=1/0;function jy(e){return(us((e^e>>31)-(e>>31))|0)+1}function zd(e,n,t){return Lo(ui(e,n),t)}function Wy(e){return typeof e=="function"}function nn(e){return Wy(e)?e:()=>e}const VT=()=>{},Hy=e=>e,Uy=(e,n)=>n,GT=e=>null,Vy=e=>!0,Gy=(e,n)=>e==n,qT=/\.\d*?(?=9{6,}|0{6,})/gm,ga=e=>{if(Ky(e)||Bs.has(e))return e;const n=`${e}`,t=n.match(qT);if(t==null)return e;let r=t[0].length-1;if(n.indexOf("e-")!=-1){let[c,u]=n.split("e");return+`${ga(c)}e${u}`}return Rn(e,r)};function ma(e,n){return ga(Rn(ga(e/n))*n)}function mu(e,n){return ga(co(ga(e/n))*n)}function qy(e,n){return ga(Gi(ga(e/n))*n)}function Rn(e,n=0){if(Ky(e))return e;let t=10**n,r=e*t*(1+Number.EPSILON);return kr(r)/t}const Bs=new Map;function Yy(e){return((""+e).split(".")[1]||"").length}function tc(e,n,t,r){let c=[],u=r.map(Yy);for(let g=n;g<t;g++){let v=Cr(g),s=Rn(Za(e,g),v);for(let d=0;d<r.length;d++){let a=e==10?+`${r[d]}e${g}`:r[d]*s,l=(g>=0?0:v)+(g>=u[d]?0:u[d]),h=e==10?a:Rn(a,l);c.push(h),Bs.set(h,l)}}return c}const nc={},Bd=[],Xa=[null,null],Fs=Array.isArray,Ky=Number.isInteger,YT=e=>e===void 0;function Jy(e){return typeof e=="string"}function vu(e){let n=!1;if(e!=null){let t=e.constructor;n=t==null||t==Object}return n}function KT(e){return e!=null&&typeof e=="object"}const JT=Object.getPrototypeOf(Uint8Array),Qy="__proto__";function el(e,n=vu){let t;if(Fs(e)){let r=e.find(c=>c!=null);if(Fs(r)||n(r)){t=Array(e.length);for(let c=0;c<e.length;c++)t[c]=el(e[c],n)}else t=e.slice()}else if(e instanceof JT)t=e.slice();else if(n(e)){t={};for(let r in e)r!=Qy&&(t[r]=el(e[r],n))}else t=e;return t}function pr(e){let n=arguments;for(let t=1;t<n.length;t++){let r=n[t];for(let c in r)c!=Qy&&(vu(e[c])?pr(e[c],el(r[c])):e[c]=el(r[c]))}return e}const QT=0,ZT=1,XT=2;function eE(e,n,t){for(let r=0,c,u=-1;r<n.length;r++){let g=n[r];if(g>u){for(c=g-1;c>=0&&e[c]==null;)e[c--]=null;for(c=g+1;c<t&&e[c]==null;)e[u=c++]=null}}}function tE(e,n){if(iE(e)){let g=e[0].slice();for(let v=1;v<e.length;v++)g.push(...e[v].slice(1));return oE(g[0])||(g=rE(g)),g}let t=new Set;for(let g=0;g<e.length;g++){let v=e[g][0],s=v.length;for(let d=0;d<s;d++)t.add(v[d])}let r=[Array.from(t).sort((g,v)=>g-v)],c=r[0].length,u=new Map;for(let g=0;g<c;g++)u.set(r[0][g],g);for(let g=0;g<e.length;g++){let v=e[g],s=v[0];for(let d=1;d<v.length;d++){let a=v[d],l=Array(c).fill(void 0),h=n?n[g][d]:ZT,p=[];for(let o=0;o<a.length;o++){let f=a[o],m=u.get(s[o]);f===null?h!=QT&&(l[m]=f,h==XT&&p.push(m)):l[m]=f}eE(l,p,c),r.push(l)}}return r}const nE=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask;function rE(e){let n=e[0],t=n.length,r=Array(t);for(let u=0;u<r.length;u++)r[u]=u;r.sort((u,g)=>n[u]-n[g]);let c=[];for(let u=0;u<e.length;u++){let g=e[u],v=Array(t);for(let s=0;s<t;s++)v[s]=g[r[s]];c.push(v)}return c}function iE(e){let n=e[0][0],t=n.length;for(let r=1;r<e.length;r++){let c=e[r][0];if(c.length!=t)return!1;if(c!=n){for(let u=0;u<t;u++)if(c[u]!=n[u])return!1}}return!0}function oE(e,n=100){const t=e.length;if(t<=1)return!0;let r=0,c=t-1;for(;r<=c&&e[r]==null;)r++;for(;c>=r&&e[c]==null;)c--;if(c<=r)return!0;const u=ui(1,Gi((c-r+1)/n));for(let g=e[r],v=r+u;v<=c;v+=u){const s=e[v];if(s!=null){if(s<=g)return!1;g=s}}return!0}const Zy=["January","February","March","April","May","June","July","August","September","October","November","December"],Xy=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function eb(e){return e.slice(0,3)}const sE=Xy.map(eb),aE=Zy.map(eb),lE={MMMM:Zy,MMM:aE,WWWW:Xy,WWW:sE};function rc(e){return(e<10?"0":"")+e}function cE(e){return(e<10?"00":e<100?"0":"")+e}const uE={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,n)=>n.MMMM[e.getMonth()],MMM:(e,n)=>n.MMM[e.getMonth()],MM:e=>rc(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>rc(e.getDate()),D:e=>e.getDate(),WWWW:(e,n)=>n.WWWW[e.getDay()],WWW:(e,n)=>n.WWW[e.getDay()],HH:e=>rc(e.getHours()),H:e=>e.getHours(),h:e=>{let n=e.getHours();return n==0?12:n>12?n-12:n},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>rc(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>rc(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>cE(e.getMilliseconds())};function Fd(e,n){n=n||lE;let t=[],r=/\{([a-z]+)\}|[^{]+/gi,c;for(;c=r.exec(e);)t.push(c[0][0]=="{"?uE[c[1]]:c[0]);return u=>{let g="";for(let v=0;v<t.length;v++)g+=typeof t[v]=="string"?t[v]:t[v](u,n);return g}}const hE=new Intl.DateTimeFormat().resolvedOptions().timeZone;function dE(e,n){let t;return n=="UTC"||n=="Etc/UTC"?t=new Date(+e+e.getTimezoneOffset()*6e4):n==hE?t=e:(t=new Date(e.toLocaleString("en-US",{timeZone:n})),t.setMilliseconds(e.getMilliseconds())),t}const tb=e=>e%1==0,yu=[1,2,2.5,5],fE=tc(10,-32,0,yu),nb=tc(10,0,32,yu),pE=nb.filter(tb),va=fE.concat(nb),jd=`
1479
+ `,rb="{YYYY}",ib=jd+rb,ob="{M}/{D}",ic=jd+ob,bu=ic+"/{YY}",sb="{aa}",gE="{h}:{mm}",tl=gE+sb,ab=jd+tl,lb=":{ss}",xn=null;function cb(e){let n=e*1e3,t=n*60,r=t*60,c=r*24,u=c*30,g=c*365,v=(e==1?tc(10,0,3,yu).filter(tb):tc(10,-3,0,yu)).concat([n,n*5,n*10,n*15,n*30,t,t*5,t*10,t*15,t*30,r,r*2,r*3,r*4,r*6,r*8,r*12,c,c*2,c*3,c*4,c*5,c*6,c*7,c*8,c*9,c*10,c*15,u,u*2,u*3,u*4,u*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const s=[[g,rb,xn,xn,xn,xn,xn,xn,1],[c*28,"{MMM}",ib,xn,xn,xn,xn,xn,1],[c,ob,ib,xn,xn,xn,xn,xn,1],[r,"{h}"+sb,bu,xn,ic,xn,xn,xn,1],[t,tl,bu,xn,ic,xn,xn,xn,1],[n,lb,bu+" "+tl,xn,ic+" "+tl,xn,ab,xn,1],[e,lb+".{fff}",bu+" "+tl,xn,ic+" "+tl,xn,ab,xn,1]];function d(a){return(l,h,p,o,f,m)=>{let w=[],x=f>=g,R=f>=u&&f<g,T=a(p),_=Rn(T*e,3),C=Wd(T.getFullYear(),x?0:T.getMonth(),R||x?1:T.getDate()),P=Rn(C*e,3);if(R||x){let O=R?f/u:0,E=x?f/g:0,k=_==P?_:Rn(Wd(C.getFullYear()+E,C.getMonth()+O,1)*e,3),B=new Date(kr(k/e)),N=B.getFullYear(),M=B.getMonth();for(let $=0;k<=o;$++){let A=Wd(N+E*$,M+O*$,1),D=A-a(Rn(A*e,3));k=Rn((+A+D)*e,3),k<=o&&w.push(k)}}else{let O=f>=c?c:f,E=Gi(p)-Gi(_),k=P+E+mu(_-P,O);w.push(k);let B=a(k),N=B.getHours()+B.getMinutes()/t+B.getSeconds()/r,M=f/r,$=l.axes[h]._space,A=m/$;for(;k=Rn(k+f,e==1?0:3),!(k>o);)if(M>1){let D=Gi(Rn(N+M,6))%24,j=a(k).getHours()-D;j>1&&(j=-1),k-=j*r,N=(N+M)%24;let U=w[w.length-1];Rn((k-U)/f,3)*A>=.7&&w.push(k)}else w.push(k)}return w}}return[v,s,d]}const[mE,vE,yE]=cb(1),[bE,wE,xE]=cb(.001);tc(2,-53,53,[1]);function ub(e,n){return e.map(t=>t.map((r,c)=>c==0||c==8||r==null?r:n(c==1||t[8]==0?r:t[1]+r)))}function hb(e,n){return(t,r,c,u,g)=>{let v=n.find(o=>g>=o[0])||n[n.length-1],s,d,a,l,h,p;return r.map(o=>{let f=e(o),m=f.getFullYear(),w=f.getMonth(),x=f.getDate(),R=f.getHours(),T=f.getMinutes(),_=f.getSeconds(),C=m!=s&&v[2]||w!=d&&v[3]||x!=a&&v[4]||R!=l&&v[5]||T!=h&&v[6]||_!=p&&v[7]||v[1];return s=m,d=w,a=x,l=R,h=T,p=_,C(f)})}}function CE(e,n){let t=Fd(n);return(r,c,u,g,v)=>c.map(s=>t(e(s)))}function Wd(e,n,t){return new Date(e,n,t)}function db(e,n){return n(e)}const kE="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function fb(e,n){return(t,r,c,u)=>u==null?Td:n(e(r))}function _E(e,n){let t=e.series[n];return t.width?t.stroke(e,n):t.points.width?t.points.stroke(e,n):null}function AE(e,n){return e.series[n].fill(e,n)}const $E={show:!0,live:!0,isolate:!1,mount:VT,markers:{show:!0,width:2,stroke:_E,fill:AE,dash:"solid"},idx:null,idxs:null,values:[]};function SE(e,n){let t=e.cursor.points,r=lo(),c=t.size(e,n);Bn(r,Ql,c),Bn(r,Zl,c);let u=c/-2;Bn(r,"marginLeft",u),Bn(r,"marginTop",u);let g=t.width(e,n,c);return g&&Bn(r,"borderWidth",g),r}function TE(e,n){let t=e.series[n].points;return t._fill||t._stroke}function EE(e,n){let t=e.series[n].points;return t._stroke||t._fill}function IE(e,n){return e.series[n].points.size}const Hd=[0,0];function ME(e,n,t){return Hd[0]=n,Hd[1]=t,Hd}function wu(e,n,t,r=!0){return c=>{c.button==0&&(!r||c.target==n)&&t(c)}}function Ud(e,n,t,r=!0){return c=>{(!r||c.target==n)&&t(c)}}const RE={show:!0,x:!0,y:!0,lock:!1,move:ME,points:{one:!1,show:SE,size:IE,width:0,stroke:EE,fill:TE},bind:{mousedown:wu,mouseup:wu,click:wu,dblclick:wu,mousemove:Ud,mouseleave:Ud,mouseenter:Ud},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,n)=>{n.stopPropagation(),n.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,n,t,r,c)=>r-c,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},pb={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Vd=pr({},pb,{filter:Uy}),gb=pr({},Vd,{size:10}),mb=pr({},pb,{show:!1}),Gd='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"',vb="bold "+Gd,yb=1.5,bb={show:!0,scale:"x",stroke:Ad,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:vb,side:2,grid:Vd,ticks:gb,border:mb,font:Gd,lineGap:yb,rotate:0},LE="Value",OE="Time",wb={show:!0,scale:"x",auto:!1,sorted:1,min:Mn,max:-Mn,idxs:[]};function NE(e,n,t,r,c){return n.map(u=>u==null?"":Dd(u))}function DE(e,n,t,r,c,u,g){let v=[],s=Bs.get(c)||0;t=g?t:Rn(mu(t,c),s);for(let d=t;d<=r;d=Rn(d+c,s))v.push(Object.is(d,-0)?0:d);return v}function qd(e,n,t,r,c,u,g){const v=[],s=e.scales[e.axes[n].scale].log,d=s==10?us:Fy,a=Gi(d(t));c=Za(s,a),s==10&&(c=va[Ro(c,va)]);let l=t,h=c*s;s==10&&(h=va[Ro(h,va)]);do v.push(l),l=l+c,s==10&&!Bs.has(l)&&(l=Rn(l,Bs.get(c))),l>=h&&(c=l,h=c*s,s==10&&(h=va[Ro(h,va)]));while(l<=r);return v}function PE(e,n,t,r,c,u,g){let v=e.scales[e.axes[n].scale].asinh,s=r>v?qd(e,n,ui(v,t),r,c):[v],d=r>=0&&t<=0?[0]:[];return(t<-v?qd(e,n,ui(v,-r),-t,c):[v]).reverse().map(a=>-a).concat(d,s)}const xb=/./,zE=/[12357]/,BE=/[125]/,Cb=/1/,Yd=(e,n,t,r)=>e.map((c,u)=>n==4&&c==0||u%r==0&&t.test(c.toExponential()[c<0?1:0])?c:null);function FE(e,n,t,r,c){let u=e.axes[t],g=u.scale,v=e.scales[g],s=e.valToPos,d=u._space,a=s(10,g),l=s(9,g)-a>=d?xb:s(7,g)-a>=d?zE:s(5,g)-a>=d?BE:Cb;if(l==Cb){let h=Cr(s(1,g)-a);if(h<d)return Yd(n.slice().reverse(),v.distr,l,co(d/h)).reverse()}return Yd(n,v.distr,l,1)}function jE(e,n,t,r,c){let u=e.axes[t],g=u.scale,v=u._space,s=e.valToPos,d=Cr(s(1,g)-s(2,g));return d<v?Yd(n.slice().reverse(),3,xb,co(v/d)).reverse():n}function WE(e,n,t,r){return r==null?Td:n==null?"":Dd(n)}const kb={show:!0,scale:"y",stroke:Ad,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:vb,side:3,grid:Vd,ticks:gb,border:mb,font:Gd,lineGap:yb,rotate:0};function HE(e,n){let t=3+(e||1)*2;return Rn(t*n,3)}function UE(e,n){let{scale:t,idxs:r}=e.series[0],c=e._data[0],u=e.valToPos(c[r[0]],t,!0),g=e.valToPos(c[r[1]],t,!0),v=Cr(g-u),s=e.series[n],d=v/(s.points.space*bn);return r[1]-r[0]<=d}const _b={scale:null,auto:!0,sorted:0,min:Mn,max:-Mn},Ab=(e,n,t,r,c)=>c,$b={show:!0,auto:!0,sorted:0,gaps:Ab,alpha:1,facets:[pr({},_b,{scale:"x"}),pr({},_b,{scale:"y"})]},Sb={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Ab,alpha:1,points:{show:UE,filter:null},values:null,min:Mn,max:-Mn,idxs:[],path:null,clip:null};function VE(e,n,t,r,c){return t/10}const Tb={time:mT,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},GE=pr({},Tb,{time:!1,ori:1}),Eb={};function Ib(e,n){let t=Eb[e];return t||(t={key:e,plots:[],sub(r){t.plots.push(r)},unsub(r){t.plots=t.plots.filter(c=>c!=r)},pub(r,c,u,g,v,s,d){for(let a=0;a<t.plots.length;a++)t.plots[a]!=c&&t.plots[a].pub(r,c,u,g,v,s,d)}},e!=null&&(Eb[e]=t)),t}const nl=1,Kd=2;function ya(e,n,t){const r=e.mode,c=e.series[n],u=r==2?e._data[n]:e._data,g=e.scales,v=e.bbox;let s=u[0],d=r==2?u[1]:u[n],a=r==2?g[c.facets[0].scale]:g[e.series[0].scale],l=r==2?g[c.facets[1].scale]:g[c.scale],h=v.left,p=v.top,o=v.width,f=v.height,m=e.valToPosH,w=e.valToPosV;return a.ori==0?t(c,s,d,a,l,m,w,h,p,o,f,Cu,rl,_u,Lb,Nb):t(c,s,d,a,l,w,m,p,h,f,o,ku,il,Zd,Ob,Db)}function Jd(e,n){let t=0,r=0,c=mn(e.bands,Bd);for(let u=0;u<c.length;u++){let g=c[u];g.series[0]==n?t=g.dir:g.series[1]==n&&(g.dir==1?r|=1:r|=2)}return[t,r==1?-1:r==2?1:r==3?2:0]}function qE(e,n,t,r,c){let u=e.mode,g=e.series[n],v=u==2?g.facets[1].scale:g.scale,s=e.scales[v];return c==-1?s.min:c==1?s.max:s.distr==3?s.dir==1?s.min:s.max:0}function hs(e,n,t,r,c,u){return ya(e,n,(g,v,s,d,a,l,h,p,o,f,m)=>{let w=g.pxRound;const x=d.dir*(d.ori==0?1:-1),R=d.ori==0?rl:il;let T,_;x==1?(T=t,_=r):(T=r,_=t);let C=w(l(v[T],d,f,p)),P=w(h(s[T],a,m,o)),O=w(l(v[_],d,f,p)),E=w(h(u==1?a.max:a.min,a,m,o)),k=new Path2D(c);return R(k,O,E),R(k,C,E),R(k,C,P),k})}function xu(e,n,t,r,c,u){let g=null;if(e.length>0){g=new Path2D;const v=n==0?_u:Zd;let s=t;for(let l=0;l<e.length;l++){let h=e[l];if(h[1]>h[0]){let p=h[0]-s;p>0&&v(g,s,r,p,r+u),s=h[1]}}let d=t+c-s,a=10;d>0&&v(g,s,r-a/2,d,r+u+a)}return g}function YE(e,n,t){let r=e[e.length-1];r&&r[0]==n?r[1]=t:e.push([n,t])}function Qd(e,n,t,r,c,u,g){let v=[],s=e.length;for(let d=c==1?t:r;d>=t&&d<=r;d+=c)if(n[d]===null){let a=d,l=d;if(c==1)for(;++d<=r&&n[d]===null;)l=d;else for(;--d>=t&&n[d]===null;)l=d;let h=u(e[a]),p=l==a?h:u(e[l]),o=a-c;h=g<=0&&o>=0&&o<s?u(e[o]):h;let f=l+c;p=g>=0&&f>=0&&f<s?u(e[f]):p,p>=h&&v.push([h,p])}return v}function Mb(e){return e==0?Hy:e==1?kr:n=>ma(n,e)}function Rb(e){let n=e==0?Cu:ku,t=e==0?(c,u,g,v,s,d)=>{c.arcTo(u,g,v,s,d)}:(c,u,g,v,s,d)=>{c.arcTo(g,u,s,v,d)},r=e==0?(c,u,g,v,s)=>{c.rect(u,g,v,s)}:(c,u,g,v,s)=>{c.rect(g,u,s,v)};return(c,u,g,v,s,d=0,a=0)=>{d==0&&a==0?r(c,u,g,v,s):(d=Lo(d,v/2,s/2),a=Lo(a,v/2,s/2),n(c,u+d,g),t(c,u+v,g,u+v,g+s,d),t(c,u+v,g+s,u,g+s,a),t(c,u,g+s,u,g,a),t(c,u,g,u+v,g,d),c.closePath())}}const Cu=(e,n,t)=>{e.moveTo(n,t)},ku=(e,n,t)=>{e.moveTo(t,n)},rl=(e,n,t)=>{e.lineTo(n,t)},il=(e,n,t)=>{e.lineTo(t,n)},_u=Rb(0),Zd=Rb(1),Lb=(e,n,t,r,c,u)=>{e.arc(n,t,r,c,u)},Ob=(e,n,t,r,c,u)=>{e.arc(t,n,r,c,u)},Nb=(e,n,t,r,c,u,g)=>{e.bezierCurveTo(n,t,r,c,u,g)},Db=(e,n,t,r,c,u,g)=>{e.bezierCurveTo(t,n,c,r,g,u)};function Pb(e){return(n,t,r,c,u)=>ya(n,t,(g,v,s,d,a,l,h,p,o,f,m)=>{let{pxRound:w,points:x}=g,R,T;d.ori==0?(R=Cu,T=Lb):(R=ku,T=Ob);const _=Rn(x.width*bn,3);let C=(x.size-x.width)/2*bn,P=Rn(C*2,3),O=new Path2D,E=new Path2D,{left:k,top:B,width:N,height:M}=n.bbox;_u(E,k-P,B-P,N+P*2,M+P*2);const $=A=>{if(s[A]!=null){let D=w(l(v[A],d,f,p)),j=w(h(s[A],a,m,o));R(O,D+C,j),T(O,D,j,C,0,gu*2)}};if(u)u.forEach($);else for(let A=r;A<=c;A++)$(A);return{stroke:_>0?O:null,fill:O,clip:E,flags:nl|Kd}})}function zb(e){return(n,t,r,c,u,g)=>{r!=c&&(u!=r&&g!=r&&e(n,t,r),u!=c&&g!=c&&e(n,t,c),e(n,t,g))}}const KE=zb(rl),JE=zb(il);function Bb(e){const n=mn(e?.alignGaps,0);return(t,r,c,u)=>ya(t,r,(g,v,s,d,a,l,h,p,o,f,m)=>{[c,u]=du(s,c,u);let w=g.pxRound,x=N=>w(l(N,d,f,p)),R=N=>w(h(N,a,m,o)),T,_;d.ori==0?(T=rl,_=KE):(T=il,_=JE);const C=d.dir*(d.ori==0?1:-1),P={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:nl},O=P.stroke;let E=!1;if(u-c>=f*4){let N=le=>t.posToVal(le,d.key,!0),M=null,$=null,A,D,j,U=x(v[C==1?c:u]),q=x(v[c]),Q=x(v[u]),re=N(C==1?q+1:Q-1);for(let le=C==1?c:u;le>=c&&le<=u;le+=C){let ne=v[le],ue=(C==1?ne<re:ne>re)?U:x(ne),he=s[le];ue==U?he!=null?(D=he,M==null?(T(O,ue,R(D)),A=M=$=D):D<M?M=D:D>$&&($=D)):he===null&&(E=!0):(M!=null&&_(O,U,R(M),R($),R(A),R(D)),he!=null?(D=he,T(O,ue,R(D)),M=$=A=D):(M=$=null,he===null&&(E=!0)),U=ue,re=N(U+C))}M!=null&&M!=$&&j!=U&&_(O,U,R(M),R($),R(A),R(D))}else for(let N=C==1?c:u;N>=c&&N<=u;N+=C){let M=s[N];M===null?E=!0:M!=null&&T(O,x(v[N]),R(M))}let[k,B]=Jd(t,r);if(g.fill!=null||k!=0){let N=P.fill=new Path2D(O),M=g.fillTo(t,r,g.min,g.max,k),$=R(M),A=x(v[c]),D=x(v[u]);C==-1&&([D,A]=[A,D]),T(N,D,$),T(N,A,$)}if(!g.spanGaps){let N=[];E&&N.push(...Qd(v,s,c,u,C,x,n)),P.gaps=N=g.gaps(t,r,c,u,N),P.clip=xu(N,d.ori,p,o,f,m)}return B!=0&&(P.band=B==2?[hs(t,r,c,u,O,-1),hs(t,r,c,u,O,1)]:hs(t,r,c,u,O,B)),P})}function QE(e){const n=mn(e.align,1),t=mn(e.ascDesc,!1),r=mn(e.alignGaps,0),c=mn(e.extend,!1);return(u,g,v,s)=>ya(u,g,(d,a,l,h,p,o,f,m,w,x,R)=>{[v,s]=du(l,v,s);let T=d.pxRound,{left:_,width:C}=u.bbox,P=Q=>T(o(Q,h,x,m)),O=Q=>T(f(Q,p,R,w)),E=h.ori==0?rl:il;const k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:nl},B=k.stroke,N=h.dir*(h.ori==0?1:-1);let M=O(l[N==1?v:s]),$=P(a[N==1?v:s]),A=$,D=$;c&&n==-1&&(D=_,E(B,D,M)),E(B,$,M);for(let Q=N==1?v:s;Q>=v&&Q<=s;Q+=N){let re=l[Q];if(re==null)continue;let le=P(a[Q]),ne=O(re);n==1?E(B,le,M):E(B,A,ne),E(B,le,ne),M=ne,A=le}let j=A;c&&n==1&&(j=_+C,E(B,j,M));let[U,q]=Jd(u,g);if(d.fill!=null||U!=0){let Q=k.fill=new Path2D(B),re=d.fillTo(u,g,d.min,d.max,U),le=O(re);E(Q,j,le),E(Q,D,le)}if(!d.spanGaps){let Q=[];Q.push(...Qd(a,l,v,s,N,P,r));let re=d.width*bn/2,le=t||n==1?re:-re,ne=t||n==-1?-re:re;Q.forEach(ue=>{ue[0]+=le,ue[1]+=ne}),k.gaps=Q=d.gaps(u,g,v,s,Q),k.clip=xu(Q,h.ori,m,w,x,R)}return q!=0&&(k.band=q==2?[hs(u,g,v,s,B,-1),hs(u,g,v,s,B,1)]:hs(u,g,v,s,B,q)),k})}function Fb(e,n,t,r,c,u,g=Mn){if(e.length>1){let v=null;for(let s=0,d=1/0;s<e.length;s++)if(n[s]!==void 0){if(v!=null){let a=Cr(e[s]-e[v]);a<d&&(d=a,g=Cr(t(e[s],r,c,u)-t(e[v],r,c,u)))}v=s}}return g}function ZE(e){e=e||nc;const n=mn(e.size,[.6,Mn,1]),t=e.align||0,r=e.gap||0;let c=e.radius;c=c==null?[0,0]:typeof c=="number"?[c,0]:c;const u=nn(c),g=1-n[0],v=mn(n[1],Mn),s=mn(n[2],1),d=mn(e.disp,nc),a=mn(e.each,p=>{}),{fill:l,stroke:h}=d;return(p,o,f,m)=>ya(p,o,(w,x,R,T,_,C,P,O,E,k,B)=>{let N=w.pxRound,M=t,$=r*bn,A=v*bn,D=s*bn,j,U;T.ori==0?[j,U]=u(p,o):[U,j]=u(p,o);const q=T.dir*(T.ori==0?1:-1);let Q=T.ori==0?_u:Zd,re=T.ori==0?a:(it,Yt,Fn,Tn,Dn,Vn,Ln)=>{a(it,Yt,Fn,Dn,Tn,Ln,Vn)},le=mn(p.bands,Bd).find(it=>it.series[0]==o),ne=le!=null?le.dir:0,ue=w.fillTo(p,o,w.min,w.max,ne),he=N(P(ue,_,B,E)),oe,ee,ye,we=k,Ae=N(w.width*bn),Je=!1,Be=null,Ye=null,Ze=null,lt=null;l!=null&&(Ae==0||h!=null)&&(Je=!0,Be=l.values(p,o,f,m),Ye=new Map,new Set(Be).forEach(it=>{it!=null&&Ye.set(it,new Path2D)}),Ae>0&&(Ze=h.values(p,o,f,m),lt=new Map,new Set(Ze).forEach(it=>{it!=null&&lt.set(it,new Path2D)})));let{x0:ct,size:jt}=d;if(ct!=null&&jt!=null){M=1,x=ct.values(p,o,f,m),ct.unit==2&&(x=x.map(Yt=>p.posToVal(O+Yt*k,T.key,!0)));let it=jt.values(p,o,f,m);jt.unit==2?ee=it[0]*k:ee=C(it[0],T,k,O)-C(0,T,k,O),we=Fb(x,R,C,T,k,O,we),ye=we-ee+$}else we=Fb(x,R,C,T,k,O,we),ye=we*g+$,ee=we-ye;ye<1&&(ye=0),Ae>=ee/2&&(Ae=0),ye<5&&(N=Hy);let Ie=ye>0,Ct=we-ye-(Ie?Ae:0);ee=N(zd(Ct,D,A)),oe=(M==0?ee/2:M==q?0:ee)-M*q*((M==0?$/2:0)+(Ie?Ae/2:0));const St={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},qt=Je?null:new Path2D;let dn=null;if(le!=null)dn=p.data[le.series[1]];else{let{y0:it,y1:Yt}=d;it!=null&&Yt!=null&&(R=Yt.values(p,o,f,m),dn=it.values(p,o,f,m))}let Sn=j*ee,pt=U*ee;for(let it=q==1?f:m;it>=f&&it<=m;it+=q){let Yt=R[it];if(Yt==null)continue;if(dn!=null){let fn=dn[it]??0;if(Yt-fn==0)continue;he=P(fn,_,B,E)}let Fn=T.distr!=2||d!=null?x[it]:it,Tn=C(Fn,T,k,O),Dn=P(mn(Yt,ue),_,B,E),Vn=N(Tn-oe),Ln=N(ui(Dn,he)),Gn=N(Lo(Dn,he)),er=Ln-Gn;if(Yt!=null){let fn=Yt<0?pt:Sn,Pn=Yt<0?Sn:pt;Je?(Ae>0&&Ze[it]!=null&&Q(lt.get(Ze[it]),Vn,Gn+Gi(Ae/2),ee,ui(0,er-Ae),fn,Pn),Be[it]!=null&&Q(Ye.get(Be[it]),Vn,Gn+Gi(Ae/2),ee,ui(0,er-Ae),fn,Pn)):Q(qt,Vn,Gn+Gi(Ae/2),ee,ui(0,er-Ae),fn,Pn),re(p,o,it,Vn-Ae/2,Gn,ee+Ae,er)}}return Ae>0?St.stroke=Je?lt:qt:Je||(St._fill=w.width==0?w._fill:w._stroke??w._fill,St.width=0),St.fill=Je?Ye:qt,St})}function XE(e,n){const t=mn(n?.alignGaps,0);return(r,c,u,g)=>ya(r,c,(v,s,d,a,l,h,p,o,f,m,w)=>{[u,g]=du(d,u,g);let x=v.pxRound,R=j=>x(h(j,a,m,o)),T=j=>x(p(j,l,w,f)),_,C,P;a.ori==0?(_=Cu,P=rl,C=Nb):(_=ku,P=il,C=Db);const O=a.dir*(a.ori==0?1:-1);let E=R(s[O==1?u:g]),k=E,B=[],N=[];for(let j=O==1?u:g;j>=u&&j<=g;j+=O)if(d[j]!=null){let U=s[j],q=R(U);B.push(k=q),N.push(T(d[j]))}const M={stroke:e(B,N,_,P,C,x),fill:null,clip:null,band:null,gaps:null,flags:nl},$=M.stroke;let[A,D]=Jd(r,c);if(v.fill!=null||A!=0){let j=M.fill=new Path2D($),U=v.fillTo(r,c,v.min,v.max,A),q=T(U);P(j,k,q),P(j,E,q)}if(!v.spanGaps){let j=[];j.push(...Qd(s,d,u,g,O,R,t)),M.gaps=j=v.gaps(r,c,u,g,j),M.clip=xu(j,a.ori,o,f,m,w)}return D!=0&&(M.band=D==2?[hs(r,c,u,g,$,-1),hs(r,c,u,g,$,1)]:hs(r,c,u,g,$,D)),M})}function eI(e){return XE(tI,e)}function tI(e,n,t,r,c,u){const g=e.length;if(g<2)return null;const v=new Path2D;if(t(v,e[0],n[0]),g==2)r(v,e[1],n[1]);else{let s=Array(g),d=Array(g-1),a=Array(g-1),l=Array(g-1);for(let h=0;h<g-1;h++)a[h]=n[h+1]-n[h],l[h]=e[h+1]-e[h],d[h]=a[h]/l[h];s[0]=d[0];for(let h=1;h<g-1;h++)d[h]===0||d[h-1]===0||d[h-1]>0!=d[h]>0?s[h]=0:(s[h]=3*(l[h-1]+l[h])/((2*l[h]+l[h-1])/d[h-1]+(l[h]+2*l[h-1])/d[h]),isFinite(s[h])||(s[h]=0));s[g-1]=d[g-2];for(let h=0;h<g-1;h++)c(v,e[h]+l[h]/3,n[h]+s[h]*l[h]/3,e[h+1]-l[h]/3,n[h+1]-s[h+1]*l[h]/3,e[h+1],n[h+1])}return v}const Xd=new Set;function jb(){for(let e of Xd)e.syncRect(!0)}Ja&&(pa(NT,Qa,jb),pa(DT,Qa,jb,!0),pa(uu,Qa,()=>{Jr.pxRatio=bn}));const nI=Bb(),rI=Pb();function Wb(e,n,t,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((c,u)=>ef(c,u,n,t))}function iI(e,n){return e.map((t,r)=>r==0?{}:pr({},n,t))}function ef(e,n,t,r){return pr({},n==0?t:r,e)}function Hb(e,n,t){return n==null?Xa:[n,t]}const oI=Hb;function sI(e,n,t){return n==null?Xa:pu(n,t,Nd,!0)}function Ub(e,n,t,r){return n==null?Xa:fu(n,t,e.scales[r].log,!1)}const aI=Ub;function Vb(e,n,t,r){return n==null?Xa:Od(n,t,e.scales[r].log,!1)}const lI=Vb;function cI(e,n,t,r,c){let u=ui(jy(e),jy(n)),g=n-e,v=Ro(c/r*g,t);do{let s=t[v],d=r*s/g;if(d>=c&&u+(s<5?Bs.get(s):0)<=17)return[s,d]}while(++v<t.length);return[0,0]}function Gb(e){let n,t;return e=e.replace(/(\d+)px/,(r,c)=>(n=kr((t=+c)*bn))+"px"),[e,n,t]}function uI(e){e.show&&[e.font,e.labelFont].forEach(n=>{let t=Rn(n[2]*bn,1);n[0]=n[0].replace(/[0-9.]+px/,t+"px"),n[1]=t})}function Jr(e,n,t){const r={mode:mn(e.mode,1)},c=r.mode;function u(V,J,ae,ce){let ge=J.valToPct(V);return ce+ae*(J.dir==-1?1-ge:ge)}function g(V,J,ae,ce){let ge=J.valToPct(V);return ce+ae*(J.dir==-1?ge:1-ge)}function v(V,J,ae,ce){return J.ori==0?u(V,J,ae,ce):g(V,J,ae,ce)}r.valToPosH=u,r.valToPosV=g;let s=!1;r.status=0;const d=r.root=lo(vT);if(e.id!=null&&(d.id=e.id),Ui(d,e.class),e.title){let V=lo(wT,d);V.textContent=e.title}const a=Mo("canvas"),l=r.ctx=a.getContext("2d"),h=lo(xT,d);pa("click",h,V=>{V.target===o&&(He!=xe||rt!=Me)&&wn.click(r,V)},!0);const p=r.under=lo(CT,h);h.appendChild(a);const o=r.over=lo(kT,h);e=el(e);const f=+mn(e.pxAlign,1),m=Mb(f);(e.plugins||[]).forEach(V=>{V.opts&&(e=V.opts(r,e)||e)});const w=e.ms||.001,x=r.series=c==1?Wb(e.series||[],wb,Sb,!1):iI(e.series||[null],$b),R=r.axes=Wb(e.axes||[],bb,kb,!0),T=r.scales={},_=r.bands=e.bands||[];_.forEach(V=>{V.fill=nn(V.fill||null),V.dir=mn(V.dir,-1)});const C=c==2?x[1].facets[0].scale:x[0].scale,P={axes:ts,series:Cs},O=(e.drawOrder||["axes","series"]).map(V=>P[V]);function E(V){const J=V.distr==3?ae=>us(ae>0?ae:V.clamp(r,ae,V.min,V.max,V.key)):V.distr==4?ae=>Pd(ae,V.asinh):V.distr==100?ae=>V.fwd(ae):ae=>ae;return ae=>{let ce=J(ae),{_min:ge,_max:Se}=V,Le=Se-ge;return(ce-ge)/Le}}function k(V){let J=T[V];if(J==null){let ae=(e.scales||nc)[V]||nc;if(ae.from!=null){k(ae.from);let ce=pr({},T[ae.from],ae,{key:V});ce.valToPct=E(ce),T[V]=ce}else{J=T[V]=pr({},V==C?Tb:GE,ae),J.key=V;let ce=J.time,ge=J.range,Se=Fs(ge);if((V!=C||c==2&&!ce)&&(Se&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Py:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Py:{mode:1,hard:ge[1],soft:ge[1]}},Se=!1),!Se&&vu(ge))){let Le=ge;ge=(Ue,qe,Qe)=>qe==null?Xa:pu(qe,Qe,Le)}J.range=nn(ge||(ce?oI:V==C?J.distr==3?aI:J.distr==4?lI:Hb:J.distr==3?Ub:J.distr==4?Vb:sI)),J.auto=nn(Se?!1:J.auto),J.clamp=nn(J.clamp||VE),J._min=J._max=null,J.valToPct=E(J)}}}k("x"),k("y"),c==1&&x.forEach(V=>{k(V.scale)}),R.forEach(V=>{k(V.scale)});for(let V in e.scales)k(V);const B=T[C],N=B.distr;let M,$;B.ori==0?(Ui(d,yT),M=u,$=g):(Ui(d,bT),M=g,$=u);const A={};for(let V in T){let J=T[V];(J.min!=null||J.max!=null)&&(A[V]={min:J.min,max:J.max},J.min=J.max=null)}const D=e.tzDate||(V=>new Date(kr(V/w))),j=e.fmtDate||Fd,U=w==1?yE(D):xE(D),q=hb(D,ub(w==1?vE:wE,j)),Q=fb(D,db(kE,j)),re=[],le=r.legend=pr({},$E,e.legend),ne=r.cursor=pr({},RE,{drag:{y:c==2}},e.cursor),ue=le.show,he=ne.show,oe=le.markers;le.idxs=re,oe.width=nn(oe.width),oe.dash=nn(oe.dash),oe.stroke=nn(oe.stroke),oe.fill=nn(oe.fill);let ee,ye,we,Ae=[],Je=[],Be,Ye=!1,Ze={};if(le.live){const V=x[1]?x[1].values:null;Ye=V!=null,Be=Ye?V(r,1,0):{_:0};for(let J in Be)Ze[J]=Td}if(ue)if(ee=Mo("table",ET,d),we=Mo("tbody",null,ee),le.mount(r,ee),Ye){ye=Mo("thead",null,ee,we);let V=Mo("tr",null,ye);Mo("th",null,V);for(var lt in Be)Mo("th",xy,V).textContent=lt}else Ui(ee,MT),le.live&&Ui(ee,IT);const ct={show:!0},jt={show:!1};function Ie(V,J){if(J==0&&(Ye||!le.live||c==2))return Xa;let ae=[],ce=Mo("tr",RT,we,we.childNodes[J]);Ui(ce,V.class),V.show||Ui(ce,fa);let ge=Mo("th",null,ce);if(oe.show){let Ue=lo(LT,ge);if(J>0){let qe=oe.width(r,J);qe&&(Ue.style.border=qe+"px "+oe.dash(r,J)+" "+oe.stroke(r,J)),Ue.style.background=oe.fill(r,J)}}let Se=lo(xy,ge);V.label instanceof HTMLElement?Se.appendChild(V.label):Se.textContent=V.label,J>0&&(oe.show||(Se.style.color=V.width>0?oe.stroke(r,J):oe.fill(r,J)),St("click",ge,Ue=>{if(ne._lock)return;Mi(Ue);let qe=x.indexOf(V);if((Ue.ctrlKey||Ue.metaKey)!=le.isolate){let Qe=x.some((ot,ht)=>ht>0&&ht!=qe&&ot.show);x.forEach((ot,ht)=>{ht>0&&yr(ht,Qe?ht==qe?ct:jt:ct,!0,Lt.setSeries)})}else yr(qe,{show:!V.show},!0,Lt.setSeries)},!1),Or&&St(Ay,ge,Ue=>{ne._lock||(Mi(Ue),yr(x.indexOf(V),Co,!0,Lt.setSeries))},!1));for(var Le in Be){let Ue=Mo("td",OT,ce);Ue.textContent="--",ae.push(Ue)}return[ce,ae]}const Ct=new Map;function St(V,J,ae,ce=!0){const ge=Ct.get(J)||{},Se=ne.bind[V](r,J,ae,ce);Se&&(pa(V,J,ge[V]=Se),Ct.set(J,ge))}function qt(V,J,ae){const ce=Ct.get(J)||{};for(let ge in ce)(V==null||ge==V)&&(Ld(ge,J,ce[ge]),delete ce[ge]);V==null&&Ct.delete(J)}let dn=0,Sn=0,pt=0,it=0,Yt=0,Fn=0,Tn=Yt,Dn=Fn,Vn=pt,Ln=it,Gn=0,er=0,fn=0,Pn=0;r.bbox={};let Ei=!1,Xr=!1,ei=!1,Ii=!1,fo=!1,vr=!1;function Ji(V,J,ae){(ae||V!=r.width||J!=r.height)&&jr(V,J),ni(!1),ei=!0,Xr=!0,Xi()}function jr(V,J){r.width=dn=pt=V,r.height=Sn=it=J,Yt=Fn=0,gs(),Ko();let ae=r.bbox;Gn=ae.left=ma(Yt*bn,.5),er=ae.top=ma(Fn*bn,.5),fn=ae.width=ma(pt*bn,.5),Pn=ae.height=ma(it*bn,.5)}const po=3;function ur(){let V=!1,J=0;for(;!V;){J++;let ae=wo(J),ce=Pr(J);V=J==po||ae&&ce,V||(jr(r.width,r.height),Xr=!0)}}function Us({width:V,height:J}){Ji(V,J)}r.setSize=Us;function gs(){let V=!1,J=!1,ae=!1,ce=!1;R.forEach((ge,Se)=>{if(ge.show&&ge._show){let{side:Le,_size:Ue}=ge,qe=Le%2,Qe=ge.label!=null?ge.labelSize:0,ot=Ue+Qe;ot>0&&(qe?(pt-=ot,Le==3?(Yt+=ot,ce=!0):ae=!0):(it-=ot,Le==0?(Fn+=ot,V=!0):J=!0))}}),fi[0]=V,fi[1]=ae,fi[2]=J,fi[3]=ce,pt-=Nr[1]+Nr[3],Yt+=Nr[3],it-=Nr[2]+Nr[0],Fn+=Nr[0]}function Ko(){let V=Yt+pt,J=Fn+it,ae=Yt,ce=Fn;function ge(Se,Le){switch(Se){case 1:return V+=Le,V-Le;case 2:return J+=Le,J-Le;case 3:return ae-=Le,ae+Le;case 0:return ce-=Le,ce+Le}}R.forEach((Se,Le)=>{if(Se.show&&Se._show){let Ue=Se.side;Se._pos=ge(Ue,Se._size),Se.label!=null&&(Se._lpos=ge(Ue,Se.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,J=V.skip=new Set(V.skip??[]);J.add(void 0);let ae=V.prox=nn(V.prox),ce=V.bias??=0;ne.dataIdx=(ge,Se,Le,Ue)=>{if(Se==0)return Le;let qe=Le,Qe=ae(ge,Se,Le,Ue)??Mn,ot=Qe>=0&&Qe<Mn,ht=B.ori==0?pt:it,Rt=ne.left,gn=n[0],Jt=n[Se];if(J.has(Jt[Le])){qe=null;let Mt=null,At=null,bt;if(ce==0||ce==-1)for(bt=Le;Mt==null&&bt-- >0;)J.has(Jt[bt])||(Mt=bt);if(ce==0||ce==1)for(bt=Le;At==null&&bt++<Jt.length;)J.has(Jt[bt])||(At=bt);if(Mt!=null||At!=null)if(ot){let On=Mt==null?-1/0:M(gn[Mt],B,ht,0),Zn=At==null?1/0:M(gn[At],B,ht,0),wr=Rt-On,kn=Zn-Rt;wr<=kn?wr<=Qe&&(qe=Mt):kn<=Qe&&(qe=At)}else qe=At==null?Mt:Mt==null?At:Le-Mt<=At-Le?Mt:At}else ot&&Cr(Rt-M(gn[Le],B,ht,0))>Qe&&(qe=null);return qe}}const Mi=V=>{ne.event=V};ne.idxs=re,ne._lock=!1;let qn=ne.points;qn.show=nn(qn.show),qn.size=nn(qn.size),qn.stroke=nn(qn.stroke),qn.width=nn(qn.width),qn.fill=nn(qn.fill);const Ar=r.focus=pr({},e.focus||{alpha:.3},ne.focus),Or=Ar.prox>=0,vn=Or&&qn.one;let jn=[],Ri=[],di=[];function ms(V,J){let ae=qn.show(r,J);if(ae instanceof HTMLElement)return Ui(ae,TT),Ui(ae,V.class),Yo(ae,-10,-10,pt,it),o.insertBefore(ae,jn[J]),ae}function vs(V,J){if(c==1||J>0){let ae=c==1&&T[V.scale].time,ce=V.value;V.value=ae?Jy(ce)?fb(D,db(ce,j)):ce||Q:ce||WE,V.label=V.label||(ae?OE:LE)}if(vn||J>0){V.width=V.width==null?1:V.width,V.paths=V.paths||nI||GT,V.fillTo=nn(V.fillTo||qE),V.pxAlign=+mn(V.pxAlign,f),V.pxRound=Mb(V.pxAlign),V.stroke=nn(V.stroke||null),V.fill=nn(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ae=HE(ui(1,V.width),1),ce=V.points=pr({},{size:ae,width:ui(1,ae*.2),stroke:V.stroke,space:ae*2,paths:rI,_stroke:null,_fill:null},V.points);ce.show=nn(ce.show),ce.filter=nn(ce.filter),ce.fill=nn(ce.fill),ce.stroke=nn(ce.stroke),ce.paths=nn(ce.paths),ce.pxAlign=V.pxAlign}if(ue){let ae=Ie(V,J);Ae.splice(J,0,ae[0]),Je.splice(J,0,ae[1]),le.values.push(null)}if(he){re.splice(J,0,null);let ae=null;vn?J==0&&(ae=ms(V,J)):J>0&&(ae=ms(V,J)),jn.splice(J,0,ae),Ri.splice(J,0,0),di.splice(J,0,0)}ft("addSeries",J)}function ys(V,J){J=J??x.length,V=c==1?ef(V,J,wb,Sb):ef(V,J,{},$b),x.splice(J,0,V),vs(x[J],J)}r.addSeries=ys;function bs(V){if(x.splice(V,1),ue){le.values.splice(V,1),Je.splice(V,1);let J=Ae.splice(V,1)[0];qt(null,J.firstChild),J.remove()}he&&(re.splice(V,1),jn.splice(V,1)[0].remove(),Ri.splice(V,1),di.splice(V,1)),ft("delSeries",V)}r.delSeries=bs;const fi=[!1,!1,!1,!1];function Li(V,J){if(V._show=V.show,V.show){let ae=V.side%2,ce=T[V.scale];ce==null&&(V.scale=ae?x[1].scale:C,ce=T[V.scale]);let ge=ce.time;V.size=nn(V.size),V.space=nn(V.space),V.rotate=nn(V.rotate),Fs(V.incrs)&&V.incrs.forEach(Le=>{!Bs.has(Le)&&Bs.set(Le,Yy(Le))}),V.incrs=nn(V.incrs||(ce.distr==2?pE:ge?w==1?mE:bE:va)),V.splits=nn(V.splits||(ge&&ce.distr==1?U:ce.distr==3?qd:ce.distr==4?PE:DE)),V.stroke=nn(V.stroke),V.grid.stroke=nn(V.grid.stroke),V.ticks.stroke=nn(V.ticks.stroke),V.border.stroke=nn(V.border.stroke);let Se=V.values;V.values=Fs(Se)&&!Fs(Se[0])?nn(Se):ge?Fs(Se)?hb(D,ub(Se,j)):Jy(Se)?CE(D,Se):Se||q:Se||NE,V.filter=nn(V.filter||(ce.distr>=3&&ce.log==10?FE:ce.distr==3&&ce.log==2?jE:Uy)),V.font=Gb(V.font),V.labelFont=Gb(V.labelFont),V._size=V.size(r,null,J,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(fi[J]=!0,V._el=lo(_T,h))}}function Pt(V,J,ae,ce){let[ge,Se,Le,Ue]=ae,qe=J%2,Qe=0;return qe==0&&(Ue||Se)&&(Qe=J==0&&!ge||J==2&&!Le?kr(bb.size/3):0),qe==1&&(ge||Le)&&(Qe=J==1&&!Se||J==3&&!Ue?kr(kb.size/2):0),Qe}const Vs=r.padding=(e.padding||[Pt,Pt,Pt,Pt]).map(V=>nn(mn(V,Pt))),Nr=r._padding=Vs.map((V,J)=>V(r,J,fi,0));let zt,pn=null,Yn=null;const go=c==1?x[0].idxs:null;let tr=null,mo=!1;function Oi(V,J){if(n=V??[],r.data=r._data=n,c==2){zt=0;for(let ae=1;ae<x.length;ae++)zt+=n[ae][0].length}else{n.length==0&&(r.data=r._data=n=[[]]),tr=n[0],zt=tr.length;let ae=n;if(N==2){ae=n.slice();let ce=ae[0]=Array(zt);for(let ge=0;ge<zt;ge++)ce[ge]=ge}r._data=n=ae}if(ni(!0),ft("setData"),N==2&&(ei=!0),J!==!1){let ae=B;ae.auto(r,mo)?ws():ri(C,ae.min,ae.max),Ii=Ii||ne.left>=0,vr=!0,Xi()}}r.setData=Oi;function ws(){mo=!0;let V,J;c==1&&(zt>0?(pn=go[0]=0,Yn=go[1]=zt-1,V=n[0][pn],J=n[0][Yn],N==2?(V=pn,J=Yn):V==J&&(N==3?[V,J]=fu(V,V,B.log,!1):N==4?[V,J]=Od(V,V,B.log,!1):B.time?J=V+kr(86400/w):[V,J]=pu(V,J,Nd,!0))):(pn=go[0]=V=null,Yn=go[1]=J=null)),ri(C,V,J)}let vo,pi,Do,ti,Dr,yo,Ni,Jo,Po,nr;function zo(V,J,ae,ce,ge,Se){V??=ky,ae??=Bd,ce??="butt",ge??=ky,Se??="round",V!=vo&&(l.strokeStyle=vo=V),ge!=pi&&(l.fillStyle=pi=ge),J!=Do&&(l.lineWidth=Do=J),Se!=Dr&&(l.lineJoin=Dr=Se),ce!=yo&&(l.lineCap=yo=ce),ae!=ti&&l.setLineDash(ti=ae)}function Qo(V,J,ae,ce){J!=pi&&(l.fillStyle=pi=J),V!=Ni&&(l.font=Ni=V),ae!=Jo&&(l.textAlign=Jo=ae),ce!=Po&&(l.textBaseline=Po=ce)}function Qi(V,J,ae,ce,ge=0){if(ce.length>0&&V.auto(r,mo)&&(J==null||J.min==null)){let Se=mn(pn,0),Le=mn(Yn,ce.length-1),Ue=ae.min==null?FT(ce,Se,Le,ge,V.distr==3):[ae.min,ae.max];V.min=Lo(V.min,ae.min=Ue[0]),V.max=ui(V.max,ae.max=Ue[1])}}const xs={min:null,max:null};function Zo(){for(let ce in T){let ge=T[ce];A[ce]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,mo))&&(A[ce]=xs)}for(let ce in T){let ge=T[ce];A[ce]==null&&ge.from!=null&&A[ge.from]!=null&&(A[ce]=xs)}A[C]!=null&&ni(!0);let V={};for(let ce in A){let ge=A[ce];if(ge!=null){let Se=V[ce]=el(T[ce],KT);if(ge.min!=null)pr(Se,ge);else if(ce!=C||c==2)if(zt==0&&Se.from==null){let Le=Se.range(r,null,null,ce);Se.min=Le[0],Se.max=Le[1]}else Se.min=Mn,Se.max=-Mn}}if(zt>0){x.forEach((ce,ge)=>{if(c==1){let Se=ce.scale,Le=A[Se];if(Le==null)return;let Ue=V[Se];if(ge==0){let qe=Ue.range(r,Ue.min,Ue.max,Se);Ue.min=qe[0],Ue.max=qe[1],pn=Ro(Ue.min,n[0]),Yn=Ro(Ue.max,n[0]),Yn-pn>1&&(n[0][pn]<Ue.min&&pn++,n[0][Yn]>Ue.max&&Yn--),ce.min=tr[pn],ce.max=tr[Yn]}else ce.show&&ce.auto&&Qi(Ue,Le,ce,n[ge],ce.sorted);ce.idxs[0]=pn,ce.idxs[1]=Yn}else if(ge>0&&ce.show&&ce.auto){let[Se,Le]=ce.facets,Ue=Se.scale,qe=Le.scale,[Qe,ot]=n[ge],ht=V[Ue],Rt=V[qe];ht!=null&&Qi(ht,A[Ue],Se,Qe,Se.sorted),Rt!=null&&Qi(Rt,A[qe],Le,ot,Le.sorted),ce.min=Le.min,ce.max=Le.max}});for(let ce in V){let ge=V[ce],Se=A[ce];if(ge.from==null&&(Se==null||Se.min==null)){let Le=ge.range(r,ge.min==Mn?null:ge.min,ge.max==-Mn?null:ge.max,ce);ge.min=Le[0],ge.max=Le[1]}}}for(let ce in V){let ge=V[ce];if(ge.from!=null){let Se=V[ge.from];if(Se.min==null)ge.min=ge.max=null;else{let Le=ge.range(r,Se.min,Se.max,ce);ge.min=Le[0],ge.max=Le[1]}}}let J={},ae=!1;for(let ce in V){let ge=V[ce],Se=T[ce];if(Se.min!=ge.min||Se.max!=ge.max){Se.min=ge.min,Se.max=ge.max;let Le=Se.distr;Se._min=Le==3?us(Se.min):Le==4?Pd(Se.min,Se.asinh):Le==100?Se.fwd(Se.min):Se.min,Se._max=Le==3?us(Se.max):Le==4?Pd(Se.max,Se.asinh):Le==100?Se.fwd(Se.max):Se.max,J[ce]=ae=!0}}if(ae){x.forEach((ce,ge)=>{c==2?ge>0&&J.y&&(ce._paths=null):J[ce.scale]&&(ce._paths=null)});for(let ce in J)ei=!0,ft("setScale",ce);he&&ne.left>=0&&(Ii=vr=!0)}for(let ce in A)A[ce]=null}function Bo(V){let J=zd(pn-1,0,zt-1),ae=zd(Yn+1,0,zt-1);for(;V[J]==null&&J>0;)J--;for(;V[ae]==null&&ae<zt-1;)ae++;return[J,ae]}function Cs(){if(zt>0){let V=x.some(J=>J._focus)&&nr!=Ar.alpha;V&&(l.globalAlpha=nr=Ar.alpha),x.forEach((J,ae)=>{if(ae>0&&J.show&&(Xo(ae,!1),Xo(ae,!0),J._paths==null)){let ce=nr;nr!=J.alpha&&(l.globalAlpha=nr=J.alpha);let ge=c==2?[0,n[ae][0].length-1]:Bo(n[ae]);J._paths=J.paths(r,ae,ge[0],ge[1]),nr!=ce&&(l.globalAlpha=nr=ce)}}),x.forEach((J,ae)=>{if(ae>0&&J.show){let ce=nr;nr!=J.alpha&&(l.globalAlpha=nr=J.alpha),J._paths!=null&&es(ae,!1);{let ge=J._paths!=null?J._paths.gaps:null,Se=J.points.show(r,ae,pn,Yn,ge),Le=J.points.filter(r,ae,Se,ge);(Se||Le)&&(J.points._paths=J.points.paths(r,ae,pn,Yn,Le),es(ae,!0))}nr!=ce&&(l.globalAlpha=nr=ce),ft("drawSeries",ae)}}),V&&(l.globalAlpha=nr=1)}}function Xo(V,J){let ae=J?x[V].points:x[V];ae._stroke=ae.stroke(r,V),ae._fill=ae.fill(r,V)}function es(V,J){let ae=J?x[V].points:x[V],{stroke:ce,fill:ge,clip:Se,flags:Le,_stroke:Ue=ae._stroke,_fill:qe=ae._fill,_width:Qe=ae.width}=ae._paths;Qe=Rn(Qe*bn,3);let ot=null,ht=Qe%2/2;J&&qe==null&&(qe=Qe>0?"#fff":Ue);let Rt=ae.pxAlign==1&&ht>0;if(Rt&&l.translate(ht,ht),!J){let gn=Gn-Qe/2,Jt=er-Qe/2,Mt=fn+Qe,At=Pn+Qe;ot=new Path2D,ot.rect(gn,Jt,Mt,At)}J?Zi(Ue,Qe,ae.dash,ae.cap,qe,ce,ge,Le,Se):ks(V,Ue,Qe,ae.dash,ae.cap,qe,ce,ge,Le,ot,Se),Rt&&l.translate(-ht,-ht)}function ks(V,J,ae,ce,ge,Se,Le,Ue,qe,Qe,ot){let ht=!1;qe!=0&&_.forEach((Rt,gn)=>{if(Rt.series[0]==V){let Jt=x[Rt.series[1]],Mt=n[Rt.series[1]],At=(Jt._paths||nc).band;Fs(At)&&(At=Rt.dir==1?At[0]:At[1]);let bt,On=null;Jt.show&&At&&WT(Mt,pn,Yn)?(On=Rt.fill(r,gn)||Se,bt=Jt._paths.clip):At=null,Zi(J,ae,ce,ge,On,Le,Ue,qe,Qe,ot,bt,At),ht=!0}}),ht||Zi(J,ae,ce,ge,Se,Le,Ue,qe,Qe,ot)}const Di=nl|Kd;function Zi(V,J,ae,ce,ge,Se,Le,Ue,qe,Qe,ot,ht){zo(V,J,ae,ce,ge),(qe||Qe||ht)&&(l.save(),qe&&l.clip(qe),Qe&&l.clip(Qe)),ht?(Ue&Di)==Di?(l.clip(ht),ot&&l.clip(ot),sr(ge,Le),gi(V,Se,J)):Ue&Kd?(sr(ge,Le),l.clip(ht),gi(V,Se,J)):Ue&nl&&(l.save(),l.clip(ht),ot&&l.clip(ot),sr(ge,Le),l.restore(),gi(V,Se,J)):(sr(ge,Le),gi(V,Se,J)),(qe||Qe||ht)&&l.restore()}function gi(V,J,ae){ae>0&&(J instanceof Map?J.forEach((ce,ge)=>{l.strokeStyle=vo=ge,l.stroke(ce)}):J!=null&&V&&l.stroke(J))}function sr(V,J){J instanceof Map?J.forEach((ae,ce)=>{l.fillStyle=pi=ce,l.fill(ae)}):J!=null&&V&&l.fill(J)}function bo(V,J,ae,ce){let ge=R[V],Se;if(ce<=0)Se=[0,0];else{let Le=ge._space=ge.space(r,V,J,ae,ce),Ue=ge._incrs=ge.incrs(r,V,J,ae,ce,Le);Se=cI(J,ae,Ue,ce,Le)}return ge._found=Se}function Kn(V,J,ae,ce,ge,Se,Le,Ue,qe,Qe){let ot=Le%2/2;f==1&&l.translate(ot,ot),zo(Ue,Le,qe,Qe,Ue),l.beginPath();let ht,Rt,gn,Jt,Mt=ge+(ce==0||ce==3?-Se:Se);ae==0?(Rt=ge,Jt=Mt):(ht=ge,gn=Mt);for(let At=0;At<V.length;At++)J[At]!=null&&(ae==0?ht=gn=V[At]:Rt=Jt=V[At],l.moveTo(ht,Rt),l.lineTo(gn,Jt));l.stroke(),f==1&&l.translate(-ot,-ot)}function wo(V){let J=!0;return R.forEach((ae,ce)=>{if(!ae.show)return;let ge=T[ae.scale];if(ge.min==null){ae._show&&(J=!1,ae._show=!1,ni(!1));return}else ae._show||(J=!1,ae._show=!0,ni(!1));let Se=ae.side,Le=Se%2,{min:Ue,max:qe}=ge,[Qe,ot]=bo(ce,Ue,qe,Le==0?pt:it);if(ot==0)return;let ht=ge.distr==2,Rt=ae._splits=ae.splits(r,ce,Ue,qe,Qe,ot,ht),gn=ge.distr==2?Rt.map(bt=>tr[bt]):Rt,Jt=ge.distr==2?tr[Rt[1]]-tr[Rt[0]]:Qe,Mt=ae._values=ae.values(r,ae.filter(r,gn,ce,ot,Jt),ce,ot,Jt);ae._rotate=Se==2?ae.rotate(r,Mt,ce,ot):0;let At=ae._size;ae._size=co(ae.size(r,Mt,ce,V)),At!=null&&ae._size!=At&&(J=!1)}),J}function Pr(V){let J=!0;return Vs.forEach((ae,ce)=>{let ge=ae(r,ce,fi,V);ge!=Nr[ce]&&(J=!1),Nr[ce]=ge}),J}function ts(){for(let V=0;V<R.length;V++){let J=R[V];if(!J.show||!J._show)continue;let ae=J.side,ce=ae%2,ge,Se,Le=J.stroke(r,V),Ue=ae==0||ae==3?-1:1,[qe,Qe]=J._found;if(J.label!=null){let Ur=J.labelGap*Ue,zn=kr((J._lpos+Ur)*bn);Qo(J.labelFont[0],Le,"center",ae==2?Xl:Cy),l.save(),ce==1?(ge=Se=0,l.translate(zn,kr(er+Pn/2)),l.rotate((ae==3?-gu:gu)/2)):(ge=kr(Gn+fn/2),Se=zn);let ko=Wy(J.label)?J.label(r,V,qe,Qe):J.label;l.fillText(ko,ge,Se),l.restore()}if(Qe==0)continue;let ot=T[J.scale],ht=ce==0?fn:Pn,Rt=ce==0?Gn:er,gn=J._splits,Jt=ot.distr==2?gn.map(Ur=>tr[Ur]):gn,Mt=ot.distr==2?tr[gn[1]]-tr[gn[0]]:qe,At=J.ticks,bt=J.border,On=At.show?At.size:0,Zn=kr(On*bn),wr=kr((J.alignTo==2?J._size-On-J.gap:J.gap)*bn),kn=J._rotate*-gu/180,In=m(J._pos*bn),be=(Zn+wr)*Ue,Re=In+be;Se=ce==0?Re:0,ge=ce==1?Re:0;let Ee=J.font[0],Xe=J.align==1?Ka:J.align==2?_d:kn>0?Ka:kn<0?_d:ce==0?"center":ae==3?_d:Ka,_t=kn||ce==1?"middle":ae==2?Xl:Cy;Qo(Ee,Le,Xe,_t);let Dt=J.font[1]*J.lineGap,yn=gn.map(Ur=>m(v(Ur,ot,ht,Rt))),Qt=J._values;for(let Ur=0;Ur<Qt.length;Ur++){let zn=Qt[Ur];if(zn!=null){ce==0?ge=yn[Ur]:Se=yn[Ur],zn=""+zn;let ko=zn.indexOf(`
1480
+ `)==-1?[zn]:zn.split(/\n/gm);for(let Vr=0;Vr<ko.length;Vr++){let _s=ko[Vr];kn?(l.save(),l.translate(ge,Se+Vr*Dt),l.rotate(kn),l.fillText(_s,0,0),l.restore()):l.fillText(_s,ge,Se+Vr*Dt)}}}At.show&&Kn(yn,At.filter(r,Jt,V,Qe,Mt),ce,ae,In,Zn,Rn(At.width*bn,3),At.stroke(r,V),At.dash,At.cap);let zi=J.grid;zi.show&&Kn(yn,zi.filter(r,Jt,V,Qe,Mt),ce,ce==0?2:1,ce==0?er:Gn,ce==0?Pn:fn,Rn(zi.width*bn,3),zi.stroke(r,V),zi.dash,zi.cap),bt.show&&Kn([In],[1],ce==0?1:0,ce==0?1:2,ce==1?er:Gn,ce==1?Pn:fn,Rn(bt.width*bn,3),bt.stroke(r,V),bt.dash,bt.cap)}ft("drawAxes")}function ni(V){x.forEach((J,ae)=>{ae>0&&(J._paths=null,V&&(c==1?(J.min=null,J.max=null):J.facets.forEach(ce=>{ce.min=null,ce.max=null})))})}let Fo=!1,jo=!1,Wr=[];function ns(){jo=!1;for(let V=0;V<Wr.length;V++)ft(...Wr[V]);Wr.length=0}function Xi(){Fo||(nE(rs),Fo=!0)}function Ve(V,J=!1){Fo=!0,jo=J,V(r),rs(),J&&Wr.length>0&&queueMicrotask(ns)}r.batch=Ve;function rs(){if(Ei&&(Zo(),Ei=!1),ei&&(ur(),ei=!1),Xr){if(Bn(p,Ka,Yt),Bn(p,Xl,Fn),Bn(p,Ql,pt),Bn(p,Zl,it),Bn(o,Ka,Yt),Bn(o,Xl,Fn),Bn(o,Ql,pt),Bn(o,Zl,it),Bn(h,Ql,dn),Bn(h,Zl,Sn),a.width=kr(dn*bn),a.height=kr(Sn*bn),R.forEach(({_el:V,_show:J,_size:ae,_pos:ce,side:ge})=>{if(V!=null)if(J){let Se=ge===3||ge===0?ae:0,Le=ge%2==1;Bn(V,Le?"left":"top",ce-Se),Bn(V,Le?"width":"height",ae),Bn(V,Le?"top":"left",Le?Fn:Yt),Bn(V,Le?"height":"width",Le?it:pt),Md(V,fa)}else Ui(V,fa)}),vo=pi=Do=Dr=yo=Ni=Jo=Po=ti=null,nr=1,F(!0),Yt!=Tn||Fn!=Dn||pt!=Vn||it!=Ln){ni(!1);let V=pt/Vn,J=it/Ln;if(he&&!Ii&&ne.left>=0){ne.left*=V,ne.top*=J,mi&&Yo(mi,kr(ne.left),0,pt,it),En&&Yo(En,0,kr(ne.top),pt,it);for(let ae=0;ae<jn.length;ae++){let ce=jn[ae];ce!=null&&(Ri[ae]*=V,di[ae]*=J,Yo(ce,co(Ri[ae]),co(di[ae]),pt,it))}}if(wt.show&&!fo&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=J,wt.height*=J;for(let ae in K)Bn(cn,ae,wt[ae])}Tn=Yt,Dn=Fn,Vn=pt,Ln=it}ft("setSize"),Xr=!1}dn>0&&Sn>0&&(l.clearRect(0,0,a.width,a.height),ft("drawClear"),O.forEach(V=>V()),ft("draw")),wt.show&&fo&&(vi(wt),fo=!1),he&&Ii&&(S(null,!0,!1),Ii=!1),le.show&&le.live&&vr&&(b(),vr=!1),s||(s=!0,r.status=1,ft("ready")),mo=!1,Fo=!1}r.redraw=(V,J)=>{ei=J||!1,V!==!1?ri(C,B.min,B.max):Xi()};function je(V,J){let ae=T[V];if(ae.from==null){if(zt==0){let ce=ae.range(r,J.min,J.max,V);J.min=ce[0],J.max=ce[1]}if(J.min>J.max){let ce=J.min;J.min=J.max,J.max=ce}if(zt>1&&J.min!=null&&J.max!=null&&J.max-J.min<1e-16)return;V==C&&ae.distr==2&&zt>0&&(J.min=Ro(J.min,n[0]),J.max=Ro(J.max,n[0]),J.min==J.max&&J.max++),A[V]=J,Ei=!0,Xi()}}r.setScale=je;let Wn,xo,mi,En,is,X,xe,Me,Oe,Ke,He,rt,sn=!1;const wn=ne.drag;let Ge=wn.x,Wt=wn.y;he&&(ne.x&&(Wn=lo($T,o)),ne.y&&(xo=lo(ST,o)),B.ori==0?(mi=Wn,En=xo):(mi=xo,En=Wn),He=ne.left,rt=ne.top);const wt=r.select=pr({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),cn=wt.show?lo(AT,wt.over?o:p):null;function vi(V,J){if(wt.show){for(let ae in V)wt[ae]=V[ae],ae in K&&Bn(cn,ae,V[ae]);J!==!1&&ft("setSelect")}}r.setSelect=vi;function Kt(V){if(x[V].show)ue&&Md(Ae[V],fa);else if(ue&&Ui(Ae[V],fa),he){let J=vn?jn[0]:jn[V];J!=null&&Yo(J,-10,-10,pt,it)}}function ri(V,J,ae){je(V,{min:J,max:ae})}function yr(V,J,ae,ce){J.focus!=null&&Ia(V),J.show!=null&&x.forEach((ge,Se)=>{Se>0&&(V==Se||V==null)&&(ge.show=J.show,Kt(Se),c==2?(ri(ge.facets[0].scale,null,null),ri(ge.facets[1].scale,null,null)):ri(ge.scale,null,null),Xi())}),ae!==!1&&ft("setSeries",V,J),ce&&Nt("setSeries",r,V,J)}r.setSeries=yr;function Wo(V,J){pr(_[V],J)}function eo(V,J){V.fill=nn(V.fill||null),V.dir=mn(V.dir,-1),J=J??_.length,_.splice(J,0,V)}function Jn(V){V==null?_.length=0:_.splice(V,1)}r.addBand=eo,r.setBand=Wo,r.delBand=Jn;function Gs(V,J){x[V].alpha=J,he&&jn[V]!=null&&(jn[V].style.opacity=J),ue&&Ae[V]&&(Ae[V].style.opacity=J)}let ar,to,no;const Co={focus:!0};function Ia(V){if(V!=no){let J=V==null,ae=Ar.alpha!=1;x.forEach((ce,ge)=>{if(c==1||ge>0){let Se=J||ge==0||ge==V;ce._focus=J?null:Se,ae&&Gs(ge,Se?1:Ar.alpha)}}),no=V,ae&&Xi()}}ue&&Or&&St($y,ee,V=>{ne._lock||(Mi(V),no!=null&&yr(null,Co,!0,Lt.setSeries))});function Cn(V,J,ae){let ce=T[J];ae&&(V=V/bn-(ce.ori==1?Fn:Yt));let ge=pt;ce.ori==1&&(ge=it,V=ge-V),ce.dir==-1&&(V=ge-V);let Se=ce._min,Le=ce._max,Ue=V/ge,qe=Se+(Le-Se)*Ue,Qe=ce.distr;return Qe==3?Za(10,qe):Qe==4?UT(qe,ce.asinh):Qe==100?ce.bwd(qe):qe}function bl(V,J){let ae=Cn(V,C,J);return Ro(ae,n[0],pn,Yn)}r.valToIdx=V=>Ro(V,n[0]),r.posToIdx=bl,r.posToVal=Cn,r.valToPos=(V,J,ae)=>T[J].ori==0?u(V,T[J],ae?fn:pt,ae?Gn:0):g(V,T[J],ae?Pn:it,ae?er:0),r.setCursor=(V,J,ae)=>{He=V.left,rt=V.top,S(null,J,ae)};function $r(V,J){Bn(cn,Ka,wt.left=V),Bn(cn,Ql,wt.width=J)}function ii(V,J){Bn(cn,Xl,wt.top=V),Bn(cn,Zl,wt.height=J)}let os=B.ori==0?$r:ii,Hr=B.ori==1?$r:ii;function Pi(){if(ue&&le.live)for(let V=c==2?1:0;V<x.length;V++){if(V==0&&Ye)continue;let J=le.values[V],ae=0;for(let ce in J)Je[V][ae++].firstChild.nodeValue=J[ce]}}function b(V,J){if(V!=null&&(V.idxs?V.idxs.forEach((ae,ce)=>{re[ce]=ae}):YT(V.idx)||re.fill(V.idx),le.idx=re[0]),ue&&le.live){for(let ae=0;ae<x.length;ae++)(ae>0||c==1&&!Ye)&&I(ae,re[ae]);Pi()}vr=!1,J!==!1&&ft("setLegend")}r.setLegend=b;function I(V,J){let ae=x[V],ce=V==0&&N==2?tr:n[V],ge;Ye?ge=ae.values(r,V,J)??Ze:(ge=ae.value(r,J==null?null:ce[J],V,J),ge=ge==null?Ze:{_:ge}),le.values[V]=ge}function S(V,J,ae){Oe=He,Ke=rt,[He,rt]=ne.move(r,He,rt),ne.left=He,ne.top=rt,he&&(mi&&Yo(mi,kr(He),0,pt,it),En&&Yo(En,0,kr(rt),pt,it));let ce,ge=pn>Yn;ar=Mn,to=null;let Se=B.ori==0?pt:it,Le=B.ori==1?pt:it;if(He<0||zt==0||ge){ce=ne.idx=null;for(let Ue=0;Ue<x.length;Ue++){let qe=jn[Ue];qe!=null&&Yo(qe,-10,-10,pt,it)}Or&&yr(null,Co,!0,V==null&&Lt.setSeries),le.live&&(re.fill(ce),vr=!0)}else{let Ue,qe,Qe;c==1&&(Ue=B.ori==0?He:rt,qe=Cn(Ue,C),ce=ne.idx=Ro(qe,n[0],pn,Yn),Qe=M(n[0][ce],B,Se,0));let ot=-10,ht=-10,Rt=0,gn=0,Jt=!0,Mt="",At="";for(let bt=c==2?1:0;bt<x.length;bt++){let On=x[bt],Zn=re[bt],wr=Zn==null?null:c==1?n[bt][Zn]:n[bt][1][Zn],kn=ne.dataIdx(r,bt,ce,qe),In=kn==null?null:c==1?n[bt][kn]:n[bt][1][kn];if(vr=vr||In!=wr||kn!=Zn,re[bt]=kn,bt>0&&On.show){let be=kn==null?-10:kn==ce?Qe:M(c==1?n[0][kn]:n[bt][0][kn],B,Se,0),Re=In==null?-10:$(In,c==1?T[On.scale]:T[On.facets[1].scale],Le,0);if(Or&&In!=null){let Ee=B.ori==1?He:rt,Xe=Cr(Ar.dist(r,bt,kn,Re,Ee));if(Xe<ar){let _t=Ar.bias;if(_t!=0){let Dt=Cn(Ee,On.scale),yn=In>=0?1:-1,Qt=Dt>=0?1:-1;Qt==yn&&(Qt==1?_t==1?In>=Dt:In<=Dt:_t==1?In<=Dt:In>=Dt)&&(ar=Xe,to=bt)}else ar=Xe,to=bt}}if(vr||vn){let Ee,Xe;B.ori==0?(Ee=be,Xe=Re):(Ee=Re,Xe=be);let _t,Dt,yn,Qt,zi,Ur,zn=!0,ko=qn.bbox;if(ko!=null){zn=!1;let Vr=ko(r,bt);yn=Vr.left,Qt=Vr.top,_t=Vr.width,Dt=Vr.height}else yn=Ee,Qt=Xe,_t=Dt=qn.size(r,bt);if(Ur=qn.fill(r,bt),zi=qn.stroke(r,bt),vn)bt==to&&ar<=Ar.prox&&(ot=yn,ht=Qt,Rt=_t,gn=Dt,Jt=zn,Mt=Ur,At=zi);else{let Vr=jn[bt];Vr!=null&&(Ri[bt]=yn,di[bt]=Qt,Ly(Vr,_t,Dt,zn),My(Vr,Ur,zi),Yo(Vr,co(yn),co(Qt),pt,it))}}}}if(vn){let bt=Ar.prox,On=no==null?ar<=bt:ar>bt||to!=no;if(vr||On){let Zn=jn[0];Zn!=null&&(Ri[0]=ot,di[0]=ht,Ly(Zn,Rt,gn,Jt),My(Zn,Mt,At),Yo(Zn,co(ot),co(ht),pt,it))}}}if(wt.show&&sn)if(V!=null){let[Ue,qe]=Lt.scales,[Qe,ot]=Lt.match,[ht,Rt]=V.cursor.sync.scales,gn=V.cursor.drag;if(Ge=gn._x,Wt=gn._y,Ge||Wt){let{left:Jt,top:Mt,width:At,height:bt}=V.select,On=V.scales[ht].ori,Zn=V.posToVal,wr,kn,In,be,Re,Ee=Ue!=null&&Qe(Ue,ht),Xe=qe!=null&&ot(qe,Rt);Ee&&Ge?(On==0?(wr=Jt,kn=At):(wr=Mt,kn=bt),In=T[Ue],be=M(Zn(wr,ht),In,Se,0),Re=M(Zn(wr+kn,ht),In,Se,0),os(Lo(be,Re),Cr(Re-be))):os(0,Se),Xe&&Wt?(On==1?(wr=Jt,kn=At):(wr=Mt,kn=bt),In=T[qe],be=$(Zn(wr,Rt),In,Le,0),Re=$(Zn(wr+kn,Rt),In,Le,0),Hr(Lo(be,Re),Cr(Re-be))):Hr(0,Le)}else Z()}else{let Ue=Cr(Oe-is),qe=Cr(Ke-X);if(B.ori==1){let Rt=Ue;Ue=qe,qe=Rt}Ge=wn.x&&Ue>=wn.dist,Wt=wn.y&&qe>=wn.dist;let Qe=wn.uni;Qe!=null?Ge&&Wt&&(Ge=Ue>=Qe,Wt=qe>=Qe,!Ge&&!Wt&&(qe>Ue?Wt=!0:Ge=!0)):wn.x&&wn.y&&(Ge||Wt)&&(Ge=Wt=!0);let ot,ht;Ge&&(B.ori==0?(ot=xe,ht=He):(ot=Me,ht=rt),os(Lo(ot,ht),Cr(ht-ot)),Wt||Hr(0,Le)),Wt&&(B.ori==1?(ot=xe,ht=He):(ot=Me,ht=rt),Hr(Lo(ot,ht),Cr(ht-ot)),Ge||os(0,Se)),!Ge&&!Wt&&(os(0,0),Hr(0,0))}if(wn._x=Ge,wn._y=Wt,V==null){if(ae){if(un!=null){let[Ue,qe]=Lt.scales;Lt.values[0]=Ue!=null?Cn(B.ori==0?He:rt,Ue):null,Lt.values[1]=qe!=null?Cn(B.ori==1?He:rt,qe):null}Nt($d,r,He,rt,pt,it,ce)}if(Or){let Ue=ae&&Lt.setSeries,qe=Ar.prox;no==null?ar<=qe&&yr(to,Co,!0,Ue):ar>qe?yr(null,Co,!0,Ue):to!=no&&yr(to,Co,!0,Ue)}}vr&&(le.idx=ce,b()),J!==!1&&ft("setCursor")}let z=null;Object.defineProperty(r,"rect",{get(){return z==null&&F(!1),z}});function F(V=!1){V?z=null:(z=o.getBoundingClientRect(),ft("syncRect",z))}function W(V,J,ae,ce,ge,Se,Le){ne._lock||sn&&V!=null&&V.movementX==0&&V.movementY==0||(G(V,J,ae,ce,ge,Se,Le,!1,V!=null),V!=null?S(null,!0,!0):S(J,!0,!1))}function G(V,J,ae,ce,ge,Se,Le,Ue,qe){if(z==null&&F(!1),Mi(V),V!=null)ae=V.clientX-z.left,ce=V.clientY-z.top;else{if(ae<0||ce<0){He=-10,rt=-10;return}let[Qe,ot]=Lt.scales,ht=J.cursor.sync,[Rt,gn]=ht.values,[Jt,Mt]=ht.scales,[At,bt]=Lt.match,On=J.axes[0].side%2==1,Zn=B.ori==0?pt:it,wr=B.ori==1?pt:it,kn=On?Se:ge,In=On?ge:Se,be=On?ce:ae,Re=On?ae:ce;if(Jt!=null?ae=At(Qe,Jt)?v(Rt,T[Qe],Zn,0):-10:ae=Zn*(be/kn),Mt!=null?ce=bt(ot,Mt)?v(gn,T[ot],wr,0):-10:ce=wr*(Re/In),B.ori==1){let Ee=ae;ae=ce,ce=Ee}}qe&&(J==null||J.cursor.event.type==$d)&&((ae<=1||ae>=pt-1)&&(ae=ma(ae,pt)),(ce<=1||ce>=it-1)&&(ce=ma(ce,it))),Ue?(is=ae,X=ce,[xe,Me]=ne.move(r,ae,ce)):(He=ae,rt=ce)}const K={width:0,height:0,left:0,top:0};function Z(){vi(K,!1)}let se,de,ke,Te;function Ce(V,J,ae,ce,ge,Se,Le){sn=!0,Ge=Wt=wn._x=wn._y=!1,G(V,J,ae,ce,ge,Se,Le,!0,!1),V!=null&&(St(Sd,Ed,$e,!1),Nt(_y,r,xe,Me,pt,it,null));let{left:Ue,top:qe,width:Qe,height:ot}=wt;se=Ue,de=qe,ke=Qe,Te=ot}function $e(V,J,ae,ce,ge,Se,Le){sn=wn._x=wn._y=!1,G(V,J,ae,ce,ge,Se,Le,!1,!0);let{left:Ue,top:qe,width:Qe,height:ot}=wt,ht=Qe>0||ot>0,Rt=se!=Ue||de!=qe||ke!=Qe||Te!=ot;if(ht&&Rt&&vi(wt),wn.setScale&&ht&&Rt){let gn=Ue,Jt=Qe,Mt=qe,At=ot;if(B.ori==1&&(gn=qe,Jt=ot,Mt=Ue,At=Qe),Ge&&ri(C,Cn(gn,C),Cn(gn+Jt,C)),Wt)for(let bt in T){let On=T[bt];bt!=C&&On.from==null&&On.min!=Mn&&ri(bt,Cn(Mt+At,bt),Cn(Mt,bt))}Z()}else ne.lock&&(ne._lock=!ne._lock,S(J,!0,V!=null));V!=null&&(qt(Sd,Ed),Nt(Sd,r,He,rt,pt,it,null))}function Fe(V,J,ae,ce,ge,Se,Le){if(ne._lock)return;Mi(V);let Ue=sn;if(sn){let qe=!0,Qe=!0,ot=10,ht,Rt;B.ori==0?(ht=Ge,Rt=Wt):(ht=Wt,Rt=Ge),ht&&Rt&&(qe=He<=ot||He>=pt-ot,Qe=rt<=ot||rt>=it-ot),ht&&qe&&(He=He<xe?0:pt),Rt&&Qe&&(rt=rt<Me?0:it),S(null,!0,!0),sn=!1}He=-10,rt=-10,re.fill(null),S(null,!0,!0),Ue&&(sn=Ue)}function Pe(V,J,ae,ce,ge,Se,Le){ne._lock||(Mi(V),ws(),Z(),V!=null&&Nt(Sy,r,He,rt,pt,it,null))}function et(){R.forEach(uI),Ji(r.width,r.height,!0)}pa(uu,Qa,et);const kt={};kt.mousedown=Ce,kt.mousemove=W,kt.mouseup=$e,kt.dblclick=Pe,kt.setSeries=(V,J,ae,ce)=>{let ge=Lt.match[2];ae=ge(r,J,ae),ae!=-1&&yr(ae,ce,!0,!1)},he&&(St(_y,o,Ce),St($d,o,W),St(Ay,o,V=>{Mi(V),F(!1)}),St($y,o,Fe),St(Sy,o,Pe),Xd.add(r),r.syncRect=F);const ut=r.hooks=e.hooks||{};function ft(V,J,ae){jo?Wr.push([V,J,ae]):V in ut&&ut[V].forEach(ce=>{ce.call(null,r,J,ae)})}(e.plugins||[]).forEach(V=>{for(let J in V.hooks)ut[J]=(ut[J]||[]).concat(V.hooks[J])});const Hn=(V,J,ae)=>ae,Lt=pr({key:null,setSeries:!1,filters:{pub:Vy,sub:Vy},scales:[C,x[1]?x[1].scale:null],match:[Gy,Gy,Hn],values:[null,null]},ne.sync);Lt.match.length==2&&Lt.match.push(Hn),ne.sync=Lt;const un=Lt.key,Ft=Ib(un);function Nt(V,J,ae,ce,ge,Se,Le){Lt.filters.pub(V,J,ae,ce,ge,Se,Le)&&Ft.pub(V,J,ae,ce,ge,Se,Le)}Ft.sub(r);function br(V,J,ae,ce,ge,Se,Le){Lt.filters.sub(V,J,ae,ce,ge,Se,Le)&&kt[V](null,J,ae,ce,ge,Se,Le)}r.pub=br;function Sr(){Ft.unsub(r),Xd.delete(r),Ct.clear(),Ld(uu,Qa,et),d.remove(),ee?.remove(),ft("destroy")}r.destroy=Sr;function Qn(){ft("init",e,n),Oi(n||e.data,!1),A[C]?je(C,A[C]):ws(),fo=wt.show&&(wt.width>0||wt.height>0),Ii=vr=!0,Ji(e.width,e.height)}return x.forEach(vs),R.forEach(Li),t?t instanceof HTMLElement?(t.appendChild(d),Qn()):t(r,Qn):Qn(),r}Jr.assign=pr,Jr.fmtNum=Dd,Jr.rangeNum=pu,Jr.rangeLog=fu,Jr.rangeAsinh=Od,Jr.orient=ya,Jr.pxRatio=bn,Jr.join=tE,Jr.fmtDate=Fd,Jr.tzDate=dE,Jr.sync=Ib;{Jr.addGap=YE,Jr.clipGaps=xu;let e=Jr.paths={points:Pb};e.linear=Bb,e.stepped=QE,e.bars=ZE,e.spline=eI}var qb,Yb;function hI(){return Yb||(Yb=1,qb=function(e,n,t,r,c){var u,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=e.length)throw new RangeError("invalid lower bound");if(c===void 0)c=e.length-1;else if(c=c|0,c<r||c>=e.length)throw new RangeError("invalid upper bound");for(;r<=c;)if(u=r+(c-r>>>1),g=+t(e[u],n,u,e),g<0)r=u+1;else if(g>0)c=u-1;else return u;return~r}),qb}var dI=hI();const _3=ir("y",lu(dI));var tf,Kb;function fI(){if(Kb)return tf;Kb=1;function e(n,t,r){var c=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var g=Array(u);++c<u;)g[c]=n[c+t];return g}return tf=e,tf}var nf,Jb;function pI(){if(Jb)return nf;Jb=1;var e=fI();function n(t,r,c){var u=t.length;return c=c===void 0?u:c,!r&&c>=u?t:e(t,r,c)}return nf=n,nf}var rf,Qb;function Zb(){if(Qb)return rf;Qb=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",c=n+t+r,u="\\ufe0e\\ufe0f",g="\\u200d",v=RegExp("["+g+e+c+u+"]");function s(d){return v.test(d)}return rf=s,rf}var of,Xb;function gI(){if(Xb)return of;Xb=1;function e(n){return n.split("")}return of=e,of}var sf,e0;function mI(){if(e0)return sf;e0=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",c=n+t+r,u="\\ufe0e\\ufe0f",g="["+e+"]",v="["+c+"]",s="\\ud83c[\\udffb-\\udfff]",d="(?:"+v+"|"+s+")",a="[^"+e+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",o=d+"?",f="["+u+"]?",m="(?:"+p+"(?:"+[a,l,h].join("|")+")"+f+o+")*",w=f+o+m,x="(?:"+[a+v+"?",v,l,h,g].join("|")+")",R=RegExp(s+"(?="+s+")|"+x+w,"g");function T(_){return _.match(R)||[]}return sf=T,sf}var af,t0;function vI(){if(t0)return af;t0=1;var e=gI(),n=Zb(),t=mI();function r(c){return n(c)?t(c):e(c)}return af=r,af}var lf,n0;function yI(){if(n0)return lf;n0=1;var e=typeof zs=="object"&&zs&&zs.Object===Object&&zs;return lf=e,lf}var cf,r0;function bI(){if(r0)return cf;r0=1;var e=yI(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return cf=t,cf}var uf,i0;function hf(){if(i0)return uf;i0=1;var e=bI(),n=e.Symbol;return uf=n,uf}var df,o0;function wI(){if(o0)return df;o0=1;function e(n,t){for(var r=-1,c=n==null?0:n.length,u=Array(c);++r<c;)u[r]=t(n[r],r,n);return u}return df=e,df}var ff,s0;function xI(){if(s0)return ff;s0=1;var e=Array.isArray;return ff=e,ff}var pf,a0;function CI(){if(a0)return pf;a0=1;var e=hf(),n=Object.prototype,t=n.hasOwnProperty,r=n.toString,c=e?e.toStringTag:void 0;function u(g){var v=t.call(g,c),s=g[c];try{g[c]=void 0;var d=!0}catch{}var a=r.call(g);return d&&(v?g[c]=s:delete g[c]),a}return pf=u,pf}var gf,l0;function kI(){if(l0)return gf;l0=1;var e=Object.prototype,n=e.toString;function t(r){return n.call(r)}return gf=t,gf}var mf,c0;function _I(){if(c0)return mf;c0=1;var e=hf(),n=CI(),t=kI(),r="[object Null]",c="[object Undefined]",u=e?e.toStringTag:void 0;function g(v){return v==null?v===void 0?c:r:u&&u in Object(v)?n(v):t(v)}return mf=g,mf}var vf,u0;function AI(){if(u0)return vf;u0=1;function e(n){return n!=null&&typeof n=="object"}return vf=e,vf}var yf,h0;function $I(){if(h0)return yf;h0=1;var e=_I(),n=AI(),t="[object Symbol]";function r(c){return typeof c=="symbol"||n(c)&&e(c)==t}return yf=r,yf}var bf,d0;function SI(){if(d0)return bf;d0=1;var e=hf(),n=wI(),t=xI(),r=$I(),c=e?e.prototype:void 0,u=c?c.toString:void 0;function g(v){if(typeof v=="string")return v;if(t(v))return n(v,g)+"";if(r(v))return u?u.call(v):"";var s=v+"";return s=="0"&&1/v==-1/0?"-0":s}return bf=g,bf}var wf,f0;function Au(){if(f0)return wf;f0=1;var e=SI();function n(t){return t==null?"":e(t)}return wf=n,wf}var xf,p0;function TI(){if(p0)return xf;p0=1;var e=pI(),n=Zb(),t=vI(),r=Au();function c(u){return function(g){g=r(g);var v=n(g)?t(g):void 0,s=v?v[0]:g.charAt(0),d=v?e(v,1).join(""):g.slice(1);return s[u]()+d}}return xf=c,xf}var Cf,g0;function m0(){if(g0)return Cf;g0=1;var e=TI(),n=e("toUpperCase");return Cf=n,Cf}var EI=m0();const II=lu(EI);var kf,v0;function MI(){if(v0)return kf;v0=1;var e=Au(),n=m0();function t(r){return n(e(r).toLowerCase())}return kf=t,kf}var _f,y0;function RI(){if(y0)return _f;y0=1;function e(n,t,r,c){var u=-1,g=n==null?0:n.length;for(c&&g&&(r=n[++u]);++u<g;)r=t(r,n[u],u,n);return r}return _f=e,_f}var Af,b0;function LI(){if(b0)return Af;b0=1;function e(n){return function(t){return n?.[t]}}return Af=e,Af}var $f,w0;function OI(){if(w0)return $f;w0=1;var e=LI(),n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},t=e(n);return $f=t,$f}var Sf,x0;function NI(){if(x0)return Sf;x0=1;var e=OI(),n=Au(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",c="\\ufe20-\\ufe2f",u="\\u20d0-\\u20ff",g=r+c+u,v="["+g+"]",s=RegExp(v,"g");function d(a){return a=n(a),a&&a.replace(t,e).replace(s,"")}return Sf=d,Sf}var Tf,C0;function DI(){if(C0)return Tf;C0=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(t){return t.match(e)||[]}return Tf=n,Tf}var Ef,k0;function PI(){if(k0)return Ef;k0=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(t){return e.test(t)}return Ef=n,Ef}var If,_0;function zI(){if(_0)return If;_0=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",c=n+t+r,u="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",v="\\xac\\xb1\\xd7\\xf7",s="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",a=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",l="A-Z\\xc0-\\xd6\\xd8-\\xde",h="\\ufe0e\\ufe0f",p=v+s+d+a,o="['’]",f="["+p+"]",m="["+c+"]",w="\\d+",x="["+u+"]",R="["+g+"]",T="[^"+e+p+w+u+g+l+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+_+")",P="[^"+e+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",k="["+l+"]",B="\\u200d",N="(?:"+R+"|"+T+")",M="(?:"+k+"|"+T+")",$="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",j="["+h+"]?",U="(?:"+B+"(?:"+[P,O,E].join("|")+")"+j+D+")*",q="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Q="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",re=j+D+U,le="(?:"+[x,O,E].join("|")+")"+re,ne=RegExp([k+"?"+R+"+"+$+"(?="+[f,k,"$"].join("|")+")",M+"+"+A+"(?="+[f,k+N,"$"].join("|")+")",k+"?"+N+"+"+$,k+"+"+A,Q,q,w,le].join("|"),"g");function ue(he){return he.match(ne)||[]}return If=ue,If}var Mf,A0;function BI(){if(A0)return Mf;A0=1;var e=DI(),n=PI(),t=Au(),r=zI();function c(u,g,v){return u=t(u),g=v?void 0:g,g===void 0?n(u)?r(u):e(u):u.match(g)||[]}return Mf=c,Mf}var Rf,$0;function FI(){if($0)return Rf;$0=1;var e=RI(),n=NI(),t=BI(),r="['’]",c=RegExp(r,"g");function u(g){return function(v){return e(t(n(v).replace(c,"")),g,"")}}return Rf=u,Rf}var Lf,S0;function jI(){if(S0)return Lf;S0=1;var e=MI(),n=FI(),t=n(function(r,c,u){return c=c.toLowerCase(),r+(u?e(c):c)});return Lf=t,Lf}var WI=jI();const HI=lu(WI),UI=Object.assign({"./ArrayWidget.vue":()=>vt(()=>gt.import("./ArrayWidget-9OSo49r--b63f7e6bf77a4479ac7b.js"),void 0),"./ArrayplotWidget.vue":()=>vt(()=>gt.import("./ArrayplotWidget-D5C_WTX2-f98bc5cb7b0562f57a8b.js"),void 0),"./BlockWidget.vue":()=>vt(()=>gt.import("./BlockWidget-DuEDZ4dJ-0824686c3ac342317084.js"),void 0),"./ButtonWidget.vue":()=>vt(()=>gt.import("./ButtonWidget-CZIUtd9z-79e715ef7f35635d483f.js"),void 0),"./CanvasWidget.vue":()=>vt(()=>gt.import("./CanvasWidget-C4-pXiKY-155e552f593ab6157896.js"),void 0),"./CanvasdotWidget.vue":()=>vt(()=>gt.import("./CanvasdotWidget-Bh0HHx67-1cd9f78e8bdf8f3abfcd.js"),void 0),"./CanvasimageWidget.vue":()=>vt(()=>gt.import("./CanvasimageWidget-Bu5NmsDs-60dc89c33d7d2f845fe6.js"),void 0),"./CanvasimagevalueWidget.vue":()=>vt(()=>gt.import("./CanvasimagevalueWidget-Dv8dQrnj-d84a6acf0df5ce17287a.js"),void 0),"./CanvaslabelWidget.vue":()=>vt(()=>gt.import("./CanvaslabelWidget-68IeeM3a-20403349bd420ee46330.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>vt(()=>gt.import("./CanvaslabelvalueWidget-C6j_A4z6-5f28ab44c16e551b05ad.js"),void 0),"./CanvaslineWidget.vue":()=>vt(()=>gt.import("./CanvaslineWidget-BgQ6wLDv-4bb1076104920a9f1398.js"),void 0),"./CanvaslinevalueWidget.vue":()=>vt(()=>gt.import("./CanvaslinevalueWidget-C6-HkTJp-4bbd1732ca5dbfd42cd9.js"),void 0),"./CheckbuttonWidget.vue":()=>vt(()=>gt.import("./CheckbuttonWidget-DJmT73t9-0f16b1f225312d647f09.js"),void 0),"./ComboboxWidget.vue":()=>vt(()=>gt.import("./ComboboxWidget-vTtsjxRm-f02c2a116cf0f3786b3c.js"),void 0),"./DateWidget.vue":()=>vt(()=>gt.import("./DateWidget-BjKIDtsf-b824fa1490cc15a1ec25.js"),void 0),"./DynamicWidget.vue":()=>vt(()=>gt.import("./DynamicWidget-yna_ejyc-fe60456e77fd0b43042d.js"),void 0),"./FilechecksumWidget.vue":()=>vt(()=>gt.import("./FilechecksumWidget-obppYSP4-4cca3c7e2468ea5856c4.js"),void 0),"./FiledisplayWidget.vue":()=>vt(()=>gt.import("./FiledisplayWidget-BstroKFo-9c68f076ed09ec63cc16.js"),void 0),"./FormatvalueWidget.vue":()=>vt(()=>gt.import("./FormatvalueWidget-MJIJg6Bf-a85c19eed691e8482446.js"),void 0),"./HorizontalWidget.vue":()=>vt(()=>gt.import("./HorizontalWidget-Cn9qnYVh-c0036ab7dd6e222b6801.js"),void 0),"./HorizontalboxWidget.vue":()=>vt(()=>gt.import("./HorizontalboxWidget-gz8uYYFZ-e626b91ce9fc5dc59307.js"),void 0),"./HorizontallineWidget.vue":()=>vt(()=>gt.import("./HorizontallineWidget-CrDua5-L-89d8e0395552cdabadff.js"),void 0),"./IframeWidget.vue":()=>vt(()=>gt.import("./IframeWidget-CtS7MjKL-ff7d6ae04e519c53884f.js"),void 0),"./ImageviewerWidget.vue":()=>vt(()=>gt.import("./ImageviewerWidget-Kmzt8wuP-f0dbd3dba95361962068.js"),void 0),"./LabelWidget.vue":()=>vt(()=>gt.import("./LabelWidget-DIZpHxYX-8a4eb34ad238e8d7ac51.js"),void 0),"./LabelledWidget.vue":()=>vt(()=>gt.import("./LabelledWidget-CGxDI8XZ-a51c07338535d99c719d.js"),void 0),"./LabelprogressbarWidget.vue":()=>vt(()=>gt.import("./LabelprogressbarWidget-CXOc5p8G-8dc5db3a112e44ae406b.js"),void 0),"./LabelsparklineWidget.vue":()=>vt(()=>gt.import("./LabelsparklineWidget-B_LuqFcA-e2ee90ca47c85e760b20.js"),void 0),"./LabelvalueWidget.vue":()=>vt(()=>gt.import("./LabelvalueWidget--G4wHMZL-e6b09113e4ad2f23f098.js"),void 0),"./LabelvaluedescWidget.vue":()=>vt(()=>gt.import("./LabelvaluedescWidget-DqLK0wvi-35573cdb56bb7f4db56a.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>vt(()=>gt.import("./LabelvaluelimitsbarWidget-BWOQJkLP-9f36e15034ef28601187.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>vt(()=>gt.import("./LabelvaluelimitscolumnWidget-BfF73Y2F-ec9757f289a42952111a.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>vt(()=>gt.import("./LabelvaluerangebarWidget-CKsFRW6t-b3b0b8f355b509a490c5.js"),void 0),"./LedWidget.vue":()=>vt(()=>gt.import("./LedWidget-DrAJ8_fN-1a6e41898187146865b5.js"),void 0),"./LimitsbarWidget.vue":()=>vt(()=>gt.import("./LimitsbarWidget-1IayV5D7-1d00b4075e027a63b362.js"),void 0),"./LimitscolorWidget.vue":()=>vt(()=>gt.import("./LimitscolorWidget-C7LY3BQ7-b7519212dac6268d565d.js"),void 0),"./LimitscolumnWidget.vue":()=>vt(()=>gt.import("./LimitscolumnWidget-JhIc5Sjl-f75a8580fb17d8a9aa76.js"),void 0),"./LinegraphWidget.vue":()=>vt(()=>gt.import("./LinegraphWidget-BaROxuUn-c41ddb04f94577eac1cf.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>vt(()=>gt.import("./MatrixbycolumnsWidget-i0gGPMOV-5e66e42a5ebe115015e1.js"),void 0),"./ProgressbarWidget.vue":()=>vt(()=>gt.import("./ProgressbarWidget-QxEq8C4A-ba568608a03d0623d388.js"),void 0),"./RadiobuttonWidget.vue":()=>vt(()=>gt.import("./RadiobuttonWidget-DYf3qvBq-f8e7a4483d8e58386537.js"),void 0),"./RadiogroupWidget.vue":()=>vt(()=>gt.import("./RadiogroupWidget-C0b_ckej-3e75f46536b7cf154913.js"),void 0),"./RangebarWidget.vue":()=>vt(()=>gt.import("./RangebarWidget-DcSEHktI-4907ae394ecf8c7431d0.js"),void 0),"./RollupWidget.vue":()=>vt(()=>gt.import("./RollupWidget-AVS4drYX-68ea203c4fde2230fc16.js"),void 0),"./ScrollwindowWidget.vue":()=>vt(()=>gt.import("./ScrollwindowWidget-Dpf3BScA-8b23b3bfb3f989697695.js"),void 0),"./SignalWidget.vue":()=>vt(()=>gt.import("./SignalWidget-Q1YtPsNw-a69f8440456233734947.js"),void 0),"./SpacerWidget.vue":()=>vt(()=>gt.import("./SpacerWidget-DGEOqhu_-afce57a24882aa266bf9.js"),void 0),"./SparklineWidget.vue":()=>vt(()=>gt.import("./SparklineWidget-DbNWbNzY-16629f0d1a98b06bd16e.js"),void 0),"./TabbookWidget.vue":()=>vt(()=>gt.import("./TabbookWidget-CrkPPZIF-33a7e08aabbcda9589dd.js"),void 0),"./TextboxWidget.vue":()=>vt(()=>gt.import("./TextboxWidget-CfQEzaRr-89015a64572bbd7d3b2e.js"),void 0),"./TextfieldWidget.vue":()=>vt(()=>gt.import("./TextfieldWidget-BQL8dOTg-8bf1de960c352f347bdb.js"),void 0),"./TimeWidget.vue":()=>vt(()=>gt.import("./TimeWidget-DiE_oc7J-c88d2a6845ec6ee58136.js"),void 0),"./TitleWidget.vue":()=>vt(()=>gt.import("./TitleWidget-C5a_ZsqM-cc8ffe3b7169323b0a0f.js"),void 0),"./ValueWidget.vue":()=>vt(()=>gt.import("./ValueWidget-9JNo-Sk8-da4713bbfd265556e5d7.js"),void 0),"./ValuelimitsbarWidget.vue":()=>vt(()=>gt.import("./ValuelimitsbarWidget-CqiFVnaT-d5f3967e5c32f857fa7e.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>vt(()=>gt.import("./ValuelimitscolumnWidget-DWDFVRNg-de0d55d647bc63fc236a.js"),void 0),"./ValuerangebarWidget.vue":()=>vt(()=>gt.import("./ValuerangebarWidget-BAVMrD0L-e515101dab1cf51e5e15.js"),void 0),"./VerticalWidget.vue":()=>vt(()=>gt.import("./VerticalWidget-Dw0j42K2-a317af9834c4a78dd4ea.js"),void 0),"./VerticalboxWidget.vue":()=>vt(()=>gt.import("./VerticalboxWidget-xusQtXo0-802a9f7db2148a6de00a.js"),void 0)}),VI=Object.entries(UI).reduce((e,[n,t])=>{n=n.split("/").pop();const r=II(HI(n.replace(/\.\w+$/,"")));return{...e,[r]:Ug(t)}},{}),A3=ir("w",{components:VI});function T0(){return Object.assign({},Ga())}function GI(e,n,t){const r=ci(e,t?.in);return r.setTime(r.getTime()+n*au),r}function qI(e,n){const t=()=>qo(n?.in,NaN),r=QI(e);let c;if(r.date){const s=ZI(r.date,2);c=XI(s.restDateString,s.year)}if(!c||isNaN(+c))return t();const u=+c;let g=0,v;if(r.time&&(g=eM(r.time),isNaN(g)))return t();if(r.timezone){if(v=tM(r.timezone),isNaN(v))return t()}else{const s=new Date(u+g),d=ci(0,n?.in);return d.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),d.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),d}return ci(u+g+v,n?.in)}const $u={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},YI=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,KI=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,JI=/^([+-])(\d{2})(?::?(\d{2}))?$/;function QI(e){const n={},t=e.split($u.dateTimeDelimiter);let r;if(t.length>2)return n;if(/:/.test(t[0])?r=t[0]:(n.date=t[0],r=t[1],$u.timeZoneDelimiter.test(n.date)&&(n.date=e.split($u.timeZoneDelimiter)[0],r=e.substr(n.date.length,e.length))),r){const c=$u.timezone.exec(r);c?(n.time=r.replace(c[1],""),n.timezone=c[1]):n.time=r}return n}function ZI(e,n){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=e.match(t);if(!r)return{year:NaN,restDateString:""};const c=r[1]?parseInt(r[1]):null,u=r[2]?parseInt(r[2]):null;return{year:u===null?c:u*100,restDateString:e.slice((r[1]||r[2]).length)}}function XI(e,n){if(n===null)return new Date(NaN);const t=e.match(YI);if(!t)return new Date(NaN);const r=!!t[4],c=oc(t[1]),u=oc(t[2])-1,g=oc(t[3]),v=oc(t[4]),s=oc(t[5])-1;if(r)return sM(n,v,s)?nM(n,v,s):new Date(NaN);{const d=new Date(0);return!iM(n,u,g)||!oM(n,c)?new Date(NaN):(d.setUTCFullYear(n,u,Math.max(c,g)),d)}}function oc(e){return e?parseInt(e):1}function eM(e){const n=e.match(KI);if(!n)return NaN;const t=Of(n[1]),r=Of(n[2]),c=Of(n[3]);return aM(t,r,c)?t*wd+r*au+c*1e3:NaN}function Of(e){return e&&parseFloat(e.replace(",","."))||0}function tM(e){if(e==="Z")return 0;const n=e.match(JI);if(!n)return 0;const t=n[1]==="+"?-1:1,r=parseInt(n[2]),c=n[3]&&parseInt(n[3])||0;return lM(r,c)?t*(r*wd+c*au):NaN}function nM(e,n,t){const r=new Date(0);r.setUTCFullYear(e,0,4);const c=r.getUTCDay()||7,u=(n-1)*7+t+1-c;return r.setUTCDate(r.getUTCDate()+u),r}const rM=[31,null,31,30,31,30,31,31,30,31,30,31];function E0(e){return e%400===0||e%4===0&&e%100!==0}function iM(e,n,t){return n>=0&&n<=11&&t>=1&&t<=(rM[n]||(E0(e)?29:28))}function oM(e,n){return n>=1&&n<=(E0(e)?366:365)}function sM(e,n,t){return n>=1&&n<=53&&t>=0&&t<=6}function aM(e,n,t){return e===24?n===0&&t===0:t>=0&&t<60&&n>=0&&n<60&&e>=0&&e<25}function lM(e,n){return n>=0&&n<=59}function cM(e,n,t){return GI(e,-n,t)}function I0(e,n,t){const r=T0(),c=dM(e,t.timeZone,t.locale??r.locale);return"formatToParts"in c?uM(c,n):hM(c,n)}function uM(e,n){const t=e.formatToParts(n);for(let r=t.length-1;r>=0;--r)if(t[r].type==="timeZoneName")return t[r].value}function hM(e,n){const t=e.format(n).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(t);return r?r[0].substr(1):""}function dM(e,n,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:n,timeZoneName:e})}function fM(e,n){const t=yM(n);return"formatToParts"in t?gM(t,e):mM(t,e)}const pM={year:0,month:1,day:2,hour:3,minute:4,second:5};function gM(e,n){try{const t=e.formatToParts(n),r=[];for(let c=0;c<t.length;c++){const u=pM[t[c].type];u!==void 0&&(r[u]=parseInt(t[c].value,10))}return r}catch(t){if(t instanceof RangeError)return[NaN];throw t}}function mM(e,n){const t=e.format(n),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Nf={},M0=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")),vM=M0==="06/25/2014, 00:00:00"||M0==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function yM(e){return Nf[e]||(Nf[e]=vM?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Nf[e]}function R0(e,n,t,r,c,u,g){const v=new Date(0);return v.setUTCFullYear(e,n,t),v.setUTCHours(r,c,u,g),v}const L0=36e5,bM=6e4,Df={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Pf(e,n,t){if(!e)return 0;let r=Df.timezoneZ.exec(e);if(r)return 0;let c,u;if(r=Df.timezoneHH.exec(e),r)return c=parseInt(r[1],10),O0(c)?-(c*L0):NaN;if(r=Df.timezoneHHMM.exec(e),r){c=parseInt(r[2],10);const g=parseInt(r[3],10);return O0(c,g)?(u=Math.abs(c)*L0+g*bM,r[1]==="+"?-u:u):NaN}if(CM(e)){n=new Date(n||Date.now());const g=t?n:wM(n),v=zf(g,e);return-(t?v:xM(n,v,e))}return NaN}function wM(e){return R0(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function zf(e,n){const t=fM(e,n),r=R0(t[0],t[1]-1,t[2],t[3]%24,t[4],t[5],0).getTime();let c=e.getTime();const u=c%1e3;return c-=u>=0?u:1e3+u,r-c}function xM(e,n,t){let r=e.getTime()-n;const c=zf(new Date(r),t);if(n===c)return n;r-=c-n;const u=zf(new Date(r),t);return c===u?c:Math.max(c,u)}function O0(e,n){return-23<=e&&e<=23&&(n==null||0<=n&&n<=59)}const N0={};function CM(e){if(N0[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),N0[e]=!0,!0}catch{return!1}}const kM=60*1e3,_M={X:function(e,n,t){const r=Bf(t.timeZone,e);if(r===0)return"Z";switch(n){case"X":return D0(r);case"XXXX":case"XX":return ol(r);default:return ol(r,":")}},x:function(e,n,t){const r=Bf(t.timeZone,e);switch(n){case"x":return D0(r);case"xxxx":case"xx":return ol(r);default:return ol(r,":")}},O:function(e,n,t){const r=Bf(t.timeZone,e);switch(n){case"O":case"OO":case"OOO":return"GMT"+AM(r,":");default:return"GMT"+ol(r,":")}},z:function(e,n,t){switch(n){case"z":case"zz":case"zzz":return I0("short",e,t);default:return I0("long",e,t)}}};function Bf(e,n){const t=e?Pf(e,n,!0)/kM:n?.getTimezoneOffset()??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+e);return t}function Su(e,n){const t=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<n;)r="0"+r;return t+r}function ol(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),c=Su(Math.floor(r/60),2),u=Su(Math.floor(r%60),2);return t+c+n+u}function D0(e,n){return e%60===0?(e>0?"-":"+")+Su(Math.abs(e)/60,2):ol(e,n)}function AM(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),c=Math.floor(r/60),u=r%60;return u===0?t+String(c):t+String(c)+n+Su(u,2)}function P0(e){const n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+e-+n}const $M=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Ff=36e5,z0=6e4,SM=2,hi={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:$M};function B0(e,n={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const t=n.additionalDigits==null?SM:Number(n.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const r=TM(e),{year:c,restDateString:u}=EM(r.date,t),g=IM(u,c);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const v=g.getTime();let s=0,d;if(r.time&&(s=MM(r.time),s===null||isNaN(s)))return new Date(NaN);if(r.timeZone||n.timeZone){if(d=Pf(r.timeZone||n.timeZone,new Date(v+s)),isNaN(d))return new Date(NaN)}else d=P0(new Date(v+s)),d=P0(new Date(v+s+d));return new Date(v+s+d)}else return new Date(NaN)}function TM(e){const n={};let t=hi.dateTimePattern.exec(e),r;if(t?(n.date=t[1],r=t[3]):(t=hi.datePattern.exec(e),t?(n.date=t[1],r=t[2]):(n.date=null,r=e)),r){const c=hi.timeZone.exec(r);c?(n.time=r.replace(c[1],""),n.timeZone=c[1].trim()):n.time=r}return n}function EM(e,n){if(e){const t=hi.YYY[n],r=hi.YYYYY[n];let c=hi.YYYY.exec(e)||r.exec(e);if(c){const u=c[1];return{year:parseInt(u,10),restDateString:e.slice(u.length)}}if(c=hi.YY.exec(e)||t.exec(e),c){const u=c[1];return{year:parseInt(u,10)*100,restDateString:e.slice(u.length)}}}return{year:null}}function IM(e,n){if(n===null)return null;let t,r,c;if(!e||!e.length)return t=new Date(0),t.setUTCFullYear(n),t;let u=hi.MM.exec(e);if(u)return t=new Date(0),r=parseInt(u[1],10)-1,W0(n,r)?(t.setUTCFullYear(n,r),t):new Date(NaN);if(u=hi.DDD.exec(e),u){t=new Date(0);const g=parseInt(u[1],10);return OM(n,g)?(t.setUTCFullYear(n,0,g),t):new Date(NaN)}if(u=hi.MMDD.exec(e),u){t=new Date(0),r=parseInt(u[1],10)-1;const g=parseInt(u[2],10);return W0(n,r,g)?(t.setUTCFullYear(n,r,g),t):new Date(NaN)}if(u=hi.Www.exec(e),u)return c=parseInt(u[1],10)-1,H0(c)?F0(n,c):new Date(NaN);if(u=hi.WwwD.exec(e),u){c=parseInt(u[1],10)-1;const g=parseInt(u[2],10)-1;return H0(c,g)?F0(n,c,g):new Date(NaN)}return null}function MM(e){let n,t,r=hi.HH.exec(e);if(r)return n=parseFloat(r[1].replace(",",".")),jf(n)?n%24*Ff:NaN;if(r=hi.HHMM.exec(e),r)return n=parseInt(r[1],10),t=parseFloat(r[2].replace(",",".")),jf(n,t)?n%24*Ff+t*z0:NaN;if(r=hi.HHMMSS.exec(e),r){n=parseInt(r[1],10),t=parseInt(r[2],10);const c=parseFloat(r[3].replace(",","."));return jf(n,t,c)?n%24*Ff+t*z0+c*1e3:NaN}return null}function F0(e,n,t){n=n||0,t=t||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const c=r.getUTCDay()||7,u=n*7+t+1-c;return r.setUTCDate(r.getUTCDate()+u),r}const RM=[31,28,31,30,31,30,31,31,30,31,30,31],LM=[31,29,31,30,31,30,31,31,30,31,30,31];function j0(e){return e%400===0||e%4===0&&e%100!==0}function W0(e,n,t){if(n<0||n>11)return!1;if(t!=null){if(t<1)return!1;const r=j0(e);if(r&&t>LM[n]||!r&&t>RM[n])return!1}return!0}function OM(e,n){if(n<1)return!1;const t=j0(e);return!(t&&n>366||!t&&n>365)}function H0(e,n){return!(e<0||e>52||n!=null&&(n<0||n>6))}function jf(e,n,t){return!(e<0||e>=25||n!=null&&(n<0||n>=60)||t!=null&&(t<0||t>=60))}const NM=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function DM(e,n,t={}){n=String(n);const r=n.match(NM);if(r){const c=B0(t.originalDate||e,t);n=r.reduce(function(u,g){if(g[0]==="'")return u;const v=u.indexOf(g),s=u[v-1]==="'",d=u.replace(g,"'"+_M[g[0]](c,g,t)+"'");return s?d.substring(0,v-1)+d.substring(v+1):d},n)}return da(e,n,t)}function PM(e,n,t){e=B0(e,t);const r=Pf(n,e,!0),c=new Date(e.getTime()-r),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}function Tu(e,n,t,r){return r={...r,timeZone:n,originalDate:e},DM(PM(e,n,{timeZone:r.timeZone}),t,r)}const Eu="yyyy-MM-dd",U0="HH:mm:ss.SSS",V0="HH:mm:ss",Iu=`${Eu} ${U0}`,G0=`${Eu} ${V0}`,$3=ir("R",{methods:{parseDateTime(e,n){return e.includes(" ")&&(e=e.replace(" ","T")),n&&n==="UTC"&&(e+="Z"),Date.parse(e)},formatUtcToLocal(e,n){return da(!n||n==="local"?cM(e,e.getTimezoneOffset()):e,Iu)},formatDateTime(e,n){return!n||n==="local"?da(e,Iu):Tu(e,n,Iu)},formatDateTimeHMS(e,n){return!n||n==="local"?da(e,G0):Tu(e,n,G0)},formatDate:function(e,n){return!n||n==="local"?da(e,Eu):Tu(e,this.timeZone,Eu)},formatTime:function(e,n,t=U0){return!n||n==="local"?da(e,t):Tu(e,this.timeZone,t)},formatTimeHMS:function(e,n){return this.formatTime(e,n,V0)},formatTimestamp(e,n){return this.formatDateTime(qI(e),n)},formatSeconds(e,n){return this.formatDateTime(new Date(e*1e3),n)},formatNanoseconds(e,n){return this.formatDateTime(new Date(parseInt(e)/1e6),n)}}}),q0=100,Y0=ir("f",sm("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:e=>n=>e.namedWidgets[n]},actions:{notifyAddHistory(e){this.notifyHistory.length>=q0&&(this.notifyHistory.length=q0-1),this.notifyHistory.unshift(e)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(e){Object.assign(this.namedWidgets,e)},clearNamedWidget(e){delete this.namedWidgets[e]},updatePlayback(e){Object.assign(this.playback,e)}}})),sl=am();sl.use(({store:e})=>{e.commit=(n,t)=>{typeof e[n]=="function"&&e[n](t)},e.dispatch=(n,t)=>{if(typeof e[n]=="function")return e[n](t)}});const zM=sl.install.bind(sl);sl.install=e=>{zM(e);const n=Y0(sl);e.config.globalProperties.$store={state:new Proxy({},{get(t,r){return n.$state}}),getters:new Proxy({},{get(t,r){if(r.includes("/")){const[,c]=r.split("/");return n[c]}return n[r]}}),commit(t,r){if(t.includes("/")){const[,c]=t.split("/");n[c]?.(r)}else n[t]?.(r)},dispatch(t,r){if(t.includes("/")){const[,c]=t.split("/");return n[c]?.(r)}else return n[t]?.(r)}}};function K0(e,n){return function(){return e.apply(n,arguments)}}const{toString:BM}=Object.prototype,{getPrototypeOf:js}=Object,{iterator:sc,toStringTag:J0}=Symbol,ac=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),Q0=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Z0=(e,n,t)=>e===Object.prototype||!t&&n===null,FM=e=>{if(!Object.isExtensible(e))return!1;const n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&n.push(...Object.getOwnPropertySymbols(e)),n.every(t=>{if(Q0(t))return!1;const r=Object.getOwnPropertyDescriptor(e,t);return!!r&&r.configurable&&r.writable===!0})},lc=(e,n)=>{let t=e;const r=[];for(;t!=null;){if(r.indexOf(t)!==-1)return!1;r.push(t);const c=js(t);if(Z0(t,c,t===e))return!1;if(ac(t,n))return!0;t=c}return!1},jM=(e,n)=>e!=null&&lc(e,n)?e[n]:void 0,WM=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const n=js(e);if(n===null&&FM(e))return e;const t=Object.create(null),r=Object.create(null),c=[];let u=e;for(;u!=null&&c.indexOf(u)===-1;){c.push(u);const g=u===e?n:js(u);if(Z0(u,g,u===e))break;const v=Object.getOwnPropertyNames(u);Object.getOwnPropertySymbols&&v.push(...Object.getOwnPropertySymbols(u));for(const s of v)Q0(s)||ac(r,s)||(t[s]=e[s],r[s]=!0);u=g}return t},Wf=(e=>n=>{const t=BM.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),uo=e=>(e=e.toLowerCase(),n=>Wf(n)===e),Mu=e=>n=>typeof n===e,{isArray:ba}=Array,wa=Mu("undefined");function al(e){return e!==null&&!wa(e)&&e.constructor!==null&&!wa(e.constructor)&&_i(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const X0=uo("ArrayBuffer");function HM(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&X0(e.buffer),n}const UM=Mu("string"),_i=Mu("function"),ew=Mu("number"),ll=e=>e!==null&&typeof e=="object",VM=e=>e===!0||e===!1,Ru=e=>{if(!ll(e))return!1;const n=js(e);return(n===null||n===Object.prototype||js(n)===null)&&!lc(e,J0)&&!lc(e,sc)},GM=e=>{if(!ll(e)||al(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},qM=uo("Date"),YM=uo("File"),KM=e=>!!(e&&typeof e.uri<"u"),JM=e=>e&&typeof e.getParts<"u",QM=uo("Blob"),ZM=uo("FileList"),XM=uo("Set"),eR=e=>ll(e)&&_i(e.pipe);function tR(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const tw=tR(),nw=typeof tw.FormData<"u"?tw.FormData:void 0,nR=e=>{if(!e)return!1;if(nw&&e instanceof nw)return!0;const n=js(e);if(!n||n===Object.prototype||!_i(e.append))return!1;const t=Wf(e);return t==="formdata"||t==="object"&&_i(e.toString)&&e.toString()==="[object FormData]"},rR=uo("URLSearchParams"),[iR,oR,sR,aR]=["ReadableStream","Request","Response","Headers"].map(uo),lR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function cc(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let r,c;if(typeof e!="object"&&(e=[e]),ba(e))for(r=0,c=e.length;r<c;r++)n.call(null,e[r],r,e);else{if(al(e))return;const u=t?Object.getOwnPropertyNames(e):Object.keys(e),g=u.length;let v;for(r=0;r<g;r++)v=u[r],n.call(null,e[v],v,e)}}function rw(e,n){if(al(e))return null;n=n.toLowerCase();const t=Object.keys(e);let r=t.length,c;for(;r-- >0;)if(c=t[r],n===c.toLowerCase())return c;return null}const xa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iw=e=>!wa(e)&&e!==xa;function Hf(...e){const{caseless:n,skipUndefined:t}=iw(this)&&this||{},r={},c=(u,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")return;const v=n&&typeof g=="string"&&rw(r,g)||g,s=ac(r,v)?r[v]:void 0;Ru(s)&&Ru(u)?r[v]=Hf(s,u):Ru(u)?r[v]=Hf({},u):ba(u)?r[v]=u.slice():(!t||!wa(u))&&(r[v]=u)};for(let u=0,g=e.length;u<g;u++){const v=e[u];if(!v||al(v)||(cc(v,c),typeof v!="object"||ba(v)))continue;const s=Object.getOwnPropertySymbols(v);for(let d=0;d<s.length;d++){const a=s[d];wR.call(v,a)&&c(v[a],a)}}return r}const cR=(e,n,t,{allOwnKeys:r}={})=>(cc(n,(c,u)=>{t&&_i(c)?Object.defineProperty(e,u,{__proto__:null,value:K0(c,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,u,{__proto__:null,value:c,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),uR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hR=(e,n,t,r)=>{e.prototype=Object.create(n.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:n.prototype}),t&&Object.assign(e.prototype,t)},dR=(e,n,t,r)=>{let c,u,g;const v={};if(n=n||{},e==null)return n;do{for(c=Object.getOwnPropertyNames(e),u=c.length;u-- >0;)g=c[u],(!r||r(g,e,n))&&!v[g]&&(n[g]=e[g],v[g]=!0);e=t!==!1&&js(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},fR=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const r=e.indexOf(n,t);return r!==-1&&r===t},pR=e=>{if(!e)return null;if(ba(e))return e;let n=e.length;if(!ew(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},gR=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&js(Uint8Array)),mR=(e,n)=>{const t=(e&&e[sc]).call(e);let r;for(;(r=t.next())&&!r.done;){const c=r.value;n.call(e,c[0],c[1])}},vR=(e,n)=>{let t;const r=[];for(;(t=e.exec(n))!==null;)r.push(t);return r},yR=uo("HTMLFormElement"),bR=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,t,r){return t.toUpperCase()+r}),{propertyIsEnumerable:wR}=Object.prototype,xR=uo("RegExp"),ow=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),r={};cc(t,(c,u)=>{let g;(g=n(c,u,e))!==!1&&(r[u]=g||c)}),Object.defineProperties(e,r)},CR=e=>{ow(e,(n,t)=>{if(_i(e)&&["arguments","caller","callee"].includes(t))return!1;const r=e[t];if(_i(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},kR=(e,n)=>{const t={},r=c=>{c.forEach(u=>{t[u]=!0})};return ba(e)?r(e):r(String(e).split(n)),t},_R=()=>{},AR=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function $R(e){return!!(e&&_i(e.append)&&e[J0]==="FormData"&&e[sc])}const SR=e=>{const n=new WeakSet,t=r=>{if(ll(r)){if(n.has(r))return;if(al(r))return r;if(!("toJSON"in r)){n.add(r);let c;if(XM(r)){c=[];for(const u of r){const g=t(u);!wa(g)&&c.push(g)}}else c=ba(r)?[]:{},cc(r,(u,g)=>{const v=t(u);!wa(v)&&(c[g]=v)});return n.delete(r),c}}return r};return t(e)},TR=uo("AsyncFunction"),ER=e=>e&&(ll(e)||_i(e))&&_i(e.then)&&_i(e.catch),sw=((e,n)=>e?setImmediate:n?((t,r)=>(xa.addEventListener("message",({source:c,data:u})=>{c===xa&&u===t&&r.length&&r.shift()()},!1),c=>{r.push(c),xa.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",_i(xa.postMessage)),IR=typeof queueMicrotask<"u"?queueMicrotask.bind(xa):typeof process<"u"&&process.nextTick||sw,aw=e=>e!=null&&_i(e[sc]),MR=e=>e!=null&&lc(e,sc)&&aw(e),ve={isArray:ba,isArrayBuffer:X0,isBuffer:al,isFormData:nR,isArrayBufferView:HM,isString:UM,isNumber:ew,isBoolean:VM,isObject:ll,isPlainObject:Ru,isEmptyObject:GM,isReadableStream:iR,isRequest:oR,isResponse:sR,isHeaders:aR,isUndefined:wa,isDate:qM,isFile:YM,isReactNativeBlob:KM,isReactNative:JM,isBlob:QM,isRegExp:xR,isFunction:_i,isStream:eR,isURLSearchParams:rR,isTypedArray:gR,isFileList:ZM,forEach:cc,merge:Hf,extend:cR,trim:lR,stripBOM:uR,inherits:hR,toFlatObject:dR,kindOf:Wf,kindOfTest:uo,endsWith:fR,toArray:pR,forEachEntry:mR,matchAll:vR,isHTMLForm:yR,hasOwnProperty:ac,hasOwnProp:ac,hasOwnInPrototypeChain:lc,getSafeProp:jM,toSafeFlatObject:WM,reduceDescriptors:ow,freezeMethods:CR,toObjectSet:kR,toCamelCase:bR,noop:_R,toFiniteNumber:AR,findKey:rw,global:xa,isContextDefined:iw,isSpecCompliantForm:$R,toJSONObject:SR,isAsyncFn:TR,isThenable:ER,setImmediate:sw,asap:IR,isIterable:aw,isSafeIterable:MR},RR=ve.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),LR=e=>{const n={};let t,r,c;return e&&e.split(`
1481
+ `).forEach(function(u){c=u.indexOf(":"),t=u.substring(0,c).trim().toLowerCase(),r=u.substring(c+1).trim();const g=ve.hasOwnProp(n,t);!t||g&&ve.hasOwnProp(RR,t)||(t==="set-cookie"?g?n[t].push(r):n[t]=[r]:n[t]=g?n[t]+", "+r:r)}),n};function OR(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}const NR=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),DR=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Uf(e,n){return ve.isArray(e)?e.map(t=>Uf(t,n)):OR(String(e).replace(n,""))}const PR=e=>Uf(e,NR),zR=e=>Uf(e,DR);function lw(e){const n=Object.create(null);return ve.forEach(e.toJSON(),(t,r)=>{n[r]=zR(t)}),n}const cw=Symbol("internals");function uc(e){return e&&String(e).trim().toLowerCase()}function Lu(e){return e===!1||e==null?e:ve.isArray(e)?e.map(Lu):PR(String(e))}function BR(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(e);)n[r[1]]=r[2];return n}const FR=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Vf(e){let n=0,t=e.length;for(;n<t;){const r=e.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;t>n;){const r=e.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return n===0&&t===e.length?e:e.slice(n,t)}function jR(e){const n=e.length-1;if(n<1||e.charCodeAt(0)!==34||e.charCodeAt(n)!==34)return e;let t="";for(let r=1;r<n;r++){const c=e.charCodeAt(r);if(c===34||c===92&&(r+=1,r>=n))return e;t+=e[r]}return t}function WR(e){const n=Object.create(null),t=String(e);let r=0,c=!1,u=!1;function g(v){const s=Vf(t.slice(r,v)),d=s.indexOf("=");if(d<1)return;const a=Vf(s.slice(0,d));if(!FR.test(a))return;const l=a.toLowerCase();if(l==="__proto__"||l==="constructor"||l==="prototype")return;const h=Vf(s.slice(d+1));n[l]=jR(h)}for(let v=0;v<t.length;v++){const s=t.charCodeAt(v);c?u?u=!1:s===92?u=!0:s===34&&(c=!1):s===34?c=!0:(s===44||s===59)&&(g(v),r=v+1)}return g(t.length),n}const HR=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gf(e,n,t,r,c){if(ve.isFunction(r))return r.call(this,n,t);if(c&&(n=t),!!ve.isString(n)){if(ve.isString(r))return n.indexOf(r)!==-1;if(ve.isRegExp(r))return r.test(n)}}function UR(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,r)=>t.toUpperCase()+r)}function VR(e,n){const t=ve.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+t,{__proto__:null,value:function(c,u,g){return this[r].call(this,n,c,u,g)},configurable:!0})})}let Qr=class{constructor(e){e&&this.set(e)}set(e,n,t){const r=this;function c(g,v,s){const d=uc(v);if(!d)return;const a=ve.findKey(r,d);(!a||r[a]===void 0||s===!0||s===void 0&&r[a]!==!1)&&(r[a||v]=Lu(g))}const u=(g,v)=>ve.forEach(g,(s,d)=>c(s,d,v));if(ve.isPlainObject(e)||e instanceof this.constructor)u(e,n);else if(ve.isString(e)&&(e=e.trim())&&!HR(e))u(LR(e),n);else if(ve.isObject(e)&&ve.isSafeIterable(e)){let g=Object.create(null),v,s;for(const d of e){if(!ve.isArray(d))throw new TypeError("Object iterator must return a key-value pair");s=d[0],ve.hasOwnProp(g,s)?(v=g[s],g[s]=ve.isArray(v)?[...v,d[1]]:[v,d[1]]):g[s]=d[1]}u(g,n)}else e!=null&&c(n,e,t);return this}get(e,n){if(e=uc(e),e){const t=ve.findKey(this,e);if(t){const r=this[t];if(!n)return r;if(n===!0)return BR(r);if(ve.isFunction(n))return n.call(this,r,t);if(ve.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=uc(e),e){const t=ve.findKey(this,e);return!!(t&&this[t]!==void 0&&(!n||Gf(this,this[t],t,n)))}return!1}delete(e,n){const t=this;let r=!1;function c(u){if(u=uc(u),u){const g=ve.findKey(t,u);g&&(!n||Gf(t,t[g],g,n))&&(delete t[g],r=!0)}}return ve.isArray(e)?e.forEach(c):c(e),r}clear(e){const n=Object.keys(this);let t=n.length,r=!1;for(;t--;){const c=n[t];(!e||Gf(this,this[c],c,e,!0))&&(delete this[c],r=!0)}return r}normalize(e){const n=this,t={};return ve.forEach(this,(r,c)=>{const u=ve.findKey(t,c);if(u){n[u]=Lu(r),delete n[c];return}const g=e?UR(c):String(c).trim();g!==c&&delete n[c],n[g]=Lu(r),t[g]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ve.forEach(this,(t,r)=>{t!=null&&t!==!1&&(n[r]=e&&ve.isArray(t)?t.join(", "):t)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
1482
+ `)}getSetCookie(){const e=this.get("set-cookie");return ve.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return WR(e)}static concat(e,...n){const t=new this(e);return n.forEach(r=>t.set(r)),t}static accessor(e){const n=(this[cw]=this[cw]={accessors:{}}).accessors,t=this.prototype;function r(c){const u=uc(c);n[u]||(VR(t,c),n[u]=!0)}return ve.isArray(e)?e.forEach(r):r(e),this}};Qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ve.reduceDescriptors(Qr.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}}),ve.freezeMethods(Qr);const Ou="[REDACTED ****]";function GR(e){if(ve.hasOwnProp(e,"toJSON"))return!0;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;){if(ve.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function qR(e,n){const t=new Set(n.map(u=>String(u).toLowerCase())),r=[],c=u=>{if(u===null||typeof u!="object"||ve.isBuffer(u))return u;if(r.indexOf(u)!==-1)return;u instanceof Qr&&(u=u.toJSON()),r.push(u);let g;if(ve.isArray(u))g=[],u.forEach((v,s)=>{const d=c(v);ve.isUndefined(d)||(g[s]=d)});else{if(!ve.isPlainObject(u)&&GR(u))return r.pop(),u;g=Object.create(null);for(const[v,s]of Object.entries(u)){const d=t.has(v.toLowerCase())?Ou:c(s);ve.isUndefined(d)||(g[v]=d)}}return r.pop(),g};return c(e)}function uw(e){try{return String(e)}catch{return""}}function YR(e){return e.errors.map(n=>{try{return n&&n.message?uw(n.message):uw(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let nt=class lk extends Error{static from(n,t,r,c,u,g){let v=n.message;!v&&ve.isArray(n.errors)&&n.errors.length&&(v=YR(n));const s=new lk(v,t||n.code,r,c,u);return Object.defineProperty(s,"cause",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),s.name=n.name,n.status!=null&&s.status==null&&(s.status=n.status),g&&Object.assign(s,g),s}constructor(n,t,r,c,u){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),c&&(this.request=c),u&&(this.response=u,this.status=u.status)}toJSON(){const n=this.config,t=n&&ve.hasOwnProp(n,"redact")?n.redact:void 0,r=ve.isArray(t)&&t.length>0?qR(n,t):ve.toJSONObject(n);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};nt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",nt.ERR_BAD_OPTION="ERR_BAD_OPTION",nt.ECONNABORTED="ECONNABORTED",nt.ETIMEDOUT="ETIMEDOUT",nt.ECONNREFUSED="ECONNREFUSED",nt.ERR_NETWORK="ERR_NETWORK",nt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",nt.ERR_DEPRECATED="ERR_DEPRECATED",nt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",nt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",nt.ERR_CANCELED="ERR_CANCELED",nt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",nt.ERR_INVALID_URL="ERR_INVALID_URL",nt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const KR=null,hw=100;function qf(e){return ve.isPlainObject(e)||ve.isArray(e)}function dw(e){return ve.endsWith(e,"[]")?e.slice(0,-2):e}function Yf(e,n,t){return e?e.concat(n).map(function(r,c){return r=dw(r),!t&&c?"["+r+"]":r}).join(t?".":""):n}function JR(e){return ve.isArray(e)&&!e.some(qf)}const QR=ve.toFlatObject(ve,{},null,function(e){return/^is[A-Z]/.test(e)});function Nu(e,n,t){if(!ve.isObject(e))throw new TypeError("target must be an object");n=n||new FormData;const r=(x,R)=>{const T=ve.getSafeProp(t,x);return ve.isUndefined(T)?R:T},c=r("metaTokens",!0),u=r("visitor")||f,g=r("dots",!1),v=r("indexes",!1),s=r("Blob")||typeof Blob<"u"&&Blob,d=r("maxDepth",hw),a=s&&ve.isSpecCompliantForm(n),l=[];if(!ve.isFunction(u))throw new TypeError("visitor must be a function");function h(x){if(x===null)return"";if(ve.isDate(x))return x.toISOString();if(ve.isBoolean(x))return x.toString();if(!a&&ve.isBlob(x))throw new nt("Blob is not supported. Use a Buffer instead.");if(ve.isArrayBuffer(x)||ve.isTypedArray(x)){if(a&&typeof s=="function")return new s([x]);throw new nt("Blob is not supported. Use a Buffer instead.",nt.ERR_NOT_SUPPORT)}return x}function p(x){if(x>d)throw new nt("Object is too deeply nested ("+x+" levels). Max depth: "+d,nt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function o(x,R){if(d===1/0)return JSON.stringify(x);const T=[];return JSON.stringify(x,function(_,C){if(!ve.isObject(C))return C;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(C),p(R+T.length-1),C})}function f(x,R,T){let _=x;if(ve.isReactNative(n)&&ve.isReactNativeBlob(x))return n.append(Yf(T,R,g),h(x)),!1;if(x&&!T&&typeof x=="object"){if(ve.endsWith(R,"{}"))R=c?R:R.slice(0,-2),x=o(x,1);else if(ve.isArray(x)&&JR(x)||(ve.isFileList(x)||ve.endsWith(R,"[]"))&&(_=ve.toArray(x)))return R=dw(R),_.forEach(function(C,P){!(ve.isUndefined(C)||C===null)&&n.append(v===!0?Yf([R],P,g):v===null?R:R+"[]",h(C))}),!1}return qf(x)?!0:(n.append(Yf(T,R,g),h(x)),!1)}const m=Object.assign(QR,{defaultVisitor:f,convertValue:h,isVisitable:qf});function w(x,R,T=0){if(!ve.isUndefined(x)){if(p(T),l.indexOf(x)!==-1)throw new Error("Circular reference detected in "+R.join("."));l.push(x),ve.forEach(x,function(_,C){(!(ve.isUndefined(_)||_===null)&&u.call(n,_,ve.isString(C)?C.trim():C,R,m))===!0&&w(_,R?R.concat(C):[C],T+1)}),l.pop()}}if(!ve.isObject(e))throw new TypeError("data must be an object");return w(e),n}function fw(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(t){return n[t]})}function Kf(e,n){this._pairs=[],e&&Nu(e,this,n)}const pw=Kf.prototype;pw.append=function(e,n){this._pairs.push([e,n])},pw.toString=function(e){const n=e?t=>e.call(this,t,fw):fw;return this._pairs.map(function(t){return n(t[0])+"="+n(t[1])},"").join("&")};function ZR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gw(e,n,t){if(!n)return e;e=e||"";const r=ve.isFunction(t)?{serialize:t}:t,c=ve.getSafeProp(r,"encode")||ZR,u=ve.getSafeProp(r,"serialize");let g;if(u?g=u(n,r):g=ve.isURLSearchParams(n)?n.toString():new Kf(n,r).toString(c),g){const v=e.indexOf("#");v!==-1&&(e=e.slice(0,v)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}const hc=Symbol("internals");function mw(e){return e?e.length:0}function vw(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function dc(e,n){const t=e.handlers,r=mw(t);t!==n.handlersRef?(n.handlersRef=t,n.handlerEntries.clear()):r!==n.handlersLength&&(r?n.handlerEntries.forEach(function(c,u){t[c.index]!==c.handler&&n.handlerEntries.delete(u)}):n.handlerEntries.clear()),n.handlersLength=r}let yw=class{constructor(){this.handlers=[],this[hc]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(n,t,r){const c={fulfilled:n,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},u=this[hc];this.handlers==null&&(this.handlers=[]),dc(this,u);const g=u.nextId++;return this.handlers.push(c),u.handlerEntries.set(g,{handler:c,index:this.handlers.length-1}),u.handlersLength=this.handlers.length,g}eject(n){const t=this[hc];dc(this,t);const r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(vw(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],dc(this,this[hc]))}forEach(n){const t=this[hc];dc(this,t),t.iterationDepth++;try{ve.forEach(this.handlers,function(r){r!==null&&n(r)})}finally{--t.iterationDepth||(dc(this,t),vw(this.handlers),t.handlersLength=mw(this.handlers))}}};const Jf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},XR=typeof URLSearchParams<"u"?URLSearchParams:Kf,eL=typeof FormData<"u"?FormData:null,tL=typeof Blob<"u"?Blob:null,nL={isBrowser:!0,classes:{URLSearchParams:XR,FormData:eL,Blob:tL},protocols:["http","https","file","blob","url","data"]},Qf=typeof window<"u"&&typeof document<"u",Zf=typeof navigator=="object"&&navigator||void 0,rL=Qf&&(!Zf||["ReactNative","NativeScript","NS"].indexOf(Zf.product)<0),iL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oL=Qf&&window.location.href||"http://localhost",sL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qf,hasStandardBrowserEnv:rL,hasStandardBrowserWebWorkerEnv:iL,navigator:Zf,origin:oL},Symbol.toStringTag,{value:"Module"})),Rr={...sL,...nL};function aL(e,n){return Nu(e,new Rr.classes.URLSearchParams,{visitor:function(t,r,c,u){return Rr.isNode&&ve.isBuffer(t)?(this.append(r,t.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...n})}const bw=hw;function ww(e){if(e>bw)throw new nt("FormData field is too deeply nested ("+e+" levels). Max depth: "+bw,nt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function lL(e){const n=[],t=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=t.exec(e))!==null;)ww(n.length),n.push(r[0]==="[]"?"":r[1]||r[0]);return n}function cL(e){const n={},t=Object.keys(e);let r;const c=t.length;let u;for(r=0;r<c;r++)u=t[r],n[u]=e[u];return n}function xw(e){function n(t,r,c,u){ww(u);let g=t[u++];if(g==="__proto__")return!0;const v=Number.isFinite(+g),s=u>=t.length;return g=!g&&ve.isArray(c)?c.length:g,s?(ve.hasOwnProp(c,g)?c[g]=ve.isArray(c[g])?c[g].concat(r):[c[g],r]:c[g]=r,!v):((!ve.hasOwnProp(c,g)||!ve.isObject(c[g]))&&(c[g]=[]),n(t,r,c[g],u)&&ve.isArray(c[g])&&(c[g]=cL(c[g])),!v)}if(ve.isFormData(e)&&ve.isFunction(e.entries)){const t={};return ve.forEachEntry(e,(r,c)=>{n(lL(r),c,t,0)}),t}return null}const Cw=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),cl=(e,n)=>e!=null&&ve.hasOwnProp(e,n)?e[n]:void 0;function uL(e,n,t){if(ve.isString(e))try{return(n||JSON.parse)(e),ve.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(e)}const fc={transitional:Jf,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const t=n.getContentType()||"",r=t.indexOf("application/json")>-1,c=ve.isObject(e);if(c&&ve.isHTMLForm(e)&&(e=new FormData(e)),ve.isFormData(e))return r?JSON.stringify(xw(e)):e;if(ve.isArrayBuffer(e)||ve.isBuffer(e)||ve.isStream(e)||ve.isFile(e)||ve.isBlob(e)||ve.isReadableStream(e))return e;if(ve.isArrayBufferView(e))return e.buffer;if(ve.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(c){const g=cl(this,"formSerializer");if(t.indexOf("application/x-www-form-urlencoded")>-1)return aL(e,g).toString();if((u=ve.isFileList(e))||t.indexOf("multipart/form-data")>-1){const v=cl(this,"env"),s=v&&v.FormData;return Nu(u?{"files[]":e}:e,s&&new s,g)}}return c||r?(n.setContentType("application/json",!1),uL(e)):e}],transformResponse:[function(e){const n=cl(this,"transitional")||fc.transitional,t=n&&n.forcedJSONParsing,r=cl(this,"responseType"),c=r==="json";if(ve.isResponse(e)||ve.isReadableStream(e))return e;if(e&&ve.isString(e)&&(t&&!r||c)){const u=!(n&&n.silentJSONParsing)&&c;try{return JSON.parse(e,cl(this,"parseReviver"))}catch(g){if(u)throw g.name==="SyntaxError"?nt.from(g,nt.ERR_BAD_RESPONSE,this,null,cl(this,"response")):g}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rr.classes.FormData,Blob:Rr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ve.forEach(Cw,e=>{fc.headers[e]={}});function Xf(e,n){const t=this||fc,r=n||t,c=Qr.from(r.headers);let u=r.data;return ve.forEach(e,function(g){u=g.call(t,u,c.normalize(),n?n.status:void 0)}),c.normalize(),u}function kw(e){return!!(e&&e.__CANCEL__)}let pc=class extends nt{constructor(n,t,r){super(n??"canceled",nt.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function _w(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new nt("Request failed with status code "+t.status,t.status>=400&&t.status<500?nt.ERR_BAD_REQUEST:nt.ERR_BAD_RESPONSE,t.config,t.request,t))}const hL=/[\t\n\r]/g;function Aw(e){if(typeof e!="string")return e;let n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;return e.slice(n).replace(hL,"")}function ep(e){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return n&&n[1]||""}function dL(e,n){e=e||10;const t=new Array(e),r=new Array(e);let c=0,u=0,g;return n=n!==void 0?n:1e3,function(v){const s=Date.now(),d=r[u];g||(g=s),t[c]=v,r[c]=s;let a=u,l=0;for(;a!==c;)l+=t[a++],a=a%e;if(c=(c+1)%e,c===u&&(u=(u+1)%e),s-g<n)return;const h=d&&s-d;return h?Math.round(l*1e3/h):void 0}}function fL(e,n){let t=0,r=1e3/n,c,u;const g=(v,s=Date.now())=>{t=s,c=null,u&&(clearTimeout(u),u=null),e(...v)};return[(...v)=>{const s=Date.now(),d=s-t;d>=r?g(v,s):(c=v,u||(u=setTimeout(()=>{u=null,g(c)},r-d)))},()=>c&&g(c),(...v)=>g(v)]}const Du=(e,n,t=3)=>{let r=0;const c=dL(50,250);return fL(u=>{if(!u||!ve.isNumber(u.loaded))return;const g=u.loaded,v=u.lengthComputable?u.total:void 0,s=Math.max(0,v!=null?Math.min(g,v):g),d=Math.max(0,s-r),a=c(d);r=Math.max(r,s);const l={loaded:s,total:v,progress:v?s/v:void 0,bytes:d,rate:a||void 0,estimated:a&&v?(v-s)/a:void 0,event:u,lengthComputable:v!=null,[n?"download":"upload"]:!0};e(l)},t)},$w=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},Sw=(e,n=ve.asap)=>(...t)=>n(()=>e(...t)),pL=Rr.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,Rr.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(Rr.origin),Rr.navigator&&/(msie|trident)/i.test(Rr.navigator.userAgent)):()=>!0,gL=Rr.hasStandardBrowserEnv?{write(e,n,t,r,c,u,g){if(typeof document>"u")return;const v=[`${e}=${encodeURIComponent(n)}`];ve.isNumber(t)&&v.push(`expires=${new Date(t).toUTCString()}`),ve.isString(r)&&v.push(`path=${r}`),ve.isString(c)&&v.push(`domain=${c}`),u===!0&&v.push("secure"),ve.isString(g)&&v.push(`SameSite=${g}`),document.cookie=v.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let t=0;t<n.length;t++){const r=n[t].replace(/^\s+/,""),c=r.indexOf("=");if(c!==-1&&r.slice(0,c)===e)try{return decodeURIComponent(r.slice(c+1))}catch{return r.slice(c+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function mL(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vL(e,n){if(!n)return e;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return e.slice(0,t)+"/"+n.replace(/^\/+/,"")}const yL=/^https?:(?!\/\/)/i;function bL(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(n,t,r="")=>`${t}${r}${Ou}`)}function wL(e){const n=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Ou}@`),t=n.indexOf("#"),r=(t===-1?n:n.slice(0,t)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Ou}`);return t===-1?r:`${r}#${bL(n.slice(t+1))}`}function Tw(e,n){if(typeof e=="string"){const t=Aw(e);if(yL.test(t))throw new nt(`Invalid URL ${JSON.stringify(wL(t))}: missing "//" after protocol`,nt.ERR_INVALID_URL,n)}}function Ew(e,n,t,r){Tw(n,r);let c=!mL(n);return e&&(c||t===!1)?(Tw(e,r),vL(e,n)):n}const Iw=e=>e instanceof Qr?{...e}:e,xL=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(n=>Object.getOwnPropertyDescriptor(e,n).enumerable)):Object.keys(e);function Ca(e,n){e=e||{},n=n||{};const t=Object.create(null);Object.defineProperty(t,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(a,l,h,p){return ve.isPlainObject(a)&&ve.isPlainObject(l)?ve.merge.call({caseless:p},a,l):ve.isPlainObject(l)?ve.merge({},l):ve.isArray(l)?l.slice():l}function c(a,l,h,p){if(ve.isUndefined(l)){if(!ve.isUndefined(a))return r(void 0,a,h,p)}else return r(a,l,h,p)}function u(a,l){if(!ve.isUndefined(l))return r(void 0,l)}function g(a,l){if(ve.isUndefined(l)){if(!ve.isUndefined(a))return r(void 0,a)}else return r(void 0,l)}function v(a){const l=ve.hasOwnProp(n,"transitional")?n.transitional:void 0;if(!ve.isUndefined(l))if(ve.isPlainObject(l)){if(ve.hasOwnProp(l,a))return l[a]}else return;const h=ve.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ve.isPlainObject(h)&&ve.hasOwnProp(h,a))return h[a]}function s(a,l,h){if(ve.hasOwnProp(n,h))return r(a,l);if(ve.hasOwnProp(e,h))return r(void 0,a)}const d={url:u,method:u,data:u,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutErrorMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:s,headers:(a,l,h)=>c(Iw(a),Iw(l),h,!0)};return ve.forEach(xL({...e,...n}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=ve.hasOwnProp(d,a)?d[a]:c,h=ve.hasOwnProp(e,a)?e[a]:void 0,p=ve.hasOwnProp(n,a)?n[a]:void 0,o=l(h,p,a);ve.isUndefined(o)&&l!==s||(t[a]=o)}),ve.hasOwnProp(n,"validateStatus")&&ve.isUndefined(n.validateStatus)&&v("validateStatusUndefinedResolves")===!1&&(ve.hasOwnProp(e,"validateStatus")?t.validateStatus=r(void 0,e.validateStatus):delete t.validateStatus),t}const CL=["content-type","content-length"];function kL(e,n,t){if(t!=="content-only"){e.set(n);return}Object.entries(n||{}).forEach(([r,c])=>{CL.includes(r.toLowerCase())&&e.set(r,c)})}const _L=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16)));function Mw(e){const n=Ca({},e),t=h=>ve.hasOwnProp(n,h)?n[h]:void 0,r=t("data");let c=t("withXSRFToken");const u=t("xsrfHeaderName"),g=t("xsrfCookieName");let v=t("headers");const s=t("auth"),d=t("baseURL"),a=t("allowAbsoluteUrls"),l=t("url");if(n.headers=v=Qr.from(v),n.url=gw(Ew(d,l,a,n),t("params"),t("paramsSerializer")),s){const h=ve.getSafeProp(s,"username")||"",p=ve.getSafeProp(s,"password")||"";try{v.set("Authorization","Basic "+btoa(h+":"+(p?_L(p):"")))}catch(o){throw nt.from(o,nt.ERR_BAD_OPTION_VALUE,e)}}if(ve.isFormData(r)){const h=ve.getSafeProp(r,"getHeaders");Rr.hasStandardBrowserEnv||Rr.hasStandardBrowserWebWorkerEnv||ve.isReactNative(r)?v.setContentType(void 0):ve.isFunction(h)&&kL(v,h.call(r),t("formDataHeaderPolicy"))}if(Rr.hasStandardBrowserEnv&&(ve.isFunction(c)&&(c=c(n)),c===!0||c==null&&pL(n.url))){const h=u&&g&&gL.read(g);h&&v.set(u,h)}return n}const AL=typeof XMLHttpRequest<"u",$L=AL&&function(e){return new Promise(function(n,t){const r=Mw(e);let c=r.data;const u=Qr.from(r.headers).normalize();let{responseType:g,onUploadProgress:v,onDownloadProgress:s}=r,d,a,l,h,p,o;function f(){h&&h(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function w(R){if(!m)return;if(m.status===0&&(ep(Aw(r.url))||ep(Rr.origin))!=="file"&&!(m.responseURL&&m.responseURL.startsWith("file:"))){t(new nt("Request aborted",nt.ECONNABORTED,e,m)),f(),m=null;return}try{R?o&&o(R):p&&p()}catch(C){setTimeout(()=>{throw C})}if(!m)return;const T=Qr.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!g||g==="text"||g==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:e,request:m};_w(function(C){n(C),f()},function(C){t(C),f()},_),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(w)},m.onabort=function(){m&&(t(new nt("Request aborted",nt.ECONNABORTED,e,m)),f(),m=null)},m.onerror=function(R){const T=R&&R.message?R.message:"Network Error",_=new nt(T,nt.ERR_NETWORK,e,m);_.event=R||null,t(_),f(),m=null},m.ontimeout=function(){let R=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Jf;r.timeoutErrorMessage&&(R=r.timeoutErrorMessage),t(new nt(R,T.clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,e,m)),f(),m=null},c===void 0&&u.setContentType(null),"setRequestHeader"in m&&ve.forEach(lw(u),function(R,T){m.setRequestHeader(T,R)}),ve.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),g&&g!=="json"&&(m.responseType=r.responseType),s&&([l,p,o]=Du(s,!0),m.addEventListener("progress",l)),v&&m.upload&&([a,h]=Du(v),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(d=R=>{m&&(t(!R||R.type?new pc(null,e,m):R),m.abort(),f(),m=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const x=ep(r.url);if(x&&!Rr.protocols.includes(x)){t(new nt("Unsupported protocol "+x+":",nt.ERR_BAD_REQUEST,e)),f();return}m.send(c||null)})},SL=(e,n)=>{if(e=e?e.filter(Boolean):[],!n&&!e.length)return;const t=new AbortController;let r=!1;const c=function(s){if(!r){r=!0,g();const d=s instanceof Error?s:this.reason;t.abort(d instanceof nt?d:new pc(d instanceof Error?d.message:d))}};let u=n&&setTimeout(()=>{u=null,c(new nt(`timeout of ${n}ms exceeded`,nt.ETIMEDOUT))},n);const g=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(c):s.removeEventListener("abort",c)}),e=null)};e.forEach(s=>{if(!r){if(s.aborted){c.call(s);return}s.addEventListener("abort",c,{once:!0})}});const{signal:v}=t;return v.unsubscribe=()=>ve.asap(g),v},TL=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,c;for(;r<t;)c=r+n,yield e.slice(r,c),r=c},EL=async function*(e,n){for await(const t of IL(e))yield*TL(t,n)},IL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:t,value:r}=await n.read();if(t)break;yield r}}finally{await n.cancel()}},Rw=(e,n,t,r)=>{const c=EL(e,n);let u=0,g,v=s=>{g||(g=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:d,value:a}=await c.next();if(d){v(),s.close();return}let l=a.byteLength;if(t){let h=u+=l;t(h)}s.enqueue(new Uint8Array(a))}catch(d){throw v(d),d}},cancel(s){return v(s),c.return()}},{highWaterMark:2})},Lw=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Ow=(e,n,t)=>n+2<t&&Lw(e.charCodeAt(n+1))&&Lw(e.charCodeAt(n+2)),Nw=e=>e<=57?e-48:(e&223)-55,ML=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,RL=e=>e===9||e===10||e===12||e===13||e===32,LL=e=>{const n=Math.floor(e/4),t=e%4;return n*3+(t===2?1:t===3?2:0)},OL=e=>{const n=e.length;let t=0;return n>0&&e.charCodeAt(n-1)===61&&(t++,n>1&&e.charCodeAt(n-2)===61&&t++),Math.floor((n-t)*3/4)},NL=e=>{const n=e.length;let t=0,r=0,c=!1;for(let u=0;u<n;u++){let g=e.charCodeAt(u);if(g===37&&Ow(e,u,n)&&(g=Nw(e.charCodeAt(u+1))*16+Nw(e.charCodeAt(u+2)),u+=2),!RL(g)){if(g===61){r++;continue}if(!ML(g)||r>0){c=!0;continue}t++}}return c||r>2||r>0&&(t+r)%4!==0||t%4===1?OL(e):LL(t)},DL=(e,n)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),c=e.slice(t+1);if(/;base64/i.test(r))return n(c);let u=0;for(let g=0,v=c.length;g<v;g++){const s=c.charCodeAt(g);if(s===37&&Ow(c,g,v))u+=1,g+=2;else if(s<128)u+=1;else if(s<2048)u+=2;else if(s>=55296&&s<=56319&&g+1<v){const d=c.charCodeAt(g+1);d>=56320&&d<=57343?(u+=4,g++):u+=3}else u+=3}return u};function PL(e){const n=typeof e=="string"?e.indexOf("#"):-1;return DL(n===-1?e:e.slice(0,n),NL)}const tp="1.20.0",Dw=64*1024,zL={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Pu}=ve,BL=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(n,t)=>String.fromCharCode(parseInt(t,16))),Pw=e=>{if(!ve.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},zw=(e,...n)=>{try{return!!e(...n)}catch{return!1}},FL=e=>{const n=e.indexOf("://");let t=e;return n!==-1&&(t=t.slice(n+3)),t.includes("@")||t.includes(":")},jL=e=>{const n=ve.global!==void 0&&ve.global!==null?ve.global:globalThis,{ReadableStream:t,TextEncoder:r}=n;e=ve.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},e);const{fetch:c,Request:u,Response:g}=e,v=c?Pu(c):typeof fetch=="function",s=Pu(u),d=Pu(g);if(!v)return!1;const a=v&&Pu(t),l=v&&(typeof r=="function"?(w=>x=>w.encode(x))(new r):async w=>new Uint8Array(await new u(w).arrayBuffer())),h=s&&a&&zw(()=>{let w=!1;const x=new u(Rr.origin,{body:new t,method:"POST",get duplex(){return w=!0,"half"}}),R=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),w&&!R}),p=d&&a&&zw(()=>ve.isReadableStream(new g("").body)),o={stream:p&&(w=>w.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!o[w]&&(o[w]=(x,R)=>{let T=x&&x[w];if(T)return T.call(x);throw new nt(`Response type '${w}' is not supported`,nt.ERR_NOT_SUPPORT,R)})});const f=async w=>{if(w==null)return 0;if(ve.isBlob(w))return w.size;if(ve.isSpecCompliantForm(w))return(await new u(Rr.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(ve.isArrayBufferView(w)||ve.isArrayBuffer(w))return w.byteLength;if(ve.isURLSearchParams(w)&&(w=w+""),ve.isString(w))return(await l(w)).byteLength},m=async(w,x)=>ve.toFiniteNumber(w.getContentLength())??f(x);return async w=>{let{url:x,method:R,data:T,signal:_,cancelToken:C,timeout:P,onDownloadProgress:O,onUploadProgress:E,responseType:k,headers:B,withCredentials:N="same-origin",fetchOptions:M,maxContentLength:$,maxBodyLength:A,maxRedirects:D}=Mw(w);const j=ve.isNumber($)&&$>-1,U=ve.isNumber(A)&&A>-1,q=ee=>ve.hasOwnProp(w,ee)?w[ee]:void 0;let Q=c||fetch;k=k?(k+"").toLowerCase():"text";let re=SL([_,C&&C.toAbortSignal()],P),le=null;const ne=re&&re.unsubscribe&&(()=>{re.unsubscribe()});let ue,he=null;const oe=()=>new nt("Request body larger than maxBodyLength limit",nt.ERR_BAD_REQUEST,w,le);try{let ee;const ye=q("auth");if(ye){const Ie=ve.getSafeProp(ye,"username")||"",Ct=ve.getSafeProp(ye,"password")||"";ee={username:Ie,password:Ct}}if(FL(x)){const Ie=new URL(x,Rr.origin);if(!ee&&(Ie.username||Ie.password)){const Ct=Pw(Ie.username),St=Pw(Ie.password);ee={username:Ct,password:St}}(Ie.username||Ie.password)&&(Ie.username="",Ie.password="",x=Ie.href)}if(ee&&(B.delete("authorization"),B.set("Authorization","Basic "+btoa(BL((ee.username||"")+":"+(ee.password||""))))),j&&typeof x=="string"&&x.startsWith("data:")&&PL(x)>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,w,le);if(U&&R!=="get"&&R!=="head"){const Ie=await f(T);if(typeof Ie=="number"&&isFinite(Ie)&&(ue=Ie,Ie>A))throw oe()}const we=U&&(ve.isReadableStream(T)||ve.isStream(T)),Ae=(Ie,Ct,St)=>Rw(Ie,Dw,qt=>{if(U&&qt>A)throw he=oe();Ct&&Ct(qt)},St);if(h&&R!=="get"&&R!=="head"&&(E||we)){if(ue=ue??await m(B,T),ue!==0||we){let Ie=new u(x,{method:"POST",body:T,duplex:"half"}),Ct;if(ve.isFormData(T)&&(Ct=Ie.headers.get("content-type"))&&B.setContentType(Ct),Ie.body){const[St,qt]=E&&$w(ue,Du(Sw(E)))||[];T=Ae(Ie.body,St,qt)}}}else if(we&&!s&&a&&R!=="get"&&R!=="head")T=Ae(T);else if(we&&s&&!h&&R!=="get"&&R!=="head")throw new nt("Stream request bodies are not supported by the current fetch implementation",nt.ERR_NOT_SUPPORT,w,le);ve.isString(N)||(N=N?"include":"omit");const Je=s&&"credentials"in u.prototype;if(ve.isFormData(T)){const Ie=B.getContentType();Ie&&/^multipart\/form-data/i.test(Ie)&&!/boundary=/i.test(Ie)&&B.delete("content-type")}B.set("User-Agent","axios/"+tp,!1);const Be=M==null?M:Object.assign(Object.create(null),M);Be&&(delete Be.body,delete Be.headers,delete Be.method,delete Be.signal,delete Be.duplex,delete Be.credentials);const Ye=Object.assign(Object.create(null),Be,{signal:re,method:R.toUpperCase(),headers:lw(B.normalize()),body:T,duplex:"half",credentials:Je?N:void 0});s&&(ve.forEach(zL,(Ie,Ct)=>{Ye[Ct]===void 0&&(Ye[Ct]=Ie)}),Ye.signal===void 0&&(Ye.signal=null),Ye.body===void 0&&(Ye.body=null)),D===0&&(Ye.redirect="manual",Be&&(Be.redirect="manual")),le=s&&new u(x,Ye);let Ze=await(s?Q(le,Be):Q(x,Ye));const lt=Qr.from(Ze.headers);if(j){const Ie=ve.toFiniteNumber(lt.getContentLength());if(Ie!=null&&Ie>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,w,le)}const ct=p&&(k==="stream"||k==="response");if(p&&Ze.body&&(O||j||ct&&ne)){const Ie={};["status","statusText","headers"].forEach(pt=>{Ie[pt]=Ze[pt]});const Ct=ve.toFiniteNumber(lt.getContentLength()),[St,qt]=O&&$w(Ct,Du(Sw(O),!0))||[];let dn=0;const Sn=pt=>{if(j&&(dn=pt,dn>$))throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,w,le);St&&St(pt)};Ze=new g(Rw(Ze.body,Dw,Sn,()=>{qt&&qt(),ne&&ne()}),Ie)}k=k||"text";let jt=await o[ve.findKey(o,k)||"text"](Ze,w);if(j&&!p&&!ct){let Ie;if(jt!=null&&(typeof jt.byteLength=="number"?Ie=jt.byteLength:typeof jt.size=="number"?Ie=jt.size:typeof jt=="string"&&(Ie=typeof r=="function"?new r().encode(jt).byteLength:jt.length)),typeof Ie=="number"&&Ie>$)throw new nt("maxContentLength size of "+$+" exceeded",nt.ERR_BAD_RESPONSE,w,le)}return!ct&&ne&&ne(),await new Promise((Ie,Ct)=>{_w(Ie,Ct,{data:jt,headers:Qr.from(Ze.headers),status:Ze.status,statusText:Ze.statusText,config:w,request:le})})}catch(ee){if(ne&&ne(),re&&re.aborted&&re.reason instanceof nt){const ye=re.reason;throw ye.config=w,le&&(ye.request=le),ee!==ye&&Object.defineProperty(ye,"cause",{__proto__:null,value:ee,writable:!0,enumerable:!1,configurable:!0}),ye}if(he)throw le&&!he.request&&(he.request=le),he;if(ee instanceof nt)throw le&&!ee.request&&(ee.request=le),ee;if(ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)){const ye=new nt("Network Error",nt.ERR_NETWORK,w,le,ee&&ee.response);throw Object.defineProperty(ye,"cause",{__proto__:null,value:ee.cause||ee,writable:!0,enumerable:!1,configurable:!0}),ye}throw nt.from(ee,ee&&ee.code,w,le,ee&&ee.response)}}},WL=new Map,Bw=e=>{let n=e&&e.env||{};const{fetch:t,Request:r,Response:c}=n,u=[r,c,t];let g=u.length,v=g,s,d,a=WL;for(;v--;)s=u[v],d=a.get(s),d===void 0&&a.set(s,d=v?new Map:jL(n)),a=d;return d};Bw();const np={http:KR,xhr:$L,fetch:{get:Bw}};ve.forEach(np,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:n})}});const Fw=e=>`- ${e}`,HL=e=>ve.isFunction(e)||e===null||e===!1;function UL(e,n){e=ve.isArray(e)?e:[e];const{length:t}=e;let r,c;const u={};for(let g=0;g<t;g++){r=e[g];let v;if(c=r,!HL(r)&&(c=np[(v=String(r)).toLowerCase()],c===void 0))throw new nt(`Unknown adapter '${v}'`);if(c&&(ve.isFunction(c)||(c=c.get(n))))break;u[v||"#"+g]=c}if(!c){const g=Object.entries(u).map(([s,d])=>`adapter ${s} `+(d===!1?"is not supported by the environment":"is not available in the build"));let v=t?g.length>1?`since :
1483
+ `+g.map(Fw).join(`
1484
+ `):" "+Fw(g[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+v,nt.ERR_NOT_SUPPORT)}return c}const jw={getAdapter:UL,adapters:np};function rp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pc(null,e)}function ip(e){const n=ve.toSafeFlatObject(e);return rp(n),n.headers=Qr.from(ve.getSafeProp(n,"headers")),n.data=Xf.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),jw.getAdapter(n.adapter||fc.adapter,n)(n).then(function(t){rp(n),n.response=t;try{t.data=Xf.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Qr.from(t.headers),t},function(t){if(!kw(t)&&(rp(n),t&&t.response)){n.response=t.response;try{t.response.data=Xf.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Qr.from(t.response.headers)}return Promise.reject(t)})}const zu={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{zu[e]=function(t){return typeof t===e||"a"+(n<1?"n ":" ")+e}});const Ww={};zu.transitional=function(e,n,t){function r(c,u){return"[Axios v"+tp+"] Transitional option '"+c+"'"+u+(t?". "+t:"")}return(c,u,g)=>{if(e===!1)throw new nt(r(u," has been removed"+(n?" in "+n:"")),nt.ERR_DEPRECATED);return n&&!Ww[u]&&(Ww[u]=!0,console.warn(r(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(c,u,g):!0}},zu.spelling=function(e){return(n,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function VL(e,n,t){if(typeof e!="object"||e===null)throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let c=r.length;for(;c-- >0;){const u=r[c],g=Object.prototype.hasOwnProperty.call(n,u)?n[u]:void 0;if(g){const v=e[u],s=v===void 0||g(v,u,e);if(s!==!0)throw new nt("option "+u+" must be "+s,nt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new nt("Unknown option "+u,nt.ERR_BAD_OPTION)}}const Bu={assertOptions:VL,validators:zu},Zr=Bu.validators;let ka=class{constructor(n){this.defaults=n||{},this.interceptors={request:new yw,response:new yw}}async request(n,t){try{return await this._request(n,t)}catch(r){if(r instanceof Error)try{let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const u=c.stack;let g="";if(typeof u=="string"){const v=u.indexOf(`
1485
+ `);g=v===-1?"":u.slice(v+1)}if(!r.stack)r.stack=g;else if(g){const v=g.indexOf(`
1486
+ `),s=v===-1?-1:g.indexOf(`
1487
+ `,v+1),d=s===-1?"":g.slice(s+1);String(r.stack).endsWith(d)||(r.stack+=`
1488
+ `+g)}}catch{}throw r}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=Ca(this.defaults,t);const{transitional:r,paramsSerializer:c,headers:u}=t;r!==void 0&&Bu.assertOptions(r,{silentJSONParsing:Zr.transitional(Zr.boolean),forcedJSONParsing:Zr.transitional(Zr.boolean),clarifyTimeoutError:Zr.transitional(Zr.boolean),legacyInterceptorReqResOrdering:Zr.transitional(Zr.boolean),advertiseZstdAcceptEncoding:Zr.transitional(Zr.boolean),validateStatusUndefinedResolves:Zr.transitional(Zr.boolean)},!1),c!=null&&(ve.isFunction(c)?t.paramsSerializer={serialize:c}:Bu.assertOptions(c,{encode:Zr.function,serialize:Zr.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Bu.assertOptions(t,{baseUrl:Zr.spelling("baseURL"),withXsrfToken:Zr.spelling("withXSRFToken")},!0),t.method=(ve.getSafeProp(t,"method")||ve.getSafeProp(this.defaults,"method")||"get").toLowerCase();let g=u&&ve.merge(u.common,u[t.method]);u&&ve.forEach(Cw.concat("common"),o=>{delete u[o]}),t.headers=Qr.concat(g,u);const v=[];let s=!0;this.interceptors.request.forEach(function(o){if(typeof o.runWhen=="function"&&o.runWhen(t)===!1)return;s=s&&o.synchronous;const f=t.transitional||Jf;f&&f.legacyInterceptorReqResOrdering?v.unshift(o.fulfilled,o.rejected):v.push(o.fulfilled,o.rejected)});const d=[];this.interceptors.response.forEach(function(o){d.push(o.fulfilled,o.rejected)});let a,l=0,h;if(!s){const o=[ip.bind(this),void 0];for(o.unshift(...v),o.push(...d),h=o.length,a=Promise.resolve(t);l<h;)a=a.then(o[l++],o[l++]);return a}h=v.length;let p=t;for(;l<h;){const o=v[l++],f=v[l++];try{p=o?o(p):p}catch(m){if(!f){a=Promise.reject(m);break}try{const w=f.call(this,m);ve.isThenable(w)&&(a=Promise.resolve(w).then(()=>ip.call(this,p)))}catch(w){a=Promise.reject(w)}break}}if(!a)try{a=ip.call(this,p)}catch(o){a=Promise.reject(o)}for(l=0,h=d.length;l<h;)a=a.then(d[l++],d[l++]);return a}getUri(n){n=Ca(this.defaults,n);const t=Ew(n.baseURL,n.url,n.allowAbsoluteUrls,n);return gw(t,n.params,n.paramsSerializer)}};ve.forEach(["delete","get","head","options"],function(e){ka.prototype[e]=function(n,t){return this.request(Ca(t||{},{method:e,url:n,data:t&&ve.hasOwnProp(t,"data")?t.data:void 0}))}}),ve.forEach(["post","put","patch","query"],function(e){function n(t){return function(r,c,u){return this.request(Ca(u||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:c}))}}ka.prototype[e]=n(),e!=="query"&&(ka.prototype[e+"Form"]=n(!0))});let GL=class ck{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(c){t=c});const r=this;this.promise.then(c=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](c);r._listeners=null}),this.promise.then=c=>{let u;const g=new Promise(v=>{r.subscribe(v),u=v}).then(c);return g.cancel=function(){r.unsubscribe(u)},g},n(function(c,u,g){r.reason||(r.reason=new pc(c,u,g),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new ck(function(t){n=t}),cancel:n}}};function qL(e){return function(n){return e.apply(null,n)}}function YL(e){return ve.isObject(e)&&e.isAxiosError===!0}const Fu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fu).forEach(([e,n])=>{Fu[n]===void 0&&(Fu[n]=e)});function Hw(e){const n=new ka(e),t=K0(ka.prototype.request,n);return ve.extend(t,ka.prototype,n,{allOwnKeys:!0}),ve.extend(t,n,null,{allOwnKeys:!0}),t.create=function(r){return Hw(Ca(e,r))},t}const gr=ir("A",Hw(fc));gr.Axios=ka,gr.CanceledError=pc,gr.CancelToken=GL,gr.isCancel=kw,gr.VERSION=tp,gr.toFormData=Nu,gr.AxiosError=nt,gr.Cancel=gr.CanceledError,gr.all=function(e){return Promise.all(e)},gr.spread=qL,gr.isAxiosError=YL,gr.mergeConfig=Ca,gr.AxiosHeaders=Qr,gr.formToJSON=e=>xw(ve.isHTMLForm(e)?new FormData(e):e),gr.getAdapter=jw.getAdapter,gr.HttpStatusCode=Fu,gr.default=gr;const{Axios:S3,AxiosError:T3,CanceledError:E3,isCancel:I3,CancelToken:M3,VERSION:R3,all:L3,Cancel:O3,isAxiosError:N3,spread:D3,toFormData:P3,AxiosHeaders:z3,HttpStatusCode:B3,formToJSON:F3,getAdapter:j3,mergeConfig:W3,create:H3}=gr,KL="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=",JL={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return KL},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const e=rO.indexOf(op[this.status]),n=1-(e-1)*.05,t=224*this.scaleFactor*n,r=32*this.scaleFactor*n,c=32*this.scaleFactor*n;return[`background-image: url(${this.icons});`,`background-position-x: -${e*c}px;`,`background-size: ${t}px ${r}px;`,`height: ${c}px;`,`width: ${c}px;`,`padding-top: ${e-1}px;`].join("")}}};function QL(e,n,t,r,c,u){return xt(),tn("div",{style:Xn(u.iconStyle)},null,4)}const ZL=Ns(JL,[["render",QL]]),XL={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function eO(e,n,t,r,c,u){const g=Gt("rux-icon");return xt(),or(g,{size:t.size,icon:t.icon,style:Xn(u.colorStyle)},null,8,["size","icon","style"])}const tO=Ns(XL,[["render",eO],["__scopeId","data-v-bb4cd487"]]),op={fatal:"fatal",FATAL:"fatal",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"off"},sp={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},nO=function(e){const n="#000000",t="#ffffff",r=sp[op[e]];if(r){const c=+`0x${r.slice(1,3)}`,u=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((c*299+u*587+g*114)/1e3>128)return n}return t},rO=Object.keys(sp),iO={astro:{component:e=>Eo(tO,{...e})},"astro-status":{component:e=>Eo(ZL,{...e,status:e.icon})}},oO={extras:{component:e=>Eo($k,{...e})}},sO={props:{configKey:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","warning","success"],data(){return{configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(e=>e.configId===this.selectedRows[0]):null},error:function(){return this.selectedItem===""||this.selectedItem===null?"Must select a config":null},show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},mounted(){let e=-1;new ql().list_configs(this.configKey).then(n=>{this.configs=n.map(t=>(e+=1,{configId:e,config:t}))}).catch(n=>{this.$emit("warning",`Failed to connect to OpenC3. ${n}`)})},methods:{selectRow:function(e){this.selectedRows=[e.item.configId]},success:function(){this.selectedItem&&(this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedRows=[])},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[]},deleteConfig:function(e){this.$dialog.confirm(`Are you sure you want to delete: ${e.config}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>{this.selectedItem?.config===e.config&&(this.selectedRows=[]),this.configs.splice(this.configs.indexOf(e),1),new ql().delete_config(this.configKey,e.config).catch(console.error)}).catch(n=>{n!==!0&&this.$emit("warning",`Failed to delete config ${e.config} Error: ${n}`)})}}},aO={class:"mt-4 pa-3"},lO=["textContent"];function cO(e,n,t,r,c,u){const g=Gt("v-spacer"),v=Gt("v-toolbar"),s=Gt("v-text-field"),d=Gt("v-row"),a=Gt("v-btn"),l=Gt("v-data-table"),h=Gt("v-card-text"),p=Gt("v-card-actions"),o=Gt("v-card"),f=Gt("v-dialog");return xt(),or(f,{modelValue:u.show,"onUpdate:modelValue":n[4]||(n[4]=m=>u.show=m),persistent:"",width:"600",onKeydown:jc(u.cancel,["esc"])},{default:It(()=>[De(o,null,{default:It(()=>[dt("form",{onSubmit:n[3]||(n[3]=Tl((...m)=>u.success&&u.success(...m),["prevent"]))},[De(v,{height:"24"},{default:It(()=>[De(g),n[5]||(n[5]=dt("span",null,"Open Configuration",-1)),De(g)]),_:1}),De(h,null,{default:It(()=>[dt("div",aO,[De(d,{dense:""},{default:It(()=>[De(s,{modelValue:c.search,"onUpdate:modelValue":n[0]||(n[0]=m=>c.search=m),label:"Search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),De(l,{modelValue:c.selectedRows,"onUpdate:modelValue":n[1]||(n[1]=m=>c.selectedRows=m),"show-select":"","select-strategy":"single","item-value":"configId",search:c.search,headers:c.headers,items:c.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":n[2]||(n[2]=(m,w)=>u.selectRow(w))},{"item.actions":It(({item:m})=>[De(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:w=>u.deleteConfig(m)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),De(d,{dense:""},{default:It(()=>[Ls(dt("span",{class:"ma-2 text-red",textContent:Ir(u.error)},null,8,lO),[[El,u.error]])]),_:1})])]),_:1}),De(p,{class:"px-2"},{default:It(()=>[De(g),De(a,{variant:"outlined","data-test":"open-config-cancel-btn",onClick:u.cancel},{default:It(()=>[...n[6]||(n[6]=[ai(" Cancel ",-1)])]),_:1},8,["onClick"]),De(a,{variant:"flat",type:"submit","data-test":"open-config-submit-btn",disabled:!!u.error,onClick:Tl(u.success,["prevent"])},{default:It(()=>[...n[7]||(n[7]=[ai(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const U3=ir("h",Ns(sO,[["render",cO]])),uO={props:{configKey:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","warning","success"],data(){return{configName:"",configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(e=>e.configId===this.selectedRows[0]):null},error:function(){return this.configName?/^[A-Za-z0-9_\-. ]+$/.test(this.configName)?null:"Config name must only contain letters, numbers, hyphens, underscores, spaces, and periods":"Config must have a name"},show:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},watch:{selectedItem:function(e){e&&(this.configName=e.config)}},mounted(){let e=-1;new ql().list_configs(this.configKey).then(n=>{this.configs=n.map(t=>(e+=1,{configId:e,config:t}))}).catch(n=>{this.$emit("warning",`Failed to connect to OpenC3. ${n}`)})},methods:{selectRow:function(e){this.selectedRows=[e.item.configId]},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},deleteConfig:function(e){this.$dialog.confirm(`Are you sure you want to delete: ${e.config}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>{this.selectedItem?.config===e.config&&(this.selectedRows=[],this.configName=""),this.configs.splice(this.configs.indexOf(e),1),new ql().delete_config(this.configKey,e.config).catch(console.error)}).catch(n=>{n!==!0&&this.$emit("warning",`Failed to delete config ${e.config} Error: ${n}`)})}}},hO={class:"mt-4 pa-3"},dO=["textContent"];function fO(e,n,t,r,c,u){const g=Gt("v-spacer"),v=Gt("v-toolbar"),s=Gt("v-text-field"),d=Gt("v-row"),a=Gt("v-btn"),l=Gt("v-data-table"),h=Gt("v-card-text"),p=Gt("v-card-actions"),o=Gt("v-card"),f=Gt("v-dialog");return xt(),or(f,{modelValue:u.show,"onUpdate:modelValue":n[5]||(n[5]=m=>u.show=m),persistent:"",width:"600",onKeydown:jc(u.cancel,["esc"])},{default:It(()=>[De(o,null,{default:It(()=>[dt("form",{onSubmit:n[4]||(n[4]=Tl((...m)=>u.success&&u.success(...m),["prevent"]))},[De(v,{height:"24"},{default:It(()=>[De(g),n[6]||(n[6]=dt("span",null,"Save Configuration",-1)),De(g)]),_:1}),De(h,null,{default:It(()=>[dt("div",hO,[De(d,{dense:""},{default:It(()=>[De(s,{modelValue:c.search,"onUpdate:modelValue":n[0]||(n[0]=m=>c.search=m),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),De(l,{modelValue:c.selectedRows,"onUpdate:modelValue":n[1]||(n[1]=m=>c.selectedRows=m),"show-select":"","select-strategy":"single","item-value":"configId",search:c.search,headers:c.headers,items:c.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":n[2]||(n[2]=(m,w)=>u.selectRow(w))},{"item.actions":It(({item:m})=>[De(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:w=>u.deleteConfig(m)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),De(d,{dense:""},{default:It(()=>[De(s,{modelValue:c.configName,"onUpdate:modelValue":n[3]||(n[3]=m=>c.configName=m),"hide-details":"",autofocus:"",disabled:!!u.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},null,8,["modelValue","disabled"])]),_:1}),De(d,{dense:""},{default:It(()=>[Ls(dt("span",{class:"ma-2 text-red",textContent:Ir(u.error)},null,8,dO),[[El,u.error]])]),_:1})])]),_:1}),De(p,{class:"px-2"},{default:It(()=>[De(g),De(a,{variant:"outlined",onClick:u.cancel},{default:It(()=>[...n[7]||(n[7]=[ai(" Cancel ",-1)])]),_:1},8,["onClick"]),De(a,{variant:"flat",type:"submit","data-test":"save-config-submit-btn",disabled:!!u.error,onClick:Tl(u.success,["prevent"])},{default:It(()=>[...n[8]||(n[8]=[ai(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const V3=ir("I",Ns(uO,[["render",fO]])),pO=50,gO=2e3,Uw="single-spa:app-change",mO={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(Uw,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},gO)},unmounted(){window.removeEventListener(Uw,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(e){this.show=!e.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=Gh().length>0,Gh().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},pO)}}},vO={class:"mx-1"},yO={key:1,class:"d-flex justify-center align-center"};function bO(e,n,t,r,c,u){const g=Gt("v-card-title"),v=Gt("v-card-text"),s=Gt("v-card"),d=Gt("v-progress-circular");return xt(),tn(Er,null,[c.show?(xt(),or(s,{key:0},{default:It(()=>[De(g,null,{default:It(()=>[...n[0]||(n[0]=[ai(" 404 Not Found ",-1)])]),_:1}),De(v,{class:"d-flex align-center mt-3"},{default:It(()=>[n[1]||(n[1]=ai(" The requested URL ",-1)),dt("code",vO,Ir(e.$route.fullPath),1),n[2]||(n[2]=ai(" was not routable. ",-1)),n[3]||(n[3]=dt("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):qr("",!0),u.showSpinner?(xt(),tn("div",yO,[De(d,{indeterminate:""})])):qr("",!0)],64)}const Vw=[{path:"/",name:"DataExtractor",component:()=>vt(()=>gt.import("./DataExtractor-91032d97b7a5cff39728.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:Ns(mO,[["render",bO]])}];Vw.forEach(e=>um(e));const wO=im({history:om(),routes:Vw});function Gw(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function xO(e){if(Array.isArray(e))return e}function CO(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,c,u,g,v=[],s=!0,d=!1;try{if(u=(t=t.call(e)).next,n!==0)for(;!(s=(r=u.call(t)).done)&&(v.push(r.value),v.length!==n);s=!0);}catch(a){d=!0,c=a}finally{try{if(!s&&t.return!=null&&(g=t.return(),Object(g)!==g))return}finally{if(d)throw c}}return v}}function kO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1489
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _O(e,n){return xO(e)||CO(e,n)||AO(e,n)||kO()}function AO(e,n){if(e){if(typeof e=="string")return Gw(e,n);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Gw(e,n):void 0}}const qw=Object.entries,Yw=Object.setPrototypeOf,$O=Object.isFrozen,Kw=Object.getPrototypeOf,Jw=Object.getOwnPropertyDescriptor;let Lr=Object.freeze,Br=Object.seal,ul=Object.create,Qw=typeof Reflect<"u"&&Reflect,ap=Qw.apply,lp=Qw.construct;Lr||(Lr=function(e){return e}),Br||(Br=function(e){return e}),ap||(ap=function(e,n){for(var t=arguments.length,r=new Array(t>2?t-2:0),c=2;c<t;c++)r[c-2]=arguments[c];return e.apply(n,r)}),lp||(lp=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];return new e(...t)});const ds=Un(Array.prototype.forEach),SO=Un(Array.prototype.lastIndexOf),Zw=Un(Array.prototype.pop),gc=Un(Array.prototype.push),TO=Un(Array.prototype.slice),EO=Un(Array.prototype.splice),hl=Array.isArray,cp=rx(Set),up=Un(Set.prototype.add),mc=Un(Set.prototype.has),_a=Un(String.prototype.toLowerCase),hp=Un(String.prototype.toString),Xw=Un(String.prototype.match),vc=Un(String.prototype.replace),ex=Un(String.prototype.indexOf),IO=Un(String.prototype.trim),MO=Un(Number.prototype.toString),RO=Un(Boolean.prototype.toString),tx=typeof BigInt>"u"?null:Un(BigInt.prototype.toString),nx=typeof Symbol>"u"?null:Un(Symbol.prototype.toString),Ai=Un(Object.prototype.hasOwnProperty),yc=Un(Object.prototype.toString),Fr=Un(RegExp.prototype.test),fs=rx(TypeError);function Un(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),c=1;c<t;c++)r[c-1]=arguments[c];return ap(e,n,r)}}function rx(e){return function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return lp(e,t)}}function hn(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_a;if(Yw&&Yw(e,null),!hl(n))return e;let r=n.length;for(;r--;){let c=n[r];if(typeof c=="string"){const u=t(c);u!==c&&($O(n)||(n[r]=u),c=u)}e[c]=!0}return e}function LO(e){for(let n=0;n<e.length;n++)Ai(e,n)||(e[n]=null);return e}function qi(e){const n=ul(null);for(const r of qw(e)){var t=_O(r,2);const c=t[0],u=t[1];Ai(e,c)&&(hl(u)?n[c]=LO(u):u&&typeof u=="object"&&u.constructor===Object?n[c]=qi(u):n[c]=u)}return n}function OO(e){switch(typeof e){case"string":return e;case"number":return MO(e);case"boolean":return RO(e);case"bigint":return tx?tx(e):"0";case"symbol":return nx?nx(e):"Symbol()";case"undefined":return yc(e);case"function":case"object":{if(e===null)return yc(e);const n=e,t=ho(n,"toString");if(typeof t=="function"){const r=t(n);return typeof r=="string"?r:yc(r)}return yc(e)}default:return yc(e)}}function ho(e,n){for(;e!==null;){const r=Jw(e,n);if(r){if(r.get)return Un(r.get);if(typeof r.value=="function")return Un(r.value)}e=Kw(e)}function t(){return null}return t}function NO(e,n){for(;e!==null;){const t=Jw(e,n);if(t)return t.get?Un(t.get):null;e=Kw(e)}return null}function DO(e){try{return Fr(e,""),!0}catch{return!1}}const ix=Lr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dp=Lr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fp=Lr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),PO=Lr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),pp=Lr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zO=Lr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ox=Lr(["#text"]),sx=Lr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),gp=Lr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ax=Lr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ju=Lr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),BO=Br(/{{[\w\W]*|^[\w\W]*}}/g),FO=Br(/<%[\w\W]*|^[\w\W]*%>/g),jO=Br(/\${[\w\W]*/g),WO=Br(/^data-[\-\w.\u00B7-\uFFFF]+$/),HO=Br(/^aria-[\-\w]+$/),lx=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),UO=Br(/^(?:\w+script|data):/i),VO=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),GO=Br(/^html$/i),qO=Br(/^[a-z][.\w]*(-[.\w]+)+$/i),mp=Br(/<[/\w!]/g),cx=Br(/<[/\w]/g),YO=Br(/<\/no(script|embed|frames)/i),ux=Br(/\/>/i),mr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},KO=Lr(hn({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),JO=function(){return typeof window>"u"?null:window},QO=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let t=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(t=n.getAttribute(r));const c="dompurify"+(t?"#"+t:"");try{return e.createPolicy(c,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},hx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ws=function(e,n,t,r){return Ai(e,n)&&hl(e[n])?hn(r.base?qi(r.base):{},e[n],r.transform):t},vp=function(e,n,t){const r=Ai(e,n)?e[n]:void 0;return r&&typeof r=="object"?qi(r):t()};function dx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:JO();const n=X=>dx(X);if(n.version="3.4.17",n.removed=[],!e||!e.document||e.document.nodeType!==mr.document||!e.Element)return n.isSupported=!1,n;let t=e.document;const r=t,c=r.currentScript;e.DocumentFragment;const u=e.HTMLTemplateElement,g=e.Node,v=e.Element,s=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,a=e.trustedTypes,l=v.prototype,h=ho(l,"cloneNode"),p=ho(l,"remove"),o=ho(l,"removeAttributeNode"),f=ho(l,"nextSibling"),m=ho(l,"childNodes"),w=ho(l,"parentNode"),x=ho(l,"shadowRoot"),R=ho(l,"attributes"),T=g&&g.prototype?ho(g.prototype,"nodeType"):null,_=g&&g.prototype?ho(g.prototype,"nodeName"):null,C=g&&g.prototype?ho(g.prototype,"ownerDocument"):null,P=function(X){return T?T(X):X.nodeType},O=function(X){return _?_(X):X.nodeName},E=NO(l,"namespaceURI"),k=function(X){return E?E(X):X.namespaceURI};if(typeof u=="function"){const X=t.createElement("template");X.content&&X.content.ownerDocument&&(t=X.content.ownerDocument)}let B,N="",M,$=!1,A=0;const D=function(){if(A>0)throw fs('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},j=function(X){D(),A++;try{return B.createHTML(X)}finally{A--}},U=function(X){D(),A++;try{return B.createScriptURL(X)}finally{A--}},q=function(){return $||(M=QO(a,c),$=!0),M},Q=t,re=Q.implementation,le=Q.createNodeIterator,ne=Q.createDocumentFragment,ue=Q.getElementsByTagName,he=r.importNode;let oe=hx();n.isSupported=typeof qw=="function"&&typeof w=="function"&&re&&re.createHTMLDocument!==void 0;const ee=BO,ye=FO,we=jO,Ae=WO,Je=HO,Be=UO,Ye=VO,Ze=qO;let lt=lx,ct=null;const jt=hn({},[...ix,...dp,...fp,...pp,...ox]);let Ie=null;const Ct=hn({},[...sx,...gp,...ax,...ju]);let St=Object.seal(ul(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),qt=null,dn=null;const Sn=Object.seal(ul(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let pt=!0,it=!0,Yt=!1,Fn=!0,Tn=!1,Dn=!0,Vn=!1,Ln=!1,Gn=null,er=null,fn=!1,Pn=!1,Ei=!1,Xr=!1,ei=!0,Ii=!1;const fo="user-content-";let vr=!0,Ji=!1,jr=null,po={},ur=null;const Us=hn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let gs=null;const Ko=hn({},["audio","video","img","source","image","track"]);let Mi=null;const qn=hn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ar="http://www.w3.org/1998/Math/MathML",Or="http://www.w3.org/2000/svg",vn="http://www.w3.org/1999/xhtml";let jn=vn,Ri=!1,di=null;const ms=hn({},[Ar,Or,vn],hp),vs=Lr(["mi","mo","mn","ms","mtext"]);let ys=hn({},vs);const bs=Lr(["annotation-xml"]);let fi=hn({},bs);const Li=hn({},["title","style","font","a","script"]);let Pt=null;const Vs=["application/xhtml+xml","text/html"],Nr="text/html";let zt=null,pn=null;const Yn=t.createElement("form"),go=function(X){return X instanceof RegExp||X instanceof Function},tr=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pn&&pn===X)return;(!X||typeof X!="object")&&(X={}),X=qi(X),Pt=Vs.indexOf(X.PARSER_MEDIA_TYPE)===-1?Nr:X.PARSER_MEDIA_TYPE,zt=Pt==="application/xhtml+xml"?hp:_a,ct=Ws(X,"ALLOWED_TAGS",jt,{transform:zt}),Ie=Ws(X,"ALLOWED_ATTR",Ct,{transform:zt}),di=Ws(X,"ALLOWED_NAMESPACES",ms,{transform:hp}),Mi=Ws(X,"ADD_URI_SAFE_ATTR",qn,{transform:zt,base:qn}),gs=Ws(X,"ADD_DATA_URI_TAGS",Ko,{transform:zt,base:Ko}),ur=Ws(X,"FORBID_CONTENTS",Us,{transform:zt}),qt=Ws(X,"FORBID_TAGS",qi({}),{transform:zt}),dn=Ws(X,"FORBID_ATTR",qi({}),{transform:zt}),po=Ai(X,"USE_PROFILES")?X.USE_PROFILES&&typeof X.USE_PROFILES=="object"?qi(X.USE_PROFILES):X.USE_PROFILES:!1,pt=X.ALLOW_ARIA_ATTR!==!1,it=X.ALLOW_DATA_ATTR!==!1,Yt=X.ALLOW_UNKNOWN_PROTOCOLS||!1,Fn=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Tn=X.SAFE_FOR_TEMPLATES||!1,Dn=X.SAFE_FOR_XML!==!1,Vn=X.WHOLE_DOCUMENT||!1,Pn=X.RETURN_DOM||!1,Ei=X.RETURN_DOM_FRAGMENT||!1,Xr=X.RETURN_TRUSTED_TYPE||!1,fn=X.FORCE_BODY||!1,ei=X.SANITIZE_DOM!==!1,Ii=X.SANITIZE_NAMED_PROPS||!1,vr=X.KEEP_CONTENT!==!1,Ji=X.IN_PLACE||!1,lt=DO(X.ALLOWED_URI_REGEXP)?X.ALLOWED_URI_REGEXP:lx,jn=typeof X.NAMESPACE=="string"?X.NAMESPACE:vn,ys=vp(X,"MATHML_TEXT_INTEGRATION_POINTS",()=>hn({},vs)),fi=vp(X,"HTML_INTEGRATION_POINTS",()=>hn({},bs));const xe=vp(X,"CUSTOM_ELEMENT_HANDLING",()=>ul(null));if(St=ul(null),Ai(xe,"tagNameCheck")&&go(xe.tagNameCheck)&&(St.tagNameCheck=xe.tagNameCheck),Ai(xe,"attributeNameCheck")&&go(xe.attributeNameCheck)&&(St.attributeNameCheck=xe.attributeNameCheck),Ai(xe,"allowCustomizedBuiltInElements")&&typeof xe.allowCustomizedBuiltInElements=="boolean"&&(St.allowCustomizedBuiltInElements=xe.allowCustomizedBuiltInElements),Br(St),Tn&&(it=!1),Ei&&(Pn=!0),po&&(ct=hn({},ox),Ie=ul(null),po.html===!0&&(hn(ct,ix),hn(Ie,sx)),po.svg===!0&&(hn(ct,dp),hn(Ie,gp),hn(Ie,ju)),po.svgFilters===!0&&(hn(ct,fp),hn(Ie,gp),hn(Ie,ju)),po.mathMl===!0&&(hn(ct,pp),hn(Ie,ax),hn(Ie,ju))),Sn.tagCheck=null,Sn.attributeCheck=null,Ai(X,"ADD_TAGS")&&(typeof X.ADD_TAGS=="function"?Sn.tagCheck=X.ADD_TAGS:hl(X.ADD_TAGS)&&(ct===jt&&(ct=qi(ct)),hn(ct,X.ADD_TAGS,zt))),Ai(X,"ADD_ATTR")&&(typeof X.ADD_ATTR=="function"?Sn.attributeCheck=X.ADD_ATTR:hl(X.ADD_ATTR)&&(Ie===Ct&&(Ie=qi(Ie)),hn(Ie,X.ADD_ATTR,zt))),Ai(X,"ADD_FORBID_CONTENTS")&&hl(X.ADD_FORBID_CONTENTS)&&(ur===Us&&(ur=qi(ur)),hn(ur,X.ADD_FORBID_CONTENTS,zt)),vr&&(ct["#text"]=!0),Vn&&hn(ct,["html","head","body"]),ct.table&&(hn(ct,["tbody"]),delete qt.tbody),X.TRUSTED_TYPES_POLICY){if(typeof X.TRUSTED_TYPES_POLICY.createHTML!="function")throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof X.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Me=B;B=X.TRUSTED_TYPES_POLICY;try{N=j("")}catch(Oe){throw B=Me,Oe}}else X.TRUSTED_TYPES_POLICY===null?(B=void 0,N=""):(B===void 0&&(B=q()),B&&typeof N=="string"&&(N=j("")));Lr&&Lr(X),pn=X},mo=hn({},[...dp,...fp,...PO]),Oi=hn({},[...pp,...zO]),ws=function(X,xe,Me){return xe.namespaceURI===vn?X==="svg":xe.namespaceURI===Ar?X==="svg"&&(Me==="annotation-xml"||ys[Me]):!!mo[X]},vo=function(X,xe,Me){return xe.namespaceURI===vn?X==="math":xe.namespaceURI===Or?X==="math"&&fi[Me]:!!Oi[X]},pi=function(X,xe,Me){return xe.namespaceURI===Or&&!fi[Me]||xe.namespaceURI===Ar&&!ys[Me]?!1:!Oi[X]&&(Li[X]||!mo[X])},Do=function(X){const xe=k(X),Me=_a(O(X)),Oe=w(X);let Ke,He;return Oe&&P(Oe)===mr.element?(Ke={namespaceURI:k(Oe)},He=_a(O(Oe))):(Ke={namespaceURI:jn},He="template"),di[xe]?xe===Or?ws(Me,Ke,He):xe===Ar?vo(Me,Ke,He):xe===vn?pi(Me,Ke,He):!!(Pt==="application/xhtml+xml"&&di[xe]):!1},ti=function(X){gc(n.removed,{element:X});try{w(X).removeChild(X)}catch{if(p(X),!w(X))throw fs("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Dr=function(X,xe,Me){try{o(X,xe)}catch{try{X.removeAttribute(Me)}catch{}}},yo=function(X){nr(X);const xe=m(X);xe&&ds(TO(xe),Oe=>{try{p(Oe)}catch{}});const Me=P(X)===mr.element?R(X):null;if(Me)for(let Oe=Me.length-1;Oe>=0;--Oe){const Ke=Me[Oe],He=Ke&&Ke.name;typeof He=="string"&&Dr(X,Ke,He)}},Ni=function(X,xe,Me){if(!Me)try{Me=xe.getAttributeNode(X)}catch{Me=null}gc(n.removed,{attribute:Me||null,from:xe});try{Me?o(xe,Me):xe.removeAttribute(X)}catch{try{xe.removeAttribute(X)}catch{}}if(X==="is")if(Pn||Ei)try{ti(xe)}catch{}else try{xe.setAttribute(X,"")}catch{}},Jo=function(X){const xe=R(X);if(xe)for(let Me=xe.length-1;Me>=0;--Me){const Oe=xe[Me],Ke=Oe&&Oe.name;typeof Ke!="string"||Ie[zt(Ke)]||Dr(X,Oe,Ke)}},Po=function(X,xe){let Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const Oe=[X];for(;Oe.length>0;){const Ke=Oe.pop();if(xe(Ke)===!1)continue;if(Me&&P(Ke)===mr.element){const rt=x(Ke);Kn(rt)&&Oe.push(rt)}const He=m(Ke);if(He)for(let rt=He.length-1;rt>=0;--rt)Oe.push(He[rt])}},nr=function(X){Po(X,xe=>{P(xe)===mr.element&&Jo(xe)})},zo=function(X){const xe=[];return Po(X,Me=>{xe.push(Me)},!0),xe},Qo=function(X,xe){const Me=cp();ds(zo(X),Oe=>{P(Oe)===mr.element&&up(Me,Oe)}),ds(xe,Oe=>{P(Oe)===mr.element&&!mc(Me,Oe)&&Jo(Oe)})},Qi=function(X,xe){let Me=!1;return ds(n.removed,Oe=>{Oe.element&&(Me=Me||Oe.element===X,nr(Oe.element))}),Qo(X,xe),Me},xs=8,Zo=function(X,xe){const Me=jr;let Oe=null;const Ke=()=>(Oe||(Oe=cp(),ds(xe,He=>{up(Oe,He)})),Oe);for(let He=0;;He++){const rt=zo(X),sn=[X];let wn=!1;if(ds(rt,Ge=>{P(Ge)===mr.documentFragment?gc(sn,Ge):!wn&&!mc(Me,Ge)&&(wn=mc(Ke(),Ge))}),!wn)return;if(He>=xs)throw fs("the tree kept changing during in-place sanitization; refusing to return it");ds(sn,(Ge,Wt)=>{Bo(Ge,Wt>0,X,Ke())})}},Bo=function(X,xe,Me,Oe){const Ke=Di(X);let He;for(;He=Ke.nextNode();)!mc(Oe,He)||mc(jr,He)||(xe&&Pr(oe.uponSanitizeShadowNode,He,null),ns(He,Me),mi(He,Me),Kn(He.content)&&En(He.content))},Cs=function(X){jr&&up(jr,X)},Xo=function(X,xe){return Dn?X==="patchsrc"?!0:X==="for"&&xe!=="label"&&xe!=="output":!1},es=function(X){Dn&&Po(X,xe=>{const Me=P(xe);if(Me===mr.processingInstruction||Me===mr.comment&&Fr(cx,xe.data)){try{p(xe)}catch{}return!1}if(Me===mr.element){const Oe=xe,Ke=zt(O(xe));try{Oe.hasAttribute&&Oe.hasAttribute("patchsrc")&&Oe.removeAttribute("patchsrc"),Oe.hasAttribute&&Oe.hasAttribute("for")&&Xo("for",Ke)&&Oe.removeAttribute("for")}catch{}}return!0})},ks=function(X){let xe=null,Me=null;if(fn)X="<remove></remove>"+X;else{const He=Xw(X,/^[\r\n\t ]+/);Me=He&&He[0]}Pt==="application/xhtml+xml"&&jn===vn&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");const Oe=B?j(X):X;if(jn===vn)try{xe=new d().parseFromString(Oe,Pt)}catch{}if(!xe||!xe.documentElement){xe=re.createDocument(jn,"template",null);try{xe.documentElement.innerHTML=Ri?N:Oe}catch{}}const Ke=xe.body||xe.documentElement;return X&&Me&&Ke.insertBefore(t.createTextNode(Me),Ke.childNodes[0]||null),jn===vn?ue.call(xe,Vn?"html":"body")[0]:Vn?xe.documentElement:Ke},Di=function(X){const xe=C?C(X):X.ownerDocument;return le.call(xe||X,X,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},Zi=function(X){return X=vc(X,ee," "),X=vc(X,ye," "),X=vc(X,we," "),X},gi=function(X){var xe;sr(X);const Me=(xe=X.querySelectorAll)===null||xe===void 0?void 0:xe.call(X,"template");Me&&ds(Me,Oe=>{Kn(Oe.content)&&gi(Oe.content)})},sr=function(X){X.normalize();const xe=C?C(X):X.ownerDocument,Me=le.call(xe||X,X,s.SHOW_TEXT|s.SHOW_COMMENT|s.SHOW_CDATA_SECTION|s.SHOW_PROCESSING_INSTRUCTION,null);let Oe=Me.nextNode();for(;Oe;)Oe.data=Zi(Oe.data),Oe=Me.nextNode()},bo=function(X){const xe=_?_(X):null;return typeof xe!="string"||zt(xe)!=="form"?!1:typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||X.attributes!==R(X)||typeof X.removeAttribute!="function"||typeof X.removeAttributeNode!="function"||typeof X.getAttributeNode!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function"||X.nodeType!==T(X)||X.childNodes!==m(X)},Kn=function(X){if(!T||typeof X!="object"||X===null)return!1;try{return T(X)===mr.documentFragment}catch{return!1}},wo=function(X){if(!T||typeof X!="object"||X===null)return!1;try{return typeof T(X)=="number"}catch{return!1}};function Pr(X,xe,Me){X.length!==0&&ds(X,Oe=>{Oe.call(n,xe,Me,pn)})}const ts=function(X,xe){return!!(Dn&&X.hasChildNodes()&&!wo(X.firstElementChild)&&Fr(mp,X.textContent)&&Fr(mp,X.innerHTML)||Dn&&KO[xe]&&P(X)===mr.element&&k(X)===vn&&(wo(X.firstElementChild)||typeof X.textContent=="string"&&Fr(mp,X.textContent))||X.nodeType===mr.processingInstruction||Dn&&X.nodeType===mr.comment&&Fr(cx,X.data))},ni=function(X,xe){if(X instanceof RegExp)return Fr(X,xe);if(X instanceof Function){for(var Me=arguments.length,Oe=new Array(Me>2?Me-2:0),Ke=2;Ke<Me;Ke++)Oe[Ke-2]=arguments[Ke];return!!X(xe,...Oe)}return!1},Fo=function(X,xe,Me){if(!qt[xe]&&rs(xe)&&ni(St.tagNameCheck,xe))return!1;if(vr&&!ur[xe]&&!ur[_a(xe)]){const Oe=w(X),Ke=m(X);if(Ke&&Oe){const He=Ke.length;for(let rt=He-1;rt>=0;--rt){const sn=X===Me?h(Ke[rt],!0):Ke[rt];Oe.insertBefore(sn,f(X))}}}return ti(X),!0},jo=function(X,xe,Me,Oe){return X.length===0?xe:xe===Me||xe===Oe?qi(xe):xe},Wr=function(X,xe){return X===xe||w(X)!==null?!1:(Ji&&nr(X),!0)},ns=function(X,xe){if(Cs(X),Pr(oe.beforeSanitizeElements,X,null),Wr(X,xe))return!0;if(bo(X))return ti(X),!0;const Me=zt(O(X));if(ct=jo(oe.uponSanitizeElement,ct,jt,Gn),Pr(oe.uponSanitizeElement,X,{tagName:Me,allowedTags:ct}),Wr(X,xe))return!0;if(ts(X,Me))return ti(X),!0;if(qt[Me]||!(Sn.tagCheck instanceof Function&&Sn.tagCheck(Me))&&!ct[Me]){const Oe=Fo(X,Me,xe);return Oe===!1&&(Pr(oe.afterSanitizeElements,X,null),Wr(X,xe))?!0:Oe}if(P(X)===mr.element&&!Do(X)||(Me==="noscript"||Me==="noembed"||Me==="noframes")&&Fr(YO,X.innerHTML))return ti(X),!0;if(Tn&&X.nodeType===mr.text){const Oe=Zi(X.textContent);X.textContent!==Oe&&(gc(n.removed,{element:X.cloneNode()}),X.textContent=Oe)}return Pr(oe.afterSanitizeElements,X,null),Wr(X,xe)},Xi=function(X,xe,Me){if(dn[xe]||Xo(xe,X)||ei&&(xe==="id"||xe==="name")&&(Me in t||Me in Yn))return!1;const Oe=Ie[xe]||Sn.attributeCheck instanceof Function&&Sn.attributeCheck(xe,X);return it&&Fr(Ae,xe)||pt&&Fr(Je,xe)?!0:Oe?Mi[xe]||Fr(lt,vc(Me,Ye,""))||(xe==="src"||xe==="xlink:href"||xe==="href")&&X!=="script"&&ex(Me,"data:")===0&&gs[X]||Yt&&!Fr(Be,vc(Me,Ye,""))?!0:!Me:rs(X)&&ni(St.tagNameCheck,X)&&ni(St.attributeNameCheck,xe,X)||xe==="is"&&St.allowCustomizedBuiltInElements&&ni(St.tagNameCheck,Me)},Ve=hn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),rs=function(X){return!Ve[_a(X)]&&Fr(Ze,X)},je=function(X,xe,Me,Oe){if(B&&typeof a=="object"&&typeof a.getAttributeType=="function"&&!Me)switch(a.getAttributeType(X,xe)){case"TrustedHTML":return j(Oe);case"TrustedScriptURL":return U(Oe)}return Oe},Wn=function(X,xe,Me,Oe){try{return Me?X.setAttributeNS(Me,xe,Oe):X.setAttribute(xe,Oe),bo(X)?(ti(X),!1):!0}catch{return Ni(xe,X),!1}},xo=function(X,xe){return Dn&&Fr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,xe)?!0:_a(X)==="attributename"&&Xw(xe,"href")!==null},mi=function(X,xe){if(Pr(oe.beforeSanitizeAttributes,X,null),Wr(X,xe))return;const Me=X.attributes;if(!Me||bo(X))return;Ie=jo(oe.uponSanitizeAttribute,Ie,Ct,er);const Oe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ie,forceKeepAttr:void 0};let Ke=Me.length;const He=zt(X.nodeName);for(;Ke--;){const rt=Me[Ke],sn=rt.name,wn=rt.namespaceURI,Ge=rt.value,Wt=zt(sn),wt=Ge;let cn=sn==="value"?wt:IO(wt),vi=!1;if(Oe.attrName=Wt,Oe.attrValue=cn,Oe.keepAttr=!0,Oe.forceKeepAttr=void 0,Pr(oe.uponSanitizeAttribute,X,Oe),cn=Oe.attrValue,Ii&&(Wt==="id"||Wt==="name")&&ex(cn,fo)!==0&&(Ni(sn,X,rt),cn=fo+cn,vi=!0),xo(sn,cn)){Ni(sn,X,rt);continue}if(!Oe.forceKeepAttr){if(!Oe.keepAttr){Ni(sn,X,rt);continue}if(!Fn&&Fr(ux,cn)){Ni(sn,X,rt);continue}if(Tn&&(cn=Zi(cn)),!Xi(He,Wt,cn)){Ni(sn,X,rt);continue}cn=je(He,Wt,wn,cn),cn!==wt&&Wn(X,sn,wn,cn)&&vi&&Zw(n.removed)}}Pr(oe.afterSanitizeAttributes,X,null),Wr(X,xe)},En=function(X){let xe=null;const Me=Di(X);for(Pr(oe.beforeSanitizeShadowDOM,X,null);xe=Me.nextNode();)if(Pr(oe.uponSanitizeShadowNode,xe,null),ns(xe,X),mi(xe,X),Kn(xe.content)&&En(xe.content),P(xe)===mr.element){const Oe=x(xe);Kn(Oe)&&(is(Oe),En(Oe))}Tn&&sr(X),Pr(oe.afterSanitizeShadowDOM,X,null)},is=function(X){const xe=[{node:X,shadow:null}];for(;xe.length>0;){const Me=xe.pop();if(Me.shadow){En(Me.shadow);continue}const Oe=Me.node,Ke=P(Oe)===mr.element,He=m(Oe);if(He)for(let rt=He.length-1;rt>=0;--rt)xe.push({node:He[rt],shadow:null});if(Ke){const rt=_?_(Oe):null;if(typeof rt=="string"&&zt(rt)==="template"){const sn=Oe.content;Kn(sn)&&xe.push({node:sn,shadow:null})}}if(Ke){const rt=x(Oe);Kn(rt)&&xe.push({node:null,shadow:rt},{node:rt,shadow:null})}}};return n.sanitize=function(X){let xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Me=null,Oe=null,Ke=null,He=null;if(Ri=!X,Ri&&(X="<!-->"),typeof X!="string"&&!wo(X)&&(X=OO(X),typeof X!="string"))throw fs("dirty is not a string, aborting");if(!n.isSupported)return X;Ln?(ct=Gn,Ie=er):tr(xe),(oe.uponSanitizeElement.length>0||oe.uponSanitizeAttribute.length>0)&&(ct=qi(ct)),oe.uponSanitizeAttribute.length>0&&(Ie=qi(Ie)),n.removed=[];const rt=Ji&&typeof X!="string"&&wo(X);let sn=[];const wn=jr;if(rt){es(X);const wt=O(X);if(typeof wt=="string"){const cn=zt(wt);if(!ct[cn]||qt[cn])throw yo(X),fs("root node is forbidden and cannot be sanitized in-place")}if(bo(X))throw yo(X),fs("root node is clobbered and cannot be sanitized in-place");sn=zo(X),jr=cp()}else if(wo(X))Me=ks("<!---->"),Oe=Me.ownerDocument.importNode(X,!0),Oe.nodeType===mr.element&&Oe.nodeName==="BODY"||Oe.nodeName==="HTML"?Me=Oe:Me.appendChild(Oe),is(Me);else{if(!Pn&&!Tn&&!Vn&&X.indexOf("<")===-1)return B&&Xr?j(X):X;if(Me=ks(X),!Me)return Pn?null:Xr?N:""}Me&&fn&&ti(Me.firstChild);const Ge=rt?X:Me;try{rt&&is(X);const wt=Di(Ge);for(;Ke=wt.nextNode();)ns(Ke,Ge),mi(Ke,Ge),Kn(Ke.content)&&En(Ke.content);rt&&Zo(X,sn)}catch(wt){throw rt&&(yo(X),Qi(X,sn)),wt}finally{jr=wn}if(rt){if(Qi(X,sn))throw fs("a node selected for removal could not be safely returned; refusing to sanitize in place");return Tn&&gi(X),X}if(Pn){if(Tn&&gi(Me),Ei)for(He=ne.call(Me.ownerDocument);Me.firstChild;)He.appendChild(Me.firstChild);else He=Me;return(Ie.shadowroot||Ie.shadowrootmode)&&(He=he.call(r,He,!0)),He}let Wt=Vn?Me.outerHTML:Me.innerHTML;return Vn&&ct["!doctype"]&&Me.ownerDocument&&Me.ownerDocument.doctype&&Me.ownerDocument.doctype.name&&Fr(GO,Me.ownerDocument.doctype.name)&&(Wt="<!DOCTYPE "+Me.ownerDocument.doctype.name+`>
1490
+ `+Wt),Tn&&(Wt=Zi(Wt)),B&&Xr?j(Wt):Wt},n.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tr(X),Ln=!0,Gn=ct,er=Ie},n.clearConfig=function(){pn=null,Ln=!1,Gn=null,er=null,B=M,N=""},n.isValidAttribute=function(X,xe,Me){pn||tr({});const Oe=zt(X),Ke=zt(xe);return typeof Me=="string"&&(xo(xe,Me)||!Fn&&Fr(ux,Me))?!1:Xi(Oe,Ke,Me)},n.addHook=function(X,xe){typeof xe=="function"&&Ai(oe,X)&&gc(oe[X],xe)},n.removeHook=function(X,xe){if(Ai(oe,X)){if(xe!==void 0){const Me=SO(oe[X],xe);return Me===-1?void 0:EO(oe[X],Me,1)[0]}return Zw(oe[X])}},n.removeHooks=function(X){Ai(oe,X)&&(oe[X]=[])},n.removeAllHooks=function(){oe=hx()},n}var fx=dx();const ZO={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"}},XO={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:e=>!!e||"Required.",match:e=>e===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`},sanitizedText:function(){return fx.sanitize(this.params.text)}},methods:{dialog:function(e,n,t){this.params=e,this.show=!0,this.resolve=n,this.reject=t},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},e2=["innerHTML"],t2={key:2},n2={key:3,class:"validate mt-4"};function r2(e,n,t,r,c,u){const g=Gt("v-spacer"),v=Gt("v-toolbar"),s=Gt("v-icon"),d=Gt("v-text-field"),a=Gt("v-card-text"),l=Gt("v-btn"),h=Gt("v-card-actions"),p=Gt("v-card"),o=Gt("v-dialog"),f=Gt("v-app");return xt(),or(f,null,{default:It(()=>[De(o,{modelValue:e.show,"onUpdate:modelValue":n[1]||(n[1]=m=>e.show=m),persistent:"",width:"600",onKeydown:jc(u.cancel,["esc"])},{default:It(()=>[De(p,null,{default:It(()=>[De(v,{height:"24"},{default:It(()=>[De(g),dt("span",null,Ir(e.params.title),1),De(g)]),_:1}),De(a,{class:"mt-4 pa-3"},{default:It(()=>[e.params.validateText?(xt(),or(s,{key:0,class:"mr-2"},{default:It(()=>[...n[2]||(n[2]=[ai(" mdi-alert ",-1)])]),_:1})):qr("",!0),e.params.html?(xt(),tn("span",{key:1,innerHTML:u.sanitizedText},null,8,e2)):(xt(),tn("span",t2,Ir(u.sanitizedText),1)),e.params.validateText?(xt(),tn("div",n2,[ai(" Enter "+Ir(e.params.validateText)+" to confirm! ",1),De(d,{modelValue:e.validationText,"onUpdate:modelValue":n[0]||(n[0]=m=>e.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[e.rules.required,e.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):qr("",!0)]),_:1}),De(h,{class:"px-2"},{default:It(()=>[De(g),e.params.cancelText?(xt(),or(l,{key:0,variant:"outlined","data-test":u.dataTestCancel,onClick:u.cancel},{default:It(()=>[ai(Ir(e.params.cancelText),1)]),_:1},8,["data-test","onClick"])):qr("",!0),De(l,{variant:"flat",color:e.params.okClass,"data-test":u.dataTestOk,onClick:u.ok},{default:It(()=>[ai(Ir(e.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const i2=Ns(XO,[["render",r2],["__scopeId","data-v-53691296"]]);class o2{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const n=window.Vue.createApp(i2);n.use(qp);const t=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(t),this.$root=n.mount(t),this.mounted=!0}open({title:n,text:t,okText:r,okClass:c,validateText:u,cancelText:g,html:v}){return this.mount(),new Promise((s,d)=>{this.$root.dialog({title:n,text:t,okText:r,okClass:c,validateText:u,cancelText:g,html:v},s,d)})}confirm(n,{okText:t="Ok",cancelText:r="Cancel",okClass:c="primary"}){return this.open({title:"Confirm",text:n,okText:t,okClass:c,validateText:null,cancelText:r,html:!1})}alert(n,{okText:t="Ok",html:r=!1,okClass:c="primary"}){return this.open({title:"Alert",text:n,okText:t,okClass:c,validateText:null,cancelText:null,html:r})}validate(n,{okText:t="Ok",validateText:r="CONFIRM",cancelText:c="Cancel",okClass:u="primary"}){return this.open({title:"Confirm",text:n,okText:t,okClass:u,validateText:r,cancelText:c,html:!1})}}const s2={install(e,n){const t=new o2;e.provide("dialog",t),e.config.globalProperties.hasOwnProperty("$dialog")||(e.config.globalProperties.$dialog=t)}};let yp=1;var a2=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)});publish=e=>{this.subscribers.forEach(n=>n(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{const{message:n,...t}=e,r=typeof e.id=="number"||e.id&&e.id?.length>0?e.id:yp++,c=this.toasts.find(g=>g.id===r),u=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),c?this.toasts=this.toasts.map(g=>g.id===r?(this.publish({...g,...e,id:r,title:n}),{...g,...e,id:r,dismissible:u,title:n}):g):this.addToast({title:n,...t,dismissible:u,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(t=>t({id:n.id,dismiss:!0}))}),e);message=(e,n)=>this.create({...n,message:e,type:"default"});error=(e,n)=>this.create({...n,type:"error",message:e});success=(e,n)=>this.create({...n,type:"success",message:e});info=(e,n)=>this.create({...n,type:"info",message:e});warning=(e,n)=>this.create({...n,type:"warning",message:e});loading=(e,n)=>this.create({...n,type:"loading",message:e});promise=(e,n)=>{if(!n)return;let t;n.loading!==void 0&&(t=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let c=t!==void 0,u;const g=r.then(async s=>{if(u=["resolve",s],Ba(s))c=!1,this.create({id:t,type:"default",message:s});else if(c2(s)&&!s.ok){c=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${s.status}`):n.error,a=typeof n.description=="function"?await n.description(`HTTP error! status: ${s.status}`):n.description,l=typeof d=="object"&&!Ba(d)?d:{message:d||"",id:t||""};this.create({id:t,type:"error",description:a,...l})}else if(s instanceof Error){c=!1;const d=typeof n.error=="function"?await n.error(s):n.error,a=typeof n.description=="function"?await n.description(s):n.description,l=typeof d=="object"&&!Ba(d)?d:{message:d||"",id:t||""};this.create({id:t,type:"error",description:a,...l})}else if(n.success!==void 0){c=!1;const d=typeof n.success=="function"?await n.success(s):n.success,a=typeof n.description=="function"?await n.description(s):n.description,l=typeof d=="object"&&!Ba(d)?d:{message:d||"",id:t||""};this.create({id:t,type:"success",description:a,...l})}}).catch(async s=>{if(u=["reject",s],n.error!==void 0){c=!1;const d=typeof n.error=="function"?await n.error(s):n.error,a=typeof n.description=="function"?await n.description(s):n.description,l=typeof d=="object"&&!Ba(d)?d:{message:d||"",id:t||""};this.create({id:t,type:"error",description:a,...l})}}).finally(()=>{c&&(this.dismiss(t),t=void 0),n.finally?.()}),v=()=>new Promise((s,d)=>g.then(()=>u[0]==="reject"?d(u[1]):s(u[1])).catch(d));return typeof t!="string"&&typeof t!="number"?{unwrap:v}:Object.assign(t,{unwrap:v})};custom=(e,n)=>{const t=n?.id||yp++,r=this.toasts.find(u=>u.id===t),c=n?.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(t)&&this.dismissedToasts.delete(t),r?this.toasts=this.toasts.map(u=>u.id===t?(this.publish({...u,component:e,dismissible:c,id:t,...n}),{...u,component:e,dismissible:c,id:t,...n}):u):this.addToast({component:e,dismissible:c,id:t,...n}),t};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};const $i=new a2;function l2(e,n){const t=n?.id||yp++;return $i.create({message:e,id:t,type:"default",...n}),t}const c2=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",u2=l2,h2=()=>$i.toasts,d2=()=>$i.getActiveToasts(),bp=Object.assign(u2,{success:$i.success,info:$i.info,warning:$i.warning,error:$i.error,custom:$i.custom,message:$i.message,promise:$i.promise,dismiss:$i.dismiss,loading:$i.loading},{getHistory:h2,getToasts:d2});function Wu(e){return e.label!==void 0}const f2=3,px="24px",gx="16px",mx=4e3,p2=356,g2=14,m2=45,vx=200;function v2(){const e=on(!1);return li(()=>{const n=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)}),{isDocumentHidden:e}}function Hs(...e){return e.filter(Boolean).join(" ")}function y2(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}function b2(e,n){const t={};return[e,n].forEach((r,c)=>{const u=c===1,g=u?"--mobile-offset":"--offset",v=u?gx:px;function s(d){["top","right","bottom","left"].forEach(a=>{t[`${g}-${a}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?s(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?t[`${g}-${d}`]=v:t[`${g}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):s(v)}),t}const w2=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],x2=["aria-label","data-disabled","data-close-button-position"];var C2=Os({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:n}){const t=e,r=n,c=on(null),u=on(null),g=on(!1),v=on(!1),s=on(!1),d=on(!1),a=on(!1),l=on(0),h=on(0),p=on(t.toast.duration||t.duration||mx),o=on(null),f=on(null),m=mt(()=>t.index===0),w=mt(()=>t.index+1<=t.visibleToasts),x=mt(()=>t.toast.type),R=mt(()=>t.toast.dismissible!==!1),T=mt(()=>t.toast.class||""),_=mt(()=>t.descriptionClass||""),C=mt(()=>{const ee=t.toast.position||t.position,ye=t.heights.filter(we=>we.position===ee).findIndex(we=>we.toastId===t.toast.id);return ye>=0?ye:0}),P=mt(()=>{const ee=t.toast.position||t.position;return t.heights.filter(ye=>ye.position===ee).reduce((ye,we,Ae)=>Ae>=C.value?ye:ye+we.height,0)}),O=mt(()=>C.value*t.gap+P.value||0),E=mt(()=>t.toast.closeButton??t.closeButton),k=mt(()=>t.toast.duration||t.duration||mx),B=on(0),N=on(0),M=on(null),$=mt(()=>t.position.split("-")),A=mt(()=>$.value[0]),D=mt(()=>$.value[1]),j=mt(()=>typeof t.toast.title!="string"),U=mt(()=>typeof t.toast.description!="string"),{isDocumentHidden:q}=v2(),Q=mt(()=>x.value&&x.value==="loading");ja(()=>{g.value=!0,p.value=k.value}),li(async()=>{if(!g.value||!f.value)return;await Il();const ee=f.value,ye=ee.style.height;ee.style.height="auto";const we=ee.getBoundingClientRect().height;ee.style.height=ye,h.value=we,r("update:height",{toastId:t.toast.id,height:we,position:t.toast.position||t.position})});function re(){v.value=!0,l.value=O.value,setTimeout(()=>{r("removeToast",t.toast)},vx)}function le(){if(Q.value||!R.value)return{};re(),t.toast.onDismiss?.(t.toast)}function ne(ee){ee.button!==2&&(Q.value||!R.value||(o.value=new Date,l.value=O.value,ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(s.value=!0,M.value={x:ee.clientX,y:ee.clientY})))}function ue(){if(d.value||!R.value)return;M.value=null;const ee=Number(f.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),ye=Number(f.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),we=new Date().getTime()-(o.value?.getTime()||0),Ae=c.value==="x"?ee:ye,Je=Math.abs(Ae)/we;if(Math.abs(Ae)>=m2||Je>.11){l.value=O.value,t.toast.onDismiss?.(t.toast),c.value==="x"?u.value=ee>0?"right":"left":u.value=ye>0?"down":"up",re(),d.value=!0;return}else f.value?.style.setProperty("--swipe-amount-x","0px"),f.value?.style.setProperty("--swipe-amount-y","0px");a.value=!1,s.value=!1,c.value=null}function he(ee){if(!M.value||!R.value||(window?.getSelection()?.toString()?.length??!1))return;const ye=ee.clientY-M.value.y,we=ee.clientX-M.value.x,Ae=t.swipeDirections??y2(t.position);!c.value&&(Math.abs(we)>1||Math.abs(ye)>1)&&(c.value=Math.abs(we)>Math.abs(ye)?"x":"y");let Je={x:0,y:0};const Be=Ye=>1/(1.5+Math.abs(Ye)/20);if(c.value==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&ye<0||Ae.includes("bottom")&&ye>0)Je.y=ye;else{const Ye=ye*Be(ye);Je.y=Math.abs(Ye)<Math.abs(ye)?Ye:ye}}else if(c.value==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&we<0||Ae.includes("right")&&we>0)Je.x=we;else{const Ye=we*Be(we);Je.x=Math.abs(Ye)<Math.abs(we)?Ye:we}(Math.abs(Je.x)>0||Math.abs(Je.y)>0)&&(a.value=!0),f.value?.style.setProperty("--swipe-amount-x",`${Je.x}px`),f.value?.style.setProperty("--swipe-amount-y",`${Je.y}px`)}ja(()=>{if(g.value=!0,!f.value)return;const ee=f.value.getBoundingClientRect().height;h.value=ee;const ye=[{toastId:t.toast.id,height:ee,position:t.toast.position},...t.heights];r("update:heights",ye)}),Xs(()=>{f.value&&r("removeToast",t.toast)}),li(ee=>{if(t.toast.promise&&x.value==="loading"||t.toast.duration===1/0||t.toast.type==="loading")return;let ye;const we=()=>{if(N.value<B.value){const Je=new Date().getTime()-B.value;p.value=p.value-Je}N.value=new Date().getTime()},Ae=()=>{p.value!==1/0&&(B.value=new Date().getTime(),ye=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),re()},p.value))};t.expanded||t.interacting||q.value?we():Ae(),ee(()=>{clearTimeout(ye)})}),xi(()=>t.toast.delete,ee=>{ee!==void 0&&ee&&(re(),t.toast.onDismiss?.(t.toast))},{deep:!0});function oe(){s.value=!1,c.value=null,M.value=null}return(ee,ye)=>(xt(),tn("li",{tabindex:"0",ref_key:"toastRef",ref:f,class:ln(Ut(Hs)(t.class,T.value,ee.classes?.toast,ee.toast.classes?.toast,ee.classes?.[x.value],ee.toast?.classes?.[x.value])),"data-sonner-toast":"","data-rich-colors":ee.toast.richColors??ee.defaultRichColors,"data-styled":!(ee.toast.component||ee.toast?.unstyled||ee.unstyled),"data-mounted":g.value,"data-promise":!!ee.toast.promise,"data-swiped":a.value,"data-removed":v.value,"data-visible":w.value,"data-y-position":A.value,"data-x-position":D.value,"data-index":ee.index,"data-front":m.value,"data-swiping":s.value,"data-dismissible":R.value,"data-type":x.value,"data-invert":ee.toast.invert||ee.invert,"data-swipe-out":d.value,"data-swipe-direction":u.value,"data-expanded":!!(ee.expanded||ee.expandByDefault&&g.value),"data-testid":ee.toast.testId,style:Xn({"--index":ee.index,"--toasts-before":ee.index,"--z-index":ee.toasts.length-ee.index,"--offset":`${v.value?l.value:O.value}px`,"--initial-height":ee.expandByDefault?"auto":`${h.value}px`,...ee.style,...t.toast.style}),onDragend:oe,onPointerdown:ne,onPointerup:ue,onPointermove:he},[E.value&&!ee.toast.component&&x.value!=="loading"?(xt(),tn("button",{key:0,"aria-label":ee.closeButtonAriaLabel||"Close toast","data-disabled":Q.value,"data-close-button":"true","data-close-button-position":ee.closeButtonPosition,class:ln(Ut(Hs)(ee.classes?.closeButton,ee.toast?.classes?.closeButton)),onClick:le},[ee.icons?.close?(xt(),or(ta(ee.icons?.close),{key:0})):Ci(ee.$slots,"close-icon",{key:1})],10,x2)):qr("v-if",!0),ee.toast.component?(xt(),or(ta(ee.toast.component),fr({key:1},ee.toast.componentProps,{onCloseToast:le,isPaused:ee.$props.expanded||ee.$props.interacting||Ut(q)}),null,16,["isPaused"])):(xt(),tn(Er,{key:2},[x.value!=="default"||ee.toast.icon||ee.toast.promise?(xt(),tn("div",{key:0,"data-icon":"",class:ln(Ut(Hs)(ee.classes?.icon,ee.toast?.classes?.icon))},[ee.toast.icon?(xt(),or(ta(ee.toast.icon),{key:0})):(xt(),tn(Er,{key:1},[x.value==="loading"?Ci(ee.$slots,"loading-icon",{key:0}):x.value==="success"?Ci(ee.$slots,"success-icon",{key:1}):x.value==="error"?Ci(ee.$slots,"error-icon",{key:2}):x.value==="warning"?Ci(ee.$slots,"warning-icon",{key:3}):x.value==="info"?Ci(ee.$slots,"info-icon",{key:4}):qr("v-if",!0)],64))],2)):qr("v-if",!0),dt("div",{"data-content":"",class:ln(Ut(Hs)(ee.classes?.content,ee.toast?.classes?.content))},[dt("div",{"data-title":"",class:ln(Ut(Hs)(ee.classes?.title,ee.toast.classes?.title))},[j.value?(xt(),or(ta(ee.toast.title),Uc(fr({key:0},ee.toast.componentProps)),null,16)):(xt(),tn(Er,{key:1},[ai(Ir(ee.toast.title),1)],64))],2),ee.toast.description?(xt(),tn("div",{key:0,"data-description":"",class:ln(Ut(Hs)(ee.descriptionClass,_.value,ee.classes?.description,ee.toast.classes?.description))},[U.value?(xt(),or(ta(ee.toast.description),Uc(fr({key:0},ee.toast.componentProps)),null,16)):(xt(),tn(Er,{key:1},[ai(Ir(ee.toast.description),1)],64))],2)):qr("v-if",!0)],2),ee.toast.cancel?(xt(),tn("button",{key:1,style:Xn(ee.toast.cancelButtonStyle||ee.cancelButtonStyle),class:ln(Ut(Hs)(ee.classes?.cancelButton,ee.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:ye[0]||(ye[0]=we=>{Ut(Wu)(ee.toast.cancel)&&R.value&&(ee.toast.cancel.onClick?.(we),re())})},Ir(Ut(Wu)(ee.toast.cancel)?ee.toast.cancel?.label:ee.toast.cancel),7)):qr("v-if",!0),ee.toast.action?(xt(),tn("button",{key:2,style:Xn(ee.toast.actionButtonStyle||ee.actionButtonStyle),class:ln(Ut(Hs)(ee.classes?.actionButton,ee.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:ye[1]||(ye[1]=we=>{Ut(Wu)(ee.toast.action)&&(ee.toast.action.onClick?.(we),!we.defaultPrevented&&re())})},Ir(Ut(Wu)(ee.toast.action)?ee.toast.action?.label:ee.toast.action),7)):qr("v-if",!0)],64))],46,w2))}}),k2=C2,bc=(e,n)=>{const t=e.__vccOpts||e;for(const[r,c]of n)t[r]=c;return t};const _2={},A2={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function $2(e,n){return xt(),tn("svg",A2,n[0]||(n[0]=[dt("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),dt("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var S2=bc(_2,[["render",$2]]);const T2=["data-visible"],E2={class:"sonner-spinner"};var I2=Os({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const n=Array(12).fill(0);return(t,r)=>(xt(),tn("div",{class:"sonner-loading-wrapper","data-visible":t.visible},[dt("div",E2,[(xt(!0),tn(Er,null,Ll(Ut(n),c=>(xt(),tn("div",{key:`spinner-bar-${c}`,class:"sonner-loading-bar"}))),128))])],8,T2))}}),M2=I2;const R2={},L2={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function O2(e,n){return xt(),tn("svg",L2,n[0]||(n[0]=[dt("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var N2=bc(R2,[["render",O2]]);const D2={},P2={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function z2(e,n){return xt(),tn("svg",P2,n[0]||(n[0]=[dt("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var B2=bc(D2,[["render",z2]]);const F2={},j2={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function W2(e,n){return xt(),tn("svg",j2,n[0]||(n[0]=[dt("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var H2=bc(F2,[["render",W2]]);const U2={},V2={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function G2(e,n){return xt(),tn("svg",V2,n[0]||(n[0]=[dt("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var q2=bc(U2,[["render",G2]]);const Y2=["aria-label"],K2=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],J2=typeof window<"u"&&typeof document<"u";function Q2(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Z2=Os({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},closeButtonPosition:{default:"top-left"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:g2},visibleToasts:{default:f2},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:px},mobileOffset:{default:gx},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const n=e,t=nm(),r=on([]),c=mt(()=>n.id?r.value.filter(k=>k.toasterId===n.id):r.value.filter(k=>!k.toasterId));function u(k,B){return c.value.filter(N=>!N.position&&B===0||N.position===k)}const g=mt(()=>{const k=c.value.filter(B=>B.position).map(B=>B.position);return k.length>0?Array.from(new Set([n.position].concat(k))):[n.position]}),v=mt(()=>{const k={};return g.value.forEach(B=>{k[B]=r.value.filter(N=>N.position===B)}),k}),s=on([]),d=on({}),a=on(!1);li(()=>{g.value.forEach(k=>{k in d.value||(d.value[k]=!1)})});const l=on(n.theme!=="system"?n.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),h=on(null),p=on(null),o=on(!1),f=n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function m(k){r.value.find(B=>B.id===k.id)?.delete||$i.dismiss(k.id),r.value=r.value.filter(({id:B})=>B!==k.id),setTimeout(()=>{r.value.find(B=>B.id===k.id)||(s.value=s.value.filter(B=>B.toastId!==k.id))},vx+50)}function w(k){o.value&&!k.currentTarget?.contains?.(k.relatedTarget)&&(o.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function x(k){k.target instanceof HTMLElement&&k.target.dataset.dismissible==="false"||o.value||(o.value=!0,p.value=k.relatedTarget)}function R(k){k.target&&k.target instanceof HTMLElement&&k.target.dataset.dismissible==="false"||(a.value=!0)}li(k=>{const B=$i.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(M=>M.id===N.id?{...M,delete:!0}:M)});return}Il(()=>{const M=r.value.findIndex($=>$.id===N.id);M!==-1?r.value=[...r.value.slice(0,M),{...r.value[M],...N},...r.value.slice(M+1)]:r.value=[N,...r.value]})});k(B)}),li(k=>{if(typeof window>"u")return;if(n.theme!=="system"){l.value=n.theme;return}const B=window.matchMedia("(prefers-color-scheme: dark)"),N=$=>{l.value=$?"dark":"light"};N(B.matches);const M=$=>{N($.matches)};try{B.addEventListener("change",M)}catch{B.addListener(M)}k(()=>{try{B.removeEventListener("change",M)}catch{B.removeListener(M)}})}),li(()=>{h.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,o.value=!1)}),li(()=>{r.value.length<=1&&Object.keys(d.value).forEach(k=>{d.value[k]=!1})}),li(k=>{function B(N){const M=n.hotkey.every(D=>N[D]||N.code===D),$=Array.isArray(h.value)?h.value[0]:h.value;M&&(g.value.forEach(D=>{d.value[D]=!0}),$?.focus());const A=document.activeElement===h.value||$?.contains(document.activeElement);N.code==="Escape"&&A&&g.value.forEach(D=>{d.value[D]=!1})}J2&&(document.addEventListener("keydown",B),k(()=>{document.removeEventListener("keydown",B)}))});function T(k){const B=k.currentTarget,N=B.getAttribute("data-y-position")+"-"+B.getAttribute("data-x-position");d.value[N]=!0}function _(k){if(!a.value){const B=k.currentTarget,N=B.getAttribute("data-y-position")+"-"+B.getAttribute("data-x-position");d.value[N]=!1}}function C(){Object.keys(d.value).forEach(k=>{d.value[k]=!1})}function P(){a.value=!1}function O(k){s.value=k}function E(k){const B=s.value.findIndex(N=>N.toastId===k.toastId);if(B!==-1)s.value[B]=k;else{const N=s.value.findIndex(M=>M.position===k.position);N!==-1?s.value.splice(N,0,k):s.value.unshift(k)}}return(k,B)=>(xt(),tn(Er,null,[qr(" Remove item from normal navigation flow, only available via hotkey "),dt("section",{"aria-label":`${k.containerAriaLabel} ${Ut(f)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(xt(!0),tn(Er,null,Ll(g.value,(N,M)=>(xt(),tn("ol",fr({key:N,ref_for:!0,ref_key:"listRef",ref:h,"data-sonner-toaster":"","data-sonner-theme":l.value,class:n.class,dir:k.dir==="auto"?Q2():k.dir,tabIndex:-1,"data-theme":k.theme,"data-rich-colors":k.richColors,"data-y-position":N.split("-")[0],"data-x-position":N.split("-")[1],style:{"--front-toast-height":`${s.value[0]?.height||0}px`,"--width":`${Ut(p2)}px`,"--gap":`${k.gap}px`,...k.style,...Ut(t).style,...Ut(b2)(k.offset,k.mobileOffset)}},{ref_for:!0},k.$attrs,{onBlur:w,onFocus:x,onMouseenter:T,onMousemove:T,onMouseleave:_,onDragend:C,onPointerdown:R,onPointerup:P}),[(xt(!0),tn(Er,null,Ll(u(N,M),($,A)=>(xt(),or(k2,{key:$.id,heights:s.value,icons:k.icons,index:A,toast:$,defaultRichColors:k.richColors,duration:k.toastOptions?.duration??k.duration,class:ln(k.toastOptions?.class??""),descriptionClass:k.toastOptions?.descriptionClass,invert:k.invert,visibleToasts:k.visibleToasts,closeButton:k.toastOptions?.closeButton??k.closeButton,interacting:a.value,position:N,closeButtonPosition:k.toastOptions?.closeButtonPosition??k.closeButtonPosition,style:Xn(k.toastOptions?.style),unstyled:k.toastOptions?.unstyled,classes:k.toastOptions?.classes,cancelButtonStyle:k.toastOptions?.cancelButtonStyle,actionButtonStyle:k.toastOptions?.actionButtonStyle,"close-button-aria-label":k.toastOptions?.closeButtonAriaLabel,toasts:v.value[N],expandByDefault:k.expand,gap:k.gap,expanded:d.value[N]||!1,swipeDirections:n.swipeDirections,"onUpdate:heights":O,"onUpdate:height":E,onRemoveToast:m},{"close-icon":It(()=>[Ci(k.$slots,"close-icon",{},()=>[De(S2)])]),"loading-icon":It(()=>[Ci(k.$slots,"loading-icon",{},()=>[De(M2,{visible:$.type==="loading"},null,8,["visible"])])]),"success-icon":It(()=>[Ci(k.$slots,"success-icon",{},()=>[De(N2)])]),"error-icon":It(()=>[Ci(k.$slots,"error-icon",{},()=>[De(q2)])]),"warning-icon":It(()=>[Ci(k.$slots,"warning-icon",{},()=>[De(H2)])]),"info-icon":It(()=>[Ci(k.$slots,"info-icon",{},()=>[De(B2)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","closeButtonPosition","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,K2))),128))],8,Y2)],2112))}}),X2=Z2;function Xt(e,n){return t=>Object.keys(e).reduce((r,c)=>{const u=typeof e[c]=="object"&&e[c]!=null&&!Array.isArray(e[c])?e[c]:{type:e[c]};return t&&c in t?r[c]={...u,default:t[c]}:r[c]=u,n&&!r[c].source&&(r[c].source=n),r},{})}const Si=Xt({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function dl(e){em(`Vuetify: ${e}`)}const Hu=typeof window<"u",wp=Hu&&"IntersectionObserver"in window,eN=Hu&&"matchMedia"in window&&typeof window.matchMedia=="function",yx=()=>eN&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;Hu&&CSS?.supports?.("-webkit-backdrop-filter","none");function Nn(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const t=Number(e);return isNaN(t)?String(e):isFinite(t)?`${t}${n}`:void 0}function xp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function bx(e){let n;return e!==null&&typeof e=="object"&&((n=Object.getPrototypeOf(e))===Object.prototype||n===null)}function tN(e){if(e&&"$el"in e){const n=e.$el;return n?.nodeType===Node.TEXT_NODE?n.nextElementSibling:n}return e}function Cp(e,n){return n.every(t=>e.hasOwnProperty(t))}function nN(e,n){const t={};for(const r of n)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function rN(e){return e==null?[]:Array.isArray(e)?e:[e]}function Uu(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(n,Math.min(t,e))}function wx(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+t.repeat(Math.max(0,n-e.length))}function iN(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const t=[];let r=0;for(;r<e.length;)t.push(e.substr(r,n)),r+=n;return t}function fl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const r={};for(const c in e)r[c]=e[c];for(const c in n){const u=e[c],g=n[c];if(bx(u)&&bx(g)){r[c]=fl(u,g,t);continue}if(t&&Array.isArray(u)&&Array.isArray(g)){r[c]=t(u,g);continue}r[c]=g}return r}function xx(e){return e.map(n=>n.type===Er?xx(n.children):n).flat()}function Aa(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Aa.cache.has(e))return Aa.cache.get(e);const n=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Aa.cache.set(e,n),n}Aa.cache=new Map;function wc(e,n){if(!n||typeof n!="object")return[];if(Array.isArray(n))return n.map(t=>wc(e,t)).flat(1);if(n.suspense)return wc(e,n.ssContent);if(Array.isArray(n.children))return n.children.map(t=>wc(e,t)).flat(1);if(n.component){if(Object.getOwnPropertyDescriptor(n.component.provides,e))return[n.component];if(n.component.subTree)return wc(e,n.component.subTree).flat(1)}return[]}function Cx(e){const n=Rl({});li(()=>{const r=e();for(const c in r)n[c]=r[c]},{flush:"sync"});const t={};for(const r in n)t[r]=Ot(()=>n[r]);return t}function kp(e,n){return e.includes(n)}function kx(e,n){return n="on"+Uh(n),!!(e[n]||e[`${n}Once`]||e[`${n}Capture`]||e[`${n}OnceCapture`]||e[`${n}CaptureOnce`])}function oN(){const e=Hi(),n=t=>{e.value=t};return Object.defineProperty(n,"value",{enumerable:!0,get:()=>e.value,set:t=>e.value=t}),Object.defineProperty(n,"el",{enumerable:!0,get:()=>tN(e.value)}),n}function Vu(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function sN(e){const n=["checked","disabled"];return Object.fromEntries(Object.entries(e).filter(t=>{let[r,c]=t;return n.includes(r)?!!c:c!==void 0}))}const aN=["top","bottom"],lN=["start","end","left","right"];function cN(e,n){let[t,r]=e.split(" ");return r||(r=kp(aN,t)?"start":kp(lN,t)?"top":"center"),{side:_x(t,n),align:_x(r,n)}}function _x(e,n){return e==="start"?n?"right":"left":e==="end"?n?"left":"right":e}class _p{constructor(n){const t=document.body.currentCSSZoom??1,r=n instanceof Element,c=r?1+(1-t)/t:1,{x:u,y:g,width:v,height:s}=r?n.getBoundingClientRect():n;this.x=u*c,this.y=g*c,this.width=v*c,this.height=s*c}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function uN(e){if(Array.isArray(e)){const n=document.body.currentCSSZoom??1,t=1+(1-n)/n;return new _p({x:e[0]*t,y:e[1]*t,width:0*t,height:0*t})}else return new _p(e)}const pl=2.4,Ax=.2126729,$x=.7151522,Sx=.072175,hN=.55,dN=.58,fN=.57,pN=.62,Gu=.03,Tx=1.45,gN=5e-4,mN=1.25,vN=1.25,Ex=.078,Ix=12.82051282051282,qu=.06,Mx=.001;function Rx(e,n){const t=(e.r/255)**pl,r=(e.g/255)**pl,c=(e.b/255)**pl,u=(n.r/255)**pl,g=(n.g/255)**pl,v=(n.b/255)**pl;let s=t*Ax+r*$x+c*Sx,d=u*Ax+g*$x+v*Sx;if(s<=Gu&&(s+=(Gu-s)**Tx),d<=Gu&&(d+=(Gu-d)**Tx),Math.abs(d-s)<gN)return 0;let a;if(d>s){const l=(d**hN-s**dN)*mN;a=l<Mx?0:l<Ex?l-l*Ix*qu:l-qu}else{const l=(d**pN-s**fN)*vN;a=l>-Mx?0:l>-Ex?l-l*Ix*qu:l+qu}return a*100}function Ap(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function yN(e){return Ap(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const Lx=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,bN={rgb:(e,n,t,r)=>({r:e,g:n,b:t,a:r}),rgba:(e,n,t,r)=>({r:e,g:n,b:t,a:r}),hsl:(e,n,t,r)=>Ox({h:e,s:n,l:t,a:r}),hsla:(e,n,t,r)=>Ox({h:e,s:n,l:t,a:r}),hsv:(e,n,t,r)=>Cc({h:e,s:n,v:t,a:r}),hsva:(e,n,t,r)=>Cc({h:e,s:n,v:t,a:r})};function xc(e){if(typeof e=="number")return(isNaN(e)||e<0||e>16777215)&&dl(`'${e}' is not a valid hex color`),{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&Lx.test(e)){const{groups:n}=e.match(Lx),{fn:t,values:r}=n,c=r.split(/,\s*|\s*\/\s*|\s+/).map((u,g)=>u.endsWith("%")||g>0&&g<3&&["hsl","hsla","hsv","hsva"].includes(t)?parseFloat(u)/100:parseFloat(u));return bN[t](...c)}else if(typeof e=="string"){let n=e.startsWith("#")?e.slice(1):e;[3,4].includes(n.length)?n=n.split("").map(r=>r+r).join(""):[6,8].includes(n.length)||dl(`'${e}' is not a valid hex(a) color`);const t=parseInt(n,16);return(isNaN(t)||t<0||t>4294967295)&&dl(`'${e}' is not a valid hex(a) color`),wN(n)}else if(typeof e=="object"){if(Cp(e,["r","g","b"]))return e;if(Cp(e,["h","s","l"]))return Cc(Nx(e));if(Cp(e,["h","s","v"]))return Cc(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
1491
+ Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function Cc(e){const{h:n,s:t,v:r,a:c}=e,u=v=>{const s=(v+n/60)%6;return r-r*t*Math.max(Math.min(s,4-s,1),0)},g=[u(5),u(3),u(1)].map(v=>Math.round(v*255));return{r:g[0],g:g[1],b:g[2],a:c}}function Ox(e){return Cc(Nx(e))}function Nx(e){const{h:n,s:t,l:r,a:c}=e,u=r+t*Math.min(r,1-r),g=u===0?0:2-2*r/u;return{h:n,s:g,v:u,a:c}}function wN(e){e=xN(e);let[n,t,r,c]=iN(e,2).map(u=>parseInt(u,16));return c=c===void 0?c:c/255,{r:n,g:t,b:r,a:c}}function xN(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(n=>n+n).join("")),e.length!==6&&(e=wx(wx(e,6),8,"F")),e}function CN(e){const n=Math.abs(Rx(xc(0),xc(e)));return Math.abs(Rx(xc(16777215),xc(e)))>Math.min(n,50)?"#fff":"#000"}function Oo(e,n){const t=qg();if(!t)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return t}function $a(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const n=Oo(e).type;return Aa(n?.aliasName||n?.name)}function kN(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oo("injectSelf");const{provides:t}=n;if(t&&e in t)return t[e]}const Yu=Symbol.for("vuetify:defaults");function $p(){const e=ea(Yu);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Sp(e,n){const t=$p(),r=on(e),c=mt(()=>{if(Ut(n?.disabled))return t.value;const u=Ut(n?.scoped),g=Ut(n?.reset),v=Ut(n?.root);if(r.value==null&&!(u||g||v))return t.value;let s=fl(r.value,{prev:t.value});if(u)return s;if(g||v){const d=Number(g||1/0);for(let a=0;a<=d&&!(!s||!("prev"in s));a++)s=s.prev;return s&&typeof v=="string"&&v in s&&(s=fl(fl(s,{prev:s}),s[v])),s}return s.prev?fl(s.prev,s):s});return Fa(Yu,c),c}function _N(e,n){return e.props&&(typeof e.props[n]<"u"||typeof e.props[Aa(n)]<"u")}function AN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$p();const r=Oo("useDefaults");if(n=n??r.type.name??r.type.__name,!n)throw new Error("[Vuetify] Could not determine component name");const c=mt(()=>t.value?.[e._as??n]),u=new Proxy(e,{get(s,d){const a=Reflect.get(s,d);if(d==="class"||d==="style")return[c.value?.[d],a].filter(p=>p!=null);if(_N(r.vnode,d))return a;const l=c.value?.[d];if(l!==void 0)return l;const h=t.value?.global?.[d];return h!==void 0?h:a}}),g=Hi();li(()=>{if(c.value){const s=Object.entries(c.value).filter(d=>{let[a]=d;return a.startsWith(a[0].toUpperCase())});g.value=s.length?Object.fromEntries(s):void 0}else g.value=void 0});function v(){const s=kN(Yu,r);Fa(Yu,mt(()=>g.value?fl(s?.value??{},g.value):s?.value))}return{props:u,provideSubDefaults:v}}function Ku(e){if(e._setup=e._setup??e.setup,!e.name)return dl("The component is missing an explicit name, unable to generate default prop value"),e;if(e._setup){e.props=Xt(e.props??{},e.name)();const n=Object.keys(e.props).filter(t=>t!=="class"&&t!=="style");e.filterProps=function(t){return nN(t,n)},e.props._as=String,e.setup=function(t,r){const c=$p();if(!c.value)return e._setup(t,r);const{props:u,provideSubDefaults:g}=AN(t,t._as??e.name,c),v=e._setup(u,r);return g(),v}}return e}function _r(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n=>(e?Ku:Os)(n)}function Dx(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",t=arguments.length>2?arguments[2]:void 0;return _r()({name:t??Uh(Zg(e.replace(/__/g,"-"))),props:{tag:{type:String,default:n},...Si()},setup(r,c){let{slots:u}=c;return()=>Eo(r.tag,{class:[e,r.class],style:r.style},u.default?.())}})}function $N(e,n,t,r){if(!t||Vu(e)||Vu(n))return;const c=t.get(e);if(c)c.set(n,r);else{const u=new WeakMap;u.set(n,r),t.set(e,u)}}function SN(e,n,t){if(!t||Vu(e)||Vu(n))return null;const r=t.get(e)?.get(n);if(typeof r=="boolean")return r;const c=t.get(n)?.get(e);return typeof c=="boolean"?c:null}function Tp(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new WeakMap;if(e===n)return!0;if(e instanceof Date&&n instanceof Date&&e.getTime()!==n.getTime()||e!==Object(e)||n!==Object(n))return!1;const r=Object.keys(e);return r.length!==Object.keys(n).length?!1:SN(e,n,t)||($N(e,n,t,!0),r.every(u=>Tp(e[u],n[u],t)))}function Ti(e){const n=Oo("useRender");n.render=e}function Px(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const t=oN(),r=on();if(Hu){const c=new ResizeObserver(u=>{e?.(u,c),u.length&&(n==="content"?r.value=u[0].contentRect:r.value=u[0].target.getBoundingClientRect())});Xs(()=>{c.disconnect()}),xi(()=>t.el,(u,g)=>{g&&(c.unobserve(g),r.value=void 0),u&&c.observe(u)},{flush:"post"})}return{resizeRef:t,contentRect:Kg(r)}}function zx(e,n){let t;function r(){t=tm(),t.run(()=>n.length?n(()=>{t?.stop(),r()}):n())}xi(e,c=>{c&&!t?r():c||(t?.stop(),t=void 0)},{immediate:!0}),Hh(()=>{t?.stop()})}function Bx(e,n,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:a=>a,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:a=>a;const u=Oo("useProxiedModel"),g=on(e[n]!==void 0?e[n]:t),v=Aa(n),s=mt(v!==n?()=>(e[n],!!((u.vnode.props?.hasOwnProperty(n)||u.vnode.props?.hasOwnProperty(v))&&(u.vnode.props?.hasOwnProperty(`onUpdate:${n}`)||u.vnode.props?.hasOwnProperty(`onUpdate:${v}`)))):()=>(e[n],!!(u.vnode.props?.hasOwnProperty(n)&&u.vnode.props?.hasOwnProperty(`onUpdate:${n}`))));zx(()=>!s.value,()=>{xi(()=>e[n],a=>{g.value=a})});const d=mt({get(){const a=e[n];return r(s.value?a:g.value)},set(a){const l=c(a),h=Jg(s.value?e[n]:g.value);h===l||r(h)===a||(g.value=l,u?.emit(`update:${n}`,l))}});return Object.defineProperty(d,"externalValue",{get:()=>s.value?e[n]:g.value}),d}const TN=Symbol.for("vuetify:locale");function Fx(){const e=ea(TN);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const Ep=Symbol.for("vuetify:theme"),Sa=Xt({theme:String},"theme");function gl(e){Oo("provideTheme");const n=ea(Ep,null);if(!n)throw new Error("Could not find Vuetify theme injection");const t=Ot(()=>e.theme??n.name.value),r=Ot(()=>n.themes.value[t.value]),c=Ot(()=>n.isDisabled?void 0:`${n.prefix}theme--${t.value}`),u={...n,name:t,current:r,themeClasses:c};return Fa(Ep,u),u}function EN(){Oo("useTheme");const e=ea(Ep,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}const No=Xt({tag:{type:[String,Object,Function],default:"div"}},"tag"),IN=Xt({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Yi(e,n,t){return _r()({name:e,props:IN({mode:t,origin:n}),setup(r,c){let{slots:u}=c;const g={onBeforeEnter(v){r.origin&&(v.style.transformOrigin=r.origin)},onLeave(v){if(r.leaveAbsolute){const{offsetTop:s,offsetLeft:d,offsetWidth:a,offsetHeight:l}=v;v._transitionInitialStyles={position:v.style.position,top:v.style.top,left:v.style.left,width:v.style.width,height:v.style.height},v.style.position="absolute",v.style.top=`${s}px`,v.style.left=`${d}px`,v.style.width=`${a}px`,v.style.height=`${l}px`}r.hideOnLeave&&v.style.setProperty("display","none","important")},onAfterLeave(v){if(r.leaveAbsolute&&v?._transitionInitialStyles){const{position:s,top:d,left:a,width:l,height:h}=v._transitionInitialStyles;delete v._transitionInitialStyles,v.style.position=s||"",v.style.top=d||"",v.style.left=a||"",v.style.width=l||"",v.style.height=h||""}}};return()=>{const v=r.group?Wc:Ml;return Eo(v,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:g},u.default)}}})}function Ip(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return _r()({name:e,props:{mode:{type:String,default:t},disabled:{type:Boolean,default:yx()},group:Boolean,hideOnLeave:Boolean},setup(r,c){let{slots:u}=c;const g=r.group?Wc:Ml;return()=>Eo(g,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:{...n,onLeave:v=>{r.hideOnLeave?v.style.setProperty("display","none","important"):n.onLeave?.(v)}}},u.default)}})}function Mp(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y";return{onBeforeEnter(c){c._parent=c.parentNode,c._initialStyle={transition:c.style.transition,overflow:c.style.overflow,width:c.style.width,height:c.style.height}},onEnter(c){const u=c._initialStyle;if(!u)return;c.style.setProperty("transition","none","important"),c.style.overflow="hidden";const g=`${c.offsetWidth}px`,v=`${c.offsetHeight}px`;["x","both"].includes(n)&&(c.style.width="0"),["y","both"].includes(n)&&(c.style.height="0"),c.offsetHeight,c.style.transition=u.transition,e&&c._parent&&c._parent.classList.add(e),requestAnimationFrame(()=>{["x","both"].includes(n)&&(c.style.width=g),["y","both"].includes(n)&&(c.style.height=v)})},onAfterEnter:r,onEnterCancelled:r,onLeave(c){c._initialStyle={transition:"",overflow:c.style.overflow,width:c.style.width,height:c.style.height},c.style.overflow="hidden",["x","both"].includes(n)&&(c.style.width=`${c.offsetWidth}px`),["y","both"].includes(n)&&(c.style.height=`${c.offsetHeight}px`),c.offsetHeight,requestAnimationFrame(()=>{["x","both"].includes(n)&&(c.style.width="0"),["y","both"].includes(n)&&(c.style.height="0")})},onAfterLeave:t,onLeaveCancelled:t};function t(c){e&&c._parent&&c._parent.classList.remove(e),r(c)}function r(c){if(!c._initialStyle)return;const{width:u,height:g}=c._initialStyle;c.style.overflow=c._initialStyle.overflow,u!=null&&["x","both"].includes(n)&&(c.style.width=u),g!=null&&["y","both"].includes(n)&&(c.style.height=g),delete c._initialStyle}}Yi("fab-transition","center center","out-in"),Yi("dialog-bottom-transition"),Yi("dialog-top-transition"),Yi("fade-transition"),Yi("scale-transition"),Yi("scroll-x-transition"),Yi("scroll-x-reverse-transition"),Yi("scroll-y-transition"),Yi("scroll-y-reverse-transition"),Yi("slide-x-transition"),Yi("slide-x-reverse-transition"),Yi("slide-y-transition"),Yi("slide-y-reverse-transition");const MN=Ip("expand-transition",Mp());Ip("expand-x-transition",Mp("","x")),Ip("expand-both-transition",Mp("","both"));const RN=Xt({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),Ta=_r(!1)({name:"VDefaultsProvider",props:RN(),setup(e,n){let{slots:t}=n;const{defaults:r,disabled:c,reset:u,root:g,scoped:v}=Vg(e);return Sp(r,{reset:u,root:g,scoped:v,disabled:c}),()=>t.default?.()}}),Rp=Xt({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Lp(e){return{dimensionStyles:mt(()=>{const n={},t=Nn(e.height),r=Nn(e.maxHeight),c=Nn(e.maxWidth),u=Nn(e.minHeight),g=Nn(e.minWidth),v=Nn(e.width);return t!=null&&(n.height=t),r!=null&&(n.maxHeight=r),c!=null&&(n.maxWidth=c),u!=null&&(n.minHeight=u),g!=null&&(n.minWidth=g),v!=null&&(n.width=v),n})}}function LN(e){return{aspectStyles:mt(()=>{const n=Number(e.aspectRatio);return n?{paddingBottom:String(1/n*100)+"%"}:void 0})}}const jx=Xt({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Si(),...Rp()},"VResponsive"),Wx=_r()({name:"VResponsive",props:jx(),setup(e,n){let{slots:t}=n;const{aspectStyles:r}=LN(e),{dimensionStyles:c}=Lp(e);return Ti(()=>dt("div",{class:ln(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:Xn([c.value,e.style])},[dt("div",{class:"v-responsive__sizer",style:Xn(r.value)},null),t.additional?.(),t.default&&dt("div",{class:ln(["v-responsive__content",e.contentClass])},[t.default()])])),{}}});function Op(e){return Cx(()=>{const{class:n,style:t}=NN(e);return{colorClasses:n,colorStyles:t}})}function Ju(e){const{colorClasses:n,colorStyles:t}=Op(()=>({text:cs(e)}));return{textColorClasses:n,textColorStyles:t}}function Qu(e){const{colorClasses:n,colorStyles:t}=Op(()=>({background:cs(e)}));return{backgroundColorClasses:n,backgroundColorStyles:t}}function ON(e){return{text:typeof e.text=="string"?e.text.replace(/^text-/,""):e.text,background:typeof e.background=="string"?e.background.replace(/^bg-/,""):e.background}}function NN(e){const n=ON(cs(e)),t=[],r={};if(n.background)if(Ap(n.background)){if(r.backgroundColor=n.background,!n.text&&yN(n.background)){const c=xc(n.background);if(c.a==null||c.a===1){const u=CN(c);r.color=u,r.caretColor=u}}}else t.push(`bg-${n.background}`);return n.text&&(Ap(n.text)?(r.color=n.text,r.caretColor=n.text):t.push(`text-${n.text}`)),{class:t,style:r}}const ml=Xt({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function vl(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a();return{roundedClasses:mt(()=>{const t=Hc(e)?e.value:e.rounded,r=Hc(e)?!1:e.tile,c=[];if(r||t===!1)c.push("rounded-0");else if(t===!0||t==="")c.push(`${n}--rounded`);else if(typeof t=="string"||t===0)for(const u of String(t).split(" "))c.push(`rounded-${u}`);return c})}}const DN=Xt({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),Zu=(e,n)=>{let{slots:t}=n;const{transition:r,disabled:c,group:u,target:g,...v}=e,{component:s=u?Wc:Ml,...d}=xp(r)?r:{};let a;return xp(r)?a=fr(d,sN({disabled:c,group:u,target:g}),v):a=fr({name:c||!r?"":r},v),Eo(s,a,t)};function Hx(e,n){if(!wp)return;const t=n.modifiers||{},r=n.value,{handler:c,options:u}=typeof r=="object"?r:{handler:r,options:{}},g=new IntersectionObserver(function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1?arguments[1]:void 0;const d=e._observe?.[n.instance.$.uid];if(!d)return;const a=v.some(l=>l.isIntersecting);c&&(!t.quiet||d.init)&&(!t.once||a||d.init)&&c(a,v,s),a&&t.once?Np(e,n):d.init=!0},u);e._observe=Object(e._observe),e._observe[n.instance.$.uid]={init:!1,observer:g},g.observe(e)}function Np(e,n){const t=e._observe?.[n.instance.$.uid];t&&(t.observer.unobserve(e),delete e._observe[n.instance.$.uid])}const Ux={mounted:Hx,unmounted:Np,updated:(e,n)=>{e._observe?.[n.instance.$.uid]&&(Np(e,n),Hx(e,n))}},PN=Xt({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,imageClass:null,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...jx(),...Si(),...ml(),...DN()},"VImg"),Xu=_r()({name:"VImg",directives:{vIntersect:Ux},props:PN(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,n){let{emit:t,slots:r}=n;const{backgroundColorClasses:c,backgroundColorStyles:u}=Qu(()=>e.color),{roundedClasses:g}=vl(e),v=Oo("VImg"),s=Hi(""),d=on(),a=Hi(e.eager?"loading":"idle"),l=Hi(),h=Hi();let p=!1;const o=mt(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),f=mt(()=>o.value.aspect||l.value/h.value||0);xi(()=>e.src,()=>{m(a.value!=="idle")}),xi(f,(M,$)=>{!M&&$&&d.value&&_(d.value)}),xi(d,M=>{!M||a.value==="idle"||(f.value||_(M),R(M),p&&(p=!1,t("load",M.currentSrc||o.value.src)))}),Gg(()=>m());function m(M){if(!(e.eager&&M)&&!(wp&&!M&&!e.eager)){if(a.value="loading",o.value.lazySrc){const $=new Image;$.src=o.value.lazySrc,_($,null)}o.value.src&&Il(()=>{t("loadstart",d.value?.currentSrc||o.value.src),setTimeout(()=>{if(!v.isUnmounted)if(d.value?.complete){if(d.value.naturalWidth||x(),a.value==="error")return;f.value||_(d.value,null),a.value==="loading"&&w()}else d.value&&(f.value||_(d.value),R(d.value))})})}}function w(){v.isUnmounted||(d.value?(R(d.value),_(d.value),t("load",d.value.currentSrc||o.value.src)):p=!0,a.value="loaded")}function x(){v.isUnmounted||(a.value="error",t("error",d.value?.currentSrc||o.value.src))}function R(M){s.value=M.currentSrc||M.src}let T=-1;Xs(()=>{clearTimeout(T)});function _(M){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const A=()=>{if(clearTimeout(T),v.isUnmounted)return;const{naturalHeight:D,naturalWidth:j}=M;D||j?(l.value=j,h.value=D):!M.complete&&a.value==="loading"&&$!=null?T=window.setTimeout(A,$):(M.currentSrc.endsWith(".svg")||M.currentSrc.startsWith("data:image/svg+xml"))&&(l.value=1,h.value=1)};A()}const C=Ot(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),P=()=>{if(!o.value.src||a.value==="idle")return null;const M=dt("img",{class:ln(["v-img__img",C.value,e.imageClass]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:o.value.src,srcset:o.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:d,onLoad:w,onError:x},null),$=r.sources?.();return De(Zu,{transition:e.transition,appear:!0},{default:()=>[Ls($?dt("picture",{class:"v-img__picture"},[$,M]):M,[[El,a.value==="loaded"]])]})},O=()=>De(Zu,{transition:e.transition},{default:()=>[o.value.lazySrc&&a.value!=="loaded"&&dt("img",{class:ln(["v-img__img","v-img__img--preload",C.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:o.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),E=()=>r.placeholder?De(Zu,{transition:e.transition,appear:!0},{default:()=>[(a.value==="loading"||a.value==="error"&&!r.error)&&dt("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,k=()=>r.error?De(Zu,{transition:e.transition,appear:!0},{default:()=>[a.value==="error"&&dt("div",{class:"v-img__error"},[r.error()])]}):null,B=()=>e.gradient?dt("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,N=Hi(!1);{const M=xi(f,$=>{$&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{N.value=!0})}),M())})}return Ti(()=>{const M=Wx.filterProps(e);return Ls(De(Wx,fr({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!N.value,"v-img--fit-content":e.width==="fit-content"},c.value,g.value,e.class],style:[{width:Nn(e.width==="auto"?l.value:e.width)},u.value,e.style]},M,{aspectRatio:f.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>dt(Er,null,[De(P,null,null),De(O,null,null),De(B,null,null),De(E,null,null),De(k,null,null)]),default:r.default}),[[Ux,{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:s,image:d,state:a,naturalWidth:l,naturalHeight:h}}}),eh=Xt({border:[Boolean,Number,String]},"border");function th(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a();return{borderClasses:mt(()=>{const t=e.border;return t===!0||t===""?`${n}--border`:typeof t=="string"||t===0?String(t).split(" ").map(r=>`border-${r}`):[]})}}const Dp=Xt({elevation:{type:[Number,String],validator(e){const n=parseInt(e);return!isNaN(n)&&n>=0&&n<=24}}},"elevation");function Pp(e){return{elevationClasses:Ot(()=>{const n=Hc(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const Vx={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},zp=Xt({location:String},"location");function Bp(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=Fx();return{locationStyles:mt(()=>{if(!e.location)return{};const{side:c,align:u}=cN(e.location.split(" ").length>1?e.location:`${e.location} center`,r.value);function g(s){return t?t(s):0}const v={};return c!=="center"&&(n?v[Vx[c]]=`calc(100% - ${g(c)}px)`:v[c]=0),u!=="center"?n?v[Vx[u]]=`calc(100% - ${g(u)}px)`:v[u]=0:(c==="center"?v.top=v.left="50%":v[{top:"left",bottom:"left",left:"top",right:"top"}[c]]="50%",v.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[c]),v})}}const zN=[null,"default","comfortable","compact"],kc=Xt({density:{type:String,default:"default",validator:e=>zN.includes(e)}},"density");function nh(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a();return{densityClasses:Ot(()=>`${n}--density-${e.density}`)}}const BN=["x-small","small","default","large","x-large"],_c=Xt({size:{type:[String,Number],default:"default"}},"size");function rh(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a();return Cx(()=>{const t=e.size;let r,c;return kp(BN,t)?r=`${n}--size-${t}`:t&&(c={width:Nn(t),height:Nn(t)}),{sizeClasses:r,sizeStyles:c}})}const FN=["elevated","flat","tonal","outlined","text","plain"];function Fp(e,n){return dt(Er,null,[e&&dt("span",{key:"overlay",class:ln(`${n}__overlay`)},null),dt("span",{key:"underlay",class:ln(`${n}__underlay`)},null)])}const ih=Xt({color:String,variant:{type:String,default:"elevated",validator:e=>FN.includes(e)}},"variant");function jp(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a();const t=Ot(()=>{const{variant:u}=cs(e);return`${n}--variant-${u}`}),{colorClasses:r,colorStyles:c}=Op(()=>{const{variant:u,color:g}=cs(e);return{[["elevated","flat"].includes(u)?"background":"text"]:g}});return{colorClasses:r,colorStyles:c,variantClasses:t}}const Gx=Xt({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},...eh(),...Si(),...kc(),...Dp(),...ml(),..._c({size:void 0}),...No(),...Sa(),...ih()},"VBtnGroup"),qx=_r()({name:"VBtnGroup",props:Gx(),setup(e,n){let{slots:t}=n;const{themeClasses:r}=gl(e),{densityClasses:c}=nh(e),{borderClasses:u}=th(e),{elevationClasses:g}=Pp(e),{roundedClasses:v}=vl(e);Sp({VBtn:{height:Ot(()=>e.direction==="horizontal"&&e.size==null?"auto":null),baseColor:Ot(()=>e.baseColor),color:Ot(()=>e.color),density:Ot(()=>e.density),flat:!0,size:Ot(()=>e.size),variant:Ot(()=>e.variant)}}),Ti(()=>De(e.tag,{class:ln(["v-btn-group",`v-btn-group--${e.direction}`,{"v-btn-group--divided":e.divided,"v-btn-group--has-size":e.size!=null},r.value,u.value,c.value,g.value,v.value,e.class]),style:Xn(e.style)},t))}}),jN=Xt({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),WN=Xt({value:null,disabled:Boolean,selectedClass:String},"group-item");function HN(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=Oo("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const c=Qg();Fa(Symbol.for(`${n.description}:id`),c);const u=ea(n,null);if(!u){if(!t)return u;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${n.description}`)}const g=Ot(()=>e.value),v=mt(()=>!!(u.disabled.value||e.disabled));function s(){u?.register({id:c,value:g,disabled:v},r)}function d(){u?.unregister(c)}s(),Xs(()=>d());const a=mt(()=>u.isSelected(c)),l=mt(()=>u.items.value[0].id===c),h=mt(()=>u.items.value[u.items.value.length-1].id===c),p=mt(()=>a.value&&[u.selectedClass.value,e.selectedClass]);return xi(a,o=>{r.emit("group:selected",{value:o})},{flush:"sync"}),{id:c,isSelected:a,isFirst:l,isLast:h,toggle:()=>u.select(c,!a.value),select:o=>u.select(c,o),selectedClass:p,value:g,disabled:v,group:u,register:s,unregister:d}}function UN(e,n){let t=!1;const r=Rl([]),c=Bx(e,"modelValue",[],h=>h===void 0?[]:Yx(r,h===null?[null]:rN(h)),h=>{const p=GN(r,h);return e.multiple?p:p[0]}),u=Oo("useGroup");function g(h,p){const o=h,f=Symbol.for(`${n.description}:id`),m=wc(f,u?.vnode).indexOf(p);Ut(o.value)===void 0&&(o.value=m,o.useIndexAsValue=!0),m>-1?r.splice(m,0,o):r.push(o)}function v(h){if(t)return;s();const p=r.findIndex(o=>o.id===h);r.splice(p,1)}function s(){const h=r.find(p=>!p.disabled);h&&e.mandatory==="force"&&!c.value.length&&(c.value=[h.id])}ja(()=>{s()}),Xs(()=>{t=!0}),Yg(()=>{for(let h=0;h<r.length;h++)r[h].useIndexAsValue&&(r[h].value=h)});function d(h,p){const o=r.find(f=>f.id===h);if(!(p&&o?.disabled))if(e.multiple){const f=c.value.slice(),m=f.findIndex(x=>x===h),w=~m;if(p=p??!w,w&&e.mandatory&&f.length<=1||!w&&e.max!=null&&f.length+1>e.max)return;m<0&&p?f.push(h):m>=0&&!p&&f.splice(m,1),c.value=f}else{const f=c.value.includes(h);if(e.mandatory&&f||!f&&!p)return;c.value=p??!f?[h]:[]}}function a(h){if(e.multiple&&dl('This method is not supported when using "multiple" prop'),c.value.length){const p=c.value[0],o=r.findIndex(w=>w.id===p);let f=(o+h)%r.length,m=r[f];for(;m.disabled&&f!==o;)f=(f+h)%r.length,m=r[f];if(m.disabled)return;c.value=[r[f].id]}else{const p=r.find(o=>!o.disabled);p&&(c.value=[p.id])}}const l={register:g,unregister:v,selected:c,select:d,disabled:Ot(()=>e.disabled),prev:()=>a(r.length-1),next:()=>a(1),isSelected:h=>c.value.includes(h),selectedClass:Ot(()=>e.selectedClass),items:Ot(()=>r),getItemIndex:h=>VN(r,h)};return Fa(n,l),l}function VN(e,n){const t=Yx(e,[n]);return t.length?e.findIndex(r=>r.id===t[0]):-1}function Yx(e,n){const t=[];return n.forEach(r=>{const c=e.find(g=>Tp(r,g.value)),u=e[r];c?.value!==void 0?t.push(c.id):u?.useIndexAsValue&&t.push(u.id)}),t}function GN(e,n){const t=[];return n.forEach(r=>{const c=e.findIndex(u=>u.id===r);if(~c){const u=e[c];t.push(u.value!==void 0?u.value:c)}}),t}const Kx=Symbol.for("vuetify:v-btn-toggle"),qN=Xt({...Gx(),...jN()},"VBtnToggle");_r()({name:"VBtnToggle",props:qN(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:t}=n;const{isSelected:r,next:c,prev:u,select:g,selected:v}=UN(e,Kx);return Ti(()=>{const s=qx.filterProps(e);return De(qx,fr({class:["v-btn-toggle",e.class]},s,{style:e.style}),{default:()=>[t.default?.({isSelected:r,next:c,prev:u,select:g,selected:v})]})}),{next:c,prev:u,select:g}}});const ps=[String,Function,Object,Array],YN=Symbol.for("vuetify:icons"),oh=Xt({icon:{type:ps},tag:{type:[String,Object,Function],required:!0}},"icon"),Jx=_r()({name:"VComponentIcon",props:oh(),setup(e,n){let{slots:t}=n;return()=>{const r=e.icon;return De(e.tag,null,{default:()=>[e.icon?De(r,null,null):t.default?.()]})}}}),KN=Ku({name:"VSvgIcon",inheritAttrs:!1,props:oh(),setup(e,n){let{attrs:t}=n;return()=>De(e.tag,fr(t,{style:null}),{default:()=>[dt("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?dt("path",{d:r[0],"fill-opacity":r[1]},null):dt("path",{d:r},null)):dt("path",{d:e.icon},null)])]})}});Ku({name:"VLigatureIcon",props:oh(),setup(e){return()=>De(e.tag,null,{default:()=>[e.icon]})}});const JN=Ku({name:"VClassIcon",props:oh(),setup(e){return()=>De(e.tag,{class:ln(e.icon)},null)}}),QN=e=>{const n=ea(YN);if(!n)throw new Error("Missing Vuetify Icons provide!");return{iconData:mt(()=>{const t=cs(e);if(!t)return{component:Jx};let r=t;if(typeof r=="string"&&(r=r.trim(),r.startsWith("$")&&(r=n.aliases?.[r.slice(1)])),r||dl(`Could not find aliased icon "${t}"`),Array.isArray(r))return{component:KN,icon:r};if(typeof r!="string")return{component:Jx,icon:r};const c=Object.keys(n.sets).find(g=>typeof r=="string"&&r.startsWith(`${g}:`)),u=c?r.slice(c.length+1):r;return{component:n.sets[c??n.defaultSet].component,icon:u}})}},ZN=Xt({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:ps,opacity:[String,Number],...Si(),..._c(),...No({tag:"i"}),...Sa()},"VIcon"),Ea=_r()({name:"VIcon",props:ZN(),setup(e,n){let{attrs:t,slots:r}=n;const c=Hi(),{themeClasses:u}=EN(),{iconData:g}=QN(()=>c.value||e.icon),{sizeClasses:v}=rh(e),{textColorClasses:s,textColorStyles:d}=Ju(()=>e.color);return Ti(()=>{const a=r.default?.();a&&(c.value=xx(a).filter(h=>h.type===rm&&h.children&&typeof h.children=="string")[0]?.children);const l=!!(t.onClick||t.onClickOnce);return De(g.value.component,{tag:e.tag,icon:g.value.icon,class:ln(["v-icon","notranslate",u.value,v.value,s.value,{"v-icon--clickable":l,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class]),style:Xn([{"--v-icon-opacity":e.opacity},v.value?void 0:{fontSize:Nn(e.size),height:Nn(e.size),width:Nn(e.size)},d.value,e.style]),role:l?"button":void 0,"aria-hidden":!l,tabindex:l?e.disabled?-1:0:void 0},{default:()=>[a]})}),{}}});function Qx(e,n){const t=on(),r=Hi(!1);if(wp){const c=new IntersectionObserver(u=>{r.value=!!u.find(g=>g.isIntersecting)},n);Hh(()=>{c.disconnect()}),xi(t,(u,g)=>{g&&(c.unobserve(g),r.value=!1),u&&c.observe(u)},{flush:"post"})}return{intersectionRef:t,isIntersecting:r}}const XN=Xt({reveal:{type:[Boolean,Object],default:!1}},"reveal");function eD(e){const n=Ot(()=>typeof e.reveal=="object"?Math.max(0,Number(e.reveal.duration??900)):900),t=Hi(e.reveal?"initial":"disabled");return ja(async()=>{e.reveal&&(t.value="initial",await new Promise(r=>requestAnimationFrame(r)),t.value="pending",await new Promise(r=>setTimeout(r,n.value)),t.value="done")}),{duration:n,state:t}}const tD=Xt({bgColor:String,color:String,indeterminate:[Boolean,String],rounded:Boolean,modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Si(),...XN(),..._c(),...No({tag:"div"}),...Sa()},"VProgressCircular"),Wp=_r()({name:"VProgressCircular",props:tD(),setup(e,n){let{slots:t}=n;const r=20,c=2*Math.PI*r,u=on(),{themeClasses:g}=gl(e),{sizeClasses:v,sizeStyles:s}=rh(e),{textColorClasses:d,textColorStyles:a}=Ju(()=>e.color),{textColorClasses:l,textColorStyles:h}=Ju(()=>e.bgColor),{intersectionRef:p,isIntersecting:o}=Qx(),{resizeRef:f,contentRect:m}=Px(),{state:w,duration:x}=eD(e),R=Ot(()=>w.value==="initial"?0:Uu(parseFloat(e.modelValue),0,100)),T=Ot(()=>Number(e.width)),_=Ot(()=>s.value?Number(e.size):m.value?m.value.width:Math.max(T.value,32)),C=Ot(()=>r/(1-T.value/_.value)*2),P=Ot(()=>T.value/_.value*C.value),O=Ot(()=>{const k=(100-R.value)/100*c;return e.rounded&&R.value>0&&R.value<100?Nn(Math.min(c-.01,k+P.value)):Nn(k)}),E=mt(()=>{const k=Number(e.rotate);return e.rounded?k+P.value/2/c*360:k});return li(()=>{p.value=u.value,f.value=u.value}),Ti(()=>De(e.tag,{ref:u,class:ln(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":o.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||yx()),"v-progress-circular--revealing":["initial","pending"].includes(w.value)},g.value,v.value,d.value,e.class]),style:Xn([s.value,a.value,{"--progress-reveal-duration":`${x.value}ms`},e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:R.value},{default:()=>[dt("svg",{style:{transform:`rotate(calc(-90deg + ${E.value}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${C.value} ${C.value}`},[dt("circle",{class:ln(["v-progress-circular__underlay",l.value]),style:Xn(h.value),fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":P.value,"stroke-dasharray":c,"stroke-dashoffset":0},null),dt("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":P.value,"stroke-dasharray":c,"stroke-dashoffset":O.value,"stroke-linecap":e.rounded?"round":void 0},null)]),t.default&&dt("div",{class:"v-progress-circular__content"},[t.default({value:R.value})])]})),{}}}),nD=Xt({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function rD(e,n){const t=Ot(()=>!!e.chunkCount||!!e.chunkWidth),r=mt(()=>{const v=cs(n);if(!v)return 0;if(!e.chunkCount)return Number(e.chunkWidth);const s=Number(e.chunkCount);return(v-Number(e.chunkGap)*(s-1))/s}),c=Ot(()=>Number(e.chunkGap)),u=mt(()=>{if(!t.value)return{};const v=Nn(c.value),s=Nn(r.value);return{maskRepeat:"repeat-x",maskImage:`linear-gradient(90deg, #000, #000 ${s}, transparent ${s}, transparent)`,maskSize:`calc(${s} + ${v}) 100%`}});function g(v){const s=cs(n);if(!s)return v;const d=100*c.value/s,a=100*(r.value+c.value)/s,l=Math.floor((v+d)/a+1e-9);return Uu(l*a-d/2,0,100)}return{hasChunks:t,chunksMaskStyles:u,snapValueToChunk:g}}const iD=Xt({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...nD(),...Si(),...zp({location:"top"}),...ml(),...No(),...Sa()},"VProgressLinear"),Zx=_r()({name:"VProgressLinear",props:iD(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:t}=n;const r=on(),c=Bx(e,"modelValue"),{isRtl:u,rtlClasses:g}=Fx(),{themeClasses:v}=gl(e),{locationStyles:s}=Bp(e),{textColorClasses:d,textColorStyles:a}=Ju(()=>e.color),{backgroundColorClasses:l,backgroundColorStyles:h}=Qu(()=>e.bgColor||e.color),{backgroundColorClasses:p,backgroundColorStyles:o}=Qu(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:f,backgroundColorStyles:m}=Qu(()=>e.color),{roundedClasses:w}=vl(e),{intersectionRef:x,isIntersecting:R}=Qx(),T=mt(()=>parseFloat(e.max)),_=mt(()=>parseFloat(e.height)),C=mt(()=>Uu(parseFloat(e.bufferValue)/T.value*100,0,100)),P=mt(()=>Uu(parseFloat(c.value)/T.value*100,0,100)),O=mt(()=>u.value!==e.reverse),E=mt(()=>e.indeterminate?"fade-transition":"slide-x-transition"),k=Hi(0),{hasChunks:B,chunksMaskStyles:N,snapValueToChunk:M}=rD(e,k);zx(B,()=>{const{resizeRef:j}=Px(U=>k.value=U[0].contentRect.width);li(()=>j.value=r.value)});const $=mt(()=>B.value?M(C.value):C.value),A=mt(()=>B.value?M(P.value):P.value);function D(j){if(!x.value)return;const{left:U,right:q,width:Q}=x.value.getBoundingClientRect(),re=O.value?Q-j.clientX+(q-Q):j.clientX-U;c.value=Math.round(re/Q*T.value)}return li(()=>{x.value=r.value}),Ti(()=>De(e.tag,{ref:r,class:ln(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&R.value,"v-progress-linear--reverse":O.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped,"v-progress-linear--clickable":e.clickable},w.value,v.value,g.value,e.class]),style:Xn([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Nn(_.value):0,"--v-progress-linear-height":Nn(_.value),...e.absolute?s.value:{}},N.value,e.style]),role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(c.value),T.value),onClick:e.clickable&&D},{default:()=>[e.stream&&dt("div",{key:"stream",class:ln(["v-progress-linear__stream",d.value]),style:{...a.value,[O.value?"left":"right"]:Nn(-_.value),borderTop:`${Nn(_.value/2)} dotted`,opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,top:`calc(50% - ${Nn(_.value/4)})`,width:Nn(100-C.value,"%"),"--v-progress-linear-stream-to":Nn(_.value*(O.value?1:-1))}},null),dt("div",{class:ln(["v-progress-linear__background",l.value]),style:Xn([h.value,{opacity:e.bgOpacity!=null?parseFloat(e.bgOpacity):void 0,width:e.stream?0:void 0}])},null),dt("div",{class:ln(["v-progress-linear__buffer",p.value]),style:Xn([o.value,{opacity:e.bufferOpacity!=null?parseFloat(e.bufferOpacity):void 0,width:Nn($.value,"%")}])},null),De(Ml,{name:E.value},{default:()=>[e.indeterminate?dt("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(j=>dt("div",{key:j,class:ln(["v-progress-linear__indeterminate",j,f.value]),style:Xn(m.value)},null))]):dt("div",{class:ln(["v-progress-linear__determinate",f.value]),style:Xn([m.value,{width:Nn(A.value,"%")}])},null)]}),t.default&&dt("div",{class:"v-progress-linear__content"},[t.default({value:P.value,buffer:C.value})])]})),{}}}),Xx=Xt({loading:[Boolean,String]},"loader");function e1(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a();return{loaderClasses:Ot(()=>({[`${n}--loading`]:e.loading}))}}function oD(e,n){let{slots:t}=n;return dt("div",{class:ln(`${e.name}__loader`)},[t.default?.({color:e.color,isActive:e.active})||De(Zx,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const sD=["static","relative","fixed","absolute","sticky"],t1=Xt({position:{type:String,validator:(e=>sD.includes(e))}},"position");function n1(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$a();return{positionClasses:Ot(()=>e.position?`${n}--${e.position}`:void 0)}}function aD(){const e=Oo("useRoute");return mt(()=>e?.proxy?.$route)}function r1(e,n){const t=ta("RouterLink"),r=Ot(()=>!!(e.href||e.to)),c=mt(()=>r?.value||kx(n,"click")||kx(e,"click"));if(typeof t=="string"||!("useLink"in t)){const l=Ot(()=>e.href);return{isLink:r,isRouterLink:Ot(()=>!1),isClickable:c,href:l,linkProps:Rl({href:l}),route:Ot(()=>{}),navigate:Ot(()=>{})}}const u=t.useLink({to:Ot(()=>e.to||""),replace:Ot(()=>e.replace)}),g=mt(()=>e.to?u:void 0),v=aD(),s=mt(()=>g.value?e.exact?v.value?g.value.isExactActive?.value&&Tp(g.value.route.value.query,v.value.query):g.value.isExactActive?.value??!1:g.value.isActive?.value??!1:!1),d=mt(()=>e.to?g.value?.route.value.href:e.href),a=Ot(()=>!!e.to);return{isLink:r,isRouterLink:a,isClickable:c,isActive:s,route:Ot(()=>g.value?.route.value),navigate:Ot(()=>g.value?.navigate),href:d,linkProps:Rl({href:d,"aria-current":Ot(()=>s.value?"page":void 0),"aria-disabled":Ot(()=>e.disabled&&r.value?"true":void 0),tabindex:Ot(()=>e.disabled&&r.value?"-1":void 0)})}}const i1=Xt({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");function lD(e,n){xi(()=>e.isActive?.value,t=>{e.isLink.value&&t!=null&&n&&Il(()=>{n(t)})},{immediate:!0})}const Hp=Symbol("rippleStop"),cD=80;function o1(e,n){e.style.transform=n,e.style.webkitTransform=n}function Up(e){return e.constructor.name==="TouchEvent"}function s1(e){return e.constructor.name==="KeyboardEvent"}const uD=function(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,c=0;if(!s1(e)){const l=new _p(n),h=Up(e)?e.touches[e.touches.length-1]:e,p=uN([h.clientX,h.clientY]);r=p.x-l.left,c=p.y-l.top}let u=0,g=.3;n._ripple?.circle?(g=.15,u=n.clientWidth/2,u=t.center?u:u+Math.sqrt((r-u)**2+(c-u)**2)/4):u=Math.sqrt(n.clientWidth**2+n.clientHeight**2)/2;const v=`${(n.clientWidth-u*2)/2}px`,s=`${(n.clientHeight-u*2)/2}px`,d=t.center?v:`${r-u}px`,a=t.center?s:`${c-u}px`;return{radius:u,scale:g,x:d,y:a,centerX:v,centerY:s}},sh={show(e,n){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!n?._ripple?.enabled)return;const r=document.createElement("span"),c=document.createElement("span");r.appendChild(c),r.className="v-ripple__container",t.class&&(r.className+=` ${t.class}`);const{radius:u,scale:g,x:v,y:s,centerX:d,centerY:a}=uD(e,n,t),l=`${u*2}px`;c.className="v-ripple__animation",c.style.width=l,c.style.height=l,n.appendChild(r);const h=window.getComputedStyle(n);h&&h.position==="static"&&(n.style.position="relative",n.dataset.previousPosition="static"),c.classList.add("v-ripple__animation--enter"),c.classList.add("v-ripple__animation--visible"),o1(c,`translate(${v}, ${s}) scale3d(${g},${g},${g})`),c.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.classList.remove("v-ripple__animation--enter"),c.classList.add("v-ripple__animation--in"),o1(c,`translate(${d}, ${a}) scale3d(1,1,1)`)})})},hide(e){if(!e?._ripple?.enabled)return;const n=e.getElementsByClassName("v-ripple__animation");if(n.length===0)return;const t=Array.from(n).findLast(u=>!u.dataset.isHiding);if(t)t.dataset.isHiding="true";else return;const r=performance.now()-Number(t.dataset.activated),c=Math.max(250-r,0);setTimeout(()=>{t.classList.remove("v-ripple__animation--in"),t.classList.add("v-ripple__animation--out"),setTimeout(()=>{e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),t.parentNode?.parentNode===e&&e.removeChild(t.parentNode)},300)},c)}};function a1(e){return typeof e>"u"||!!e}function Ac(e){const n={},t=e.currentTarget;if(!(!t?._ripple||t._ripple.touched||e[Hp])){if(e[Hp]=!0,Up(e))t._ripple.touched=!0,t._ripple.isTouch=!0;else if(t._ripple.isTouch)return;if(n.center=t._ripple.centered||s1(e),t._ripple.class&&(n.class=t._ripple.class),Up(e)){if(t._ripple.showTimerCommit)return;t._ripple.showTimerCommit=()=>{sh.show(e,t,n)},t._ripple.showTimer=window.setTimeout(()=>{t?._ripple?.showTimerCommit&&(t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null)},cD)}else sh.show(e,t,n)}}function ah(e){e[Hp]=!0}function Ki(e){const n=e.currentTarget;if(n?._ripple){if(window.clearTimeout(n._ripple.showTimer),e.type==="touchend"&&n._ripple.showTimerCommit){n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null,n._ripple.showTimer=window.setTimeout(()=>{Ki(e)});return}window.setTimeout(()=>{n._ripple&&(n._ripple.touched=!1)}),sh.hide(n)}}function l1(e){const n=e.currentTarget;n?._ripple&&(n._ripple.showTimerCommit&&(n._ripple.showTimerCommit=null),window.clearTimeout(n._ripple.showTimer))}let $c=!1;function hD(e,n){!$c&&n.includes(e.key)&&($c=!0,Ac(e))}function c1(e){$c=!1,Ki(e)}function u1(e){$c&&($c=!1,Ki(e))}function h1(e,n,t){const{value:r,modifiers:c}=n,u=a1(r);u||sh.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=u,e._ripple.centered=c.center,e._ripple.circle=c.circle;const g=xp(r)?r:{};g.class&&(e._ripple.class=g.class);const v=g.keys??["Enter","Space"];if(e._ripple.keyDownHandler=s=>hD(s,v),u&&!t){if(c.stop){e.addEventListener("touchstart",ah,{passive:!0}),e.addEventListener("mousedown",ah);return}e.addEventListener("touchstart",Ac,{passive:!0}),e.addEventListener("touchend",Ki,{passive:!0}),e.addEventListener("touchmove",l1,{passive:!0}),e.addEventListener("touchcancel",Ki),e.addEventListener("mousedown",Ac),e.addEventListener("mouseup",Ki),e.addEventListener("mouseleave",Ki),e.addEventListener("keydown",e._ripple.keyDownHandler),e.addEventListener("keyup",c1),e.addEventListener("blur",u1),e.addEventListener("dragstart",Ki,{passive:!0})}else!u&&t&&d1(e)}function d1(e){e.removeEventListener("touchstart",ah),e.removeEventListener("mousedown",ah),e.removeEventListener("touchstart",Ac),e.removeEventListener("touchend",Ki),e.removeEventListener("touchmove",l1),e.removeEventListener("touchcancel",Ki),e.removeEventListener("mousedown",Ac),e.removeEventListener("mouseup",Ki),e.removeEventListener("mouseleave",Ki),e._ripple?.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",c1),e.removeEventListener("blur",u1),e.removeEventListener("dragstart",Ki)}function dD(e,n){h1(e,n,!1)}function fD(e){d1(e),delete e._ripple}function pD(e,n){if(n.value===n.oldValue)return;const t=a1(n.oldValue);h1(e,n,t)}const Vp={mounted:dD,unmounted:fD,updated:pD},gD=Xt({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:Kx},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:ps,appendIcon:ps,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...eh(),...Si(),...kc(),...Rp(),...Dp(),...WN(),...Xx(),...zp(),...t1(),...ml(),...i1(),..._c(),...No({tag:"button"}),...Sa(),...ih({variant:"elevated"})},"VBtn"),mD=_r()({name:"VBtn",props:gD(),emits:{"group:selected":e=>!0},setup(e,n){let{attrs:t,slots:r}=n;const{themeClasses:c}=gl(e),{borderClasses:u}=th(e),{densityClasses:g}=nh(e),{dimensionStyles:v}=Lp(e),{elevationClasses:s}=Pp(e),{loaderClasses:d}=e1(e),{locationStyles:a}=Bp(e),{positionClasses:l}=n1(e),{roundedClasses:h}=vl(e),{sizeClasses:p,sizeStyles:o}=rh(e),f=HN(e,e.symbol,!1),m=r1(e,t),w=mt(()=>e.active!==void 0?e.active:m.isRouterLink.value?m.isActive?.value:f?.isSelected.value),x=Ot(()=>w.value?e.activeColor??e.color:e.color),R=mt(()=>({color:f?.isSelected.value&&(!m.isLink.value||m.isActive?.value)||!f||m.isActive?.value?x.value??e.baseColor:e.baseColor,variant:e.variant})),{colorClasses:T,colorStyles:_,variantClasses:C}=jp(R),P=mt(()=>f?.disabled.value||e.disabled),O=Ot(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),E=mt(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function k(B){P.value||m.isLink.value&&(B.metaKey||B.ctrlKey||B.shiftKey||B.button!==0||t.target==="_blank")||(m.isRouterLink.value?m.navigate.value?.(B):f?.toggle())}return lD(m,f?.select),Ti(()=>{const B=m.isLink.value?"a":e.tag,N=!!(e.prependIcon||r.prepend),M=!!(e.appendIcon||r.append),$=!!(e.icon&&e.icon!==!0);return Ls(De(B,fr(m.linkProps,{type:B==="a"?void 0:"button",class:["v-btn",f?.selectedClass.value,{"v-btn--active":w.value,"v-btn--block":e.block,"v-btn--disabled":P.value,"v-btn--elevated":O.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},e.spaced?["v-btn--spaced",`v-btn--spaced-${e.spaced}`]:[],c.value,u.value,T.value,g.value,s.value,d.value,l.value,h.value,p.value,C.value,e.class],style:[_.value,v.value,a.value,o.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:P.value&&B!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:k,value:E.value}),{default:()=>[Fp(!0,"v-btn"),!e.icon&&N&&dt("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?De(Ta,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):De(Ea,{key:"prepend-icon",icon:e.prependIcon},null)]),dt("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&$?De(Ea,{key:"content-icon",icon:e.icon},null):De(Ta,{key:"content-defaults",disabled:!$,defaults:{VIcon:{icon:e.icon}}},{default:()=>[r.default?.()??Ir(e.text)]})]),!e.icon&&M&&dt("span",{key:"append",class:"v-btn__append"},[r.append?De(Ta,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):De(Ea,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&dt("span",{key:"loader",class:"v-btn__loader"},[r.loader?.()??De(Wp,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}),[[Vp,!P.value&&e.ripple,"",{center:!!e.icon}]])}),{group:f}}}),vD=Xt({start:Boolean,end:Boolean,icon:ps,image:String,text:String,...eh(),...Si(),...kc(),...ml(),..._c(),...No(),...Sa(),...ih({variant:"flat"})},"VAvatar"),lh=_r()({name:"VAvatar",props:vD(),setup(e,n){let{slots:t}=n;const{themeClasses:r}=gl(e),{borderClasses:c}=th(e),{colorClasses:u,colorStyles:g,variantClasses:v}=jp(e),{densityClasses:s}=nh(e),{roundedClasses:d}=vl(e),{sizeClasses:a,sizeStyles:l}=rh(e);return Ti(()=>De(e.tag,{class:ln(["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},r.value,c.value,u.value,s.value,d.value,a.value,v.value,e.class]),style:Xn([g.value,l.value,e.style])},{default:()=>[t.default?De(Ta,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[t.default()]}):e.image?De(Xu,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?De(Ea,{key:"icon",icon:e.icon},null):e.text,Fp(!1,"v-avatar")]})),{}}}),yD=Xt({...Si(),...No()},"VCardActions"),f1=_r()({name:"VCardActions",props:yD(),setup(e,n){let{slots:t}=n;return Sp({VBtn:{slim:!0,variant:"text"}}),Ti(()=>De(e.tag,{class:ln(["v-card-actions",e.class]),style:Xn(e.style)},t)),{}}}),bD=Xt({opacity:[Number,String],...Si(),...No()},"VCardSubtitle"),wD=_r()({name:"VCardSubtitle",props:bD(),setup(e,n){let{slots:t}=n;return Ti(()=>De(e.tag,{class:ln(["v-card-subtitle",e.class]),style:Xn([{"--v-card-subtitle-opacity":e.opacity},e.style])},t)),{}}}),xD=Dx("v-card-title"),CD=Xt({appendAvatar:String,appendIcon:ps,prependAvatar:String,prependIcon:ps,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Si(),...kc(),...No()},"VCardItem"),kD=_r()({name:"VCardItem",props:CD(),setup(e,n){let{slots:t}=n;return Ti(()=>{const r=!!(e.prependAvatar||e.prependIcon),c=!!(r||t.prepend),u=!!(e.appendAvatar||e.appendIcon),g=!!(u||t.append),v=!!(e.title!=null||t.title),s=!!(e.subtitle!=null||t.subtitle);return De(e.tag,{class:ln(["v-card-item",e.class]),style:Xn(e.style)},{default:()=>[c&&dt("div",{key:"prepend",class:"v-card-item__prepend"},[t.prepend?De(Ta,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},t.prepend):dt(Er,null,[e.prependAvatar&&De(lh,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&De(Ea,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),dt("div",{class:"v-card-item__content"},[v&&De(xD,{key:"title"},{default:()=>[t.title?.()??Ir(e.title)]}),s&&De(wD,{key:"subtitle"},{default:()=>[t.subtitle?.()??Ir(e.subtitle)]}),t.default?.()]),g&&dt("div",{key:"append",class:"v-card-item__append"},[t.append?De(Ta,{key:"append-defaults",disabled:!u,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},t.append):dt(Er,null,[e.appendIcon&&De(Ea,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&De(lh,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]})}),{}}}),_D=Xt({opacity:[Number,String],...Si(),...No()},"VCardText"),p1=_r()({name:"VCardText",props:_D(),setup(e,n){let{slots:t}=n;return Ti(()=>De(e.tag,{class:ln(["v-card-text",e.class]),style:Xn([{"--v-card-text-opacity":e.opacity},e.style])},t)),{}}}),AD=Xt({appendAvatar:String,appendIcon:ps,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:ps,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...eh(),...Si(),...kc(),...Rp(),...Dp(),...Xx(),...zp(),...t1(),...ml(),...i1(),...No(),...Sa(),...ih({variant:"elevated"})},"VCard"),$D=_r()({name:"VCard",directives:{vRipple:Vp},props:AD(),setup(e,n){let{attrs:t,slots:r}=n;const{themeClasses:c}=gl(e),{borderClasses:u}=th(e),{colorClasses:g,colorStyles:v,variantClasses:s}=jp(e),{densityClasses:d}=nh(e),{dimensionStyles:a}=Lp(e),{elevationClasses:l}=Pp(e),{loaderClasses:h}=e1(e),{locationStyles:p}=Bp(e),{positionClasses:o}=n1(e),{roundedClasses:f}=vl(e),m=r1(e,t),w=Hi(void 0);return xi(()=>e.loading,(x,R)=>{w.value=!x&&typeof R=="string"?R:typeof x=="boolean"?void 0:x},{immediate:!0}),Ti(()=>{const x=e.link!==!1&&m.isLink.value,R=!e.disabled&&e.link!==!1&&(e.link||m.isClickable.value),T=x?"a":e.tag,_=!!(r.title||e.title!=null),C=!!(r.subtitle||e.subtitle!=null),P=_||C,O=!!(r.append||e.appendAvatar||e.appendIcon),E=!!(r.prepend||e.prependAvatar||e.prependIcon),k=!!(r.image||e.image),B=P||E||O,N=!!(r.text||e.text!=null);return Ls(De(T,fr(m.linkProps,{class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":R},c.value,u.value,g.value,d.value,l.value,h.value,o.value,f.value,s.value,e.class],style:[v.value,a.value,p.value,{"--v-card-height":Nn(e.height)},e.style],onClick:R&&m.navigate.value,tabindex:e.disabled?-1:void 0}),{default:()=>[k&&dt("div",{key:"image",class:"v-card__image"},[r.image?De(Ta,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):De(Xu,{key:"image-img",cover:!0,src:e.image},null)]),De(oD,{name:"v-card",active:!!e.loading,color:w.value},{default:r.loader}),B&&De(kD,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:r.item,prepend:r.prepend,title:r.title,subtitle:r.subtitle,append:r.append}),N&&De(p1,{key:"text"},{default:()=>[r.text?.()??e.text]}),r.default?.(),r.actions&&De(f1,null,{default:r.actions}),Fp(R,"v-card")]}),[[Vp,R&&e.ripple]])}),{}}}),SD=Dx("v-spacer","div","VSpacer"),TD=Os({__name:"VSonner",props:{id:{},invert:{type:Boolean},position:{default:"bottom-center"},closeButtonPosition:{},hotkey:{default:()=>["altKey","KeyT"]},expand:{type:Boolean,default:!1},duration:{},gap:{},visibleToasts:{default:3},toastOptions:{},class:{},offset:{default:32},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){return(n,t)=>(xt(),tn(Er,null,[De(Ut(X2),{position:e.position,hotkey:e.hotkey,expand:e.expand,"visible-toasts":e.visibleToasts,duration:e.duration,"toast-options":e.toastOptions,offset:e.offset},null,8,["position","hotkey","expand","visible-toasts","duration","toast-options","offset"]),Ci(n.$slots,"default")],64))}}),ED=Os({__name:"ProgressBar",props:{duration:{default:5e3},progressBarProps:{},isPaused:{type:Boolean,default:!1},reverseProgressBar:{type:Boolean,default:!1}},setup(e){const n=e,t=n.reverseProgressBar?on(0):on(5e3);let r;xi(()=>n.isPaused,u=>{!u&&!n.progressBarProps?.indeterminate&&c()});function c(){r=setTimeout(()=>{n.isPaused||(n.reverseProgressBar?t.value+=120:t.value-=120,t.value<=0&&!n.reverseProgressBar?(t.value=0,clearInterval(r)):t.value>=n.duration&&n.reverseProgressBar?(t.value=n.duration,clearInterval(r)):c())},100)}return ja(()=>{n.progressBarProps?.indeterminate||(t.value=n.reverseProgressBar?0:n.duration,c())}),Xs(()=>{clearInterval(r)}),(u,g)=>(xt(),or(Ut(Zx),fr(n.progressBarProps,{"model-value":Math.floor(100*(Ut(t)/n.duration))}),null,16,["model-value"]))}}),ID={class:"d-flex align-center justify-center fill-height"},MD={key:1,class:"d-flex align-center mr-8"},RD={class:"d-flex align-center justify-center fill-height"},LD={key:3},OD={class:"pb-1"},ND=["innerHTML"],DD=Os({inheritAttrs:!1,__name:"Toast",props:{text:{},description:{},vertical:{type:Boolean,default:!1},cardProps:{},cardTextProps:{},cardActionsProps:{default:()=>({})},action:{},prependIcon:{},prependIconProps:{},avatar:{},multipleAvatars:{},avatarProps:{},progressBar:{type:Boolean,default:!1},reverseProgressBar:{type:Boolean},progressDuration:{default:5e3},progressBarProps:{},loading:{type:Boolean}},emits:["closeToast"],setup(e){const n=on(!1);return(t,r)=>(xt(),or(Ut($D),fr({class:"card-snackbar"},e.cardProps,{onMouseenter:r[1]||(r[1]=c=>n.value=!0),onMouseleave:r[2]||(r[2]=c=>n.value=!1)}),{default:It(()=>[dt("div",{class:ln({"d-flex flex-no-wrap justify-space-between":!e.vertical})},[De(Ut(p1),fr(e.cardTextProps,{class:{"d-flex align-center":e.prependIcon||e.avatar||e.multipleAvatars}}),{default:It(()=>[e.avatar?(xt(),or(Ut(lh),fr({key:0,class:"mr-2"},e.avatarProps),{default:It(()=>[De(Ut(Xu),{src:e.avatar,cover:""},{placeholder:It(()=>[dt("div",ID,[De(Ut(Wp),{color:"grey-lighten-2",indeterminate:""})])]),_:1},8,["src"])]),_:1},16)):e.multipleAvatars?(xt(),tn("div",MD,[(xt(!0),tn(Er,null,Ll(e.multipleAvatars.length<=5?e.multipleAvatars:e.multipleAvatars.slice(0,5),(c,u)=>(xt(),or(Ut(lh),fr({ref_for:!0},e.avatarProps,{key:u,class:"mr-n6",style:{zIndex:5-u}}),{default:It(()=>[De(Ut(Xu),{src:c,cover:""},{placeholder:It(()=>[dt("div",RD,[De(Ut(Wp),{color:"grey-lighten-2",indeterminate:""})])]),_:1},8,["src"])]),_:2},1040,["style"]))),128))])):qr("",!0),e.prependIcon?(xt(),or(Ut(Ea),fr({key:2,class:"mr-2",icon:e.prependIcon},e.prependIconProps),null,16,["icon"])):qr("",!0),e.description?(xt(),tn("div",LD,[dt("div",OD,Ir(e.text),1),dt("p",{class:"font-weight-light",innerHTML:e.description},null,8,ND)])):(xt(),tn(Er,{key:4},[ai(Ir(e.text),1)],64))]),_:1},16,["class"]),e.action?(xt(),or(Ut(f1),Uc(fr({key:0},e.cardActionsProps)),{default:It(()=>[De(Ut(SD)),De(Ut(mD),fr(e.action.buttonProps,{text:e.action.label,onClick:r[0]||(r[0]=()=>{t.$emit("closeToast"),e.action?.onClick?.()})}),null,16,["text"])]),_:1},16)):qr("",!0)],2),De(Ut(MN),null,{default:It(()=>[Ls(De(ED,{duration:e.progressDuration,"progress-bar-props":e.progressBarProps,"is-paused":n.value,"reverse-progress-bar":e.reverseProgressBar},null,8,["duration","progress-bar-props","is-paused","reverse-progress-bar"]),[[El,e.progressBar]])]),_:1})]),_:1},16))}}),PD=(e,n)=>{const t=e.__vccOpts||e;for(const[r,c]of n)t[r]=c;return t},zD=PD(DD,[["__scopeId","data-v-c014bbd8"]]);function g1(e,n){const{description:t,action:r,...c}=n||{};return bp.custom(Xg(Eo(zD,{...c,progressBar:n?.progressBar??!1,progressDuration:n?.duration??5e3,progressBarProps:{...n?.progressBarProps,indeterminate:n?.loading},description:t,action:r,text:e})),{...c,unstyled:!0})}function yl(e,n){return function(t,r){return g1(t,{prependIcon:n,cardProps:{color:e,...r?.cardProps},...r})}}const Gp=Object.assign(g1,{success:yl("success","mdi-check-circle"),error:yl("error","mdi-cancel"),warning:yl("warning","mdi-alert"),info:yl("info","mdi-alert-circle"),primary:yl("primary","mdi-bell"),secondary:yl("secondary","mdi-bell"),dismiss(e){return bp.dismiss(e)},toastOriginal:bp}),BD={components:{VSonner:TD},data:function(){return{active:new Map,nextId:0,noToastPaths:["/login"],position:localStorage.toastPosition==="bottom"?"bottom":"top"}},created:function(){window.addEventListener("openc3-toast-position",this.onPositionChange)},unmounted:function(){window.removeEventListener("openc3-toast-position",this.onPositionChange)},methods:{onPositionChange:function(e){const n=e.detail?.position;(n==="top"||n==="bottom")&&(this.position=n)},toast:function(e,n){if(this.noToastPaths.includes(window.location.pathname))return;n===void 0&&(n=5e3);const t=!n,r=`openc3-toast-${this.nextId++}`;this.active.set(r,e);const c=nO(e.level),u=sp[op[e.level]];Gp(this.toastText(e),{id:r,description:this.toastDescription(e),duration:t?1/0:n,prependIcon:this.toastNotificationIcon(e),prependIconProps:{style:`color:${c}`},cardProps:{style:`background-color:${u}!important;color:${c}!important;`,"data-test":"toast"},action:{label:t?"Acknowledge":"Dismiss",buttonProps:{variant:"text",style:`color:${c}`,"data-test":"dismiss-toast","aria-label":t?"Acknowledge":"Dismiss"},onClick:()=>{t&&e.msg_id&&window.dispatchEvent(new CustomEvent("openc3-ack-alert",{detail:{msg_id:e.msg_id}}))}},onDismiss:()=>this.active.delete(r),onAutoClose:()=>this.active.delete(r)})},dismissAll:function(){Gp.dismiss(),this.active.clear()},dismissMatching:function(e){for(const[n,t]of this.active)e(t)&&(Gp.dismiss(n),this.active.delete(n))},toastText:function(e){return e.title||e.message||e.body||""},toastDescription:function(e){const n=this.toastText(e),t=[];e.body&&e.body!==n&&t.push(e.body),e.message&&e.message!==n&&t.push(e.message);const r=this.toastTime(e);if(r&&t.push(r),!!t.length)return fx.sanitize(t.join("<br>"))},toastTime:function(e){return e["@timestamp"]?e["@timestamp"]:e.time?new Date(e.time/1e6).toISOString():""},toastNotificationIcon:function(e){switch(String(e.level).toUpperCase()){case"FATAL":return"mdi-alert-octagon";case"ERROR":return"mdi-alert-circle";case"WARN":return"mdi-alert";default:return"mdi-information"}}}};function FD(e,n,t,r,c,u){const g=Gt("VSonner");return xt(),or(g,{position:e.position==="bottom"?"bottom-center":"top-center","visible-toasts":3},null,8,["position"])}const jD=Ns(BD,[["render",FD]]);class WD{constructor(n={}){this.store=null,this.mounted=!1,this.$root=null,window.$cosmosNotify?.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}getStore(){return this.store||(this.store=Y0()),this.store}mount(){if(this.mounted)return;const n=Vh(jD);n.use(qp);const t=document.createElement("div");document.body.appendChild(t),this.$root=n.mount(t),this.mounted=!0}open({method:n,title:t,body:r,message:c,level:u,duration:g,type:v="alert",logToConsole:s=!1,saveToHistory:d=!0,...a}){this.mount(),s&&console.log(c?`${u.toUpperCase()} - ${c}`:`${u.toUpperCase()} - ${t}: ${r}`),d&&this.getStore().notifyAddHistory({title:t,body:r,message:c,level:u}),this[n]({title:t,body:r,message:c,level:u,duration:g,type:v,...a})}toast({title:n,body:t,message:r,level:c,duration:u,type:g,...v}){this.$root.toast({title:n,body:t,message:r,level:c,type:g,...v},u)}critical(n){this.open({...n,method:"toast",level:"critical"})}FATAL(n){this.critical(n)}ERROR(n){this.critical(n)}serious(n){this.open({...n,method:"toast",level:"serious"})}caution(n){this.open({...n,method:"toast",level:"caution"})}WARN(n){this.caution(n)}normal(n){this.open({...n,method:"toast",level:"normal"})}INFO(n){this.normal(n)}DEBUG(n){this.normal(n)}standby(n){this.open({...n,method:"toast",level:"standby"})}off(n){this.open({...n,method:"toast",level:"off"})}dismissAll(){this.$root?.dismissAll()}dismiss(n){this.$root?.dismissMatching(n)}}const HD={install(e,n){const t=new WD(n);e.provide("notify",t),e.config.globalProperties.hasOwnProperty("$notify")||(e.config.globalProperties.$notify=t)}},UD={component:e=>Eo(JN,{...e,class:"mdi"})},VD={dark:!0,colors:{primary:"#007ad0",secondary:"#4da3e0",tertiary:"#858585",surface:"#1f1f1f",background:"#161616","on-surface":"#d4d4d4","on-background":"#d4d4d4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},GD={dark:!0,colors:{primary:"#5B52E0",secondary:"#8078F0",tertiary:"#7E8696",surface:"#24242F",background:"#1A1A24","on-surface":"#D0D4DC","on-background":"#D0D4DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},qD={dark:!0,colors:{primary:"#0097A7",secondary:"#26C6DA",tertiary:"#708090",surface:"#242D36",background:"#1A2027","on-surface":"#D4DCE4","on-background":"#D4DCE4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},YD={dark:!0,colors:{primary:"#00897B",secondary:"#26A69A",tertiary:"#6E7680",surface:"#222428",background:"#181A1C","on-surface":"#D4D8DC","on-background":"#D4D8DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},qp=lm({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:ZO,cosmosDarkCobalt:VD,cosmosDarkIndigo:GD,cosmosDarkSlate:qD,cosmosDarkEmerald:YD}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:UD,...iO,...oO}}}),Yp=dk({createApp:Vh,appOptions:{render(){return Eo(wk,{})},el:"#openc3-tool"},handleInstance:e=>{e.use(wO),e.use(sl),e.use(qp),e.use(s2),e.use(HD)}}),q3=ir("e",Yp.bootstrap),Y3=ir("i",Yp.mount),K3=ir("u",Yp.unmount)})}}));