@n1k1t/mock-server 0.2.2 → 0.3.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.
- package/lib/package.json +3 -2
- package/lib/src/client/helpers/expectations.d.ts +32 -70
- package/lib/src/client/helpers/expectations.d.ts.map +1 -1
- package/lib/src/client/helpers/expectations.js.map +1 -1
- package/lib/src/client/models/client.d.ts +11 -9
- package/lib/src/client/models/client.d.ts.map +1 -1
- package/lib/src/client/models/client.js +0 -1
- package/lib/src/client/models/client.js.map +1 -1
- package/lib/src/client/models/types.d.ts +3 -25
- package/lib/src/client/models/types.d.ts.map +1 -1
- package/lib/src/client/models/types.js +0 -2
- package/lib/src/client/models/types.js.map +1 -1
- package/lib/src/client/onsite.d.ts +3 -3
- package/lib/src/client/onsite.d.ts.map +1 -1
- package/lib/src/client/onsite.js.map +1 -1
- package/lib/src/client/remote.d.ts +5 -5
- package/lib/src/client/remote.d.ts.map +1 -1
- package/lib/src/client/remote.js.map +1 -1
- package/lib/src/client/types.d.ts +8 -5
- package/lib/src/client/types.d.ts.map +1 -1
- package/lib/src/config/index.d.ts +10 -0
- package/lib/src/config/index.d.ts.map +1 -1
- package/lib/src/config/index.js +10 -0
- package/lib/src/config/index.js.map +1 -1
- package/lib/src/expectations/__utils__/index.js +1 -1
- package/lib/src/expectations/__utils__/index.js.map +1 -1
- package/lib/src/expectations/models/expectation.d.ts +14 -9
- package/lib/src/expectations/models/expectation.d.ts.map +1 -1
- package/lib/src/expectations/models/expectation.js +5 -0
- package/lib/src/expectations/models/expectation.js.map +1 -1
- package/lib/src/expectations/models/operator.d.ts +3 -3
- package/lib/src/expectations/models/operator.d.ts.map +1 -1
- package/lib/src/expectations/models/operator.js +3 -4
- package/lib/src/expectations/models/operator.js.map +1 -1
- package/lib/src/expectations/models/storage.d.ts +5 -1
- package/lib/src/expectations/models/storage.d.ts.map +1 -1
- package/lib/src/expectations/models/storage.js +13 -2
- package/lib/src/expectations/models/storage.js.map +1 -1
- package/lib/src/expectations/operators/and.operator.d.ts +2 -2
- package/lib/src/expectations/operators/and.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/and.operator.js +11 -4
- package/lib/src/expectations/operators/and.operator.js.map +1 -1
- package/lib/src/expectations/operators/exec.operator.d.ts +3 -3
- package/lib/src/expectations/operators/exec.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/exec.operator.js +4 -4
- package/lib/src/expectations/operators/exec.operator.js.map +1 -1
- package/lib/src/expectations/operators/has.operator.d.ts +3 -3
- package/lib/src/expectations/operators/has.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/has.operator.js +7 -6
- package/lib/src/expectations/operators/has.operator.js.map +1 -1
- package/lib/src/expectations/operators/if.operator.d.ts +2 -2
- package/lib/src/expectations/operators/if.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/if.operator.js +11 -6
- package/lib/src/expectations/operators/if.operator.js.map +1 -1
- package/lib/src/expectations/operators/merge.operator.d.ts +3 -3
- package/lib/src/expectations/operators/merge.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/merge.operator.js +17 -13
- package/lib/src/expectations/operators/merge.operator.js.map +1 -1
- package/lib/src/expectations/operators/not.operator.d.ts +2 -2
- package/lib/src/expectations/operators/not.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/not.operator.js +3 -3
- package/lib/src/expectations/operators/not.operator.js.map +1 -1
- package/lib/src/expectations/operators/or.operator.d.ts +2 -2
- package/lib/src/expectations/operators/or.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/or.operator.js +11 -4
- package/lib/src/expectations/operators/or.operator.js.map +1 -1
- package/lib/src/expectations/operators/remove.operator.d.ts +2 -2
- package/lib/src/expectations/operators/remove.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/remove.operator.js +2 -2
- package/lib/src/expectations/operators/remove.operator.js.map +1 -1
- package/lib/src/expectations/operators/root.operator.d.ts +2 -2
- package/lib/src/expectations/operators/root.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/root.operator.js +2 -2
- package/lib/src/expectations/operators/root.operator.js.map +1 -1
- package/lib/src/expectations/operators/set.operator.d.ts +3 -3
- package/lib/src/expectations/operators/set.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/set.operator.js +16 -8
- package/lib/src/expectations/operators/set.operator.js.map +1 -1
- package/lib/src/expectations/operators/switch.operator.d.ts +3 -3
- package/lib/src/expectations/operators/switch.operator.d.ts.map +1 -1
- package/lib/src/expectations/operators/switch.operator.js +9 -9
- package/lib/src/expectations/operators/switch.operator.js.map +1 -1
- package/lib/src/expectations/types.d.ts +38 -46
- package/lib/src/expectations/types.d.ts.map +1 -1
- package/lib/src/expectations/types.js.map +1 -1
- package/lib/src/expectations/utils/schema.d.ts +1 -1
- package/lib/src/expectations/utils/schema.d.ts.map +1 -1
- package/lib/src/server/endpoints/cache.backup.endpoint.d.ts +14 -20
- package/lib/src/server/endpoints/cache.backup.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/cache.backup.endpoint.js +5 -5
- package/lib/src/server/endpoints/cache.backup.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/cache.delete.endpoint.d.ts +13 -29
- package/lib/src/server/endpoints/cache.delete.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/cache.delete.endpoint.js +5 -5
- package/lib/src/server/endpoints/cache.delete.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/cache.restore.endpoint.d.ts +13 -31
- package/lib/src/server/endpoints/cache.restore.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/cache.restore.endpoint.js +4 -4
- package/lib/src/server/endpoints/cache.restore.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/cache.restore.stream.endpoint.d.ts +14 -27
- package/lib/src/server/endpoints/cache.restore.stream.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/cache.restore.stream.endpoint.js +3 -3
- package/lib/src/server/endpoints/cache.restore.stream.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/cache.usage.get.endpoint.d.ts +14 -36
- package/lib/src/server/endpoints/cache.usage.get.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/cache.usage.get.endpoint.js +4 -4
- package/lib/src/server/endpoints/cache.usage.get.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/config.get.endpoint.d.ts +17 -42
- package/lib/src/server/endpoints/config.get.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/config.get.endpoint.js +4 -4
- package/lib/src/server/endpoints/config.get.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations-group.update.endpoint.d.ts +14 -38
- package/lib/src/server/endpoints/expectations-group.update.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations-group.update.endpoint.js +4 -4
- package/lib/src/server/endpoints/expectations-group.update.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.compact.get-list.endpoint.d.ts +15 -27
- package/lib/src/server/endpoints/expectations.compact.get-list.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.compact.get-list.endpoint.js +4 -4
- package/lib/src/server/endpoints/expectations.compact.get-list.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.create.endpoint.d.ts +14 -24
- package/lib/src/server/endpoints/expectations.create.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.create.endpoint.js +3 -3
- package/lib/src/server/endpoints/expectations.create.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.delete.endpoint.d.ts +13 -25
- package/lib/src/server/endpoints/expectations.delete.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.delete.endpoint.js +6 -4
- package/lib/src/server/endpoints/expectations.delete.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.get-by-id.endpoint.d.ts +14 -38
- package/lib/src/server/endpoints/expectations.get-by-id.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.get-by-id.endpoint.js +4 -4
- package/lib/src/server/endpoints/expectations.get-by-id.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.update.endpoint.d.ts +14 -34
- package/lib/src/server/endpoints/expectations.update.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.update.endpoint.js +4 -4
- package/lib/src/server/endpoints/expectations.update.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/gui.endpoint.d.ts +15 -22
- package/lib/src/server/endpoints/gui.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/gui.endpoint.js +3 -3
- package/lib/src/server/endpoints/gui.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/history.compact.get-list.endpoint.d.ts +17 -29
- package/lib/src/server/endpoints/history.compact.get-list.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/history.compact.get-list.endpoint.js +4 -4
- package/lib/src/server/endpoints/history.compact.get-list.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/history.delete.endpoint.d.ts +14 -20
- package/lib/src/server/endpoints/history.delete.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/history.delete.endpoint.js +4 -4
- package/lib/src/server/endpoints/history.delete.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/history.get-by-id.endpoint.d.ts +15 -40
- package/lib/src/server/endpoints/history.get-by-id.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/history.get-by-id.endpoint.js +4 -4
- package/lib/src/server/endpoints/history.get-by-id.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/metrics.endpoint.d.ts +15 -27
- package/lib/src/server/endpoints/metrics.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/metrics.endpoint.js +4 -4
- package/lib/src/server/endpoints/metrics.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/ping.endpoint.d.ts +14 -20
- package/lib/src/server/endpoints/ping.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/ping.endpoint.js +4 -4
- package/lib/src/server/endpoints/ping.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/providers.create.endpoint.d.ts +14 -31
- package/lib/src/server/endpoints/providers.create.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/providers.create.endpoint.js +4 -6
- package/lib/src/server/endpoints/providers.create.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/providers.delete.endpoint.d.ts +13 -25
- package/lib/src/server/endpoints/providers.delete.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/providers.delete.endpoint.js +3 -3
- package/lib/src/server/endpoints/providers.delete.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/providers.get-list.endpoint.d.ts +16 -17
- package/lib/src/server/endpoints/providers.get-list.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/providers.get-list.endpoint.js +3 -3
- package/lib/src/server/endpoints/providers.get-list.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/stats.endpoint.d.ts +15 -30
- package/lib/src/server/endpoints/stats.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/stats.endpoint.js +5 -5
- package/lib/src/server/endpoints/stats.endpoint.js.map +1 -1
- package/lib/src/server/index.d.ts +9 -7
- package/lib/src/server/index.d.ts.map +1 -1
- package/lib/src/server/index.js +45 -5
- package/lib/src/server/index.js.map +1 -1
- package/lib/src/server/models/containers/model.d.ts +13 -18
- package/lib/src/server/models/containers/model.d.ts.map +1 -1
- package/lib/src/server/models/containers/model.js +16 -5
- package/lib/src/server/models/containers/model.js.map +1 -1
- package/lib/src/server/models/containers/storage.d.ts +21 -6
- package/lib/src/server/models/containers/storage.d.ts.map +1 -1
- package/lib/src/server/models/containers/storage.js +61 -18
- package/lib/src/server/models/containers/storage.js.map +1 -1
- package/lib/src/server/models/containers/types.d.ts +9 -1
- package/lib/src/server/models/containers/types.d.ts.map +1 -1
- package/lib/src/server/models/containers/utils.d.ts +1 -1
- package/lib/src/server/models/containers/utils.d.ts.map +1 -1
- package/lib/src/server/models/containers/utils.js +3 -3
- package/lib/src/server/models/containers/utils.js.map +1 -1
- package/lib/src/server/models/context/index.d.ts +3 -3
- package/lib/src/server/models/context/index.d.ts.map +1 -1
- package/lib/src/server/models/context/index.js +15 -7
- package/lib/src/server/models/context/index.js.map +1 -1
- package/lib/src/server/models/context/snapshot.d.ts +2 -2
- package/lib/src/server/models/context/snapshot.d.ts.map +1 -1
- package/lib/src/server/models/endpoint.d.ts +44 -27
- package/lib/src/server/models/endpoint.d.ts.map +1 -1
- package/lib/src/server/models/endpoint.js +24 -9
- package/lib/src/server/models/endpoint.js.map +1 -1
- package/lib/src/server/models/executor/index.d.ts.map +1 -1
- package/lib/src/server/models/executor/index.js +7 -2
- package/lib/src/server/models/executor/index.js.map +1 -1
- package/lib/src/server/models/history/storage.d.ts +2 -2
- package/lib/src/server/models/history/storage.d.ts.map +1 -1
- package/lib/src/server/models/history/storage.js +7 -46
- package/lib/src/server/models/history/storage.js.map +1 -1
- package/lib/src/server/models/providers/model.d.ts +6 -4
- package/lib/src/server/models/providers/model.d.ts.map +1 -1
- package/lib/src/server/models/providers/model.js +9 -2
- package/lib/src/server/models/providers/model.js.map +1 -1
- package/lib/src/server/models/providers/storage.d.ts +10 -9
- package/lib/src/server/models/providers/storage.d.ts.map +1 -1
- package/lib/src/server/models/providers/storage.js +10 -10
- package/lib/src/server/models/providers/storage.js.map +1 -1
- package/lib/src/server/models/providers/system.d.ts +23 -0
- package/lib/src/server/models/providers/system.d.ts.map +1 -0
- package/lib/src/server/models/providers/system.js +106 -0
- package/lib/src/server/models/providers/system.js.map +1 -0
- package/lib/src/server/models/router.d.ts +13 -12
- package/lib/src/server/models/router.d.ts.map +1 -1
- package/lib/src/server/models/router.js +47 -15
- package/lib/src/server/models/router.js.map +1 -1
- package/lib/src/server/models/service.d.ts +2 -2
- package/lib/src/server/models/service.d.ts.map +1 -1
- package/lib/src/server/models/service.js.map +1 -1
- package/lib/src/server/models/transports/model.d.ts +1 -1
- package/lib/src/server/models/transports/model.d.ts.map +1 -1
- package/lib/src/server/models/transports/model.js.map +1 -1
- package/lib/src/server/models/transports/storage.d.ts +2 -2
- package/lib/src/server/models/transports/storage.d.ts.map +1 -1
- package/lib/src/server/models/transports/storage.js.map +1 -1
- package/lib/src/server/transports/http.transport/context.d.ts +7 -7
- package/lib/src/server/transports/http.transport/context.d.ts.map +1 -1
- package/lib/src/server/transports/http.transport/context.js.map +1 -1
- package/lib/src/server/transports/http.transport/executor.js +3 -3
- package/lib/src/server/transports/http.transport/executor.js.map +1 -1
- package/lib/src/server/transports/http.transport/index.d.ts +3 -2
- package/lib/src/server/transports/http.transport/index.d.ts.map +1 -1
- package/lib/src/server/transports/http.transport/index.js.map +1 -1
- package/lib/src/server/transports/internal/http.transport/context.d.ts +6 -5
- package/lib/src/server/transports/internal/http.transport/context.d.ts.map +1 -1
- package/lib/src/server/transports/internal/http.transport/context.js.map +1 -1
- package/lib/src/server/transports/internal/http.transport/executor.d.ts +12 -2
- package/lib/src/server/transports/internal/http.transport/executor.d.ts.map +1 -1
- package/lib/src/server/transports/internal/http.transport/executor.js +3 -1
- package/lib/src/server/transports/internal/http.transport/executor.js.map +1 -1
- package/lib/src/server/transports/internal/http.transport/index.d.ts +1 -1
- package/lib/src/server/transports/internal/http.transport/index.d.ts.map +1 -1
- package/lib/src/server/transports/internal/http.transport/index.js.map +1 -1
- package/lib/src/server/transports/internal/io.transport/context.d.ts +6 -5
- package/lib/src/server/transports/internal/io.transport/context.d.ts.map +1 -1
- package/lib/src/server/transports/internal/io.transport/context.js.map +1 -1
- package/lib/src/server/transports/internal/io.transport/executor.d.ts +11 -2
- package/lib/src/server/transports/internal/io.transport/executor.d.ts.map +1 -1
- package/lib/src/server/transports/internal/io.transport/executor.js +1 -1
- package/lib/src/server/transports/internal/io.transport/executor.js.map +1 -1
- package/lib/src/server/transports/internal/io.transport/index.d.ts +2 -2
- package/lib/src/server/transports/internal/io.transport/index.d.ts.map +1 -1
- package/lib/src/server/transports/internal/io.transport/index.js +4 -4
- package/lib/src/server/transports/internal/io.transport/index.js.map +1 -1
- package/lib/src/server/transports/ws.transport/context.d.ts +9 -10
- package/lib/src/server/transports/ws.transport/context.d.ts.map +1 -1
- package/lib/src/server/transports/ws.transport/context.js +2 -2
- package/lib/src/server/transports/ws.transport/context.js.map +1 -1
- package/lib/src/server/transports/ws.transport/executor.d.ts +1 -1
- package/lib/src/server/transports/ws.transport/executor.js +1 -1
- package/lib/src/server/transports/ws.transport/executor.js.map +1 -1
- package/lib/src/server/transports/ws.transport/index.d.ts +3 -2
- package/lib/src/server/transports/ws.transport/index.d.ts.map +1 -1
- package/lib/src/server/transports/ws.transport/index.js.map +1 -1
- package/lib/src/server/types/index.d.ts +4 -15
- package/lib/src/server/types/index.d.ts.map +1 -1
- package/lib/types/common.d.ts +3 -0
- package/lib/types/common.d.ts.map +1 -1
- package/package.json +3 -2
- package/public/assets/{index-tl7gtkKo.css → index-B87rNiAv.css} +1 -1
- package/public/assets/index-DoUtVarD.js +1705 -0
- package/public/index.html +2 -2
- package/public/assets/index-Dd-mRSqz.js +0 -548
|
@@ -0,0 +1,1705 @@
|
|
|
1
|
+
var yk=Object.defineProperty;var vk=(n,e,t)=>e in n?yk(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Re=(n,e,t)=>vk(n,typeof e!="symbol"?e+"":e,t);function Tl(n,e){for(var t=0;t<e.length;t++){const i=e[t];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();var qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function di(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ll={exports:{}},bk=ll.exports,Ng;function wk(){return Ng||(Ng=1,function(n,e){(function(t,i){n.exports=i()})(bk,function(){return function(t,i,s){t=t||{};var o=i.prototype,u={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function d(p,r,f,a){return o.fromToBase(p,r,f,a)}s.en.relativeTime=u,o.fromToBase=function(p,r,f,a,c){for(var h,m,y,v=f.$locale().relativeTime||u,w=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],k=w.length,_=0;_<k;_+=1){var S=w[_];S.d&&(h=a?s(p).diff(f,S.d,!0):f.diff(p,S.d,!0));var x=(t.rounding||Math.round)(Math.abs(h));if(y=h>0,x<=S.r||!S.r){x<=1&&_>0&&(S=w[_-1]);var L=v[S.l];c&&(x=c(""+x)),m=typeof L=="string"?L.replace("%d",x):L(x,r,S.l,y);break}}if(r)return m;var I=y?v.future:v.past;return typeof I=="function"?I(m):I.replace("%s",m)},o.to=function(p,r){return d(p,r,this,!0)},o.from=function(p,r){return d(p,r,this)};var l=function(p){return p.$u?s.utc():s()};o.toNow=function(p){return this.to(l(this),p)},o.fromNow=function(p){return this.from(l(this),p)}}})}(ll)),ll.exports}var _k=wk();const xk=di(_k);var cl={exports:{}},Sk=cl.exports,Fg;function Ak(){return Fg||(Fg=1,function(n,e){(function(t,i){n.exports=i()})(Sk,function(){var t=1e3,i=6e4,s=36e5,o="millisecond",u="second",d="minute",l="hour",p="day",r="week",f="month",a="quarter",c="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var R=["th","st","nd","rd"],N=M%100;return"["+M+(R[(N-20)%10]||R[N]||R[0])+"]"}},k=function(M,R,N){var H=String(M);return!H||H.length>=R?M:""+Array(R+1-H.length).join(N)+M},_={s:k,z:function(M){var R=-M.utcOffset(),N=Math.abs(R),H=Math.floor(N/60),z=N%60;return(R<=0?"+":"-")+k(H,2,"0")+":"+k(z,2,"0")},m:function M(R,N){if(R.date()<N.date())return-M(N,R);var H=12*(N.year()-R.year())+(N.month()-R.month()),z=R.clone().add(H,f),Y=N-z<0,K=R.clone().add(H+(Y?-1:1),f);return+(-(H+(N-z)/(Y?z-K:K-z))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:f,y:c,w:r,d:p,D:h,h:l,m:d,s:u,ms:o,Q:a}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},S="en",x={};x[S]=w;var L="$isDayjsObject",I=function(M){return M instanceof C||!(!M||!M[L])},$=function M(R,N,H){var z;if(!R)return S;if(typeof R=="string"){var Y=R.toLowerCase();x[Y]&&(z=Y),N&&(x[Y]=N,z=Y);var K=R.split("-");if(!z&&K.length>1)return M(K[0])}else{var re=R.name;x[re]=R,z=re}return!H&&z&&(S=z),z||!H&&S},T=function(M,R){if(I(M))return M.clone();var N=typeof R=="object"?R:{};return N.date=M,N.args=arguments,new C(N)},O=_;O.l=$,O.i=I,O.w=function(M,R){return T(M,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var C=function(){function M(N){this.$L=$(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[L]=!0}var R=M.prototype;return R.parse=function(N){this.$d=function(H){var z=H.date,Y=H.utc;if(z===null)return new Date(NaN);if(O.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var K=z.match(y);if(K){var re=K[2]-1||0,fe=(K[7]||"0").substring(0,3);return Y?new Date(Date.UTC(K[1],re,K[3]||1,K[4]||0,K[5]||0,K[6]||0,fe)):new Date(K[1],re,K[3]||1,K[4]||0,K[5]||0,K[6]||0,fe)}}return new Date(z)}(N),this.init()},R.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},R.$utils=function(){return O},R.isValid=function(){return this.$d.toString()!==m},R.isSame=function(N,H){var z=T(N);return this.startOf(H)<=z&&z<=this.endOf(H)},R.isAfter=function(N,H){return T(N)<this.startOf(H)},R.isBefore=function(N,H){return this.endOf(H)<T(N)},R.$g=function(N,H,z){return O.u(N)?this[H]:this.set(z,N)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(N,H){var z=this,Y=!!O.u(H)||H,K=O.p(N),re=function(ge,ue){var G=O.w(z.$u?Date.UTC(z.$y,ue,ge):new Date(z.$y,ue,ge),z);return Y?G:G.endOf(p)},fe=function(ge,ue){return O.w(z.toDate()[ge].apply(z.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(ue)),z)},U=this.$W,Q=this.$M,ie=this.$D,V="set"+(this.$u?"UTC":"");switch(K){case c:return Y?re(1,0):re(31,11);case f:return Y?re(1,Q):re(0,Q+1);case r:var te=this.$locale().weekStart||0,ae=(U<te?U+7:U)-te;return re(Y?ie-ae:ie+(6-ae),Q);case p:case h:return fe(V+"Hours",0);case l:return fe(V+"Minutes",1);case d:return fe(V+"Seconds",2);case u:return fe(V+"Milliseconds",3);default:return this.clone()}},R.endOf=function(N){return this.startOf(N,!1)},R.$set=function(N,H){var z,Y=O.p(N),K="set"+(this.$u?"UTC":""),re=(z={},z[p]=K+"Date",z[h]=K+"Date",z[f]=K+"Month",z[c]=K+"FullYear",z[l]=K+"Hours",z[d]=K+"Minutes",z[u]=K+"Seconds",z[o]=K+"Milliseconds",z)[Y],fe=Y===p?this.$D+(H-this.$W):H;if(Y===f||Y===c){var U=this.clone().set(h,1);U.$d[re](fe),U.init(),this.$d=U.set(h,Math.min(this.$D,U.daysInMonth())).$d}else re&&this.$d[re](fe);return this.init(),this},R.set=function(N,H){return this.clone().$set(N,H)},R.get=function(N){return this[O.p(N)]()},R.add=function(N,H){var z,Y=this;N=Number(N);var K=O.p(H),re=function(Q){var ie=T(Y);return O.w(ie.date(ie.date()+Math.round(Q*N)),Y)};if(K===f)return this.set(f,this.$M+N);if(K===c)return this.set(c,this.$y+N);if(K===p)return re(1);if(K===r)return re(7);var fe=(z={},z[d]=i,z[l]=s,z[u]=t,z)[K]||1,U=this.$d.getTime()+N*fe;return O.w(U,this)},R.subtract=function(N,H){return this.add(-1*N,H)},R.format=function(N){var H=this,z=this.$locale();if(!this.isValid())return z.invalidDate||m;var Y=N||"YYYY-MM-DDTHH:mm:ssZ",K=O.z(this),re=this.$H,fe=this.$m,U=this.$M,Q=z.weekdays,ie=z.months,V=z.meridiem,te=function(ue,G,J,ye){return ue&&(ue[G]||ue(H,Y))||J[G].slice(0,ye)},ae=function(ue){return O.s(re%12||12,ue,"0")},ge=V||function(ue,G,J){var ye=ue<12?"AM":"PM";return J?ye.toLowerCase():ye};return Y.replace(v,function(ue,G){return G||function(J){switch(J){case"YY":return String(H.$y).slice(-2);case"YYYY":return O.s(H.$y,4,"0");case"M":return U+1;case"MM":return O.s(U+1,2,"0");case"MMM":return te(z.monthsShort,U,ie,3);case"MMMM":return te(ie,U);case"D":return H.$D;case"DD":return O.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return te(z.weekdaysMin,H.$W,Q,2);case"ddd":return te(z.weekdaysShort,H.$W,Q,3);case"dddd":return Q[H.$W];case"H":return String(re);case"HH":return O.s(re,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return ge(re,fe,!0);case"A":return ge(re,fe,!1);case"m":return String(fe);case"mm":return O.s(fe,2,"0");case"s":return String(H.$s);case"ss":return O.s(H.$s,2,"0");case"SSS":return O.s(H.$ms,3,"0");case"Z":return K}return null}(ue)||K.replace(":","")})},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(N,H,z){var Y,K=this,re=O.p(H),fe=T(N),U=(fe.utcOffset()-this.utcOffset())*i,Q=this-fe,ie=function(){return O.m(K,fe)};switch(re){case c:Y=ie()/12;break;case f:Y=ie();break;case a:Y=ie()/3;break;case r:Y=(Q-U)/6048e5;break;case p:Y=(Q-U)/864e5;break;case l:Y=Q/s;break;case d:Y=Q/i;break;case u:Y=Q/t;break;default:Y=Q}return z?Y:O.a(Y)},R.daysInMonth=function(){return this.endOf(f).$D},R.$locale=function(){return x[this.$L]},R.locale=function(N,H){if(!N)return this.$L;var z=this.clone(),Y=$(N,H,!0);return Y&&(z.$L=Y),z},R.clone=function(){return O.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},M}(),A=C.prototype;return T.prototype=A,[["$ms",o],["$s",u],["$m",d],["$H",l],["$W",p],["$M",f],["$y",c],["$D",h]].forEach(function(M){A[M[1]]=function(R){return this.$g(R,M[0],M[1])}}),T.extend=function(M,R){return M.$i||(M(R,C,T),M.$i=!0),T},T.locale=$,T.isDayjs=I,T.unix=function(M){return T(1e3*M)},T.en=x[S],T.Ls=x,T.p={},T})}(cl)),cl.exports}var Ck=Ak();const Ui=di(Ck);var ua={exports:{}},ha={exports:{}},Kn={},dn={},Wg;function vn(){if(Wg)return dn;Wg=1,dn.__esModule=!0,dn.extend=s,dn.indexOf=l,dn.escapeExpression=p,dn.isEmpty=r,dn.createFrame=f,dn.blockParams=a,dn.appendContextPath=c;var n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},e=/[&<>"'`=]/g,t=/[&<>"'`=]/;function i(h){return n[h]}function s(h){for(var m=1;m<arguments.length;m++)for(var y in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],y)&&(h[y]=arguments[m][y]);return h}var o=Object.prototype.toString;dn.toString=o;var u=function(m){return typeof m=="function"};u(/x/)&&(dn.isFunction=u=function(h){return typeof h=="function"&&o.call(h)==="[object Function]"}),dn.isFunction=u;var d=Array.isArray||function(h){return h&&typeof h=="object"?o.call(h)==="[object Array]":!1};dn.isArray=d;function l(h,m){for(var y=0,v=h.length;y<v;y++)if(h[y]===m)return y;return-1}function p(h){if(typeof h!="string"){if(h&&h.toHTML)return h.toHTML();if(h==null)return"";if(!h)return h+"";h=""+h}return t.test(h)?h.replace(e,i):h}function r(h){return!h&&h!==0?!0:!!(d(h)&&h.length===0)}function f(h){var m=s({},h);return m._parent=h,m}function a(h,m){return h.path=m,h}function c(h,m){return(h?h+".":"")+m}return dn}var fa={exports:{}},Hg;function Jn(){return Hg||(Hg=1,function(n,e){e.__esModule=!0;var t=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function i(s,o){var u=o&&o.loc,d=void 0,l=void 0,p=void 0,r=void 0;u&&(d=u.start.line,l=u.end.line,p=u.start.column,r=u.end.column,s+=" - "+d+":"+p);for(var f=Error.prototype.constructor.call(this,s),a=0;a<t.length;a++)this[t[a]]=f[t[a]];Error.captureStackTrace&&Error.captureStackTrace(this,i);try{u&&(this.lineNumber=d,this.endLineNumber=l,Object.defineProperty?(Object.defineProperty(this,"column",{value:p,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:r,enumerable:!0})):(this.column=p,this.endColumn=r))}catch{}}i.prototype=new Error,e.default=i,n.exports=e.default}(fa,fa.exports)),fa.exports}var Eo={},da={exports:{}},zg;function kk(){return zg||(zg=1,function(n,e){e.__esModule=!0;var t=vn();e.default=function(i){i.registerHelper("blockHelperMissing",function(s,o){var u=o.inverse,d=o.fn;if(s===!0)return d(this);if(s===!1||s==null)return u(this);if(t.isArray(s))return s.length>0?(o.ids&&(o.ids=[o.name]),i.helpers.each(s,o)):u(this);if(o.data&&o.ids){var l=t.createFrame(o.data);l.contextPath=t.appendContextPath(o.data.contextPath,o.name),o={data:l}}return d(s,o)})},n.exports=e.default}(da,da.exports)),da.exports}var pa={exports:{}},jg;function Mk(){return jg||(jg=1,function(n,e){e.__esModule=!0;function t(u){return u&&u.__esModule?u:{default:u}}var i=vn(),s=Jn(),o=t(s);e.default=function(u){u.registerHelper("each",function(d,l){if(!l)throw new o.default("Must pass iterator to #each");var p=l.fn,r=l.inverse,f=0,a="",c=void 0,h=void 0;l.data&&l.ids&&(h=i.appendContextPath(l.data.contextPath,l.ids[0])+"."),i.isFunction(d)&&(d=d.call(this)),l.data&&(c=i.createFrame(l.data));function m(_,S,x){c&&(c.key=_,c.index=S,c.first=S===0,c.last=!!x,h&&(c.contextPath=h+_)),a=a+p(d[_],{data:c,blockParams:i.blockParams([d[_],_],[h+_,null])})}if(d&&typeof d=="object")if(i.isArray(d))for(var y=d.length;f<y;f++)f in d&&m(f,f,f===d.length-1);else if(qt.Symbol&&d[qt.Symbol.iterator]){for(var v=[],w=d[qt.Symbol.iterator](),k=w.next();!k.done;k=w.next())v.push(k.value);d=v;for(var y=d.length;f<y;f++)m(f,f,f===d.length-1)}else(function(){var _=void 0;Object.keys(d).forEach(function(S){_!==void 0&&m(_,f-1),_=S,f++}),_!==void 0&&m(_,f-1,!0)})();return f===0&&(a=r(this)),a})},n.exports=e.default}(pa,pa.exports)),pa.exports}var ga={exports:{}},Ug;function Ek(){return Ug||(Ug=1,function(n,e){e.__esModule=!0;function t(o){return o&&o.__esModule?o:{default:o}}var i=Jn(),s=t(i);e.default=function(o){o.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new s.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},n.exports=e.default}(ga,ga.exports)),ga.exports}var ma={exports:{}},Vg;function Lk(){return Vg||(Vg=1,function(n,e){e.__esModule=!0;function t(u){return u&&u.__esModule?u:{default:u}}var i=vn(),s=Jn(),o=t(s);e.default=function(u){u.registerHelper("if",function(d,l){if(arguments.length!=2)throw new o.default("#if requires exactly one argument");return i.isFunction(d)&&(d=d.call(this)),!l.hash.includeZero&&!d||i.isEmpty(d)?l.inverse(this):l.fn(this)}),u.registerHelper("unless",function(d,l){if(arguments.length!=2)throw new o.default("#unless requires exactly one argument");return u.helpers.if.call(this,d,{fn:l.inverse,inverse:l.fn,hash:l.hash})})},n.exports=e.default}(ma,ma.exports)),ma.exports}var ya={exports:{}},qg;function Rk(){return qg||(qg=1,function(n,e){e.__esModule=!0,e.default=function(t){t.registerHelper("log",function(){for(var i=[void 0],s=arguments[arguments.length-1],o=0;o<arguments.length-1;o++)i.push(arguments[o]);var u=1;s.hash.level!=null?u=s.hash.level:s.data&&s.data.level!=null&&(u=s.data.level),i[0]=u,t.log.apply(t,i)})},n.exports=e.default}(ya,ya.exports)),ya.exports}var va={exports:{}},Gg;function Tk(){return Gg||(Gg=1,function(n,e){e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",function(i,s,o){return i&&o.lookupProperty(i,s)})},n.exports=e.default}(va,va.exports)),va.exports}var ba={exports:{}},Kg;function $k(){return Kg||(Kg=1,function(n,e){e.__esModule=!0;function t(u){return u&&u.__esModule?u:{default:u}}var i=vn(),s=Jn(),o=t(s);e.default=function(u){u.registerHelper("with",function(d,l){if(arguments.length!=2)throw new o.default("#with requires exactly one argument");i.isFunction(d)&&(d=d.call(this));var p=l.fn;if(i.isEmpty(d))return l.inverse(this);var r=l.data;return l.data&&l.ids&&(r=i.createFrame(l.data),r.contextPath=i.appendContextPath(l.data.contextPath,l.ids[0])),p(d,{data:r,blockParams:i.blockParams([d],[r&&r.contextPath])})})},n.exports=e.default}(ba,ba.exports)),ba.exports}var Yg;function q0(){if(Yg)return Eo;Yg=1,Eo.__esModule=!0,Eo.registerDefaultHelpers=m,Eo.moveHelperToHooks=y;function n(v){return v&&v.__esModule?v:{default:v}}var e=kk(),t=n(e),i=Mk(),s=n(i),o=Ek(),u=n(o),d=Lk(),l=n(d),p=Rk(),r=n(p),f=Tk(),a=n(f),c=$k(),h=n(c);function m(v){t.default(v),s.default(v),u.default(v),l.default(v),r.default(v),a.default(v),h.default(v)}function y(v,w,k){v.helpers[w]&&(v.hooks[w]=v.helpers[w],k||delete v.helpers[w])}return Eo}var wa={},_a={exports:{}},Xg;function Ik(){return Xg||(Xg=1,function(n,e){e.__esModule=!0;var t=vn();e.default=function(i){i.registerDecorator("inline",function(s,o,u,d){var l=s;return o.partials||(o.partials={},l=function(p,r){var f=u.partials;u.partials=t.extend({},f,o.partials);var a=s(p,r);return u.partials=f,a}),o.partials[d.args[0]]=d.fn,l})},n.exports=e.default}(_a,_a.exports)),_a.exports}var Qg;function Ok(){if(Qg)return wa;Qg=1,wa.__esModule=!0,wa.registerDefaultDecorators=i;function n(s){return s&&s.__esModule?s:{default:s}}var e=Ik(),t=n(e);function i(s){t.default(s)}return wa}var xa={exports:{}},Zg;function G0(){return Zg||(Zg=1,function(n,e){e.__esModule=!0;var t=vn(),i={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(o){if(typeof o=="string"){var u=t.indexOf(i.methodMap,o.toLowerCase());u>=0?o=u:o=parseInt(o,10)}return o},log:function(o){if(o=i.lookupLevel(o),typeof console<"u"&&i.lookupLevel(i.level)<=o){var u=i.methodMap[o];console[u]||(u="log");for(var d=arguments.length,l=Array(d>1?d-1:0),p=1;p<d;p++)l[p-1]=arguments[p];console[u].apply(console,l)}}};e.default=i,n.exports=e.default}(xa,xa.exports)),xa.exports}var Wr={},Sa={},Jg;function Dk(){if(Jg)return Sa;Jg=1,Sa.__esModule=!0,Sa.createNewLookupObject=e;var n=vn();function e(){for(var t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];return n.extend.apply(void 0,[Object.create(null)].concat(i))}return Sa}var em;function K0(){if(em)return Wr;em=1,Wr.__esModule=!0,Wr.createProtoAccessControl=o,Wr.resultIsAllowed=u,Wr.resetLoggedProperties=p;function n(r){if(r&&r.__esModule)return r;var f={};if(r!=null)for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(f[a]=r[a]);return f.default=r,f}var e=Dk(),t=G0(),i=n(t),s=Object.create(null);function o(r){var f=Object.create(null);f.constructor=!1,f.__defineGetter__=!1,f.__defineSetter__=!1,f.__lookupGetter__=!1;var a=Object.create(null);return a.__proto__=!1,{properties:{whitelist:e.createNewLookupObject(a,r.allowedProtoProperties),defaultValue:r.allowProtoPropertiesByDefault},methods:{whitelist:e.createNewLookupObject(f,r.allowedProtoMethods),defaultValue:r.allowProtoMethodsByDefault}}}function u(r,f,a){return d(typeof r=="function"?f.methods:f.properties,a)}function d(r,f){return r.whitelist[f]!==void 0?r.whitelist[f]===!0:r.defaultValue!==void 0?r.defaultValue:(l(f),!1)}function l(r){s[r]!==!0&&(s[r]=!0,i.log("error",'Handlebars: Access has been denied to resolve the property "'+r+`" because it is not an "own property" of its parent.
|
|
2
|
+
You can add a runtime option to disable the check or this warning:
|
|
3
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function p(){Object.keys(s).forEach(function(r){delete s[r]})}return Wr}var tm;function Ef(){if(tm)return Kn;tm=1,Kn.__esModule=!0,Kn.HandlebarsEnvironment=h;function n(y){return y&&y.__esModule?y:{default:y}}var e=vn(),t=Jn(),i=n(t),s=q0(),o=Ok(),u=G0(),d=n(u),l=K0(),p="4.7.7";Kn.VERSION=p;var r=8;Kn.COMPILER_REVISION=r;var f=7;Kn.LAST_COMPATIBLE_COMPILER_REVISION=f;var a={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};Kn.REVISION_CHANGES=a;var c="[object Object]";function h(y,v,w){this.helpers=y||{},this.partials=v||{},this.decorators=w||{},s.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}h.prototype={constructor:h,logger:d.default,log:d.default.log,registerHelper:function(v,w){if(e.toString.call(v)===c){if(w)throw new i.default("Arg not supported with multiple helpers");e.extend(this.helpers,v)}else this.helpers[v]=w},unregisterHelper:function(v){delete this.helpers[v]},registerPartial:function(v,w){if(e.toString.call(v)===c)e.extend(this.partials,v);else{if(typeof w>"u")throw new i.default('Attempting to register a partial called "'+v+'" as undefined');this.partials[v]=w}},unregisterPartial:function(v){delete this.partials[v]},registerDecorator:function(v,w){if(e.toString.call(v)===c){if(w)throw new i.default("Arg not supported with multiple decorators");e.extend(this.decorators,v)}else this.decorators[v]=w},unregisterDecorator:function(v){delete this.decorators[v]},resetLoggedPropertyAccesses:function(){l.resetLoggedProperties()}};var m=d.default.log;return Kn.log=m,Kn.createFrame=e.createFrame,Kn.logger=d.default,Kn}var Aa={exports:{}},nm;function Pk(){return nm||(nm=1,function(n,e){e.__esModule=!0;function t(i){this.string=i}t.prototype.toString=t.prototype.toHTML=function(){return""+this.string},e.default=t,n.exports=e.default}(Aa,Aa.exports)),Aa.exports}var Si={},Ca={},im;function Bk(){if(im)return Ca;im=1,Ca.__esModule=!0,Ca.wrapHelper=n;function n(e,t){if(typeof e!="function")return e;var i=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),e.apply(this,arguments)};return i}return Ca}var rm;function Nk(){if(rm)return Si;rm=1,Si.__esModule=!0,Si.checkRevision=r,Si.template=f,Si.wrapProgram=a,Si.resolvePartial=c,Si.invokePartial=h,Si.noop=m;function n(_){return _&&_.__esModule?_:{default:_}}function e(_){if(_&&_.__esModule)return _;var S={};if(_!=null)for(var x in _)Object.prototype.hasOwnProperty.call(_,x)&&(S[x]=_[x]);return S.default=_,S}var t=vn(),i=e(t),s=Jn(),o=n(s),u=Ef(),d=q0(),l=Bk(),p=K0();function r(_){var S=_&&_[0]||1,x=u.COMPILER_REVISION;if(!(S>=u.LAST_COMPATIBLE_COMPILER_REVISION&&S<=u.COMPILER_REVISION))if(S<u.LAST_COMPATIBLE_COMPILER_REVISION){var L=u.REVISION_CHANGES[x],I=u.REVISION_CHANGES[S];throw new o.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+L+") or downgrade your runtime to an older version ("+I+").")}else throw new o.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+_[1]+").")}function f(_,S){if(!S)throw new o.default("No environment passed to template");if(!_||!_.main)throw new o.default("Unknown template object: "+typeof _);_.main.decorator=_.main_d,S.VM.checkRevision(_.compiler);var x=_.compiler&&_.compiler[0]===7;function L(T,O,C){C.hash&&(O=i.extend({},O,C.hash),C.ids&&(C.ids[0]=!0)),T=S.VM.resolvePartial.call(this,T,O,C);var A=i.extend({},C,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),M=S.VM.invokePartial.call(this,T,O,A);if(M==null&&S.compile&&(C.partials[C.name]=S.compile(T,_.compilerOptions,S),M=C.partials[C.name](O,A)),M!=null){if(C.indent){for(var R=M.split(`
|
|
4
|
+
`),N=0,H=R.length;N<H&&!(!R[N]&&N+1===H);N++)R[N]=C.indent+R[N];M=R.join(`
|
|
5
|
+
`)}return M}else throw new o.default("The partial "+C.name+" could not be compiled when running in runtime-only mode")}var I={strict:function(O,C,A){if(!O||!(C in O))throw new o.default('"'+C+'" not defined in '+O,{loc:A});return I.lookupProperty(O,C)},lookupProperty:function(O,C){var A=O[C];if(A==null||Object.prototype.hasOwnProperty.call(O,C)||p.resultIsAllowed(A,I.protoAccessControl,C))return A},lookup:function(O,C){for(var A=O.length,M=0;M<A;M++){var R=O[M]&&I.lookupProperty(O[M],C);if(R!=null)return O[M][C]}},lambda:function(O,C){return typeof O=="function"?O.call(C):O},escapeExpression:i.escapeExpression,invokePartial:L,fn:function(O){var C=_[O];return C.decorator=_[O+"_d"],C},programs:[],program:function(O,C,A,M,R){var N=this.programs[O],H=this.fn(O);return C||R||M||A?N=a(this,O,H,C,A,M,R):N||(N=this.programs[O]=a(this,O,H)),N},data:function(O,C){for(;O&&C--;)O=O._parent;return O},mergeIfNeeded:function(O,C){var A=O||C;return O&&C&&O!==C&&(A=i.extend({},C,O)),A},nullContext:Object.seal({}),noop:S.VM.noop,compilerInfo:_.compiler};function $(T){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],C=O.data;$._setup(O),!O.partial&&_.useData&&(C=y(T,C));var A=void 0,M=_.useBlockParams?[]:void 0;_.useDepths&&(O.depths?A=T!=O.depths[0]?[T].concat(O.depths):O.depths:A=[T]);function R(N){return""+_.main(I,N,I.helpers,I.partials,C,M,A)}return R=v(_.main,R,I,O.depths||[],C,M),R(T,O)}return $.isTop=!0,$._setup=function(T){if(T.partial)I.protoAccessControl=T.protoAccessControl,I.helpers=T.helpers,I.partials=T.partials,I.decorators=T.decorators,I.hooks=T.hooks;else{var O=i.extend({},S.helpers,T.helpers);w(O,I),I.helpers=O,_.usePartial&&(I.partials=I.mergeIfNeeded(T.partials,S.partials)),(_.usePartial||_.useDecorators)&&(I.decorators=i.extend({},S.decorators,T.decorators)),I.hooks={},I.protoAccessControl=p.createProtoAccessControl(T);var C=T.allowCallsToHelperMissing||x;d.moveHelperToHooks(I,"helperMissing",C),d.moveHelperToHooks(I,"blockHelperMissing",C)}},$._child=function(T,O,C,A){if(_.useBlockParams&&!C)throw new o.default("must pass block params");if(_.useDepths&&!A)throw new o.default("must pass parent depths");return a(I,T,_[T],O,0,C,A)},$}function a(_,S,x,L,I,$,T){function O(C){var A=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],M=T;return T&&C!=T[0]&&!(C===_.nullContext&&T[0]===null)&&(M=[C].concat(T)),x(_,C,_.helpers,_.partials,A.data||L,$&&[A.blockParams].concat($),M)}return O=v(x,O,_,T,L,$),O.program=S,O.depth=T?T.length:0,O.blockParams=I||0,O}function c(_,S,x){return _?!_.call&&!x.name&&(x.name=_,_=x.partials[_]):x.name==="@partial-block"?_=x.data["partial-block"]:_=x.partials[x.name],_}function h(_,S,x){var L=x.data&&x.data["partial-block"];x.partial=!0,x.ids&&(x.data.contextPath=x.ids[0]||x.data.contextPath);var I=void 0;if(x.fn&&x.fn!==m&&function(){x.data=u.createFrame(x.data);var $=x.fn;I=x.data["partial-block"]=function(O){var C=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return C.data=u.createFrame(C.data),C.data["partial-block"]=L,$(O,C)},$.partials&&(x.partials=i.extend({},x.partials,$.partials))}(),_===void 0&&I&&(_=I),_===void 0)throw new o.default("The partial "+x.name+" could not be found");if(_ instanceof Function)return _(S,x)}function m(){return""}function y(_,S){return(!S||!("root"in S))&&(S=S?u.createFrame(S):{},S.root=_),S}function v(_,S,x,L,I,$){if(_.decorator){var T={};S=_.decorator(S,T,x,L&&L[0],I,$,L),i.extend(S,T)}return S}function w(_,S){Object.keys(_).forEach(function(x){var L=_[x];_[x]=k(L,S)})}function k(_,S){var x=S.lookupProperty;return l.wrapHelper(_,function(L){return i.extend({lookupProperty:x},L)})}return Si}var ka={exports:{}},om;function Y0(){return om||(om=1,function(n,e){e.__esModule=!0,e.default=function(t){var i=typeof qt<"u"?qt:window,s=i.Handlebars;t.noConflict=function(){return i.Handlebars===t&&(i.Handlebars=s),t}},n.exports=e.default}(ka,ka.exports)),ka.exports}var sm;function Fk(){return sm||(sm=1,function(n,e){e.__esModule=!0;function t(w){return w&&w.__esModule?w:{default:w}}function i(w){if(w&&w.__esModule)return w;var k={};if(w!=null)for(var _ in w)Object.prototype.hasOwnProperty.call(w,_)&&(k[_]=w[_]);return k.default=w,k}var s=Ef(),o=i(s),u=Pk(),d=t(u),l=Jn(),p=t(l),r=vn(),f=i(r),a=Nk(),c=i(a),h=Y0(),m=t(h);function y(){var w=new o.HandlebarsEnvironment;return f.extend(w,o),w.SafeString=d.default,w.Exception=p.default,w.Utils=f,w.escapeExpression=f.escapeExpression,w.VM=c,w.template=function(k){return c.template(k,w)},w}var v=y();v.create=y,m.default(v),v.default=v,e.default=v,n.exports=e.default}(ha,ha.exports)),ha.exports}var Ma={exports:{}},am;function X0(){return am||(am=1,function(n,e){e.__esModule=!0;var t={helpers:{helperExpression:function(s){return s.type==="SubExpression"||(s.type==="MustacheStatement"||s.type==="BlockStatement")&&!!(s.params&&s.params.length||s.hash)},scopedId:function(s){return/^\.|this\b/.test(s.original)},simpleId:function(s){return s.parts.length===1&&!t.helpers.scopedId(s)&&!s.depth}}};e.default=t,n.exports=e.default}(Ma,Ma.exports)),Ma.exports}var Hr={},Ea={exports:{}},lm;function Wk(){return lm||(lm=1,function(n,e){e.__esModule=!0;var t=function(){var i={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(d,l,p,r,f,a,c){var h=a.length-1;switch(f){case 1:return a[h-1];case 2:this.$=r.prepareProgram(a[h]);break;case 3:this.$=a[h];break;case 4:this.$=a[h];break;case 5:this.$=a[h];break;case 6:this.$=a[h];break;case 7:this.$=a[h];break;case 8:this.$=a[h];break;case 9:this.$={type:"CommentStatement",value:r.stripComment(a[h]),strip:r.stripFlags(a[h],a[h]),loc:r.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:a[h],value:a[h],loc:r.locInfo(this._$)};break;case 11:this.$=r.prepareRawBlock(a[h-2],a[h-1],a[h],this._$);break;case 12:this.$={path:a[h-3],params:a[h-2],hash:a[h-1]};break;case 13:this.$=r.prepareBlock(a[h-3],a[h-2],a[h-1],a[h],!1,this._$);break;case 14:this.$=r.prepareBlock(a[h-3],a[h-2],a[h-1],a[h],!0,this._$);break;case 15:this.$={open:a[h-5],path:a[h-4],params:a[h-3],hash:a[h-2],blockParams:a[h-1],strip:r.stripFlags(a[h-5],a[h])};break;case 16:this.$={path:a[h-4],params:a[h-3],hash:a[h-2],blockParams:a[h-1],strip:r.stripFlags(a[h-5],a[h])};break;case 17:this.$={path:a[h-4],params:a[h-3],hash:a[h-2],blockParams:a[h-1],strip:r.stripFlags(a[h-5],a[h])};break;case 18:this.$={strip:r.stripFlags(a[h-1],a[h-1]),program:a[h]};break;case 19:var m=r.prepareBlock(a[h-2],a[h-1],a[h],a[h],!1,this._$),y=r.prepareProgram([m],a[h-1].loc);y.chained=!0,this.$={strip:a[h-2].strip,program:y,chain:!0};break;case 20:this.$=a[h];break;case 21:this.$={path:a[h-1],strip:r.stripFlags(a[h-2],a[h])};break;case 22:this.$=r.prepareMustache(a[h-3],a[h-2],a[h-1],a[h-4],r.stripFlags(a[h-4],a[h]),this._$);break;case 23:this.$=r.prepareMustache(a[h-3],a[h-2],a[h-1],a[h-4],r.stripFlags(a[h-4],a[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:a[h-3],params:a[h-2],hash:a[h-1],indent:"",strip:r.stripFlags(a[h-4],a[h]),loc:r.locInfo(this._$)};break;case 25:this.$=r.preparePartialBlock(a[h-2],a[h-1],a[h],this._$);break;case 26:this.$={path:a[h-3],params:a[h-2],hash:a[h-1],strip:r.stripFlags(a[h-4],a[h])};break;case 27:this.$=a[h];break;case 28:this.$=a[h];break;case 29:this.$={type:"SubExpression",path:a[h-3],params:a[h-2],hash:a[h-1],loc:r.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:a[h],loc:r.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:r.id(a[h-2]),value:a[h],loc:r.locInfo(this._$)};break;case 32:this.$=r.id(a[h-1]);break;case 33:this.$=a[h];break;case 34:this.$=a[h];break;case 35:this.$={type:"StringLiteral",value:a[h],original:a[h],loc:r.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(a[h]),original:Number(a[h]),loc:r.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:a[h]==="true",original:a[h]==="true",loc:r.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:r.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:r.locInfo(this._$)};break;case 40:this.$=a[h];break;case 41:this.$=a[h];break;case 42:this.$=r.preparePath(!0,a[h],this._$);break;case 43:this.$=r.preparePath(!1,a[h],this._$);break;case 44:a[h-2].push({part:r.id(a[h]),original:a[h],separator:a[h-1]}),this.$=a[h-2];break;case 45:this.$=[{part:r.id(a[h]),original:a[h]}];break;case 46:this.$=[];break;case 47:a[h-1].push(a[h]);break;case 48:this.$=[];break;case 49:a[h-1].push(a[h]);break;case 50:this.$=[];break;case 51:a[h-1].push(a[h]);break;case 58:this.$=[];break;case 59:a[h-1].push(a[h]);break;case 64:this.$=[];break;case 65:a[h-1].push(a[h]);break;case 70:this.$=[];break;case 71:a[h-1].push(a[h]);break;case 78:this.$=[];break;case 79:a[h-1].push(a[h]);break;case 82:this.$=[];break;case 83:a[h-1].push(a[h]);break;case 86:this.$=[];break;case 87:a[h-1].push(a[h]);break;case 90:this.$=[];break;case 91:a[h-1].push(a[h]);break;case 94:this.$=[];break;case 95:a[h-1].push(a[h]);break;case 98:this.$=[a[h]];break;case 99:a[h-1].push(a[h]);break;case 100:this.$=[a[h]];break;case 101:a[h-1].push(a[h]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(d,l){throw new Error(d)},parse:function(d){var l=this,p=[0],r=[null],f=[],a=this.table,c="",h=0,m=0;this.lexer.setInput(d),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var y=this.lexer.yylloc;f.push(y);var v=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function w(){var A;return A=l.lexer.lex()||1,typeof A!="number"&&(A=l.symbols_[A]||A),A}for(var k,_,S,x,L={},I,$,T,O;;){if(_=p[p.length-1],this.defaultActions[_]?S=this.defaultActions[_]:((k===null||typeof k>"u")&&(k=w()),S=a[_]&&a[_][k]),typeof S>"u"||!S.length||!S[0]){var C="";{O=[];for(I in a[_])this.terminals_[I]&&I>2&&O.push("'"+this.terminals_[I]+"'");this.lexer.showPosition?C="Parse error on line "+(h+1)+`:
|
|
6
|
+
`+this.lexer.showPosition()+`
|
|
7
|
+
Expecting `+O.join(", ")+", got '"+(this.terminals_[k]||k)+"'":C="Parse error on line "+(h+1)+": Unexpected "+(k==1?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(C,{text:this.lexer.match,token:this.terminals_[k]||k,line:this.lexer.yylineno,loc:y,expected:O})}}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+k);switch(S[0]){case 1:p.push(k),r.push(this.lexer.yytext),f.push(this.lexer.yylloc),p.push(S[1]),k=null,m=this.lexer.yyleng,c=this.lexer.yytext,h=this.lexer.yylineno,y=this.lexer.yylloc;break;case 2:if($=this.productions_[S[1]][1],L.$=r[r.length-$],L._$={first_line:f[f.length-($||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-($||1)].first_column,last_column:f[f.length-1].last_column},v&&(L._$.range=[f[f.length-($||1)].range[0],f[f.length-1].range[1]]),x=this.performAction.call(L,c,m,h,this.yy,S[1],r,f),typeof x<"u")return x;$&&(p=p.slice(0,-1*$*2),r=r.slice(0,-1*$),f=f.slice(0,-1*$)),p.push(this.productions_[S[1]][0]),r.push(L.$),f.push(L._$),T=a[p[p.length-2]][p[p.length-1]],p.push(T);break;case 3:return!0}}return!0}},s=function(){var u={EOF:1,parseError:function(l,p){if(this.yy.parser)this.yy.parser.parseError(l,p);else throw new Error(l)},setInput:function(l){return this._input=l,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var p=l.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},unput:function(l){var p=l.length,r=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p-1),this.offset-=p;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===f.length?this.yylloc.first_column:0)+f[f.length-r.length].length-r[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-p]),this},more:function(){return this._more=!0,this},less:function(l){this.unput(this.match.slice(l))},pastInput:function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var l=this.pastInput(),p=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
8
|
+
`+p+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,p,r,f,a;this._more||(this.yytext="",this.match="");for(var c=this._currentRules(),h=0;h<c.length&&(r=this._input.match(this.rules[c[h]]),!(r&&(!p||r[0].length>p[0].length)&&(p=r,f=h,!this.options.flex)));h++);return p?(a=p[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],l=this.performAction.call(this,this.yy,this,c[f],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
9
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var l=this.next();return typeof l<"u"?l:this.lex()},begin:function(l){this.conditionStack.push(l)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(l){this.begin(l)}};return u.options={},u.performAction=function(l,p,r,f){function a(c,h){return p.yytext=p.yytext.substring(c,p.yyleng-h+c)}switch(r){case 0:if(p.yytext.slice(-2)==="\\\\"?(a(0,1),this.begin("mu")):p.yytext.slice(-1)==="\\"?(a(0,1),this.begin("emu")):this.begin("mu"),p.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(a(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(p.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return p.yytext=a(1,2).replace(/\\"/g,'"'),80;case 32:return p.yytext=a(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return p.yytext=p.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},u.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],u.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},u}();i.lexer=s;function o(){this.yy={}}return o.prototype=i,i.Parser=o,new o}();e.default=t,n.exports=e.default}(Ea,Ea.exports)),Ea.exports}var La={exports:{}},Ra={exports:{}},cm;function Q0(){return cm||(cm=1,function(n,e){e.__esModule=!0;function t(p){return p&&p.__esModule?p:{default:p}}var i=Jn(),s=t(i);function o(){this.parents=[]}o.prototype={constructor:o,mutating:!1,acceptKey:function(r,f){var a=this.accept(r[f]);if(this.mutating){if(a&&!o.prototype[a.type])throw new s.default('Unexpected node type "'+a.type+'" found when accepting '+f+" on "+r.type);r[f]=a}},acceptRequired:function(r,f){if(this.acceptKey(r,f),!r[f])throw new s.default(r.type+" requires "+f)},acceptArray:function(r){for(var f=0,a=r.length;f<a;f++)this.acceptKey(r,f),r[f]||(r.splice(f,1),f--,a--)},accept:function(r){if(r){if(!this[r.type])throw new s.default("Unknown type: "+r.type,r);this.current&&this.parents.unshift(this.current),this.current=r;var f=this[r.type](r);if(this.current=this.parents.shift(),!this.mutating||f)return f;if(f!==!1)return r}},Program:function(r){this.acceptArray(r.body)},MustacheStatement:u,Decorator:u,BlockStatement:d,DecoratorBlock:d,PartialStatement:l,PartialBlockStatement:function(r){l.call(this,r),this.acceptKey(r,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:u,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(r){this.acceptArray(r.pairs)},HashPair:function(r){this.acceptRequired(r,"value")}};function u(p){this.acceptRequired(p,"path"),this.acceptArray(p.params),this.acceptKey(p,"hash")}function d(p){u.call(this,p),this.acceptKey(p,"program"),this.acceptKey(p,"inverse")}function l(p){this.acceptRequired(p,"name"),this.acceptArray(p.params),this.acceptKey(p,"hash")}e.default=o,n.exports=e.default}(Ra,Ra.exports)),Ra.exports}var um;function Hk(){return um||(um=1,function(n,e){e.__esModule=!0;function t(r){return r&&r.__esModule?r:{default:r}}var i=Q0(),s=t(i);function o(){var r=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=r}o.prototype=new s.default,o.prototype.Program=function(r){var f=!this.options.ignoreStandalone,a=!this.isRootSeen;this.isRootSeen=!0;for(var c=r.body,h=0,m=c.length;h<m;h++){var y=c[h],v=this.accept(y);if(v){var w=u(c,h,a),k=d(c,h,a),_=v.openStandalone&&w,S=v.closeStandalone&&k,x=v.inlineStandalone&&w&&k;v.close&&l(c,h,!0),v.open&&p(c,h,!0),f&&x&&(l(c,h),p(c,h)&&y.type==="PartialStatement"&&(y.indent=/([ \t]+$)/.exec(c[h-1].original)[1])),f&&_&&(l((y.program||y.inverse).body),p(c,h)),f&&S&&(l(c,h),p((y.inverse||y.program).body))}}return r},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(r){this.accept(r.program),this.accept(r.inverse);var f=r.program||r.inverse,a=r.program&&r.inverse,c=a,h=a;if(a&&a.chained)for(c=a.body[0].program;h.chained;)h=h.body[h.body.length-1].program;var m={open:r.openStrip.open,close:r.closeStrip.close,openStandalone:d(f.body),closeStandalone:u((c||f).body)};if(r.openStrip.close&&l(f.body,null,!0),a){var y=r.inverseStrip;y.open&&p(f.body,null,!0),y.close&&l(c.body,null,!0),r.closeStrip.open&&p(h.body,null,!0),!this.options.ignoreStandalone&&u(f.body)&&d(c.body)&&(p(f.body),l(c.body))}else r.closeStrip.open&&p(f.body,null,!0);return m},o.prototype.Decorator=o.prototype.MustacheStatement=function(r){return r.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(r){var f=r.strip||{};return{inlineStandalone:!0,open:f.open,close:f.close}};function u(r,f,a){f===void 0&&(f=r.length);var c=r[f-1],h=r[f-2];if(!c)return a;if(c.type==="ContentStatement")return(h||!a?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(c.original)}function d(r,f,a){f===void 0&&(f=-1);var c=r[f+1],h=r[f+2];if(!c)return a;if(c.type==="ContentStatement")return(h||!a?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(c.original)}function l(r,f,a){var c=r[f==null?0:f+1];if(!(!c||c.type!=="ContentStatement"||!a&&c.rightStripped)){var h=c.value;c.value=c.value.replace(a?/^\s+/:/^[ \t]*\r?\n?/,""),c.rightStripped=c.value!==h}}function p(r,f,a){var c=r[f==null?r.length-1:f-1];if(!(!c||c.type!=="ContentStatement"||!a&&c.leftStripped)){var h=c.value;return c.value=c.value.replace(a?/\s+$/:/[ \t]+$/,""),c.leftStripped=c.value!==h,c.leftStripped}}e.default=o,n.exports=e.default}(La,La.exports)),La.exports}var Cn={},hm;function zk(){if(hm)return Cn;hm=1,Cn.__esModule=!0,Cn.SourceLocation=s,Cn.id=o,Cn.stripFlags=u,Cn.stripComment=d,Cn.preparePath=l,Cn.prepareMustache=p,Cn.prepareRawBlock=r,Cn.prepareBlock=f,Cn.prepareProgram=a,Cn.preparePartialBlock=c;function n(h){return h&&h.__esModule?h:{default:h}}var e=Jn(),t=n(e);function i(h,m){if(m=m.path?m.path.original:m,h.path.original!==m){var y={loc:h.path.loc};throw new t.default(h.path.original+" doesn't match "+m,y)}}function s(h,m){this.source=h,this.start={line:m.first_line,column:m.first_column},this.end={line:m.last_line,column:m.last_column}}function o(h){return/^\[.*\]$/.test(h)?h.substring(1,h.length-1):h}function u(h,m){return{open:h.charAt(2)==="~",close:m.charAt(m.length-3)==="~"}}function d(h){return h.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function l(h,m,y){y=this.locInfo(y);for(var v=h?"@":"",w=[],k=0,_=0,S=m.length;_<S;_++){var x=m[_].part,L=m[_].original!==x;if(v+=(m[_].separator||"")+x,!L&&(x===".."||x==="."||x==="this")){if(w.length>0)throw new t.default("Invalid path: "+v,{loc:y});x===".."&&k++}else w.push(x)}return{type:"PathExpression",data:h,depth:k,parts:w,original:v,loc:y}}function p(h,m,y,v,w,k){var _=v.charAt(3)||v.charAt(2),S=_!=="{"&&_!=="&",x=/\*/.test(v);return{type:x?"Decorator":"MustacheStatement",path:h,params:m,hash:y,escaped:S,strip:w,loc:this.locInfo(k)}}function r(h,m,y,v){i(h,y),v=this.locInfo(v);var w={type:"Program",body:m,strip:{},loc:v};return{type:"BlockStatement",path:h.path,params:h.params,hash:h.hash,program:w,openStrip:{},inverseStrip:{},closeStrip:{},loc:v}}function f(h,m,y,v,w,k){v&&v.path&&i(h,v);var _=/\*/.test(h.open);m.blockParams=h.blockParams;var S=void 0,x=void 0;if(y){if(_)throw new t.default("Unexpected inverse block on decorator",y);y.chain&&(y.program.body[0].closeStrip=v.strip),x=y.strip,S=y.program}return w&&(w=S,S=m,m=w),{type:_?"DecoratorBlock":"BlockStatement",path:h.path,params:h.params,hash:h.hash,program:m,inverse:S,openStrip:h.strip,inverseStrip:x,closeStrip:v&&v.strip,loc:this.locInfo(k)}}function a(h,m){if(!m&&h.length){var y=h[0].loc,v=h[h.length-1].loc;y&&v&&(m={source:y.source,start:{line:y.start.line,column:y.start.column},end:{line:v.end.line,column:v.end.column}})}return{type:"Program",body:h,strip:{},loc:m}}function c(h,m,y,v){return i(h,y),{type:"PartialBlockStatement",name:h.path,params:h.params,hash:h.hash,program:m,openStrip:h.strip,closeStrip:y&&y.strip,loc:this.locInfo(v)}}return Cn}var fm;function jk(){if(fm)return Hr;fm=1,Hr.__esModule=!0,Hr.parseWithoutProcessing=r,Hr.parse=f;function n(a){if(a&&a.__esModule)return a;var c={};if(a!=null)for(var h in a)Object.prototype.hasOwnProperty.call(a,h)&&(c[h]=a[h]);return c.default=a,c}function e(a){return a&&a.__esModule?a:{default:a}}var t=Wk(),i=e(t),s=Hk(),o=e(s),u=zk(),d=n(u),l=vn();Hr.parser=i.default;var p={};l.extend(p,d);function r(a,c){if(a.type==="Program")return a;i.default.yy=p,p.locInfo=function(m){return new p.SourceLocation(c&&c.srcName,m)};var h=i.default.parse(a);return h}function f(a,c){var h=r(a,c),m=new o.default(c);return m.accept(h)}return Hr}var zr={},dm;function Uk(){if(dm)return zr;dm=1,zr.__esModule=!0,zr.Compiler=d,zr.precompile=l,zr.compile=p;function n(a){return a&&a.__esModule?a:{default:a}}var e=Jn(),t=n(e),i=vn(),s=X0(),o=n(s),u=[].slice;function d(){}d.prototype={compiler:d,equals:function(c){var h=this.opcodes.length;if(c.opcodes.length!==h)return!1;for(var m=0;m<h;m++){var y=this.opcodes[m],v=c.opcodes[m];if(y.opcode!==v.opcode||!r(y.args,v.args))return!1}h=this.children.length;for(var m=0;m<h;m++)if(!this.children[m].equals(c.children[m]))return!1;return!0},guid:0,compile:function(c,h){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=h,this.stringParams=h.stringParams,this.trackIds=h.trackIds,h.blockParams=h.blockParams||[],h.knownHelpers=i.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},h.knownHelpers),this.accept(c)},compileProgram:function(c){var h=new this.compiler,m=h.compile(c,this.options),y=this.guid++;return this.usePartial=this.usePartial||m.usePartial,this.children[y]=m,this.useDepths=this.useDepths||m.useDepths,y},accept:function(c){if(!this[c.type])throw new t.default("Unknown type: "+c.type,c);this.sourceNode.unshift(c);var h=this[c.type](c);return this.sourceNode.shift(),h},Program:function(c){this.options.blockParams.unshift(c.blockParams);for(var h=c.body,m=h.length,y=0;y<m;y++)this.accept(h[y]);return this.options.blockParams.shift(),this.isSimple=m===1,this.blockParams=c.blockParams?c.blockParams.length:0,this},BlockStatement:function(c){f(c);var h=c.program,m=c.inverse;h=h&&this.compileProgram(h),m=m&&this.compileProgram(m);var y=this.classifySexpr(c);y==="helper"?this.helperSexpr(c,h,m):y==="simple"?(this.simpleSexpr(c),this.opcode("pushProgram",h),this.opcode("pushProgram",m),this.opcode("emptyHash"),this.opcode("blockValue",c.path.original)):(this.ambiguousSexpr(c,h,m),this.opcode("pushProgram",h),this.opcode("pushProgram",m),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(c){var h=c.program&&this.compileProgram(c.program),m=this.setupFullMustacheParams(c,h,void 0),y=c.path;this.useDecorators=!0,this.opcode("registerDecorator",m.length,y.original)},PartialStatement:function(c){this.usePartial=!0;var h=c.program;h&&(h=this.compileProgram(c.program));var m=c.params;if(m.length>1)throw new t.default("Unsupported number of partial arguments: "+m.length,c);m.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):m.push({type:"PathExpression",parts:[],depth:0}));var y=c.name.original,v=c.name.type==="SubExpression";v&&this.accept(c.name),this.setupFullMustacheParams(c,h,void 0,!0);var w=c.indent||"";this.options.preventIndent&&w&&(this.opcode("appendContent",w),w=""),this.opcode("invokePartial",v,y,w),this.opcode("append")},PartialBlockStatement:function(c){this.PartialStatement(c)},MustacheStatement:function(c){this.SubExpression(c),c.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(c){this.DecoratorBlock(c)},ContentStatement:function(c){c.value&&this.opcode("appendContent",c.value)},CommentStatement:function(){},SubExpression:function(c){f(c);var h=this.classifySexpr(c);h==="simple"?this.simpleSexpr(c):h==="helper"?this.helperSexpr(c):this.ambiguousSexpr(c)},ambiguousSexpr:function(c,h,m){var y=c.path,v=y.parts[0],w=h!=null||m!=null;this.opcode("getContext",y.depth),this.opcode("pushProgram",h),this.opcode("pushProgram",m),y.strict=!0,this.accept(y),this.opcode("invokeAmbiguous",v,w)},simpleSexpr:function(c){var h=c.path;h.strict=!0,this.accept(h),this.opcode("resolvePossibleLambda")},helperSexpr:function(c,h,m){var y=this.setupFullMustacheParams(c,h,m),v=c.path,w=v.parts[0];if(this.options.knownHelpers[w])this.opcode("invokeKnownHelper",y.length,w);else{if(this.options.knownHelpersOnly)throw new t.default("You specified knownHelpersOnly, but used the unknown helper "+w,c);v.strict=!0,v.falsy=!0,this.accept(v),this.opcode("invokeHelper",y.length,v.original,o.default.helpers.simpleId(v))}},PathExpression:function(c){this.addDepth(c.depth),this.opcode("getContext",c.depth);var h=c.parts[0],m=o.default.helpers.scopedId(c),y=!c.depth&&!m&&this.blockParamIndex(h);y?this.opcode("lookupBlockParam",y,c.parts):h?c.data?(this.options.data=!0,this.opcode("lookupData",c.depth,c.parts,c.strict)):this.opcode("lookupOnContext",c.parts,c.falsy,c.strict,m):this.opcode("pushContext")},StringLiteral:function(c){this.opcode("pushString",c.value)},NumberLiteral:function(c){this.opcode("pushLiteral",c.value)},BooleanLiteral:function(c){this.opcode("pushLiteral",c.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(c){var h=c.pairs,m=0,y=h.length;for(this.opcode("pushHash");m<y;m++)this.pushParam(h[m].value);for(;m--;)this.opcode("assignToHash",h[m].key);this.opcode("popHash")},opcode:function(c){this.opcodes.push({opcode:c,args:u.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(c){c&&(this.useDepths=!0)},classifySexpr:function(c){var h=o.default.helpers.simpleId(c.path),m=h&&!!this.blockParamIndex(c.path.parts[0]),y=!m&&o.default.helpers.helperExpression(c),v=!m&&(y||h);if(v&&!y){var w=c.path.parts[0],k=this.options;k.knownHelpers[w]?y=!0:k.knownHelpersOnly&&(v=!1)}return y?"helper":v?"ambiguous":"simple"},pushParams:function(c){for(var h=0,m=c.length;h<m;h++)this.pushParam(c[h])},pushParam:function(c){var h=c.value!=null?c.value:c.original||"";if(this.stringParams)h.replace&&(h=h.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),c.depth&&this.addDepth(c.depth),this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",h,c.type),c.type==="SubExpression"&&this.accept(c);else{if(this.trackIds){var m=void 0;if(c.parts&&!o.default.helpers.scopedId(c)&&!c.depth&&(m=this.blockParamIndex(c.parts[0])),m){var y=c.parts.slice(1).join(".");this.opcode("pushId","BlockParam",m,y)}else h=c.original||h,h.replace&&(h=h.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",c.type,h)}this.accept(c)}},setupFullMustacheParams:function(c,h,m,y){var v=c.params;return this.pushParams(v),this.opcode("pushProgram",h),this.opcode("pushProgram",m),c.hash?this.accept(c.hash):this.opcode("emptyHash",y),v},blockParamIndex:function(c){for(var h=0,m=this.options.blockParams.length;h<m;h++){var y=this.options.blockParams[h],v=y&&i.indexOf(y,c);if(y&&v>=0)return[h,v]}}};function l(a,c,h){if(a==null||typeof a!="string"&&a.type!=="Program")throw new t.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);c=c||{},"data"in c||(c.data=!0),c.compat&&(c.useDepths=!0);var m=h.parse(a,c),y=new h.Compiler().compile(m,c);return new h.JavaScriptCompiler().compile(y,c)}function p(a,c,h){if(c===void 0&&(c={}),a==null||typeof a!="string"&&a.type!=="Program")throw new t.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);c=i.extend({},c),"data"in c||(c.data=!0),c.compat&&(c.useDepths=!0);var m=void 0;function y(){var w=h.parse(a,c),k=new h.Compiler().compile(w,c),_=new h.JavaScriptCompiler().compile(k,c,void 0,!0);return h.template(_)}function v(w,k){return m||(m=y()),m.call(this,w,k)}return v._setup=function(w){return m||(m=y()),m._setup(w)},v._child=function(w,k,_,S){return m||(m=y()),m._child(w,k,_,S)},v}function r(a,c){if(a===c)return!0;if(i.isArray(a)&&i.isArray(c)&&a.length===c.length){for(var h=0;h<a.length;h++)if(!r(a[h],c[h]))return!1;return!0}}function f(a){if(!a.path.parts){var c=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[c.original+""],original:c.original+"",loc:c.loc}}}return zr}var Ta={exports:{}},$a={exports:{}},Lo={},ru={},Ia={},Oa={},pm;function Vk(){if(pm)return Oa;pm=1;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Oa.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},Oa.decode=function(e){var t=65,i=90,s=97,o=122,u=48,d=57,l=43,p=47,r=26,f=52;return t<=e&&e<=i?e-t:s<=e&&e<=o?e-s+r:u<=e&&e<=d?e-u+f:e==l?62:e==p?63:-1},Oa}var gm;function Z0(){if(gm)return Ia;gm=1;var n=Vk(),e=5,t=1<<e,i=t-1,s=t;function o(d){return d<0?(-d<<1)+1:(d<<1)+0}function u(d){var l=(d&1)===1,p=d>>1;return l?-p:p}return Ia.encode=function(l){var p="",r,f=o(l);do r=f&i,f>>>=e,f>0&&(r|=s),p+=n.encode(r);while(f>0);return p},Ia.decode=function(l,p,r){var f=l.length,a=0,c=0,h,m;do{if(p>=f)throw new Error("Expected more digits in base 64 VLQ value.");if(m=n.decode(l.charCodeAt(p++)),m===-1)throw new Error("Invalid base64 digit: "+l.charAt(p-1));h=!!(m&s),m&=i,a=a+(m<<c),c+=e}while(h);r.value=u(a),r.rest=p},Ia}var ou={},mm;function ds(){return mm||(mm=1,function(n){function e(_,S,x){if(S in _)return _[S];if(arguments.length===3)return x;throw new Error('"'+S+'" is a required argument.')}n.getArg=e;var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function s(_){var S=_.match(t);return S?{scheme:S[1],auth:S[2],host:S[3],port:S[4],path:S[5]}:null}n.urlParse=s;function o(_){var S="";return _.scheme&&(S+=_.scheme+":"),S+="//",_.auth&&(S+=_.auth+"@"),_.host&&(S+=_.host),_.port&&(S+=":"+_.port),_.path&&(S+=_.path),S}n.urlGenerate=o;function u(_){var S=_,x=s(_);if(x){if(!x.path)return _;S=x.path}for(var L=n.isAbsolute(S),I=S.split(/\/+/),$,T=0,O=I.length-1;O>=0;O--)$=I[O],$==="."?I.splice(O,1):$===".."?T++:T>0&&($===""?(I.splice(O+1,T),T=0):(I.splice(O,2),T--));return S=I.join("/"),S===""&&(S=L?"/":"."),x?(x.path=S,o(x)):S}n.normalize=u;function d(_,S){_===""&&(_="."),S===""&&(S=".");var x=s(S),L=s(_);if(L&&(_=L.path||"/"),x&&!x.scheme)return L&&(x.scheme=L.scheme),o(x);if(x||S.match(i))return S;if(L&&!L.host&&!L.path)return L.host=S,o(L);var I=S.charAt(0)==="/"?S:u(_.replace(/\/+$/,"")+"/"+S);return L?(L.path=I,o(L)):I}n.join=d,n.isAbsolute=function(_){return _.charAt(0)==="/"||t.test(_)};function l(_,S){_===""&&(_="."),_=_.replace(/\/$/,"");for(var x=0;S.indexOf(_+"/")!==0;){var L=_.lastIndexOf("/");if(L<0||(_=_.slice(0,L),_.match(/^([^\/]+:\/)?\/*$/)))return S;++x}return Array(x+1).join("../")+S.substr(_.length+1)}n.relative=l;var p=function(){var _=Object.create(null);return!("__proto__"in _)}();function r(_){return _}function f(_){return c(_)?"$"+_:_}n.toSetString=p?r:f;function a(_){return c(_)?_.slice(1):_}n.fromSetString=p?r:a;function c(_){if(!_)return!1;var S=_.length;if(S<9||_.charCodeAt(S-1)!==95||_.charCodeAt(S-2)!==95||_.charCodeAt(S-3)!==111||_.charCodeAt(S-4)!==116||_.charCodeAt(S-5)!==111||_.charCodeAt(S-6)!==114||_.charCodeAt(S-7)!==112||_.charCodeAt(S-8)!==95||_.charCodeAt(S-9)!==95)return!1;for(var x=S-10;x>=0;x--)if(_.charCodeAt(x)!==36)return!1;return!0}function h(_,S,x){var L=y(_.source,S.source);return L!==0||(L=_.originalLine-S.originalLine,L!==0)||(L=_.originalColumn-S.originalColumn,L!==0||x)||(L=_.generatedColumn-S.generatedColumn,L!==0)||(L=_.generatedLine-S.generatedLine,L!==0)?L:y(_.name,S.name)}n.compareByOriginalPositions=h;function m(_,S,x){var L=_.generatedLine-S.generatedLine;return L!==0||(L=_.generatedColumn-S.generatedColumn,L!==0||x)||(L=y(_.source,S.source),L!==0)||(L=_.originalLine-S.originalLine,L!==0)||(L=_.originalColumn-S.originalColumn,L!==0)?L:y(_.name,S.name)}n.compareByGeneratedPositionsDeflated=m;function y(_,S){return _===S?0:_===null?1:S===null?-1:_>S?1:-1}function v(_,S){var x=_.generatedLine-S.generatedLine;return x!==0||(x=_.generatedColumn-S.generatedColumn,x!==0)||(x=y(_.source,S.source),x!==0)||(x=_.originalLine-S.originalLine,x!==0)||(x=_.originalColumn-S.originalColumn,x!==0)?x:y(_.name,S.name)}n.compareByGeneratedPositionsInflated=v;function w(_){return JSON.parse(_.replace(/^\)]}'[^\n]*\n/,""))}n.parseSourceMapInput=w;function k(_,S,x){if(S=S||"",_&&(_[_.length-1]!=="/"&&S[0]!=="/"&&(_+="/"),S=_+S),x){var L=s(x);if(!L)throw new Error("sourceMapURL could not be parsed");if(L.path){var I=L.path.lastIndexOf("/");I>=0&&(L.path=L.path.substring(0,I+1))}S=d(o(L),S)}return u(S)}n.computeSourceURL=k}(ou)),ou}var su={},ym;function J0(){if(ym)return su;ym=1;var n=ds(),e=Object.prototype.hasOwnProperty,t=typeof Map<"u";function i(){this._array=[],this._set=t?new Map:Object.create(null)}return i.fromArray=function(o,u){for(var d=new i,l=0,p=o.length;l<p;l++)d.add(o[l],u);return d},i.prototype.size=function(){return t?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(o,u){var d=t?o:n.toSetString(o),l=t?this.has(o):e.call(this._set,d),p=this._array.length;(!l||u)&&this._array.push(o),l||(t?this._set.set(o,p):this._set[d]=p)},i.prototype.has=function(o){if(t)return this._set.has(o);var u=n.toSetString(o);return e.call(this._set,u)},i.prototype.indexOf=function(o){if(t){var u=this._set.get(o);if(u>=0)return u}else{var d=n.toSetString(o);if(e.call(this._set,d))return this._set[d]}throw new Error('"'+o+'" is not in the set.')},i.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},i.prototype.toArray=function(){return this._array.slice()},su.ArraySet=i,su}var au={},vm;function qk(){if(vm)return au;vm=1;var n=ds();function e(i,s){var o=i.generatedLine,u=s.generatedLine,d=i.generatedColumn,l=s.generatedColumn;return u>o||u==o&&l>=d||n.compareByGeneratedPositionsInflated(i,s)<=0}function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(s,o){this._array.forEach(s,o)},t.prototype.add=function(s){e(this._last,s)?(this._last=s,this._array.push(s)):(this._sorted=!1,this._array.push(s))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},au.MappingList=t,au}var bm;function eb(){if(bm)return ru;bm=1;var n=Z0(),e=ds(),t=J0().ArraySet,i=qk().MappingList;function s(o){o||(o={}),this._file=e.getArg(o,"file",null),this._sourceRoot=e.getArg(o,"sourceRoot",null),this._skipValidation=e.getArg(o,"skipValidation",!1),this._sources=new t,this._names=new t,this._mappings=new i,this._sourcesContents=null}return s.prototype._version=3,s.fromSourceMap=function(u){var d=u.sourceRoot,l=new s({file:u.file,sourceRoot:d});return u.eachMapping(function(p){var r={generated:{line:p.generatedLine,column:p.generatedColumn}};p.source!=null&&(r.source=p.source,d!=null&&(r.source=e.relative(d,r.source)),r.original={line:p.originalLine,column:p.originalColumn},p.name!=null&&(r.name=p.name)),l.addMapping(r)}),u.sources.forEach(function(p){var r=p;d!==null&&(r=e.relative(d,p)),l._sources.has(r)||l._sources.add(r);var f=u.sourceContentFor(p);f!=null&&l.setSourceContent(p,f)}),l},s.prototype.addMapping=function(u){var d=e.getArg(u,"generated"),l=e.getArg(u,"original",null),p=e.getArg(u,"source",null),r=e.getArg(u,"name",null);this._skipValidation||this._validateMapping(d,l,p,r),p!=null&&(p=String(p),this._sources.has(p)||this._sources.add(p)),r!=null&&(r=String(r),this._names.has(r)||this._names.add(r)),this._mappings.add({generatedLine:d.line,generatedColumn:d.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:p,name:r})},s.prototype.setSourceContent=function(u,d){var l=u;this._sourceRoot!=null&&(l=e.relative(this._sourceRoot,l)),d!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(l)]=d):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(u,d,l){var p=d;if(d==null){if(u.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);p=u.file}var r=this._sourceRoot;r!=null&&(p=e.relative(r,p));var f=new t,a=new t;this._mappings.unsortedForEach(function(c){if(c.source===p&&c.originalLine!=null){var h=u.originalPositionFor({line:c.originalLine,column:c.originalColumn});h.source!=null&&(c.source=h.source,l!=null&&(c.source=e.join(l,c.source)),r!=null&&(c.source=e.relative(r,c.source)),c.originalLine=h.line,c.originalColumn=h.column,h.name!=null&&(c.name=h.name))}var m=c.source;m!=null&&!f.has(m)&&f.add(m);var y=c.name;y!=null&&!a.has(y)&&a.add(y)},this),this._sources=f,this._names=a,u.sources.forEach(function(c){var h=u.sourceContentFor(c);h!=null&&(l!=null&&(c=e.join(l,c)),r!=null&&(c=e.relative(r,c)),this.setSourceContent(c,h))},this)},s.prototype._validateMapping=function(u,d,l,p){if(d&&typeof d.line!="number"&&typeof d.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(u&&"line"in u&&"column"in u&&u.line>0&&u.column>=0&&!d&&!l&&!p)){if(u&&"line"in u&&"column"in u&&d&&"line"in d&&"column"in d&&u.line>0&&u.column>=0&&d.line>0&&d.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:u,source:l,original:d,name:p}))}},s.prototype._serializeMappings=function(){for(var u=0,d=1,l=0,p=0,r=0,f=0,a="",c,h,m,y,v=this._mappings.toArray(),w=0,k=v.length;w<k;w++){if(h=v[w],c="",h.generatedLine!==d)for(u=0;h.generatedLine!==d;)c+=";",d++;else if(w>0){if(!e.compareByGeneratedPositionsInflated(h,v[w-1]))continue;c+=","}c+=n.encode(h.generatedColumn-u),u=h.generatedColumn,h.source!=null&&(y=this._sources.indexOf(h.source),c+=n.encode(y-f),f=y,c+=n.encode(h.originalLine-1-p),p=h.originalLine-1,c+=n.encode(h.originalColumn-l),l=h.originalColumn,h.name!=null&&(m=this._names.indexOf(h.name),c+=n.encode(m-r),r=m)),a+=c}return a},s.prototype._generateSourcesContent=function(u,d){return u.map(function(l){if(!this._sourcesContents)return null;d!=null&&(l=e.relative(d,l));var p=e.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,p)?this._sourcesContents[p]:null},this)},s.prototype.toJSON=function(){var u={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(u.file=this._file),this._sourceRoot!=null&&(u.sourceRoot=this._sourceRoot),this._sourcesContents&&(u.sourcesContent=this._generateSourcesContent(u.sources,u.sourceRoot)),u},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},ru.SourceMapGenerator=s,ru}var Ro={},lu={},wm;function Gk(){return wm||(wm=1,function(n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2;function e(t,i,s,o,u,d){var l=Math.floor((i-t)/2)+t,p=u(s,o[l],!0);return p===0?l:p>0?i-l>1?e(l,i,s,o,u,d):d==n.LEAST_UPPER_BOUND?i<o.length?i:-1:l:l-t>1?e(t,l,s,o,u,d):d==n.LEAST_UPPER_BOUND?l:t<0?-1:t}n.search=function(i,s,o,u){if(s.length===0)return-1;var d=e(-1,s.length,i,s,o,u||n.GREATEST_LOWER_BOUND);if(d<0)return-1;for(;d-1>=0&&o(s[d],s[d-1],!0)===0;)--d;return d}}(lu)),lu}var cu={},_m;function Kk(){if(_m)return cu;_m=1;function n(i,s,o){var u=i[s];i[s]=i[o],i[o]=u}function e(i,s){return Math.round(i+Math.random()*(s-i))}function t(i,s,o,u){if(o<u){var d=e(o,u),l=o-1;n(i,d,u);for(var p=i[u],r=o;r<u;r++)s(i[r],p)<=0&&(l+=1,n(i,l,r));n(i,l+1,r);var f=l+1;t(i,s,o,f-1),t(i,s,f+1,u)}}return cu.quickSort=function(i,s){t(i,s,0,i.length-1)},cu}var xm;function Yk(){if(xm)return Ro;xm=1;var n=ds(),e=Gk(),t=J0().ArraySet,i=Z0(),s=Kk().quickSort;function o(p,r){var f=p;return typeof p=="string"&&(f=n.parseSourceMapInput(p)),f.sections!=null?new l(f,r):new u(f,r)}o.fromSourceMap=function(p,r){return u.fromSourceMap(p,r)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(r,f){var a=r.charAt(f);return a===";"||a===","},o.prototype._parseMappings=function(r,f){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(r,f,a){var c=f||null,h=a||o.GENERATED_ORDER,m;switch(h){case o.GENERATED_ORDER:m=this._generatedMappings;break;case o.ORIGINAL_ORDER:m=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var y=this.sourceRoot;m.map(function(v){var w=v.source===null?null:this._sources.at(v.source);return w=n.computeSourceURL(y,w,this._sourceMapURL),{source:w,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:this._names.at(v.name)}},this).forEach(r,c)},o.prototype.allGeneratedPositionsFor=function(r){var f=n.getArg(r,"line"),a={source:n.getArg(r,"source"),originalLine:f,originalColumn:n.getArg(r,"column",0)};if(a.source=this._findSourceIndex(a.source),a.source<0)return[];var c=[],h=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,e.LEAST_UPPER_BOUND);if(h>=0){var m=this._originalMappings[h];if(r.column===void 0)for(var y=m.originalLine;m&&m.originalLine===y;)c.push({line:n.getArg(m,"generatedLine",null),column:n.getArg(m,"generatedColumn",null),lastColumn:n.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++h];else for(var v=m.originalColumn;m&&m.originalLine===f&&m.originalColumn==v;)c.push({line:n.getArg(m,"generatedLine",null),column:n.getArg(m,"generatedColumn",null),lastColumn:n.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++h]}return c},Ro.SourceMapConsumer=o;function u(p,r){var f=p;typeof p=="string"&&(f=n.parseSourceMapInput(p));var a=n.getArg(f,"version"),c=n.getArg(f,"sources"),h=n.getArg(f,"names",[]),m=n.getArg(f,"sourceRoot",null),y=n.getArg(f,"sourcesContent",null),v=n.getArg(f,"mappings"),w=n.getArg(f,"file",null);if(a!=this._version)throw new Error("Unsupported version: "+a);m&&(m=n.normalize(m)),c=c.map(String).map(n.normalize).map(function(k){return m&&n.isAbsolute(m)&&n.isAbsolute(k)?n.relative(m,k):k}),this._names=t.fromArray(h.map(String),!0),this._sources=t.fromArray(c,!0),this._absoluteSources=this._sources.toArray().map(function(k){return n.computeSourceURL(m,k,r)}),this.sourceRoot=m,this.sourcesContent=y,this._mappings=v,this._sourceMapURL=r,this.file=w}u.prototype=Object.create(o.prototype),u.prototype.consumer=o,u.prototype._findSourceIndex=function(p){var r=p;if(this.sourceRoot!=null&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);var f;for(f=0;f<this._absoluteSources.length;++f)if(this._absoluteSources[f]==p)return f;return-1},u.fromSourceMap=function(r,f){var a=Object.create(u.prototype),c=a._names=t.fromArray(r._names.toArray(),!0),h=a._sources=t.fromArray(r._sources.toArray(),!0);a.sourceRoot=r._sourceRoot,a.sourcesContent=r._generateSourcesContent(a._sources.toArray(),a.sourceRoot),a.file=r._file,a._sourceMapURL=f,a._absoluteSources=a._sources.toArray().map(function(x){return n.computeSourceURL(a.sourceRoot,x,f)});for(var m=r._mappings.toArray().slice(),y=a.__generatedMappings=[],v=a.__originalMappings=[],w=0,k=m.length;w<k;w++){var _=m[w],S=new d;S.generatedLine=_.generatedLine,S.generatedColumn=_.generatedColumn,_.source&&(S.source=h.indexOf(_.source),S.originalLine=_.originalLine,S.originalColumn=_.originalColumn,_.name&&(S.name=c.indexOf(_.name)),v.push(S)),y.push(S)}return s(a.__originalMappings,n.compareByOriginalPositions),a},u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function d(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}u.prototype._parseMappings=function(r,f){for(var a=1,c=0,h=0,m=0,y=0,v=0,w=r.length,k=0,_={},S={},x=[],L=[],I,$,T,O,C;k<w;)if(r.charAt(k)===";")a++,k++,c=0;else if(r.charAt(k)===",")k++;else{for(I=new d,I.generatedLine=a,O=k;O<w&&!this._charIsMappingSeparator(r,O);O++);if($=r.slice(k,O),T=_[$],T)k+=$.length;else{for(T=[];k<O;)i.decode(r,k,S),C=S.value,k=S.rest,T.push(C);if(T.length===2)throw new Error("Found a source, but no line and column");if(T.length===3)throw new Error("Found a source and line, but no column");_[$]=T}I.generatedColumn=c+T[0],c=I.generatedColumn,T.length>1&&(I.source=y+T[1],y+=T[1],I.originalLine=h+T[2],h=I.originalLine,I.originalLine+=1,I.originalColumn=m+T[3],m=I.originalColumn,T.length>4&&(I.name=v+T[4],v+=T[4])),L.push(I),typeof I.originalLine=="number"&&x.push(I)}s(L,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(x,n.compareByOriginalPositions),this.__originalMappings=x},u.prototype._findMapping=function(r,f,a,c,h,m){if(r[a]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+r[a]);if(r[c]<0)throw new TypeError("Column must be greater than or equal to 0, got "+r[c]);return e.search(r,f,h,m)},u.prototype.computeColumnSpans=function(){for(var r=0;r<this._generatedMappings.length;++r){var f=this._generatedMappings[r];if(r+1<this._generatedMappings.length){var a=this._generatedMappings[r+1];if(f.generatedLine===a.generatedLine){f.lastGeneratedColumn=a.generatedColumn-1;continue}}f.lastGeneratedColumn=1/0}},u.prototype.originalPositionFor=function(r){var f={generatedLine:n.getArg(r,"line"),generatedColumn:n.getArg(r,"column")},a=this._findMapping(f,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(r,"bias",o.GREATEST_LOWER_BOUND));if(a>=0){var c=this._generatedMappings[a];if(c.generatedLine===f.generatedLine){var h=n.getArg(c,"source",null);h!==null&&(h=this._sources.at(h),h=n.computeSourceURL(this.sourceRoot,h,this._sourceMapURL));var m=n.getArg(c,"name",null);return m!==null&&(m=this._names.at(m)),{source:h,line:n.getArg(c,"originalLine",null),column:n.getArg(c,"originalColumn",null),name:m}}}return{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(r){return r==null}):!1},u.prototype.sourceContentFor=function(r,f){if(!this.sourcesContent)return null;var a=this._findSourceIndex(r);if(a>=0)return this.sourcesContent[a];var c=r;this.sourceRoot!=null&&(c=n.relative(this.sourceRoot,c));var h;if(this.sourceRoot!=null&&(h=n.urlParse(this.sourceRoot))){var m=c.replace(/^file:\/\//,"");if(h.scheme=="file"&&this._sources.has(m))return this.sourcesContent[this._sources.indexOf(m)];if((!h.path||h.path=="/")&&this._sources.has("/"+c))return this.sourcesContent[this._sources.indexOf("/"+c)]}if(f)return null;throw new Error('"'+c+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(r){var f=n.getArg(r,"source");if(f=this._findSourceIndex(f),f<0)return{line:null,column:null,lastColumn:null};var a={source:f,originalLine:n.getArg(r,"line"),originalColumn:n.getArg(r,"column")},c=this._findMapping(a,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(r,"bias",o.GREATEST_LOWER_BOUND));if(c>=0){var h=this._originalMappings[c];if(h.source===a.source)return{line:n.getArg(h,"generatedLine",null),column:n.getArg(h,"generatedColumn",null),lastColumn:n.getArg(h,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ro.BasicSourceMapConsumer=u;function l(p,r){var f=p;typeof p=="string"&&(f=n.parseSourceMapInput(p));var a=n.getArg(f,"version"),c=n.getArg(f,"sections");if(a!=this._version)throw new Error("Unsupported version: "+a);this._sources=new t,this._names=new t;var h={line:-1,column:0};this._sections=c.map(function(m){if(m.url)throw new Error("Support for url field in sections not implemented.");var y=n.getArg(m,"offset"),v=n.getArg(y,"line"),w=n.getArg(y,"column");if(v<h.line||v===h.line&&w<h.column)throw new Error("Section offsets must be ordered and non-overlapping.");return h=y,{generatedOffset:{generatedLine:v+1,generatedColumn:w+1},consumer:new o(n.getArg(m,"map"),r)}})}return l.prototype=Object.create(o.prototype),l.prototype.constructor=o,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var p=[],r=0;r<this._sections.length;r++)for(var f=0;f<this._sections[r].consumer.sources.length;f++)p.push(this._sections[r].consumer.sources[f]);return p}}),l.prototype.originalPositionFor=function(r){var f={generatedLine:n.getArg(r,"line"),generatedColumn:n.getArg(r,"column")},a=e.search(f,this._sections,function(h,m){var y=h.generatedLine-m.generatedOffset.generatedLine;return y||h.generatedColumn-m.generatedOffset.generatedColumn}),c=this._sections[a];return c?c.consumer.originalPositionFor({line:f.generatedLine-(c.generatedOffset.generatedLine-1),column:f.generatedColumn-(c.generatedOffset.generatedLine===f.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:r.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(r){return r.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(r,f){for(var a=0;a<this._sections.length;a++){var c=this._sections[a],h=c.consumer.sourceContentFor(r,!0);if(h)return h}if(f)return null;throw new Error('"'+r+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(r){for(var f=0;f<this._sections.length;f++){var a=this._sections[f];if(a.consumer._findSourceIndex(n.getArg(r,"source"))!==-1){var c=a.consumer.generatedPositionFor(r);if(c){var h={line:c.line+(a.generatedOffset.generatedLine-1),column:c.column+(a.generatedOffset.generatedLine===c.line?a.generatedOffset.generatedColumn-1:0)};return h}}}return{line:null,column:null}},l.prototype._parseMappings=function(r,f){this.__generatedMappings=[],this.__originalMappings=[];for(var a=0;a<this._sections.length;a++)for(var c=this._sections[a],h=c.consumer._generatedMappings,m=0;m<h.length;m++){var y=h[m],v=c.consumer._sources.at(y.source);v=n.computeSourceURL(c.consumer.sourceRoot,v,this._sourceMapURL),this._sources.add(v),v=this._sources.indexOf(v);var w=null;y.name&&(w=c.consumer._names.at(y.name),this._names.add(w),w=this._names.indexOf(w));var k={source:v,generatedLine:y.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:y.generatedColumn+(c.generatedOffset.generatedLine===y.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:y.originalLine,originalColumn:y.originalColumn,name:w};this.__generatedMappings.push(k),typeof k.originalLine=="number"&&this.__originalMappings.push(k)}s(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),s(this.__originalMappings,n.compareByOriginalPositions)},Ro.IndexedSourceMapConsumer=l,Ro}var uu={},Sm;function Xk(){if(Sm)return uu;Sm=1;var n=eb().SourceMapGenerator,e=ds(),t=/(\r?\n)/,i=10,s="$$$isSourceNode$$$";function o(u,d,l,p,r){this.children=[],this.sourceContents={},this.line=u??null,this.column=d??null,this.source=l??null,this.name=r??null,this[s]=!0,p!=null&&this.add(p)}return o.fromStringWithSourceMap=function(d,l,p){var r=new o,f=d.split(t),a=0,c=function(){var w=_(),k=_()||"";return w+k;function _(){return a<f.length?f[a++]:void 0}},h=1,m=0,y=null;return l.eachMapping(function(w){if(y!==null)if(h<w.generatedLine)v(y,c()),h++,m=0;else{var k=f[a]||"",_=k.substr(0,w.generatedColumn-m);f[a]=k.substr(w.generatedColumn-m),m=w.generatedColumn,v(y,_),y=w;return}for(;h<w.generatedLine;)r.add(c()),h++;if(m<w.generatedColumn){var k=f[a]||"";r.add(k.substr(0,w.generatedColumn)),f[a]=k.substr(w.generatedColumn),m=w.generatedColumn}y=w},this),a<f.length&&(y&&v(y,c()),r.add(f.splice(a).join(""))),l.sources.forEach(function(w){var k=l.sourceContentFor(w);k!=null&&(p!=null&&(w=e.join(p,w)),r.setSourceContent(w,k))}),r;function v(w,k){if(w===null||w.source===void 0)r.add(k);else{var _=p?e.join(p,w.source):w.source;r.add(new o(w.originalLine,w.originalColumn,_,k,w.name))}}},o.prototype.add=function(d){if(Array.isArray(d))d.forEach(function(l){this.add(l)},this);else if(d[s]||typeof d=="string")d&&this.children.push(d);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+d);return this},o.prototype.prepend=function(d){if(Array.isArray(d))for(var l=d.length-1;l>=0;l--)this.prepend(d[l]);else if(d[s]||typeof d=="string")this.children.unshift(d);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+d);return this},o.prototype.walk=function(d){for(var l,p=0,r=this.children.length;p<r;p++)l=this.children[p],l[s]?l.walk(d):l!==""&&d(l,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(d){var l,p,r=this.children.length;if(r>0){for(l=[],p=0;p<r-1;p++)l.push(this.children[p]),l.push(d);l.push(this.children[p]),this.children=l}return this},o.prototype.replaceRight=function(d,l){var p=this.children[this.children.length-1];return p[s]?p.replaceRight(d,l):typeof p=="string"?this.children[this.children.length-1]=p.replace(d,l):this.children.push("".replace(d,l)),this},o.prototype.setSourceContent=function(d,l){this.sourceContents[e.toSetString(d)]=l},o.prototype.walkSourceContents=function(d){for(var l=0,p=this.children.length;l<p;l++)this.children[l][s]&&this.children[l].walkSourceContents(d);for(var r=Object.keys(this.sourceContents),l=0,p=r.length;l<p;l++)d(e.fromSetString(r[l]),this.sourceContents[r[l]])},o.prototype.toString=function(){var d="";return this.walk(function(l){d+=l}),d},o.prototype.toStringWithSourceMap=function(d){var l={code:"",line:1,column:0},p=new n(d),r=!1,f=null,a=null,c=null,h=null;return this.walk(function(m,y){l.code+=m,y.source!==null&&y.line!==null&&y.column!==null?((f!==y.source||a!==y.line||c!==y.column||h!==y.name)&&p.addMapping({source:y.source,original:{line:y.line,column:y.column},generated:{line:l.line,column:l.column},name:y.name}),f=y.source,a=y.line,c=y.column,h=y.name,r=!0):r&&(p.addMapping({generated:{line:l.line,column:l.column}}),f=null,r=!1);for(var v=0,w=m.length;v<w;v++)m.charCodeAt(v)===i?(l.line++,l.column=0,v+1===w?(f=null,r=!1):r&&p.addMapping({source:y.source,original:{line:y.line,column:y.column},generated:{line:l.line,column:l.column},name:y.name})):l.column++}),this.walkSourceContents(function(m,y){p.setSourceContent(m,y)}),{code:l.code,map:p}},uu.SourceNode=o,uu}var Am;function Qk(){return Am||(Am=1,Lo.SourceMapGenerator=eb().SourceMapGenerator,Lo.SourceMapConsumer=Yk().SourceMapConsumer,Lo.SourceNode=Xk().SourceNode),Lo}var Cm;function Zk(){return Cm||(Cm=1,function(n,e){e.__esModule=!0;var t=vn(),i=void 0;try{var s=Qk();i=s.SourceNode}catch{}i||(i=function(d,l,p,r){this.src="",r&&this.add(r)},i.prototype={add:function(l){t.isArray(l)&&(l=l.join("")),this.src+=l},prepend:function(l){t.isArray(l)&&(l=l.join("")),this.src=l+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function o(d,l,p){if(t.isArray(d)){for(var r=[],f=0,a=d.length;f<a;f++)r.push(l.wrap(d[f],p));return r}else if(typeof d=="boolean"||typeof d=="number")return d+"";return d}function u(d){this.srcFile=d,this.source=[]}u.prototype={isEmpty:function(){return!this.source.length},prepend:function(l,p){this.source.unshift(this.wrap(l,p))},push:function(l,p){this.source.push(this.wrap(l,p))},merge:function(){var l=this.empty();return this.each(function(p){l.add([" ",p,`
|
|
10
|
+
`])}),l},each:function(l){for(var p=0,r=this.source.length;p<r;p++)l(this.source[p])},empty:function(){var l=this.currentLocation||{start:{}};return new i(l.start.line,l.start.column,this.srcFile)},wrap:function(l){var p=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return l instanceof i?l:(l=o(l,this,p),new i(p.start.line,p.start.column,this.srcFile,l))},functionCall:function(l,p,r){return r=this.generateList(r),this.wrap([l,p?"."+p+"(":"(",r,")"])},quotedString:function(l){return'"'+(l+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(l){var p=this,r=[];Object.keys(l).forEach(function(a){var c=o(l[a],p);c!=="undefined"&&r.push([p.quotedString(a),":",c])});var f=this.generateList(r);return f.prepend("{"),f.add("}"),f},generateList:function(l){for(var p=this.empty(),r=0,f=l.length;r<f;r++)r&&p.add(","),p.add(o(l[r],this));return p},generateArray:function(l){var p=this.generateList(l);return p.prepend("["),p.add("]"),p}},e.default=u,n.exports=e.default}($a,$a.exports)),$a.exports}var km;function Jk(){return km||(km=1,function(n,e){e.__esModule=!0;function t(a){return a&&a.__esModule?a:{default:a}}var i=Ef(),s=Jn(),o=t(s),u=vn(),d=Zk(),l=t(d);function p(a){this.value=a}function r(){}r.prototype={nameLookup:function(c,h){return this.internalNameLookup(c,h)},depthedLookup:function(c){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(c),")"]},compilerInfo:function(){var c=i.COMPILER_REVISION,h=i.REVISION_CHANGES[c];return[c,h]},appendToBuffer:function(c,h,m){return u.isArray(c)||(c=[c]),c=this.source.wrap(c,h),this.environment.isSimple?["return ",c,";"]:m?["buffer += ",c,";"]:(c.appendToBuffer=!0,c)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(c,h){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",c,",",JSON.stringify(h),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(c,h,m,y){this.environment=c,this.options=h,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!y,this.name=this.environment.name,this.isChild=!!m,this.context=m||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(c,h),this.useDepths=this.useDepths||c.useDepths||c.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||c.useBlockParams;var v=c.opcodes,w=void 0,k=void 0,_=void 0,S=void 0;for(_=0,S=v.length;_<S;_++)w=v[_],this.source.currentLocation=w.loc,k=k||w.loc,this[w.opcode].apply(this,w.args);if(this.source.currentLocation=k,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new o.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
11
|
+
`]),this.decorators.push("return fn;"),y?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
12
|
+
`),this.decorators.push(`}
|
|
13
|
+
`),this.decorators=this.decorators.merge()));var x=this.createFunctionContext(y);if(this.isChild)return x;var L={compiler:this.compilerInfo(),main:x};this.decorators&&(L.main_d=this.decorators,L.useDecorators=!0);var I=this.context,$=I.programs,T=I.decorators;for(_=0,S=$.length;_<S;_++)$[_]&&(L[_]=$[_],T[_]&&(L[_+"_d"]=T[_],L.useDecorators=!0));return this.environment.usePartial&&(L.usePartial=!0),this.options.data&&(L.useData=!0),this.useDepths&&(L.useDepths=!0),this.useBlockParams&&(L.useBlockParams=!0),this.options.compat&&(L.compat=!0),y?L.compilerOptions=this.options:(L.compiler=JSON.stringify(L.compiler),this.source.currentLocation={start:{line:1,column:0}},L=this.objectLiteral(L),h.srcName?(L=L.toStringWithSourceMap({file:h.destName}),L.map=L.map&&L.map.toString()):L=L.toString()),L},preamble:function(){this.lastContext=0,this.source=new l.default(this.options.srcName),this.decorators=new l.default(this.options.srcName)},createFunctionContext:function(c){var h=this,m="",y=this.stackVars.concat(this.registers.list);y.length>0&&(m+=", "+y.join(", "));var v=0;Object.keys(this.aliases).forEach(function(_){var S=h.aliases[_];S.children&&S.referenceCount>1&&(m+=", alias"+ ++v+"="+_,S.children[0]="alias"+v)}),this.lookupPropertyFunctionIsUsed&&(m+=", "+this.lookupPropertyFunctionVarDeclaration());var w=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&w.push("blockParams"),this.useDepths&&w.push("depths");var k=this.mergeSource(m);return c?(w.push(k),Function.apply(this,w)):this.source.wrap(["function(",w.join(","),`) {
|
|
14
|
+
`,k,"}"])},mergeSource:function(c){var h=this.environment.isSimple,m=!this.forceBuffer,y=void 0,v=void 0,w=void 0,k=void 0;return this.source.each(function(_){_.appendToBuffer?(w?_.prepend(" + "):w=_,k=_):(w&&(v?w.prepend("buffer += "):y=!0,k.add(";"),w=k=void 0),v=!0,h||(m=!1))}),m?w?(w.prepend("return "),k.add(";")):v||this.source.push('return "";'):(c+=", buffer = "+(y?"":this.initializeBuffer()),w?(w.prepend("return buffer + "),k.add(";")):this.source.push("return buffer;")),c&&this.source.prepend("var "+c.substring(2)+(y?"":`;
|
|
15
|
+
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
16
|
+
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
18
|
+
return parent[propertyName];
|
|
19
|
+
}
|
|
20
|
+
return undefined
|
|
21
|
+
}
|
|
22
|
+
`.trim()},blockValue:function(c){var h=this.aliasable("container.hooks.blockHelperMissing"),m=[this.contextName(0)];this.setupHelperArgs(c,0,m);var y=this.popStack();m.splice(1,0,y),this.push(this.source.functionCall(h,"call",m))},ambiguousBlockValue:function(){var c=this.aliasable("container.hooks.blockHelperMissing"),h=[this.contextName(0)];this.setupHelperArgs("",0,h,!0),this.flushInline();var m=this.topStack();h.splice(1,0,m),this.pushSource(["if (!",this.lastHelper,") { ",m," = ",this.source.functionCall(c,"call",h),"}"])},appendContent:function(c){this.pendingContent?c=this.pendingContent+c:this.pendingLocation=this.source.currentLocation,this.pendingContent=c},append:function(){if(this.isInline())this.replaceStack(function(h){return[" != null ? ",h,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var c=this.popStack();this.pushSource(["if (",c," != null) { ",this.appendToBuffer(c,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(c){this.lastContext=c},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(c,h,m,y){var v=0;!y&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(c[v++])):this.pushContext(),this.resolvePath("context",c,v,h,m)},lookupBlockParam:function(c,h){this.useBlockParams=!0,this.push(["blockParams[",c[0],"][",c[1],"]"]),this.resolvePath("context",h,1)},lookupData:function(c,h,m){c?this.pushStackLiteral("container.data(data, "+c+")"):this.pushStackLiteral("data"),this.resolvePath("data",h,0,!0,m)},resolvePath:function(c,h,m,y,v){var w=this;if(this.options.strict||this.options.assumeObjects){this.push(f(this.options.strict&&v,this,h,c));return}for(var k=h.length;m<k;m++)this.replaceStack(function(_){var S=w.nameLookup(_,h[m],c);return y?[" && ",S]:[" != null ? ",S," : ",_]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(c,h){this.pushContext(),this.pushString(h),h!=="SubExpression"&&(typeof c=="string"?this.pushString(c):this.pushStackLiteral(c))},emptyHash:function(c){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(c?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var c=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(c.ids)),this.stringParams&&(this.push(this.objectLiteral(c.contexts)),this.push(this.objectLiteral(c.types))),this.push(this.objectLiteral(c.values))},pushString:function(c){this.pushStackLiteral(this.quotedString(c))},pushLiteral:function(c){this.pushStackLiteral(c)},pushProgram:function(c){c!=null?this.pushStackLiteral(this.programExpression(c)):this.pushStackLiteral(null)},registerDecorator:function(c,h){var m=this.nameLookup("decorators",h,"decorator"),y=this.setupHelperArgs(h,c);this.decorators.push(["fn = ",this.decorators.functionCall(m,"",["fn","props","container",y])," || fn;"])},invokeHelper:function(c,h,m){var y=this.popStack(),v=this.setupHelper(c,h),w=[];m&&w.push(v.name),w.push(y),this.options.strict||w.push(this.aliasable("container.hooks.helperMissing"));var k=["(",this.itemsSeparatedBy(w,"||"),")"],_=this.source.functionCall(k,"call",v.callParams);this.push(_)},itemsSeparatedBy:function(c,h){var m=[];m.push(c[0]);for(var y=1;y<c.length;y++)m.push(h,c[y]);return m},invokeKnownHelper:function(c,h){var m=this.setupHelper(c,h);this.push(this.source.functionCall(m.name,"call",m.callParams))},invokeAmbiguous:function(c,h){this.useRegister("helper");var m=this.popStack();this.emptyHash();var y=this.setupHelper(0,c,h),v=this.lastHelper=this.nameLookup("helpers",c,"helper"),w=["(","(helper = ",v," || ",m,")"];this.options.strict||(w[0]="(helper = ",w.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",w,y.paramsInit?["),(",y.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",y.callParams)," : helper))"])},invokePartial:function(c,h,m){var y=[],v=this.setupParams(h,1,y);c&&(h=this.popStack(),delete v.name),m&&(v.indent=JSON.stringify(m)),v.helpers="helpers",v.partials="partials",v.decorators="container.decorators",c?y.unshift(h):y.unshift(this.nameLookup("partials",h,"partial")),this.options.compat&&(v.depths="depths"),v=this.objectLiteral(v),y.push(v),this.push(this.source.functionCall("container.invokePartial","",y))},assignToHash:function(c){var h=this.popStack(),m=void 0,y=void 0,v=void 0;this.trackIds&&(v=this.popStack()),this.stringParams&&(y=this.popStack(),m=this.popStack());var w=this.hash;m&&(w.contexts[c]=m),y&&(w.types[c]=y),v&&(w.ids[c]=v),w.values[c]=h},pushId:function(c,h,m){c==="BlockParam"?this.pushStackLiteral("blockParams["+h[0]+"].path["+h[1]+"]"+(m?" + "+JSON.stringify("."+m):"")):c==="PathExpression"?this.pushString(h):c==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:r,compileChildren:function(c,h){for(var m=c.children,y=void 0,v=void 0,w=0,k=m.length;w<k;w++){y=m[w],v=new this.compiler;var _=this.matchExistingProgram(y);if(_==null){this.context.programs.push("");var S=this.context.programs.length;y.index=S,y.name="program"+S,this.context.programs[S]=v.compile(y,h,this.context,!this.precompile),this.context.decorators[S]=v.decorators,this.context.environments[S]=y,this.useDepths=this.useDepths||v.useDepths,this.useBlockParams=this.useBlockParams||v.useBlockParams,y.useDepths=this.useDepths,y.useBlockParams=this.useBlockParams}else y.index=_.index,y.name="program"+_.index,this.useDepths=this.useDepths||_.useDepths,this.useBlockParams=this.useBlockParams||_.useBlockParams}},matchExistingProgram:function(c){for(var h=0,m=this.context.environments.length;h<m;h++){var y=this.context.environments[h];if(y&&y.equals(c))return y}},programExpression:function(c){var h=this.environment.children[c],m=[h.index,"data",h.blockParams];return(this.useBlockParams||this.useDepths)&&m.push("blockParams"),this.useDepths&&m.push("depths"),"container.program("+m.join(", ")+")"},useRegister:function(c){this.registers[c]||(this.registers[c]=!0,this.registers.list.push(c))},push:function(c){return c instanceof p||(c=this.source.wrap(c)),this.inlineStack.push(c),c},pushStackLiteral:function(c){this.push(new p(c))},pushSource:function(c){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),c&&this.source.push(c)},replaceStack:function(c){var h=["("],m=void 0,y=void 0,v=void 0;if(!this.isInline())throw new o.default("replaceStack on non-inline");var w=this.popStack(!0);if(w instanceof p)m=[w.value],h=["(",m],v=!0;else{y=!0;var k=this.incrStack();h=["((",this.push(k)," = ",w,")"],m=this.topStack()}var _=c.call(this,m);v||this.popStack(),y&&this.stackSlot--,this.push(h.concat(_,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var c=this.inlineStack;this.inlineStack=[];for(var h=0,m=c.length;h<m;h++){var y=c[h];if(y instanceof p)this.compileStack.push(y);else{var v=this.incrStack();this.pushSource([v," = ",y,";"]),this.compileStack.push(v)}}},isInline:function(){return this.inlineStack.length},popStack:function(c){var h=this.isInline(),m=(h?this.inlineStack:this.compileStack).pop();if(!c&&m instanceof p)return m.value;if(!h){if(!this.stackSlot)throw new o.default("Invalid stack pop");this.stackSlot--}return m},topStack:function(){var c=this.isInline()?this.inlineStack:this.compileStack,h=c[c.length-1];return h instanceof p?h.value:h},contextName:function(c){return this.useDepths&&c?"depths["+c+"]":"depth"+c},quotedString:function(c){return this.source.quotedString(c)},objectLiteral:function(c){return this.source.objectLiteral(c)},aliasable:function(c){var h=this.aliases[c];return h?(h.referenceCount++,h):(h=this.aliases[c]=this.source.wrap(c),h.aliasable=!0,h.referenceCount=1,h)},setupHelper:function(c,h,m){var y=[],v=this.setupHelperArgs(h,c,y,m),w=this.nameLookup("helpers",h,"helper"),k=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:y,paramsInit:v,name:w,callParams:[k].concat(y)}},setupParams:function(c,h,m){var y={},v=[],w=[],k=[],_=!m,S=void 0;_&&(m=[]),y.name=this.quotedString(c),y.hash=this.popStack(),this.trackIds&&(y.hashIds=this.popStack()),this.stringParams&&(y.hashTypes=this.popStack(),y.hashContexts=this.popStack());var x=this.popStack(),L=this.popStack();(L||x)&&(y.fn=L||"container.noop",y.inverse=x||"container.noop");for(var I=h;I--;)S=this.popStack(),m[I]=S,this.trackIds&&(k[I]=this.popStack()),this.stringParams&&(w[I]=this.popStack(),v[I]=this.popStack());return _&&(y.args=this.source.generateArray(m)),this.trackIds&&(y.ids=this.source.generateArray(k)),this.stringParams&&(y.types=this.source.generateArray(w),y.contexts=this.source.generateArray(v)),this.options.data&&(y.data="data"),this.useBlockParams&&(y.blockParams="blockParams"),y},setupHelperArgs:function(c,h,m,y){var v=this.setupParams(c,h,m);return v.loc=JSON.stringify(this.source.currentLocation),v=this.objectLiteral(v),y?(this.useRegister("options"),m.push("options"),["options=",v]):m?(m.push(v),""):v}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),c=r.RESERVED_WORDS={},h=0,m=a.length;h<m;h++)c[a[h]]=!0}(),r.isValidJavaScriptVariableName=function(a){return!r.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)};function f(a,c,h,m){var y=c.popStack(),v=0,w=h.length;for(a&&w--;v<w;v++)y=c.nameLookup(y,h[v],m);return a?[c.aliasable("container.strict"),"(",y,", ",c.quotedString(h[v]),", ",JSON.stringify(c.source.currentLocation)," )"]:y}e.default=r,n.exports=e.default}(Ta,Ta.exports)),Ta.exports}var Mm;function eM(){return Mm||(Mm=1,function(n,e){e.__esModule=!0;function t(w){return w&&w.__esModule?w:{default:w}}var i=Fk(),s=t(i),o=X0(),u=t(o),d=jk(),l=Uk(),p=Jk(),r=t(p),f=Q0(),a=t(f),c=Y0(),h=t(c),m=s.default.create;function y(){var w=m();return w.compile=function(k,_){return l.compile(k,_,w)},w.precompile=function(k,_){return l.precompile(k,_,w)},w.AST=u.default,w.Compiler=l.Compiler,w.JavaScriptCompiler=r.default,w.Parser=d.parser,w.parse=d.parse,w.parseWithoutProcessing=d.parseWithoutProcessing,w}var v=y();v.create=y,h.default(v),v.Visitor=a.default,v.default=v,e.default=v,n.exports=e.default}(ua,ua.exports)),ua.exports}var tM=eM();const Ot=di(tM);var Fo={exports:{}};/**
|
|
23
|
+
* @license
|
|
24
|
+
* Lodash <https://lodash.com/>
|
|
25
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
26
|
+
* Released under MIT license <https://lodash.com/license>
|
|
27
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
28
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
29
|
+
*/var nM=Fo.exports,Em;function iM(){return Em||(Em=1,function(n,e){(function(){var t,i="4.17.21",s=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",d="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",p=500,r="__lodash_placeholder__",f=1,a=2,c=4,h=1,m=2,y=1,v=2,w=4,k=8,_=16,S=32,x=64,L=128,I=256,$=512,T=30,O="...",C=800,A=16,M=1,R=2,N=3,H=1/0,z=9007199254740991,Y=17976931348623157e292,K=NaN,re=4294967295,fe=re-1,U=re>>>1,Q=[["ary",L],["bind",y],["bindKey",v],["curry",k],["curryRight",_],["flip",$],["partial",S],["partialRight",x],["rearg",I]],ie="[object Arguments]",V="[object Array]",te="[object AsyncFunction]",ae="[object Boolean]",ge="[object Date]",ue="[object DOMException]",G="[object Error]",J="[object Function]",ye="[object GeneratorFunction]",Ae="[object Map]",Oe="[object Number]",Le="[object Null]",Be="[object Object]",mt="[object Promise]",Se="[object Proxy]",Mt="[object RegExp]",at="[object Set]",Qe="[object String]",ot="[object Symbol]",Dt="[object Undefined]",yt="[object WeakMap]",_e="[object WeakSet]",Te="[object ArrayBuffer]",$e="[object DataView]",ze="[object Float32Array]",q="[object Float64Array]",D="[object Int8Array]",F="[object Int16Array]",ne="[object Int32Array]",le="[object Uint8Array]",pe="[object Uint8ClampedArray]",we="[object Uint16Array]",je="[object Uint32Array]",ct=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,bt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lt=/&(?:amp|lt|gt|quot|#39);/g,er=/[&<>"']/g,Rn=RegExp(lt.source),ho=RegExp(er.source),Gl=/<%-([\s\S]+?)%>/g,ei=/<%([\s\S]+?)%>/g,_s=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,he=RegExp(oe.source),ve=/^\s+/,Ce=/\s/,Ye=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Et=/\{\n\/\* \[wrapped with (.+)\] \*/,wt=/,? & /,Lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ft=/[()=,{}\[\]\/\s]/,t1=/\\(\\)?/g,n1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fd=/\w*$/,i1=/^[-+]0x[0-9a-f]+$/i,r1=/^0b[01]+$/i,o1=/^\[object .+?Constructor\]$/,s1=/^0o[0-7]+$/i,a1=/^(?:0|[1-9]\d*)$/,l1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xs=/($^)/,c1=/['\n\r\u2028\u2029\\]/g,Ss="\\ud800-\\udfff",u1="\\u0300-\\u036f",h1="\\ufe20-\\ufe2f",f1="\\u20d0-\\u20ff",dd=u1+h1+f1,pd="\\u2700-\\u27bf",gd="a-z\\xdf-\\xf6\\xf8-\\xff",d1="\\xac\\xb1\\xd7\\xf7",p1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g1="\\u2000-\\u206f",m1=" \\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",md="A-Z\\xc0-\\xd6\\xd8-\\xde",yd="\\ufe0e\\ufe0f",vd=d1+p1+g1+m1,Kl="['’]",y1="["+Ss+"]",bd="["+vd+"]",As="["+dd+"]",wd="\\d+",v1="["+pd+"]",_d="["+gd+"]",xd="[^"+Ss+vd+wd+pd+gd+md+"]",Yl="\\ud83c[\\udffb-\\udfff]",b1="(?:"+As+"|"+Yl+")",Sd="[^"+Ss+"]",Xl="(?:\\ud83c[\\udde6-\\uddff]){2}",Ql="[\\ud800-\\udbff][\\udc00-\\udfff]",kr="["+md+"]",Ad="\\u200d",Cd="(?:"+_d+"|"+xd+")",w1="(?:"+kr+"|"+xd+")",kd="(?:"+Kl+"(?:d|ll|m|re|s|t|ve))?",Md="(?:"+Kl+"(?:D|LL|M|RE|S|T|VE))?",Ed=b1+"?",Ld="["+yd+"]?",_1="(?:"+Ad+"(?:"+[Sd,Xl,Ql].join("|")+")"+Ld+Ed+")*",x1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",S1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rd=Ld+Ed+_1,A1="(?:"+[v1,Xl,Ql].join("|")+")"+Rd,C1="(?:"+[Sd+As+"?",As,Xl,Ql,y1].join("|")+")",k1=RegExp(Kl,"g"),M1=RegExp(As,"g"),Zl=RegExp(Yl+"(?="+Yl+")|"+C1+Rd,"g"),E1=RegExp([kr+"?"+_d+"+"+kd+"(?="+[bd,kr,"$"].join("|")+")",w1+"+"+Md+"(?="+[bd,kr+Cd,"$"].join("|")+")",kr+"?"+Cd+"+"+kd,kr+"+"+Md,S1,x1,wd,A1].join("|"),"g"),L1=RegExp("["+Ad+Ss+dd+yd+"]"),R1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,T1=["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"],$1=-1,St={};St[ze]=St[q]=St[D]=St[F]=St[ne]=St[le]=St[pe]=St[we]=St[je]=!0,St[ie]=St[V]=St[Te]=St[ae]=St[$e]=St[ge]=St[G]=St[J]=St[Ae]=St[Oe]=St[Be]=St[Mt]=St[at]=St[Qe]=St[yt]=!1;var _t={};_t[ie]=_t[V]=_t[Te]=_t[$e]=_t[ae]=_t[ge]=_t[ze]=_t[q]=_t[D]=_t[F]=_t[ne]=_t[Ae]=_t[Oe]=_t[Be]=_t[Mt]=_t[at]=_t[Qe]=_t[ot]=_t[le]=_t[pe]=_t[we]=_t[je]=!0,_t[G]=_t[J]=_t[yt]=!1;var I1={À:"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"},O1={"&":"&","<":"<",">":">",'"':""","'":"'"},D1={"&":"&","<":"<",">":">",""":'"',"'":"'"},P1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},B1=parseFloat,N1=parseInt,Td=typeof qt=="object"&&qt&&qt.Object===Object&&qt,F1=typeof self=="object"&&self&&self.Object===Object&&self,Xt=Td||F1||Function("return this")(),Jl=e&&!e.nodeType&&e,tr=Jl&&!0&&n&&!n.nodeType&&n,$d=tr&&tr.exports===Jl,ec=$d&&Td.process,Tn=function(){try{var de=tr&&tr.require&&tr.require("util").types;return de||ec&&ec.binding&&ec.binding("util")}catch{}}(),Id=Tn&&Tn.isArrayBuffer,Od=Tn&&Tn.isDate,Dd=Tn&&Tn.isMap,Pd=Tn&&Tn.isRegExp,Bd=Tn&&Tn.isSet,Nd=Tn&&Tn.isTypedArray;function bn(de,xe,be){switch(be.length){case 0:return de.call(xe);case 1:return de.call(xe,be[0]);case 2:return de.call(xe,be[0],be[1]);case 3:return de.call(xe,be[0],be[1],be[2])}return de.apply(xe,be)}function W1(de,xe,be,De){for(var Ue=-1,ut=de==null?0:de.length;++Ue<ut;){var jt=de[Ue];xe(De,jt,be(jt),de)}return De}function $n(de,xe){for(var be=-1,De=de==null?0:de.length;++be<De&&xe(de[be],be,de)!==!1;);return de}function H1(de,xe){for(var be=de==null?0:de.length;be--&&xe(de[be],be,de)!==!1;);return de}function Fd(de,xe){for(var be=-1,De=de==null?0:de.length;++be<De;)if(!xe(de[be],be,de))return!1;return!0}function Di(de,xe){for(var be=-1,De=de==null?0:de.length,Ue=0,ut=[];++be<De;){var jt=de[be];xe(jt,be,de)&&(ut[Ue++]=jt)}return ut}function Cs(de,xe){var be=de==null?0:de.length;return!!be&&Mr(de,xe,0)>-1}function tc(de,xe,be){for(var De=-1,Ue=de==null?0:de.length;++De<Ue;)if(be(xe,de[De]))return!0;return!1}function Rt(de,xe){for(var be=-1,De=de==null?0:de.length,Ue=Array(De);++be<De;)Ue[be]=xe(de[be],be,de);return Ue}function Pi(de,xe){for(var be=-1,De=xe.length,Ue=de.length;++be<De;)de[Ue+be]=xe[be];return de}function nc(de,xe,be,De){var Ue=-1,ut=de==null?0:de.length;for(De&&ut&&(be=de[++Ue]);++Ue<ut;)be=xe(be,de[Ue],Ue,de);return be}function z1(de,xe,be,De){var Ue=de==null?0:de.length;for(De&&Ue&&(be=de[--Ue]);Ue--;)be=xe(be,de[Ue],Ue,de);return be}function ic(de,xe){for(var be=-1,De=de==null?0:de.length;++be<De;)if(xe(de[be],be,de))return!0;return!1}var j1=rc("length");function U1(de){return de.split("")}function V1(de){return de.match(Lt)||[]}function Wd(de,xe,be){var De;return be(de,function(Ue,ut,jt){if(xe(Ue,ut,jt))return De=ut,!1}),De}function ks(de,xe,be,De){for(var Ue=de.length,ut=be+(De?1:-1);De?ut--:++ut<Ue;)if(xe(de[ut],ut,de))return ut;return-1}function Mr(de,xe,be){return xe===xe?i_(de,xe,be):ks(de,Hd,be)}function q1(de,xe,be,De){for(var Ue=be-1,ut=de.length;++Ue<ut;)if(De(de[Ue],xe))return Ue;return-1}function Hd(de){return de!==de}function zd(de,xe){var be=de==null?0:de.length;return be?sc(de,xe)/be:K}function rc(de){return function(xe){return xe==null?t:xe[de]}}function oc(de){return function(xe){return de==null?t:de[xe]}}function jd(de,xe,be,De,Ue){return Ue(de,function(ut,jt,vt){be=De?(De=!1,ut):xe(be,ut,jt,vt)}),be}function G1(de,xe){var be=de.length;for(de.sort(xe);be--;)de[be]=de[be].value;return de}function sc(de,xe){for(var be,De=-1,Ue=de.length;++De<Ue;){var ut=xe(de[De]);ut!==t&&(be=be===t?ut:be+ut)}return be}function ac(de,xe){for(var be=-1,De=Array(de);++be<de;)De[be]=xe(be);return De}function K1(de,xe){return Rt(xe,function(be){return[be,de[be]]})}function Ud(de){return de&&de.slice(0,Kd(de)+1).replace(ve,"")}function wn(de){return function(xe){return de(xe)}}function lc(de,xe){return Rt(xe,function(be){return de[be]})}function fo(de,xe){return de.has(xe)}function Vd(de,xe){for(var be=-1,De=de.length;++be<De&&Mr(xe,de[be],0)>-1;);return be}function qd(de,xe){for(var be=de.length;be--&&Mr(xe,de[be],0)>-1;);return be}function Y1(de,xe){for(var be=de.length,De=0;be--;)de[be]===xe&&++De;return De}var X1=oc(I1),Q1=oc(O1);function Z1(de){return"\\"+P1[de]}function J1(de,xe){return de==null?t:de[xe]}function Er(de){return L1.test(de)}function e_(de){return R1.test(de)}function t_(de){for(var xe,be=[];!(xe=de.next()).done;)be.push(xe.value);return be}function cc(de){var xe=-1,be=Array(de.size);return de.forEach(function(De,Ue){be[++xe]=[Ue,De]}),be}function Gd(de,xe){return function(be){return de(xe(be))}}function Bi(de,xe){for(var be=-1,De=de.length,Ue=0,ut=[];++be<De;){var jt=de[be];(jt===xe||jt===r)&&(de[be]=r,ut[Ue++]=be)}return ut}function Ms(de){var xe=-1,be=Array(de.size);return de.forEach(function(De){be[++xe]=De}),be}function n_(de){var xe=-1,be=Array(de.size);return de.forEach(function(De){be[++xe]=[De,De]}),be}function i_(de,xe,be){for(var De=be-1,Ue=de.length;++De<Ue;)if(de[De]===xe)return De;return-1}function r_(de,xe,be){for(var De=be+1;De--;)if(de[De]===xe)return De;return De}function Lr(de){return Er(de)?s_(de):j1(de)}function Un(de){return Er(de)?a_(de):U1(de)}function Kd(de){for(var xe=de.length;xe--&&Ce.test(de.charAt(xe)););return xe}var o_=oc(D1);function s_(de){for(var xe=Zl.lastIndex=0;Zl.test(de);)++xe;return xe}function a_(de){return de.match(Zl)||[]}function l_(de){return de.match(E1)||[]}var c_=function de(xe){xe=xe==null?Xt:Rr.defaults(Xt.Object(),xe,Rr.pick(Xt,T1));var be=xe.Array,De=xe.Date,Ue=xe.Error,ut=xe.Function,jt=xe.Math,vt=xe.Object,uc=xe.RegExp,u_=xe.String,In=xe.TypeError,Es=be.prototype,h_=ut.prototype,Tr=vt.prototype,Ls=xe["__core-js_shared__"],Rs=h_.toString,dt=Tr.hasOwnProperty,f_=0,Yd=function(){var g=/[^.]+$/.exec(Ls&&Ls.keys&&Ls.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),Ts=Tr.toString,d_=Rs.call(vt),p_=Xt._,g_=uc("^"+Rs.call(dt).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$s=$d?xe.Buffer:t,Ni=xe.Symbol,Is=xe.Uint8Array,Xd=$s?$s.allocUnsafe:t,Os=Gd(vt.getPrototypeOf,vt),Qd=vt.create,Zd=Tr.propertyIsEnumerable,Ds=Es.splice,Jd=Ni?Ni.isConcatSpreadable:t,po=Ni?Ni.iterator:t,nr=Ni?Ni.toStringTag:t,Ps=function(){try{var g=ar(vt,"defineProperty");return g({},"",{}),g}catch{}}(),m_=xe.clearTimeout!==Xt.clearTimeout&&xe.clearTimeout,y_=De&&De.now!==Xt.Date.now&&De.now,v_=xe.setTimeout!==Xt.setTimeout&&xe.setTimeout,Bs=jt.ceil,Ns=jt.floor,hc=vt.getOwnPropertySymbols,b_=$s?$s.isBuffer:t,ep=xe.isFinite,w_=Es.join,__=Gd(vt.keys,vt),Ut=jt.max,en=jt.min,x_=De.now,S_=xe.parseInt,tp=jt.random,A_=Es.reverse,fc=ar(xe,"DataView"),go=ar(xe,"Map"),dc=ar(xe,"Promise"),$r=ar(xe,"Set"),mo=ar(xe,"WeakMap"),yo=ar(vt,"create"),Fs=mo&&new mo,Ir={},C_=lr(fc),k_=lr(go),M_=lr(dc),E_=lr($r),L_=lr(mo),Ws=Ni?Ni.prototype:t,vo=Ws?Ws.valueOf:t,np=Ws?Ws.toString:t;function Z(g){if(Pt(g)&&!Ve(g)&&!(g instanceof tt)){if(g instanceof On)return g;if(dt.call(g,"__wrapped__"))return ig(g)}return new On(g)}var Or=function(){function g(){}return function(b){if(!It(b))return{};if(Qd)return Qd(b);g.prototype=b;var E=new g;return g.prototype=t,E}}();function Hs(){}function On(g,b){this.__wrapped__=g,this.__actions__=[],this.__chain__=!!b,this.__index__=0,this.__values__=t}Z.templateSettings={escape:Gl,evaluate:ei,interpolate:_s,variable:"",imports:{_:Z}},Z.prototype=Hs.prototype,Z.prototype.constructor=Z,On.prototype=Or(Hs.prototype),On.prototype.constructor=On;function tt(g){this.__wrapped__=g,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function R_(){var g=new tt(this.__wrapped__);return g.__actions__=cn(this.__actions__),g.__dir__=this.__dir__,g.__filtered__=this.__filtered__,g.__iteratees__=cn(this.__iteratees__),g.__takeCount__=this.__takeCount__,g.__views__=cn(this.__views__),g}function T_(){if(this.__filtered__){var g=new tt(this);g.__dir__=-1,g.__filtered__=!0}else g=this.clone(),g.__dir__*=-1;return g}function $_(){var g=this.__wrapped__.value(),b=this.__dir__,E=Ve(g),P=b<0,j=E?g.length:0,ee=Ux(0,j,this.__views__),se=ee.start,ce=ee.end,me=ce-se,ke=P?ce:se-1,Me=this.__iteratees__,Ee=Me.length,Ie=0,Pe=en(me,this.__takeCount__);if(!E||!P&&j==me&&Pe==me)return kp(g,this.__actions__);var Fe=[];e:for(;me--&&Ie<Pe;){ke+=b;for(var Ke=-1,We=g[ke];++Ke<Ee;){var Ze=Me[Ke],it=Ze.iteratee,Sn=Ze.type,ln=it(We);if(Sn==R)We=ln;else if(!ln){if(Sn==M)continue e;break e}}Fe[Ie++]=We}return Fe}tt.prototype=Or(Hs.prototype),tt.prototype.constructor=tt;function ir(g){var b=-1,E=g==null?0:g.length;for(this.clear();++b<E;){var P=g[b];this.set(P[0],P[1])}}function I_(){this.__data__=yo?yo(null):{},this.size=0}function O_(g){var b=this.has(g)&&delete this.__data__[g];return this.size-=b?1:0,b}function D_(g){var b=this.__data__;if(yo){var E=b[g];return E===l?t:E}return dt.call(b,g)?b[g]:t}function P_(g){var b=this.__data__;return yo?b[g]!==t:dt.call(b,g)}function B_(g,b){var E=this.__data__;return this.size+=this.has(g)?0:1,E[g]=yo&&b===t?l:b,this}ir.prototype.clear=I_,ir.prototype.delete=O_,ir.prototype.get=D_,ir.prototype.has=P_,ir.prototype.set=B_;function pi(g){var b=-1,E=g==null?0:g.length;for(this.clear();++b<E;){var P=g[b];this.set(P[0],P[1])}}function N_(){this.__data__=[],this.size=0}function F_(g){var b=this.__data__,E=zs(b,g);if(E<0)return!1;var P=b.length-1;return E==P?b.pop():Ds.call(b,E,1),--this.size,!0}function W_(g){var b=this.__data__,E=zs(b,g);return E<0?t:b[E][1]}function H_(g){return zs(this.__data__,g)>-1}function z_(g,b){var E=this.__data__,P=zs(E,g);return P<0?(++this.size,E.push([g,b])):E[P][1]=b,this}pi.prototype.clear=N_,pi.prototype.delete=F_,pi.prototype.get=W_,pi.prototype.has=H_,pi.prototype.set=z_;function gi(g){var b=-1,E=g==null?0:g.length;for(this.clear();++b<E;){var P=g[b];this.set(P[0],P[1])}}function j_(){this.size=0,this.__data__={hash:new ir,map:new(go||pi),string:new ir}}function U_(g){var b=ea(this,g).delete(g);return this.size-=b?1:0,b}function V_(g){return ea(this,g).get(g)}function q_(g){return ea(this,g).has(g)}function G_(g,b){var E=ea(this,g),P=E.size;return E.set(g,b),this.size+=E.size==P?0:1,this}gi.prototype.clear=j_,gi.prototype.delete=U_,gi.prototype.get=V_,gi.prototype.has=q_,gi.prototype.set=G_;function rr(g){var b=-1,E=g==null?0:g.length;for(this.__data__=new gi;++b<E;)this.add(g[b])}function K_(g){return this.__data__.set(g,l),this}function Y_(g){return this.__data__.has(g)}rr.prototype.add=rr.prototype.push=K_,rr.prototype.has=Y_;function Vn(g){var b=this.__data__=new pi(g);this.size=b.size}function X_(){this.__data__=new pi,this.size=0}function Q_(g){var b=this.__data__,E=b.delete(g);return this.size=b.size,E}function Z_(g){return this.__data__.get(g)}function J_(g){return this.__data__.has(g)}function ex(g,b){var E=this.__data__;if(E instanceof pi){var P=E.__data__;if(!go||P.length<s-1)return P.push([g,b]),this.size=++E.size,this;E=this.__data__=new gi(P)}return E.set(g,b),this.size=E.size,this}Vn.prototype.clear=X_,Vn.prototype.delete=Q_,Vn.prototype.get=Z_,Vn.prototype.has=J_,Vn.prototype.set=ex;function ip(g,b){var E=Ve(g),P=!E&&cr(g),j=!E&&!P&&ji(g),ee=!E&&!P&&!j&&Nr(g),se=E||P||j||ee,ce=se?ac(g.length,u_):[],me=ce.length;for(var ke in g)(b||dt.call(g,ke))&&!(se&&(ke=="length"||j&&(ke=="offset"||ke=="parent")||ee&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||bi(ke,me)))&&ce.push(ke);return ce}function rp(g){var b=g.length;return b?g[Ac(0,b-1)]:t}function tx(g,b){return ta(cn(g),or(b,0,g.length))}function nx(g){return ta(cn(g))}function pc(g,b,E){(E!==t&&!qn(g[b],E)||E===t&&!(b in g))&&mi(g,b,E)}function bo(g,b,E){var P=g[b];(!(dt.call(g,b)&&qn(P,E))||E===t&&!(b in g))&&mi(g,b,E)}function zs(g,b){for(var E=g.length;E--;)if(qn(g[E][0],b))return E;return-1}function ix(g,b,E,P){return Fi(g,function(j,ee,se){b(P,j,E(j),se)}),P}function op(g,b){return g&&ni(b,Kt(b),g)}function rx(g,b){return g&&ni(b,hn(b),g)}function mi(g,b,E){b=="__proto__"&&Ps?Ps(g,b,{configurable:!0,enumerable:!0,value:E,writable:!0}):g[b]=E}function gc(g,b){for(var E=-1,P=b.length,j=be(P),ee=g==null;++E<P;)j[E]=ee?t:Yc(g,b[E]);return j}function or(g,b,E){return g===g&&(E!==t&&(g=g<=E?g:E),b!==t&&(g=g>=b?g:b)),g}function Dn(g,b,E,P,j,ee){var se,ce=b&f,me=b&a,ke=b&c;if(E&&(se=j?E(g,P,j,ee):E(g)),se!==t)return se;if(!It(g))return g;var Me=Ve(g);if(Me){if(se=qx(g),!ce)return cn(g,se)}else{var Ee=tn(g),Ie=Ee==J||Ee==ye;if(ji(g))return Lp(g,ce);if(Ee==Be||Ee==ie||Ie&&!j){if(se=me||Ie?{}:Kp(g),!ce)return me?Dx(g,rx(se,g)):Ox(g,op(se,g))}else{if(!_t[Ee])return j?g:{};se=Gx(g,Ee,ce)}}ee||(ee=new Vn);var Pe=ee.get(g);if(Pe)return Pe;ee.set(g,se),Sg(g)?g.forEach(function(We){se.add(Dn(We,b,E,We,g,ee))}):_g(g)&&g.forEach(function(We,Ze){se.set(Ze,Dn(We,b,E,Ze,g,ee))});var Fe=ke?me?Dc:Oc:me?hn:Kt,Ke=Me?t:Fe(g);return $n(Ke||g,function(We,Ze){Ke&&(Ze=We,We=g[Ze]),bo(se,Ze,Dn(We,b,E,Ze,g,ee))}),se}function ox(g){var b=Kt(g);return function(E){return sp(E,g,b)}}function sp(g,b,E){var P=E.length;if(g==null)return!P;for(g=vt(g);P--;){var j=E[P],ee=b[j],se=g[j];if(se===t&&!(j in g)||!ee(se))return!1}return!0}function ap(g,b,E){if(typeof g!="function")throw new In(u);return ko(function(){g.apply(t,E)},b)}function wo(g,b,E,P){var j=-1,ee=Cs,se=!0,ce=g.length,me=[],ke=b.length;if(!ce)return me;E&&(b=Rt(b,wn(E))),P?(ee=tc,se=!1):b.length>=s&&(ee=fo,se=!1,b=new rr(b));e:for(;++j<ce;){var Me=g[j],Ee=E==null?Me:E(Me);if(Me=P||Me!==0?Me:0,se&&Ee===Ee){for(var Ie=ke;Ie--;)if(b[Ie]===Ee)continue e;me.push(Me)}else ee(b,Ee,P)||me.push(Me)}return me}var Fi=Op(ti),lp=Op(yc,!0);function sx(g,b){var E=!0;return Fi(g,function(P,j,ee){return E=!!b(P,j,ee),E}),E}function js(g,b,E){for(var P=-1,j=g.length;++P<j;){var ee=g[P],se=b(ee);if(se!=null&&(ce===t?se===se&&!xn(se):E(se,ce)))var ce=se,me=ee}return me}function ax(g,b,E,P){var j=g.length;for(E=Ge(E),E<0&&(E=-E>j?0:j+E),P=P===t||P>j?j:Ge(P),P<0&&(P+=j),P=E>P?0:Cg(P);E<P;)g[E++]=b;return g}function cp(g,b){var E=[];return Fi(g,function(P,j,ee){b(P,j,ee)&&E.push(P)}),E}function Qt(g,b,E,P,j){var ee=-1,se=g.length;for(E||(E=Yx),j||(j=[]);++ee<se;){var ce=g[ee];b>0&&E(ce)?b>1?Qt(ce,b-1,E,P,j):Pi(j,ce):P||(j[j.length]=ce)}return j}var mc=Dp(),up=Dp(!0);function ti(g,b){return g&&mc(g,b,Kt)}function yc(g,b){return g&&up(g,b,Kt)}function Us(g,b){return Di(b,function(E){return wi(g[E])})}function sr(g,b){b=Hi(b,g);for(var E=0,P=b.length;g!=null&&E<P;)g=g[ii(b[E++])];return E&&E==P?g:t}function hp(g,b,E){var P=b(g);return Ve(g)?P:Pi(P,E(g))}function sn(g){return g==null?g===t?Dt:Le:nr&&nr in vt(g)?jx(g):nS(g)}function vc(g,b){return g>b}function lx(g,b){return g!=null&&dt.call(g,b)}function cx(g,b){return g!=null&&b in vt(g)}function ux(g,b,E){return g>=en(b,E)&&g<Ut(b,E)}function bc(g,b,E){for(var P=E?tc:Cs,j=g[0].length,ee=g.length,se=ee,ce=be(ee),me=1/0,ke=[];se--;){var Me=g[se];se&&b&&(Me=Rt(Me,wn(b))),me=en(Me.length,me),ce[se]=!E&&(b||j>=120&&Me.length>=120)?new rr(se&&Me):t}Me=g[0];var Ee=-1,Ie=ce[0];e:for(;++Ee<j&&ke.length<me;){var Pe=Me[Ee],Fe=b?b(Pe):Pe;if(Pe=E||Pe!==0?Pe:0,!(Ie?fo(Ie,Fe):P(ke,Fe,E))){for(se=ee;--se;){var Ke=ce[se];if(!(Ke?fo(Ke,Fe):P(g[se],Fe,E)))continue e}Ie&&Ie.push(Fe),ke.push(Pe)}}return ke}function hx(g,b,E,P){return ti(g,function(j,ee,se){b(P,E(j),ee,se)}),P}function _o(g,b,E){b=Hi(b,g),g=Zp(g,b);var P=g==null?g:g[ii(Bn(b))];return P==null?t:bn(P,g,E)}function fp(g){return Pt(g)&&sn(g)==ie}function fx(g){return Pt(g)&&sn(g)==Te}function dx(g){return Pt(g)&&sn(g)==ge}function xo(g,b,E,P,j){return g===b?!0:g==null||b==null||!Pt(g)&&!Pt(b)?g!==g&&b!==b:px(g,b,E,P,xo,j)}function px(g,b,E,P,j,ee){var se=Ve(g),ce=Ve(b),me=se?V:tn(g),ke=ce?V:tn(b);me=me==ie?Be:me,ke=ke==ie?Be:ke;var Me=me==Be,Ee=ke==Be,Ie=me==ke;if(Ie&&ji(g)){if(!ji(b))return!1;se=!0,Me=!1}if(Ie&&!Me)return ee||(ee=new Vn),se||Nr(g)?Vp(g,b,E,P,j,ee):Hx(g,b,me,E,P,j,ee);if(!(E&h)){var Pe=Me&&dt.call(g,"__wrapped__"),Fe=Ee&&dt.call(b,"__wrapped__");if(Pe||Fe){var Ke=Pe?g.value():g,We=Fe?b.value():b;return ee||(ee=new Vn),j(Ke,We,E,P,ee)}}return Ie?(ee||(ee=new Vn),zx(g,b,E,P,j,ee)):!1}function gx(g){return Pt(g)&&tn(g)==Ae}function wc(g,b,E,P){var j=E.length,ee=j,se=!P;if(g==null)return!ee;for(g=vt(g);j--;){var ce=E[j];if(se&&ce[2]?ce[1]!==g[ce[0]]:!(ce[0]in g))return!1}for(;++j<ee;){ce=E[j];var me=ce[0],ke=g[me],Me=ce[1];if(se&&ce[2]){if(ke===t&&!(me in g))return!1}else{var Ee=new Vn;if(P)var Ie=P(ke,Me,me,g,b,Ee);if(!(Ie===t?xo(Me,ke,h|m,P,Ee):Ie))return!1}}return!0}function dp(g){if(!It(g)||Qx(g))return!1;var b=wi(g)?g_:o1;return b.test(lr(g))}function mx(g){return Pt(g)&&sn(g)==Mt}function yx(g){return Pt(g)&&tn(g)==at}function vx(g){return Pt(g)&&aa(g.length)&&!!St[sn(g)]}function pp(g){return typeof g=="function"?g:g==null?fn:typeof g=="object"?Ve(g)?yp(g[0],g[1]):mp(g):Pg(g)}function _c(g){if(!Co(g))return __(g);var b=[];for(var E in vt(g))dt.call(g,E)&&E!="constructor"&&b.push(E);return b}function bx(g){if(!It(g))return tS(g);var b=Co(g),E=[];for(var P in g)P=="constructor"&&(b||!dt.call(g,P))||E.push(P);return E}function xc(g,b){return g<b}function gp(g,b){var E=-1,P=un(g)?be(g.length):[];return Fi(g,function(j,ee,se){P[++E]=b(j,ee,se)}),P}function mp(g){var b=Bc(g);return b.length==1&&b[0][2]?Xp(b[0][0],b[0][1]):function(E){return E===g||wc(E,g,b)}}function yp(g,b){return Fc(g)&&Yp(b)?Xp(ii(g),b):function(E){var P=Yc(E,g);return P===t&&P===b?Xc(E,g):xo(b,P,h|m)}}function Vs(g,b,E,P,j){g!==b&&mc(b,function(ee,se){if(j||(j=new Vn),It(ee))wx(g,b,se,E,Vs,P,j);else{var ce=P?P(Hc(g,se),ee,se+"",g,b,j):t;ce===t&&(ce=ee),pc(g,se,ce)}},hn)}function wx(g,b,E,P,j,ee,se){var ce=Hc(g,E),me=Hc(b,E),ke=se.get(me);if(ke){pc(g,E,ke);return}var Me=ee?ee(ce,me,E+"",g,b,se):t,Ee=Me===t;if(Ee){var Ie=Ve(me),Pe=!Ie&&ji(me),Fe=!Ie&&!Pe&&Nr(me);Me=me,Ie||Pe||Fe?Ve(ce)?Me=ce:Nt(ce)?Me=cn(ce):Pe?(Ee=!1,Me=Lp(me,!0)):Fe?(Ee=!1,Me=Rp(me,!0)):Me=[]:Mo(me)||cr(me)?(Me=ce,cr(ce)?Me=kg(ce):(!It(ce)||wi(ce))&&(Me=Kp(me))):Ee=!1}Ee&&(se.set(me,Me),j(Me,me,P,ee,se),se.delete(me)),pc(g,E,Me)}function vp(g,b){var E=g.length;if(E)return b+=b<0?E:0,bi(b,E)?g[b]:t}function bp(g,b,E){b.length?b=Rt(b,function(ee){return Ve(ee)?function(se){return sr(se,ee.length===1?ee[0]:ee)}:ee}):b=[fn];var P=-1;b=Rt(b,wn(Ne()));var j=gp(g,function(ee,se,ce){var me=Rt(b,function(ke){return ke(ee)});return{criteria:me,index:++P,value:ee}});return G1(j,function(ee,se){return Ix(ee,se,E)})}function _x(g,b){return wp(g,b,function(E,P){return Xc(g,P)})}function wp(g,b,E){for(var P=-1,j=b.length,ee={};++P<j;){var se=b[P],ce=sr(g,se);E(ce,se)&&So(ee,Hi(se,g),ce)}return ee}function xx(g){return function(b){return sr(b,g)}}function Sc(g,b,E,P){var j=P?q1:Mr,ee=-1,se=b.length,ce=g;for(g===b&&(b=cn(b)),E&&(ce=Rt(g,wn(E)));++ee<se;)for(var me=0,ke=b[ee],Me=E?E(ke):ke;(me=j(ce,Me,me,P))>-1;)ce!==g&&Ds.call(ce,me,1),Ds.call(g,me,1);return g}function _p(g,b){for(var E=g?b.length:0,P=E-1;E--;){var j=b[E];if(E==P||j!==ee){var ee=j;bi(j)?Ds.call(g,j,1):Mc(g,j)}}return g}function Ac(g,b){return g+Ns(tp()*(b-g+1))}function Sx(g,b,E,P){for(var j=-1,ee=Ut(Bs((b-g)/(E||1)),0),se=be(ee);ee--;)se[P?ee:++j]=g,g+=E;return se}function Cc(g,b){var E="";if(!g||b<1||b>z)return E;do b%2&&(E+=g),b=Ns(b/2),b&&(g+=g);while(b);return E}function Xe(g,b){return zc(Qp(g,b,fn),g+"")}function Ax(g){return rp(Fr(g))}function Cx(g,b){var E=Fr(g);return ta(E,or(b,0,E.length))}function So(g,b,E,P){if(!It(g))return g;b=Hi(b,g);for(var j=-1,ee=b.length,se=ee-1,ce=g;ce!=null&&++j<ee;){var me=ii(b[j]),ke=E;if(me==="__proto__"||me==="constructor"||me==="prototype")return g;if(j!=se){var Me=ce[me];ke=P?P(Me,me,ce):t,ke===t&&(ke=It(Me)?Me:bi(b[j+1])?[]:{})}bo(ce,me,ke),ce=ce[me]}return g}var xp=Fs?function(g,b){return Fs.set(g,b),g}:fn,kx=Ps?function(g,b){return Ps(g,"toString",{configurable:!0,enumerable:!1,value:Zc(b),writable:!0})}:fn;function Mx(g){return ta(Fr(g))}function Pn(g,b,E){var P=-1,j=g.length;b<0&&(b=-b>j?0:j+b),E=E>j?j:E,E<0&&(E+=j),j=b>E?0:E-b>>>0,b>>>=0;for(var ee=be(j);++P<j;)ee[P]=g[P+b];return ee}function Ex(g,b){var E;return Fi(g,function(P,j,ee){return E=b(P,j,ee),!E}),!!E}function qs(g,b,E){var P=0,j=g==null?P:g.length;if(typeof b=="number"&&b===b&&j<=U){for(;P<j;){var ee=P+j>>>1,se=g[ee];se!==null&&!xn(se)&&(E?se<=b:se<b)?P=ee+1:j=ee}return j}return kc(g,b,fn,E)}function kc(g,b,E,P){var j=0,ee=g==null?0:g.length;if(ee===0)return 0;b=E(b);for(var se=b!==b,ce=b===null,me=xn(b),ke=b===t;j<ee;){var Me=Ns((j+ee)/2),Ee=E(g[Me]),Ie=Ee!==t,Pe=Ee===null,Fe=Ee===Ee,Ke=xn(Ee);if(se)var We=P||Fe;else ke?We=Fe&&(P||Ie):ce?We=Fe&&Ie&&(P||!Pe):me?We=Fe&&Ie&&!Pe&&(P||!Ke):Pe||Ke?We=!1:We=P?Ee<=b:Ee<b;We?j=Me+1:ee=Me}return en(ee,fe)}function Sp(g,b){for(var E=-1,P=g.length,j=0,ee=[];++E<P;){var se=g[E],ce=b?b(se):se;if(!E||!qn(ce,me)){var me=ce;ee[j++]=se===0?0:se}}return ee}function Ap(g){return typeof g=="number"?g:xn(g)?K:+g}function _n(g){if(typeof g=="string")return g;if(Ve(g))return Rt(g,_n)+"";if(xn(g))return np?np.call(g):"";var b=g+"";return b=="0"&&1/g==-1/0?"-0":b}function Wi(g,b,E){var P=-1,j=Cs,ee=g.length,se=!0,ce=[],me=ce;if(E)se=!1,j=tc;else if(ee>=s){var ke=b?null:Fx(g);if(ke)return Ms(ke);se=!1,j=fo,me=new rr}else me=b?[]:ce;e:for(;++P<ee;){var Me=g[P],Ee=b?b(Me):Me;if(Me=E||Me!==0?Me:0,se&&Ee===Ee){for(var Ie=me.length;Ie--;)if(me[Ie]===Ee)continue e;b&&me.push(Ee),ce.push(Me)}else j(me,Ee,E)||(me!==ce&&me.push(Ee),ce.push(Me))}return ce}function Mc(g,b){return b=Hi(b,g),g=Zp(g,b),g==null||delete g[ii(Bn(b))]}function Cp(g,b,E,P){return So(g,b,E(sr(g,b)),P)}function Gs(g,b,E,P){for(var j=g.length,ee=P?j:-1;(P?ee--:++ee<j)&&b(g[ee],ee,g););return E?Pn(g,P?0:ee,P?ee+1:j):Pn(g,P?ee+1:0,P?j:ee)}function kp(g,b){var E=g;return E instanceof tt&&(E=E.value()),nc(b,function(P,j){return j.func.apply(j.thisArg,Pi([P],j.args))},E)}function Ec(g,b,E){var P=g.length;if(P<2)return P?Wi(g[0]):[];for(var j=-1,ee=be(P);++j<P;)for(var se=g[j],ce=-1;++ce<P;)ce!=j&&(ee[j]=wo(ee[j]||se,g[ce],b,E));return Wi(Qt(ee,1),b,E)}function Mp(g,b,E){for(var P=-1,j=g.length,ee=b.length,se={};++P<j;){var ce=P<ee?b[P]:t;E(se,g[P],ce)}return se}function Lc(g){return Nt(g)?g:[]}function Rc(g){return typeof g=="function"?g:fn}function Hi(g,b){return Ve(g)?g:Fc(g,b)?[g]:ng(ht(g))}var Lx=Xe;function zi(g,b,E){var P=g.length;return E=E===t?P:E,!b&&E>=P?g:Pn(g,b,E)}var Ep=m_||function(g){return Xt.clearTimeout(g)};function Lp(g,b){if(b)return g.slice();var E=g.length,P=Xd?Xd(E):new g.constructor(E);return g.copy(P),P}function Tc(g){var b=new g.constructor(g.byteLength);return new Is(b).set(new Is(g)),b}function Rx(g,b){var E=b?Tc(g.buffer):g.buffer;return new g.constructor(E,g.byteOffset,g.byteLength)}function Tx(g){var b=new g.constructor(g.source,fd.exec(g));return b.lastIndex=g.lastIndex,b}function $x(g){return vo?vt(vo.call(g)):{}}function Rp(g,b){var E=b?Tc(g.buffer):g.buffer;return new g.constructor(E,g.byteOffset,g.length)}function Tp(g,b){if(g!==b){var E=g!==t,P=g===null,j=g===g,ee=xn(g),se=b!==t,ce=b===null,me=b===b,ke=xn(b);if(!ce&&!ke&&!ee&&g>b||ee&&se&&me&&!ce&&!ke||P&&se&&me||!E&&me||!j)return 1;if(!P&&!ee&&!ke&&g<b||ke&&E&&j&&!P&&!ee||ce&&E&&j||!se&&j||!me)return-1}return 0}function Ix(g,b,E){for(var P=-1,j=g.criteria,ee=b.criteria,se=j.length,ce=E.length;++P<se;){var me=Tp(j[P],ee[P]);if(me){if(P>=ce)return me;var ke=E[P];return me*(ke=="desc"?-1:1)}}return g.index-b.index}function $p(g,b,E,P){for(var j=-1,ee=g.length,se=E.length,ce=-1,me=b.length,ke=Ut(ee-se,0),Me=be(me+ke),Ee=!P;++ce<me;)Me[ce]=b[ce];for(;++j<se;)(Ee||j<ee)&&(Me[E[j]]=g[j]);for(;ke--;)Me[ce++]=g[j++];return Me}function Ip(g,b,E,P){for(var j=-1,ee=g.length,se=-1,ce=E.length,me=-1,ke=b.length,Me=Ut(ee-ce,0),Ee=be(Me+ke),Ie=!P;++j<Me;)Ee[j]=g[j];for(var Pe=j;++me<ke;)Ee[Pe+me]=b[me];for(;++se<ce;)(Ie||j<ee)&&(Ee[Pe+E[se]]=g[j++]);return Ee}function cn(g,b){var E=-1,P=g.length;for(b||(b=be(P));++E<P;)b[E]=g[E];return b}function ni(g,b,E,P){var j=!E;E||(E={});for(var ee=-1,se=b.length;++ee<se;){var ce=b[ee],me=P?P(E[ce],g[ce],ce,E,g):t;me===t&&(me=g[ce]),j?mi(E,ce,me):bo(E,ce,me)}return E}function Ox(g,b){return ni(g,Nc(g),b)}function Dx(g,b){return ni(g,qp(g),b)}function Ks(g,b){return function(E,P){var j=Ve(E)?W1:ix,ee=b?b():{};return j(E,g,Ne(P,2),ee)}}function Dr(g){return Xe(function(b,E){var P=-1,j=E.length,ee=j>1?E[j-1]:t,se=j>2?E[2]:t;for(ee=g.length>3&&typeof ee=="function"?(j--,ee):t,se&&an(E[0],E[1],se)&&(ee=j<3?t:ee,j=1),b=vt(b);++P<j;){var ce=E[P];ce&&g(b,ce,P,ee)}return b})}function Op(g,b){return function(E,P){if(E==null)return E;if(!un(E))return g(E,P);for(var j=E.length,ee=b?j:-1,se=vt(E);(b?ee--:++ee<j)&&P(se[ee],ee,se)!==!1;);return E}}function Dp(g){return function(b,E,P){for(var j=-1,ee=vt(b),se=P(b),ce=se.length;ce--;){var me=se[g?ce:++j];if(E(ee[me],me,ee)===!1)break}return b}}function Px(g,b,E){var P=b&y,j=Ao(g);function ee(){var se=this&&this!==Xt&&this instanceof ee?j:g;return se.apply(P?E:this,arguments)}return ee}function Pp(g){return function(b){b=ht(b);var E=Er(b)?Un(b):t,P=E?E[0]:b.charAt(0),j=E?zi(E,1).join(""):b.slice(1);return P[g]()+j}}function Pr(g){return function(b){return nc(Og(Ig(b).replace(k1,"")),g,"")}}function Ao(g){return function(){var b=arguments;switch(b.length){case 0:return new g;case 1:return new g(b[0]);case 2:return new g(b[0],b[1]);case 3:return new g(b[0],b[1],b[2]);case 4:return new g(b[0],b[1],b[2],b[3]);case 5:return new g(b[0],b[1],b[2],b[3],b[4]);case 6:return new g(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new g(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}var E=Or(g.prototype),P=g.apply(E,b);return It(P)?P:E}}function Bx(g,b,E){var P=Ao(g);function j(){for(var ee=arguments.length,se=be(ee),ce=ee,me=Br(j);ce--;)se[ce]=arguments[ce];var ke=ee<3&&se[0]!==me&&se[ee-1]!==me?[]:Bi(se,me);if(ee-=ke.length,ee<E)return Hp(g,b,Ys,j.placeholder,t,se,ke,t,t,E-ee);var Me=this&&this!==Xt&&this instanceof j?P:g;return bn(Me,this,se)}return j}function Bp(g){return function(b,E,P){var j=vt(b);if(!un(b)){var ee=Ne(E,3);b=Kt(b),E=function(ce){return ee(j[ce],ce,j)}}var se=g(b,E,P);return se>-1?j[ee?b[se]:se]:t}}function Np(g){return vi(function(b){var E=b.length,P=E,j=On.prototype.thru;for(g&&b.reverse();P--;){var ee=b[P];if(typeof ee!="function")throw new In(u);if(j&&!se&&Js(ee)=="wrapper")var se=new On([],!0)}for(P=se?P:E;++P<E;){ee=b[P];var ce=Js(ee),me=ce=="wrapper"?Pc(ee):t;me&&Wc(me[0])&&me[1]==(L|k|S|I)&&!me[4].length&&me[9]==1?se=se[Js(me[0])].apply(se,me[3]):se=ee.length==1&&Wc(ee)?se[ce]():se.thru(ee)}return function(){var ke=arguments,Me=ke[0];if(se&&ke.length==1&&Ve(Me))return se.plant(Me).value();for(var Ee=0,Ie=E?b[Ee].apply(this,ke):Me;++Ee<E;)Ie=b[Ee].call(this,Ie);return Ie}})}function Ys(g,b,E,P,j,ee,se,ce,me,ke){var Me=b&L,Ee=b&y,Ie=b&v,Pe=b&(k|_),Fe=b&$,Ke=Ie?t:Ao(g);function We(){for(var Ze=arguments.length,it=be(Ze),Sn=Ze;Sn--;)it[Sn]=arguments[Sn];if(Pe)var ln=Br(We),An=Y1(it,ln);if(P&&(it=$p(it,P,j,Pe)),ee&&(it=Ip(it,ee,se,Pe)),Ze-=An,Pe&&Ze<ke){var Ft=Bi(it,ln);return Hp(g,b,Ys,We.placeholder,E,it,Ft,ce,me,ke-Ze)}var Gn=Ee?E:this,xi=Ie?Gn[g]:g;return Ze=it.length,ce?it=iS(it,ce):Fe&&Ze>1&&it.reverse(),Me&&me<Ze&&(it.length=me),this&&this!==Xt&&this instanceof We&&(xi=Ke||Ao(xi)),xi.apply(Gn,it)}return We}function Fp(g,b){return function(E,P){return hx(E,g,b(P),{})}}function Xs(g,b){return function(E,P){var j;if(E===t&&P===t)return b;if(E!==t&&(j=E),P!==t){if(j===t)return P;typeof E=="string"||typeof P=="string"?(E=_n(E),P=_n(P)):(E=Ap(E),P=Ap(P)),j=g(E,P)}return j}}function $c(g){return vi(function(b){return b=Rt(b,wn(Ne())),Xe(function(E){var P=this;return g(b,function(j){return bn(j,P,E)})})})}function Qs(g,b){b=b===t?" ":_n(b);var E=b.length;if(E<2)return E?Cc(b,g):b;var P=Cc(b,Bs(g/Lr(b)));return Er(b)?zi(Un(P),0,g).join(""):P.slice(0,g)}function Nx(g,b,E,P){var j=b&y,ee=Ao(g);function se(){for(var ce=-1,me=arguments.length,ke=-1,Me=P.length,Ee=be(Me+me),Ie=this&&this!==Xt&&this instanceof se?ee:g;++ke<Me;)Ee[ke]=P[ke];for(;me--;)Ee[ke++]=arguments[++ce];return bn(Ie,j?E:this,Ee)}return se}function Wp(g){return function(b,E,P){return P&&typeof P!="number"&&an(b,E,P)&&(E=P=t),b=_i(b),E===t?(E=b,b=0):E=_i(E),P=P===t?b<E?1:-1:_i(P),Sx(b,E,P,g)}}function Zs(g){return function(b,E){return typeof b=="string"&&typeof E=="string"||(b=Nn(b),E=Nn(E)),g(b,E)}}function Hp(g,b,E,P,j,ee,se,ce,me,ke){var Me=b&k,Ee=Me?se:t,Ie=Me?t:se,Pe=Me?ee:t,Fe=Me?t:ee;b|=Me?S:x,b&=~(Me?x:S),b&w||(b&=-4);var Ke=[g,b,j,Pe,Ee,Fe,Ie,ce,me,ke],We=E.apply(t,Ke);return Wc(g)&&Jp(We,Ke),We.placeholder=P,eg(We,g,b)}function Ic(g){var b=jt[g];return function(E,P){if(E=Nn(E),P=P==null?0:en(Ge(P),292),P&&ep(E)){var j=(ht(E)+"e").split("e"),ee=b(j[0]+"e"+(+j[1]+P));return j=(ht(ee)+"e").split("e"),+(j[0]+"e"+(+j[1]-P))}return b(E)}}var Fx=$r&&1/Ms(new $r([,-0]))[1]==H?function(g){return new $r(g)}:tu;function zp(g){return function(b){var E=tn(b);return E==Ae?cc(b):E==at?n_(b):K1(b,g(b))}}function yi(g,b,E,P,j,ee,se,ce){var me=b&v;if(!me&&typeof g!="function")throw new In(u);var ke=P?P.length:0;if(ke||(b&=-97,P=j=t),se=se===t?se:Ut(Ge(se),0),ce=ce===t?ce:Ge(ce),ke-=j?j.length:0,b&x){var Me=P,Ee=j;P=j=t}var Ie=me?t:Pc(g),Pe=[g,b,E,P,j,Me,Ee,ee,se,ce];if(Ie&&eS(Pe,Ie),g=Pe[0],b=Pe[1],E=Pe[2],P=Pe[3],j=Pe[4],ce=Pe[9]=Pe[9]===t?me?0:g.length:Ut(Pe[9]-ke,0),!ce&&b&(k|_)&&(b&=-25),!b||b==y)var Fe=Px(g,b,E);else b==k||b==_?Fe=Bx(g,b,ce):(b==S||b==(y|S))&&!j.length?Fe=Nx(g,b,E,P):Fe=Ys.apply(t,Pe);var Ke=Ie?xp:Jp;return eg(Ke(Fe,Pe),g,b)}function jp(g,b,E,P){return g===t||qn(g,Tr[E])&&!dt.call(P,E)?b:g}function Up(g,b,E,P,j,ee){return It(g)&&It(b)&&(ee.set(b,g),Vs(g,b,t,Up,ee),ee.delete(b)),g}function Wx(g){return Mo(g)?t:g}function Vp(g,b,E,P,j,ee){var se=E&h,ce=g.length,me=b.length;if(ce!=me&&!(se&&me>ce))return!1;var ke=ee.get(g),Me=ee.get(b);if(ke&&Me)return ke==b&&Me==g;var Ee=-1,Ie=!0,Pe=E&m?new rr:t;for(ee.set(g,b),ee.set(b,g);++Ee<ce;){var Fe=g[Ee],Ke=b[Ee];if(P)var We=se?P(Ke,Fe,Ee,b,g,ee):P(Fe,Ke,Ee,g,b,ee);if(We!==t){if(We)continue;Ie=!1;break}if(Pe){if(!ic(b,function(Ze,it){if(!fo(Pe,it)&&(Fe===Ze||j(Fe,Ze,E,P,ee)))return Pe.push(it)})){Ie=!1;break}}else if(!(Fe===Ke||j(Fe,Ke,E,P,ee))){Ie=!1;break}}return ee.delete(g),ee.delete(b),Ie}function Hx(g,b,E,P,j,ee,se){switch(E){case $e:if(g.byteLength!=b.byteLength||g.byteOffset!=b.byteOffset)return!1;g=g.buffer,b=b.buffer;case Te:return!(g.byteLength!=b.byteLength||!ee(new Is(g),new Is(b)));case ae:case ge:case Oe:return qn(+g,+b);case G:return g.name==b.name&&g.message==b.message;case Mt:case Qe:return g==b+"";case Ae:var ce=cc;case at:var me=P&h;if(ce||(ce=Ms),g.size!=b.size&&!me)return!1;var ke=se.get(g);if(ke)return ke==b;P|=m,se.set(g,b);var Me=Vp(ce(g),ce(b),P,j,ee,se);return se.delete(g),Me;case ot:if(vo)return vo.call(g)==vo.call(b)}return!1}function zx(g,b,E,P,j,ee){var se=E&h,ce=Oc(g),me=ce.length,ke=Oc(b),Me=ke.length;if(me!=Me&&!se)return!1;for(var Ee=me;Ee--;){var Ie=ce[Ee];if(!(se?Ie in b:dt.call(b,Ie)))return!1}var Pe=ee.get(g),Fe=ee.get(b);if(Pe&&Fe)return Pe==b&&Fe==g;var Ke=!0;ee.set(g,b),ee.set(b,g);for(var We=se;++Ee<me;){Ie=ce[Ee];var Ze=g[Ie],it=b[Ie];if(P)var Sn=se?P(it,Ze,Ie,b,g,ee):P(Ze,it,Ie,g,b,ee);if(!(Sn===t?Ze===it||j(Ze,it,E,P,ee):Sn)){Ke=!1;break}We||(We=Ie=="constructor")}if(Ke&&!We){var ln=g.constructor,An=b.constructor;ln!=An&&"constructor"in g&&"constructor"in b&&!(typeof ln=="function"&&ln instanceof ln&&typeof An=="function"&&An instanceof An)&&(Ke=!1)}return ee.delete(g),ee.delete(b),Ke}function vi(g){return zc(Qp(g,t,sg),g+"")}function Oc(g){return hp(g,Kt,Nc)}function Dc(g){return hp(g,hn,qp)}var Pc=Fs?function(g){return Fs.get(g)}:tu;function Js(g){for(var b=g.name+"",E=Ir[b],P=dt.call(Ir,b)?E.length:0;P--;){var j=E[P],ee=j.func;if(ee==null||ee==g)return j.name}return b}function Br(g){var b=dt.call(Z,"placeholder")?Z:g;return b.placeholder}function Ne(){var g=Z.iteratee||Jc;return g=g===Jc?pp:g,arguments.length?g(arguments[0],arguments[1]):g}function ea(g,b){var E=g.__data__;return Xx(b)?E[typeof b=="string"?"string":"hash"]:E.map}function Bc(g){for(var b=Kt(g),E=b.length;E--;){var P=b[E],j=g[P];b[E]=[P,j,Yp(j)]}return b}function ar(g,b){var E=J1(g,b);return dp(E)?E:t}function jx(g){var b=dt.call(g,nr),E=g[nr];try{g[nr]=t;var P=!0}catch{}var j=Ts.call(g);return P&&(b?g[nr]=E:delete g[nr]),j}var Nc=hc?function(g){return g==null?[]:(g=vt(g),Di(hc(g),function(b){return Zd.call(g,b)}))}:nu,qp=hc?function(g){for(var b=[];g;)Pi(b,Nc(g)),g=Os(g);return b}:nu,tn=sn;(fc&&tn(new fc(new ArrayBuffer(1)))!=$e||go&&tn(new go)!=Ae||dc&&tn(dc.resolve())!=mt||$r&&tn(new $r)!=at||mo&&tn(new mo)!=yt)&&(tn=function(g){var b=sn(g),E=b==Be?g.constructor:t,P=E?lr(E):"";if(P)switch(P){case C_:return $e;case k_:return Ae;case M_:return mt;case E_:return at;case L_:return yt}return b});function Ux(g,b,E){for(var P=-1,j=E.length;++P<j;){var ee=E[P],se=ee.size;switch(ee.type){case"drop":g+=se;break;case"dropRight":b-=se;break;case"take":b=en(b,g+se);break;case"takeRight":g=Ut(g,b-se);break}}return{start:g,end:b}}function Vx(g){var b=g.match(Et);return b?b[1].split(wt):[]}function Gp(g,b,E){b=Hi(b,g);for(var P=-1,j=b.length,ee=!1;++P<j;){var se=ii(b[P]);if(!(ee=g!=null&&E(g,se)))break;g=g[se]}return ee||++P!=j?ee:(j=g==null?0:g.length,!!j&&aa(j)&&bi(se,j)&&(Ve(g)||cr(g)))}function qx(g){var b=g.length,E=new g.constructor(b);return b&&typeof g[0]=="string"&&dt.call(g,"index")&&(E.index=g.index,E.input=g.input),E}function Kp(g){return typeof g.constructor=="function"&&!Co(g)?Or(Os(g)):{}}function Gx(g,b,E){var P=g.constructor;switch(b){case Te:return Tc(g);case ae:case ge:return new P(+g);case $e:return Rx(g,E);case ze:case q:case D:case F:case ne:case le:case pe:case we:case je:return Rp(g,E);case Ae:return new P;case Oe:case Qe:return new P(g);case Mt:return Tx(g);case at:return new P;case ot:return $x(g)}}function Kx(g,b){var E=b.length;if(!E)return g;var P=E-1;return b[P]=(E>1?"& ":"")+b[P],b=b.join(E>2?", ":" "),g.replace(Ye,`{
|
|
30
|
+
/* [wrapped with `+b+`] */
|
|
31
|
+
`)}function Yx(g){return Ve(g)||cr(g)||!!(Jd&&g&&g[Jd])}function bi(g,b){var E=typeof g;return b=b??z,!!b&&(E=="number"||E!="symbol"&&a1.test(g))&&g>-1&&g%1==0&&g<b}function an(g,b,E){if(!It(E))return!1;var P=typeof b;return(P=="number"?un(E)&&bi(b,E.length):P=="string"&&b in E)?qn(E[b],g):!1}function Fc(g,b){if(Ve(g))return!1;var E=typeof g;return E=="number"||E=="symbol"||E=="boolean"||g==null||xn(g)?!0:B.test(g)||!X.test(g)||b!=null&&g in vt(b)}function Xx(g){var b=typeof g;return b=="string"||b=="number"||b=="symbol"||b=="boolean"?g!=="__proto__":g===null}function Wc(g){var b=Js(g),E=Z[b];if(typeof E!="function"||!(b in tt.prototype))return!1;if(g===E)return!0;var P=Pc(E);return!!P&&g===P[0]}function Qx(g){return!!Yd&&Yd in g}var Zx=Ls?wi:iu;function Co(g){var b=g&&g.constructor,E=typeof b=="function"&&b.prototype||Tr;return g===E}function Yp(g){return g===g&&!It(g)}function Xp(g,b){return function(E){return E==null?!1:E[g]===b&&(b!==t||g in vt(E))}}function Jx(g){var b=oa(g,function(P){return E.size===p&&E.clear(),P}),E=b.cache;return b}function eS(g,b){var E=g[1],P=b[1],j=E|P,ee=j<(y|v|L),se=P==L&&E==k||P==L&&E==I&&g[7].length<=b[8]||P==(L|I)&&b[7].length<=b[8]&&E==k;if(!(ee||se))return g;P&y&&(g[2]=b[2],j|=E&y?0:w);var ce=b[3];if(ce){var me=g[3];g[3]=me?$p(me,ce,b[4]):ce,g[4]=me?Bi(g[3],r):b[4]}return ce=b[5],ce&&(me=g[5],g[5]=me?Ip(me,ce,b[6]):ce,g[6]=me?Bi(g[5],r):b[6]),ce=b[7],ce&&(g[7]=ce),P&L&&(g[8]=g[8]==null?b[8]:en(g[8],b[8])),g[9]==null&&(g[9]=b[9]),g[0]=b[0],g[1]=j,g}function tS(g){var b=[];if(g!=null)for(var E in vt(g))b.push(E);return b}function nS(g){return Ts.call(g)}function Qp(g,b,E){return b=Ut(b===t?g.length-1:b,0),function(){for(var P=arguments,j=-1,ee=Ut(P.length-b,0),se=be(ee);++j<ee;)se[j]=P[b+j];j=-1;for(var ce=be(b+1);++j<b;)ce[j]=P[j];return ce[b]=E(se),bn(g,this,ce)}}function Zp(g,b){return b.length<2?g:sr(g,Pn(b,0,-1))}function iS(g,b){for(var E=g.length,P=en(b.length,E),j=cn(g);P--;){var ee=b[P];g[P]=bi(ee,E)?j[ee]:t}return g}function Hc(g,b){if(!(b==="constructor"&&typeof g[b]=="function")&&b!="__proto__")return g[b]}var Jp=tg(xp),ko=v_||function(g,b){return Xt.setTimeout(g,b)},zc=tg(kx);function eg(g,b,E){var P=b+"";return zc(g,Kx(P,rS(Vx(P),E)))}function tg(g){var b=0,E=0;return function(){var P=x_(),j=A-(P-E);if(E=P,j>0){if(++b>=C)return arguments[0]}else b=0;return g.apply(t,arguments)}}function ta(g,b){var E=-1,P=g.length,j=P-1;for(b=b===t?P:b;++E<b;){var ee=Ac(E,j),se=g[ee];g[ee]=g[E],g[E]=se}return g.length=b,g}var ng=Jx(function(g){var b=[];return g.charCodeAt(0)===46&&b.push(""),g.replace(W,function(E,P,j,ee){b.push(j?ee.replace(t1,"$1"):P||E)}),b});function ii(g){if(typeof g=="string"||xn(g))return g;var b=g+"";return b=="0"&&1/g==-1/0?"-0":b}function lr(g){if(g!=null){try{return Rs.call(g)}catch{}try{return g+""}catch{}}return""}function rS(g,b){return $n(Q,function(E){var P="_."+E[0];b&E[1]&&!Cs(g,P)&&g.push(P)}),g.sort()}function ig(g){if(g instanceof tt)return g.clone();var b=new On(g.__wrapped__,g.__chain__);return b.__actions__=cn(g.__actions__),b.__index__=g.__index__,b.__values__=g.__values__,b}function oS(g,b,E){(E?an(g,b,E):b===t)?b=1:b=Ut(Ge(b),0);var P=g==null?0:g.length;if(!P||b<1)return[];for(var j=0,ee=0,se=be(Bs(P/b));j<P;)se[ee++]=Pn(g,j,j+=b);return se}function sS(g){for(var b=-1,E=g==null?0:g.length,P=0,j=[];++b<E;){var ee=g[b];ee&&(j[P++]=ee)}return j}function aS(){var g=arguments.length;if(!g)return[];for(var b=be(g-1),E=arguments[0],P=g;P--;)b[P-1]=arguments[P];return Pi(Ve(E)?cn(E):[E],Qt(b,1))}var lS=Xe(function(g,b){return Nt(g)?wo(g,Qt(b,1,Nt,!0)):[]}),cS=Xe(function(g,b){var E=Bn(b);return Nt(E)&&(E=t),Nt(g)?wo(g,Qt(b,1,Nt,!0),Ne(E,2)):[]}),uS=Xe(function(g,b){var E=Bn(b);return Nt(E)&&(E=t),Nt(g)?wo(g,Qt(b,1,Nt,!0),t,E):[]});function hS(g,b,E){var P=g==null?0:g.length;return P?(b=E||b===t?1:Ge(b),Pn(g,b<0?0:b,P)):[]}function fS(g,b,E){var P=g==null?0:g.length;return P?(b=E||b===t?1:Ge(b),b=P-b,Pn(g,0,b<0?0:b)):[]}function dS(g,b){return g&&g.length?Gs(g,Ne(b,3),!0,!0):[]}function pS(g,b){return g&&g.length?Gs(g,Ne(b,3),!0):[]}function gS(g,b,E,P){var j=g==null?0:g.length;return j?(E&&typeof E!="number"&&an(g,b,E)&&(E=0,P=j),ax(g,b,E,P)):[]}function rg(g,b,E){var P=g==null?0:g.length;if(!P)return-1;var j=E==null?0:Ge(E);return j<0&&(j=Ut(P+j,0)),ks(g,Ne(b,3),j)}function og(g,b,E){var P=g==null?0:g.length;if(!P)return-1;var j=P-1;return E!==t&&(j=Ge(E),j=E<0?Ut(P+j,0):en(j,P-1)),ks(g,Ne(b,3),j,!0)}function sg(g){var b=g==null?0:g.length;return b?Qt(g,1):[]}function mS(g){var b=g==null?0:g.length;return b?Qt(g,H):[]}function yS(g,b){var E=g==null?0:g.length;return E?(b=b===t?1:Ge(b),Qt(g,b)):[]}function vS(g){for(var b=-1,E=g==null?0:g.length,P={};++b<E;){var j=g[b];P[j[0]]=j[1]}return P}function ag(g){return g&&g.length?g[0]:t}function bS(g,b,E){var P=g==null?0:g.length;if(!P)return-1;var j=E==null?0:Ge(E);return j<0&&(j=Ut(P+j,0)),Mr(g,b,j)}function wS(g){var b=g==null?0:g.length;return b?Pn(g,0,-1):[]}var _S=Xe(function(g){var b=Rt(g,Lc);return b.length&&b[0]===g[0]?bc(b):[]}),xS=Xe(function(g){var b=Bn(g),E=Rt(g,Lc);return b===Bn(E)?b=t:E.pop(),E.length&&E[0]===g[0]?bc(E,Ne(b,2)):[]}),SS=Xe(function(g){var b=Bn(g),E=Rt(g,Lc);return b=typeof b=="function"?b:t,b&&E.pop(),E.length&&E[0]===g[0]?bc(E,t,b):[]});function AS(g,b){return g==null?"":w_.call(g,b)}function Bn(g){var b=g==null?0:g.length;return b?g[b-1]:t}function CS(g,b,E){var P=g==null?0:g.length;if(!P)return-1;var j=P;return E!==t&&(j=Ge(E),j=j<0?Ut(P+j,0):en(j,P-1)),b===b?r_(g,b,j):ks(g,Hd,j,!0)}function kS(g,b){return g&&g.length?vp(g,Ge(b)):t}var MS=Xe(lg);function lg(g,b){return g&&g.length&&b&&b.length?Sc(g,b):g}function ES(g,b,E){return g&&g.length&&b&&b.length?Sc(g,b,Ne(E,2)):g}function LS(g,b,E){return g&&g.length&&b&&b.length?Sc(g,b,t,E):g}var RS=vi(function(g,b){var E=g==null?0:g.length,P=gc(g,b);return _p(g,Rt(b,function(j){return bi(j,E)?+j:j}).sort(Tp)),P});function TS(g,b){var E=[];if(!(g&&g.length))return E;var P=-1,j=[],ee=g.length;for(b=Ne(b,3);++P<ee;){var se=g[P];b(se,P,g)&&(E.push(se),j.push(P))}return _p(g,j),E}function jc(g){return g==null?g:A_.call(g)}function $S(g,b,E){var P=g==null?0:g.length;return P?(E&&typeof E!="number"&&an(g,b,E)?(b=0,E=P):(b=b==null?0:Ge(b),E=E===t?P:Ge(E)),Pn(g,b,E)):[]}function IS(g,b){return qs(g,b)}function OS(g,b,E){return kc(g,b,Ne(E,2))}function DS(g,b){var E=g==null?0:g.length;if(E){var P=qs(g,b);if(P<E&&qn(g[P],b))return P}return-1}function PS(g,b){return qs(g,b,!0)}function BS(g,b,E){return kc(g,b,Ne(E,2),!0)}function NS(g,b){var E=g==null?0:g.length;if(E){var P=qs(g,b,!0)-1;if(qn(g[P],b))return P}return-1}function FS(g){return g&&g.length?Sp(g):[]}function WS(g,b){return g&&g.length?Sp(g,Ne(b,2)):[]}function HS(g){var b=g==null?0:g.length;return b?Pn(g,1,b):[]}function zS(g,b,E){return g&&g.length?(b=E||b===t?1:Ge(b),Pn(g,0,b<0?0:b)):[]}function jS(g,b,E){var P=g==null?0:g.length;return P?(b=E||b===t?1:Ge(b),b=P-b,Pn(g,b<0?0:b,P)):[]}function US(g,b){return g&&g.length?Gs(g,Ne(b,3),!1,!0):[]}function VS(g,b){return g&&g.length?Gs(g,Ne(b,3)):[]}var qS=Xe(function(g){return Wi(Qt(g,1,Nt,!0))}),GS=Xe(function(g){var b=Bn(g);return Nt(b)&&(b=t),Wi(Qt(g,1,Nt,!0),Ne(b,2))}),KS=Xe(function(g){var b=Bn(g);return b=typeof b=="function"?b:t,Wi(Qt(g,1,Nt,!0),t,b)});function YS(g){return g&&g.length?Wi(g):[]}function XS(g,b){return g&&g.length?Wi(g,Ne(b,2)):[]}function QS(g,b){return b=typeof b=="function"?b:t,g&&g.length?Wi(g,t,b):[]}function Uc(g){if(!(g&&g.length))return[];var b=0;return g=Di(g,function(E){if(Nt(E))return b=Ut(E.length,b),!0}),ac(b,function(E){return Rt(g,rc(E))})}function cg(g,b){if(!(g&&g.length))return[];var E=Uc(g);return b==null?E:Rt(E,function(P){return bn(b,t,P)})}var ZS=Xe(function(g,b){return Nt(g)?wo(g,b):[]}),JS=Xe(function(g){return Ec(Di(g,Nt))}),e2=Xe(function(g){var b=Bn(g);return Nt(b)&&(b=t),Ec(Di(g,Nt),Ne(b,2))}),t2=Xe(function(g){var b=Bn(g);return b=typeof b=="function"?b:t,Ec(Di(g,Nt),t,b)}),n2=Xe(Uc);function i2(g,b){return Mp(g||[],b||[],bo)}function r2(g,b){return Mp(g||[],b||[],So)}var o2=Xe(function(g){var b=g.length,E=b>1?g[b-1]:t;return E=typeof E=="function"?(g.pop(),E):t,cg(g,E)});function ug(g){var b=Z(g);return b.__chain__=!0,b}function s2(g,b){return b(g),g}function na(g,b){return b(g)}var a2=vi(function(g){var b=g.length,E=b?g[0]:0,P=this.__wrapped__,j=function(ee){return gc(ee,g)};return b>1||this.__actions__.length||!(P instanceof tt)||!bi(E)?this.thru(j):(P=P.slice(E,+E+(b?1:0)),P.__actions__.push({func:na,args:[j],thisArg:t}),new On(P,this.__chain__).thru(function(ee){return b&&!ee.length&&ee.push(t),ee}))});function l2(){return ug(this)}function c2(){return new On(this.value(),this.__chain__)}function u2(){this.__values__===t&&(this.__values__=Ag(this.value()));var g=this.__index__>=this.__values__.length,b=g?t:this.__values__[this.__index__++];return{done:g,value:b}}function h2(){return this}function f2(g){for(var b,E=this;E instanceof Hs;){var P=ig(E);P.__index__=0,P.__values__=t,b?j.__wrapped__=P:b=P;var j=P;E=E.__wrapped__}return j.__wrapped__=g,b}function d2(){var g=this.__wrapped__;if(g instanceof tt){var b=g;return this.__actions__.length&&(b=new tt(this)),b=b.reverse(),b.__actions__.push({func:na,args:[jc],thisArg:t}),new On(b,this.__chain__)}return this.thru(jc)}function p2(){return kp(this.__wrapped__,this.__actions__)}var g2=Ks(function(g,b,E){dt.call(g,E)?++g[E]:mi(g,E,1)});function m2(g,b,E){var P=Ve(g)?Fd:sx;return E&&an(g,b,E)&&(b=t),P(g,Ne(b,3))}function y2(g,b){var E=Ve(g)?Di:cp;return E(g,Ne(b,3))}var v2=Bp(rg),b2=Bp(og);function w2(g,b){return Qt(ia(g,b),1)}function _2(g,b){return Qt(ia(g,b),H)}function x2(g,b,E){return E=E===t?1:Ge(E),Qt(ia(g,b),E)}function hg(g,b){var E=Ve(g)?$n:Fi;return E(g,Ne(b,3))}function fg(g,b){var E=Ve(g)?H1:lp;return E(g,Ne(b,3))}var S2=Ks(function(g,b,E){dt.call(g,E)?g[E].push(b):mi(g,E,[b])});function A2(g,b,E,P){g=un(g)?g:Fr(g),E=E&&!P?Ge(E):0;var j=g.length;return E<0&&(E=Ut(j+E,0)),la(g)?E<=j&&g.indexOf(b,E)>-1:!!j&&Mr(g,b,E)>-1}var C2=Xe(function(g,b,E){var P=-1,j=typeof b=="function",ee=un(g)?be(g.length):[];return Fi(g,function(se){ee[++P]=j?bn(b,se,E):_o(se,b,E)}),ee}),k2=Ks(function(g,b,E){mi(g,E,b)});function ia(g,b){var E=Ve(g)?Rt:gp;return E(g,Ne(b,3))}function M2(g,b,E,P){return g==null?[]:(Ve(b)||(b=b==null?[]:[b]),E=P?t:E,Ve(E)||(E=E==null?[]:[E]),bp(g,b,E))}var E2=Ks(function(g,b,E){g[E?0:1].push(b)},function(){return[[],[]]});function L2(g,b,E){var P=Ve(g)?nc:jd,j=arguments.length<3;return P(g,Ne(b,4),E,j,Fi)}function R2(g,b,E){var P=Ve(g)?z1:jd,j=arguments.length<3;return P(g,Ne(b,4),E,j,lp)}function T2(g,b){var E=Ve(g)?Di:cp;return E(g,sa(Ne(b,3)))}function $2(g){var b=Ve(g)?rp:Ax;return b(g)}function I2(g,b,E){(E?an(g,b,E):b===t)?b=1:b=Ge(b);var P=Ve(g)?tx:Cx;return P(g,b)}function O2(g){var b=Ve(g)?nx:Mx;return b(g)}function D2(g){if(g==null)return 0;if(un(g))return la(g)?Lr(g):g.length;var b=tn(g);return b==Ae||b==at?g.size:_c(g).length}function P2(g,b,E){var P=Ve(g)?ic:Ex;return E&&an(g,b,E)&&(b=t),P(g,Ne(b,3))}var B2=Xe(function(g,b){if(g==null)return[];var E=b.length;return E>1&&an(g,b[0],b[1])?b=[]:E>2&&an(b[0],b[1],b[2])&&(b=[b[0]]),bp(g,Qt(b,1),[])}),ra=y_||function(){return Xt.Date.now()};function N2(g,b){if(typeof b!="function")throw new In(u);return g=Ge(g),function(){if(--g<1)return b.apply(this,arguments)}}function dg(g,b,E){return b=E?t:b,b=g&&b==null?g.length:b,yi(g,L,t,t,t,t,b)}function pg(g,b){var E;if(typeof b!="function")throw new In(u);return g=Ge(g),function(){return--g>0&&(E=b.apply(this,arguments)),g<=1&&(b=t),E}}var Vc=Xe(function(g,b,E){var P=y;if(E.length){var j=Bi(E,Br(Vc));P|=S}return yi(g,P,b,E,j)}),gg=Xe(function(g,b,E){var P=y|v;if(E.length){var j=Bi(E,Br(gg));P|=S}return yi(b,P,g,E,j)});function mg(g,b,E){b=E?t:b;var P=yi(g,k,t,t,t,t,t,b);return P.placeholder=mg.placeholder,P}function yg(g,b,E){b=E?t:b;var P=yi(g,_,t,t,t,t,t,b);return P.placeholder=yg.placeholder,P}function vg(g,b,E){var P,j,ee,se,ce,me,ke=0,Me=!1,Ee=!1,Ie=!0;if(typeof g!="function")throw new In(u);b=Nn(b)||0,It(E)&&(Me=!!E.leading,Ee="maxWait"in E,ee=Ee?Ut(Nn(E.maxWait)||0,b):ee,Ie="trailing"in E?!!E.trailing:Ie);function Pe(Ft){var Gn=P,xi=j;return P=j=t,ke=Ft,se=g.apply(xi,Gn),se}function Fe(Ft){return ke=Ft,ce=ko(Ze,b),Me?Pe(Ft):se}function Ke(Ft){var Gn=Ft-me,xi=Ft-ke,Bg=b-Gn;return Ee?en(Bg,ee-xi):Bg}function We(Ft){var Gn=Ft-me,xi=Ft-ke;return me===t||Gn>=b||Gn<0||Ee&&xi>=ee}function Ze(){var Ft=ra();if(We(Ft))return it(Ft);ce=ko(Ze,Ke(Ft))}function it(Ft){return ce=t,Ie&&P?Pe(Ft):(P=j=t,se)}function Sn(){ce!==t&&Ep(ce),ke=0,P=me=j=ce=t}function ln(){return ce===t?se:it(ra())}function An(){var Ft=ra(),Gn=We(Ft);if(P=arguments,j=this,me=Ft,Gn){if(ce===t)return Fe(me);if(Ee)return Ep(ce),ce=ko(Ze,b),Pe(me)}return ce===t&&(ce=ko(Ze,b)),se}return An.cancel=Sn,An.flush=ln,An}var F2=Xe(function(g,b){return ap(g,1,b)}),W2=Xe(function(g,b,E){return ap(g,Nn(b)||0,E)});function H2(g){return yi(g,$)}function oa(g,b){if(typeof g!="function"||b!=null&&typeof b!="function")throw new In(u);var E=function(){var P=arguments,j=b?b.apply(this,P):P[0],ee=E.cache;if(ee.has(j))return ee.get(j);var se=g.apply(this,P);return E.cache=ee.set(j,se)||ee,se};return E.cache=new(oa.Cache||gi),E}oa.Cache=gi;function sa(g){if(typeof g!="function")throw new In(u);return function(){var b=arguments;switch(b.length){case 0:return!g.call(this);case 1:return!g.call(this,b[0]);case 2:return!g.call(this,b[0],b[1]);case 3:return!g.call(this,b[0],b[1],b[2])}return!g.apply(this,b)}}function z2(g){return pg(2,g)}var j2=Lx(function(g,b){b=b.length==1&&Ve(b[0])?Rt(b[0],wn(Ne())):Rt(Qt(b,1),wn(Ne()));var E=b.length;return Xe(function(P){for(var j=-1,ee=en(P.length,E);++j<ee;)P[j]=b[j].call(this,P[j]);return bn(g,this,P)})}),qc=Xe(function(g,b){var E=Bi(b,Br(qc));return yi(g,S,t,b,E)}),bg=Xe(function(g,b){var E=Bi(b,Br(bg));return yi(g,x,t,b,E)}),U2=vi(function(g,b){return yi(g,I,t,t,t,b)});function V2(g,b){if(typeof g!="function")throw new In(u);return b=b===t?b:Ge(b),Xe(g,b)}function q2(g,b){if(typeof g!="function")throw new In(u);return b=b==null?0:Ut(Ge(b),0),Xe(function(E){var P=E[b],j=zi(E,0,b);return P&&Pi(j,P),bn(g,this,j)})}function G2(g,b,E){var P=!0,j=!0;if(typeof g!="function")throw new In(u);return It(E)&&(P="leading"in E?!!E.leading:P,j="trailing"in E?!!E.trailing:j),vg(g,b,{leading:P,maxWait:b,trailing:j})}function K2(g){return dg(g,1)}function Y2(g,b){return qc(Rc(b),g)}function X2(){if(!arguments.length)return[];var g=arguments[0];return Ve(g)?g:[g]}function Q2(g){return Dn(g,c)}function Z2(g,b){return b=typeof b=="function"?b:t,Dn(g,c,b)}function J2(g){return Dn(g,f|c)}function eA(g,b){return b=typeof b=="function"?b:t,Dn(g,f|c,b)}function tA(g,b){return b==null||sp(g,b,Kt(b))}function qn(g,b){return g===b||g!==g&&b!==b}var nA=Zs(vc),iA=Zs(function(g,b){return g>=b}),cr=fp(function(){return arguments}())?fp:function(g){return Pt(g)&&dt.call(g,"callee")&&!Zd.call(g,"callee")},Ve=be.isArray,rA=Id?wn(Id):fx;function un(g){return g!=null&&aa(g.length)&&!wi(g)}function Nt(g){return Pt(g)&&un(g)}function oA(g){return g===!0||g===!1||Pt(g)&&sn(g)==ae}var ji=b_||iu,sA=Od?wn(Od):dx;function aA(g){return Pt(g)&&g.nodeType===1&&!Mo(g)}function lA(g){if(g==null)return!0;if(un(g)&&(Ve(g)||typeof g=="string"||typeof g.splice=="function"||ji(g)||Nr(g)||cr(g)))return!g.length;var b=tn(g);if(b==Ae||b==at)return!g.size;if(Co(g))return!_c(g).length;for(var E in g)if(dt.call(g,E))return!1;return!0}function cA(g,b){return xo(g,b)}function uA(g,b,E){E=typeof E=="function"?E:t;var P=E?E(g,b):t;return P===t?xo(g,b,t,E):!!P}function Gc(g){if(!Pt(g))return!1;var b=sn(g);return b==G||b==ue||typeof g.message=="string"&&typeof g.name=="string"&&!Mo(g)}function hA(g){return typeof g=="number"&&ep(g)}function wi(g){if(!It(g))return!1;var b=sn(g);return b==J||b==ye||b==te||b==Se}function wg(g){return typeof g=="number"&&g==Ge(g)}function aa(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=z}function It(g){var b=typeof g;return g!=null&&(b=="object"||b=="function")}function Pt(g){return g!=null&&typeof g=="object"}var _g=Dd?wn(Dd):gx;function fA(g,b){return g===b||wc(g,b,Bc(b))}function dA(g,b,E){return E=typeof E=="function"?E:t,wc(g,b,Bc(b),E)}function pA(g){return xg(g)&&g!=+g}function gA(g){if(Zx(g))throw new Ue(o);return dp(g)}function mA(g){return g===null}function yA(g){return g==null}function xg(g){return typeof g=="number"||Pt(g)&&sn(g)==Oe}function Mo(g){if(!Pt(g)||sn(g)!=Be)return!1;var b=Os(g);if(b===null)return!0;var E=dt.call(b,"constructor")&&b.constructor;return typeof E=="function"&&E instanceof E&&Rs.call(E)==d_}var Kc=Pd?wn(Pd):mx;function vA(g){return wg(g)&&g>=-9007199254740991&&g<=z}var Sg=Bd?wn(Bd):yx;function la(g){return typeof g=="string"||!Ve(g)&&Pt(g)&&sn(g)==Qe}function xn(g){return typeof g=="symbol"||Pt(g)&&sn(g)==ot}var Nr=Nd?wn(Nd):vx;function bA(g){return g===t}function wA(g){return Pt(g)&&tn(g)==yt}function _A(g){return Pt(g)&&sn(g)==_e}var xA=Zs(xc),SA=Zs(function(g,b){return g<=b});function Ag(g){if(!g)return[];if(un(g))return la(g)?Un(g):cn(g);if(po&&g[po])return t_(g[po]());var b=tn(g),E=b==Ae?cc:b==at?Ms:Fr;return E(g)}function _i(g){if(!g)return g===0?g:0;if(g=Nn(g),g===H||g===-1/0){var b=g<0?-1:1;return b*Y}return g===g?g:0}function Ge(g){var b=_i(g),E=b%1;return b===b?E?b-E:b:0}function Cg(g){return g?or(Ge(g),0,re):0}function Nn(g){if(typeof g=="number")return g;if(xn(g))return K;if(It(g)){var b=typeof g.valueOf=="function"?g.valueOf():g;g=It(b)?b+"":b}if(typeof g!="string")return g===0?g:+g;g=Ud(g);var E=r1.test(g);return E||s1.test(g)?N1(g.slice(2),E?2:8):i1.test(g)?K:+g}function kg(g){return ni(g,hn(g))}function AA(g){return g?or(Ge(g),-9007199254740991,z):g===0?g:0}function ht(g){return g==null?"":_n(g)}var CA=Dr(function(g,b){if(Co(b)||un(b)){ni(b,Kt(b),g);return}for(var E in b)dt.call(b,E)&&bo(g,E,b[E])}),Mg=Dr(function(g,b){ni(b,hn(b),g)}),ca=Dr(function(g,b,E,P){ni(b,hn(b),g,P)}),kA=Dr(function(g,b,E,P){ni(b,Kt(b),g,P)}),MA=vi(gc);function EA(g,b){var E=Or(g);return b==null?E:op(E,b)}var LA=Xe(function(g,b){g=vt(g);var E=-1,P=b.length,j=P>2?b[2]:t;for(j&&an(b[0],b[1],j)&&(P=1);++E<P;)for(var ee=b[E],se=hn(ee),ce=-1,me=se.length;++ce<me;){var ke=se[ce],Me=g[ke];(Me===t||qn(Me,Tr[ke])&&!dt.call(g,ke))&&(g[ke]=ee[ke])}return g}),RA=Xe(function(g){return g.push(t,Up),bn(Eg,t,g)});function TA(g,b){return Wd(g,Ne(b,3),ti)}function $A(g,b){return Wd(g,Ne(b,3),yc)}function IA(g,b){return g==null?g:mc(g,Ne(b,3),hn)}function OA(g,b){return g==null?g:up(g,Ne(b,3),hn)}function DA(g,b){return g&&ti(g,Ne(b,3))}function PA(g,b){return g&&yc(g,Ne(b,3))}function BA(g){return g==null?[]:Us(g,Kt(g))}function NA(g){return g==null?[]:Us(g,hn(g))}function Yc(g,b,E){var P=g==null?t:sr(g,b);return P===t?E:P}function FA(g,b){return g!=null&&Gp(g,b,lx)}function Xc(g,b){return g!=null&&Gp(g,b,cx)}var WA=Fp(function(g,b,E){b!=null&&typeof b.toString!="function"&&(b=Ts.call(b)),g[b]=E},Zc(fn)),HA=Fp(function(g,b,E){b!=null&&typeof b.toString!="function"&&(b=Ts.call(b)),dt.call(g,b)?g[b].push(E):g[b]=[E]},Ne),zA=Xe(_o);function Kt(g){return un(g)?ip(g):_c(g)}function hn(g){return un(g)?ip(g,!0):bx(g)}function jA(g,b){var E={};return b=Ne(b,3),ti(g,function(P,j,ee){mi(E,b(P,j,ee),P)}),E}function UA(g,b){var E={};return b=Ne(b,3),ti(g,function(P,j,ee){mi(E,j,b(P,j,ee))}),E}var VA=Dr(function(g,b,E){Vs(g,b,E)}),Eg=Dr(function(g,b,E,P){Vs(g,b,E,P)}),qA=vi(function(g,b){var E={};if(g==null)return E;var P=!1;b=Rt(b,function(ee){return ee=Hi(ee,g),P||(P=ee.length>1),ee}),ni(g,Dc(g),E),P&&(E=Dn(E,f|a|c,Wx));for(var j=b.length;j--;)Mc(E,b[j]);return E});function GA(g,b){return Lg(g,sa(Ne(b)))}var KA=vi(function(g,b){return g==null?{}:_x(g,b)});function Lg(g,b){if(g==null)return{};var E=Rt(Dc(g),function(P){return[P]});return b=Ne(b),wp(g,E,function(P,j){return b(P,j[0])})}function YA(g,b,E){b=Hi(b,g);var P=-1,j=b.length;for(j||(j=1,g=t);++P<j;){var ee=g==null?t:g[ii(b[P])];ee===t&&(P=j,ee=E),g=wi(ee)?ee.call(g):ee}return g}function XA(g,b,E){return g==null?g:So(g,b,E)}function QA(g,b,E,P){return P=typeof P=="function"?P:t,g==null?g:So(g,b,E,P)}var Rg=zp(Kt),Tg=zp(hn);function ZA(g,b,E){var P=Ve(g),j=P||ji(g)||Nr(g);if(b=Ne(b,4),E==null){var ee=g&&g.constructor;j?E=P?new ee:[]:It(g)?E=wi(ee)?Or(Os(g)):{}:E={}}return(j?$n:ti)(g,function(se,ce,me){return b(E,se,ce,me)}),E}function JA(g,b){return g==null?!0:Mc(g,b)}function eC(g,b,E){return g==null?g:Cp(g,b,Rc(E))}function tC(g,b,E,P){return P=typeof P=="function"?P:t,g==null?g:Cp(g,b,Rc(E),P)}function Fr(g){return g==null?[]:lc(g,Kt(g))}function nC(g){return g==null?[]:lc(g,hn(g))}function iC(g,b,E){return E===t&&(E=b,b=t),E!==t&&(E=Nn(E),E=E===E?E:0),b!==t&&(b=Nn(b),b=b===b?b:0),or(Nn(g),b,E)}function rC(g,b,E){return b=_i(b),E===t?(E=b,b=0):E=_i(E),g=Nn(g),ux(g,b,E)}function oC(g,b,E){if(E&&typeof E!="boolean"&&an(g,b,E)&&(b=E=t),E===t&&(typeof b=="boolean"?(E=b,b=t):typeof g=="boolean"&&(E=g,g=t)),g===t&&b===t?(g=0,b=1):(g=_i(g),b===t?(b=g,g=0):b=_i(b)),g>b){var P=g;g=b,b=P}if(E||g%1||b%1){var j=tp();return en(g+j*(b-g+B1("1e-"+((j+"").length-1))),b)}return Ac(g,b)}var sC=Pr(function(g,b,E){return b=b.toLowerCase(),g+(E?$g(b):b)});function $g(g){return Qc(ht(g).toLowerCase())}function Ig(g){return g=ht(g),g&&g.replace(l1,X1).replace(M1,"")}function aC(g,b,E){g=ht(g),b=_n(b);var P=g.length;E=E===t?P:or(Ge(E),0,P);var j=E;return E-=b.length,E>=0&&g.slice(E,j)==b}function lC(g){return g=ht(g),g&&ho.test(g)?g.replace(er,Q1):g}function cC(g){return g=ht(g),g&&he.test(g)?g.replace(oe,"\\$&"):g}var uC=Pr(function(g,b,E){return g+(E?"-":"")+b.toLowerCase()}),hC=Pr(function(g,b,E){return g+(E?" ":"")+b.toLowerCase()}),fC=Pp("toLowerCase");function dC(g,b,E){g=ht(g),b=Ge(b);var P=b?Lr(g):0;if(!b||P>=b)return g;var j=(b-P)/2;return Qs(Ns(j),E)+g+Qs(Bs(j),E)}function pC(g,b,E){g=ht(g),b=Ge(b);var P=b?Lr(g):0;return b&&P<b?g+Qs(b-P,E):g}function gC(g,b,E){g=ht(g),b=Ge(b);var P=b?Lr(g):0;return b&&P<b?Qs(b-P,E)+g:g}function mC(g,b,E){return E||b==null?b=0:b&&(b=+b),S_(ht(g).replace(ve,""),b||0)}function yC(g,b,E){return(E?an(g,b,E):b===t)?b=1:b=Ge(b),Cc(ht(g),b)}function vC(){var g=arguments,b=ht(g[0]);return g.length<3?b:b.replace(g[1],g[2])}var bC=Pr(function(g,b,E){return g+(E?"_":"")+b.toLowerCase()});function wC(g,b,E){return E&&typeof E!="number"&&an(g,b,E)&&(b=E=t),E=E===t?re:E>>>0,E?(g=ht(g),g&&(typeof b=="string"||b!=null&&!Kc(b))&&(b=_n(b),!b&&Er(g))?zi(Un(g),0,E):g.split(b,E)):[]}var _C=Pr(function(g,b,E){return g+(E?" ":"")+Qc(b)});function xC(g,b,E){return g=ht(g),E=E==null?0:or(Ge(E),0,g.length),b=_n(b),g.slice(E,E+b.length)==b}function SC(g,b,E){var P=Z.templateSettings;E&&an(g,b,E)&&(b=t),g=ht(g),b=ca({},b,P,jp);var j=ca({},b.imports,P.imports,jp),ee=Kt(j),se=lc(j,ee),ce,me,ke=0,Me=b.interpolate||xs,Ee="__p += '",Ie=uc((b.escape||xs).source+"|"+Me.source+"|"+(Me===_s?n1:xs).source+"|"+(b.evaluate||xs).source+"|$","g"),Pe="//# sourceURL="+(dt.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$1+"]")+`
|
|
32
|
+
`;g.replace(Ie,function(We,Ze,it,Sn,ln,An){return it||(it=Sn),Ee+=g.slice(ke,An).replace(c1,Z1),Ze&&(ce=!0,Ee+=`' +
|
|
33
|
+
__e(`+Ze+`) +
|
|
34
|
+
'`),ln&&(me=!0,Ee+=`';
|
|
35
|
+
`+ln+`;
|
|
36
|
+
__p += '`),it&&(Ee+=`' +
|
|
37
|
+
((__t = (`+it+`)) == null ? '' : __t) +
|
|
38
|
+
'`),ke=An+We.length,We}),Ee+=`';
|
|
39
|
+
`;var Fe=dt.call(b,"variable")&&b.variable;if(!Fe)Ee=`with (obj) {
|
|
40
|
+
`+Ee+`
|
|
41
|
+
}
|
|
42
|
+
`;else if(ft.test(Fe))throw new Ue(d);Ee=(me?Ee.replace(ct,""):Ee).replace(gt,"$1").replace(bt,"$1;"),Ee="function("+(Fe||"obj")+`) {
|
|
43
|
+
`+(Fe?"":`obj || (obj = {});
|
|
44
|
+
`)+"var __t, __p = ''"+(ce?", __e = _.escape":"")+(me?`, __j = Array.prototype.join;
|
|
45
|
+
function print() { __p += __j.call(arguments, '') }
|
|
46
|
+
`:`;
|
|
47
|
+
`)+Ee+`return __p
|
|
48
|
+
}`;var Ke=Dg(function(){return ut(ee,Pe+"return "+Ee).apply(t,se)});if(Ke.source=Ee,Gc(Ke))throw Ke;return Ke}function AC(g){return ht(g).toLowerCase()}function CC(g){return ht(g).toUpperCase()}function kC(g,b,E){if(g=ht(g),g&&(E||b===t))return Ud(g);if(!g||!(b=_n(b)))return g;var P=Un(g),j=Un(b),ee=Vd(P,j),se=qd(P,j)+1;return zi(P,ee,se).join("")}function MC(g,b,E){if(g=ht(g),g&&(E||b===t))return g.slice(0,Kd(g)+1);if(!g||!(b=_n(b)))return g;var P=Un(g),j=qd(P,Un(b))+1;return zi(P,0,j).join("")}function EC(g,b,E){if(g=ht(g),g&&(E||b===t))return g.replace(ve,"");if(!g||!(b=_n(b)))return g;var P=Un(g),j=Vd(P,Un(b));return zi(P,j).join("")}function LC(g,b){var E=T,P=O;if(It(b)){var j="separator"in b?b.separator:j;E="length"in b?Ge(b.length):E,P="omission"in b?_n(b.omission):P}g=ht(g);var ee=g.length;if(Er(g)){var se=Un(g);ee=se.length}if(E>=ee)return g;var ce=E-Lr(P);if(ce<1)return P;var me=se?zi(se,0,ce).join(""):g.slice(0,ce);if(j===t)return me+P;if(se&&(ce+=me.length-ce),Kc(j)){if(g.slice(ce).search(j)){var ke,Me=me;for(j.global||(j=uc(j.source,ht(fd.exec(j))+"g")),j.lastIndex=0;ke=j.exec(Me);)var Ee=ke.index;me=me.slice(0,Ee===t?ce:Ee)}}else if(g.indexOf(_n(j),ce)!=ce){var Ie=me.lastIndexOf(j);Ie>-1&&(me=me.slice(0,Ie))}return me+P}function RC(g){return g=ht(g),g&&Rn.test(g)?g.replace(lt,o_):g}var TC=Pr(function(g,b,E){return g+(E?" ":"")+b.toUpperCase()}),Qc=Pp("toUpperCase");function Og(g,b,E){return g=ht(g),b=E?t:b,b===t?e_(g)?l_(g):V1(g):g.match(b)||[]}var Dg=Xe(function(g,b){try{return bn(g,t,b)}catch(E){return Gc(E)?E:new Ue(E)}}),$C=vi(function(g,b){return $n(b,function(E){E=ii(E),mi(g,E,Vc(g[E],g))}),g});function IC(g){var b=g==null?0:g.length,E=Ne();return g=b?Rt(g,function(P){if(typeof P[1]!="function")throw new In(u);return[E(P[0]),P[1]]}):[],Xe(function(P){for(var j=-1;++j<b;){var ee=g[j];if(bn(ee[0],this,P))return bn(ee[1],this,P)}})}function OC(g){return ox(Dn(g,f))}function Zc(g){return function(){return g}}function DC(g,b){return g==null||g!==g?b:g}var PC=Np(),BC=Np(!0);function fn(g){return g}function Jc(g){return pp(typeof g=="function"?g:Dn(g,f))}function NC(g){return mp(Dn(g,f))}function FC(g,b){return yp(g,Dn(b,f))}var WC=Xe(function(g,b){return function(E){return _o(E,g,b)}}),HC=Xe(function(g,b){return function(E){return _o(g,E,b)}});function eu(g,b,E){var P=Kt(b),j=Us(b,P);E==null&&!(It(b)&&(j.length||!P.length))&&(E=b,b=g,g=this,j=Us(b,Kt(b)));var ee=!(It(E)&&"chain"in E)||!!E.chain,se=wi(g);return $n(j,function(ce){var me=b[ce];g[ce]=me,se&&(g.prototype[ce]=function(){var ke=this.__chain__;if(ee||ke){var Me=g(this.__wrapped__),Ee=Me.__actions__=cn(this.__actions__);return Ee.push({func:me,args:arguments,thisArg:g}),Me.__chain__=ke,Me}return me.apply(g,Pi([this.value()],arguments))})}),g}function zC(){return Xt._===this&&(Xt._=p_),this}function tu(){}function jC(g){return g=Ge(g),Xe(function(b){return vp(b,g)})}var UC=$c(Rt),VC=$c(Fd),qC=$c(ic);function Pg(g){return Fc(g)?rc(ii(g)):xx(g)}function GC(g){return function(b){return g==null?t:sr(g,b)}}var KC=Wp(),YC=Wp(!0);function nu(){return[]}function iu(){return!1}function XC(){return{}}function QC(){return""}function ZC(){return!0}function JC(g,b){if(g=Ge(g),g<1||g>z)return[];var E=re,P=en(g,re);b=Ne(b),g-=re;for(var j=ac(P,b);++E<g;)b(E);return j}function ek(g){return Ve(g)?Rt(g,ii):xn(g)?[g]:cn(ng(ht(g)))}function tk(g){var b=++f_;return ht(g)+b}var nk=Xs(function(g,b){return g+b},0),ik=Ic("ceil"),rk=Xs(function(g,b){return g/b},1),ok=Ic("floor");function sk(g){return g&&g.length?js(g,fn,vc):t}function ak(g,b){return g&&g.length?js(g,Ne(b,2),vc):t}function lk(g){return zd(g,fn)}function ck(g,b){return zd(g,Ne(b,2))}function uk(g){return g&&g.length?js(g,fn,xc):t}function hk(g,b){return g&&g.length?js(g,Ne(b,2),xc):t}var fk=Xs(function(g,b){return g*b},1),dk=Ic("round"),pk=Xs(function(g,b){return g-b},0);function gk(g){return g&&g.length?sc(g,fn):0}function mk(g,b){return g&&g.length?sc(g,Ne(b,2)):0}return Z.after=N2,Z.ary=dg,Z.assign=CA,Z.assignIn=Mg,Z.assignInWith=ca,Z.assignWith=kA,Z.at=MA,Z.before=pg,Z.bind=Vc,Z.bindAll=$C,Z.bindKey=gg,Z.castArray=X2,Z.chain=ug,Z.chunk=oS,Z.compact=sS,Z.concat=aS,Z.cond=IC,Z.conforms=OC,Z.constant=Zc,Z.countBy=g2,Z.create=EA,Z.curry=mg,Z.curryRight=yg,Z.debounce=vg,Z.defaults=LA,Z.defaultsDeep=RA,Z.defer=F2,Z.delay=W2,Z.difference=lS,Z.differenceBy=cS,Z.differenceWith=uS,Z.drop=hS,Z.dropRight=fS,Z.dropRightWhile=dS,Z.dropWhile=pS,Z.fill=gS,Z.filter=y2,Z.flatMap=w2,Z.flatMapDeep=_2,Z.flatMapDepth=x2,Z.flatten=sg,Z.flattenDeep=mS,Z.flattenDepth=yS,Z.flip=H2,Z.flow=PC,Z.flowRight=BC,Z.fromPairs=vS,Z.functions=BA,Z.functionsIn=NA,Z.groupBy=S2,Z.initial=wS,Z.intersection=_S,Z.intersectionBy=xS,Z.intersectionWith=SS,Z.invert=WA,Z.invertBy=HA,Z.invokeMap=C2,Z.iteratee=Jc,Z.keyBy=k2,Z.keys=Kt,Z.keysIn=hn,Z.map=ia,Z.mapKeys=jA,Z.mapValues=UA,Z.matches=NC,Z.matchesProperty=FC,Z.memoize=oa,Z.merge=VA,Z.mergeWith=Eg,Z.method=WC,Z.methodOf=HC,Z.mixin=eu,Z.negate=sa,Z.nthArg=jC,Z.omit=qA,Z.omitBy=GA,Z.once=z2,Z.orderBy=M2,Z.over=UC,Z.overArgs=j2,Z.overEvery=VC,Z.overSome=qC,Z.partial=qc,Z.partialRight=bg,Z.partition=E2,Z.pick=KA,Z.pickBy=Lg,Z.property=Pg,Z.propertyOf=GC,Z.pull=MS,Z.pullAll=lg,Z.pullAllBy=ES,Z.pullAllWith=LS,Z.pullAt=RS,Z.range=KC,Z.rangeRight=YC,Z.rearg=U2,Z.reject=T2,Z.remove=TS,Z.rest=V2,Z.reverse=jc,Z.sampleSize=I2,Z.set=XA,Z.setWith=QA,Z.shuffle=O2,Z.slice=$S,Z.sortBy=B2,Z.sortedUniq=FS,Z.sortedUniqBy=WS,Z.split=wC,Z.spread=q2,Z.tail=HS,Z.take=zS,Z.takeRight=jS,Z.takeRightWhile=US,Z.takeWhile=VS,Z.tap=s2,Z.throttle=G2,Z.thru=na,Z.toArray=Ag,Z.toPairs=Rg,Z.toPairsIn=Tg,Z.toPath=ek,Z.toPlainObject=kg,Z.transform=ZA,Z.unary=K2,Z.union=qS,Z.unionBy=GS,Z.unionWith=KS,Z.uniq=YS,Z.uniqBy=XS,Z.uniqWith=QS,Z.unset=JA,Z.unzip=Uc,Z.unzipWith=cg,Z.update=eC,Z.updateWith=tC,Z.values=Fr,Z.valuesIn=nC,Z.without=ZS,Z.words=Og,Z.wrap=Y2,Z.xor=JS,Z.xorBy=e2,Z.xorWith=t2,Z.zip=n2,Z.zipObject=i2,Z.zipObjectDeep=r2,Z.zipWith=o2,Z.entries=Rg,Z.entriesIn=Tg,Z.extend=Mg,Z.extendWith=ca,eu(Z,Z),Z.add=nk,Z.attempt=Dg,Z.camelCase=sC,Z.capitalize=$g,Z.ceil=ik,Z.clamp=iC,Z.clone=Q2,Z.cloneDeep=J2,Z.cloneDeepWith=eA,Z.cloneWith=Z2,Z.conformsTo=tA,Z.deburr=Ig,Z.defaultTo=DC,Z.divide=rk,Z.endsWith=aC,Z.eq=qn,Z.escape=lC,Z.escapeRegExp=cC,Z.every=m2,Z.find=v2,Z.findIndex=rg,Z.findKey=TA,Z.findLast=b2,Z.findLastIndex=og,Z.findLastKey=$A,Z.floor=ok,Z.forEach=hg,Z.forEachRight=fg,Z.forIn=IA,Z.forInRight=OA,Z.forOwn=DA,Z.forOwnRight=PA,Z.get=Yc,Z.gt=nA,Z.gte=iA,Z.has=FA,Z.hasIn=Xc,Z.head=ag,Z.identity=fn,Z.includes=A2,Z.indexOf=bS,Z.inRange=rC,Z.invoke=zA,Z.isArguments=cr,Z.isArray=Ve,Z.isArrayBuffer=rA,Z.isArrayLike=un,Z.isArrayLikeObject=Nt,Z.isBoolean=oA,Z.isBuffer=ji,Z.isDate=sA,Z.isElement=aA,Z.isEmpty=lA,Z.isEqual=cA,Z.isEqualWith=uA,Z.isError=Gc,Z.isFinite=hA,Z.isFunction=wi,Z.isInteger=wg,Z.isLength=aa,Z.isMap=_g,Z.isMatch=fA,Z.isMatchWith=dA,Z.isNaN=pA,Z.isNative=gA,Z.isNil=yA,Z.isNull=mA,Z.isNumber=xg,Z.isObject=It,Z.isObjectLike=Pt,Z.isPlainObject=Mo,Z.isRegExp=Kc,Z.isSafeInteger=vA,Z.isSet=Sg,Z.isString=la,Z.isSymbol=xn,Z.isTypedArray=Nr,Z.isUndefined=bA,Z.isWeakMap=wA,Z.isWeakSet=_A,Z.join=AS,Z.kebabCase=uC,Z.last=Bn,Z.lastIndexOf=CS,Z.lowerCase=hC,Z.lowerFirst=fC,Z.lt=xA,Z.lte=SA,Z.max=sk,Z.maxBy=ak,Z.mean=lk,Z.meanBy=ck,Z.min=uk,Z.minBy=hk,Z.stubArray=nu,Z.stubFalse=iu,Z.stubObject=XC,Z.stubString=QC,Z.stubTrue=ZC,Z.multiply=fk,Z.nth=kS,Z.noConflict=zC,Z.noop=tu,Z.now=ra,Z.pad=dC,Z.padEnd=pC,Z.padStart=gC,Z.parseInt=mC,Z.random=oC,Z.reduce=L2,Z.reduceRight=R2,Z.repeat=yC,Z.replace=vC,Z.result=YA,Z.round=dk,Z.runInContext=de,Z.sample=$2,Z.size=D2,Z.snakeCase=bC,Z.some=P2,Z.sortedIndex=IS,Z.sortedIndexBy=OS,Z.sortedIndexOf=DS,Z.sortedLastIndex=PS,Z.sortedLastIndexBy=BS,Z.sortedLastIndexOf=NS,Z.startCase=_C,Z.startsWith=xC,Z.subtract=pk,Z.sum=gk,Z.sumBy=mk,Z.template=SC,Z.times=JC,Z.toFinite=_i,Z.toInteger=Ge,Z.toLength=Cg,Z.toLower=AC,Z.toNumber=Nn,Z.toSafeInteger=AA,Z.toString=ht,Z.toUpper=CC,Z.trim=kC,Z.trimEnd=MC,Z.trimStart=EC,Z.truncate=LC,Z.unescape=RC,Z.uniqueId=tk,Z.upperCase=TC,Z.upperFirst=Qc,Z.each=hg,Z.eachRight=fg,Z.first=ag,eu(Z,function(){var g={};return ti(Z,function(b,E){dt.call(Z.prototype,E)||(g[E]=b)}),g}(),{chain:!1}),Z.VERSION=i,$n(["bind","bindKey","curry","curryRight","partial","partialRight"],function(g){Z[g].placeholder=Z}),$n(["drop","take"],function(g,b){tt.prototype[g]=function(E){E=E===t?1:Ut(Ge(E),0);var P=this.__filtered__&&!b?new tt(this):this.clone();return P.__filtered__?P.__takeCount__=en(E,P.__takeCount__):P.__views__.push({size:en(E,re),type:g+(P.__dir__<0?"Right":"")}),P},tt.prototype[g+"Right"]=function(E){return this.reverse()[g](E).reverse()}}),$n(["filter","map","takeWhile"],function(g,b){var E=b+1,P=E==M||E==N;tt.prototype[g]=function(j){var ee=this.clone();return ee.__iteratees__.push({iteratee:Ne(j,3),type:E}),ee.__filtered__=ee.__filtered__||P,ee}}),$n(["head","last"],function(g,b){var E="take"+(b?"Right":"");tt.prototype[g]=function(){return this[E](1).value()[0]}}),$n(["initial","tail"],function(g,b){var E="drop"+(b?"":"Right");tt.prototype[g]=function(){return this.__filtered__?new tt(this):this[E](1)}}),tt.prototype.compact=function(){return this.filter(fn)},tt.prototype.find=function(g){return this.filter(g).head()},tt.prototype.findLast=function(g){return this.reverse().find(g)},tt.prototype.invokeMap=Xe(function(g,b){return typeof g=="function"?new tt(this):this.map(function(E){return _o(E,g,b)})}),tt.prototype.reject=function(g){return this.filter(sa(Ne(g)))},tt.prototype.slice=function(g,b){g=Ge(g);var E=this;return E.__filtered__&&(g>0||b<0)?new tt(E):(g<0?E=E.takeRight(-g):g&&(E=E.drop(g)),b!==t&&(b=Ge(b),E=b<0?E.dropRight(-b):E.take(b-g)),E)},tt.prototype.takeRightWhile=function(g){return this.reverse().takeWhile(g).reverse()},tt.prototype.toArray=function(){return this.take(re)},ti(tt.prototype,function(g,b){var E=/^(?:filter|find|map|reject)|While$/.test(b),P=/^(?:head|last)$/.test(b),j=Z[P?"take"+(b=="last"?"Right":""):b],ee=P||/^find/.test(b);j&&(Z.prototype[b]=function(){var se=this.__wrapped__,ce=P?[1]:arguments,me=se instanceof tt,ke=ce[0],Me=me||Ve(se),Ee=function(Ze){var it=j.apply(Z,Pi([Ze],ce));return P&&Ie?it[0]:it};Me&&E&&typeof ke=="function"&&ke.length!=1&&(me=Me=!1);var Ie=this.__chain__,Pe=!!this.__actions__.length,Fe=ee&&!Ie,Ke=me&&!Pe;if(!ee&&Me){se=Ke?se:new tt(this);var We=g.apply(se,ce);return We.__actions__.push({func:na,args:[Ee],thisArg:t}),new On(We,Ie)}return Fe&&Ke?g.apply(this,ce):(We=this.thru(Ee),Fe?P?We.value()[0]:We.value():We)})}),$n(["pop","push","shift","sort","splice","unshift"],function(g){var b=Es[g],E=/^(?:push|sort|unshift)$/.test(g)?"tap":"thru",P=/^(?:pop|shift)$/.test(g);Z.prototype[g]=function(){var j=arguments;if(P&&!this.__chain__){var ee=this.value();return b.apply(Ve(ee)?ee:[],j)}return this[E](function(se){return b.apply(Ve(se)?se:[],j)})}}),ti(tt.prototype,function(g,b){var E=Z[b];if(E){var P=E.name+"";dt.call(Ir,P)||(Ir[P]=[]),Ir[P].push({name:b,func:E})}}),Ir[Ys(t,v).name]=[{name:"wrapper",func:t}],tt.prototype.clone=R_,tt.prototype.reverse=T_,tt.prototype.value=$_,Z.prototype.at=a2,Z.prototype.chain=l2,Z.prototype.commit=c2,Z.prototype.next=u2,Z.prototype.plant=f2,Z.prototype.reverse=d2,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=p2,Z.prototype.first=Z.prototype.head,po&&(Z.prototype[po]=h2),Z},Rr=c_();tr?((tr.exports=Rr)._=Rr,Jl._=Rr):Xt._=Rr}).call(nM)}(Fo,Fo.exports)),Fo.exports}var rM=iM();const Ln=di(rM),ps=n=>function(...e){return n(this)(...e)},Lf=(n,e,t="")=>Object.entries(n).reduce((i,[s,o])=>{const u=`${t}${t?".":""}${s}`;return Ln.isObject(o)&&!e.includes(u)?i.concat(Lf(o,e,u)):i.concat([[u,o]])},[]),ns=(()=>{const n=new Map([["default",new Map]]),e=[6,0,3,15,9,12],t=Array.from({length:18},(i,s)=>`hsl(${e[s%e.length]++*20}, 100%, 74%)`);return(i,s="default")=>{const o=n.get(s)??new Map,u=o.get(i);if(u)return u;o.size||n.set(s,o);const d=t.at(o.size%t.length);return o.set(i,d),d}})(),oM=ps(n=>(e,t,i,{fn:s,inverse:o})=>{const d=(()=>{switch(t){case"eq":return e===i;case"neq":return e!==i;case"lt":return e<i;case"lte":return e<=i;case"gt":return e>i;case"gte":return e>=i;default:return!1}})();return d?s?s(n):o?o(n):d:null}),sM=ps(()=>n=>(n/1e3).toFixed(3)),aM=ps(()=>(n,e)=>Ln.truncate(n,{length:e})),lM=ps(()=>n=>new Date(n).toLocaleTimeString()),cM=ps(()=>(n,e)=>ns(n,e)),uM=Object.freeze(Object.defineProperty({__proto__:null,compare:oM,toColor:cM,toLocaleTime:lM,toSeconds:sM,truncate:aM},Symbol.toStringTag,{value:"Module"})),hM=`
|
|
49
|
+
{{#if (compare value.length 'gt' length)}}
|
|
50
|
+
<span class="truncated">
|
|
51
|
+
<span class="full">{{value}}</span>
|
|
52
|
+
<span class="short">{{truncate value length}}</span>
|
|
53
|
+
</span>
|
|
54
|
+
{{else}}
|
|
55
|
+
{{value}}
|
|
56
|
+
{{/if}}
|
|
57
|
+
`,fM=`
|
|
58
|
+
<span class="path size-{{size}}">
|
|
59
|
+
{{#if (compare size 'eq' 'S')}}
|
|
60
|
+
{{> truncated this length=40}}
|
|
61
|
+
{{else if (compare size 'eq' 'M')}}
|
|
62
|
+
{{> truncated this length=45}}
|
|
63
|
+
{{else if (compare size 'eq' 'L')}}
|
|
64
|
+
{{> truncated this length=55}}
|
|
65
|
+
{{else if (compare size 'eq' 'XL')}}
|
|
66
|
+
{{> truncated this length=65}}
|
|
67
|
+
{{else if (compare size 'eq' 'XXL')}}
|
|
68
|
+
{{> truncated this length=75}}
|
|
69
|
+
{{else}}
|
|
70
|
+
{{value}}
|
|
71
|
+
{{/if}}
|
|
72
|
+
</span>
|
|
73
|
+
`,dM=hM,pM=fM,gM=Object.freeze(Object.defineProperty({__proto__:null,metaPath:pM,truncated:dM},Symbol.toStringTag,{value:"Module"})),mM={init:()=>{Object.entries(uM).forEach(([n,e])=>Ot.registerHelper(n,e)),Object.entries(gM).forEach(([n,e])=>Ot.registerPartial(n,e))}};Ui.extend(xk);mM.init();const yM=`
|
|
74
|
+
<div class="buttons"></div>
|
|
75
|
+
`;var Da={exports:{}},Lm;function ro(){if(Lm)return Da.exports;Lm=1;var n=typeof Reflect=="object"?Reflect:null,e=n&&typeof n.apply=="function"?n.apply:function(S,x,L){return Function.prototype.apply.call(S,x,L)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:t=function(S){return Object.getOwnPropertyNames(S)};function i(_){console&&console.warn&&console.warn(_)}var s=Number.isNaN||function(S){return S!==S};function o(){o.init.call(this)}Da.exports=o,Da.exports.once=v,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var u=10;function d(_){if(typeof _!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(_){if(typeof _!="number"||_<0||s(_))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+_+".");u=_}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||s(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function l(_){return _._maxListeners===void 0?o.defaultMaxListeners:_._maxListeners}o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(S){for(var x=[],L=1;L<arguments.length;L++)x.push(arguments[L]);var I=S==="error",$=this._events;if($!==void 0)I=I&&$.error===void 0;else if(!I)return!1;if(I){var T;if(x.length>0&&(T=x[0]),T instanceof Error)throw T;var O=new Error("Unhandled error."+(T?" ("+T.message+")":""));throw O.context=T,O}var C=$[S];if(C===void 0)return!1;if(typeof C=="function")e(C,this,x);else for(var A=C.length,M=h(C,A),L=0;L<A;++L)e(M[L],this,x);return!0};function p(_,S,x,L){var I,$,T;if(d(x),$=_._events,$===void 0?($=_._events=Object.create(null),_._eventsCount=0):($.newListener!==void 0&&(_.emit("newListener",S,x.listener?x.listener:x),$=_._events),T=$[S]),T===void 0)T=$[S]=x,++_._eventsCount;else if(typeof T=="function"?T=$[S]=L?[x,T]:[T,x]:L?T.unshift(x):T.push(x),I=l(_),I>0&&T.length>I&&!T.warned){T.warned=!0;var O=new Error("Possible EventEmitter memory leak detected. "+T.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");O.name="MaxListenersExceededWarning",O.emitter=_,O.type=S,O.count=T.length,i(O)}return _}o.prototype.addListener=function(S,x){return p(this,S,x,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(S,x){return p(this,S,x,!0)};function r(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(_,S,x){var L={fired:!1,wrapFn:void 0,target:_,type:S,listener:x},I=r.bind(L);return I.listener=x,L.wrapFn=I,I}o.prototype.once=function(S,x){return d(x),this.on(S,f(this,S,x)),this},o.prototype.prependOnceListener=function(S,x){return d(x),this.prependListener(S,f(this,S,x)),this},o.prototype.removeListener=function(S,x){var L,I,$,T,O;if(d(x),I=this._events,I===void 0)return this;if(L=I[S],L===void 0)return this;if(L===x||L.listener===x)--this._eventsCount===0?this._events=Object.create(null):(delete I[S],I.removeListener&&this.emit("removeListener",S,L.listener||x));else if(typeof L!="function"){for($=-1,T=L.length-1;T>=0;T--)if(L[T]===x||L[T].listener===x){O=L[T].listener,$=T;break}if($<0)return this;$===0?L.shift():m(L,$),L.length===1&&(I[S]=L[0]),I.removeListener!==void 0&&this.emit("removeListener",S,O||x)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(S){var x,L,I;if(L=this._events,L===void 0)return this;if(L.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):L[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete L[S]),this;if(arguments.length===0){var $=Object.keys(L),T;for(I=0;I<$.length;++I)T=$[I],T!=="removeListener"&&this.removeAllListeners(T);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(x=L[S],typeof x=="function")this.removeListener(S,x);else if(x!==void 0)for(I=x.length-1;I>=0;I--)this.removeListener(S,x[I]);return this};function a(_,S,x){var L=_._events;if(L===void 0)return[];var I=L[S];return I===void 0?[]:typeof I=="function"?x?[I.listener||I]:[I]:x?y(I):h(I,I.length)}o.prototype.listeners=function(S){return a(this,S,!0)},o.prototype.rawListeners=function(S){return a(this,S,!1)},o.listenerCount=function(_,S){return typeof _.listenerCount=="function"?_.listenerCount(S):c.call(_,S)},o.prototype.listenerCount=c;function c(_){var S=this._events;if(S!==void 0){var x=S[_];if(typeof x=="function")return 1;if(x!==void 0)return x.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function h(_,S){for(var x=new Array(S),L=0;L<S;++L)x[L]=_[L];return x}function m(_,S){for(;S+1<_.length;S++)_[S]=_[S+1];_.pop()}function y(_){for(var S=new Array(_.length),x=0;x<S.length;++x)S[x]=_[x].listener||_[x];return S}function v(_,S){return new Promise(function(x,L){function I(T){_.removeListener(S,$),L(T)}function $(){typeof _.removeListener=="function"&&_.removeListener("error",I),x([].slice.call(arguments))}k(_,S,$,{once:!0}),S!=="error"&&w(_,I,{once:!0})})}function w(_,S,x){typeof _.on=="function"&&k(_,"error",S,x)}function k(_,S,x,L){if(typeof _.on=="function")L.once?_.once(S,x):_.on(S,x);else if(typeof _.addEventListener=="function")_.addEventListener(S,function I($){L.once&&_.removeEventListener(S,I),x($)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof _)}return Da.exports}var tb=ro();const oo=di(tb),vM=`
|
|
76
|
+
<div class="panel {{class}} {{#if width}}width-{{width}}{{/if}} {{#if height}}height-{{height}}{{/if}}">
|
|
77
|
+
{{#if title}}
|
|
78
|
+
<p class="title">
|
|
79
|
+
{{#if title.icon}}<i class="{{title.icon}}"></i>{{/if}}
|
|
80
|
+
<span class="title">{{{title.text}}}</span>
|
|
81
|
+
{{#if title.description}}<span class="description">{{{title.description}}}</span>{{/if}}
|
|
82
|
+
</p>
|
|
83
|
+
{{/if}}
|
|
84
|
+
|
|
85
|
+
<div class="content"></div>
|
|
86
|
+
</div>
|
|
87
|
+
`;class At{constructor(e){this.element=document.createElement("div"),e&&(this.element=this.compilePredicateToElement(e))}get isHidden(){return this.element.classList.contains("hidden")}get id(){return this.element.id}identify(e){return this.element.id=e,this}show(){return this.element.classList.remove("hidden"),this}hide(){return this.element.classList.add("hidden"),this}append(e){return this.element.append(this.compilePredicateToElement(e)),this}prepend(e){return this.element.prepend(this.compilePredicateToElement(e)),this}replace(e){const t=this.compilePredicateToElement(e);return this.element.after(t),this.isHidden&&t.classList.add("hidden"),Object.assign(this.delete(),{element:t})}clear(){return this.element.innerHTML="",this}delete(){return this.element.remove(),this}compilePredicateToElement(e){return e instanceof At?e.element:typeof e=="string"?this.compileHtmlStringToElement(e):e===null?document.createElement("div"):e}compileHtmlStringToElement(e){return new DOMParser().parseFromString(e,"text/html").body.firstElementChild}}class gs{constructor(e){this.key=e}extract(){return JSON.parse(localStorage.getItem(this.key)??"null")}store(e){return localStorage.setItem(this.key,JSON.stringify(e)),this}clear(){return localStorage.removeItem(this.key),this}static build(e){return new gs(e)}}const Rm=(()=>{const n={password:String,number:Number,text:String};return(e,t)=>{if(e==="checkbox")return t||null;if(e==="file")return null;const i=t.trim();return i.length?(n[e]??String)(i):null}})();class is{constructor(e,t){this.source=e,this.content=t,this.name=this.source.name,this.size=this.source.size}static async build(e){return new is(e,await e.text())}}class Rf extends At{get paths(){return[...this.element.querySelectorAll("*[data-key]")].map(e=>e.getAttribute("data-key")).filter(Boolean)}async extract(){const e={};for(const t of this.element.querySelectorAll("*[data-key]")){const i=t.getAttribute("data-key"),s=t.getAttribute("cast")??t.getAttribute("type")??"text";if(!i||!("value"in t)||typeof t.value!="string")continue;if(s==="file"){const u=[];for(const d of"files"in t?t.files:new FileList)u.push(await is.build(d));Ln.set(e,i,u);continue}if(t.hasAttribute("list")){const u=t.getAttribute("list")??",",d=t.value.split(u).map(l=>Rm(s,l)).filter(l=>l!==null);d.length&&Ln.set(e,i,d);continue}const o=Rm(s,t.value);if(s==="checkbox"&&"checked"in t){t.checked&&Ln.set(e,i,o??!0);continue}o!==null&&Ln.set(e,i,o)}return e}assign(e){return Lf(e,this.paths).map(([t,i])=>[t,i,this.element.querySelector(`*[data-key="${t}"]`)]).forEach(([t,i,s])=>Ln.set(s,"value",Array.isArray(i)?i.join(s.getAttribute("list")??","):i??"")),this}static build(e){return new Rf(e)}}class Zr extends At{constructor(e,t){super(t),this.key=e,this.client=gs.build(this.key),this.form=Rf.build(this.element)}sync(){const e=this.client.extract()??[];return this.form.assign(e.reduce((t,[i,s])=>Ln.set(t,i,s),{})),this}async save(){const e=await this.form.extract();return this.client.store(Lf(e,this.form.paths).filter(([,t])=>Array.isArray(t)?!t.some(i=>typeof i=="object"&&i instanceof is):!(typeof t=="object"&&t instanceof is))),e}clear(){return this.client.clear(),this}static build(e,t){return new Zr(e,t)}}class zn{constructor(e){if(this.element=e,this.handlers=[],!e)throw new Error("Provided element is not valid");e.addEventListener("click",t=>this.trigger(t))}handle(e){return this.element?(this.handlers.push(async t=>{this.element.classList.add("processed");try{await e(t)}finally{this.element.classList.remove("processed")}}),this):this}async trigger(e=new Event("manual")){for(const t of this.handlers)await t(e)}static build(e){return new zn(e)}}class so extends At{constructor(e){super(e),this.content=new At(this.element.querySelector("div.content")),this.isInitialized=!1,this.isCompiled=!1,this.controls={main:new At(this.element.querySelector("div.controls div.main")),additional:new At(this.element.querySelector("div.controls div.additional"))},this.storage=Zr.build(`config:${this.element.id}`,this.element.querySelector("div.storage")),this.meta={},this.events=new oo,this.expander=this.element.querySelector("div.controls button#expand"),this.expander&&zn.build(this.expander).handle(()=>this.controls.additional.isHidden?(this.controls.additional.show(),this.expander.classList.add("toggled")):(this.controls.additional.hide(),this.expander.classList.remove("toggled")))}assignMeta(e){return Object.assign(this,{meta:e})}compile(){return this.isCompiled?this:(this.isCompiled=!0,this.emit("compile",this))}initialize(){return this.isInitialized=!0,this.storage.sync(),this.emit("initialize",this)}refresh(){return this.emit("refresh",this)}select(){return this.emit("select",this)}on(e,t){return this.events.on(e,t),this}once(e,t){return this.events.once(e,t),this}emit(e,...t){return this.events.emit(e,...t),this}static build(e){return new so(e)}}class bM{constructor(){this.storage=Zr.build("void",document.body),this.shared={}}share(e){return Object.assign(this,{shared:e})}switchStorage(e){return Object.assign(this,{storage:e})}}const wM=Ot.compile(vM);class Li extends At{constructor(e={}){super(wM(e)),this.content=new At(this.element.querySelector("div.content"))}clear(){return this.content.clear(),this}append(e){return this.content.append(e),this}prepend(e){return this.content.prepend(e),this}replace(e){return this.content.replace(e),this}static build(e){return new Li(e)}}class Go extends At{constructor(e){const t=e.colorify?typeof e.colorify=="object"?ns(e.name,e.colorify.prefix):ns(e.name):null;super(`
|
|
88
|
+
<button style="${t?`color: ${t}`:""}" class="${e.isEnabled?"checked":""}">
|
|
89
|
+
${e.name}
|
|
90
|
+
</button>
|
|
91
|
+
`),this.configuration=e,this.events=new oo,this.element.addEventListener("click",()=>this.isEnabled?this.disable("click"):this.enable("click"))}get name(){return this.configuration.name}get isEnabled(){return this.element.classList.contains("checked")}enable(e="auto"){return this.isEnabled?this:(this.element.classList.add("checked"),this.emit("enable",this,e))}disable(e="auto"){return this.isEnabled?(this.element.classList.remove("checked"),this.emit("disable",this,e)):this}on(e,t){return this.events.on(e,t),this}once(e,t){return this.events.once(e,t),this}emit(e,...t){return this.events.emit(e,...t),this}static build(e){return new Go(e)}}var nb={},$l={};$l.byteLength=SM;$l.toByteArray=CM;$l.fromByteArray=EM;var ci=[],Hn=[],_M=typeof Uint8Array<"u"?Uint8Array:Array,hu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var jr=0,xM=hu.length;jr<xM;++jr)ci[jr]=hu[jr],Hn[hu.charCodeAt(jr)]=jr;Hn[45]=62;Hn[95]=63;function ib(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var i=t===e?0:4-t%4;return[t,i]}function SM(n){var e=ib(n),t=e[0],i=e[1];return(t+i)*3/4-i}function AM(n,e,t){return(e+t)*3/4-t}function CM(n){var e,t=ib(n),i=t[0],s=t[1],o=new _M(AM(n,i,s)),u=0,d=s>0?i-4:i,l;for(l=0;l<d;l+=4)e=Hn[n.charCodeAt(l)]<<18|Hn[n.charCodeAt(l+1)]<<12|Hn[n.charCodeAt(l+2)]<<6|Hn[n.charCodeAt(l+3)],o[u++]=e>>16&255,o[u++]=e>>8&255,o[u++]=e&255;return s===2&&(e=Hn[n.charCodeAt(l)]<<2|Hn[n.charCodeAt(l+1)]>>4,o[u++]=e&255),s===1&&(e=Hn[n.charCodeAt(l)]<<10|Hn[n.charCodeAt(l+1)]<<4|Hn[n.charCodeAt(l+2)]>>2,o[u++]=e>>8&255,o[u++]=e&255),o}function kM(n){return ci[n>>18&63]+ci[n>>12&63]+ci[n>>6&63]+ci[n&63]}function MM(n,e,t){for(var i,s=[],o=e;o<t;o+=3)i=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),s.push(kM(i));return s.join("")}function EM(n){for(var e,t=n.length,i=t%3,s=[],o=16383,u=0,d=t-i;u<d;u+=o)s.push(MM(n,u,u+o>d?d:u+o));return i===1?(e=n[t-1],s.push(ci[e>>2]+ci[e<<4&63]+"==")):i===2&&(e=(n[t-2]<<8)+n[t-1],s.push(ci[e>>10]+ci[e>>4&63]+ci[e<<2&63]+"=")),s.join("")}var Tf={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Tf.read=function(n,e,t,i,s){var o,u,d=s*8-i-1,l=(1<<d)-1,p=l>>1,r=-7,f=t?s-1:0,a=t?-1:1,c=n[e+f];for(f+=a,o=c&(1<<-r)-1,c>>=-r,r+=d;r>0;o=o*256+n[e+f],f+=a,r-=8);for(u=o&(1<<-r)-1,o>>=-r,r+=i;r>0;u=u*256+n[e+f],f+=a,r-=8);if(o===0)o=1-p;else{if(o===l)return u?NaN:(c?-1:1)*(1/0);u=u+Math.pow(2,i),o=o-p}return(c?-1:1)*u*Math.pow(2,o-i)};Tf.write=function(n,e,t,i,s,o){var u,d,l,p=o*8-s-1,r=(1<<p)-1,f=r>>1,a=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=i?0:o-1,h=i?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(d=isNaN(e)?1:0,u=r):(u=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-u))<1&&(u--,l*=2),u+f>=1?e+=a/l:e+=a*Math.pow(2,1-f),e*l>=2&&(u++,l/=2),u+f>=r?(d=0,u=r):u+f>=1?(d=(e*l-1)*Math.pow(2,s),u=u+f):(d=e*Math.pow(2,f-1)*Math.pow(2,s),u=0));s>=8;n[t+c]=d&255,c+=h,d/=256,s-=8);for(u=u<<s|d,p+=s;p>0;n[t+c]=u&255,c+=h,u/=256,p-=8);n[t+c-h]|=m*128};/*!
|
|
92
|
+
* The buffer module from node.js, for the browser.
|
|
93
|
+
*
|
|
94
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
95
|
+
* @license MIT
|
|
96
|
+
*/(function(n){const e=$l,t=Tf,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=r,n.SlowBuffer=S,n.INSPECT_MAX_BYTES=50;const s=2147483647;n.kMaxLength=s;const{Uint8Array:o,ArrayBuffer:u,SharedArrayBuffer:d}=globalThis;r.TYPED_ARRAY_SUPPORT=l(),!r.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const q=new o(1),D={foo:function(){return 42}};return Object.setPrototypeOf(D,o.prototype),Object.setPrototypeOf(q,D),q.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function p(q){if(q>s)throw new RangeError('The value "'+q+'" is invalid for option "size"');const D=new o(q);return Object.setPrototypeOf(D,r.prototype),D}function r(q,D,F){if(typeof q=="number"){if(typeof D=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(q)}return f(q,D,F)}r.poolSize=8192;function f(q,D,F){if(typeof q=="string")return m(q,D);if(u.isView(q))return v(q);if(q==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof q);if(yt(q,u)||q&&yt(q.buffer,u)||typeof d<"u"&&(yt(q,d)||q&&yt(q.buffer,d)))return w(q,D,F);if(typeof q=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ne=q.valueOf&&q.valueOf();if(ne!=null&&ne!==q)return r.from(ne,D,F);const le=k(q);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof q[Symbol.toPrimitive]=="function")return r.from(q[Symbol.toPrimitive]("string"),D,F);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof q)}r.from=function(q,D,F){return f(q,D,F)},Object.setPrototypeOf(r.prototype,o.prototype),Object.setPrototypeOf(r,o);function a(q){if(typeof q!="number")throw new TypeError('"size" argument must be of type number');if(q<0)throw new RangeError('The value "'+q+'" is invalid for option "size"')}function c(q,D,F){return a(q),q<=0?p(q):D!==void 0?typeof F=="string"?p(q).fill(D,F):p(q).fill(D):p(q)}r.alloc=function(q,D,F){return c(q,D,F)};function h(q){return a(q),p(q<0?0:_(q)|0)}r.allocUnsafe=function(q){return h(q)},r.allocUnsafeSlow=function(q){return h(q)};function m(q,D){if((typeof D!="string"||D==="")&&(D="utf8"),!r.isEncoding(D))throw new TypeError("Unknown encoding: "+D);const F=x(q,D)|0;let ne=p(F);const le=ne.write(q,D);return le!==F&&(ne=ne.slice(0,le)),ne}function y(q){const D=q.length<0?0:_(q.length)|0,F=p(D);for(let ne=0;ne<D;ne+=1)F[ne]=q[ne]&255;return F}function v(q){if(yt(q,o)){const D=new o(q);return w(D.buffer,D.byteOffset,D.byteLength)}return y(q)}function w(q,D,F){if(D<0||q.byteLength<D)throw new RangeError('"offset" is outside of buffer bounds');if(q.byteLength<D+(F||0))throw new RangeError('"length" is outside of buffer bounds');let ne;return D===void 0&&F===void 0?ne=new o(q):F===void 0?ne=new o(q,D):ne=new o(q,D,F),Object.setPrototypeOf(ne,r.prototype),ne}function k(q){if(r.isBuffer(q)){const D=_(q.length)|0,F=p(D);return F.length===0||q.copy(F,0,0,D),F}if(q.length!==void 0)return typeof q.length!="number"||_e(q.length)?p(0):y(q);if(q.type==="Buffer"&&Array.isArray(q.data))return y(q.data)}function _(q){if(q>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return q|0}function S(q){return+q!=q&&(q=0),r.alloc(+q)}r.isBuffer=function(D){return D!=null&&D._isBuffer===!0&&D!==r.prototype},r.compare=function(D,F){if(yt(D,o)&&(D=r.from(D,D.offset,D.byteLength)),yt(F,o)&&(F=r.from(F,F.offset,F.byteLength)),!r.isBuffer(D)||!r.isBuffer(F))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(D===F)return 0;let ne=D.length,le=F.length;for(let pe=0,we=Math.min(ne,le);pe<we;++pe)if(D[pe]!==F[pe]){ne=D[pe],le=F[pe];break}return ne<le?-1:le<ne?1:0},r.isEncoding=function(D){switch(String(D).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(D,F){if(!Array.isArray(D))throw new TypeError('"list" argument must be an Array of Buffers');if(D.length===0)return r.alloc(0);let ne;if(F===void 0)for(F=0,ne=0;ne<D.length;++ne)F+=D[ne].length;const le=r.allocUnsafe(F);let pe=0;for(ne=0;ne<D.length;++ne){let we=D[ne];if(yt(we,o))pe+we.length>le.length?(r.isBuffer(we)||(we=r.from(we)),we.copy(le,pe)):o.prototype.set.call(le,we,pe);else if(r.isBuffer(we))we.copy(le,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=we.length}return le};function x(q,D){if(r.isBuffer(q))return q.length;if(u.isView(q)||yt(q,u))return q.byteLength;if(typeof q!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof q);const F=q.length,ne=arguments.length>2&&arguments[2]===!0;if(!ne&&F===0)return 0;let le=!1;for(;;)switch(D){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":return Mt(q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F*2;case"hex":return F>>>1;case"base64":return ot(q).length;default:if(le)return ne?-1:Mt(q).length;D=(""+D).toLowerCase(),le=!0}}r.byteLength=x;function L(q,D,F){let ne=!1;if((D===void 0||D<0)&&(D=0),D>this.length||((F===void 0||F>this.length)&&(F=this.length),F<=0)||(F>>>=0,D>>>=0,F<=D))return"";for(q||(q="utf8");;)switch(q){case"hex":return fe(this,D,F);case"utf8":case"utf-8":return H(this,D,F);case"ascii":return K(this,D,F);case"latin1":case"binary":return re(this,D,F);case"base64":return N(this,D,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,D,F);default:if(ne)throw new TypeError("Unknown encoding: "+q);q=(q+"").toLowerCase(),ne=!0}}r.prototype._isBuffer=!0;function I(q,D,F){const ne=q[D];q[D]=q[F],q[F]=ne}r.prototype.swap16=function(){const D=this.length;if(D%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let F=0;F<D;F+=2)I(this,F,F+1);return this},r.prototype.swap32=function(){const D=this.length;if(D%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let F=0;F<D;F+=4)I(this,F,F+3),I(this,F+1,F+2);return this},r.prototype.swap64=function(){const D=this.length;if(D%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let F=0;F<D;F+=8)I(this,F,F+7),I(this,F+1,F+6),I(this,F+2,F+5),I(this,F+3,F+4);return this},r.prototype.toString=function(){const D=this.length;return D===0?"":arguments.length===0?H(this,0,D):L.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(D){if(!r.isBuffer(D))throw new TypeError("Argument must be a Buffer");return this===D?!0:r.compare(this,D)===0},r.prototype.inspect=function(){let D="";const F=n.INSPECT_MAX_BYTES;return D=this.toString("hex",0,F).replace(/(.{2})/g,"$1 ").trim(),this.length>F&&(D+=" ... "),"<Buffer "+D+">"},i&&(r.prototype[i]=r.prototype.inspect),r.prototype.compare=function(D,F,ne,le,pe){if(yt(D,o)&&(D=r.from(D,D.offset,D.byteLength)),!r.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(F===void 0&&(F=0),ne===void 0&&(ne=D?D.length:0),le===void 0&&(le=0),pe===void 0&&(pe=this.length),F<0||ne>D.length||le<0||pe>this.length)throw new RangeError("out of range index");if(le>=pe&&F>=ne)return 0;if(le>=pe)return-1;if(F>=ne)return 1;if(F>>>=0,ne>>>=0,le>>>=0,pe>>>=0,this===D)return 0;let we=pe-le,je=ne-F;const ct=Math.min(we,je),gt=this.slice(le,pe),bt=D.slice(F,ne);for(let lt=0;lt<ct;++lt)if(gt[lt]!==bt[lt]){we=gt[lt],je=bt[lt];break}return we<je?-1:je<we?1:0};function $(q,D,F,ne,le){if(q.length===0)return-1;if(typeof F=="string"?(ne=F,F=0):F>2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),F=+F,_e(F)&&(F=le?0:q.length-1),F<0&&(F=q.length+F),F>=q.length){if(le)return-1;F=q.length-1}else if(F<0)if(le)F=0;else return-1;if(typeof D=="string"&&(D=r.from(D,ne)),r.isBuffer(D))return D.length===0?-1:T(q,D,F,ne,le);if(typeof D=="number")return D=D&255,typeof o.prototype.indexOf=="function"?le?o.prototype.indexOf.call(q,D,F):o.prototype.lastIndexOf.call(q,D,F):T(q,[D],F,ne,le);throw new TypeError("val must be string, number or Buffer")}function T(q,D,F,ne,le){let pe=1,we=q.length,je=D.length;if(ne!==void 0&&(ne=String(ne).toLowerCase(),ne==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(q.length<2||D.length<2)return-1;pe=2,we/=2,je/=2,F/=2}function ct(bt,lt){return pe===1?bt[lt]:bt.readUInt16BE(lt*pe)}let gt;if(le){let bt=-1;for(gt=F;gt<we;gt++)if(ct(q,gt)===ct(D,bt===-1?0:gt-bt)){if(bt===-1&&(bt=gt),gt-bt+1===je)return bt*pe}else bt!==-1&&(gt-=gt-bt),bt=-1}else for(F+je>we&&(F=we-je),gt=F;gt>=0;gt--){let bt=!0;for(let lt=0;lt<je;lt++)if(ct(q,gt+lt)!==ct(D,lt)){bt=!1;break}if(bt)return gt}return-1}r.prototype.includes=function(D,F,ne){return this.indexOf(D,F,ne)!==-1},r.prototype.indexOf=function(D,F,ne){return $(this,D,F,ne,!0)},r.prototype.lastIndexOf=function(D,F,ne){return $(this,D,F,ne,!1)};function O(q,D,F,ne){F=Number(F)||0;const le=q.length-F;ne?(ne=Number(ne),ne>le&&(ne=le)):ne=le;const pe=D.length;ne>pe/2&&(ne=pe/2);let we;for(we=0;we<ne;++we){const je=parseInt(D.substr(we*2,2),16);if(_e(je))return we;q[F+we]=je}return we}function C(q,D,F,ne){return Dt(Mt(D,q.length-F),q,F,ne)}function A(q,D,F,ne){return Dt(at(D),q,F,ne)}function M(q,D,F,ne){return Dt(ot(D),q,F,ne)}function R(q,D,F,ne){return Dt(Qe(D,q.length-F),q,F,ne)}r.prototype.write=function(D,F,ne,le){if(F===void 0)le="utf8",ne=this.length,F=0;else if(ne===void 0&&typeof F=="string")le=F,ne=this.length,F=0;else if(isFinite(F))F=F>>>0,isFinite(ne)?(ne=ne>>>0,le===void 0&&(le="utf8")):(le=ne,ne=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const pe=this.length-F;if((ne===void 0||ne>pe)&&(ne=pe),D.length>0&&(ne<0||F<0)||F>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");let we=!1;for(;;)switch(le){case"hex":return O(this,D,F,ne);case"utf8":case"utf-8":return C(this,D,F,ne);case"ascii":case"latin1":case"binary":return A(this,D,F,ne);case"base64":return M(this,D,F,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,D,F,ne);default:if(we)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),we=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(q,D,F){return D===0&&F===q.length?e.fromByteArray(q):e.fromByteArray(q.slice(D,F))}function H(q,D,F){F=Math.min(q.length,F);const ne=[];let le=D;for(;le<F;){const pe=q[le];let we=null,je=pe>239?4:pe>223?3:pe>191?2:1;if(le+je<=F){let ct,gt,bt,lt;switch(je){case 1:pe<128&&(we=pe);break;case 2:ct=q[le+1],(ct&192)===128&&(lt=(pe&31)<<6|ct&63,lt>127&&(we=lt));break;case 3:ct=q[le+1],gt=q[le+2],(ct&192)===128&&(gt&192)===128&&(lt=(pe&15)<<12|(ct&63)<<6|gt&63,lt>2047&&(lt<55296||lt>57343)&&(we=lt));break;case 4:ct=q[le+1],gt=q[le+2],bt=q[le+3],(ct&192)===128&&(gt&192)===128&&(bt&192)===128&&(lt=(pe&15)<<18|(ct&63)<<12|(gt&63)<<6|bt&63,lt>65535&<<1114112&&(we=lt))}}we===null?(we=65533,je=1):we>65535&&(we-=65536,ne.push(we>>>10&1023|55296),we=56320|we&1023),ne.push(we),le+=je}return Y(ne)}const z=4096;function Y(q){const D=q.length;if(D<=z)return String.fromCharCode.apply(String,q);let F="",ne=0;for(;ne<D;)F+=String.fromCharCode.apply(String,q.slice(ne,ne+=z));return F}function K(q,D,F){let ne="";F=Math.min(q.length,F);for(let le=D;le<F;++le)ne+=String.fromCharCode(q[le]&127);return ne}function re(q,D,F){let ne="";F=Math.min(q.length,F);for(let le=D;le<F;++le)ne+=String.fromCharCode(q[le]);return ne}function fe(q,D,F){const ne=q.length;(!D||D<0)&&(D=0),(!F||F<0||F>ne)&&(F=ne);let le="";for(let pe=D;pe<F;++pe)le+=Te[q[pe]];return le}function U(q,D,F){const ne=q.slice(D,F);let le="";for(let pe=0;pe<ne.length-1;pe+=2)le+=String.fromCharCode(ne[pe]+ne[pe+1]*256);return le}r.prototype.slice=function(D,F){const ne=this.length;D=~~D,F=F===void 0?ne:~~F,D<0?(D+=ne,D<0&&(D=0)):D>ne&&(D=ne),F<0?(F+=ne,F<0&&(F=0)):F>ne&&(F=ne),F<D&&(F=D);const le=this.subarray(D,F);return Object.setPrototypeOf(le,r.prototype),le};function Q(q,D,F){if(q%1!==0||q<0)throw new RangeError("offset is not uint");if(q+D>F)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUintLE=r.prototype.readUIntLE=function(D,F,ne){D=D>>>0,F=F>>>0,ne||Q(D,F,this.length);let le=this[D],pe=1,we=0;for(;++we<F&&(pe*=256);)le+=this[D+we]*pe;return le},r.prototype.readUintBE=r.prototype.readUIntBE=function(D,F,ne){D=D>>>0,F=F>>>0,ne||Q(D,F,this.length);let le=this[D+--F],pe=1;for(;F>0&&(pe*=256);)le+=this[D+--F]*pe;return le},r.prototype.readUint8=r.prototype.readUInt8=function(D,F){return D=D>>>0,F||Q(D,1,this.length),this[D]},r.prototype.readUint16LE=r.prototype.readUInt16LE=function(D,F){return D=D>>>0,F||Q(D,2,this.length),this[D]|this[D+1]<<8},r.prototype.readUint16BE=r.prototype.readUInt16BE=function(D,F){return D=D>>>0,F||Q(D,2,this.length),this[D]<<8|this[D+1]},r.prototype.readUint32LE=r.prototype.readUInt32LE=function(D,F){return D=D>>>0,F||Q(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+this[D+3]*16777216},r.prototype.readUint32BE=r.prototype.readUInt32BE=function(D,F){return D=D>>>0,F||Q(D,4,this.length),this[D]*16777216+(this[D+1]<<16|this[D+2]<<8|this[D+3])},r.prototype.readBigUInt64LE=$e(function(D){D=D>>>0,Le(D,"offset");const F=this[D],ne=this[D+7];(F===void 0||ne===void 0)&&Be(D,this.length-8);const le=F+this[++D]*2**8+this[++D]*2**16+this[++D]*2**24,pe=this[++D]+this[++D]*2**8+this[++D]*2**16+ne*2**24;return BigInt(le)+(BigInt(pe)<<BigInt(32))}),r.prototype.readBigUInt64BE=$e(function(D){D=D>>>0,Le(D,"offset");const F=this[D],ne=this[D+7];(F===void 0||ne===void 0)&&Be(D,this.length-8);const le=F*2**24+this[++D]*2**16+this[++D]*2**8+this[++D],pe=this[++D]*2**24+this[++D]*2**16+this[++D]*2**8+ne;return(BigInt(le)<<BigInt(32))+BigInt(pe)}),r.prototype.readIntLE=function(D,F,ne){D=D>>>0,F=F>>>0,ne||Q(D,F,this.length);let le=this[D],pe=1,we=0;for(;++we<F&&(pe*=256);)le+=this[D+we]*pe;return pe*=128,le>=pe&&(le-=Math.pow(2,8*F)),le},r.prototype.readIntBE=function(D,F,ne){D=D>>>0,F=F>>>0,ne||Q(D,F,this.length);let le=F,pe=1,we=this[D+--le];for(;le>0&&(pe*=256);)we+=this[D+--le]*pe;return pe*=128,we>=pe&&(we-=Math.pow(2,8*F)),we},r.prototype.readInt8=function(D,F){return D=D>>>0,F||Q(D,1,this.length),this[D]&128?(255-this[D]+1)*-1:this[D]},r.prototype.readInt16LE=function(D,F){D=D>>>0,F||Q(D,2,this.length);const ne=this[D]|this[D+1]<<8;return ne&32768?ne|4294901760:ne},r.prototype.readInt16BE=function(D,F){D=D>>>0,F||Q(D,2,this.length);const ne=this[D+1]|this[D]<<8;return ne&32768?ne|4294901760:ne},r.prototype.readInt32LE=function(D,F){return D=D>>>0,F||Q(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},r.prototype.readInt32BE=function(D,F){return D=D>>>0,F||Q(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},r.prototype.readBigInt64LE=$e(function(D){D=D>>>0,Le(D,"offset");const F=this[D],ne=this[D+7];(F===void 0||ne===void 0)&&Be(D,this.length-8);const le=this[D+4]+this[D+5]*2**8+this[D+6]*2**16+(ne<<24);return(BigInt(le)<<BigInt(32))+BigInt(F+this[++D]*2**8+this[++D]*2**16+this[++D]*2**24)}),r.prototype.readBigInt64BE=$e(function(D){D=D>>>0,Le(D,"offset");const F=this[D],ne=this[D+7];(F===void 0||ne===void 0)&&Be(D,this.length-8);const le=(F<<24)+this[++D]*2**16+this[++D]*2**8+this[++D];return(BigInt(le)<<BigInt(32))+BigInt(this[++D]*2**24+this[++D]*2**16+this[++D]*2**8+ne)}),r.prototype.readFloatLE=function(D,F){return D=D>>>0,F||Q(D,4,this.length),t.read(this,D,!0,23,4)},r.prototype.readFloatBE=function(D,F){return D=D>>>0,F||Q(D,4,this.length),t.read(this,D,!1,23,4)},r.prototype.readDoubleLE=function(D,F){return D=D>>>0,F||Q(D,8,this.length),t.read(this,D,!0,52,8)},r.prototype.readDoubleBE=function(D,F){return D=D>>>0,F||Q(D,8,this.length),t.read(this,D,!1,52,8)};function ie(q,D,F,ne,le,pe){if(!r.isBuffer(q))throw new TypeError('"buffer" argument must be a Buffer instance');if(D>le||D<pe)throw new RangeError('"value" argument is out of bounds');if(F+ne>q.length)throw new RangeError("Index out of range")}r.prototype.writeUintLE=r.prototype.writeUIntLE=function(D,F,ne,le){if(D=+D,F=F>>>0,ne=ne>>>0,!le){const je=Math.pow(2,8*ne)-1;ie(this,D,F,ne,je,0)}let pe=1,we=0;for(this[F]=D&255;++we<ne&&(pe*=256);)this[F+we]=D/pe&255;return F+ne},r.prototype.writeUintBE=r.prototype.writeUIntBE=function(D,F,ne,le){if(D=+D,F=F>>>0,ne=ne>>>0,!le){const je=Math.pow(2,8*ne)-1;ie(this,D,F,ne,je,0)}let pe=ne-1,we=1;for(this[F+pe]=D&255;--pe>=0&&(we*=256);)this[F+pe]=D/we&255;return F+ne},r.prototype.writeUint8=r.prototype.writeUInt8=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,1,255,0),this[F]=D&255,F+1},r.prototype.writeUint16LE=r.prototype.writeUInt16LE=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,2,65535,0),this[F]=D&255,this[F+1]=D>>>8,F+2},r.prototype.writeUint16BE=r.prototype.writeUInt16BE=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,2,65535,0),this[F]=D>>>8,this[F+1]=D&255,F+2},r.prototype.writeUint32LE=r.prototype.writeUInt32LE=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,4,4294967295,0),this[F+3]=D>>>24,this[F+2]=D>>>16,this[F+1]=D>>>8,this[F]=D&255,F+4},r.prototype.writeUint32BE=r.prototype.writeUInt32BE=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,4,4294967295,0),this[F]=D>>>24,this[F+1]=D>>>16,this[F+2]=D>>>8,this[F+3]=D&255,F+4};function V(q,D,F,ne,le){Oe(D,ne,le,q,F,7);let pe=Number(D&BigInt(4294967295));q[F++]=pe,pe=pe>>8,q[F++]=pe,pe=pe>>8,q[F++]=pe,pe=pe>>8,q[F++]=pe;let we=Number(D>>BigInt(32)&BigInt(4294967295));return q[F++]=we,we=we>>8,q[F++]=we,we=we>>8,q[F++]=we,we=we>>8,q[F++]=we,F}function te(q,D,F,ne,le){Oe(D,ne,le,q,F,7);let pe=Number(D&BigInt(4294967295));q[F+7]=pe,pe=pe>>8,q[F+6]=pe,pe=pe>>8,q[F+5]=pe,pe=pe>>8,q[F+4]=pe;let we=Number(D>>BigInt(32)&BigInt(4294967295));return q[F+3]=we,we=we>>8,q[F+2]=we,we=we>>8,q[F+1]=we,we=we>>8,q[F]=we,F+8}r.prototype.writeBigUInt64LE=$e(function(D,F=0){return V(this,D,F,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeBigUInt64BE=$e(function(D,F=0){return te(this,D,F,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeIntLE=function(D,F,ne,le){if(D=+D,F=F>>>0,!le){const ct=Math.pow(2,8*ne-1);ie(this,D,F,ne,ct-1,-ct)}let pe=0,we=1,je=0;for(this[F]=D&255;++pe<ne&&(we*=256);)D<0&&je===0&&this[F+pe-1]!==0&&(je=1),this[F+pe]=(D/we>>0)-je&255;return F+ne},r.prototype.writeIntBE=function(D,F,ne,le){if(D=+D,F=F>>>0,!le){const ct=Math.pow(2,8*ne-1);ie(this,D,F,ne,ct-1,-ct)}let pe=ne-1,we=1,je=0;for(this[F+pe]=D&255;--pe>=0&&(we*=256);)D<0&&je===0&&this[F+pe+1]!==0&&(je=1),this[F+pe]=(D/we>>0)-je&255;return F+ne},r.prototype.writeInt8=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,1,127,-128),D<0&&(D=255+D+1),this[F]=D&255,F+1},r.prototype.writeInt16LE=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,2,32767,-32768),this[F]=D&255,this[F+1]=D>>>8,F+2},r.prototype.writeInt16BE=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,2,32767,-32768),this[F]=D>>>8,this[F+1]=D&255,F+2},r.prototype.writeInt32LE=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,4,2147483647,-2147483648),this[F]=D&255,this[F+1]=D>>>8,this[F+2]=D>>>16,this[F+3]=D>>>24,F+4},r.prototype.writeInt32BE=function(D,F,ne){return D=+D,F=F>>>0,ne||ie(this,D,F,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[F]=D>>>24,this[F+1]=D>>>16,this[F+2]=D>>>8,this[F+3]=D&255,F+4},r.prototype.writeBigInt64LE=$e(function(D,F=0){return V(this,D,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),r.prototype.writeBigInt64BE=$e(function(D,F=0){return te(this,D,F,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ae(q,D,F,ne,le,pe){if(F+ne>q.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function ge(q,D,F,ne,le){return D=+D,F=F>>>0,le||ae(q,D,F,4),t.write(q,D,F,ne,23,4),F+4}r.prototype.writeFloatLE=function(D,F,ne){return ge(this,D,F,!0,ne)},r.prototype.writeFloatBE=function(D,F,ne){return ge(this,D,F,!1,ne)};function ue(q,D,F,ne,le){return D=+D,F=F>>>0,le||ae(q,D,F,8),t.write(q,D,F,ne,52,8),F+8}r.prototype.writeDoubleLE=function(D,F,ne){return ue(this,D,F,!0,ne)},r.prototype.writeDoubleBE=function(D,F,ne){return ue(this,D,F,!1,ne)},r.prototype.copy=function(D,F,ne,le){if(!r.isBuffer(D))throw new TypeError("argument should be a Buffer");if(ne||(ne=0),!le&&le!==0&&(le=this.length),F>=D.length&&(F=D.length),F||(F=0),le>0&&le<ne&&(le=ne),le===ne||D.length===0||this.length===0)return 0;if(F<0)throw new RangeError("targetStart out of bounds");if(ne<0||ne>=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),D.length-F<le-ne&&(le=D.length-F+ne);const pe=le-ne;return this===D&&typeof o.prototype.copyWithin=="function"?this.copyWithin(F,ne,le):o.prototype.set.call(D,this.subarray(ne,le),F),pe},r.prototype.fill=function(D,F,ne,le){if(typeof D=="string"){if(typeof F=="string"?(le=F,F=0,ne=this.length):typeof ne=="string"&&(le=ne,ne=this.length),le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!r.isEncoding(le))throw new TypeError("Unknown encoding: "+le);if(D.length===1){const we=D.charCodeAt(0);(le==="utf8"&&we<128||le==="latin1")&&(D=we)}}else typeof D=="number"?D=D&255:typeof D=="boolean"&&(D=Number(D));if(F<0||this.length<F||this.length<ne)throw new RangeError("Out of range index");if(ne<=F)return this;F=F>>>0,ne=ne===void 0?this.length:ne>>>0,D||(D=0);let pe;if(typeof D=="number")for(pe=F;pe<ne;++pe)this[pe]=D;else{const we=r.isBuffer(D)?D:r.from(D,le),je=we.length;if(je===0)throw new TypeError('The value "'+D+'" is invalid for argument "value"');for(pe=0;pe<ne-F;++pe)this[pe+F]=we[pe%je]}return this};const G={};function J(q,D,F){G[q]=class extends F{constructor(){super(),Object.defineProperty(this,"message",{value:D.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${q}]`,this.stack,delete this.name}get code(){return q}set code(le){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:le,writable:!0})}toString(){return`${this.name} [${q}]: ${this.message}`}}}J("ERR_BUFFER_OUT_OF_BOUNDS",function(q){return q?`${q} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),J("ERR_INVALID_ARG_TYPE",function(q,D){return`The "${q}" argument must be of type number. Received type ${typeof D}`},TypeError),J("ERR_OUT_OF_RANGE",function(q,D,F){let ne=`The value of "${q}" is out of range.`,le=F;return Number.isInteger(F)&&Math.abs(F)>2**32?le=ye(String(F)):typeof F=="bigint"&&(le=String(F),(F>BigInt(2)**BigInt(32)||F<-(BigInt(2)**BigInt(32)))&&(le=ye(le)),le+="n"),ne+=` It must be ${D}. Received ${le}`,ne},RangeError);function ye(q){let D="",F=q.length;const ne=q[0]==="-"?1:0;for(;F>=ne+4;F-=3)D=`_${q.slice(F-3,F)}${D}`;return`${q.slice(0,F)}${D}`}function Ae(q,D,F){Le(D,"offset"),(q[D]===void 0||q[D+F]===void 0)&&Be(D,q.length-(F+1))}function Oe(q,D,F,ne,le,pe){if(q>F||q<D){const we=typeof D=="bigint"?"n":"";let je;throw D===0||D===BigInt(0)?je=`>= 0${we} and < 2${we} ** ${(pe+1)*8}${we}`:je=`>= -(2${we} ** ${(pe+1)*8-1}${we}) and < 2 ** ${(pe+1)*8-1}${we}`,new G.ERR_OUT_OF_RANGE("value",je,q)}Ae(ne,le,pe)}function Le(q,D){if(typeof q!="number")throw new G.ERR_INVALID_ARG_TYPE(D,"number",q)}function Be(q,D,F){throw Math.floor(q)!==q?(Le(q,F),new G.ERR_OUT_OF_RANGE("offset","an integer",q)):D<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${D}`,q)}const mt=/[^+/0-9A-Za-z-_]/g;function Se(q){if(q=q.split("=")[0],q=q.trim().replace(mt,""),q.length<2)return"";for(;q.length%4!==0;)q=q+"=";return q}function Mt(q,D){D=D||1/0;let F;const ne=q.length;let le=null;const pe=[];for(let we=0;we<ne;++we){if(F=q.charCodeAt(we),F>55295&&F<57344){if(!le){if(F>56319){(D-=3)>-1&&pe.push(239,191,189);continue}else if(we+1===ne){(D-=3)>-1&&pe.push(239,191,189);continue}le=F;continue}if(F<56320){(D-=3)>-1&&pe.push(239,191,189),le=F;continue}F=(le-55296<<10|F-56320)+65536}else le&&(D-=3)>-1&&pe.push(239,191,189);if(le=null,F<128){if((D-=1)<0)break;pe.push(F)}else if(F<2048){if((D-=2)<0)break;pe.push(F>>6|192,F&63|128)}else if(F<65536){if((D-=3)<0)break;pe.push(F>>12|224,F>>6&63|128,F&63|128)}else if(F<1114112){if((D-=4)<0)break;pe.push(F>>18|240,F>>12&63|128,F>>6&63|128,F&63|128)}else throw new Error("Invalid code point")}return pe}function at(q){const D=[];for(let F=0;F<q.length;++F)D.push(q.charCodeAt(F)&255);return D}function Qe(q,D){let F,ne,le;const pe=[];for(let we=0;we<q.length&&!((D-=2)<0);++we)F=q.charCodeAt(we),ne=F>>8,le=F%256,pe.push(le),pe.push(ne);return pe}function ot(q){return e.toByteArray(Se(q))}function Dt(q,D,F,ne){let le;for(le=0;le<ne&&!(le+F>=D.length||le>=q.length);++le)D[le+F]=q[le];return le}function yt(q,D){return q instanceof D||q!=null&&q.constructor!=null&&q.constructor.name!=null&&q.constructor.name===D.name}function _e(q){return q!==q}const Te=function(){const q="0123456789abcdef",D=new Array(256);for(let F=0;F<16;++F){const ne=F*16;for(let le=0;le<16;++le)D[ne+le]=q[F]+q[le]}return D}();function $e(q){return typeof BigInt>"u"?ze:q}function ze(){throw new Error("BigInt not supported")}})(nb);const rs=nb.Buffer;var Pa={exports:{}},Ba={exports:{}};function LM(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var rb={exports:{}},Ht=rb.exports={},ai,li;function tf(){throw new Error("setTimeout has not been defined")}function nf(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ai=setTimeout:ai=tf}catch{ai=tf}try{typeof clearTimeout=="function"?li=clearTimeout:li=nf}catch{li=nf}})();function ob(n){if(ai===setTimeout)return setTimeout(n,0);if((ai===tf||!ai)&&setTimeout)return ai=setTimeout,setTimeout(n,0);try{return ai(n,0)}catch{try{return ai.call(null,n,0)}catch{return ai.call(this,n,0)}}}function RM(n){if(li===clearTimeout)return clearTimeout(n);if((li===nf||!li)&&clearTimeout)return li=clearTimeout,clearTimeout(n);try{return li(n)}catch{try{return li.call(null,n)}catch{return li.call(this,n)}}}var Ri=[],Xr=!1,yr,ul=-1;function TM(){!Xr||!yr||(Xr=!1,yr.length?Ri=yr.concat(Ri):ul=-1,Ri.length&&sb())}function sb(){if(!Xr){var n=ob(TM);Xr=!0;for(var e=Ri.length;e;){for(yr=Ri,Ri=[];++ul<e;)yr&&yr[ul].run();ul=-1,e=Ri.length}yr=null,Xr=!1,RM(n)}}Ht.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];Ri.push(new ab(n,e)),Ri.length===1&&!Xr&&ob(sb)};function ab(n,e){this.fun=n,this.array=e}ab.prototype.run=function(){this.fun.apply(null,this.array)};Ht.title="browser";Ht.browser=!0;Ht.env={};Ht.argv=[];Ht.version="";Ht.versions={};function Oi(){}Ht.on=Oi;Ht.addListener=Oi;Ht.once=Oi;Ht.off=Oi;Ht.removeListener=Oi;Ht.removeAllListeners=Oi;Ht.emit=Oi;Ht.prependListener=Oi;Ht.prependOnceListener=Oi;Ht.listeners=function(n){return[]};Ht.binding=function(n){throw new Error("process.binding is not supported")};Ht.cwd=function(){return"/"};Ht.chdir=function(n){throw new Error("process.chdir is not supported")};Ht.umask=function(){return 0};var $M=rb.exports;const rt=LM($M);var fu={},du={},pu,Tm;function lb(){return Tm||(Tm=1,pu=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var s=42;e[t]=s;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var d=Object.getOwnPropertyDescriptor(e,t);if(d.value!==s||d.enumerable!==!0)return!1}return!0}),pu}var gu,$m;function Il(){if($m)return gu;$m=1;var n=lb();return gu=function(){return n()&&!!Symbol.toStringTag},gu}var mu,Im;function cb(){return Im||(Im=1,mu=Object),mu}var yu,Om;function IM(){return Om||(Om=1,yu=Error),yu}var vu,Dm;function OM(){return Dm||(Dm=1,vu=EvalError),vu}var bu,Pm;function DM(){return Pm||(Pm=1,bu=RangeError),bu}var wu,Bm;function PM(){return Bm||(Bm=1,wu=ReferenceError),wu}var _u,Nm;function ub(){return Nm||(Nm=1,_u=SyntaxError),_u}var xu,Fm;function ms(){return Fm||(Fm=1,xu=TypeError),xu}var Su,Wm;function BM(){return Wm||(Wm=1,Su=URIError),Su}var Au,Hm;function NM(){return Hm||(Hm=1,Au=Math.abs),Au}var Cu,zm;function FM(){return zm||(zm=1,Cu=Math.floor),Cu}var ku,jm;function WM(){return jm||(jm=1,ku=Math.max),ku}var Mu,Um;function HM(){return Um||(Um=1,Mu=Math.min),Mu}var Eu,Vm;function zM(){return Vm||(Vm=1,Eu=Math.pow),Eu}var Lu,qm;function jM(){return qm||(qm=1,Lu=Math.round),Lu}var Ru,Gm;function UM(){return Gm||(Gm=1,Ru=Number.isNaN||function(e){return e!==e}),Ru}var Tu,Km;function VM(){if(Km)return Tu;Km=1;var n=UM();return Tu=function(t){return n(t)||t===0?t:t<0?-1:1},Tu}var $u,Ym;function qM(){return Ym||(Ym=1,$u=Object.getOwnPropertyDescriptor),$u}var Iu,Xm;function ao(){if(Xm)return Iu;Xm=1;var n=qM();if(n)try{n([],"length")}catch{n=null}return Iu=n,Iu}var Ou,Qm;function Ol(){if(Qm)return Ou;Qm=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return Ou=n,Ou}var Du,Zm;function GM(){if(Zm)return Du;Zm=1;var n=typeof Symbol<"u"&&Symbol,e=lb();return Du=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Du}var Pu,Jm;function hb(){return Jm||(Jm=1,Pu=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Pu}var Bu,ey;function fb(){if(ey)return Bu;ey=1;var n=cb();return Bu=n.getPrototypeOf||null,Bu}var Nu,ty;function KM(){if(ty)return Nu;ty=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",s=function(l,p){for(var r=[],f=0;f<l.length;f+=1)r[f]=l[f];for(var a=0;a<p.length;a+=1)r[a+l.length]=p[a];return r},o=function(l,p){for(var r=[],f=p,a=0;f<l.length;f+=1,a+=1)r[a]=l[f];return r},u=function(d,l){for(var p="",r=0;r<d.length;r+=1)p+=d[r],r+1<d.length&&(p+=l);return p};return Nu=function(l){var p=this;if(typeof p!="function"||e.apply(p)!==i)throw new TypeError(n+p);for(var r=o(arguments,1),f,a=function(){if(this instanceof f){var v=p.apply(this,s(r,arguments));return Object(v)===v?v:this}return p.apply(l,s(r,arguments))},c=t(0,p.length-r.length),h=[],m=0;m<c;m++)h[m]="$"+m;if(f=Function("binder","return function ("+u(h,",")+"){ return binder.apply(this,arguments); }")(a),p.prototype){var y=function(){};y.prototype=p.prototype,f.prototype=new y,y.prototype=null}return f},Nu}var Fu,ny;function ys(){if(ny)return Fu;ny=1;var n=KM();return Fu=Function.prototype.bind||n,Fu}var Wu,iy;function $f(){return iy||(iy=1,Wu=Function.prototype.call),Wu}var Hu,ry;function If(){return ry||(ry=1,Hu=Function.prototype.apply),Hu}var zu,oy;function YM(){return oy||(oy=1,zu=typeof Reflect<"u"&&Reflect&&Reflect.apply),zu}var ju,sy;function db(){if(sy)return ju;sy=1;var n=ys(),e=If(),t=$f(),i=YM();return ju=i||n.call(t,e),ju}var Uu,ay;function Of(){if(ay)return Uu;ay=1;var n=ys(),e=ms(),t=$f(),i=db();return Uu=function(o){if(o.length<1||typeof o[0]!="function")throw new e("a function is required");return i(n,t,o)},Uu}var Vu,ly;function XM(){if(ly)return Vu;ly=1;var n=Of(),e=ao(),t;try{t=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var i=!!t&&e&&e(Object.prototype,"__proto__"),s=Object,o=s.getPrototypeOf;return Vu=i&&typeof i.get=="function"?n([i.get]):typeof o=="function"?function(d){return o(d==null?d:s(d))}:!1,Vu}var qu,cy;function Df(){if(cy)return qu;cy=1;var n=hb(),e=fb(),t=XM();return qu=n?function(s){return n(s)}:e?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return e(s)}:t?function(s){return t(s)}:null,qu}var Gu,uy;function pb(){if(uy)return Gu;uy=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=ys();return Gu=t.call(n,e),Gu}var Ku,hy;function gb(){if(hy)return Ku;hy=1;var n,e=cb(),t=IM(),i=OM(),s=DM(),o=PM(),u=ub(),d=ms(),l=BM(),p=NM(),r=FM(),f=WM(),a=HM(),c=zM(),h=jM(),m=VM(),y=Function,v=function(ge){try{return y('"use strict"; return ('+ge+").constructor;")()}catch{}},w=ao(),k=Ol(),_=function(){throw new d},S=w?function(){try{return arguments.callee,_}catch{try{return w(arguments,"callee").get}catch{return _}}}():_,x=GM()(),L=Df(),I=fb(),$=hb(),T=If(),O=$f(),C={},A=typeof Uint8Array>"u"||!L?n:L(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":x&&L?L([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":x&&L?L(L([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!x||!L?n:L(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":s,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!x||!L?n:L(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":x&&L?L(""[Symbol.iterator]()):n,"%Symbol%":x?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":S,"%TypedArray%":A,"%TypeError%":d,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":T,"%Object.defineProperty%":k,"%Object.getPrototypeOf%":I,"%Math.abs%":p,"%Math.floor%":r,"%Math.max%":f,"%Math.min%":a,"%Math.pow%":c,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":$};if(L)try{null.error}catch(ge){var R=L(L(ge));M["%Error.prototype%"]=R}var N=function ge(ue){var G;if(ue==="%AsyncFunction%")G=v("async function () {}");else if(ue==="%GeneratorFunction%")G=v("function* () {}");else if(ue==="%AsyncGeneratorFunction%")G=v("async function* () {}");else if(ue==="%AsyncGenerator%"){var J=ge("%AsyncGeneratorFunction%");J&&(G=J.prototype)}else if(ue==="%AsyncIteratorPrototype%"){var ye=ge("%AsyncGenerator%");ye&&L&&(G=L(ye.prototype))}return M[ue]=G,G},H={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},z=ys(),Y=pb(),K=z.call(O,Array.prototype.concat),re=z.call(T,Array.prototype.splice),fe=z.call(O,String.prototype.replace),U=z.call(O,String.prototype.slice),Q=z.call(O,RegExp.prototype.exec),ie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,te=function(ue){var G=U(ue,0,1),J=U(ue,-1);if(G==="%"&&J!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(J==="%"&&G!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var ye=[];return fe(ue,ie,function(Ae,Oe,Le,Be){ye[ye.length]=Le?fe(Be,V,"$1"):Oe||Ae}),ye},ae=function(ue,G){var J=ue,ye;if(Y(H,J)&&(ye=H[J],J="%"+ye[0]+"%"),Y(M,J)){var Ae=M[J];if(Ae===C&&(Ae=N(J)),typeof Ae>"u"&&!G)throw new d("intrinsic "+ue+" exists, but is not available. Please file an issue!");return{alias:ye,name:J,value:Ae}}throw new u("intrinsic "+ue+" does not exist!")};return Ku=function(ue,G){if(typeof ue!="string"||ue.length===0)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof G!="boolean")throw new d('"allowMissing" argument must be a boolean');if(Q(/^%?[^%]*%?$/,ue)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var J=te(ue),ye=J.length>0?J[0]:"",Ae=ae("%"+ye+"%",G),Oe=Ae.name,Le=Ae.value,Be=!1,mt=Ae.alias;mt&&(ye=mt[0],re(J,K([0,1],mt)));for(var Se=1,Mt=!0;Se<J.length;Se+=1){var at=J[Se],Qe=U(at,0,1),ot=U(at,-1);if((Qe==='"'||Qe==="'"||Qe==="`"||ot==='"'||ot==="'"||ot==="`")&&Qe!==ot)throw new u("property names with quotes must have matching quotes");if((at==="constructor"||!Mt)&&(Be=!0),ye+="."+at,Oe="%"+ye+"%",Y(M,Oe))Le=M[Oe];else if(Le!=null){if(!(at in Le)){if(!G)throw new d("base intrinsic for "+ue+" exists, but the property is not available.");return}if(w&&Se+1>=J.length){var Dt=w(Le,at);Mt=!!Dt,Mt&&"get"in Dt&&!("originalValue"in Dt.get)?Le=Dt.get:Le=Le[at]}else Mt=Y(Le,at),Le=Le[at];Mt&&!Be&&(M[Oe]=Le)}}return Le},Ku}var Yu,fy;function vs(){if(fy)return Yu;fy=1;var n=gb(),e=Of(),t=e([n("%String.prototype.indexOf%")]);return Yu=function(s,o){var u=n(s,!!o);return typeof u=="function"&&t(s,".prototype.")>-1?e([u]):u},Yu}var Xu,dy;function QM(){if(dy)return Xu;dy=1;var n=Il()(),e=vs(),t=e("Object.prototype.toString"),i=function(d){return n&&d&&typeof d=="object"&&Symbol.toStringTag in d?!1:t(d)==="[object Arguments]"},s=function(d){return i(d)?!0:d!==null&&typeof d=="object"&&"length"in d&&typeof d.length=="number"&&d.length>=0&&t(d)!=="[object Array]"&&"callee"in d&&t(d.callee)==="[object Function]"},o=function(){return i(arguments)}();return i.isLegacyArguments=s,Xu=o?i:s,Xu}var Qu,py;function ZM(){if(py)return Qu;py=1;var n=vs(),e=Il()(),t=pb(),i=ao(),s;if(e){var o=n("RegExp.prototype.exec"),u={},d=function(){throw u},l={toString:d,valueOf:d};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=d),s=function(a){if(!a||typeof a!="object")return!1;var c=i(a,"lastIndex"),h=c&&t(c,"value");if(!h)return!1;try{o(a,l)}catch(m){return m===u}}}else{var p=n("Object.prototype.toString"),r="[object RegExp]";s=function(a){return!a||typeof a!="object"&&typeof a!="function"?!1:p(a)===r}}return Qu=s,Qu}var Zu,gy;function JM(){if(gy)return Zu;gy=1;var n=vs(),e=ZM(),t=n("RegExp.prototype.exec"),i=ms();return Zu=function(o){if(!e(o))throw new i("`regex` must be a RegExp");return function(d){return t(o,d)!==null}},Zu}var Ju,my;function eE(){if(my)return Ju;my=1;var n=vs(),e=JM(),t=e(/^\s*(?:function)?\*/),i=Il()(),s=Df(),o=n("Object.prototype.toString"),u=n("Function.prototype.toString"),d=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch{}},l;return Ju=function(r){if(typeof r!="function")return!1;if(t(u(r)))return!0;if(!i){var f=o(r);return f==="[object GeneratorFunction]"}if(!s)return!1;if(typeof l>"u"){var a=d();l=a?s(a):!1}return s(r)===l},Ju}var eh,yy;function tE(){if(yy)return eh;yy=1;var n=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,i;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw i}}),i={},e(function(){throw 42},null,t)}catch(w){w!==i&&(e=null)}else e=null;var s=/^\s*class\b/,o=function(k){try{var _=n.call(k);return s.test(_)}catch{return!1}},u=function(k){try{return o(k)?!1:(n.call(k),!0)}catch{return!1}},d=Object.prototype.toString,l="[object Object]",p="[object Function]",r="[object GeneratorFunction]",f="[object HTMLAllCollection]",a="[object HTML document.all class]",c="[object HTMLCollection]",h=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),y=function(){return!1};if(typeof document=="object"){var v=document.all;d.call(v)===d.call(document.all)&&(y=function(k){if((m||!k)&&(typeof k>"u"||typeof k=="object"))try{var _=d.call(k);return(_===f||_===a||_===c||_===l)&&k("")==null}catch{}return!1})}return eh=e?function(k){if(y(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{e(k,null,t)}catch(_){if(_!==i)return!1}return!o(k)&&u(k)}:function(k){if(y(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(h)return u(k);if(o(k))return!1;var _=d.call(k);return _!==p&&_!==r&&!/^\[object HTML/.test(_)?!1:u(k)},eh}var th,vy;function nE(){if(vy)return th;vy=1;var n=tE(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,i=function(l,p,r){for(var f=0,a=l.length;f<a;f++)t.call(l,f)&&(r==null?p(l[f],f,l):p.call(r,l[f],f,l))},s=function(l,p,r){for(var f=0,a=l.length;f<a;f++)r==null?p(l.charAt(f),f,l):p.call(r,l.charAt(f),f,l)},o=function(l,p,r){for(var f in l)t.call(l,f)&&(r==null?p(l[f],f,l):p.call(r,l[f],f,l))};function u(d){return e.call(d)==="[object Array]"}return th=function(l,p,r){if(!n(p))throw new TypeError("iterator must be a function");var f;arguments.length>=3&&(f=r),u(l)?i(l,p,f):typeof l=="string"?s(l,p,f):o(l,p,f)},th}var nh,by;function iE(){return by||(by=1,nh=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),nh}var ih,wy;function rE(){if(wy)return ih;wy=1;var n=iE(),e=typeof globalThis>"u"?qt:globalThis;return ih=function(){for(var i=[],s=0;s<n.length;s++)typeof e[n[s]]=="function"&&(i[i.length]=n[s]);return i},ih}var rh={exports:{}},oh,_y;function oE(){if(_y)return oh;_y=1;var n=Ol(),e=ub(),t=ms(),i=ao();return oh=function(o,u,d){if(!o||typeof o!="object"&&typeof o!="function")throw new t("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,p=arguments.length>4?arguments[4]:null,r=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,a=!!i&&i(o,u);if(n)n(o,u,{configurable:r===null&&a?a.configurable:!r,enumerable:l===null&&a?a.enumerable:!l,value:d,writable:p===null&&a?a.writable:!p});else if(f||!l&&!p&&!r)o[u]=d;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},oh}var sh,xy;function sE(){if(xy)return sh;xy=1;var n=Ol(),e=function(){return!!n};return e.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},sh=e,sh}var ah,Sy;function aE(){if(Sy)return ah;Sy=1;var n=gb(),e=oE(),t=sE()(),i=ao(),s=ms(),o=n("%Math.floor%");return ah=function(d,l){if(typeof d!="function")throw new s("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||o(l)!==l)throw new s("`length` must be a positive 32-bit integer");var p=arguments.length>2&&!!arguments[2],r=!0,f=!0;if("length"in d&&i){var a=i(d,"length");a&&!a.configurable&&(r=!1),a&&!a.writable&&(f=!1)}return(r||f||!p)&&(t?e(d,"length",l,!0,!0):e(d,"length",l)),d},ah}var lh,Ay;function lE(){if(Ay)return lh;Ay=1;var n=ys(),e=If(),t=db();return lh=function(){return t(n,e,arguments)},lh}var Cy;function cE(){return Cy||(Cy=1,function(n){var e=aE(),t=Ol(),i=Of(),s=lE();n.exports=function(u){var d=i(arguments),l=u.length-(arguments.length-1);return e(d,1+(l>0?l:0),!0)},t?t(n.exports,"apply",{value:s}):n.exports.apply=s}(rh)),rh.exports}var ch,ky;function mb(){if(ky)return ch;ky=1;var n=nE(),e=rE(),t=cE(),i=vs(),s=ao(),o=Df(),u=i("Object.prototype.toString"),d=Il()(),l=typeof globalThis>"u"?qt:globalThis,p=e(),r=i("String.prototype.slice"),f=i("Array.prototype.indexOf",!0)||function(y,v){for(var w=0;w<y.length;w+=1)if(y[w]===v)return w;return-1},a={__proto__:null};d&&s&&o?n(p,function(m){var y=new l[m];if(Symbol.toStringTag in y&&o){var v=o(y),w=s(v,Symbol.toStringTag);if(!w&&v){var k=o(v);w=s(k,Symbol.toStringTag)}a["$"+m]=t(w.get)}}):n(p,function(m){var y=new l[m],v=y.slice||y.set;v&&(a["$"+m]=t(v))});var c=function(y){var v=!1;return n(a,function(w,k){if(!v)try{"$"+w(y)===k&&(v=r(k,1))}catch{}}),v},h=function(y){var v=!1;return n(a,function(w,k){if(!v)try{w(y),v=r(k,1)}catch{}}),v};return ch=function(y){if(!y||typeof y!="object")return!1;if(!d){var v=r(u(y),8,-1);return f(p,v)>-1?v:v!=="Object"?!1:h(y)}return s?c(y):null},ch}var uh,My;function uE(){if(My)return uh;My=1;var n=mb();return uh=function(t){return!!n(t)},uh}var Ey;function hE(){return Ey||(Ey=1,function(n){var e=QM(),t=eE(),i=mb(),s=uE();function o(Se){return Se.call.bind(Se)}var u=typeof BigInt<"u",d=typeof Symbol<"u",l=o(Object.prototype.toString),p=o(Number.prototype.valueOf),r=o(String.prototype.valueOf),f=o(Boolean.prototype.valueOf);if(u)var a=o(BigInt.prototype.valueOf);if(d)var c=o(Symbol.prototype.valueOf);function h(Se,Mt){if(typeof Se!="object")return!1;try{return Mt(Se),!0}catch{return!1}}n.isArgumentsObject=e,n.isGeneratorFunction=t,n.isTypedArray=s;function m(Se){return typeof Promise<"u"&&Se instanceof Promise||Se!==null&&typeof Se=="object"&&typeof Se.then=="function"&&typeof Se.catch=="function"}n.isPromise=m;function y(Se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Se):s(Se)||U(Se)}n.isArrayBufferView=y;function v(Se){return i(Se)==="Uint8Array"}n.isUint8Array=v;function w(Se){return i(Se)==="Uint8ClampedArray"}n.isUint8ClampedArray=w;function k(Se){return i(Se)==="Uint16Array"}n.isUint16Array=k;function _(Se){return i(Se)==="Uint32Array"}n.isUint32Array=_;function S(Se){return i(Se)==="Int8Array"}n.isInt8Array=S;function x(Se){return i(Se)==="Int16Array"}n.isInt16Array=x;function L(Se){return i(Se)==="Int32Array"}n.isInt32Array=L;function I(Se){return i(Se)==="Float32Array"}n.isFloat32Array=I;function $(Se){return i(Se)==="Float64Array"}n.isFloat64Array=$;function T(Se){return i(Se)==="BigInt64Array"}n.isBigInt64Array=T;function O(Se){return i(Se)==="BigUint64Array"}n.isBigUint64Array=O;function C(Se){return l(Se)==="[object Map]"}C.working=typeof Map<"u"&&C(new Map);function A(Se){return typeof Map>"u"?!1:C.working?C(Se):Se instanceof Map}n.isMap=A;function M(Se){return l(Se)==="[object Set]"}M.working=typeof Set<"u"&&M(new Set);function R(Se){return typeof Set>"u"?!1:M.working?M(Se):Se instanceof Set}n.isSet=R;function N(Se){return l(Se)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function H(Se){return typeof WeakMap>"u"?!1:N.working?N(Se):Se instanceof WeakMap}n.isWeakMap=H;function z(Se){return l(Se)==="[object WeakSet]"}z.working=typeof WeakSet<"u"&&z(new WeakSet);function Y(Se){return z(Se)}n.isWeakSet=Y;function K(Se){return l(Se)==="[object ArrayBuffer]"}K.working=typeof ArrayBuffer<"u"&&K(new ArrayBuffer);function re(Se){return typeof ArrayBuffer>"u"?!1:K.working?K(Se):Se instanceof ArrayBuffer}n.isArrayBuffer=re;function fe(Se){return l(Se)==="[object DataView]"}fe.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&fe(new DataView(new ArrayBuffer(1),0,1));function U(Se){return typeof DataView>"u"?!1:fe.working?fe(Se):Se instanceof DataView}n.isDataView=U;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ie(Se){return l(Se)==="[object SharedArrayBuffer]"}function V(Se){return typeof Q>"u"?!1:(typeof ie.working>"u"&&(ie.working=ie(new Q)),ie.working?ie(Se):Se instanceof Q)}n.isSharedArrayBuffer=V;function te(Se){return l(Se)==="[object AsyncFunction]"}n.isAsyncFunction=te;function ae(Se){return l(Se)==="[object Map Iterator]"}n.isMapIterator=ae;function ge(Se){return l(Se)==="[object Set Iterator]"}n.isSetIterator=ge;function ue(Se){return l(Se)==="[object Generator]"}n.isGeneratorObject=ue;function G(Se){return l(Se)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=G;function J(Se){return h(Se,p)}n.isNumberObject=J;function ye(Se){return h(Se,r)}n.isStringObject=ye;function Ae(Se){return h(Se,f)}n.isBooleanObject=Ae;function Oe(Se){return u&&h(Se,a)}n.isBigIntObject=Oe;function Le(Se){return d&&h(Se,c)}n.isSymbolObject=Le;function Be(Se){return J(Se)||ye(Se)||Ae(Se)||Oe(Se)||Le(Se)}n.isBoxedPrimitive=Be;function mt(Se){return typeof Uint8Array<"u"&&(re(Se)||V(Se))}n.isAnyArrayBuffer=mt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Se){Object.defineProperty(n,Se,{enumerable:!1,value:function(){throw new Error(Se+" is not supported in userland")}})})}(du)),du}var hh,Ly;function fE(){return Ly||(Ly=1,hh=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),hh}var Na={exports:{}},Ry;function Ar(){return Ry||(Ry=1,typeof Object.create=="function"?Na.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Na.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}),Na.exports}var Ty;function lo(){return Ty||(Ty=1,function(n){var e={},t=Object.getOwnPropertyDescriptors||function(Q){for(var ie=Object.keys(Q),V={},te=0;te<ie.length;te++)V[ie[te]]=Object.getOwnPropertyDescriptor(Q,ie[te]);return V},i=/%[sdj%]/g;n.format=function(U){if(!x(U)){for(var Q=[],ie=0;ie<arguments.length;ie++)Q.push(d(arguments[ie]));return Q.join(" ")}for(var ie=1,V=arguments,te=V.length,ae=String(U).replace(i,function(ue){if(ue==="%%")return"%";if(ie>=te)return ue;switch(ue){case"%s":return String(V[ie++]);case"%d":return Number(V[ie++]);case"%j":try{return JSON.stringify(V[ie++])}catch{return"[Circular]"}default:return ue}}),ge=V[ie];ie<te;ge=V[++ie])k(ge)||!T(ge)?ae+=" "+ge:ae+=" "+d(ge);return ae},n.deprecate=function(U,Q){if(typeof rt<"u"&&rt.noDeprecation===!0)return U;if(typeof rt>"u")return function(){return n.deprecate(U,Q).apply(this,arguments)};var ie=!1;function V(){if(!ie){if(rt.throwDeprecation)throw new Error(Q);rt.traceDeprecation?console.trace(Q):console.error(Q),ie=!0}return U.apply(this,arguments)}return V};var s={},o=/^$/;if(e.NODE_DEBUG){var u=e.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+u+"$","i")}n.debuglog=function(U){if(U=U.toUpperCase(),!s[U])if(o.test(U)){var Q=rt.pid;s[U]=function(){var ie=n.format.apply(n,arguments);console.error("%s %d: %s",U,Q,ie)}}else s[U]=function(){};return s[U]};function d(U,Q){var ie={seen:[],stylize:p};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),w(Q)?ie.showHidden=Q:Q&&n._extend(ie,Q),I(ie.showHidden)&&(ie.showHidden=!1),I(ie.depth)&&(ie.depth=2),I(ie.colors)&&(ie.colors=!1),I(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=l),f(ie,U,ie.depth)}n.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(U,Q){var ie=d.styles[Q];return ie?"\x1B["+d.colors[ie][0]+"m"+U+"\x1B["+d.colors[ie][1]+"m":U}function p(U,Q){return U}function r(U){var Q={};return U.forEach(function(ie,V){Q[ie]=!0}),Q}function f(U,Q,ie){if(U.customInspect&&Q&&A(Q.inspect)&&Q.inspect!==n.inspect&&!(Q.constructor&&Q.constructor.prototype===Q)){var V=Q.inspect(ie,U);return x(V)||(V=f(U,V,ie)),V}var te=a(U,Q);if(te)return te;var ae=Object.keys(Q),ge=r(ae);if(U.showHidden&&(ae=Object.getOwnPropertyNames(Q)),C(Q)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return c(Q);if(ae.length===0){if(A(Q)){var ue=Q.name?": "+Q.name:"";return U.stylize("[Function"+ue+"]","special")}if($(Q))return U.stylize(RegExp.prototype.toString.call(Q),"regexp");if(O(Q))return U.stylize(Date.prototype.toString.call(Q),"date");if(C(Q))return c(Q)}var G="",J=!1,ye=["{","}"];if(v(Q)&&(J=!0,ye=["[","]"]),A(Q)){var Ae=Q.name?": "+Q.name:"";G=" [Function"+Ae+"]"}if($(Q)&&(G=" "+RegExp.prototype.toString.call(Q)),O(Q)&&(G=" "+Date.prototype.toUTCString.call(Q)),C(Q)&&(G=" "+c(Q)),ae.length===0&&(!J||Q.length==0))return ye[0]+G+ye[1];if(ie<0)return $(Q)?U.stylize(RegExp.prototype.toString.call(Q),"regexp"):U.stylize("[Object]","special");U.seen.push(Q);var Oe;return J?Oe=h(U,Q,ie,ge,ae):Oe=ae.map(function(Le){return m(U,Q,ie,ge,Le,J)}),U.seen.pop(),y(Oe,G,ye)}function a(U,Q){if(I(Q))return U.stylize("undefined","undefined");if(x(Q)){var ie="'"+JSON.stringify(Q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(ie,"string")}if(S(Q))return U.stylize(""+Q,"number");if(w(Q))return U.stylize(""+Q,"boolean");if(k(Q))return U.stylize("null","null")}function c(U){return"["+Error.prototype.toString.call(U)+"]"}function h(U,Q,ie,V,te){for(var ae=[],ge=0,ue=Q.length;ge<ue;++ge)Y(Q,String(ge))?ae.push(m(U,Q,ie,V,String(ge),!0)):ae.push("");return te.forEach(function(G){G.match(/^\d+$/)||ae.push(m(U,Q,ie,V,G,!0))}),ae}function m(U,Q,ie,V,te,ae){var ge,ue,G;if(G=Object.getOwnPropertyDescriptor(Q,te)||{value:Q[te]},G.get?G.set?ue=U.stylize("[Getter/Setter]","special"):ue=U.stylize("[Getter]","special"):G.set&&(ue=U.stylize("[Setter]","special")),Y(V,te)||(ge="["+te+"]"),ue||(U.seen.indexOf(G.value)<0?(k(ie)?ue=f(U,G.value,null):ue=f(U,G.value,ie-1),ue.indexOf(`
|
|
97
|
+
`)>-1&&(ae?ue=ue.split(`
|
|
98
|
+
`).map(function(J){return" "+J}).join(`
|
|
99
|
+
`).slice(2):ue=`
|
|
100
|
+
`+ue.split(`
|
|
101
|
+
`).map(function(J){return" "+J}).join(`
|
|
102
|
+
`))):ue=U.stylize("[Circular]","special")),I(ge)){if(ae&&te.match(/^\d+$/))return ue;ge=JSON.stringify(""+te),ge.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ge=ge.slice(1,-1),ge=U.stylize(ge,"name")):(ge=ge.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ge=U.stylize(ge,"string"))}return ge+": "+ue}function y(U,Q,ie){var V=U.reduce(function(te,ae){return ae.indexOf(`
|
|
103
|
+
`)>=0,te+ae.replace(/\u001b\[\d\d?m/g,"").length+1},0);return V>60?ie[0]+(Q===""?"":Q+`
|
|
104
|
+
`)+" "+U.join(`,
|
|
105
|
+
`)+" "+ie[1]:ie[0]+Q+" "+U.join(", ")+" "+ie[1]}n.types=hE();function v(U){return Array.isArray(U)}n.isArray=v;function w(U){return typeof U=="boolean"}n.isBoolean=w;function k(U){return U===null}n.isNull=k;function _(U){return U==null}n.isNullOrUndefined=_;function S(U){return typeof U=="number"}n.isNumber=S;function x(U){return typeof U=="string"}n.isString=x;function L(U){return typeof U=="symbol"}n.isSymbol=L;function I(U){return U===void 0}n.isUndefined=I;function $(U){return T(U)&&R(U)==="[object RegExp]"}n.isRegExp=$,n.types.isRegExp=$;function T(U){return typeof U=="object"&&U!==null}n.isObject=T;function O(U){return T(U)&&R(U)==="[object Date]"}n.isDate=O,n.types.isDate=O;function C(U){return T(U)&&(R(U)==="[object Error]"||U instanceof Error)}n.isError=C,n.types.isNativeError=C;function A(U){return typeof U=="function"}n.isFunction=A;function M(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}n.isPrimitive=M,n.isBuffer=fE();function R(U){return Object.prototype.toString.call(U)}function N(U){return U<10?"0"+U.toString(10):U.toString(10)}var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(){var U=new Date,Q=[N(U.getHours()),N(U.getMinutes()),N(U.getSeconds())].join(":");return[U.getDate(),H[U.getMonth()],Q].join(" ")}n.log=function(){console.log("%s - %s",z(),n.format.apply(n,arguments))},n.inherits=Ar(),n._extend=function(U,Q){if(!Q||!T(Q))return U;for(var ie=Object.keys(Q),V=ie.length;V--;)U[ie[V]]=Q[ie[V]];return U};function Y(U,Q){return Object.prototype.hasOwnProperty.call(U,Q)}var K=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(Q){if(typeof Q!="function")throw new TypeError('The "original" argument must be of type Function');if(K&&Q[K]){var ie=Q[K];if(typeof ie!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ie,K,{value:ie,enumerable:!1,writable:!1,configurable:!0}),ie}function ie(){for(var V,te,ae=new Promise(function(G,J){V=G,te=J}),ge=[],ue=0;ue<arguments.length;ue++)ge.push(arguments[ue]);ge.push(function(G,J){G?te(G):V(J)});try{Q.apply(this,ge)}catch(G){te(G)}return ae}return Object.setPrototypeOf(ie,Object.getPrototypeOf(Q)),K&&Object.defineProperty(ie,K,{value:ie,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ie,t(Q))},n.promisify.custom=K;function re(U,Q){if(!U){var ie=new Error("Promise was rejected with a falsy value");ie.reason=U,U=ie}return Q(U)}function fe(U){if(typeof U!="function")throw new TypeError('The "original" argument must be of type Function');function Q(){for(var ie=[],V=0;V<arguments.length;V++)ie.push(arguments[V]);var te=ie.pop();if(typeof te!="function")throw new TypeError("The last argument must be of type Function");var ae=this,ge=function(){return te.apply(ae,arguments)};U.apply(this,ie).then(function(ue){rt.nextTick(ge.bind(null,null,ue))},function(ue){rt.nextTick(re.bind(null,ue,ge))})}return Object.setPrototypeOf(Q,Object.getPrototypeOf(U)),Object.defineProperties(Q,t(U)),Q}n.callbackify=fe}(fu)),fu}var fh,$y;function Pf(){if($y)return fh;$y=1;var n=[].slice;return fh=function(e,t){if(typeof t=="string"&&(t=e[t]),typeof t!="function")throw new Error("bind() requires a function");var i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}},fh}var dh,Iy;function yb(){return Iy||(Iy=1,dh=ro().EventEmitter),dh}var ph={},Oy;function Dl(){return Oy||(Oy=1,function(n){Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e={},t={};t.byteLength=r,t.toByteArray=a,t.fromByteArray=m;for(var i=[],s=[],o=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,l=u.length;d<l;++d)i[d]=u[d],s[u.charCodeAt(d)]=d;s[45]=62,s[95]=63;function p(w){var k=w.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=w.indexOf("=");_===-1&&(_=k);var S=_===k?0:4-_%4;return[_,S]}function r(w){var k=p(w),_=k[0],S=k[1];return(_+S)*3/4-S}function f(w,k,_){return(k+_)*3/4-_}function a(w){var k,_=p(w),S=_[0],x=_[1],L=new o(f(w,S,x)),I=0,$=x>0?S-4:S,T;for(T=0;T<$;T+=4)k=s[w.charCodeAt(T)]<<18|s[w.charCodeAt(T+1)]<<12|s[w.charCodeAt(T+2)]<<6|s[w.charCodeAt(T+3)],L[I++]=k>>16&255,L[I++]=k>>8&255,L[I++]=k&255;return x===2&&(k=s[w.charCodeAt(T)]<<2|s[w.charCodeAt(T+1)]>>4,L[I++]=k&255),x===1&&(k=s[w.charCodeAt(T)]<<10|s[w.charCodeAt(T+1)]<<4|s[w.charCodeAt(T+2)]>>2,L[I++]=k>>8&255,L[I++]=k&255),L}function c(w){return i[w>>18&63]+i[w>>12&63]+i[w>>6&63]+i[w&63]}function h(w,k,_){for(var S,x=[],L=k;L<_;L+=3)S=(w[L]<<16&16711680)+(w[L+1]<<8&65280)+(w[L+2]&255),x.push(c(S));return x.join("")}function m(w){for(var k,_=w.length,S=_%3,x=[],L=16383,I=0,$=_-S;I<$;I+=L)x.push(h(w,I,I+L>$?$:I+L));return S===1?(k=w[_-1],x.push(i[k>>2]+i[k<<4&63]+"==")):S===2&&(k=(w[_-2]<<8)+w[_-1],x.push(i[k>>10]+i[k>>4&63]+i[k<<2&63]+"=")),x.join("")}var y={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */y.read=function(w,k,_,S,x){var L,I,$=x*8-S-1,T=(1<<$)-1,O=T>>1,C=-7,A=_?x-1:0,M=_?-1:1,R=w[k+A];for(A+=M,L=R&(1<<-C)-1,R>>=-C,C+=$;C>0;L=L*256+w[k+A],A+=M,C-=8);for(I=L&(1<<-C)-1,L>>=-C,C+=S;C>0;I=I*256+w[k+A],A+=M,C-=8);if(L===0)L=1-O;else{if(L===T)return I?NaN:(R?-1:1)*(1/0);I=I+Math.pow(2,S),L=L-O}return(R?-1:1)*I*Math.pow(2,L-S)},y.write=function(w,k,_,S,x,L){var I,$,T,O=L*8-x-1,C=(1<<O)-1,A=C>>1,M=x===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=S?0:L-1,N=S?1:-1,H=k<0||k===0&&1/k<0?1:0;for(k=Math.abs(k),isNaN(k)||k===1/0?($=isNaN(k)?1:0,I=C):(I=Math.floor(Math.log(k)/Math.LN2),k*(T=Math.pow(2,-I))<1&&(I--,T*=2),I+A>=1?k+=M/T:k+=M*Math.pow(2,1-A),k*T>=2&&(I++,T/=2),I+A>=C?($=0,I=C):I+A>=1?($=(k*T-1)*Math.pow(2,x),I=I+A):($=k*Math.pow(2,A-1)*Math.pow(2,x),I=0));x>=8;w[_+R]=$&255,R+=N,$/=256,x-=8);for(I=I<<x|$,O+=x;O>0;w[_+R]=I&255,R+=N,I/=256,O-=8);w[_+R-N]|=H*128};/*!
|
|
106
|
+
* The buffer module from node.js, for the browser.
|
|
107
|
+
*
|
|
108
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
109
|
+
* @license MIT
|
|
110
|
+
*/(function(w){const k=t,_=y,S=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;w.Buffer=C,w.SlowBuffer=U,w.INSPECT_MAX_BYTES=50;const x=2147483647;w.kMaxLength=x;const{Uint8Array:L,ArrayBuffer:I,SharedArrayBuffer:$}=globalThis;C.TYPED_ARRAY_SUPPORT=T(),!C.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function T(){try{const X=new L(1),B={foo:function(){return 42}};return Object.setPrototypeOf(B,L.prototype),Object.setPrototypeOf(X,B),X.foo()===42}catch{return!1}}Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}}),Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function O(X){if(X>x)throw new RangeError('The value "'+X+'" is invalid for option "size"');const B=new L(X);return Object.setPrototypeOf(B,C.prototype),B}function C(X,B,W){if(typeof X=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(X)}return A(X,B,W)}C.poolSize=8192;function A(X,B,W){if(typeof X=="string")return H(X,B);if(I.isView(X))return Y(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(Rn(X,I)||X&&Rn(X.buffer,I)||typeof $<"u"&&(Rn(X,$)||X&&Rn(X.buffer,$)))return K(X,B,W);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const oe=X.valueOf&&X.valueOf();if(oe!=null&&oe!==X)return C.from(oe,B,W);const he=re(X);if(he)return he;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return C.from(X[Symbol.toPrimitive]("string"),B,W);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}C.from=function(X,B,W){return A(X,B,W)},Object.setPrototypeOf(C.prototype,L.prototype),Object.setPrototypeOf(C,L);function M(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function R(X,B,W){return M(X),X<=0?O(X):B!==void 0?typeof W=="string"?O(X).fill(B,W):O(X).fill(B):O(X)}C.alloc=function(X,B,W){return R(X,B,W)};function N(X){return M(X),O(X<0?0:fe(X)|0)}C.allocUnsafe=function(X){return N(X)},C.allocUnsafeSlow=function(X){return N(X)};function H(X,B){if((typeof B!="string"||B==="")&&(B="utf8"),!C.isEncoding(B))throw new TypeError("Unknown encoding: "+B);const W=Q(X,B)|0;let oe=O(W);const he=oe.write(X,B);return he!==W&&(oe=oe.slice(0,he)),oe}function z(X){const B=X.length<0?0:fe(X.length)|0,W=O(B);for(let oe=0;oe<B;oe+=1)W[oe]=X[oe]&255;return W}function Y(X){if(Rn(X,L)){const B=new L(X);return K(B.buffer,B.byteOffset,B.byteLength)}return z(X)}function K(X,B,W){if(B<0||X.byteLength<B)throw new RangeError('"offset" is outside of buffer bounds');if(X.byteLength<B+(W||0))throw new RangeError('"length" is outside of buffer bounds');let oe;return B===void 0&&W===void 0?oe=new L(X):W===void 0?oe=new L(X,B):oe=new L(X,B,W),Object.setPrototypeOf(oe,C.prototype),oe}function re(X){if(C.isBuffer(X)){const B=fe(X.length)|0,W=O(B);return W.length===0||X.copy(W,0,0,B),W}if(X.length!==void 0)return typeof X.length!="number"||ho(X.length)?O(0):z(X);if(X.type==="Buffer"&&Array.isArray(X.data))return z(X.data)}function fe(X){if(X>=x)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+x.toString(16)+" bytes");return X|0}function U(X){return+X!=X&&(X=0),C.alloc(+X)}C.isBuffer=function(B){return B!=null&&B._isBuffer===!0&&B!==C.prototype},C.compare=function(B,W){if(Rn(B,L)&&(B=C.from(B,B.offset,B.byteLength)),Rn(W,L)&&(W=C.from(W,W.offset,W.byteLength)),!C.isBuffer(B)||!C.isBuffer(W))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(B===W)return 0;let oe=B.length,he=W.length;for(let ve=0,Ce=Math.min(oe,he);ve<Ce;++ve)if(B[ve]!==W[ve]){oe=B[ve],he=W[ve];break}return oe<he?-1:he<oe?1:0},C.isEncoding=function(B){switch(String(B).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},C.concat=function(B,W){if(!Array.isArray(B))throw new TypeError('"list" argument must be an Array of Buffers');if(B.length===0)return C.alloc(0);let oe;if(W===void 0)for(W=0,oe=0;oe<B.length;++oe)W+=B[oe].length;const he=C.allocUnsafe(W);let ve=0;for(oe=0;oe<B.length;++oe){let Ce=B[oe];if(Rn(Ce,L))ve+Ce.length>he.length?(C.isBuffer(Ce)||(Ce=C.from(Ce)),Ce.copy(he,ve)):L.prototype.set.call(he,Ce,ve);else if(C.isBuffer(Ce))Ce.copy(he,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=Ce.length}return he};function Q(X,B){if(C.isBuffer(X))return X.length;if(I.isView(X)||Rn(X,I))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);const W=X.length,oe=arguments.length>2&&arguments[2]===!0;if(!oe&&W===0)return 0;let he=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return W;case"utf8":case"utf-8":return ct(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W*2;case"hex":return W>>>1;case"base64":return lt(X).length;default:if(he)return oe?-1:ct(X).length;B=(""+B).toLowerCase(),he=!0}}C.byteLength=Q;function ie(X,B,W){let oe=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((W===void 0||W>this.length)&&(W=this.length),W<=0)||(W>>>=0,B>>>=0,W<=B))return"";for(X||(X="utf8");;)switch(X){case"hex":return Mt(this,B,W);case"utf8":case"utf-8":return Oe(this,B,W);case"ascii":return mt(this,B,W);case"latin1":case"binary":return Se(this,B,W);case"base64":return Ae(this,B,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,B,W);default:if(oe)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),oe=!0}}C.prototype._isBuffer=!0;function V(X,B,W){const oe=X[B];X[B]=X[W],X[W]=oe}C.prototype.swap16=function(){const B=this.length;if(B%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let W=0;W<B;W+=2)V(this,W,W+1);return this},C.prototype.swap32=function(){const B=this.length;if(B%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let W=0;W<B;W+=4)V(this,W,W+3),V(this,W+1,W+2);return this},C.prototype.swap64=function(){const B=this.length;if(B%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let W=0;W<B;W+=8)V(this,W,W+7),V(this,W+1,W+6),V(this,W+2,W+5),V(this,W+3,W+4);return this},C.prototype.toString=function(){const B=this.length;return B===0?"":arguments.length===0?Oe(this,0,B):ie.apply(this,arguments)},C.prototype.toLocaleString=C.prototype.toString,C.prototype.equals=function(B){if(!C.isBuffer(B))throw new TypeError("Argument must be a Buffer");return this===B?!0:C.compare(this,B)===0},C.prototype.inspect=function(){let B="";const W=w.INSPECT_MAX_BYTES;return B=this.toString("hex",0,W).replace(/(.{2})/g,"$1 ").trim(),this.length>W&&(B+=" ... "),"<Buffer "+B+">"},S&&(C.prototype[S]=C.prototype.inspect),C.prototype.compare=function(B,W,oe,he,ve){if(Rn(B,L)&&(B=C.from(B,B.offset,B.byteLength)),!C.isBuffer(B))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof B);if(W===void 0&&(W=0),oe===void 0&&(oe=B?B.length:0),he===void 0&&(he=0),ve===void 0&&(ve=this.length),W<0||oe>B.length||he<0||ve>this.length)throw new RangeError("out of range index");if(he>=ve&&W>=oe)return 0;if(he>=ve)return-1;if(W>=oe)return 1;if(W>>>=0,oe>>>=0,he>>>=0,ve>>>=0,this===B)return 0;let Ce=ve-he,Ye=oe-W;const Et=Math.min(Ce,Ye),wt=this.slice(he,ve),Lt=B.slice(W,oe);for(let ft=0;ft<Et;++ft)if(wt[ft]!==Lt[ft]){Ce=wt[ft],Ye=Lt[ft];break}return Ce<Ye?-1:Ye<Ce?1:0};function te(X,B,W,oe,he){if(X.length===0)return-1;if(typeof W=="string"?(oe=W,W=0):W>2147483647?W=2147483647:W<-2147483648&&(W=-2147483648),W=+W,ho(W)&&(W=he?0:X.length-1),W<0&&(W=X.length+W),W>=X.length){if(he)return-1;W=X.length-1}else if(W<0)if(he)W=0;else return-1;if(typeof B=="string"&&(B=C.from(B,oe)),C.isBuffer(B))return B.length===0?-1:ae(X,B,W,oe,he);if(typeof B=="number")return B=B&255,typeof L.prototype.indexOf=="function"?he?L.prototype.indexOf.call(X,B,W):L.prototype.lastIndexOf.call(X,B,W):ae(X,[B],W,oe,he);throw new TypeError("val must be string, number or Buffer")}function ae(X,B,W,oe,he){let ve=1,Ce=X.length,Ye=B.length;if(oe!==void 0&&(oe=String(oe).toLowerCase(),oe==="ucs2"||oe==="ucs-2"||oe==="utf16le"||oe==="utf-16le")){if(X.length<2||B.length<2)return-1;ve=2,Ce/=2,Ye/=2,W/=2}function Et(Lt,ft){return ve===1?Lt[ft]:Lt.readUInt16BE(ft*ve)}let wt;if(he){let Lt=-1;for(wt=W;wt<Ce;wt++)if(Et(X,wt)===Et(B,Lt===-1?0:wt-Lt)){if(Lt===-1&&(Lt=wt),wt-Lt+1===Ye)return Lt*ve}else Lt!==-1&&(wt-=wt-Lt),Lt=-1}else for(W+Ye>Ce&&(W=Ce-Ye),wt=W;wt>=0;wt--){let Lt=!0;for(let ft=0;ft<Ye;ft++)if(Et(X,wt+ft)!==Et(B,ft)){Lt=!1;break}if(Lt)return wt}return-1}C.prototype.includes=function(B,W,oe){return this.indexOf(B,W,oe)!==-1},C.prototype.indexOf=function(B,W,oe){return te(this,B,W,oe,!0)},C.prototype.lastIndexOf=function(B,W,oe){return te(this,B,W,oe,!1)};function ge(X,B,W,oe){W=Number(W)||0;const he=X.length-W;oe?(oe=Number(oe),oe>he&&(oe=he)):oe=he;const ve=B.length;oe>ve/2&&(oe=ve/2);let Ce;for(Ce=0;Ce<oe;++Ce){const Ye=parseInt(B.substr(Ce*2,2),16);if(ho(Ye))return Ce;X[W+Ce]=Ye}return Ce}function ue(X,B,W,oe){return er(ct(B,X.length-W),X,W,oe)}function G(X,B,W,oe){return er(gt(B),X,W,oe)}function J(X,B,W,oe){return er(lt(B),X,W,oe)}function ye(X,B,W,oe){return er(bt(B,X.length-W),X,W,oe)}C.prototype.write=function(B,W,oe,he){if(W===void 0)he="utf8",oe=this.length,W=0;else if(oe===void 0&&typeof W=="string")he=W,oe=this.length,W=0;else if(isFinite(W))W=W>>>0,isFinite(oe)?(oe=oe>>>0,he===void 0&&(he="utf8")):(he=oe,oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ve=this.length-W;if((oe===void 0||oe>ve)&&(oe=ve),B.length>0&&(oe<0||W<0)||W>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");let Ce=!1;for(;;)switch(he){case"hex":return ge(this,B,W,oe);case"utf8":case"utf-8":return ue(this,B,W,oe);case"ascii":case"latin1":case"binary":return G(this,B,W,oe);case"base64":return J(this,B,W,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,B,W,oe);default:if(Ce)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Ce=!0}},C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ae(X,B,W){return B===0&&W===X.length?k.fromByteArray(X):k.fromByteArray(X.slice(B,W))}function Oe(X,B,W){W=Math.min(X.length,W);const oe=[];let he=B;for(;he<W;){const ve=X[he];let Ce=null,Ye=ve>239?4:ve>223?3:ve>191?2:1;if(he+Ye<=W){let Et,wt,Lt,ft;switch(Ye){case 1:ve<128&&(Ce=ve);break;case 2:Et=X[he+1],(Et&192)===128&&(ft=(ve&31)<<6|Et&63,ft>127&&(Ce=ft));break;case 3:Et=X[he+1],wt=X[he+2],(Et&192)===128&&(wt&192)===128&&(ft=(ve&15)<<12|(Et&63)<<6|wt&63,ft>2047&&(ft<55296||ft>57343)&&(Ce=ft));break;case 4:Et=X[he+1],wt=X[he+2],Lt=X[he+3],(Et&192)===128&&(wt&192)===128&&(Lt&192)===128&&(ft=(ve&15)<<18|(Et&63)<<12|(wt&63)<<6|Lt&63,ft>65535&&ft<1114112&&(Ce=ft))}}Ce===null?(Ce=65533,Ye=1):Ce>65535&&(Ce-=65536,oe.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),oe.push(Ce),he+=Ye}return Be(oe)}const Le=4096;function Be(X){const B=X.length;if(B<=Le)return String.fromCharCode.apply(String,X);let W="",oe=0;for(;oe<B;)W+=String.fromCharCode.apply(String,X.slice(oe,oe+=Le));return W}function mt(X,B,W){let oe="";W=Math.min(X.length,W);for(let he=B;he<W;++he)oe+=String.fromCharCode(X[he]&127);return oe}function Se(X,B,W){let oe="";W=Math.min(X.length,W);for(let he=B;he<W;++he)oe+=String.fromCharCode(X[he]);return oe}function Mt(X,B,W){const oe=X.length;(!B||B<0)&&(B=0),(!W||W<0||W>oe)&&(W=oe);let he="";for(let ve=B;ve<W;++ve)he+=Gl[X[ve]];return he}function at(X,B,W){const oe=X.slice(B,W);let he="";for(let ve=0;ve<oe.length-1;ve+=2)he+=String.fromCharCode(oe[ve]+oe[ve+1]*256);return he}C.prototype.slice=function(B,W){const oe=this.length;B=~~B,W=W===void 0?oe:~~W,B<0?(B+=oe,B<0&&(B=0)):B>oe&&(B=oe),W<0?(W+=oe,W<0&&(W=0)):W>oe&&(W=oe),W<B&&(W=B);const he=this.subarray(B,W);return Object.setPrototypeOf(he,C.prototype),he};function Qe(X,B,W){if(X%1!==0||X<0)throw new RangeError("offset is not uint");if(X+B>W)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(B,W,oe){B=B>>>0,W=W>>>0,oe||Qe(B,W,this.length);let he=this[B],ve=1,Ce=0;for(;++Ce<W&&(ve*=256);)he+=this[B+Ce]*ve;return he},C.prototype.readUintBE=C.prototype.readUIntBE=function(B,W,oe){B=B>>>0,W=W>>>0,oe||Qe(B,W,this.length);let he=this[B+--W],ve=1;for(;W>0&&(ve*=256);)he+=this[B+--W]*ve;return he},C.prototype.readUint8=C.prototype.readUInt8=function(B,W){return B=B>>>0,W||Qe(B,1,this.length),this[B]},C.prototype.readUint16LE=C.prototype.readUInt16LE=function(B,W){return B=B>>>0,W||Qe(B,2,this.length),this[B]|this[B+1]<<8},C.prototype.readUint16BE=C.prototype.readUInt16BE=function(B,W){return B=B>>>0,W||Qe(B,2,this.length),this[B]<<8|this[B+1]},C.prototype.readUint32LE=C.prototype.readUInt32LE=function(B,W){return B=B>>>0,W||Qe(B,4,this.length),(this[B]|this[B+1]<<8|this[B+2]<<16)+this[B+3]*16777216},C.prototype.readUint32BE=C.prototype.readUInt32BE=function(B,W){return B=B>>>0,W||Qe(B,4,this.length),this[B]*16777216+(this[B+1]<<16|this[B+2]<<8|this[B+3])},C.prototype.readBigUInt64LE=ei(function(B){B=B>>>0,le(B,"offset");const W=this[B],oe=this[B+7];(W===void 0||oe===void 0)&&pe(B,this.length-8);const he=W+this[++B]*2**8+this[++B]*2**16+this[++B]*2**24,ve=this[++B]+this[++B]*2**8+this[++B]*2**16+oe*2**24;return BigInt(he)+(BigInt(ve)<<BigInt(32))}),C.prototype.readBigUInt64BE=ei(function(B){B=B>>>0,le(B,"offset");const W=this[B],oe=this[B+7];(W===void 0||oe===void 0)&&pe(B,this.length-8);const he=W*2**24+this[++B]*2**16+this[++B]*2**8+this[++B],ve=this[++B]*2**24+this[++B]*2**16+this[++B]*2**8+oe;return(BigInt(he)<<BigInt(32))+BigInt(ve)}),C.prototype.readIntLE=function(B,W,oe){B=B>>>0,W=W>>>0,oe||Qe(B,W,this.length);let he=this[B],ve=1,Ce=0;for(;++Ce<W&&(ve*=256);)he+=this[B+Ce]*ve;return ve*=128,he>=ve&&(he-=Math.pow(2,8*W)),he},C.prototype.readIntBE=function(B,W,oe){B=B>>>0,W=W>>>0,oe||Qe(B,W,this.length);let he=W,ve=1,Ce=this[B+--he];for(;he>0&&(ve*=256);)Ce+=this[B+--he]*ve;return ve*=128,Ce>=ve&&(Ce-=Math.pow(2,8*W)),Ce},C.prototype.readInt8=function(B,W){return B=B>>>0,W||Qe(B,1,this.length),this[B]&128?(255-this[B]+1)*-1:this[B]},C.prototype.readInt16LE=function(B,W){B=B>>>0,W||Qe(B,2,this.length);const oe=this[B]|this[B+1]<<8;return oe&32768?oe|4294901760:oe},C.prototype.readInt16BE=function(B,W){B=B>>>0,W||Qe(B,2,this.length);const oe=this[B+1]|this[B]<<8;return oe&32768?oe|4294901760:oe},C.prototype.readInt32LE=function(B,W){return B=B>>>0,W||Qe(B,4,this.length),this[B]|this[B+1]<<8|this[B+2]<<16|this[B+3]<<24},C.prototype.readInt32BE=function(B,W){return B=B>>>0,W||Qe(B,4,this.length),this[B]<<24|this[B+1]<<16|this[B+2]<<8|this[B+3]},C.prototype.readBigInt64LE=ei(function(B){B=B>>>0,le(B,"offset");const W=this[B],oe=this[B+7];(W===void 0||oe===void 0)&&pe(B,this.length-8);const he=this[B+4]+this[B+5]*2**8+this[B+6]*2**16+(oe<<24);return(BigInt(he)<<BigInt(32))+BigInt(W+this[++B]*2**8+this[++B]*2**16+this[++B]*2**24)}),C.prototype.readBigInt64BE=ei(function(B){B=B>>>0,le(B,"offset");const W=this[B],oe=this[B+7];(W===void 0||oe===void 0)&&pe(B,this.length-8);const he=(W<<24)+this[++B]*2**16+this[++B]*2**8+this[++B];return(BigInt(he)<<BigInt(32))+BigInt(this[++B]*2**24+this[++B]*2**16+this[++B]*2**8+oe)}),C.prototype.readFloatLE=function(B,W){return B=B>>>0,W||Qe(B,4,this.length),_.read(this,B,!0,23,4)},C.prototype.readFloatBE=function(B,W){return B=B>>>0,W||Qe(B,4,this.length),_.read(this,B,!1,23,4)},C.prototype.readDoubleLE=function(B,W){return B=B>>>0,W||Qe(B,8,this.length),_.read(this,B,!0,52,8)},C.prototype.readDoubleBE=function(B,W){return B=B>>>0,W||Qe(B,8,this.length),_.read(this,B,!1,52,8)};function ot(X,B,W,oe,he,ve){if(!C.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>he||B<ve)throw new RangeError('"value" argument is out of bounds');if(W+oe>X.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(B,W,oe,he){if(B=+B,W=W>>>0,oe=oe>>>0,!he){const Ye=Math.pow(2,8*oe)-1;ot(this,B,W,oe,Ye,0)}let ve=1,Ce=0;for(this[W]=B&255;++Ce<oe&&(ve*=256);)this[W+Ce]=B/ve&255;return W+oe},C.prototype.writeUintBE=C.prototype.writeUIntBE=function(B,W,oe,he){if(B=+B,W=W>>>0,oe=oe>>>0,!he){const Ye=Math.pow(2,8*oe)-1;ot(this,B,W,oe,Ye,0)}let ve=oe-1,Ce=1;for(this[W+ve]=B&255;--ve>=0&&(Ce*=256);)this[W+ve]=B/Ce&255;return W+oe},C.prototype.writeUint8=C.prototype.writeUInt8=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,1,255,0),this[W]=B&255,W+1},C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,2,65535,0),this[W]=B&255,this[W+1]=B>>>8,W+2},C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,2,65535,0),this[W]=B>>>8,this[W+1]=B&255,W+2},C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,4,4294967295,0),this[W+3]=B>>>24,this[W+2]=B>>>16,this[W+1]=B>>>8,this[W]=B&255,W+4},C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,4,4294967295,0),this[W]=B>>>24,this[W+1]=B>>>16,this[W+2]=B>>>8,this[W+3]=B&255,W+4};function Dt(X,B,W,oe,he){ne(B,oe,he,X,W,7);let ve=Number(B&BigInt(4294967295));X[W++]=ve,ve=ve>>8,X[W++]=ve,ve=ve>>8,X[W++]=ve,ve=ve>>8,X[W++]=ve;let Ce=Number(B>>BigInt(32)&BigInt(4294967295));return X[W++]=Ce,Ce=Ce>>8,X[W++]=Ce,Ce=Ce>>8,X[W++]=Ce,Ce=Ce>>8,X[W++]=Ce,W}function yt(X,B,W,oe,he){ne(B,oe,he,X,W,7);let ve=Number(B&BigInt(4294967295));X[W+7]=ve,ve=ve>>8,X[W+6]=ve,ve=ve>>8,X[W+5]=ve,ve=ve>>8,X[W+4]=ve;let Ce=Number(B>>BigInt(32)&BigInt(4294967295));return X[W+3]=Ce,Ce=Ce>>8,X[W+2]=Ce,Ce=Ce>>8,X[W+1]=Ce,Ce=Ce>>8,X[W]=Ce,W+8}C.prototype.writeBigUInt64LE=ei(function(B,W=0){return Dt(this,B,W,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeBigUInt64BE=ei(function(B,W=0){return yt(this,B,W,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeIntLE=function(B,W,oe,he){if(B=+B,W=W>>>0,!he){const Et=Math.pow(2,8*oe-1);ot(this,B,W,oe,Et-1,-Et)}let ve=0,Ce=1,Ye=0;for(this[W]=B&255;++ve<oe&&(Ce*=256);)B<0&&Ye===0&&this[W+ve-1]!==0&&(Ye=1),this[W+ve]=(B/Ce>>0)-Ye&255;return W+oe},C.prototype.writeIntBE=function(B,W,oe,he){if(B=+B,W=W>>>0,!he){const Et=Math.pow(2,8*oe-1);ot(this,B,W,oe,Et-1,-Et)}let ve=oe-1,Ce=1,Ye=0;for(this[W+ve]=B&255;--ve>=0&&(Ce*=256);)B<0&&Ye===0&&this[W+ve+1]!==0&&(Ye=1),this[W+ve]=(B/Ce>>0)-Ye&255;return W+oe},C.prototype.writeInt8=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,1,127,-128),B<0&&(B=255+B+1),this[W]=B&255,W+1},C.prototype.writeInt16LE=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,2,32767,-32768),this[W]=B&255,this[W+1]=B>>>8,W+2},C.prototype.writeInt16BE=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,2,32767,-32768),this[W]=B>>>8,this[W+1]=B&255,W+2},C.prototype.writeInt32LE=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,4,2147483647,-2147483648),this[W]=B&255,this[W+1]=B>>>8,this[W+2]=B>>>16,this[W+3]=B>>>24,W+4},C.prototype.writeInt32BE=function(B,W,oe){return B=+B,W=W>>>0,oe||ot(this,B,W,4,2147483647,-2147483648),B<0&&(B=4294967295+B+1),this[W]=B>>>24,this[W+1]=B>>>16,this[W+2]=B>>>8,this[W+3]=B&255,W+4},C.prototype.writeBigInt64LE=ei(function(B,W=0){return Dt(this,B,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),C.prototype.writeBigInt64BE=ei(function(B,W=0){return yt(this,B,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _e(X,B,W,oe,he,ve){if(W+oe>X.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("Index out of range")}function Te(X,B,W,oe,he){return B=+B,W=W>>>0,he||_e(X,B,W,4),_.write(X,B,W,oe,23,4),W+4}C.prototype.writeFloatLE=function(B,W,oe){return Te(this,B,W,!0,oe)},C.prototype.writeFloatBE=function(B,W,oe){return Te(this,B,W,!1,oe)};function $e(X,B,W,oe,he){return B=+B,W=W>>>0,he||_e(X,B,W,8),_.write(X,B,W,oe,52,8),W+8}C.prototype.writeDoubleLE=function(B,W,oe){return $e(this,B,W,!0,oe)},C.prototype.writeDoubleBE=function(B,W,oe){return $e(this,B,W,!1,oe)},C.prototype.copy=function(B,W,oe,he){if(!C.isBuffer(B))throw new TypeError("argument should be a Buffer");if(oe||(oe=0),!he&&he!==0&&(he=this.length),W>=B.length&&(W=B.length),W||(W=0),he>0&&he<oe&&(he=oe),he===oe||B.length===0||this.length===0)return 0;if(W<0)throw new RangeError("targetStart out of bounds");if(oe<0||oe>=this.length)throw new RangeError("Index out of range");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),B.length-W<he-oe&&(he=B.length-W+oe);const ve=he-oe;return this===B&&typeof L.prototype.copyWithin=="function"?this.copyWithin(W,oe,he):L.prototype.set.call(B,this.subarray(oe,he),W),ve},C.prototype.fill=function(B,W,oe,he){if(typeof B=="string"){if(typeof W=="string"?(he=W,W=0,oe=this.length):typeof oe=="string"&&(he=oe,oe=this.length),he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!C.isEncoding(he))throw new TypeError("Unknown encoding: "+he);if(B.length===1){const Ce=B.charCodeAt(0);(he==="utf8"&&Ce<128||he==="latin1")&&(B=Ce)}}else typeof B=="number"?B=B&255:typeof B=="boolean"&&(B=Number(B));if(W<0||this.length<W||this.length<oe)throw new RangeError("Out of range index");if(oe<=W)return this;W=W>>>0,oe=oe===void 0?this.length:oe>>>0,B||(B=0);let ve;if(typeof B=="number")for(ve=W;ve<oe;++ve)this[ve]=B;else{const Ce=C.isBuffer(B)?B:C.from(B,he),Ye=Ce.length;if(Ye===0)throw new TypeError('The value "'+B+'" is invalid for argument "value"');for(ve=0;ve<oe-W;++ve)this[ve+W]=Ce[ve%Ye]}return this};const ze={};function q(X,B,W){ze[X]=class extends W{constructor(){super(),Object.defineProperty(this,"message",{value:B.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${X}]`,this.stack,delete this.name}get code(){return X}set code(he){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:he,writable:!0})}toString(){return`${this.name} [${X}]: ${this.message}`}}}q("ERR_BUFFER_OUT_OF_BOUNDS",function(X){return X?`${X} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),q("ERR_INVALID_ARG_TYPE",function(X,B){return`The "${X}" argument must be of type number. Received type ${typeof B}`},TypeError),q("ERR_OUT_OF_RANGE",function(X,B,W){let oe=`The value of "${X}" is out of range.`,he=W;return Number.isInteger(W)&&Math.abs(W)>2**32?he=D(String(W)):typeof W=="bigint"&&(he=String(W),(W>BigInt(2)**BigInt(32)||W<-(BigInt(2)**BigInt(32)))&&(he=D(he)),he+="n"),oe+=` It must be ${B}. Received ${he}`,oe},RangeError);function D(X){let B="",W=X.length;const oe=X[0]==="-"?1:0;for(;W>=oe+4;W-=3)B=`_${X.slice(W-3,W)}${B}`;return`${X.slice(0,W)}${B}`}function F(X,B,W){le(B,"offset"),(X[B]===void 0||X[B+W]===void 0)&&pe(B,X.length-(W+1))}function ne(X,B,W,oe,he,ve){if(X>W||X<B){const Ce=typeof B=="bigint"?"n":"";let Ye;throw B===0||B===BigInt(0)?Ye=`>= 0${Ce} and < 2${Ce} ** ${(ve+1)*8}${Ce}`:Ye=`>= -(2${Ce} ** ${(ve+1)*8-1}${Ce}) and < 2 ** ${(ve+1)*8-1}${Ce}`,new ze.ERR_OUT_OF_RANGE("value",Ye,X)}F(oe,he,ve)}function le(X,B){if(typeof X!="number")throw new ze.ERR_INVALID_ARG_TYPE(B,"number",X)}function pe(X,B,W){throw Math.floor(X)!==X?(le(X,W),new ze.ERR_OUT_OF_RANGE("offset","an integer",X)):B<0?new ze.ERR_BUFFER_OUT_OF_BOUNDS:new ze.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${B}`,X)}const we=/[^+/0-9A-Za-z-_]/g;function je(X){if(X=X.split("=")[0],X=X.trim().replace(we,""),X.length<2)return"";for(;X.length%4!==0;)X=X+"=";return X}function ct(X,B){B=B||1/0;let W;const oe=X.length;let he=null;const ve=[];for(let Ce=0;Ce<oe;++Ce){if(W=X.charCodeAt(Ce),W>55295&&W<57344){if(!he){if(W>56319){(B-=3)>-1&&ve.push(239,191,189);continue}else if(Ce+1===oe){(B-=3)>-1&&ve.push(239,191,189);continue}he=W;continue}if(W<56320){(B-=3)>-1&&ve.push(239,191,189),he=W;continue}W=(he-55296<<10|W-56320)+65536}else he&&(B-=3)>-1&&ve.push(239,191,189);if(he=null,W<128){if((B-=1)<0)break;ve.push(W)}else if(W<2048){if((B-=2)<0)break;ve.push(W>>6|192,W&63|128)}else if(W<65536){if((B-=3)<0)break;ve.push(W>>12|224,W>>6&63|128,W&63|128)}else if(W<1114112){if((B-=4)<0)break;ve.push(W>>18|240,W>>12&63|128,W>>6&63|128,W&63|128)}else throw new Error("Invalid code point")}return ve}function gt(X){const B=[];for(let W=0;W<X.length;++W)B.push(X.charCodeAt(W)&255);return B}function bt(X,B){let W,oe,he;const ve=[];for(let Ce=0;Ce<X.length&&!((B-=2)<0);++Ce)W=X.charCodeAt(Ce),oe=W>>8,he=W%256,ve.push(he),ve.push(oe);return ve}function lt(X){return k.toByteArray(je(X))}function er(X,B,W,oe){let he;for(he=0;he<oe&&!(he+W>=B.length||he>=X.length);++he)B[he+W]=X[he];return he}function Rn(X,B){return X instanceof B||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===B.name}function ho(X){return X!==X}const Gl=function(){const X="0123456789abcdef",B=new Array(256);for(let W=0;W<16;++W){const oe=W*16;for(let he=0;he<16;++he)B[oe+he]=X[W]+X[he]}return B}();function ei(X){return typeof BigInt>"u"?_s:X}function _s(){throw new Error("BigInt not supported")}})(e);const v=e.Buffer;n.Blob=e.Blob,n.BlobOptions=e.BlobOptions,n.Buffer=e.Buffer,n.File=e.File,n.FileOptions=e.FileOptions,n.INSPECT_MAX_BYTES=e.INSPECT_MAX_BYTES,n.SlowBuffer=e.SlowBuffer,n.TranscodeEncoding=e.TranscodeEncoding,n.atob=e.atob,n.btoa=e.btoa,n.constants=e.constants,n.default=v,n.isAscii=e.isAscii,n.isUtf8=e.isUtf8,n.kMaxLength=e.kMaxLength,n.kStringMaxLength=e.kStringMaxLength,n.resolveObjectURL=e.resolveObjectURL,n.transcode=e.transcode}(ph)),ph}var gh,Dy;function dE(){if(Dy)return gh;Dy=1;function n(h,m){var y=Object.keys(h);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(h);m&&(v=v.filter(function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable})),y.push.apply(y,v)}return y}function e(h){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%2?n(Object(y),!0).forEach(function(v){t(h,v,y[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(y)):n(Object(y)).forEach(function(v){Object.defineProperty(h,v,Object.getOwnPropertyDescriptor(y,v))})}return h}function t(h,m,y){return m=u(m),m in h?Object.defineProperty(h,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):h[m]=y,h}function i(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}function s(h,m){for(var y=0;y<m.length;y++){var v=m[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(h,u(v.key),v)}}function o(h,m,y){return m&&s(h.prototype,m),Object.defineProperty(h,"prototype",{writable:!1}),h}function u(h){var m=d(h,"string");return typeof m=="symbol"?m:String(m)}function d(h,m){if(typeof h!="object"||h===null)return h;var y=h[Symbol.toPrimitive];if(y!==void 0){var v=y.call(h,m);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(h)}var l=Dl(),p=l.Buffer,r=lo(),f=r.inspect,a=f&&f.custom||"inspect";function c(h,m,y){p.prototype.copy.call(h,m,y)}return gh=function(){function h(){i(this,h),this.head=null,this.tail=null,this.length=0}return o(h,[{key:"push",value:function(y){var v={data:y,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(y){var v={data:y,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var v=this.head,w=""+v.data;v=v.next;)w+=y+v.data;return w}},{key:"concat",value:function(y){if(this.length===0)return p.alloc(0);for(var v=p.allocUnsafe(y>>>0),w=this.head,k=0;w;)c(w.data,v,k),k+=w.data.length,w=w.next;return v}},{key:"consume",value:function(y,v){var w;return y<this.head.data.length?(w=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?w=this.shift():w=v?this._getString(y):this._getBuffer(y),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var v=this.head,w=1,k=v.data;for(y-=k.length;v=v.next;){var _=v.data,S=y>_.length?_.length:y;if(S===_.length?k+=_:k+=_.slice(0,y),y-=S,y===0){S===_.length?(++w,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=_.slice(S));break}++w}return this.length-=w,k}},{key:"_getBuffer",value:function(y){var v=p.allocUnsafe(y),w=this.head,k=1;for(w.data.copy(v),y-=w.data.length;w=w.next;){var _=w.data,S=y>_.length?_.length:y;if(_.copy(v,v.length-y,0,S),y-=S,y===0){S===_.length?(++k,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=_.slice(S));break}++k}return this.length-=k,v}},{key:a,value:function(y,v){return f(this,e(e({},v),{},{depth:0,customInspect:!1}))}}]),h}(),gh}var mh,Py;function vb(){if(Py)return mh;Py=1;function n(u,d){var l=this,p=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return p||r?(d?d(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,rt.nextTick(s,this,u)):rt.nextTick(s,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(f){!d&&f?l._writableState?l._writableState.errorEmitted?rt.nextTick(t,l):(l._writableState.errorEmitted=!0,rt.nextTick(e,l,f)):rt.nextTick(e,l,f):d?(rt.nextTick(t,l),d(f)):rt.nextTick(t,l)}),this)}function e(u,d){s(u,d),t(u)}function t(u){u._writableState&&!u._writableState.emitClose||u._readableState&&!u._readableState.emitClose||u.emit("close")}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(u,d){u.emit("error",d)}function o(u,d){var l=u._readableState,p=u._writableState;l&&l.autoDestroy||p&&p.autoDestroy?u.destroy(d):u.emit("error",d)}return mh={destroy:n,undestroy:i,errorOrDestroy:o},mh}var yh={},By;function co(){if(By)return yh;By=1;function n(d,l){d.prototype=Object.create(l.prototype),d.prototype.constructor=d,d.__proto__=l}var e={};function t(d,l,p){p||(p=Error);function r(a,c,h){return typeof l=="string"?l:l(a,c,h)}var f=function(a){n(c,a);function c(h,m,y){return a.call(this,r(h,m,y))||this}return c}(p);f.prototype.name=p.name,f.prototype.code=d,e[d]=f}function i(d,l){if(Array.isArray(d)){var p=d.length;return d=d.map(function(r){return String(r)}),p>2?"one of ".concat(l," ").concat(d.slice(0,p-1).join(", "),", or ")+d[p-1]:p===2?"one of ".concat(l," ").concat(d[0]," or ").concat(d[1]):"of ".concat(l," ").concat(d[0])}else return"of ".concat(l," ").concat(String(d))}function s(d,l,p){return d.substr(0,l.length)===l}function o(d,l,p){return(p===void 0||p>d.length)&&(p=d.length),d.substring(p-l.length,p)===l}function u(d,l,p){return typeof p!="number"&&(p=0),p+l.length>d.length?!1:d.indexOf(l,p)!==-1}return t("ERR_INVALID_OPT_VALUE",function(d,l){return'The value "'+l+'" is invalid for option "'+d+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(d,l,p){var r;typeof l=="string"&&s(l,"not ")?(r="must not be",l=l.replace(/^not /,"")):r="must be";var f;if(o(d," argument"))f="The ".concat(d," ").concat(r," ").concat(i(l,"type"));else{var a=u(d,".")?"property":"argument";f='The "'.concat(d,'" ').concat(a," ").concat(r," ").concat(i(l,"type"))}return f+=". Received type ".concat(typeof p),f},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(d){return"The "+d+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(d){return"Cannot call "+d+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(d){return"Unknown encoding: "+d},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),yh.codes=e,yh}var vh,Ny;function bb(){if(Ny)return vh;Ny=1;var n=co().codes.ERR_INVALID_OPT_VALUE;function e(i,s,o){return i.highWaterMark!=null?i.highWaterMark:s?i[o]:null}function t(i,s,o,u){var d=e(s,u,o);if(d!=null){if(!(isFinite(d)&&Math.floor(d)===d)||d<0){var l=u?o:"highWaterMark";throw new n(l,d)}return Math.floor(d)}return i.objectMode?16:16*1024}return vh={getHighWaterMark:t},vh}var bh,Fy;function pE(){if(Fy)return bh;Fy=1,bh=n;function n(t,i){if(e("noDeprecation"))return t;var s=!1;function o(){if(!s){if(e("throwDeprecation"))throw new Error(i);e("traceDeprecation")?console.trace(i):console.warn(i),s=!0}return t.apply(this,arguments)}return o}function e(t){try{if(!qt.localStorage)return!1}catch{return!1}var i=qt.localStorage[t];return i==null?!1:String(i).toLowerCase()==="true"}return bh}var wh,Wy;function wb(){if(Wy)return wh;Wy=1,wh=I;function n(V){var te=this;this.next=null,this.entry=null,this.finish=function(){ie(te,V)}}var e;I.WritableState=x;var t={deprecate:pE()},i=yb(),s=Dl().Buffer,o=(typeof qt<"u"?qt:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(V){return s.from(V)}function d(V){return s.isBuffer(V)||V instanceof o}var l=vb(),p=bb(),r=p.getHighWaterMark,f=co().codes,a=f.ERR_INVALID_ARG_TYPE,c=f.ERR_METHOD_NOT_IMPLEMENTED,h=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,k=f.ERR_UNKNOWN_ENCODING,_=l.errorOrDestroy;Ar()(I,i);function S(){}function x(V,te,ae){e=e||Jr(),V=V||{},typeof ae!="boolean"&&(ae=te instanceof e),this.objectMode=!!V.objectMode,ae&&(this.objectMode=this.objectMode||!!V.writableObjectMode),this.highWaterMark=r(this,V,"writableHighWaterMark",ae),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ge=V.decodeStrings===!1;this.decodeStrings=!ge,this.defaultEncoding=V.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ue){N(te,ue)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=V.emitClose!==!1,this.autoDestroy=!!V.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}x.prototype.getBuffer=function(){for(var te=this.bufferedRequest,ae=[];te;)ae.push(te),te=te.next;return ae},function(){try{Object.defineProperty(x.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var L;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(te){return L.call(this,te)?!0:this!==I?!1:te&&te._writableState instanceof x}})):L=function(te){return te instanceof this};function I(V){e=e||Jr();var te=this instanceof e;if(!te&&!L.call(I,this))return new I(V);this._writableState=new x(V,this,te),this.writable=!0,V&&(typeof V.write=="function"&&(this._write=V.write),typeof V.writev=="function"&&(this._writev=V.writev),typeof V.destroy=="function"&&(this._destroy=V.destroy),typeof V.final=="function"&&(this._final=V.final)),i.call(this)}I.prototype.pipe=function(){_(this,new m)};function $(V,te){var ae=new w;_(V,ae),rt.nextTick(te,ae)}function T(V,te,ae,ge){var ue;return ae===null?ue=new v:typeof ae!="string"&&!te.objectMode&&(ue=new a("chunk",["string","Buffer"],ae)),ue?(_(V,ue),rt.nextTick(ge,ue),!1):!0}I.prototype.write=function(V,te,ae){var ge=this._writableState,ue=!1,G=!ge.objectMode&&d(V);return G&&!s.isBuffer(V)&&(V=u(V)),typeof te=="function"&&(ae=te,te=null),G?te="buffer":te||(te=ge.defaultEncoding),typeof ae!="function"&&(ae=S),ge.ending?$(this,ae):(G||T(this,ge,V,ae))&&(ge.pendingcb++,ue=C(this,ge,G,V,te,ae)),ue},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){var V=this._writableState;V.corked&&(V.corked--,!V.writing&&!V.corked&&!V.bufferProcessing&&V.bufferedRequest&&Y(this,V))},I.prototype.setDefaultEncoding=function(te){if(typeof te=="string"&&(te=te.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((te+"").toLowerCase())>-1))throw new k(te);return this._writableState.defaultEncoding=te,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(V,te,ae){return!V.objectMode&&V.decodeStrings!==!1&&typeof te=="string"&&(te=s.from(te,ae)),te}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function C(V,te,ae,ge,ue,G){if(!ae){var J=O(te,ge,ue);ge!==J&&(ae=!0,ue="buffer",ge=J)}var ye=te.objectMode?1:ge.length;te.length+=ye;var Ae=te.length<te.highWaterMark;if(Ae||(te.needDrain=!0),te.writing||te.corked){var Oe=te.lastBufferedRequest;te.lastBufferedRequest={chunk:ge,encoding:ue,isBuf:ae,callback:G,next:null},Oe?Oe.next=te.lastBufferedRequest:te.bufferedRequest=te.lastBufferedRequest,te.bufferedRequestCount+=1}else A(V,te,!1,ye,ge,ue,G);return Ae}function A(V,te,ae,ge,ue,G,J){te.writelen=ge,te.writecb=J,te.writing=!0,te.sync=!0,te.destroyed?te.onwrite(new y("write")):ae?V._writev(ue,te.onwrite):V._write(ue,G,te.onwrite),te.sync=!1}function M(V,te,ae,ge,ue){--te.pendingcb,ae?(rt.nextTick(ue,ge),rt.nextTick(U,V,te),V._writableState.errorEmitted=!0,_(V,ge)):(ue(ge),V._writableState.errorEmitted=!0,_(V,ge),U(V,te))}function R(V){V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0}function N(V,te){var ae=V._writableState,ge=ae.sync,ue=ae.writecb;if(typeof ue!="function")throw new h;if(R(ae),te)M(V,ae,ge,te,ue);else{var G=K(ae)||V.destroyed;!G&&!ae.corked&&!ae.bufferProcessing&&ae.bufferedRequest&&Y(V,ae),ge?rt.nextTick(H,V,ae,G,ue):H(V,ae,G,ue)}}function H(V,te,ae,ge){ae||z(V,te),te.pendingcb--,ge(),U(V,te)}function z(V,te){te.length===0&&te.needDrain&&(te.needDrain=!1,V.emit("drain"))}function Y(V,te){te.bufferProcessing=!0;var ae=te.bufferedRequest;if(V._writev&&ae&&ae.next){var ge=te.bufferedRequestCount,ue=new Array(ge),G=te.corkedRequestsFree;G.entry=ae;for(var J=0,ye=!0;ae;)ue[J]=ae,ae.isBuf||(ye=!1),ae=ae.next,J+=1;ue.allBuffers=ye,A(V,te,!0,te.length,ue,"",G.finish),te.pendingcb++,te.lastBufferedRequest=null,G.next?(te.corkedRequestsFree=G.next,G.next=null):te.corkedRequestsFree=new n(te),te.bufferedRequestCount=0}else{for(;ae;){var Ae=ae.chunk,Oe=ae.encoding,Le=ae.callback,Be=te.objectMode?1:Ae.length;if(A(V,te,!1,Be,Ae,Oe,Le),ae=ae.next,te.bufferedRequestCount--,te.writing)break}ae===null&&(te.lastBufferedRequest=null)}te.bufferedRequest=ae,te.bufferProcessing=!1}I.prototype._write=function(V,te,ae){ae(new c("_write()"))},I.prototype._writev=null,I.prototype.end=function(V,te,ae){var ge=this._writableState;return typeof V=="function"?(ae=V,V=null,te=null):typeof te=="function"&&(ae=te,te=null),V!=null&&this.write(V,te),ge.corked&&(ge.corked=1,this.uncork()),ge.ending||Q(this,ge,ae),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(V){return V.ending&&V.length===0&&V.bufferedRequest===null&&!V.finished&&!V.writing}function re(V,te){V._final(function(ae){te.pendingcb--,ae&&_(V,ae),te.prefinished=!0,V.emit("prefinish"),U(V,te)})}function fe(V,te){!te.prefinished&&!te.finalCalled&&(typeof V._final=="function"&&!te.destroyed?(te.pendingcb++,te.finalCalled=!0,rt.nextTick(re,V,te)):(te.prefinished=!0,V.emit("prefinish")))}function U(V,te){var ae=K(te);if(ae&&(fe(V,te),te.pendingcb===0&&(te.finished=!0,V.emit("finish"),te.autoDestroy))){var ge=V._readableState;(!ge||ge.autoDestroy&&ge.endEmitted)&&V.destroy()}return ae}function Q(V,te,ae){te.ending=!0,U(V,te),ae&&(te.finished?rt.nextTick(ae):V.once("finish",ae)),te.ended=!0,V.writable=!1}function ie(V,te,ae){var ge=V.entry;for(V.entry=null;ge;){var ue=ge.callback;te.pendingcb--,ue(ae),ge=ge.next}te.corkedRequestsFree.next=V}return Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(te){this._writableState&&(this._writableState.destroyed=te)}}),I.prototype.destroy=l.destroy,I.prototype._undestroy=l.undestroy,I.prototype._destroy=function(V,te){te(V)},wh}var _h,Hy;function Jr(){if(Hy)return _h;Hy=1;var n=Object.keys||function(p){var r=[];for(var f in p)r.push(f);return r};_h=u;var e=_b(),t=wb();Ar()(u,e);for(var i=n(t.prototype),s=0;s<i.length;s++){var o=i[s];u.prototype[o]||(u.prototype[o]=t.prototype[o])}function u(p){if(!(this instanceof u))return new u(p);e.call(this,p),t.call(this,p),this.allowHalfOpen=!0,p&&(p.readable===!1&&(this.readable=!1),p.writable===!1&&(this.writable=!1),p.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",d)))}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function d(){this._writableState.ended||rt.nextTick(l,this)}function l(p){p.end()}return Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(r){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=r,this._writableState.destroyed=r)}}),_h}var xh={},Fa={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var zy;function gE(){return zy||(zy=1,function(n,e){var t=Dl(),i=t.Buffer;function s(u,d){for(var l in u)d[l]=u[l]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?n.exports=t:(s(t,e),e.Buffer=o);function o(u,d,l){return i(u,d,l)}o.prototype=Object.create(i.prototype),s(i,o),o.from=function(u,d,l){if(typeof u=="number")throw new TypeError("Argument must not be a number");return i(u,d,l)},o.alloc=function(u,d,l){if(typeof u!="number")throw new TypeError("Argument must be a number");var p=i(u);return d!==void 0?typeof l=="string"?p.fill(d,l):p.fill(d):p.fill(0),p},o.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return i(u)},o.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(u)}}(Fa,Fa.exports)),Fa.exports}var jy;function Uy(){if(jy)return xh;jy=1;var n=gE().Buffer,e=n.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(v){if(!v)return"utf8";for(var w;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(w)return;v=(""+v).toLowerCase(),w=!0}}function i(v){var w=t(v);if(typeof w!="string"&&(n.isEncoding===e||!e(v)))throw new Error("Unknown encoding: "+v);return w||v}xh.StringDecoder=s;function s(v){this.encoding=i(v);var w;switch(this.encoding){case"utf16le":this.text=f,this.end=a,w=4;break;case"utf8":this.fillLast=l,w=4;break;case"base64":this.text=c,this.end=h,w=3;break;default:this.write=m,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(w)}s.prototype.write=function(v){if(v.length===0)return"";var w,k;if(this.lastNeed){if(w=this.fillLast(v),w===void 0)return"";k=this.lastNeed,this.lastNeed=0}else k=0;return k<v.length?w?w+this.text(v,k):this.text(v,k):w||""},s.prototype.end=r,s.prototype.text=p,s.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function o(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function u(v,w,k){var _=w.length-1;if(_<k)return 0;var S=o(w[_]);return S>=0?(S>0&&(v.lastNeed=S-1),S):--_<k||S===-2?0:(S=o(w[_]),S>=0?(S>0&&(v.lastNeed=S-2),S):--_<k||S===-2?0:(S=o(w[_]),S>=0?(S>0&&(S===2?S=0:v.lastNeed=S-3),S):0))}function d(v,w,k){if((w[0]&192)!==128)return v.lastNeed=0,"�";if(v.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return v.lastNeed=1,"�";if(v.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return v.lastNeed=2,"�"}}function l(v){var w=this.lastTotal-this.lastNeed,k=d(this,v);if(k!==void 0)return k;if(this.lastNeed<=v.length)return v.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,w,0,v.length),this.lastNeed-=v.length}function p(v,w){var k=u(this,v,w);if(!this.lastNeed)return v.toString("utf8",w);this.lastTotal=k;var _=v.length-(k-this.lastNeed);return v.copy(this.lastChar,0,_),v.toString("utf8",w,_)}function r(v){var w=v&&v.length?this.write(v):"";return this.lastNeed?w+"�":w}function f(v,w){if((v.length-w)%2===0){var k=v.toString("utf16le",w);if(k){var _=k.charCodeAt(k.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],k.slice(0,-1)}return k}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",w,v.length-1)}function a(v){var w=v&&v.length?this.write(v):"";if(this.lastNeed){var k=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,k)}return w}function c(v,w){var k=(v.length-w)%3;return k===0?v.toString("base64",w):(this.lastNeed=3-k,this.lastTotal=3,k===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",w,v.length-k))}function h(v){var w=v&&v.length?this.write(v):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function m(v){return v.toString(this.encoding)}function y(v){return v&&v.length?this.write(v):""}return xh}var Sh,Vy;function Bf(){if(Vy)return Sh;Vy=1;var n=co().codes.ERR_STREAM_PREMATURE_CLOSE;function e(o){var u=!1;return function(){if(!u){u=!0;for(var d=arguments.length,l=new Array(d),p=0;p<d;p++)l[p]=arguments[p];o.apply(this,l)}}}function t(){}function i(o){return o.setHeader&&typeof o.abort=="function"}function s(o,u,d){if(typeof u=="function")return s(o,null,u);u||(u={}),d=e(d||t);var l=u.readable||u.readable!==!1&&o.readable,p=u.writable||u.writable!==!1&&o.writable,r=function(){o.writable||a()},f=o._writableState&&o._writableState.finished,a=function(){p=!1,f=!0,l||d.call(o)},c=o._readableState&&o._readableState.endEmitted,h=function(){l=!1,c=!0,p||d.call(o)},m=function(k){d.call(o,k)},y=function(){var k;if(l&&!c)return(!o._readableState||!o._readableState.ended)&&(k=new n),d.call(o,k);if(p&&!f)return(!o._writableState||!o._writableState.ended)&&(k=new n),d.call(o,k)},v=function(){o.req.on("finish",a)};return i(o)?(o.on("complete",a),o.on("abort",y),o.req?v():o.on("request",v)):p&&!o._writableState&&(o.on("end",r),o.on("close",r)),o.on("end",h),o.on("finish",a),u.error!==!1&&o.on("error",m),o.on("close",y),function(){o.removeListener("complete",a),o.removeListener("abort",y),o.removeListener("request",v),o.req&&o.req.removeListener("finish",a),o.removeListener("end",r),o.removeListener("close",r),o.removeListener("finish",a),o.removeListener("end",h),o.removeListener("error",m),o.removeListener("close",y)}}return Sh=s,Sh}var Ah,qy;function mE(){if(qy)return Ah;qy=1;var n;function e(k,_,S){return _=t(_),_ in k?Object.defineProperty(k,_,{value:S,enumerable:!0,configurable:!0,writable:!0}):k[_]=S,k}function t(k){var _=i(k,"string");return typeof _=="symbol"?_:String(_)}function i(k,_){if(typeof k!="object"||k===null)return k;var S=k[Symbol.toPrimitive];if(S!==void 0){var x=S.call(k,_);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(k)}var s=Bf(),o=Symbol("lastResolve"),u=Symbol("lastReject"),d=Symbol("error"),l=Symbol("ended"),p=Symbol("lastPromise"),r=Symbol("handlePromise"),f=Symbol("stream");function a(k,_){return{value:k,done:_}}function c(k){var _=k[o];if(_!==null){var S=k[f].read();S!==null&&(k[p]=null,k[o]=null,k[u]=null,_(a(S,!1)))}}function h(k){rt.nextTick(c,k)}function m(k,_){return function(S,x){k.then(function(){if(_[l]){S(a(void 0,!0));return}_[r](S,x)},x)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((n={get stream(){return this[f]},next:function(){var _=this,S=this[d];if(S!==null)return Promise.reject(S);if(this[l])return Promise.resolve(a(void 0,!0));if(this[f].destroyed)return new Promise(function($,T){rt.nextTick(function(){_[d]?T(_[d]):$(a(void 0,!0))})});var x=this[p],L;if(x)L=new Promise(m(x,this));else{var I=this[f].read();if(I!==null)return Promise.resolve(a(I,!1));L=new Promise(this[r])}return this[p]=L,L}},e(n,Symbol.asyncIterator,function(){return this}),e(n,"return",function(){var _=this;return new Promise(function(S,x){_[f].destroy(null,function(L){if(L){x(L);return}S(a(void 0,!0))})})}),n),y),w=function(_){var S,x=Object.create(v,(S={},e(S,f,{value:_,writable:!0}),e(S,o,{value:null,writable:!0}),e(S,u,{value:null,writable:!0}),e(S,d,{value:null,writable:!0}),e(S,l,{value:_._readableState.endEmitted,writable:!0}),e(S,r,{value:function(I,$){var T=x[f].read();T?(x[p]=null,x[o]=null,x[u]=null,I(a(T,!1))):(x[o]=I,x[u]=$)},writable:!0}),S));return x[p]=null,s(_,function(L){if(L&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"){var I=x[u];I!==null&&(x[p]=null,x[o]=null,x[u]=null,I(L)),x[d]=L;return}var $=x[o];$!==null&&(x[p]=null,x[o]=null,x[u]=null,$(a(void 0,!0))),x[l]=!0}),_.on("readable",h.bind(null,x)),x};return Ah=w,Ah}var Ch,Gy;function yE(){return Gy||(Gy=1,Ch=function(){throw new Error("Readable.from is not available in the browser")}),Ch}var kh,Ky;function _b(){if(Ky)return kh;Ky=1,kh=$;var n;$.ReadableState=I,ro().EventEmitter;var e=function(J,ye){return J.listeners(ye).length},t=yb(),i=Dl().Buffer,s=(typeof qt<"u"?qt:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(G){return i.from(G)}function u(G){return i.isBuffer(G)||G instanceof s}var d=lo(),l;d&&d.debuglog?l=d.debuglog("stream"):l=function(){};var p=dE(),r=vb(),f=bb(),a=f.getHighWaterMark,c=co().codes,h=c.ERR_INVALID_ARG_TYPE,m=c.ERR_STREAM_PUSH_AFTER_EOF,y=c.ERR_METHOD_NOT_IMPLEMENTED,v=c.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,k,_;Ar()($,t);var S=r.errorOrDestroy,x=["error","close","destroy","pause","resume"];function L(G,J,ye){if(typeof G.prependListener=="function")return G.prependListener(J,ye);!G._events||!G._events[J]?G.on(J,ye):Array.isArray(G._events[J])?G._events[J].unshift(ye):G._events[J]=[ye,G._events[J]]}function I(G,J,ye){n=n||Jr(),G=G||{},typeof ye!="boolean"&&(ye=J instanceof n),this.objectMode=!!G.objectMode,ye&&(this.objectMode=this.objectMode||!!G.readableObjectMode),this.highWaterMark=a(this,G,"readableHighWaterMark",ye),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.destroyed=!1,this.defaultEncoding=G.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,G.encoding&&(w||(w=Uy().StringDecoder),this.decoder=new w(G.encoding),this.encoding=G.encoding)}function $(G){if(n=n||Jr(),!(this instanceof $))return new $(G);var J=this instanceof n;this._readableState=new I(G,this,J),this.readable=!0,G&&(typeof G.read=="function"&&(this._read=G.read),typeof G.destroy=="function"&&(this._destroy=G.destroy)),t.call(this)}Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(J){this._readableState&&(this._readableState.destroyed=J)}}),$.prototype.destroy=r.destroy,$.prototype._undestroy=r.undestroy,$.prototype._destroy=function(G,J){J(G)},$.prototype.push=function(G,J){var ye=this._readableState,Ae;return ye.objectMode?Ae=!0:typeof G=="string"&&(J=J||ye.defaultEncoding,J!==ye.encoding&&(G=i.from(G,J),J=""),Ae=!0),T(this,G,J,!1,Ae)},$.prototype.unshift=function(G){return T(this,G,null,!0,!1)};function T(G,J,ye,Ae,Oe){l("readableAddChunk",J);var Le=G._readableState;if(J===null)Le.reading=!1,N(G,Le);else{var Be;if(Oe||(Be=C(Le,J)),Be)S(G,Be);else if(Le.objectMode||J&&J.length>0)if(typeof J!="string"&&!Le.objectMode&&Object.getPrototypeOf(J)!==i.prototype&&(J=o(J)),Ae)Le.endEmitted?S(G,new v):O(G,Le,J,!0);else if(Le.ended)S(G,new m);else{if(Le.destroyed)return!1;Le.reading=!1,Le.decoder&&!ye?(J=Le.decoder.write(J),Le.objectMode||J.length!==0?O(G,Le,J,!1):Y(G,Le)):O(G,Le,J,!1)}else Ae||(Le.reading=!1,Y(G,Le))}return!Le.ended&&(Le.length<Le.highWaterMark||Le.length===0)}function O(G,J,ye,Ae){J.flowing&&J.length===0&&!J.sync?(J.awaitDrain=0,G.emit("data",ye)):(J.length+=J.objectMode?1:ye.length,Ae?J.buffer.unshift(ye):J.buffer.push(ye),J.needReadable&&H(G)),Y(G,J)}function C(G,J){var ye;return!u(J)&&typeof J!="string"&&J!==void 0&&!G.objectMode&&(ye=new h("chunk",["string","Buffer","Uint8Array"],J)),ye}$.prototype.isPaused=function(){return this._readableState.flowing===!1},$.prototype.setEncoding=function(G){w||(w=Uy().StringDecoder);var J=new w(G);this._readableState.decoder=J,this._readableState.encoding=this._readableState.decoder.encoding;for(var ye=this._readableState.buffer.head,Ae="";ye!==null;)Ae+=J.write(ye.data),ye=ye.next;return this._readableState.buffer.clear(),Ae!==""&&this._readableState.buffer.push(Ae),this._readableState.length=Ae.length,this};var A=1073741824;function M(G){return G>=A?G=A:(G--,G|=G>>>1,G|=G>>>2,G|=G>>>4,G|=G>>>8,G|=G>>>16,G++),G}function R(G,J){return G<=0||J.length===0&&J.ended?0:J.objectMode?1:G!==G?J.flowing&&J.length?J.buffer.head.data.length:J.length:(G>J.highWaterMark&&(J.highWaterMark=M(G)),G<=J.length?G:J.ended?J.length:(J.needReadable=!0,0))}$.prototype.read=function(G){l("read",G),G=parseInt(G,10);var J=this._readableState,ye=G;if(G!==0&&(J.emittedReadable=!1),G===0&&J.needReadable&&((J.highWaterMark!==0?J.length>=J.highWaterMark:J.length>0)||J.ended))return l("read: emitReadable",J.length,J.ended),J.length===0&&J.ended?ae(this):H(this),null;if(G=R(G,J),G===0&&J.ended)return J.length===0&&ae(this),null;var Ae=J.needReadable;l("need readable",Ae),(J.length===0||J.length-G<J.highWaterMark)&&(Ae=!0,l("length less than watermark",Ae)),J.ended||J.reading?(Ae=!1,l("reading or ended",Ae)):Ae&&(l("do read"),J.reading=!0,J.sync=!0,J.length===0&&(J.needReadable=!0),this._read(J.highWaterMark),J.sync=!1,J.reading||(G=R(ye,J)));var Oe;return G>0?Oe=te(G,J):Oe=null,Oe===null?(J.needReadable=J.length<=J.highWaterMark,G=0):(J.length-=G,J.awaitDrain=0),J.length===0&&(J.ended||(J.needReadable=!0),ye!==G&&J.ended&&ae(this)),Oe!==null&&this.emit("data",Oe),Oe};function N(G,J){if(l("onEofChunk"),!J.ended){if(J.decoder){var ye=J.decoder.end();ye&&ye.length&&(J.buffer.push(ye),J.length+=J.objectMode?1:ye.length)}J.ended=!0,J.sync?H(G):(J.needReadable=!1,J.emittedReadable||(J.emittedReadable=!0,z(G)))}}function H(G){var J=G._readableState;l("emitReadable",J.needReadable,J.emittedReadable),J.needReadable=!1,J.emittedReadable||(l("emitReadable",J.flowing),J.emittedReadable=!0,rt.nextTick(z,G))}function z(G){var J=G._readableState;l("emitReadable_",J.destroyed,J.length,J.ended),!J.destroyed&&(J.length||J.ended)&&(G.emit("readable"),J.emittedReadable=!1),J.needReadable=!J.flowing&&!J.ended&&J.length<=J.highWaterMark,V(G)}function Y(G,J){J.readingMore||(J.readingMore=!0,rt.nextTick(K,G,J))}function K(G,J){for(;!J.reading&&!J.ended&&(J.length<J.highWaterMark||J.flowing&&J.length===0);){var ye=J.length;if(l("maybeReadMore read 0"),G.read(0),ye===J.length)break}J.readingMore=!1}$.prototype._read=function(G){S(this,new y("_read()"))},$.prototype.pipe=function(G,J){var ye=this,Ae=this._readableState;switch(Ae.pipesCount){case 0:Ae.pipes=G;break;case 1:Ae.pipes=[Ae.pipes,G];break;default:Ae.pipes.push(G);break}Ae.pipesCount+=1,l("pipe count=%d opts=%j",Ae.pipesCount,J);var Oe=(!J||J.end!==!1)&&G!==rt.stdout&&G!==rt.stderr,Le=Oe?mt:_e;Ae.endEmitted?rt.nextTick(Le):ye.once("end",Le),G.on("unpipe",Be);function Be(Te,$e){l("onunpipe"),Te===ye&&$e&&$e.hasUnpiped===!1&&($e.hasUnpiped=!0,at())}function mt(){l("onend"),G.end()}var Se=re(ye);G.on("drain",Se);var Mt=!1;function at(){l("cleanup"),G.removeListener("close",Dt),G.removeListener("finish",yt),G.removeListener("drain",Se),G.removeListener("error",ot),G.removeListener("unpipe",Be),ye.removeListener("end",mt),ye.removeListener("end",_e),ye.removeListener("data",Qe),Mt=!0,Ae.awaitDrain&&(!G._writableState||G._writableState.needDrain)&&Se()}ye.on("data",Qe);function Qe(Te){l("ondata");var $e=G.write(Te);l("dest.write",$e),$e===!1&&((Ae.pipesCount===1&&Ae.pipes===G||Ae.pipesCount>1&&ue(Ae.pipes,G)!==-1)&&!Mt&&(l("false write response, pause",Ae.awaitDrain),Ae.awaitDrain++),ye.pause())}function ot(Te){l("onerror",Te),_e(),G.removeListener("error",ot),e(G,"error")===0&&S(G,Te)}L(G,"error",ot);function Dt(){G.removeListener("finish",yt),_e()}G.once("close",Dt);function yt(){l("onfinish"),G.removeListener("close",Dt),_e()}G.once("finish",yt);function _e(){l("unpipe"),ye.unpipe(G)}return G.emit("pipe",ye),Ae.flowing||(l("pipe resume"),ye.resume()),G};function re(G){return function(){var ye=G._readableState;l("pipeOnDrain",ye.awaitDrain),ye.awaitDrain&&ye.awaitDrain--,ye.awaitDrain===0&&e(G,"data")&&(ye.flowing=!0,V(G))}}$.prototype.unpipe=function(G){var J=this._readableState,ye={hasUnpiped:!1};if(J.pipesCount===0)return this;if(J.pipesCount===1)return G&&G!==J.pipes?this:(G||(G=J.pipes),J.pipes=null,J.pipesCount=0,J.flowing=!1,G&&G.emit("unpipe",this,ye),this);if(!G){var Ae=J.pipes,Oe=J.pipesCount;J.pipes=null,J.pipesCount=0,J.flowing=!1;for(var Le=0;Le<Oe;Le++)Ae[Le].emit("unpipe",this,{hasUnpiped:!1});return this}var Be=ue(J.pipes,G);return Be===-1?this:(J.pipes.splice(Be,1),J.pipesCount-=1,J.pipesCount===1&&(J.pipes=J.pipes[0]),G.emit("unpipe",this,ye),this)},$.prototype.on=function(G,J){var ye=t.prototype.on.call(this,G,J),Ae=this._readableState;return G==="data"?(Ae.readableListening=this.listenerCount("readable")>0,Ae.flowing!==!1&&this.resume()):G==="readable"&&!Ae.endEmitted&&!Ae.readableListening&&(Ae.readableListening=Ae.needReadable=!0,Ae.flowing=!1,Ae.emittedReadable=!1,l("on readable",Ae.length,Ae.reading),Ae.length?H(this):Ae.reading||rt.nextTick(U,this)),ye},$.prototype.addListener=$.prototype.on,$.prototype.removeListener=function(G,J){var ye=t.prototype.removeListener.call(this,G,J);return G==="readable"&&rt.nextTick(fe,this),ye},$.prototype.removeAllListeners=function(G){var J=t.prototype.removeAllListeners.apply(this,arguments);return(G==="readable"||G===void 0)&&rt.nextTick(fe,this),J};function fe(G){var J=G._readableState;J.readableListening=G.listenerCount("readable")>0,J.resumeScheduled&&!J.paused?J.flowing=!0:G.listenerCount("data")>0&&G.resume()}function U(G){l("readable nexttick read 0"),G.read(0)}$.prototype.resume=function(){var G=this._readableState;return G.flowing||(l("resume"),G.flowing=!G.readableListening,Q(this,G)),G.paused=!1,this};function Q(G,J){J.resumeScheduled||(J.resumeScheduled=!0,rt.nextTick(ie,G,J))}function ie(G,J){l("resume",J.reading),J.reading||G.read(0),J.resumeScheduled=!1,G.emit("resume"),V(G),J.flowing&&!J.reading&&G.read(0)}$.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function V(G){var J=G._readableState;for(l("flow",J.flowing);J.flowing&&G.read()!==null;);}$.prototype.wrap=function(G){var J=this,ye=this._readableState,Ae=!1;G.on("end",function(){if(l("wrapped end"),ye.decoder&&!ye.ended){var Be=ye.decoder.end();Be&&Be.length&&J.push(Be)}J.push(null)}),G.on("data",function(Be){if(l("wrapped data"),ye.decoder&&(Be=ye.decoder.write(Be)),!(ye.objectMode&&Be==null)&&!(!ye.objectMode&&(!Be||!Be.length))){var mt=J.push(Be);mt||(Ae=!0,G.pause())}});for(var Oe in G)this[Oe]===void 0&&typeof G[Oe]=="function"&&(this[Oe]=function(mt){return function(){return G[mt].apply(G,arguments)}}(Oe));for(var Le=0;Le<x.length;Le++)G.on(x[Le],this.emit.bind(this,x[Le]));return this._read=function(Be){l("wrapped _read",Be),Ae&&(Ae=!1,G.resume())},this},typeof Symbol=="function"&&($.prototype[Symbol.asyncIterator]=function(){return k===void 0&&(k=mE()),k(this)}),Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty($.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty($.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(J){this._readableState&&(this._readableState.flowing=J)}}),$._fromList=te,Object.defineProperty($.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function te(G,J){if(J.length===0)return null;var ye;return J.objectMode?ye=J.buffer.shift():!G||G>=J.length?(J.decoder?ye=J.buffer.join(""):J.buffer.length===1?ye=J.buffer.first():ye=J.buffer.concat(J.length),J.buffer.clear()):ye=J.buffer.consume(G,J.decoder),ye}function ae(G){var J=G._readableState;l("endReadable",J.endEmitted),J.endEmitted||(J.ended=!0,rt.nextTick(ge,J,G))}function ge(G,J){if(l("endReadableNT",G.endEmitted,G.length),!G.endEmitted&&G.length===0&&(G.endEmitted=!0,J.readable=!1,J.emit("end"),G.autoDestroy)){var ye=J._writableState;(!ye||ye.autoDestroy&&ye.finished)&&J.destroy()}}typeof Symbol=="function"&&($.from=function(G,J){return _===void 0&&(_=yE()),_($,G,J)});function ue(G,J){for(var ye=0,Ae=G.length;ye<Ae;ye++)if(G[ye]===J)return ye;return-1}return kh}var Mh,Yy;function xb(){if(Yy)return Mh;Yy=1,Mh=d;var n=co().codes,e=n.ERR_METHOD_NOT_IMPLEMENTED,t=n.ERR_MULTIPLE_CALLBACK,i=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,o=Jr();Ar()(d,o);function u(r,f){var a=this._transformState;a.transforming=!1;var c=a.writecb;if(c===null)return this.emit("error",new t);a.writechunk=null,a.writecb=null,f!=null&&this.push(f),c(r);var h=this._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}function d(r){if(!(this instanceof d))return new d(r);o.call(this,r),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,r&&(typeof r.transform=="function"&&(this._transform=r.transform),typeof r.flush=="function"&&(this._flush=r.flush)),this.on("prefinish",l)}function l(){var r=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,a){p(r,f,a)}):p(this,null,null)}d.prototype.push=function(r,f){return this._transformState.needTransform=!1,o.prototype.push.call(this,r,f)},d.prototype._transform=function(r,f,a){a(new e("_transform()"))},d.prototype._write=function(r,f,a){var c=this._transformState;if(c.writecb=a,c.writechunk=r,c.writeencoding=f,!c.transforming){var h=this._readableState;(c.needTransform||h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}},d.prototype._read=function(r){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},d.prototype._destroy=function(r,f){o.prototype._destroy.call(this,r,function(a){f(a)})};function p(r,f,a){if(f)return r.emit("error",f);if(a!=null&&r.push(a),r._writableState.length)throw new s;if(r._transformState.transforming)throw new i;return r.push(null)}return Mh}var Eh,Xy;function vE(){if(Xy)return Eh;Xy=1,Eh=e;var n=xb();Ar()(e,n);function e(t){if(!(this instanceof e))return new e(t);n.call(this,t)}return e.prototype._transform=function(t,i,s){s(null,t)},Eh}var Lh,Qy;function bE(){if(Qy)return Lh;Qy=1;var n;function e(a){var c=!1;return function(){c||(c=!0,a.apply(void 0,arguments))}}var t=co().codes,i=t.ERR_MISSING_ARGS,s=t.ERR_STREAM_DESTROYED;function o(a){if(a)throw a}function u(a){return a.setHeader&&typeof a.abort=="function"}function d(a,c,h,m){m=e(m);var y=!1;a.on("close",function(){y=!0}),n===void 0&&(n=Bf()),n(a,{readable:c,writable:h},function(w){if(w)return m(w);y=!0,m()});var v=!1;return function(w){if(!y&&!v){if(v=!0,u(a))return a.abort();if(typeof a.destroy=="function")return a.destroy();m(w||new s("pipe"))}}}function l(a){a()}function p(a,c){return a.pipe(c)}function r(a){return!a.length||typeof a[a.length-1]!="function"?o:a.pop()}function f(){for(var a=arguments.length,c=new Array(a),h=0;h<a;h++)c[h]=arguments[h];var m=r(c);if(Array.isArray(c[0])&&(c=c[0]),c.length<2)throw new i("streams");var y,v=c.map(function(w,k){var _=k<c.length-1,S=k>0;return d(w,_,S,function(x){y||(y=x),x&&v.forEach(l),!_&&(v.forEach(l),m(y))})});return c.reduce(p)}return Lh=f,Lh}var Rh,Zy;function Sb(){if(Zy)return Rh;Zy=1,Rh=t;var n=ro().EventEmitter,e=Ar();e(t,n),t.Readable=_b(),t.Writable=wb(),t.Duplex=Jr(),t.Transform=xb(),t.PassThrough=vE(),t.finished=Bf(),t.pipeline=bE(),t.Stream=t;function t(){n.call(this)}return t.prototype.pipe=function(i,s){var o=this;function u(c){i.writable&&i.write(c)===!1&&o.pause&&o.pause()}o.on("data",u);function d(){o.readable&&o.resume&&o.resume()}i.on("drain",d),!i._isStdio&&(!s||s.end!==!1)&&(o.on("end",p),o.on("close",r));var l=!1;function p(){l||(l=!0,i.end())}function r(){l||(l=!0,typeof i.destroy=="function"&&i.destroy())}function f(c){if(a(),n.listenerCount(this,"error")===0)throw c}o.on("error",f),i.on("error",f);function a(){o.removeListener("data",u),i.removeListener("drain",d),o.removeListener("end",p),o.removeListener("close",r),o.removeListener("error",f),i.removeListener("error",f),o.removeListener("end",a),o.removeListener("close",a),i.removeListener("close",a)}return o.on("end",a),o.on("close",a),i.on("close",a),i.emit("pipe",o),i},Rh}var Th,Jy;function wE(){if(Jy)return Th;Jy=1;function n(e){return e?(e^Math.random()*16>>e/4).toString(16):("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,n)}return Th=n,Th}var Wa={exports:{}},Ha={exports:{}},$h,ev;function _E(){if(ev)return $h;ev=1;var n=1e3,e=n*60,t=e*60,i=t*24,s=i*365.25;$h=function(p,r){return r=r||{},typeof p=="string"?o(p):r.long?d(p):u(p)};function o(p){if(p=""+p,!(p.length>1e4)){var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(p);if(r){var f=parseFloat(r[1]),a=(r[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return f*s;case"days":case"day":case"d":return f*i;case"hours":case"hour":case"hrs":case"hr":case"h":return f*t;case"minutes":case"minute":case"mins":case"min":case"m":return f*e;case"seconds":case"second":case"secs":case"sec":case"s":return f*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f}}}}function u(p){return p>=i?Math.round(p/i)+"d":p>=t?Math.round(p/t)+"h":p>=e?Math.round(p/e)+"m":p>=n?Math.round(p/n)+"s":p+"ms"}function d(p){return l(p,i,"day")||l(p,t,"hour")||l(p,e,"minute")||l(p,n,"second")||p+" ms"}function l(p,r,f){if(!(p<r))return p<r*1.5?Math.floor(p/r)+" "+f:Math.ceil(p/r)+" "+f+"s"}return $h}var tv;function xE(){return tv||(tv=1,function(n,e){e=n.exports=o,e.coerce=p,e.disable=d,e.enable=u,e.enabled=l,e.humanize=_E(),e.names=[],e.skips=[],e.formatters={};var t=0,i;function s(){return e.colors[t++%e.colors.length]}function o(r){function f(){}f.enabled=!1;function a(){var h=a,m=+new Date,y=m-(i||m);h.diff=y,h.prev=i,h.curr=m,i=m,h.useColors==null&&(h.useColors=e.useColors()),h.color==null&&h.useColors&&(h.color=s());var v=Array.prototype.slice.call(arguments);v[0]=e.coerce(v[0]),typeof v[0]!="string"&&(v=["%o"].concat(v));var w=0;v[0]=v[0].replace(/%([a-z%])/g,function(_,S){if(_==="%%")return _;w++;var x=e.formatters[S];if(typeof x=="function"){var L=v[w];_=x.call(h,L),v.splice(w,1),w--}return _}),typeof e.formatArgs=="function"&&(v=e.formatArgs.apply(h,v));var k=a.log||e.log||console.log.bind(console);k.apply(h,v)}a.enabled=!0;var c=e.enabled(r)?a:f;return c.namespace=r,c}function u(r){e.save(r);for(var f=(r||"").split(/[\s,]+/),a=f.length,c=0;c<a;c++)f[c]&&(r=f[c].replace(/\*/g,".*?"),r[0]==="-"?e.skips.push(new RegExp("^"+r.substr(1)+"$")):e.names.push(new RegExp("^"+r+"$")))}function d(){e.enable("")}function l(r){var f,a;for(f=0,a=e.skips.length;f<a;f++)if(e.skips[f].test(r))return!1;for(f=0,a=e.names.length;f<a;f++)if(e.names[f].test(r))return!0;return!1}function p(r){return r instanceof Error?r.stack||r.message:r}}(Ha,Ha.exports)),Ha.exports}var nv;function Ab(){return nv||(nv=1,function(n,e){e=n.exports=xE(),e.log=s,e.formatArgs=i,e.save=o,e.load=u,e.useColors=t,e.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:d(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function t(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}e.formatters.j=function(l){return JSON.stringify(l)};function i(){var l=arguments,p=this.useColors;if(l[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+l[0]+(p?"%c ":" ")+"+"+e.humanize(this.diff),!p)return l;var r="color: "+this.color;l=[l[0],r,"color: inherit"].concat(Array.prototype.slice.call(l,1));var f=0,a=0;return l[0].replace(/%[a-z%]/g,function(c){c!=="%%"&&(f++,c==="%c"&&(a=f))}),l.splice(a,0,r),l}function s(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(l){try{l==null?e.storage.removeItem("debug"):e.storage.debug=l}catch{}}function u(){var l;try{l=e.storage.debug}catch{}return l}e.enable(u());function d(){try{return window.localStorage}catch{}}}(Wa,Wa.exports)),Wa.exports}var Ih,iv;function Nf(){if(iv)return Ih;iv=1;var n=lo(),e=Sb().Duplex,t=Pf(),i=wE(),s=Ab()("socket.io-stream:iostream");Ih=o,n.inherits(o,e);function o(u){if(!(this instanceof o))return new o(u);o.super_.call(this,u),this.options=u,this.id=i(),this.socket=null,this.pushBuffer=[],this.writeBuffer=[],this._readable=!1,this._writable=!1,this.destroyed=!1,this.allowHalfOpen=u&&u.allowHalfOpen||!1,this.on("finish",this._onfinish),this.on("end",this._onend),this.on("error",this._onerror)}return o.prototype.destroy=function(){if(s("destroy"),this.destroyed){s("already destroyed");return}this.readable=this.writable=!1,this.socket&&(s("clean up"),this.socket.cleanup(this.id),this.socket=null),this.destroyed=!0},o.prototype._read=function(u){var d;if(!this.destroyed){if(this.pushBuffer.length){for(;(d=this.pushBuffer.shift())&&d(););return}this._readable=!0,this.socket._read(this.id,u)}},o.prototype._onread=function(u){var d=this.writeBuffer.shift();if(d)return d();this._writable=!0},o.prototype._write=function(u,d,l){var p=this;function r(){p.destroyed||(p._writable=!1,p.socket._write(p.id,u,d,l))}this._writable?r():this.writeBuffer.push(r)},o.prototype._onwrite=function(u,d,l){var p=this;function r(){p._readable=!1;var f=p.push(u||"",d);return l(),f}this._readable?r():this.pushBuffer.push(r)},o.prototype._end=function(){this.pushBuffer.length?this.pushBuffer.push(t(this,"_done")):this._done()},o.prototype._done=function(){return this._readable=!1,this.push(null)},o.prototype._onfinish=function(){if(s("_onfinish"),this.socket&&this.socket._end(this.id),this.writable=!1,this._writableState.ended=!0,!this.readable||this._readableState.ended)return s("_onfinish: ended, destroy %s",this._readableState),this.destroy();s("_onfinish: not ended"),this.allowHalfOpen||(this.push(null),this.readable&&!this._readableState.endEmitted&&this.read(0))},o.prototype._onend=function(){if(s("_onend"),this.readable=!1,this._readableState.ended=!0,!this.writable||this._writableState.finished)return s("_onend: %s",this._writableState),this.destroy();s("_onend: not finished"),this.allowHalfOpen||this.end()},o.prototype._onerror=function(u){!u.remote&&this.socket&&this.socket._error(this.id,u),this.destroy()},Ih}var za={},rv;function SE(){if(rv)return za;rv=1;var n=lo(),e=ro().EventEmitter,t=Nf();za.Encoder=i,za.Decoder=s,n.inherits(i,e);function i(){e.call(this)}i.prototype.encode=function(o){return o instanceof t?this.encodeStream(o):n.isArray(o)?this.encodeArray(o):o&&typeof o=="object"?this.encodeObject(o):o},i.prototype.encodeStream=function(o){this.emit("stream",o);var u={$stream:o.id};return o.options&&(u.options=o.options),u},i.prototype.encodeArray=function(o){for(var u=[],d=0,l=o.length;d<l;d++)u.push(this.encode(o[d]));return u},i.prototype.encodeObject=function(o){var u={};for(var d in o)o.hasOwnProperty(d)&&(u[d]=this.encode(o[d]));return u},n.inherits(s,e);function s(){e.call(this)}return s.prototype.decode=function(o){return o&&o.$stream?this.decodeStream(o):n.isArray(o)?this.decodeArray(o):o&&typeof o=="object"?this.decodeObject(o):o},s.prototype.decodeStream=function(o){var u=new t(o.options);return u.id=o.$stream,this.emit("stream",u),u},s.prototype.decodeArray=function(o){for(var u=[],d=0,l=o.length;d<l;d++)u.push(this.decode(o[d]));return u},s.prototype.decodeObject=function(o){var u={};for(var d in o)o.hasOwnProperty(d)&&(u[d]=this.decode(o[d]));return u},za}var ov;function AE(){return ov||(ov=1,function(n,e){var t=lo(),i=ro().EventEmitter,s=Pf();Nf();var o=SE(),u=Ab()("socket.io-stream:socket"),d=i.prototype.emit,l=i.prototype.on,p=Array.prototype.slice;e=n.exports=r,e.event="$stream",e.events=["error","newListener","removeListener"],t.inherits(r,i);function r(f,a){if(!(this instanceof r))return new r(f,a);i.call(this),a=a||{},this.sio=f,this.forceBase64=!!a.forceBase64,this.streams={},this.encoder=new o.Encoder,this.decoder=new o.Decoder;var c=e.event;f.on(c,s(this,d)),f.on(c+"-read",s(this,"_onread")),f.on(c+"-write",s(this,"_onwrite")),f.on(c+"-end",s(this,"_onend")),f.on(c+"-error",s(this,"_onerror")),f.on("error",s(this,d,"error")),f.on("disconnect",s(this,"_ondisconnect")),this.encoder.on("stream",s(this,"_onencode")),this.decoder.on("stream",s(this,"_ondecode"))}r.prototype.$emit=d,r.prototype.emit=function(f){return~e.events.indexOf(f)?d.apply(this,arguments):(this._stream.apply(this,arguments),this)},r.prototype.on=function(f,a){return~e.events.indexOf(f)?l.apply(this,arguments):(this._onstream(f,a),this)},r.prototype._stream=function(f){u("sending new streams");var a=this,c=p.call(arguments,1),h=c[c.length-1];typeof h=="function"&&(c[c.length-1]=function(){var y=p.call(arguments);y=a.decoder.decode(y),h.apply(this,y)}),c=this.encoder.encode(c);var m=this.sio;m.emit.apply(m,[e.event,f].concat(c))},r.prototype._read=function(f,a){this.sio.emit(e.event+"-read",f,a)},r.prototype._write=function(f,a,c,h){rs.isBuffer(a)&&(this.forceBase64?(c="base64",a=a.toString(c)):qt.Buffer||(a.toArrayBuffer?a=a.toArrayBuffer():a=a.buffer)),this.sio.emit(e.event+"-write",f,a,c,h)},r.prototype._end=function(f){this.sio.emit(e.event+"-end",f)},r.prototype._error=function(f,a){this.sio.emit(e.event+"-error",f,a.message||a)},r.prototype._onstream=function(f,a){if(typeof a!="function")throw TypeError("listener must be a function");function c(){u("new streams");var h=this,m=p.call(arguments),y=m[m.length-1];typeof y=="function"&&(m[m.length-1]=function(){var v=p.call(arguments);v=h.encoder.encode(v),y.apply(this,v)}),m=this.decoder.decode(m),a.apply(this,m)}c.listener=a,l.call(this,f,c)},r.prototype._onread=function(f,a){u('read: "%s"',f);var c=this.streams[f];c?c._onread(a):u("ignore invalid stream id")},r.prototype._onwrite=function(f,a,c,h){u('write: "%s"',f);var m=this.streams[f];if(!m){h("invalid stream id: "+f);return}qt.ArrayBuffer&&a instanceof ArrayBuffer&&(a=new rs(new Uint8Array(a))),m._onwrite(a,c,h)},r.prototype._onend=function(f){u('end: "%s"',f);var a=this.streams[f];if(!a){u('ignore non-existent stream id: "%s"',f);return}a._end()},r.prototype._onerror=function(f,a){u('error: "%s", "%s"',f,a);var c=this.streams[f];if(!c){u('invalid stream id: "%s"',f);return}var h=new Error(a);h.remote=!0,c.emit("error",h)},r.prototype._ondisconnect=function(){var f;for(var a in this.streams)f=this.streams[a],f.destroy(),f.emit("close"),f.emit("error",new Error("Connection aborted"))},r.prototype._onencode=function(f){if(f.socket||f.destroyed)throw new Error("stream has already been sent.");var a=f.id;if(this.streams[a])throw new Error("Encoded stream already exists: "+a);this.streams[a]=f,f.socket=this},r.prototype._ondecode=function(f){var a=f.id;if(this.streams[a]){this._error(a,new Error("Decoded stream already exists: "+a));return}this.streams[a]=f,f.socket=this},r.prototype.cleanup=function(f){delete this.streams[f]}}(Ba,Ba.exports)),Ba.exports}var Oh,sv;function CE(){if(sv)return Oh;sv=1;var n=lo(),e=Sb().Readable,t=Pf();Oh=i,n.inherits(i,e);function i(s,o){if(!(this instanceof i))return new i(s,o);e.call(this,o),o=o||{},this.blob=s,this.slice=s.slice||s.webkitSlice||s.mozSlice,this.start=0,this.sync=o.synchronous||!1;var u;o.synchronous?u=this.fileReader=new FileReaderSync:u=this.fileReader=new FileReader,u.onload=t(this,"_onload"),u.onerror=t(this,"_onerror")}return i.prototype._read=function(s){var o=this.start,u=this.start=this.start+s,d=this.slice.call(this.blob,o,u);if(d.size)if(this.sync){var l=new rs(new Uint8Array(this.fileReader.readAsArrayBuffer(d)));this.push(l)}else this.fileReader.readAsArrayBuffer(d);else this.push(null)},i.prototype._onload=function(s){var o=new rs(new Uint8Array(s.target.result));this.push(o)},i.prototype._onerror=function(s){var o=s.target.error;this.emit("error",o)},Oh}var av;function kE(){return av||(av=1,function(n,e){var t=AE(),i=Nf(),s=CE();e=n.exports=o,e.Buffer=rs,e.Socket=t,e.IOStream=i,e.forceBase64=!1;function o(u,d){return d=d||{},d.forceBase64==null&&(d.forceBase64=e.forceBase64),u._streamSocket||(u._streamSocket=new t(u,d)),u._streamSocket}e.createStream=function(u){return new i(u)},e.createBlobReadStream=function(u,d){return new s(u,d)}}(Pa,Pa.exports)),Pa.exports}var Dh,lv;function ME(){return lv||(lv=1,Dh=kE()),Dh}var Cb=ME();const kb=di(Cb),EE=Tl({__proto__:null,default:kb},[Cb]),Ph=kb||EE,jn=n=>n,LE=(n=0,e=1)=>(t=e)=>n+=t,RE=Ot.compile(yM);class eo extends At{constructor(e){var t;super(),this.configuration=e,this.buttons={all:Go.build({name:"ALL",isEnabled:!0}),provided:jn({})},this.panel=new Li({...this.configuration,class:`checkbox-area ${this.configuration.class??""}`}).append(RE(this.configuration)),this.area=new At(this.panel.element.querySelector("div.buttons")).append(this.buttons.all),this.events=new oo,this.storage=(t=this.configuration.storage)!=null&&t.key?gs.build(this.configuration.storage.key):null,this.replace(this.panel),this.configuration.type==="radio"&&this.buttons.all.hide(),this.buttons.all.on("enable",(i,s)=>s==="click"?this.extract().forEach(o=>o.enable()):null),this.buttons.all.on("disable",(i,s)=>s==="click"?this.extract().forEach(o=>o.disable()):null)}extract(){return Object.values(this.buttons.provided)}provide(...e){var i;const t=(i=this.storage)==null?void 0:i.extract();return e.forEach(s=>{const o=s instanceof Go?s:Go.build(s);this.buttons.provided[o.name]=o,this.area.append(o),t&&(t.enabled.includes(o.name)?o.enable("silent"):o.disable("silent")),o.isEnabled||this.buttons.all.disable(),o.on("enable",(u,d)=>{var p;const l=this.extract();(p=this.storage)==null||p.store({enabled:l.filter(r=>r.isEnabled).map(r=>r.name)}),this.configuration.type==="radio"&&d==="click"&&(l.forEach(r=>r.disable("silent")),u.enable("silent")),l.every(r=>r.isEnabled)&&this.buttons.all.enable(),d!=="silent"&&(this.emit("enable",u),this.emit("switch",l))}),o.on("disable",(u,d)=>{var p;const l=this.extract();if((p=this.storage)==null||p.store({enabled:l.filter(r=>r.isEnabled).map(r=>r.name)}),this.configuration.type==="radio"&&d==="click")return u.enable("silent");l.some(r=>!r.isEnabled)&&this.buttons.all.disable(),d!=="silent"&&(this.emit("disable",u),this.emit("switch",l))})}),this}clear(){return this.extract().forEach(e=>e.delete()),this.buttons.provided={},this}trigger(){return this.emit("switch",this.extract())}on(e,t){return this.events.on(e,t),this}once(e,t){return this.events.once(e,t),this}emit(e,...t){return this.events.emit(e,...t),this}static build(e){return new eo(e)}}const TE=`
|
|
111
|
+
<p class="separator">{{title}}</p>
|
|
112
|
+
`,$E=Ot.compile(TE);class br extends At{highlight(){return this.element.classList.add("highlighted"),this}static build(e){return new br($E({title:e}))}}class Pl extends At{constructor(e={}){super('<div class="curtain hidden"></div>'),this.options=e,e.isPreventedToManualClose||this.element.addEventListener("click",t=>t.target===this.element?this.hide():null)}static build(e){return new Pl(e)}}class Ff extends Pl{constructor(){super({isPreventedToManualClose:!0}),this.append('<div><p>Ping pong</p><div class="loader"></div></div>').identify("loader")}static build(){return new Ff}}const IE=`
|
|
113
|
+
<div class="popup-message {{level}}">
|
|
114
|
+
{{#compare level 'eq' 'info'}}<i class="fas fa-check"></i>{{/compare}}
|
|
115
|
+
{{#compare level 'eq' 'warning'}}<i class="fas fa-exclamation-triangle"></i>{{/compare}}
|
|
116
|
+
{{#compare level 'eq' 'error'}}<i class="fas fa-times"></i>{{/compare}}
|
|
117
|
+
|
|
118
|
+
<span>{{{message}}}</span>
|
|
119
|
+
</div>
|
|
120
|
+
`,OE=Ot.compile(IE);class Wf extends At{constructor(){super(),this.element.classList.add("popups")}push(e,t={}){const i=this.compileHtmlStringToElement(OE({message:e,level:t.level??"info"}));this.element.prepend(i),setTimeout(()=>i.remove(),3e3)}static build(){return new Wf}}const DE=`
|
|
121
|
+
<div class="search">
|
|
122
|
+
<i class="fas fa-search"></i>
|
|
123
|
+
<div class="input" title="{{title}}"><input data-key="search" type="text"></div>
|
|
124
|
+
<button><i class="far fa-times-circle"></i></button>
|
|
125
|
+
</div>
|
|
126
|
+
`,PE=Ot.compile(DE);class Bl extends At{constructor(e){super(PE({title:(e==null?void 0:e.title)??"Type something"})),this.options=e,this.events=new tb.EventEmitter,this.input=this.element.querySelector("input"),this.button=this.element.querySelector("button"),this.button.classList.add("hidden"),this.button.addEventListener("click",()=>this.clear()),this.on("input",()=>{this.button.classList.remove("hidden"),this.element.classList.add("filled")}),this.on("clear",()=>{this.button.classList.add("hidden"),this.element.classList.remove("filled")}),this.input.addEventListener("keydown",Ln.debounce(()=>this.input.value?this.emit("input",this.input.value):this.clear(),350))}clear(){return this.input.value="",this.emit("clear")}on(e,t){return this.events.on(e,t),this}once(e,t){return this.events.once(e,t),this}emit(e,...t){return this.events.emit(e,...t),this}static build(e){return new Bl(e)}}const BE=`
|
|
127
|
+
<header>
|
|
128
|
+
<div id="tabs">
|
|
129
|
+
{{#each tabs}}
|
|
130
|
+
{{#compare type 'eq' 'separator'}}<hr>{{/compare}}
|
|
131
|
+
|
|
132
|
+
{{#compare type 'eq' 'section'}}
|
|
133
|
+
<button class="{{#unless entity.meta.name}}icon-only{{/unless}} {{#if isSelected}}checked{{/if}}" id="{{id}}">
|
|
134
|
+
<i class="{{entity.meta.icon}}"></i>{{entity.meta.name}}
|
|
135
|
+
</button>
|
|
136
|
+
{{/compare}}
|
|
137
|
+
{{/each}}
|
|
138
|
+
</div>
|
|
139
|
+
</header>
|
|
140
|
+
`,fi=Object.create(null);fi.open="0";fi.close="1";fi.ping="2";fi.pong="3";fi.message="4";fi.upgrade="5";fi.noop="6";const hl=Object.create(null);Object.keys(fi).forEach(n=>{hl[fi[n]]=n});const NE={type:"error",data:"parser error"},FE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",WE=typeof ArrayBuffer=="function",HE=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Mb=({type:n,data:e},t,i)=>FE&&e instanceof Blob?t?i(e):cv(e,i):WE&&(e instanceof ArrayBuffer||HE(e))?t?i(e):cv(new Blob([e]),i):i(fi[n]+(e||"")),cv=(n,e)=>{const t=new FileReader;return t.onload=function(){const i=t.result.split(",")[1];e("b"+i)},t.readAsDataURL(n)},uv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<uv.length;n++)Wo[uv.charCodeAt(n)]=n;const zE=n=>{let e=n.length*.75,t=n.length,i,s=0,o,u,d,l;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const p=new ArrayBuffer(e),r=new Uint8Array(p);for(i=0;i<t;i+=4)o=Wo[n.charCodeAt(i)],u=Wo[n.charCodeAt(i+1)],d=Wo[n.charCodeAt(i+2)],l=Wo[n.charCodeAt(i+3)],r[s++]=o<<2|u>>4,r[s++]=(u&15)<<4|d>>2,r[s++]=(d&3)<<6|l&63;return p},jE=typeof ArrayBuffer=="function",Eb=(n,e)=>{if(typeof n!="string")return{type:"message",data:Lb(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:UE(n.substring(1),e)}:hl[t]?n.length>1?{type:hl[t],data:n.substring(1)}:{type:hl[t]}:NE},UE=(n,e)=>{if(jE){const t=zE(n);return Lb(t,e)}else return{base64:!0,data:n}},Lb=(n,e)=>{switch(e){case"blob":return n instanceof ArrayBuffer?new Blob([n]):n;case"arraybuffer":default:return n}},Rb="",VE=(n,e)=>{const t=n.length,i=new Array(t);let s=0;n.forEach((o,u)=>{Mb(o,!1,d=>{i[u]=d,++s===t&&e(i.join(Rb))})})},qE=(n,e)=>{const t=n.split(Rb),i=[];for(let s=0;s<t.length;s++){const o=Eb(t[s],e);if(i.push(o),o.type==="error")break}return i},Tb=4;function zt(n){if(n)return GE(n)}function GE(n){for(var e in zt.prototype)n[e]=zt.prototype[e];return n}zt.prototype.on=zt.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};zt.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+n];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var i,s=0;s<t.length;s++)if(i=t[s],i===e||i.fn===e){t.splice(s,1);break}return t.length===0&&delete this._callbacks["$"+n],this};zt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+n],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(t){t=t.slice(0);for(var i=0,s=t.length;i<s;++i)t[i].apply(this,e)}return this};zt.prototype.emitReserved=zt.prototype.emit;zt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};zt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Vi=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function $b(n,...e){return e.reduce((t,i)=>(n.hasOwnProperty(i)&&(t[i]=n[i]),t),{})}const KE=setTimeout,YE=clearTimeout;function Nl(n,e){e.useNativeTimers?(n.setTimeoutFn=KE.bind(Vi),n.clearTimeoutFn=YE.bind(Vi)):(n.setTimeoutFn=setTimeout.bind(Vi),n.clearTimeoutFn=clearTimeout.bind(Vi))}const XE=1.33;function QE(n){return typeof n=="string"?ZE(n):Math.ceil((n.byteLength||n.size)*XE)}function ZE(n){let e=0,t=0;for(let i=0,s=n.length;i<s;i++)e=n.charCodeAt(i),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(i++,t+=4);return t}class JE extends Error{constructor(e,t,i){super(e),this.description=t,this.context=i,this.type="TransportError"}}class Ib extends zt{constructor(e){super(),this.writable=!1,Nl(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,t,i){return super.emitReserved("error",new JE(e,t,i)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=Eb(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}const Ob="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),rf=64,eL={};let hv=0,ja=0,fv;function dv(n){let e="";do e=Ob[n%rf]+e,n=Math.floor(n/rf);while(n>0);return e}function Db(){const n=dv(+new Date);return n!==fv?(hv=0,fv=n):n+"."+dv(hv++)}for(;ja<rf;ja++)eL[Ob[ja]]=ja;function Pb(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function tL(n){let e={},t=n.split("&");for(let i=0,s=t.length;i<s;i++){let o=t[i].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}let Bb=!1;try{Bb=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nL=Bb;function Nb(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||nL))return new XMLHttpRequest}catch{}if(!e)try{return new Vi[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function iL(){}const rL=function(){return new Nb({xdomain:!1}).responseType!=null}();class oL extends Ib{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const i=location.protocol==="https:";let s=location.port;s||(s=i?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port,this.xs=e.secure!==i}const t=e&&e.forceBase64;this.supportsBinary=rL&&!t}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||t()})),this.writable||(i++,this.once("drain",function(){--i||t()}))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};qE(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,VE(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const t=this.opts.secure?"https":"http";let i="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=Db()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.opts.port&&(t==="https"&&Number(this.opts.port)!==443||t==="http"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port);const s=Pb(e),o=this.opts.hostname.indexOf(":")!==-1;return t+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(s.length?"?"+s:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new ui(this.uri(),e)}doWrite(e,t){const i=this.request({method:"POST",data:e});i.on("success",t),i.on("error",(s,o)=>{this.onError("xhr post error",s,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,i)=>{this.onError("xhr poll error",t,i)}),this.pollXhr=e}}class ui extends zt{constructor(e,t){super(),Nl(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.async=t.async!==!1,this.data=t.data!==void 0?t.data:null,this.create()}create(){const e=$b(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const t=this.xhr=new Nb(e);try{t.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&t.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{t.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in t&&(t.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(t.timeout=this.opts.requestTimeout),t.onreadystatechange=()=>{t.readyState===4&&(t.status===200||t.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof t.status=="number"?t.status:0)},0))},t.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=ui.requestsCount++,ui.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=iL,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ui.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ui.requestsCount=0;ui.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pv);else if(typeof addEventListener=="function"){const n="onpagehide"in Vi?"pagehide":"unload";addEventListener(n,pv,!1)}}function pv(){for(let n in ui.requests)ui.requests.hasOwnProperty(n)&&ui.requests[n].abort()}const Fb=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Ua=Vi.WebSocket||Vi.MozWebSocket,gv=!0,sL="arraybuffer",mv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class aL extends Ib{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,i=mv?{}:$b(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=gv&&!mv?t?new Ua(e,t):new Ua(e):new Ua(e,t,i)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType||sL,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const i=e[t],s=t===e.length-1;Mb(i,this.supportsBinary,o=>{const u={};try{gv&&this.ws.send(o)}catch{}s&&Fb(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const t=this.opts.secure?"wss":"ws";let i="";this.opts.port&&(t==="wss"&&Number(this.opts.port)!==443||t==="ws"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=Db()),this.supportsBinary||(e.b64=1);const s=Pb(e),o=this.opts.hostname.indexOf(":")!==-1;return t+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(s.length?"?"+s:"")}check(){return!!Ua}}const lL={websocket:aL,polling:oL},cL=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,uL=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function of(n){const e=n,t=n.indexOf("["),i=n.indexOf("]");t!=-1&&i!=-1&&(n=n.substring(0,t)+n.substring(t,i).replace(/:/g,";")+n.substring(i,n.length));let s=cL.exec(n||""),o={},u=14;for(;u--;)o[uL[u]]=s[u]||"";return t!=-1&&i!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=hL(o,o.path),o.queryKey=fL(o,o.query),o}function hL(n,e){const t=/\/{2,9}/g,i=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&i.splice(0,1),e.slice(-1)=="/"&&i.splice(i.length-1,1),i}function fL(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,s,o){s&&(t[s]=o)}),t}let Wb=class Gr extends zt{constructor(e,t={}){super(),e&&typeof e=="object"&&(t=e,e=null),e?(e=of(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=of(t.host).host),Nl(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},t),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=tL(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Tb,t.transport=e,this.id&&(t.sid=this.id);const i=Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new lL[e](i)}open(){let e;if(this.opts.rememberUpgrade&&Gr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(e){let t=this.createTransport(e),i=!1;Gr.priorWebsocketSuccess=!1;const s=()=>{i||(t.send([{type:"ping",data:"probe"}]),t.once("packet",f=>{if(!i)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Gr.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(r(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const a=new Error("probe error");a.transport=t.name,this.emitReserved("upgradeError",a)}}))};function o(){i||(i=!0,r(),t.close(),t=null)}const u=f=>{const a=new Error("probe error: "+f);a.transport=t.name,o(),this.emitReserved("upgradeError",a)};function d(){u("transport closed")}function l(){u("socket closed")}function p(f){t&&f.name!==t.name&&o()}const r=()=>{t.removeListener("open",s),t.removeListener("error",u),t.removeListener("close",d),this.off("close",l),this.off("upgrading",p)};t.once("open",s),t.once("error",u),t.once("close",d),this.once("close",l),this.once("upgrading",p),t.open()}onOpen(){if(this.readyState="open",Gr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let i=0;i<this.writeBuffer.length;i++){const s=this.writeBuffer[i].data;if(s&&(t+=QE(s)),i>0&&t>this.maxPayload)return this.writeBuffer.slice(0,i);t+=2}return this.writeBuffer}write(e,t,i){return this.sendPacket("message",e,t,i),this}send(e,t,i){return this.sendPacket("message",e,t,i),this}sendPacket(e,t,i,s){if(typeof t=="function"&&(s=t,t=void 0),typeof i=="function"&&(s=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const o={type:e,data:t,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),s&&this.once("flush",s),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},i=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():e()}):this.upgrading?i():e()),this}onError(e){Gr.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let i=0;const s=e.length;for(;i<s;i++)~this.transports.indexOf(e[i])&&t.push(e[i]);return t}};Wb.protocol=Tb;function dL(n,e="",t){let i=n;t=t||typeof location<"u"&&location,n==null&&(n=t.protocol+"//"+t.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=t.protocol+n:n=t.host+n),/^(https?|wss?):\/\//.test(n)||(typeof t<"u"?n=t.protocol+"//"+n:n="https://"+n),i=of(n)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const o=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+o+":"+i.port+e,i.href=i.protocol+"://"+o+(t&&t.port===i.port?"":":"+i.port),i}const pL=typeof ArrayBuffer=="function",gL=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Hb=Object.prototype.toString,mL=typeof Blob=="function"||typeof Blob<"u"&&Hb.call(Blob)==="[object BlobConstructor]",yL=typeof File=="function"||typeof File<"u"&&Hb.call(File)==="[object FileConstructor]";function Hf(n){return pL&&(n instanceof ArrayBuffer||gL(n))||mL&&n instanceof Blob||yL&&n instanceof File}function fl(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,i=n.length;t<i;t++)if(fl(n[t]))return!0;return!1}if(Hf(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return fl(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&fl(n[t]))return!0;return!1}function vL(n){const e=[],t=n.data,i=n;return i.data=sf(t,e),i.attachments=e.length,{packet:i,buffers:e}}function sf(n,e){if(!n)return n;if(Hf(n)){const t={_placeholder:!0,num:e.length};return e.push(n),t}else if(Array.isArray(n)){const t=new Array(n.length);for(let i=0;i<n.length;i++)t[i]=sf(n[i],e);return t}else if(typeof n=="object"&&!(n instanceof Date)){const t={};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=sf(n[i],e));return t}return n}function bL(n,e){return n.data=af(n.data,e),n.attachments=void 0,n}function af(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]=af(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=af(n[t],e));return n}const wL=5;var st;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(st||(st={}));class _L{constructor(e){this.replacer=e}encode(e){return(e.type===st.EVENT||e.type===st.ACK)&&fl(e)?(e.type=e.type===st.EVENT?st.BINARY_EVENT:st.BINARY_ACK,this.encodeAsBinary(e)):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===st.BINARY_EVENT||e.type===st.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=vL(e),i=this.encodeAsString(t.packet),s=t.buffers;return s.unshift(i),s}}class zf extends zt{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e),t.type===st.BINARY_EVENT||t.type===st.BINARY_ACK?(this.reconstructor=new xL(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(Hf(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const i={type:Number(e.charAt(0))};if(st[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===st.BINARY_EVENT||i.type===st.BINARY_ACK){const o=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const u=e.substring(o,t);if(u!=Number(u)||e.charAt(t)!=="-")throw new Error("Illegal attachments");i.attachments=Number(u)}if(e.charAt(t+1)==="/"){const o=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););i.nsp=e.substring(o,t)}else i.nsp="/";const s=e.charAt(t+1);if(s!==""&&Number(s)==s){const o=t+1;for(;++t;){const u=e.charAt(t);if(u==null||Number(u)!=u){--t;break}if(t===e.length)break}i.id=Number(e.substring(o,t+1))}if(e.charAt(++t)){const o=this.tryParse(e.substr(t));if(zf.isPayloadValid(i.type,o))i.data=o;else throw new Error("invalid payload")}return i}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case st.CONNECT:return typeof t=="object";case st.DISCONNECT:return t===void 0;case st.CONNECT_ERROR:return typeof t=="string"||typeof t=="object";case st.EVENT:case st.BINARY_EVENT:return Array.isArray(t)&&t.length>0;case st.ACK:case st.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class xL{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=bL(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const SL=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zf,Encoder:_L,get PacketType(){return st},protocol:wL},Symbol.toStringTag,{value:"Module"}));function Yn(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const AL=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zb extends zt{constructor(e,t,i){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,i&&i.auth&&(this.auth=i.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Yn(e,"open",this.onopen.bind(this)),Yn(e,"packet",this.onpacket.bind(this)),Yn(e,"error",this.onerror.bind(this)),Yn(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(AL.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');t.unshift(e);const i={type:st.EVENT,data:t};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const u=this.ids++,d=t.pop();this._registerAckCallback(u,d),i.id=u}const s=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!s||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){const i=this.flags.timeout;if(i===void 0){this.acks[e]=t;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&this.sendBuffer.splice(o,1);t.call(this,new Error("operation has timed out"))},i);this.acks[e]=(...o)=>{this.io.clearTimeoutFn(s),t.apply(this,[null,...o])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this.packet({type:st.CONNECT,data:e})}):this.packet({type:st.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case st.CONNECT:if(e.data&&e.data.sid){const s=e.data.sid;this.onconnect(s)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case st.EVENT:case st.BINARY_EVENT:this.onevent(e);break;case st.ACK:case st.BINARY_ACK:this.onack(e);break;case st.DISCONNECT:this.ondisconnect();break;case st.CONNECT_ERROR:this.destroy();const i=new Error(e.data.message);i.data=e.data.data,this.emitReserved("connect_error",i);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const i of t)i.apply(this,e)}super.emit.apply(this,e)}ack(e){const t=this;let i=!1;return function(...s){i||(i=!0,t.packet({type:st.ACK,id:e,data:s}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(t.apply(this,e.data),delete this.acks[e.id])}onconnect(e){this.id=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:st.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let i=0;i<t.length;i++)if(e===t[i])return t.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let i=0;i<t.length;i++)if(e===t[i])return t.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const i of t)i.apply(this,e.data)}}}function uo(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}uo.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*n);n=(Math.floor(e*10)&1)==0?n-t:n+t}return Math.min(n,this.max)|0};uo.prototype.reset=function(){this.attempts=0};uo.prototype.setMin=function(n){this.ms=n};uo.prototype.setMax=function(n){this.max=n};uo.prototype.setJitter=function(n){this.jitter=n};class lf extends zt{constructor(e,t){var i;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,Nl(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((i=t.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new uo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const s=t.parser||SL;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Wb(this.uri,this.opts);const t=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const s=Yn(t,"open",function(){i.onopen(),e&&e()}),o=Yn(t,"error",u=>{i.cleanup(),i._readyState="closed",this.emitReserved("error",u),e?e(u):i.maybeReconnectOnOpen()});if(this._timeout!==!1){const u=this._timeout;u===0&&s();const d=this.setTimeoutFn(()=>{s(),t.close(),t.emit("error",new Error("timeout"))},u);this.opts.autoUnref&&d.unref(),this.subs.push(function(){clearTimeout(d)})}return this.subs.push(s),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Yn(e,"ping",this.onping.bind(this)),Yn(e,"data",this.ondata.bind(this)),Yn(e,"error",this.onerror.bind(this)),Yn(e,"close",this.onclose.bind(this)),Yn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){Fb(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let i=this.nsps[e];return i||(i=new zb(this,e,t),this.nsps[e]=i),i}_destroy(e){const t=Object.keys(this.nsps);for(const i of t)if(this.nsps[i].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let i=0;i<t.length;i++)this.engine.write(t[i],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):e.onreconnect()}))},t);this.opts.autoUnref&&i.unref(),this.subs.push(function(){clearTimeout(i)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const To={};function dl(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=dL(n,e.path||"/socket.io"),i=t.source,s=t.id,o=t.path,u=To[s]&&o in To[s].nsps,d=e.forceNew||e["force new connection"]||e.multiplex===!1||u;let l;return d?l=new lf(i,e):(To[s]||(To[s]=new lf(i,e)),l=To[s]),t.query&&!e.query&&(e.query=t.queryKey),l.socket(t.path,e)}Object.assign(dl,{Manager:lf,Socket:zb,io:dl,connect:dl});class jf{constructor(){this.storage={"settings:visual:path-size":jn("M")},this.events=new oo,this.memory=gs.build("services:settings"),Object.assign(this.storage,this.memory.extract()??{})}assign(e,t){return this.storage[e]=t,this.memory.store(this.storage),this.emit(`assign:${e}`,t)}get(e){return this.storage[e]}on(e,t){return this.events.on(e,t),this}once(e,t){return this.events.once(e,t),this}emit(e,...t){return this.events.emit(e,...t),this}static build(){return new jf}}class Uf{constructor(){this.storage=new Set,this.events=new oo}register(e){return this.storage.has(e)||(this.storage.add(e),this.emit("register",e)),this}clear(){return this.storage.clear(),this}on(e,t){return this.events.on(e,t),this}once(e,t){return this.events.once(e,t),this}emit(e,...t){return this.events.emit(e,...t),this}static build(){return new Uf}}var Bh,yv;function CL(){if(yv)return Bh;yv=1;var n=function(w){return e(w)&&!t(w)};function e(v){return!!v&&typeof v=="object"}function t(v){var w=Object.prototype.toString.call(v);return w==="[object RegExp]"||w==="[object Date]"||o(v)}var i=typeof Symbol=="function"&&Symbol.for,s=i?Symbol.for("react.element"):60103;function o(v){return v.$$typeof===s}function u(v){return Array.isArray(v)?[]:{}}function d(v,w){return w.clone!==!1&&w.isMergeableObject(v)?m(u(v),v,w):v}function l(v,w,k){return v.concat(w).map(function(_){return d(_,k)})}function p(v,w){if(!w.customMerge)return m;var k=w.customMerge(v);return typeof k=="function"?k:m}function r(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(w){return Object.propertyIsEnumerable.call(v,w)}):[]}function f(v){return Object.keys(v).concat(r(v))}function a(v,w){try{return w in v}catch{return!1}}function c(v,w){return a(v,w)&&!(Object.hasOwnProperty.call(v,w)&&Object.propertyIsEnumerable.call(v,w))}function h(v,w,k){var _={};return k.isMergeableObject(v)&&f(v).forEach(function(S){_[S]=d(v[S],k)}),f(w).forEach(function(S){c(v,S)||(a(v,S)&&k.isMergeableObject(w[S])?_[S]=p(S,k)(v[S],w[S],k):_[S]=d(w[S],k))}),_}function m(v,w,k){k=k||{},k.arrayMerge=k.arrayMerge||l,k.isMergeableObject=k.isMergeableObject||n,k.cloneUnlessOtherwiseSpecified=d;var _=Array.isArray(w),S=Array.isArray(v),x=_===S;return x?_?k.arrayMerge(v,w,k):h(v,w,k):d(w,k)}m.all=function(w,k){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(_,S){return m(_,S,k)},{})};var y=m;return Bh=y,Bh}var kL=CL();const ML=di(kL);class Vf{constructor(){this.storage={history:{limit:100}}}assign(e){return this.storage=ML(this.storage,e,{arrayMerge:(t,i)=>i}),this}static build(){return new Vf}}class EL extends bM{constructor(){var e,t;super(...arguments),this.instances={io:dl(((e=window.DEV)==null?void 0:e.io.origin)??location.origin,{path:((t=window.DEV)==null?void 0:t.io.path)??`${location.pathname.split("/").slice(0,-3).join("/")}/socket.io/`})},this.services={settings:jf.build(),groups:Uf.build(),config:Vf.build(),io:{exec:(i,s)=>new Promise(o=>this.instances.io.emit(i,s,o)),subscribe:(i,s)=>this.instances.io.on(i,s)}}}}const He=new EL,LL=Ot.compile(BE);class qf extends At{constructor(e){super(LL({tabs:e.map(t=>t.type==="section"?Object.assign(t,{id:t.entity.id,isSelected:!t.entity.isHidden}):t)})),this.tabs=e,this.sections=this.tabs.map(t=>t.type==="section"?t.entity:null).filter(Boolean).reduce((t,i)=>Ln.set(t,i.id,i),{}),this.events=new oo,Object.values(this.sections).forEach(t=>t.on("select",()=>{const i=this.element.querySelector(`button#${t.id}`);this.element.querySelectorAll("div#tabs button").forEach(s=>s.classList.remove("checked")),i==null||i.classList.add("checked")})),this.element.querySelector("div#tabs").addEventListener("click",t=>{var s;const i=t;((s=i.target)==null?void 0:s.nodeName)!=="BUTTON"||!this.sections[i.target.id]||this.emit("select",this.sections[i.target.id])}),this.on("select",t=>{Object.values(this.sections).forEach(i=>i.hide()),He.switchStorage(t.storage),t.isInitialized?t.show().select():t.initialize().show().select()})}on(e,t){return this.events.on(e,t),this}once(e,t){return this.events.once(e,t),this}emit(e,...t){return this.events.emit(e,...t),this}static build(e){return new qf(e)}}var Nh={exports:{}},vv;function RL(){return vv||(vv=1,function(n,e){(function(){function t(p){var r=i;(!r.define||!r.define.packaged)&&(s.original=r.define,r.define=s,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(u.original=r.require,r.require=u,r.require.packaged=!0)}var i=function(){return this}();if(!i&&typeof window<"u"&&(i=window),!(typeof requirejs<"u")){var s=function(p,r,f){if(typeof p!="string"){s.original?s.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(f=r),s.modules[p]||(s.payloads[p]=f,s.modules[p]=null)};s.modules={},s.payloads={};var o=function(p,r,f){if(typeof r=="string"){var a=l(p,r);if(a!=null)return f&&f(),a}else if(Object.prototype.toString.call(r)==="[object Array]"){for(var c=[],h=0,m=r.length;h<m;++h){var y=l(p,r[h]);if(y==null&&u.original)return;c.push(y)}return f&&f.apply(null,c)||!0}},u=function(p,r){var f=o("",p,r);return f==null&&u.original?u.original.apply(this,arguments):f},d=function(p,r){if(r.indexOf("!")!==-1){var f=r.split("!");return d(p,f[0])+"!"+d(p,f[1])}if(r.charAt(0)=="."){var a=p.split("/").slice(0,-1).join("/");for(r=a+"/"+r;r.indexOf(".")!==-1&&c!=r;){var c=r;r=r.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return r},l=function(p,r){r=d(p,r);var f=s.modules[r];if(!f){if(f=s.payloads[r],typeof f=="function"){var a={},c={id:r,uri:"",exports:a,packaged:!0},h=function(y,v){return o(r,y,v)},m=f(h,a,c);a=m||c.exports,s.modules[r]=a,delete s.payloads[r]}f=s.modules[r]=a||f}return f};t()}})(),(void 0)("ace/lib/es6-shim",["require","exports","module"],function(t,i,s){function o(u,d,l){Object.defineProperty(u,d,{value:l,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||o(String.prototype,"startsWith",function(u,d){return d=d||0,this.lastIndexOf(u,d)===d}),String.prototype.endsWith||o(String.prototype,"endsWith",function(u,d){var l=this;(d===void 0||d>l.length)&&(d=l.length),d-=u.length;var p=l.indexOf(u,d);return p!==-1&&p===d}),String.prototype.repeat||o(String.prototype,"repeat",function(u){for(var d="",l=this;u>0;)u&1&&(d+=l),(u>>=1)&&(l+=l);return d}),String.prototype.includes||o(String.prototype,"includes",function(u,d){return this.indexOf(u,d)!=-1}),Object.assign||(Object.assign=function(u){if(u==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(u),l=1;l<arguments.length;l++){var p=arguments[l];p!=null&&Object.keys(p).forEach(function(r){d[r]=p[r]})}return d}),Object.values||(Object.values=function(u){return Object.keys(u).map(function(d){return u[d]})}),Array.prototype.find||o(Array.prototype,"find",function(u){for(var d=this.length,l=arguments[1],p=0;p<d;p++){var r=this[p];if(u.call(l,r,p,this))return r}}),Array.prototype.findIndex||o(Array.prototype,"findIndex",function(u){for(var d=this.length,l=arguments[1],p=0;p<d;p++){var r=this[p];if(u.call(l,r,p,this))return p}}),Array.prototype.includes||o(Array.prototype,"includes",function(u,d){return this.indexOf(u,d)!=-1}),Array.prototype.fill||o(Array.prototype,"fill",function(u){for(var d=this,l=d.length>>>0,p=arguments[1],r=p>>0,f=r<0?Math.max(l+r,0):Math.min(r,l),a=arguments[2],c=a===void 0?l:a>>0,h=c<0?Math.max(l+c,0):Math.min(c,l);f<h;)d[f]=u,f++;return d}),Array.of||o(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),(void 0)("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(t,i,s){t("./es6-shim")}),(void 0)("ace/lib/deep_copy",["require","exports","module"],function(t,i,s){i.deepCopy=function o(u){if(typeof u!="object"||!u)return u;var d;if(Array.isArray(u)){d=[];for(var l=0;l<u.length;l++)d[l]=o(u[l]);return d}if(Object.prototype.toString.call(u)!=="[object Object]")return u;d={};for(var l in u)d[l]=o(u[l]);return d}}),(void 0)("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(t,i,s){i.last=function(d){return d[d.length-1]},i.stringReverse=function(d){return d.split("").reverse().join("")},i.stringRepeat=function(d,l){for(var p="";l>0;)l&1&&(p+=d),(l>>=1)&&(d+=d);return p};var o=/^\s\s*/,u=/\s\s*$/;i.stringTrimLeft=function(d){return d.replace(o,"")},i.stringTrimRight=function(d){return d.replace(u,"")},i.copyObject=function(d){var l={};for(var p in d)l[p]=d[p];return l},i.copyArray=function(d){for(var l=[],p=0,r=d.length;p<r;p++)d[p]&&typeof d[p]=="object"?l[p]=this.copyObject(d[p]):l[p]=d[p];return l},i.deepCopy=t("./deep_copy").deepCopy,i.arrayToMap=function(d){for(var l={},p=0;p<d.length;p++)l[d[p]]=1;return l},i.createMap=function(d){var l=Object.create(null);for(var p in d)l[p]=d[p];return l},i.arrayRemove=function(d,l){for(var p=0;p<=d.length;p++)l===d[p]&&d.splice(p,1)},i.escapeRegExp=function(d){return d.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},i.escapeHTML=function(d){return(""+d).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},i.getMatchOffsets=function(d,l){var p=[];return d.replace(l,function(r){p.push({offset:arguments[arguments.length-2],length:r.length})}),p},i.deferredCall=function(d){var l=null,p=function(){l=null,d()},r=function(f){return r.cancel(),l=setTimeout(p,f||0),r};return r.schedule=r,r.call=function(){return this.cancel(),d(),r},r.cancel=function(){return clearTimeout(l),l=null,r},r.isPending=function(){return l},r},i.delayedCall=function(d,l){var p=null,r=function(){p=null,d()},f=function(a){p==null&&(p=setTimeout(r,a||l))};return f.delay=function(a){p&&clearTimeout(p),p=setTimeout(r,a||l)},f.schedule=f,f.call=function(){this.cancel(),d()},f.cancel=function(){p&&clearTimeout(p),p=null},f.isPending=function(){return p},f},i.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},i.skipEmptyMatch=function(d,l,p){return p&&d.codePointAt(l)>65535?2:1}}),(void 0)("ace/lib/useragent",["require","exports","module"],function(t,i,s){i.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},i.getOS=function(){return i.isMac?i.OS.MAC:i.isLinux?i.OS.LINUX:i.OS.WINDOWS};var o=typeof navigator=="object"?navigator:{},u=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),d=o.userAgent||"",l=o.appName||"";i.isWin=u=="win",i.isMac=u=="mac",i.isLinux=u=="linux",i.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),i.isOldIE=i.isIE&&i.isIE<9,i.isGecko=i.isMozilla=d.match(/ Gecko\/\d+/),i.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",i.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,i.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,i.isSafari=parseFloat(d.split(" Safari/")[1])&&!i.isChrome||void 0,i.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,i.isAIR=d.indexOf("AdobeAIR")>=0,i.isAndroid=d.indexOf("Android")>=0,i.isChromeOS=d.indexOf(" CrOS ")>=0,i.isIOS=/iPad|iPhone|iPod/.test(d)&&!window.MSStream,i.isIOS&&(i.isMac=!0),i.isMobile=i.isIOS||i.isAndroid}),(void 0)("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,i,s){function o(){var a=r;r=null,a&&a.forEach(function(c){u(c[0],c[1])})}function u(a,c,h){if(!(typeof document>"u")){if(r){if(h)o();else if(h===!1)return r.push([a,c])}if(!p){var m=h;!h||!h.getRootNode?m=document:(m=h.getRootNode(),(!m||m==h)&&(m=document));var y=m.ownerDocument||m;if(c&&i.hasCssString(c,m))return null;c&&(a+=`
|
|
141
|
+
/*# sourceURL=ace/css/`+c+" */");var v=i.createElement("style");v.appendChild(y.createTextNode(a)),c&&(v.id=c),m==y&&(m=i.getDocumentHead(y)),m.insertBefore(v,m.firstChild)}}}var d=t("./useragent"),l="http://www.w3.org/1999/xhtml";i.buildDom=function a(c,h,m){if(typeof c=="string"&&c){var y=document.createTextNode(c);return h&&h.appendChild(y),y}if(!Array.isArray(c))return c&&c.appendChild&&h&&h.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var v=[],w=0;w<c.length;w++){var k=a(c[w],h,m);k&&v.push(k)}return v}var _=document.createElement(c[0]),S=c[1],x=1;S&&typeof S=="object"&&!Array.isArray(S)&&(x=2);for(var w=x;w<c.length;w++)a(c[w],_,m);return x==2&&Object.keys(S).forEach(function(L){var I=S[L];L==="class"?_.className=Array.isArray(I)?I.join(" "):I:typeof I=="function"||L=="value"||L[0]=="$"?_[L]=I:L==="ref"?m&&(m[I]=_):L==="style"?typeof I=="string"&&(_.style.cssText=I):I!=null&&_.setAttribute(L,I)}),h&&h.appendChild(_),_},i.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},i.createElement=function(a,c){return document.createElementNS?document.createElementNS(c||l,a):document.createElement(a)},i.removeChildren=function(a){a.innerHTML=""},i.createTextNode=function(a,c){var h=c?c.ownerDocument:document;return h.createTextNode(a)},i.createFragment=function(a){var c=a?a.ownerDocument:document;return c.createDocumentFragment()},i.hasCssClass=function(a,c){var h=(a.className+"").split(/\s+/g);return h.indexOf(c)!==-1},i.addCssClass=function(a,c){i.hasCssClass(a,c)||(a.className+=" "+c)},i.removeCssClass=function(a,c){for(var h=a.className.split(/\s+/g);;){var m=h.indexOf(c);if(m==-1)break;h.splice(m,1)}a.className=h.join(" ")},i.toggleCssClass=function(a,c){for(var h=a.className.split(/\s+/g),m=!0;;){var y=h.indexOf(c);if(y==-1)break;m=!1,h.splice(y,1)}return m&&h.push(c),a.className=h.join(" "),m},i.setCssClass=function(a,c,h){h?i.addCssClass(a,c):i.removeCssClass(a,c)},i.hasCssString=function(a,c){var h=0,m;if(c=c||document,m=c.querySelectorAll("style")){for(;h<m.length;)if(m[h++].id===a)return!0}},i.removeElementById=function(a,c){c=c||document,c.getElementById(a)&&c.getElementById(a).remove()};var p,r=[];if(i.useStrictCSP=function(a){p=a,a==0?o():r||(r=[])},i.importCssString=u,i.importCssStylsheet=function(a,c){i.buildDom(["link",{rel:"stylesheet",href:a}],i.getDocumentHead(c))},i.scrollbarWidth=function(a){var c=i.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var h=i.createElement("ace_outer"),m=h.style;m.position="absolute",m.left="-10000px",m.overflow="hidden",m.width="200px",m.minWidth="0px",m.height="150px",m.display="block",h.appendChild(c);var y=a&&a.documentElement||document&&document.documentElement;if(!y)return 0;y.appendChild(h);var v=c.offsetWidth;m.overflow="scroll";var w=c.offsetWidth;return v===w&&(w=h.clientWidth),y.removeChild(h),v-w},i.computedStyle=function(a,c){return window.getComputedStyle(a,"")||{}},i.setStyle=function(a,c,h){a[c]!==h&&(a[c]=h)},i.HAS_CSS_ANIMATION=!1,i.HAS_CSS_TRANSFORMS=!1,i.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.isChromeOS&&(i.HI_DPI=!1),typeof document<"u"){var f=document.createElement("div");i.HI_DPI&&f.style.transform!==void 0&&(i.HAS_CSS_TRANSFORMS=!0),!d.isEdge&&typeof f.style.animationName<"u"&&(i.HAS_CSS_ANIMATION=!0),f=null}i.HAS_CSS_TRANSFORMS?i.translate=function(a,c,h){a.style.transform="translate("+Math.round(c)+"px, "+Math.round(h)+"px)"}:i.translate=function(a,c,h){a.style.top=Math.round(h)+"px",a.style.left=Math.round(c)+"px"}}),(void 0)("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,i,s){var o=t("./dom");i.get=function(u,d){var l=new XMLHttpRequest;l.open("GET",u,!0),l.onreadystatechange=function(){l.readyState===4&&d(l.responseText)},l.send(null)},i.loadScript=function(u,d){var l=o.getDocumentHead(),p=document.createElement("script");p.src=u,l.appendChild(p),p.onload=p.onreadystatechange=function(r,f){(f||!p.readyState||p.readyState=="loaded"||p.readyState=="complete")&&(p=p.onload=p.onreadystatechange=null,f||d())}},i.qualifyURL=function(u){var d=document.createElement("a");return d.href=u,d.href}}),(void 0)("ace/lib/oop",["require","exports","module"],function(t,i,s){i.inherits=function(o,u){o.super_=u,o.prototype=Object.create(u.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function(o,u){for(var d in u)o[d]=u[d];return o},i.implement=function(o,u){i.mixin(o,u)}}),(void 0)("ace/lib/event_emitter",["require","exports","module"],function(t,i,s){var o={},u=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(l,p){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[l]||[],f=this._defaultHandlers[l];if(!(!r.length&&!f)){(typeof p!="object"||!p)&&(p={}),p.type||(p.type=l),p.stopPropagation||(p.stopPropagation=u),p.preventDefault||(p.preventDefault=d),r=r.slice();for(var a=0;a<r.length&&(r[a](p,this),!p.propagationStopped);a++);if(f&&!p.defaultPrevented)return f(p,this)}},o._signal=function(l,p){var r=(this._eventRegistry||{})[l];if(r){r=r.slice();for(var f=0;f<r.length;f++)r[f](p,this)}},o.once=function(l,p){var r=this;if(this.on(l,function f(){r.off(l,f),p.apply(null,arguments)}),!p)return new Promise(function(f){p=f})},o.setDefaultHandler=function(l,p){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[l]){var f=r[l],a=r._disabled_[l];a||(r._disabled_[l]=a=[]),a.push(f);var c=a.indexOf(p);c!=-1&&a.splice(c,1)}r[l]=p},o.removeDefaultHandler=function(l,p){var r=this._defaultHandlers;if(r){var f=r._disabled_[l];if(r[l]==p)f&&this.setDefaultHandler(l,f.pop());else if(f){var a=f.indexOf(p);a!=-1&&f.splice(a,1)}}},o.on=o.addEventListener=function(l,p,r){this._eventRegistry=this._eventRegistry||{};var f=this._eventRegistry[l];return f||(f=this._eventRegistry[l]=[]),f.indexOf(p)==-1&&f[r?"unshift":"push"](p),p},o.off=o.removeListener=o.removeEventListener=function(l,p){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[l];if(r){var f=r.indexOf(p);f!==-1&&r.splice(f,1)}},o.removeAllListeners=function(l){l||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[l]=void 0),this._defaultHandlers&&(this._defaultHandlers[l]=void 0)},i.EventEmitter=o}),(void 0)("ace/lib/report_error",["require","exports","module"],function(t,i,s){i.reportError=function(o,u){var d=new Error(o);d.data=u,typeof console=="object"&&console.error&&console.error(d),setTimeout(function(){throw d})}}),(void 0)("ace/lib/default_english_messages",["require","exports","module"],function(t,i,s){var o={"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"};i.defaultEnglishMessages=o}),(void 0)("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,i,s){"no use strict";function o(h){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var u=t("./oop"),d=t("./event_emitter").EventEmitter,l=t("./report_error").reportError,p=t("./default_english_messages").defaultEnglishMessages,r={setOptions:function(h){Object.keys(h).forEach(function(m){this.setOption(m,h[m])},this)},getOptions:function(h){var m={};if(h)Array.isArray(h)||(m=h,h=Object.keys(m));else{var y=this.$options;h=Object.keys(y).filter(function(v){return!y[v].hidden})}return h.forEach(function(v){m[v]=this.getOption(v)},this),m},setOption:function(h,m){if(this["$"+h]!==m){var y=this.$options[h];if(!y)return o('misspelled option "'+h+'"');if(y.forwardTo)return this[y.forwardTo]&&this[y.forwardTo].setOption(h,m);y.handlesSet||(this["$"+h]=m),y&&y.set&&y.set.call(this,m)}},getOption:function(h){var m=this.$options[h];return m?m.forwardTo?this[m.forwardTo]&&this[m.forwardTo].getOption(h):m&&m.get?m.get.call(this):this["$"+h]:o('misspelled option "'+h+'"')}},f,a,c=function(){function h(){this.$defaultOptions={},f=p,a="dollarSigns"}return h.prototype.defineOptions=function(m,y,v){return m.$options||(this.$defaultOptions[y]=m.$options={}),Object.keys(v).forEach(function(w){var k=v[w];typeof k=="string"&&(k={forwardTo:k}),k.name||(k.name=w),m.$options[k.name]=k,"initialValue"in k&&(m["$"+k.name]=k.initialValue)}),u.implement(m,r),this},h.prototype.resetOptions=function(m){Object.keys(m.$options).forEach(function(y){var v=m.$options[y];"value"in v&&m.setOption(y,v.value)})},h.prototype.setDefaultValue=function(m,y,v){if(!m){for(m in this.$defaultOptions)if(this.$defaultOptions[m][y])break;if(!this.$defaultOptions[m][y])return!1}var w=this.$defaultOptions[m]||(this.$defaultOptions[m]={});w[y]&&(w.forwardTo?this.setDefaultValue(w.forwardTo,y,v):w[y].value=v)},h.prototype.setDefaultValues=function(m,y){Object.keys(y).forEach(function(v){this.setDefaultValue(m,v,y[v])},this)},h.prototype.setMessages=function(m,y){f=m,y&&y.placeholders&&(a=y.placeholders)},h.prototype.nls=function(m,y,v){f[m]||(o("No message found for the key '"+m+"' in messages with id "+f.$id+", trying to find a translation for the default string '"+y+"'."),f[y]||o("No message found for the default string '"+y+"' in the provided messages. Falling back to the default English message."));var w=f[m]||f[y]||y;return v&&(a==="dollarSigns"&&(w=w.replace(/\$(\$|[\d]+)/g,function(k,_){return _=="$"?"$":v[_]})),a==="curlyBrackets"&&(w=w.replace(/\{([^\}]+)\}/g,function(k,_){return v[_]}))),w},h}();c.prototype.warn=o,c.prototype.reportError=l,u.implement(c.prototype,d),i.AppConfig=c}),(void 0)("ace/theme/textmate-css",["require","exports","module"],function(t,i,s){s.exports=`.ace-tm .ace_gutter {
|
|
142
|
+
background: #f0f0f0;
|
|
143
|
+
color: #333;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ace-tm .ace_print-margin {
|
|
147
|
+
width: 1px;
|
|
148
|
+
background: #e8e8e8;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.ace-tm .ace_fold {
|
|
152
|
+
background-color: #6B72E6;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.ace-tm {
|
|
156
|
+
background-color: #FFFFFF;
|
|
157
|
+
color: black;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ace-tm .ace_cursor {
|
|
161
|
+
color: black;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.ace-tm .ace_invisible {
|
|
165
|
+
color: rgb(191, 191, 191);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.ace-tm .ace_storage,
|
|
169
|
+
.ace-tm .ace_keyword {
|
|
170
|
+
color: blue;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.ace-tm .ace_constant {
|
|
174
|
+
color: rgb(197, 6, 11);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ace-tm .ace_constant.ace_buildin {
|
|
178
|
+
color: rgb(88, 72, 246);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ace-tm .ace_constant.ace_language {
|
|
182
|
+
color: rgb(88, 92, 246);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.ace-tm .ace_constant.ace_library {
|
|
186
|
+
color: rgb(6, 150, 14);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.ace-tm .ace_invalid {
|
|
190
|
+
background-color: rgba(255, 0, 0, 0.1);
|
|
191
|
+
color: red;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ace-tm .ace_support.ace_function {
|
|
195
|
+
color: rgb(60, 76, 114);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ace-tm .ace_support.ace_constant {
|
|
199
|
+
color: rgb(6, 150, 14);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.ace-tm .ace_support.ace_type,
|
|
203
|
+
.ace-tm .ace_support.ace_class {
|
|
204
|
+
color: rgb(109, 121, 222);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.ace-tm .ace_keyword.ace_operator {
|
|
208
|
+
color: rgb(104, 118, 135);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ace-tm .ace_string {
|
|
212
|
+
color: rgb(3, 106, 7);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.ace-tm .ace_comment {
|
|
216
|
+
color: rgb(76, 136, 107);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.ace-tm .ace_comment.ace_doc {
|
|
220
|
+
color: rgb(0, 102, 255);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
|
224
|
+
color: rgb(128, 159, 191);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.ace-tm .ace_constant.ace_numeric {
|
|
228
|
+
color: rgb(0, 0, 205);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.ace-tm .ace_variable {
|
|
232
|
+
color: rgb(49, 132, 149);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ace-tm .ace_xml-pe {
|
|
236
|
+
color: rgb(104, 104, 91);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
|
240
|
+
color: #0000A2;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
.ace-tm .ace_heading {
|
|
245
|
+
color: rgb(12, 7, 255);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.ace-tm .ace_list {
|
|
249
|
+
color:rgb(185, 6, 144);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.ace-tm .ace_meta.ace_tag {
|
|
253
|
+
color:rgb(0, 22, 142);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.ace-tm .ace_string.ace_regex {
|
|
257
|
+
color: rgb(255, 0, 0)
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
|
261
|
+
background: rgb(181, 213, 255);
|
|
262
|
+
}
|
|
263
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
|
264
|
+
box-shadow: 0 0 3px 0px white;
|
|
265
|
+
}
|
|
266
|
+
.ace-tm .ace_marker-layer .ace_step {
|
|
267
|
+
background: rgb(252, 255, 0);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
|
271
|
+
background: rgb(164, 229, 101);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
|
275
|
+
margin: -1px 0 0 -1px;
|
|
276
|
+
border: 1px solid rgb(192, 192, 192);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
|
280
|
+
background: rgba(0, 0, 0, 0.07);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.ace-tm .ace_gutter-active-line {
|
|
284
|
+
background-color : #dcdcdc;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
|
288
|
+
background: rgb(250, 250, 255);
|
|
289
|
+
border: 1px solid rgb(200, 200, 250);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.ace-tm .ace_indent-guide {
|
|
293
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.ace-tm .ace_indent-guide-active {
|
|
297
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
298
|
+
}
|
|
299
|
+
`}),(void 0)("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,i,s){i.isDark=!1,i.cssClass="ace-tm",i.cssText=t("./textmate-css"),i.$id="ace/theme/textmate";var o=t("../lib/dom");o.importCssString(i.cssText,i.cssClass,!1)}),(void 0)("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(t,i,s){"no use strict";var o=t("./lib/lang"),u=t("./lib/net"),d=t("./lib/dom"),l=t("./lib/app_config").AppConfig;s.exports=i=new l;var p={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};i.get=function(c){if(!p.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return p[c]},i.set=function(c,h){if(p.hasOwnProperty(c))p[c]=h;else if(this.setDefaultValue("",c,h)==0)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&d.useStrictCSP(h)},i.all=function(){return o.copyObject(p)},i.$modes={},i.moduleUrl=function(c,h){if(p.$moduleUrls[c])return p.$moduleUrls[c];var m=c.split("/");h=h||m[m.length-2]||"";var y=h=="snippets"?"/":"-",v=m[m.length-1];if(h=="worker"&&y=="-"){var w=new RegExp("^"+h+"[\\-_]|[\\-_]"+h+"$","g");v=v.replace(w,"")}(!v||v==h)&&m.length>1&&(v=m[m.length-2]);var k=p[h+"Path"];return k==null?k=p.basePath:y=="/"&&(h=y=""),k&&k.slice(-1)!="/"&&(k+="/"),k+h+y+v+this.get("suffix")},i.setModuleUrl=function(c,h){return p.$moduleUrls[c]=h};var r=function(c,h){if(c==="ace/theme/textmate"||c==="./theme/textmate")return h(null,t("./theme/textmate"));if(f)return f(c,h);console.error("loader is not configured")},f;i.setLoader=function(c){f=c},i.dynamicModules=Object.create(null),i.$loading={},i.$loaded={},i.loadModule=function(c,h){var m;if(Array.isArray(c))var y=c[0],v=c[1];else if(typeof c=="string")var v=c;var w=function(k){if(k&&!i.$loading[v])return h&&h(k);if(i.$loading[v]||(i.$loading[v]=[]),i.$loading[v].push(h),!(i.$loading[v].length>1)){var _=function(){r(v,function(S,x){x&&(i.$loaded[v]=x),i._emit("load.module",{name:v,module:x});var L=i.$loading[v];i.$loading[v]=null,L.forEach(function(I){I&&I(x)})})};if(!i.get("packaged"))return _();u.loadScript(i.moduleUrl(v,y),_),a()}};if(i.dynamicModules[v])i.dynamicModules[v]().then(function(k){k.default?w(k.default):w(k)});else{try{m=this.$require(v)}catch{}w(m||i.$loaded[v])}},i.$require=function(c){if(typeof s.require=="function"){var h="require";return s[h](c)}},i.setModuleLoader=function(c,h){i.dynamicModules[c]=h};var a=function(){!p.basePath&&!p.workerPath&&!p.modePath&&!p.themePath&&!Object.keys(p.$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"),a=function(){})};i.version="1.38.0"}),(void 0)("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,i,s){function o(p){if(!(!l||!l.document)){d.set("packaged",p||t.packaged||s.packaged||l.define&&(void 0).packaged);var r={},f="",a=document.currentScript||document._currentScript,c=a&&a.ownerDocument||document;a&&a.src&&(f=a.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var h=c.getElementsByTagName("script"),m=0;m<h.length;m++){var y=h[m],v=y.src||y.getAttribute("src");if(v){for(var w=y.attributes,k=0,_=w.length;k<_;k++){var S=w[k];S.name.indexOf("data-ace-")===0&&(r[u(S.name.replace(/^data-ace-/,""))]=S.value)}var x=v.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);x&&(f=x[1])}}f&&(r.base=r.base||f,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var L in r)typeof r[L]<"u"&&d.set(L,r[L])}}function u(p){return p.replace(/-(.)/g,function(r,f){return f.toUpperCase()})}t("./lib/fixoldbrowsers");var d=t("./config");d.setLoader(function(p,r){t([p],function(f){r(null,f)})});var l=function(){return this||typeof window<"u"&&window}();s.exports=function(p){d.init=o,d.$require=t,p.require=t}}),(void 0)("ace/range",["require","exports","module"],function(t,i,s){var o=function(){function u(d,l,p,r){this.start={row:d,column:l},this.end={row:p,column:r}}return u.prototype.isEqual=function(d){return this.start.row===d.start.row&&this.end.row===d.end.row&&this.start.column===d.start.column&&this.end.column===d.end.column},u.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},u.prototype.contains=function(d,l){return this.compare(d,l)==0},u.prototype.compareRange=function(d){var l,p=d.end,r=d.start;return l=this.compare(p.row,p.column),l==1?(l=this.compare(r.row,r.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(r.row,r.column),l==-1?-1:l==1?42:0)},u.prototype.comparePoint=function(d){return this.compare(d.row,d.column)},u.prototype.containsRange=function(d){return this.comparePoint(d.start)==0&&this.comparePoint(d.end)==0},u.prototype.intersects=function(d){var l=this.compareRange(d);return l==-1||l==0||l==1},u.prototype.isEnd=function(d,l){return this.end.row==d&&this.end.column==l},u.prototype.isStart=function(d,l){return this.start.row==d&&this.start.column==l},u.prototype.setStart=function(d,l){typeof d=="object"?(this.start.column=d.column,this.start.row=d.row):(this.start.row=d,this.start.column=l)},u.prototype.setEnd=function(d,l){typeof d=="object"?(this.end.column=d.column,this.end.row=d.row):(this.end.row=d,this.end.column=l)},u.prototype.inside=function(d,l){return this.compare(d,l)==0?!(this.isEnd(d,l)||this.isStart(d,l)):!1},u.prototype.insideStart=function(d,l){return this.compare(d,l)==0?!this.isEnd(d,l):!1},u.prototype.insideEnd=function(d,l){return this.compare(d,l)==0?!this.isStart(d,l):!1},u.prototype.compare=function(d,l){return!this.isMultiLine()&&d===this.start.row?l<this.start.column?-1:l>this.end.column?1:0:d<this.start.row?-1:d>this.end.row?1:this.start.row===d?l>=this.start.column?0:-1:this.end.row===d?l<=this.end.column?0:1:0},u.prototype.compareStart=function(d,l){return this.start.row==d&&this.start.column==l?-1:this.compare(d,l)},u.prototype.compareEnd=function(d,l){return this.end.row==d&&this.end.column==l?1:this.compare(d,l)},u.prototype.compareInside=function(d,l){return this.end.row==d&&this.end.column==l?1:this.start.row==d&&this.start.column==l?-1:this.compare(d,l)},u.prototype.clipRows=function(d,l){if(this.end.row>l)var p={row:l+1,column:0};else if(this.end.row<d)var p={row:d,column:0};if(this.start.row>l)var r={row:l+1,column:0};else if(this.start.row<d)var r={row:d,column:0};return u.fromPoints(r||this.start,p||this.end)},u.prototype.extend=function(d,l){var p=this.compare(d,l);if(p==0)return this;if(p==-1)var r={row:d,column:l};else var f={row:d,column:l};return u.fromPoints(r||this.start,f||this.end)},u.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},u.prototype.isMultiLine=function(){return this.start.row!==this.end.row},u.prototype.clone=function(){return u.fromPoints(this.start,this.end)},u.prototype.collapseRows=function(){return this.end.column==0?new u(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new u(this.start.row,0,this.end.row,0)},u.prototype.toScreenRange=function(d){var l=d.documentToScreenPosition(this.start),p=d.documentToScreenPosition(this.end);return new u(l.row,l.column,p.row,p.column)},u.prototype.moveBy=function(d,l){this.start.row+=d,this.start.column+=l,this.end.row+=d,this.end.column+=l},u}();o.fromPoints=function(u,d){return new o(u.row,u.column,d.row,d.column)},o.comparePoints=function(u,d){return u.row-d.row||u.column-d.column},i.Range=o}),(void 0)("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,i,s){for(var o=t("./oop"),u={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:"*"}},d={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},l=0;l<10;l++)d["Digit"+l]=48+l,d["Numpad"+l]=96+l,u.PRINTABLE_KEYS[48+l]=""+l,u.FUNCTION_KEYS[96+l]="Numpad"+l;for(var l=65;l<91;l++){var p=String.fromCharCode(l+32);d["Key"+p.toUpperCase()]=l,u.PRINTABLE_KEYS[l]=p}for(var l=1;l<13;l++)d["F"+l]=111+l,u.FUNCTION_KEYS[111+l]="F"+l;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var f in r)d[f]=d[f+"Left"]=d[f+"Right"]=r[f];i.$codeToKeyCode=d,u.PRINTABLE_KEYS[173]="-";for(var a in u.FUNCTION_KEYS){var c=u.FUNCTION_KEYS[a].toLowerCase();u[c]=parseInt(a,10)}for(var a in u.PRINTABLE_KEYS){var c=u.PRINTABLE_KEYS[a].toLowerCase();u[c]=parseInt(a,10)}o.mixin(u,u.MODIFIER_KEYS),o.mixin(u,u.PRINTABLE_KEYS),o.mixin(u,u.FUNCTION_KEYS),u.enter=u.return,u.escape=u.esc,u.del=u.delete,function(){for(var h=["cmd","ctrl","alt","shift"],m=Math.pow(2,h.length);m--;)u.KEY_MODS[m]=h.filter(function(y){return m&u.KEY_MODS[y]}).join("-")+"-"}(),u.KEY_MODS[0]="",u.KEY_MODS[-1]="input-",o.mixin(i,u),i.default=i,i.keyCodeToString=function(h){var m=u[h];return typeof m!="string"&&(m=String.fromCharCode(h)),m.toLowerCase()}}),(void 0)("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,i,s){function o(){m=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return m={passive:!1},!0}})}catch{}}function u(){return m==null&&o(),m}function d(k,_,S){this.elem=k,this.type=_,this.callback=S}function l(k){return 0|(k.ctrlKey?1:0)|(k.altKey?2:0)|(k.shiftKey?4:0)|(k.metaKey?8:0)}function p(k,_,S){var x=l(_);if(!S&&_.code&&(S=f.$codeToKeyCode[_.code]||S),!a.isMac&&c){if(_.getModifierState&&(_.getModifierState("OS")||_.getModifierState("Win"))&&(x|=8),c.altGr){if((3&x)==3)return;c.altGr=0}if(S===18||S===17){var L=_.location;if(S===17&&L===1)c[S]==1&&(h=_.timeStamp);else if(S===18&&x===3&&L===2){var I=_.timeStamp-h;I<50&&(c.altGr=!0)}}}if(S in f.MODIFIER_KEYS&&(S=-1),!(!x&&S===13&&_.location===3&&(k(_,x,-S),_.defaultPrevented))){if(a.isChromeOS&&x&8){if(k(_,x,S),_.defaultPrevented)return;x&=-9}return x||S in f.FUNCTION_KEYS||S in f.PRINTABLE_KEYS?k(_,x,S):!1}}function r(){c=Object.create(null)}var f=t("./keys"),a=t("./useragent"),c=null,h=0,m;d.prototype.destroy=function(){v(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var y=i.addListener=function(k,_,S,x){k.addEventListener(_,S,u()),x&&x.$toDestroy.push(new d(k,_,S))},v=i.removeListener=function(k,_,S){k.removeEventListener(_,S,u())};if(i.stopEvent=function(k){return i.stopPropagation(k),i.preventDefault(k),!1},i.stopPropagation=function(k){k.stopPropagation&&k.stopPropagation()},i.preventDefault=function(k){k.preventDefault&&k.preventDefault()},i.getButton=function(k){return k.type=="dblclick"?0:k.type=="contextmenu"||a.isMac&&k.ctrlKey&&!k.altKey&&!k.shiftKey?2:k.button},i.capture=function(k,_,S){function x(I){_&&_(I),S&&S(I),v(L,"mousemove",_),v(L,"mouseup",x),v(L,"dragstart",x)}var L=k&&k.ownerDocument||document;return y(L,"mousemove",_),y(L,"mouseup",x),y(L,"dragstart",x),x},i.addMouseWheelListener=function(k,_,S){y(k,"wheel",function(x){var L=.15,I=x.deltaX||0,$=x.deltaY||0;switch(x.deltaMode){case x.DOM_DELTA_PIXEL:x.wheelX=I*L,x.wheelY=$*L;break;case x.DOM_DELTA_LINE:var T=15;x.wheelX=I*T,x.wheelY=$*T;break;case x.DOM_DELTA_PAGE:var O=150;x.wheelX=I*O,x.wheelY=$*O}_(x)},S)},i.addMultiMouseDownListener=function(k,_,S,x,L){function I(M){if(i.getButton(M)!==0?$=0:M.detail>1?($++,$>4&&($=1)):$=1,a.isIE){var R=Math.abs(M.clientX-T)>5||Math.abs(M.clientY-O)>5;(!C||R)&&($=1),C&&clearTimeout(C),C=setTimeout(function(){C=null},_[$-1]||600),$==1&&(T=M.clientX,O=M.clientY)}if(M._clicks=$,S[x]("mousedown",M),$>4)$=0;else if($>1)return S[x](A[$],M)}var $=0,T,O,C,A={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(k)||(k=[k]),k.forEach(function(M){y(M,"mousedown",I,L)})},i.getModifierString=function(k){return f.KEY_MODS[l(k)]},i.addCommandKeyListener=function(k,_,S){var x=null;y(k,"keydown",function(L){c[L.keyCode]=(c[L.keyCode]||0)+1;var I=p(_,L,L.keyCode);return x=L.defaultPrevented,I},S),y(k,"keypress",function(L){x&&(L.ctrlKey||L.altKey||L.shiftKey||L.metaKey)&&(i.stopEvent(L),x=null)},S),y(k,"keyup",function(L){c[L.keyCode]=null},S),c||(r(),y(window,"focus",r))},typeof window=="object"&&window.postMessage&&!a.isOldIE){var w=1;i.nextTick=function(k,_){_=_||window;var S="zero-timeout-message-"+w++,x=function(L){L.data==S&&(i.stopPropagation(L),v(_,"message",x),k())};y(_,"message",x),_.postMessage(S,"*")}}i.$idleBlocked=!1,i.onIdle=function(k,_){return setTimeout(function S(){i.$idleBlocked?setTimeout(S,100):k()},_)},i.$idleBlockId=null,i.blockIdle=function(k){i.$idleBlockId&&clearTimeout(i.$idleBlockId),i.$idleBlocked=!0,i.$idleBlockId=setTimeout(function(){i.$idleBlocked=!1},k||100)},i.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),i.nextFrame?i.nextFrame=i.nextFrame.bind(window):i.nextFrame=function(k){setTimeout(k,17)}}),(void 0)("ace/clipboard",["require","exports","module"],function(t,i,s){var o;s.exports={lineMode:!1,pasteCancelled:function(){return o&&o>Date.now()-50?!0:o=!1},cancel:function(){o=Date.now()}}}),(void 0)("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,i,s){var o=t("../lib/event"),u=t("../config").nls,d=t("../lib/useragent"),l=t("../lib/dom"),p=t("../lib/lang"),r=t("../clipboard"),f=d.isChrome<18,a=d.isIE,c=d.isChrome>63,h=400,m=t("../lib/keys"),y=m.KEY_MODS,v=d.isIOS,w=v?/\s/:/\n/,k=d.isMobile,_;_=function(S,x){function L(){z=!0,O.blur(),O.focus(),z=!1}function I(_e){_e.keyCode==27&&O.value.length<O.selectionStart&&(M||(Y=O.value),K=re=-1,ae()),ot()}function $(){clearTimeout(Dt),Dt=setTimeout(function(){N&&(O.style.cssText=N,N=""),x.renderer.$isMousePressed=!1,x.renderer.$keepTextAreaAtCursor&&x.renderer.$moveTextAreaToCursor()},0)}function T(_e,Te,$e){var ze=null,q=!1;$e.addEventListener("keydown",function(F){ze&&clearTimeout(ze),q=!0},!0),$e.addEventListener("keyup",function(F){ze=setTimeout(function(){q=!1},100)},!0);var D=function(F){if(document.activeElement===$e&&!(q||M||Te.$mouseHandler.isMousePressed)&&!C){var ne=$e.selectionStart,le=$e.selectionEnd,pe=null,we=0;if(ne==0?pe=m.up:ne==1?pe=m.home:le>re&&Y[le]==`
|
|
300
|
+
`?pe=m.end:ne<K&&Y[ne-1]==" "?(pe=m.left,we=y.option):ne<K||ne==K&&re!=K&&ne==le?pe=m.left:le>re&&Y.slice(0,le).split(`
|
|
301
|
+
`).length>2?pe=m.down:le>re&&Y[le-1]==" "?(pe=m.right,we=y.option):(le>re||le==re&&re!=K&&ne==le)&&(pe=m.right),ne!==le&&(we|=y.shift),pe){var je=Te.onCommandKey({},we,pe);if(!je&&Te.commands){pe=m.keyCodeToString(pe);var ct=Te.commands.findKeyCommand(we,pe);ct&&Te.execCommand(ct)}K=ne,re=le,ae("")}}};document.addEventListener("selectionchange",D),Te.on("destroy",function(){document.removeEventListener("selectionchange",D)})}var O=l.createElement("textarea");O.className="ace_text-input",O.setAttribute("wrap","off"),O.setAttribute("autocorrect","off"),O.setAttribute("autocapitalize","off"),O.setAttribute("spellcheck","false"),O.style.opacity="0",S.insertBefore(O,S.firstChild);var C=!1,A=!1,M=!1,R=!1,N="";k||(O.style.fontSize="1px");var H=!1,z=!1,Y="",K=0,re=0,fe=0,U=Number.MAX_SAFE_INTEGER,Q=Number.MIN_SAFE_INTEGER,ie=0;try{var V=document.activeElement===O}catch{}this.setNumberOfExtraLines=function(_e){if(U=Number.MAX_SAFE_INTEGER,Q=Number.MIN_SAFE_INTEGER,_e<0){ie=0;return}ie=_e},this.setAriaLabel=function(){var _e="";if(x.$textInputAriaLabel&&(_e+="".concat(x.$textInputAriaLabel,", ")),x.session){var Te=x.session.selection.cursor.row;_e+=u("text-input.aria-label","Cursor at row $0",[Te+1])}O.setAttribute("aria-label",_e)},this.setAriaOptions=function(_e){_e.activeDescendant?(O.setAttribute("aria-haspopup","true"),O.setAttribute("aria-autocomplete",_e.inline?"both":"list"),O.setAttribute("aria-activedescendant",_e.activeDescendant)):(O.setAttribute("aria-haspopup","false"),O.setAttribute("aria-autocomplete","both"),O.removeAttribute("aria-activedescendant")),_e.role&&O.setAttribute("role",_e.role),_e.setLabel&&(O.setAttribute("aria-roledescription",u("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),o.addListener(O,"blur",function(_e){z||(x.onBlur(_e),V=!1)},x),o.addListener(O,"focus",function(_e){if(!z){if(V=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}x.onFocus(_e),d.isEdge?setTimeout(ae):ae()}},x),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:x.renderer.enableKeyboardAccessibility}),N||c||this.$focusScroll=="browser")return O.focus({preventScroll:!0});var _e=O.style.top;O.style.position="fixed",O.style.top="0px";try{var Te=O.getBoundingClientRect().top!=0}catch{return}var $e=[];if(Te)for(var ze=O.parentElement;ze&&ze.nodeType==1;)$e.push(ze),ze.setAttribute("ace_nocontext","true"),!ze.parentElement&&ze.getRootNode?ze=ze.getRootNode().host:ze=ze.parentElement;O.focus({preventScroll:!0}),Te&&$e.forEach(function(q){q.removeAttribute("ace_nocontext")}),setTimeout(function(){O.style.position="",O.style.top=="0px"&&(O.style.top=_e)},0)},this.blur=function(){O.blur()},this.isFocused=function(){return V},x.on("beforeEndOperation",function(){var _e=x.curOp,Te=_e&&_e.command&&_e.command.name;if(Te!="insertstring"){var $e=Te&&(_e.docChanged||_e.selectionChanged);M&&$e&&(Y=O.value="",Qe()),ae()}}),x.on("changeSelection",this.setAriaLabel);var te=function(_e,Te){for(var $e=Te,ze=1;ze<=_e-U&&ze<2*ie+1;ze++)$e+=x.session.getLine(_e-ze).length+1;return $e},ae=v?function(_e){if(!(!V||C&&!_e||R)){_e||(_e="");var Te=`
|
|
302
|
+
ab`+_e+`cde fg
|
|
303
|
+
`;Te!=O.value&&(O.value=Y=Te);var $e=4,ze=4+(_e.length||(x.selection.isEmpty()?0:1));(K!=$e||re!=ze)&&O.setSelectionRange($e,ze),K=$e,re=ze}}:function(){if(!(M||R)&&!(!V&&!J)){M=!0;var _e=0,Te=0,$e="";if(x.session){var ze=x.selection,q=ze.getRange(),D=ze.cursor.row;D===Q+1?(U=Q+1,Q=U+2*ie):D===U-1?(Q=U-1,U=Q-2*ie):(D<U-1||D>Q+1)&&(U=D>ie?D-ie:0,Q=D>ie?D+ie:2*ie);for(var F=[],ne=U;ne<=Q;ne++)F.push(x.session.getLine(ne));if($e=F.join(`
|
|
304
|
+
`),_e=te(q.start.row,q.start.column),Te=te(q.end.row,q.end.column),q.start.row<U){var le=x.session.getLine(U-1);_e=q.start.row<U-1?0:_e,Te+=le.length+1,$e=le+`
|
|
305
|
+
`+$e}else if(q.end.row>Q){var pe=x.session.getLine(Q+1);Te=q.end.row>Q+1?pe.length:q.end.column,Te+=$e.length+1,$e=$e+`
|
|
306
|
+
`+pe}else k&&D>0&&($e=`
|
|
307
|
+
`+$e,Te+=1,_e+=1);$e.length>h&&(_e<h&&Te<h?$e=$e.slice(0,h):($e=`
|
|
308
|
+
`,_e==Te?_e=Te=0:(_e=0,Te=1)));var we=$e+`
|
|
309
|
+
|
|
310
|
+
`;we!=Y&&(O.value=Y=we,K=re=we.length)}if(J&&(K=O.selectionStart,re=O.selectionEnd),re!=Te||K!=_e||O.selectionEnd!=re)try{O.setSelectionRange(_e,Te),K=_e,re=Te}catch{}M=!1}};this.resetSelection=ae,V&&x.onFocus();var ge=function(_e){return _e.selectionStart===0&&_e.selectionEnd>=Y.length&&_e.value===Y&&Y&&_e.selectionEnd!==re},ue=function(_e){M||(C?C=!1:ge(O)?(x.selectAll(),ae()):k&&O.selectionStart!=K&&ae())},G=null;this.setInputHandler=function(_e){G=_e},this.getInputHandler=function(){return G};var J=!1,ye=function(_e,Te){if(J&&(J=!1),A)return ae(),_e&&x.onPaste(_e),A=!1,"";for(var $e=O.selectionStart,ze=O.selectionEnd,q=K,D=Y.length-re,F=_e,ne=_e.length-$e,le=_e.length-ze,pe=0;q>0&&Y[pe]==_e[pe];)pe++,q--;for(F=F.slice(pe),pe=1;D>0&&Y.length-pe>K-1&&Y[Y.length-pe]==_e[_e.length-pe];)pe++,D--;ne-=pe-1,le-=pe-1;var we=F.length-pe+1;if(we<0&&(q=-we,we=0),F=F.slice(0,we),!Te&&!F&&!ne&&!q&&!D&&!le)return"";R=!0;var je=!1;return d.isAndroid&&F==". "&&(F=" ",je=!0),F&&!q&&!D&&!ne&&!le||H?x.onTextInput(F):x.onTextInput(F,{extendLeft:q,extendRight:D,restoreStart:ne,restoreEnd:le}),R=!1,Y=_e,K=$e,re=ze,fe=le,je?`
|
|
311
|
+
`:F},Ae=function(_e){if(M)return at();if(_e&&_e.inputType){if(_e.inputType=="historyUndo")return x.execCommand("undo");if(_e.inputType=="historyRedo")return x.execCommand("redo")}var Te=O.value,$e=ye(Te,!0);(Te.length>h+100||w.test($e)||k&&K<1&&K==re)&&ae()},Oe=function(_e,Te,$e){var ze=_e.clipboardData||window.clipboardData;if(!(!ze||f)){var q=a||$e?"Text":"text/plain";try{return Te?ze.setData(q,Te)!==!1:ze.getData(q)}catch(D){if(!$e)return Oe(D,Te,!0)}}},Le=function(_e,Te){var $e=x.getCopyText();if(!$e)return o.preventDefault(_e);Oe(_e,$e)?(v&&(ae($e),C=$e,setTimeout(function(){C=!1},10)),Te?x.onCut():x.onCopy(),o.preventDefault(_e)):(C=!0,O.value=$e,O.select(),setTimeout(function(){C=!1,ae(),Te?x.onCut():x.onCopy()}))},Be=function(_e){Le(_e,!0)},mt=function(_e){Le(_e,!1)},Se=function(_e){var Te=Oe(_e);r.pasteCancelled()||(typeof Te=="string"?(Te&&x.onPaste(Te,_e),d.isIE&&setTimeout(ae),o.preventDefault(_e)):(O.value="",A=!0))};o.addCommandKeyListener(O,function(_e,Te,$e){if(!M)return x.onCommandKey(_e,Te,$e)},x),o.addListener(O,"select",ue,x),o.addListener(O,"input",Ae,x),o.addListener(O,"cut",Be,x),o.addListener(O,"copy",mt,x),o.addListener(O,"paste",Se,x),(!("oncut"in O)||!("oncopy"in O)||!("onpaste"in O))&&o.addListener(S,"keydown",function(_e){if(!(d.isMac&&!_e.metaKey||!_e.ctrlKey))switch(_e.keyCode){case 67:mt(_e);break;case 86:Se(_e);break;case 88:Be(_e)}},x);var Mt=function(_e){if(!(M||!x.onCompositionStart||x.$readOnly)&&(M={},!H)){_e.data&&(M.useTextareaForIME=!1),setTimeout(at,0),x._signal("compositionStart"),x.on("mousedown",L);var Te=x.getSelectionRange();Te.end.row=Te.start.row,Te.end.column=Te.start.column,M.markerRange=Te,M.selectionStart=K,x.onCompositionStart(M),M.useTextareaForIME?(Y=O.value="",K=0,re=0):(O.msGetInputContext&&(M.context=O.msGetInputContext()),O.getInputContext&&(M.context=O.getInputContext()))}},at=function(){if(!(!M||!x.onCompositionUpdate||x.$readOnly)){if(H)return L();if(M.useTextareaForIME)x.onCompositionUpdate(O.value);else{var _e=O.value;ye(_e),M.markerRange&&(M.context&&(M.markerRange.start.column=M.selectionStart=M.context.compositionStartOffset),M.markerRange.end.column=M.markerRange.start.column+re-M.selectionStart+fe)}}},Qe=function(_e){!x.onCompositionEnd||x.$readOnly||(M=!1,x.onCompositionEnd(),x.off("mousedown",L),_e&&Ae())},ot=p.delayedCall(at,50).schedule.bind(null,null);o.addListener(O,"compositionstart",Mt,x),o.addListener(O,"compositionupdate",at,x),o.addListener(O,"keyup",I,x),o.addListener(O,"keydown",ot,x),o.addListener(O,"compositionend",Qe,x),this.getElement=function(){return O},this.setCommandMode=function(_e){H=_e,O.readOnly=!1},this.setReadOnly=function(_e){H||(O.readOnly=_e)},this.setCopyWithEmptySelection=function(_e){},this.onContextMenu=function(_e){J=!0,ae(),x._emit("nativecontextmenu",{target:x,domEvent:_e}),this.moveToMouse(_e,!0)},this.moveToMouse=function(_e,Te){N||(N=O.style.cssText),O.style.cssText=(Te?"z-index:100000;":"")+(d.isIE?"opacity:0.1;":"")+"text-indent: -"+(K+re)*x.renderer.characterWidth*.5+"px;";var $e=x.container.getBoundingClientRect(),ze=l.computedStyle(x.container),q=$e.top+(parseInt(ze.borderTopWidth)||0),D=$e.left+(parseInt(ze.borderLeftWidth)||0),F=$e.bottom-q-O.clientHeight-2,ne=function(le){l.translate(O,le.clientX-D-2,Math.min(le.clientY-q-2,F))};ne(_e),_e.type=="mousedown"&&(x.renderer.$isMousePressed=!0,clearTimeout(Dt),d.isWin&&o.capture(x.container,ne,$))},this.onContextMenuClose=$;var Dt,yt=function(_e){x.textInput.onContextMenu(_e),$()};o.addListener(O,"mouseup",yt,x),o.addListener(O,"mousedown",function(_e){_e.preventDefault(),$()},x),o.addListener(x.renderer.scroller,"contextmenu",yt,x),o.addListener(O,"contextmenu",yt,x),v&&T(S,x,O),this.destroy=function(){O.parentElement&&O.parentElement.removeChild(O)}},i.TextInput=_,i.$setUserAgentForTests=function(S,x){k=S,v=x}}),(void 0)("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,i,s){function o(f,a,c,h){return Math.sqrt(Math.pow(c-f,2)+Math.pow(h-a,2))}function u(f,a){if(f.start.row==f.end.row)var c=2*a.column-f.start.column-f.end.column;else if(f.start.row==f.end.row-1&&!f.start.column&&!f.end.column)var c=a.column-4;else var c=2*a.row-f.start.row-f.end.row;return c<0?{cursor:f.start,anchor:f.end}:{cursor:f.end,anchor:f.start}}var d=t("../lib/useragent"),l=0,p=550,r=function(){function f(a){a.$clickSelection=null;var c=a.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a));var h=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];h.forEach(function(m){a[m]=this[m]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}return f.prototype.onMouseDown=function(a){var c=a.inSelection(),h=a.getDocumentPosition();this.mousedownEvent=a;var m=this.editor,y=a.getButton();if(y!==0){var v=m.getSelectionRange(),w=v.isEmpty();(w||y==1)&&m.selection.moveToPosition(h),y==2&&(m.textInput.onContextMenu(a.domEvent),d.isMozilla||a.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!m.isFocused()&&(m.focus(),this.$focusTimeout&&!this.$clickSelection&&!m.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(a);return}return this.captureMouse(a),this.startSelect(h,a.domEvent._clicks>1),a.preventDefault()},f.prototype.startSelect=function(a,c){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var h=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?h.selection.selectToPosition(a):c||h.selection.moveToPosition(a),c||this.select(),h.setStyle("ace_selecting"),this.setState("select"))},f.prototype.select=function(){var a,c=this.editor,h=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var m=this.$clickSelection.comparePoint(h);if(m==-1)a=this.$clickSelection.end;else if(m==1)a=this.$clickSelection.start;else{var y=u(this.$clickSelection,h);h=y.cursor,a=y.anchor}c.selection.setSelectionAnchor(a.row,a.column)}c.selection.selectToPosition(h),c.renderer.scrollCursorIntoView()},f.prototype.extendSelectionBy=function(a){var c,h=this.editor,m=h.renderer.screenToTextCoordinates(this.x,this.y),y=h.selection[a](m.row,m.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(y.start),w=this.$clickSelection.comparePoint(y.end);if(v==-1&&w<=0)c=this.$clickSelection.end,(y.end.row!=m.row||y.end.column!=m.column)&&(m=y.start);else if(w==1&&v>=0)c=this.$clickSelection.start,(y.start.row!=m.row||y.start.column!=m.column)&&(m=y.end);else if(v==-1&&w==1)m=y.end,c=y.start;else{var k=u(this.$clickSelection,m);m=k.cursor,c=k.anchor}h.selection.setSelectionAnchor(c.row,c.column)}h.selection.selectToPosition(m),h.renderer.scrollCursorIntoView()},f.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},f.prototype.focusWait=function(){var a=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(a>l||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},f.prototype.onDoubleClick=function(a){var c=a.getDocumentPosition(),h=this.editor,m=h.session,y=m.getBracketRange(c);y?(y.isEmpty()&&(y.start.column--,y.end.column++),this.setState("select")):(y=h.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=y,this.select()},f.prototype.onTripleClick=function(a){var c=a.getDocumentPosition(),h=this.editor;this.setState("selectByLines");var m=h.getSelectionRange();m.isMultiLine()&&m.contains(c.row,c.column)?(this.$clickSelection=h.selection.getLineRange(m.start.row),this.$clickSelection.end=h.selection.getLineRange(m.end.row).end):this.$clickSelection=h.selection.getLineRange(c.row),this.select()},f.prototype.onQuadClick=function(a){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},f.prototype.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var h=this.$lastScroll,m=a.domEvent.timeStamp,y=m-h.t,v=y?a.wheelX/y:h.vx,w=y?a.wheelY/y:h.vy;y<p&&(v=(v+h.vx)/2,w=(w+h.vy)/2);var k=Math.abs(v/w),_=!1;if(k>=1&&c.renderer.isScrollableBy(a.wheelX*a.speed,0)&&(_=!0),k<=1&&c.renderer.isScrollableBy(0,a.wheelY*a.speed)&&(_=!0),_)h.allowed=m;else if(m-h.allowed<p){var S=Math.abs(v)<=1.5*Math.abs(h.vx)&&Math.abs(w)<=1.5*Math.abs(h.vy);S?(_=!0,h.allowed=m):h.allowed=0}if(h.t=m,h.vx=v,h.vy=w,_)return c.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()}},f}();r.prototype.selectEnd=r.prototype.selectByLinesEnd,r.prototype.selectAllEnd=r.prototype.selectByLinesEnd,r.prototype.selectByWordsEnd=r.prototype.selectByLinesEnd,i.DefaultHandlers=r}),(void 0)("ace/lib/scroll",["require","exports","module"],function(t,i,s){i.preventParentScroll=function(o){o.stopPropagation();var u=o.currentTarget,d=u.scrollHeight>u.clientHeight;d||o.preventDefault()}}),(void 0)("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,i,s){var o=this&&this.__extends||function(){var m=function(y,v){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,k){w.__proto__=k}||function(w,k){for(var _ in k)Object.prototype.hasOwnProperty.call(k,_)&&(w[_]=k[_])},m(y,v)};return function(y,v){function w(){this.constructor=y}if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");m(y,v),y.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}}(),u=this&&this.__values||function(m){var y=typeof Symbol=="function"&&Symbol.iterator,v=y&&m[y],w=0;if(v)return v.call(m);if(m&&typeof m.length=="number")return{next:function(){return m&&w>=m.length&&(m=void 0),{value:m&&m[w++],done:!m}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},d=t("./lib/dom");t("./lib/event");var l=t("./range").Range,p=t("./lib/scroll").preventParentScroll,r="ace_tooltip",f=function(){function m(y){this.isOpen=!1,this.$element=null,this.$parentNode=y}return m.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},m.prototype.getElement=function(){return this.$element||this.$init()},m.prototype.setText=function(y){this.getElement().textContent=y},m.prototype.setHtml=function(y){this.getElement().innerHTML=y},m.prototype.setPosition=function(y,v){this.getElement().style.left=y+"px",this.getElement().style.top=v+"px"},m.prototype.setClassName=function(y){d.addCssClass(this.getElement(),y)},m.prototype.setTheme=function(y){this.$element.className=r+" "+(y.isDark?"ace_dark ":"")+(y.cssClass||"")},m.prototype.show=function(y,v,w){y!=null&&this.setText(y),v!=null&&w!=null&&this.setPosition(v,w),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},m.prototype.hide=function(y){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},m.prototype.getHeight=function(){return this.getElement().offsetHeight},m.prototype.getWidth=function(){return this.getElement().offsetWidth},m.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},m}(),a=function(){function m(){this.popups=[]}return m.prototype.addPopup=function(y){this.popups.push(y),this.updatePopups()},m.prototype.removePopup=function(y){var v=this.popups.indexOf(y);v!==-1&&(this.popups.splice(v,1),this.updatePopups())},m.prototype.updatePopups=function(){var y,v,w,k;this.popups.sort(function(C,A){return A.priority-C.priority});var _=[];try{for(var S=u(this.popups),x=S.next();!x.done;x=S.next()){var L=x.value,I=!0;try{for(var $=(w=void 0,u(_)),T=$.next();!T.done;T=$.next()){var O=T.value;if(this.doPopupsOverlap(O,L)){I=!1;break}}}catch(C){w={error:C}}finally{try{T&&!T.done&&(k=$.return)&&k.call($)}finally{if(w)throw w.error}}I?_.push(L):L.hide()}}catch(C){y={error:C}}finally{try{x&&!x.done&&(v=S.return)&&v.call(S)}finally{if(y)throw y.error}}},m.prototype.doPopupsOverlap=function(y,v){var w=y.getElement().getBoundingClientRect(),k=v.getElement().getBoundingClientRect();return w.left<k.right&&w.right>k.left&&w.top<k.bottom&&w.bottom>k.top},m}(),c=new a;i.popupManager=c,i.Tooltip=f;var h=function(m){function y(v){v===void 0&&(v=document.body);var w=m.call(this,v)||this;w.timeout=void 0,w.lastT=0,w.idleTime=350,w.lastEvent=void 0,w.onMouseOut=w.onMouseOut.bind(w),w.onMouseMove=w.onMouseMove.bind(w),w.waitForHover=w.waitForHover.bind(w),w.hide=w.hide.bind(w);var k=w.getElement();return k.style.whiteSpace="pre-wrap",k.style.pointerEvents="auto",k.addEventListener("mouseout",w.onMouseOut),k.tabIndex=-1,k.addEventListener("blur",(function(){k.contains(document.activeElement)||this.hide()}).bind(w)),k.addEventListener("wheel",p),w}return o(y,m),y.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide),v.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},y.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide),v.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},y.prototype.onMouseMove=function(v,w){this.lastEvent=v,this.lastT=Date.now();var k=w.$mouseHandler.isMousePressed;if(this.isOpen){var _=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(_.row,_.column)||k||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||k||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},y.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;if(this.idleTime-v>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-v);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},y.prototype.isOutsideOfText=function(v){var w=v.editor,k=v.getDocumentPosition(),_=w.session.getLine(k.row);if(k.column==_.length){var S=w.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),x=w.session.documentToScreenPosition(k.row,k.column);if(x.column!=S.column||x.row!=S.row)return!0}return!1},y.prototype.setDataProvider=function(v){this.$gatherData=v},y.prototype.showForRange=function(v,w,k,_){var S=10;if(!(_&&_!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var x=v.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(x.theme)),this.isOpen=!0,this.addMarker(w,v.session),this.range=l.fromPoints(w.start,w.end);var L=x.textToScreenCoordinates(w.start.row,w.start.column),I=x.scroller.getBoundingClientRect();L.pageX<I.left&&(L.pageX=I.left);var $=this.getElement();$.innerHTML="",$.appendChild(k),$.style.maxHeight="",$.style.display="block";var T=$.clientHeight,O=$.clientWidth,C=window.innerHeight-L.pageY-x.lineHeight,A=!0;L.pageY-T<0&&L.pageY<C&&(A=!1),$.style.maxHeight=(A?L.pageY:C)-S+"px",$.style.top=A?"":L.pageY+x.lineHeight+"px",$.style.bottom=A?window.innerHeight-L.pageY+"px":"",$.style.left=Math.min(L.pageX,window.innerWidth-O-S)+"px"}},y.prototype.addMarker=function(v,w){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=w,this.marker=w&&w.addMarker(v,"ace_highlight-marker","text")},y.prototype.hide=function(v){!v&&document.activeElement==this.getElement()||v&&v.target&&(v.type!="keydown"||v.ctrlKey||v.metaKey)&&this.$element.contains(v.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,c.removePopup(this)))},y.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},y.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},y.prototype.onMouseOut=function(v){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!v.relatedTarget||this.getElement().contains(v.relatedTarget)||v&&v.currentTarget.contains(v.relatedTarget)||v.relatedTarget.classList.contains("ace_content")||this.hide())},y}(f);i.HoverTooltip=h}),(void 0)("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(t,i,s){function o(c){function h(){var x=S.getDocumentPosition().row,L=v.session.getLength();if(x==L){var I=v.renderer.pixelToScreenCoordinates(0,S.y).row,$=S.$pos;if(I>v.session.documentToScreenRow($.row,$.column))return m()}if(k.showTooltip(x),!!k.isOpen)if(v.on("mousewheel",m),c.$tooltipFollowsMouse)y(S);else{var T=S.getGutterRow(),O=w.$lines.get(T);if(O){var C=O.element.querySelector(".ace_gutter_annotation"),A=C.getBoundingClientRect(),M=k.getElement().style;M.left=A.right+"px",M.top=A.bottom+"px"}else y(S)}}function m(){_&&(_=clearTimeout(_)),k.isOpen&&(k.hideTooltip(),v.off("mousewheel",m))}function y(x){k.setPosition(x.x,x.y)}var v=c.editor,w=v.renderer.$gutterLayer,k=new a(v);c.editor.setDefaultHandler("guttermousedown",function(x){if(!(!v.isFocused()||x.getButton()!=0)){var L=w.getRegion(x);if(L!="foldWidgets"){var I=x.getDocumentPosition().row,$=v.session.selection;if(x.getShiftKey())$.selectTo(I,0);else{if(x.domEvent.detail==2)return v.selectAll(),x.preventDefault();c.$clickSelection=v.selection.getLineRange(I)}return c.setState("selectByLines"),c.captureMouse(x),x.preventDefault()}}});var _,S;c.editor.setDefaultHandler("guttermousemove",function(x){var L=x.domEvent.target||x.domEvent.srcElement;if(l.hasCssClass(L,"ace_fold-widget"))return m();k.isOpen&&c.$tooltipFollowsMouse&&y(x),S=x,!_&&(_=setTimeout(function(){_=null,S&&!c.isMousePressed?h():m()},50))}),p.addListener(v.renderer.$gutter,"mouseout",function(x){S=null,!(!k.isOpen||_)&&(_=setTimeout(function(){_=null,m()},50))},v),v.on("changeSession",m),v.on("input",m)}var u=this&&this.__extends||function(){var c=function(h,m){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,v){y.__proto__=v}||function(y,v){for(var w in v)Object.prototype.hasOwnProperty.call(v,w)&&(y[w]=v[w])},c(h,m)};return function(h,m){function y(){this.constructor=h}if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");c(h,m),h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),d=this&&this.__values||function(c){var h=typeof Symbol=="function"&&Symbol.iterator,m=h&&c[h],y=0;if(m)return m.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&y>=c.length&&(c=void 0),{value:c&&c[y++],done:!c}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},l=t("../lib/dom"),p=t("../lib/event"),r=t("../tooltip").Tooltip,f=t("../config").nls;t("../lib/lang"),i.GutterHandler=o;var a=function(c){function h(m){var y=c.call(this,m.container)||this;return y.editor=m,y.visibleTooltipRow,y}return u(h,c),h.prototype.setPosition=function(m,y){var v=window.innerWidth||document.documentElement.clientWidth,w=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),_=this.getHeight();m+=15,y+=15,m+k>v&&(m-=m+k-v),y+_>w&&(y-=20+_),r.prototype.setPosition.call(this,m,y)},Object.defineProperty(h,"annotationLabels",{get:function(){return{error:{singular:f("gutter-tooltip.aria-label.error.singular","error"),plural:f("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:f("gutter-tooltip.aria-label.security.singular","security finding"),plural:f("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:f("gutter-tooltip.aria-label.warning.singular","warning"),plural:f("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:f("gutter-tooltip.aria-label.info.singular","information message"),plural:f("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:f("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:f("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),h.prototype.showTooltip=function(m){var y,v=this.editor.renderer.$gutterLayer,w=v.$annotations[m],k;w?k={displayText:Array.from(w.displayText),type:Array.from(w.type)}:k={displayText:[],type:[]};var _=v.session.getFoldLine(m);if(_&&v.$showFoldedAnnotations){for(var S={error:[],security:[],warning:[],info:[],hint:[]},x={error:1,security:2,warning:3,info:4,hint:5},L,I=m+1;I<=_.end.row;I++)if(v.$annotations[I])for(var $=0;$<v.$annotations[I].text.length;$++){var T=v.$annotations[I].type[$];S[T].push(v.$annotations[I].text[$]),(!L||x[T]<x[L])&&(L=T)}if(["error","security","warning"].includes(L)){var O="".concat(h.annotationsToSummaryString(S)," in folded code.");k.displayText.push(O),k.type.push(L+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var C={error:[],security:[],warning:[],info:[],hint:[]},A=v.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<k.displayText.length;I++){var M=l.createElement("span"),R=l.createElement("span");(y=R.classList).add.apply(y,["ace_".concat(k.type[I]),A]),R.setAttribute("aria-label","".concat(h.annotationLabels[k.type[I].replace("_fold","")].singular)),R.setAttribute("role","img"),R.appendChild(l.createTextNode(" ")),M.appendChild(R),M.appendChild(l.createTextNode(k.displayText[I])),M.appendChild(l.createElement("br")),C[k.type[I].replace("_fold","")].push(M)}var N=this.getElement();l.removeChildren(N),C.error.forEach(function(H){return N.appendChild(H)}),C.security.forEach(function(H){return N.appendChild(H)}),C.warning.forEach(function(H){return N.appendChild(H)}),C.info.forEach(function(H){return N.appendChild(H)}),C.hint.forEach(function(H){return N.appendChild(H)}),N.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},h.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},h.annotationsToSummaryString=function(m){var y,v,w=[],k=["error","security","warning","info","hint"];try{for(var _=d(k),S=_.next();!S.done;S=_.next()){var x=S.value;if(m[x].length){var L=m[x].length===1?h.annotationLabels[x].singular:h.annotationLabels[x].plural;w.push("".concat(m[x].length," ").concat(L))}}}catch(I){y={error:I}}finally{try{S&&!S.done&&(v=_.return)&&v.call(_)}finally{if(y)throw y.error}}return w.join(", ")},h}(r);i.GutterTooltip=a}),(void 0)("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,i,s){var o=t("../lib/event"),u=t("../lib/useragent"),d=function(){function l(p,r){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=r,this.x=this.clientX=p.clientX,this.y=this.clientY=p.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return l.prototype.stopPropagation=function(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},l.prototype.preventDefault=function(){o.preventDefault(this.domEvent),this.defaultPrevented=!0},l.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},l.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},l.prototype.getGutterRow=function(){var p=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(p,0),f=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-f},l.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,r=p.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var f=this.getDocumentPosition();this.$inSelection=r.contains(f.row,f.column)}return this.$inSelection},l.prototype.getButton=function(){return o.getButton(this.domEvent)},l.prototype.getShiftKey=function(){return this.domEvent.shiftKey},l.prototype.getAccelKey=function(){return u.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},l}();i.MouseEvent=d}),(void 0)("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,i,s){function o(c){function h(U,Q){var ie=Date.now(),V=!Q||U.row!=Q.row,te=!Q||U.column!=Q.column;if(!K||V||te)x.moveCursorToPosition(U),K=ie,re={x:O,y:C};else{var ae=u(re.x,re.y,O,C);ae>a?K=null:ie-K>=f&&(x.renderer.scrollCursorIntoView(),K=null)}}function m(U,Q){var ie=Date.now(),V=x.renderer.layerConfig.lineHeight,te=x.renderer.layerConfig.characterWidth,ae=x.renderer.scroller.getBoundingClientRect(),ge={x:{left:O-ae.left,right:ae.right-O},y:{top:C-ae.top,bottom:ae.bottom-C}},ue=Math.min(ge.x.left,ge.x.right),G=Math.min(ge.y.top,ge.y.bottom),J={row:U.row,column:U.column};ue/te<=2&&(J.column+=ge.x.left<ge.x.right?-3:2),G/V<=1&&(J.row+=ge.y.top<ge.y.bottom?-1:1);var ye=U.row!=J.row,Ae=U.column!=J.column,Oe=!Q||U.row!=Q.row;ye||Ae&&!Oe?Y?ie-Y>=r&&x.renderer.scrollCursorIntoView(J):Y=ie:Y=null}function y(){var U=R;R=x.renderer.screenToTextCoordinates(O,C),h(R,U),m(R,U)}function v(){M=x.selection.toOrientedRange(),T=x.session.addMarker(M,"ace_selection",x.getSelectionStyle()),x.clearSelection(),x.isFocused()&&x.renderer.$cursorLayer.setBlinking(!1),clearInterval(A),y(),A=setInterval(y,20),N=0,l.addListener(document,"mousemove",k)}function w(){clearInterval(A),x.session.removeMarker(T),T=null,x.selection.fromOrientedRange(M),x.isFocused()&&!z&&x.$resetCursorStyle(),M=null,R=null,N=0,Y=null,K=null,l.removeListener(document,"mousemove",k)}function k(){fe==null&&(fe=setTimeout(function(){fe!=null&&T&&w()},20))}function _(U){var Q=U.types;return!Q||Array.prototype.some.call(Q,function(ie){return ie=="text/plain"||ie=="Text"})}function S(U){var Q=["copy","copymove","all","uninitialized"],ie=["move","copymove","linkmove","all","uninitialized"],V=p.isMac?U.altKey:U.ctrlKey,te="uninitialized";try{te=U.dataTransfer.effectAllowed.toLowerCase()}catch{}var ae="none";return V&&Q.indexOf(te)>=0?ae="copy":ie.indexOf(te)>=0?ae="move":Q.indexOf(te)>=0&&(ae="copy"),ae}var x=c.editor,L=d.createElement("div");L.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",L.textContent=" ";var I=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];I.forEach(function(U){c[U]=this[U]},this),x.on("mousedown",this.onMouseDown.bind(c));var $=x.container,T,O,C,A,M,R,N=0,H,z,Y,K,re;this.onDragStart=function(U){if(this.cancelDrag||!$.draggable){var Q=this;return setTimeout(function(){Q.startSelect(),Q.captureMouse(U)},0),U.preventDefault()}M=x.getSelectionRange();var ie=U.dataTransfer;ie.effectAllowed=x.getReadOnly()?"copy":"copyMove",x.container.appendChild(L),ie.setDragImage&&ie.setDragImage(L,0,0),setTimeout(function(){x.container.removeChild(L)}),ie.clearData(),ie.setData("Text",x.session.getTextRange()),z=!0,this.setState("drag")},this.onDragEnd=function(U){if($.draggable=!1,z=!1,this.setState(null),!x.getReadOnly()){var Q=U.dataTransfer.dropEffect;!H&&Q=="move"&&x.session.remove(x.getSelectionRange()),x.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(U){if(!(x.getReadOnly()||!_(U.dataTransfer)))return O=U.clientX,C=U.clientY,T||v(),N++,U.dataTransfer.dropEffect=H=S(U),l.preventDefault(U)},this.onDragOver=function(U){if(!(x.getReadOnly()||!_(U.dataTransfer)))return O=U.clientX,C=U.clientY,T||(v(),N++),fe!==null&&(fe=null),U.dataTransfer.dropEffect=H=S(U),l.preventDefault(U)},this.onDragLeave=function(U){if(N--,N<=0&&T)return w(),H=null,l.preventDefault(U)},this.onDrop=function(U){if(R){var Q=U.dataTransfer;if(z)switch(H){case"move":M.contains(R.row,R.column)?M={start:R,end:R}:M=x.moveText(M,R);break;case"copy":M=x.moveText(M,R,!0)}else{var ie=Q.getData("Text");M={start:R,end:x.session.insert(R,ie)},x.focus(),H=null}return w(),l.preventDefault(U)}},l.addListener($,"dragstart",this.onDragStart.bind(c),x),l.addListener($,"dragend",this.onDragEnd.bind(c),x),l.addListener($,"dragenter",this.onDragEnter.bind(c),x),l.addListener($,"dragover",this.onDragOver.bind(c),x),l.addListener($,"dragleave",this.onDragLeave.bind(c),x),l.addListener($,"drop",this.onDrop.bind(c),x);var fe=null}function u(c,h,m,y){return Math.sqrt(Math.pow(m-c,2)+Math.pow(y-h,2))}var d=t("../lib/dom"),l=t("../lib/event"),p=t("../lib/useragent"),r=200,f=200,a=5;(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,h=c.container;h.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var m=p.isWin?"default":"move";c.renderer.setCursorStyle(m),this.setState("dragReady")},this.onMouseDrag=function(c){var h=this.editor.container;if(p.isIE&&this.state=="dragReady"){var m=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);m>3&&h.dragDrop()}if(this.state==="dragWait"){var m=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);m>0&&(h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var h=this.editor,m=c.inSelection(),y=c.getButton(),v=c.domEvent.detail||1;if(v===1&&y===0&&m){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var w=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in w&&(w.unselectable="on"),h.getDragDelay()){if(p.isWebKit){this.cancelDrag=!0;var k=h.container;k.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(o.prototype),i.DragdropHandler=o}),(void 0)("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,i,s){var o=t("./mouse_event").MouseEvent,u=t("../lib/event"),d=t("../lib/dom");i.addTouchListeners=function(l,p){function r(){var M=window.navigator&&window.navigator.clipboard,R=!1,N=function(){var Y=p.getCopyText(),K=p.session.getUndoManager().hasUndo();A.replaceChild(d.buildDom(R?["span",!Y&&H("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],Y&&H("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],Y&&H("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],M&&H("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],K&&H("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],H("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],H("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),A.firstChild)},H=function(Y){return p.commands.canExecute(Y,p)},z=function(Y){var K=Y.target.getAttribute("action");if(K=="more"||!R)return R=!R,N();K=="paste"?M.readText().then(function(re){p.execCommand(K,re)}):K&&((K=="cut"||K=="copy")&&(M?M.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(K)),A.firstChild.style.display="none",R=!1,K!="openCommandPalette"&&p.focus()};A=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(Y){y="menu",Y.stopPropagation(),Y.preventDefault(),p.textInput.focus()},ontouchend:function(Y){Y.stopPropagation(),Y.preventDefault(),z(Y)},onclick:z},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function f(){if(!p.getOption("enableMobileMenu")){A&&a();return}A||r();var M=p.selection.cursor,R=p.renderer.textToScreenCoordinates(M.row,M.column),N=p.renderer.textToScreenCoordinates(0,0).pageX,H=p.renderer.scrollLeft,z=p.container.getBoundingClientRect();A.style.top=R.pageY-z.top-3+"px",R.pageX-z.left<z.width-70?(A.style.left="",A.style.right="10px"):(A.style.right="",A.style.left=N+H-z.left+"px"),A.style.display="",A.firstChild.style.display="none",p.on("input",a)}function a(M){A&&(A.style.display="none"),p.off("input",a)}function c(){S=null,clearTimeout(S);var M=p.selection.getRange(),R=M.contains(I.row,I.column);(M.isEmpty()||!R)&&(p.selection.moveToPosition(I),p.selection.selectWord()),y="wait",f()}function h(){S=null,clearTimeout(S),p.selection.moveToPosition(I);var M=$>=2?p.selection.getLineRange(I.row):p.session.getBracketRange(I);M&&!M.isEmpty()?p.selection.setRange(M):p.selection.selectWord(),y="wait"}function m(){L+=60,x=setInterval(function(){L--<=0&&(clearInterval(x),x=null),Math.abs(T)<.01&&(T=0),Math.abs(O)<.01&&(O=0),L<20&&(T=.9*T),L<20&&(O=.9*O);var M=p.session.getScrollTop();p.renderer.scrollBy(10*T,10*O),M==p.session.getScrollTop()&&(L=0)},10)}var y="scroll",v,w,k,_,S,x,L=0,I,$=0,T=0,O=0,C,A;u.addListener(l,"contextmenu",function(M){if(C){var R=p.textInput.getElement();R.focus()}},p),u.addListener(l,"touchstart",function(M){var R=M.touches;if(S||R.length>1){clearTimeout(S),S=null,k=-1,y="zoom";return}C=p.$mouseHandler.isMousePressed=!0;var N=p.renderer.layerConfig.lineHeight,H=p.renderer.layerConfig.lineHeight,z=M.timeStamp;_=z;var Y=R[0],K=Y.clientX,re=Y.clientY;Math.abs(v-K)+Math.abs(w-re)>N&&(k=-1),v=M.clientX=K,w=M.clientY=re,T=O=0;var fe=new o(M,p);if(I=fe.getDocumentPosition(),z-k<500&&R.length==1&&!L)$++,M.preventDefault(),M.button=0,h();else{$=0;var U=p.selection.cursor,Q=p.selection.isEmpty()?U:p.selection.anchor,ie=p.renderer.$cursorLayer.getPixelPosition(U,!0),V=p.renderer.$cursorLayer.getPixelPosition(Q,!0),te=p.renderer.scroller.getBoundingClientRect(),ae=p.renderer.layerConfig.offset,ge=p.renderer.scrollLeft,ue=function(ye,Ae){return ye/=H,Ae=Ae/N-.75,ye*ye+Ae*Ae};if(M.clientX<te.left){y="zoom";return}var G=ue(M.clientX-te.left-ie.left+ge,M.clientY-te.top-ie.top+ae),J=ue(M.clientX-te.left-V.left+ge,M.clientY-te.top-V.top+ae);G<3.5&&J<3.5&&(y=G>J?"cursor":"anchor"),J<3.5?y="anchor":G<3.5?y="cursor":y="scroll",S=setTimeout(c,450)}k=z},p),u.addListener(l,"touchend",function(M){C=p.$mouseHandler.isMousePressed=!1,x&&clearInterval(x),y=="zoom"?(y="",L=0):S?(p.selection.moveToPosition(I),L=0,f()):y=="scroll"?(m(),a()):f(),clearTimeout(S),S=null},p),u.addListener(l,"touchmove",function(M){S&&(clearTimeout(S),S=null);var R=M.touches;if(!(R.length>1||y=="zoom")){var N=R[0],H=v-N.clientX,z=w-N.clientY;if(y=="wait"){if(!(H*H+z*z>4))return M.preventDefault();y="cursor"}v=N.clientX,w=N.clientY,M.clientX=N.clientX,M.clientY=N.clientY;var Y=M.timeStamp,K=Y-_;if(_=Y,y=="scroll"){var re=new o(M,p);re.speed=1,re.wheelX=H,re.wheelY=z,10*Math.abs(H)<Math.abs(z)&&(H=0),10*Math.abs(z)<Math.abs(H)&&(z=0),K!=0&&(T=H/K,O=z/K),p._emit("mousewheel",re),re.propagationStopped||(T=O=0)}else{var fe=new o(M,p),U=fe.getDocumentPosition();y=="cursor"?p.selection.moveCursorToPosition(U):y=="anchor"&&p.selection.setSelectionAnchor(U.row,U.column),p.renderer.scrollCursorIntoView(U),M.preventDefault()}}},p)}}),(void 0)("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,i,s){var o=t("../lib/event"),u=t("../lib/useragent"),d=t("./default_handlers").DefaultHandlers,l=t("./default_gutter_handler").GutterHandler,p=t("./mouse_event").MouseEvent,r=t("./dragdrop_handler").DragdropHandler,f=t("./touch_handler").addTouchListeners,a=t("../config"),c=function(){function h(m){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var y=this;this.editor=m,new d(this),new l(this),new r(this);var v=function(_){var S=!document.hasFocus||!document.hasFocus()||!m.isFocused()&&document.activeElement==(m.textInput&&m.textInput.getElement());S&&window.focus(),m.focus(),setTimeout(function(){m.isFocused()||m.focus()})},w=m.renderer.getMouseEventTarget();o.addListener(w,"click",this.onMouseEvent.bind(this,"click"),m),o.addListener(w,"mousemove",this.onMouseMove.bind(this,"mousemove"),m),o.addMultiMouseDownListener([w,m.renderer.scrollBarV&&m.renderer.scrollBarV.inner,m.renderer.scrollBarH&&m.renderer.scrollBarH.inner,m.textInput&&m.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",m),o.addMouseWheelListener(m.container,this.onMouseWheel.bind(this,"mousewheel"),m),f(m.container,m);var k=m.renderer.$gutter;o.addListener(k,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),m),o.addListener(k,"click",this.onMouseEvent.bind(this,"gutterclick"),m),o.addListener(k,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),m),o.addListener(k,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),m),o.addListener(w,"mousedown",v,m),o.addListener(k,"mousedown",v,m),u.isIE&&m.renderer.scrollBarV&&(o.addListener(m.renderer.scrollBarV.element,"mousedown",v,m),o.addListener(m.renderer.scrollBarH.element,"mousedown",v,m)),m.on("mousemove",function(_){if(!(y.state||y.$dragDelay||!y.$dragEnabled)){var S=m.renderer.screenToTextCoordinates(_.x,_.y),x=m.session.selection.getRange(),L=m.renderer;!x.isEmpty()&&x.insideStart(S.row,S.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},m)}return h.prototype.onMouseEvent=function(m,y){this.editor.session&&this.editor._emit(m,new p(y,this.editor))},h.prototype.onMouseMove=function(m,y){var v=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!v||!v.length||this.editor._emit(m,new p(y,this.editor))},h.prototype.onMouseWheel=function(m,y){var v=new p(y,this.editor);v.speed=this.$scrollSpeed*2,v.wheelX=y.wheelX,v.wheelY=y.wheelY,this.editor._emit(m,v)},h.prototype.setState=function(m){this.state=m},h.prototype.captureMouse=function(m,y){this.x=m.x,this.y=m.y,this.isMousePressed=!0;var v=this.editor,w=this.editor.renderer;w.$isMousePressed=!0;var k=this,_=function($){if($){if(u.isWebKit&&!$.which&&k.releaseMouse)return k.releaseMouse();k.x=$.clientX,k.y=$.clientY,y&&y($),k.mouseEvent=new p($,k.editor),k.$mouseMoved=!0}},S=function($){v.off("beforeEndOperation",L),clearInterval(I),v.session&&x(),k[k.state+"End"]&&k[k.state+"End"]($),k.state="",k.isMousePressed=w.$isMousePressed=!1,w.$keepTextAreaAtCursor&&w.$moveTextAreaToCursor(),k.$onCaptureMouseMove=k.releaseMouse=null,$&&k.onMouseEvent("mouseup",$),v.endOperation()},x=function(){k[k.state]&&k[k.state](),k.$mouseMoved=!1};if(u.isOldIE&&m.domEvent.type=="dblclick")return setTimeout(function(){S(m)});var L=function($){k.releaseMouse&&v.curOp.command.name&&v.curOp.selectionChanged&&(k[k.state+"End"]&&k[k.state+"End"](),k.state="",k.releaseMouse())};v.on("beforeEndOperation",L),v.startOperation({command:{name:"mouse"}}),k.$onCaptureMouseMove=_,k.releaseMouse=o.capture(this.editor.container,_,S);var I=setInterval(x,20)},h.prototype.cancelContextMenu=function(){var m=(function(y){y&&y.domEvent&&y.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",m),y&&y.domEvent&&o.stopEvent(y.domEvent))}).bind(this);setTimeout(m,10),this.editor.on("nativecontextmenu",m)},h.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},h}();c.prototype.releaseMouse=null,a.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:u.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),i.MouseHandler=c}),(void 0)("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,i,s){var o=t("../lib/dom"),u=function(){function d(l){l.on("click",function(p){var r=p.getDocumentPosition(),f=l.session,a=f.getFoldAt(r.row,r.column,1);a&&(p.getAccelKey()?f.removeFold(a):f.expandFold(a),p.stop());var c=p.domEvent&&p.domEvent.target;c&&o.hasCssClass(c,"ace_inline_button")&&o.hasCssClass(c,"ace_toggle_wrap")&&(f.setOption("wrap",!f.getUseWrapMode()),l.renderer.scrollCursorIntoView())}),l.on("gutterclick",function(p){var r=l.renderer.$gutterLayer.getRegion(p);if(r=="foldWidgets"){var f=p.getDocumentPosition().row,a=l.session;a.foldWidgets&&a.foldWidgets[f]&&l.session.onFoldWidgetClick(f,p),l.isFocused()||l.focus(),p.stop()}}),l.on("gutterdblclick",function(p){var r=l.renderer.$gutterLayer.getRegion(p);if(r=="foldWidgets"){var f=p.getDocumentPosition().row,a=l.session,c=a.getParentFoldRangeData(f,!0),h=c.range||c.firstRange;if(h){f=h.start.row;var m=a.getFoldAt(f,a.getLine(f).length,1);m?a.removeFold(m):(a.addFold("...",h),l.renderer.scrollCursorIntoView({row:h.start.row,column:0}))}p.stop()}})}return d}();i.FoldHandler=u}),(void 0)("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,i,s){var o=t("../lib/keys"),u=t("../lib/event"),d=function(){function l(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return l.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},l.prototype.setKeyboardHandler=function(p){var r=this.$handlers;if(r[r.length-1]!=p){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(p,1)}},l.prototype.addKeyboardHandler=function(p,r){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var f=this.$handlers.indexOf(p);f!=-1&&this.$handlers.splice(f,1),r==null?this.$handlers.push(p):this.$handlers.splice(r,0,p),f==-1&&p.attach&&p.attach(this.$editor)}},l.prototype.removeKeyboardHandler=function(p){var r=this.$handlers.indexOf(p);return r==-1?!1:(this.$handlers.splice(r,1),p.detach&&p.detach(this.$editor),!0)},l.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},l.prototype.getStatusText=function(){var p=this.$data,r=p.editor;return this.$handlers.map(function(f){return f.getStatusText&&f.getStatusText(r,p)||""}).filter(Boolean).join(" ")},l.prototype.$callKeyboardHandlers=function(p,r,f,a){for(var c,h=!1,m=this.$editor.commands,y=this.$handlers.length;y--&&(c=this.$handlers[y].handleKeyboard(this.$data,p,r,f,a),!(!(!c||!c.command)&&(c.command=="null"?h=!0:h=m.exec(c.command,this.$editor,c.args,a),h&&a&&p!=-1&&c.passEvent!=1&&c.command.passEvent!=1&&u.stopEvent(a),h))););return!h&&p==-1&&(c={command:"insertstring"},h=m.exec("insertstring",this.$editor,r)),h&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),h},l.prototype.onCommandKey=function(p,r,f){var a=o.keyCodeToString(f);return this.$callKeyboardHandlers(r,a,f,p)},l.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},l}();i.KeyBinding=d}),(void 0)("ace/lib/bidiutil",["require","exports","module"],function(t,i,s){function o(U,Q,ie,V){var te=p?m:h,ae=null,ge=null,ue=null,G=0,J=null,ye=null,Ae=-1,Oe=null,Le=null,Be=[];if(!V)for(Oe=0,V=[];Oe<ie;Oe++)V[Oe]=l(U[Oe]);for(r=p,f=!1,a=!1,c=!1,Le=0;Le<ie;Le++){if(ae=G,Be[Le]=ge=d(U,V,Be,Le),G=te[ae][ge],J=G&240,G&=15,Q[Le]=ue=te[G][5],J>0)if(J==16){for(Oe=Ae;Oe<Le;Oe++)Q[Oe]=1;Ae=-1}else Ae=-1;if(ye=te[G][6],ye)Ae==-1&&(Ae=Le);else if(Ae>-1){for(Oe=Ae;Oe<Le;Oe++)Q[Oe]=ue;Ae=-1}V[Le]==L&&(Q[Le]=0),r|=ue}if(c){for(Oe=0;Oe<ie;Oe++)if(V[Oe]==I){Q[Oe]=p;for(var mt=Oe-1;mt>=0&&V[mt]==T;mt--)Q[mt]=p}}}function u(U,Q,ie){if(!(r<U)){if(U==1&&p==v&&!a){ie.reverse();return}for(var V=ie.length,te=0,ae,ge,ue,G;te<V;){if(Q[te]>=U){for(ae=te+1;ae<V&&Q[ae]>=U;)ae++;for(ge=te,ue=ae-1;ge<ue;ge++,ue--)G=ie[ge],ie[ge]=ie[ue],ie[ue]=G;te=ae}te++}}}function d(U,Q,ie,V){var te=Q[V],ae,ge,ue,G;switch(te){case w:case k:f=!1;case x:case S:return te;case _:return f?S:_;case $:return f=!0,k;case T:return x;case O:return V<1||V+1>=Q.length||(ae=ie[V-1])!=_&&ae!=S||(ge=Q[V+1])!=_&&ge!=S?x:(f&&(ge=S),ge==ae?ge:x);case C:return ae=V>0?ie[V-1]:L,ae==_&&V+1<Q.length&&Q[V+1]==_?_:x;case A:if(V>0&&ie[V-1]==_)return _;if(f)return x;for(G=V+1,ue=Q.length;G<ue&&Q[G]==A;)G++;return G<ue&&Q[G]==_?_:x;case M:for(ue=Q.length,G=V+1;G<ue&&Q[G]==M;)G++;if(G<ue){var J=U[V],ye=J>=1425&&J<=2303||J==64286;if(ae=Q[G],ye&&(ae==k||ae==$))return k}return V<1||(ae=Q[V-1])==L?x:ie[V-1];case L:return f=!1,a=!0,p;case I:return c=!0,x;case R:case N:case z:case Y:case H:f=!1;case K:return x}}function l(U){var Q=U.charCodeAt(0),ie=Q>>8;return ie==0?Q>191?w:re[Q]:ie==5?/[\u0591-\u05f4]/.test(U)?k:w:ie==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(U)?M:/[\u0660-\u0669\u066b-\u066c]/.test(U)?S:Q==1642?A:/[\u06f0-\u06f9]/.test(U)?_:$:ie==32&&Q<=8287?fe[Q&255]:ie==254&&Q>=65136?$:x}var p=0,r=0,f=!1,a=!1,c=!1,h=[[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]],m=[[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]],y=0,v=1,w=0,k=1,_=2,S=3,x=4,L=5,I=6,$=7,T=8,O=9,C=10,A=11,M=12,R=13,N=14,H=15,z=16,Y=17,K=18,re=[K,K,K,K,K,K,K,K,K,I,L,I,T,L,K,K,K,K,K,K,K,K,K,K,K,K,K,K,L,L,L,I,T,x,x,A,A,A,x,x,x,x,x,C,O,C,O,O,_,_,_,_,_,_,_,_,_,_,O,x,x,x,x,x,x,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,x,x,x,x,x,x,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,x,x,x,x,K,K,K,K,K,K,L,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,O,x,A,A,A,A,x,x,x,x,w,x,x,K,x,x,A,A,_,_,x,w,x,x,x,_,w,x,x,x,x,x],fe=[T,T,T,T,T,T,T,T,T,T,T,K,K,K,w,k,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,T,L,R,N,H,z,Y,O,A,A,A,A,A,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,O,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,T];i.L=w,i.R=k,i.EN=_,i.ON_R=3,i.AN=4,i.R_H=5,i.B=6,i.RLE=7,i.DOT="·",i.doBidiReorder=function(U,Q,ie){if(U.length<2)return{};var V=U.split(""),te=new Array(V.length),ae=new Array(V.length),ge=[];p=ie?v:y,o(V,ge,V.length,Q);for(var ue=0;ue<te.length;te[ue]=ue,ue++);u(2,ge,te),u(1,ge,te);for(var ue=0;ue<te.length-1;ue++)Q[ue]===S?ge[ue]=i.AN:ge[ue]===k&&(Q[ue]>$&&Q[ue]<R||Q[ue]===x||Q[ue]===K)?ge[ue]=i.ON_R:ue>0&&V[ue-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(V[ue])&&(ge[ue-1]=ge[ue]=i.R_H,ue++);V[V.length-1]===i.DOT&&(ge[V.length-1]=i.B),V[0]===""&&(ge[0]=i.RLE);for(var ue=0;ue<te.length;ue++)ae[ue]=ge[te[ue]];return{logicalFromVisual:te,bidiLevels:ae}},i.hasBidiCharacters=function(U,Q){for(var ie=!1,V=0;V<U.length;V++)Q[V]=l(U.charAt(V)),!ie&&(Q[V]==k||Q[V]==$||Q[V]==S)&&(ie=!0);return ie},i.getVisualFromLogicalIdx=function(U,Q){for(var ie=0;ie<Q.logicalFromVisual.length;ie++)if(Q.logicalFromVisual[ie]==U)return ie;return 0}}),(void 0)("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,i,s){var o=t("./lib/bidiutil"),u=t("./lib/lang"),d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,l=function(){function p(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=o,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=d.test(r.getValue())}return p.prototype.isBidiRow=function(r,f,a){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(f,a),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&d.test(r.lines.join(`
|
|
312
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},p.prototype.getDocumentRow=function(){var r=0,f=this.session.$screenRowCache;if(f.length){var a=this.session.$getRowCacheIndex(f,this.currentRow);a>=0&&(r=this.session.$docRowCache[a])}return r},p.prototype.getSplitIndex=function(){var r=0,f=this.session.$screenRowCache;if(f.length)for(var a,c=this.session.$getRowCacheIndex(f,this.currentRow);this.currentRow-r>0&&(a=this.session.$getRowCacheIndex(f,this.currentRow-r-1),a===c);)c=a,r++;else r=this.currentRow;return r},p.prototype.updateRowLine=function(r,f){r===void 0&&(r=this.getDocumentRow());var a=r===this.session.getLength()-1,c=a?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var h=this.session.$wrapData[r];h&&(f===void 0&&(f=this.getSplitIndex()),f>0&&h.length?(this.wrapIndent=h.indent,this.wrapOffset=this.wrapIndent*this.charWidths[o.L],this.line=f<h.length?this.line.substring(h[f-1],h[f]):this.line.substring(h[h.length-1])):this.line=this.line.substring(0,h[f]),f==h.length&&(this.line+=this.showInvisibles?c:o.DOT))}else this.line+=this.showInvisibles?c:o.DOT;var m=this.session,y=0,v;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(w,k){return w===" "||m.isFullWidth(w.charCodeAt(0))?(v=w===" "?m.getScreenTabSize(k+y):2,y+=v-1,u.stringRepeat(o.DOT,v)):w}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==o.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},p.prototype.updateBidiMap=function(){var r=[];o.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=o.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},p.prototype.markAsDirty=function(){this.currentRow=null},p.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var f=this.characterWidth=r.$characterSize.width,a=r.$measureCharWidth("ה");this.charWidths[o.L]=this.charWidths[o.EN]=this.charWidths[o.ON_R]=f,this.charWidths[o.R]=this.charWidths[o.AN]=a,this.charWidths[o.R_H]=a*.45,this.charWidths[o.B]=this.charWidths[o.RLE]=0,this.currentRow=null}},p.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},p.prototype.setEolChar=function(r){this.EOL=r},p.prototype.setContentWidth=function(r){this.contentWidth=r},p.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},p.prototype.setRtlDirection=function(r,f){for(var a=r.getCursorPosition(),c=r.selection.getSelectionAnchor().row;c<=a.row;c++)!f&&r.session.getLine(c).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(c,0,1):f&&r.session.getLine(c).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:c},r.session.$bidiHandler.RLE)},p.prototype.getPosLeft=function(r){r-=this.wrapIndent;var f=this.line.charAt(0)===this.RLE?1:0,a=r>f?this.session.getOverwrite()?r:r-1:f,c=o.getVisualFromLogicalIdx(a,this.bidiMap),h=this.bidiMap.bidiLevels,m=0;!this.session.getOverwrite()&&r<=f&&h[c]%2!==0&&c++;for(var y=0;y<c;y++)m+=this.charWidths[h[y]];return!this.session.getOverwrite()&&r>f&&h[c]%2===0&&(m+=this.charWidths[h[c]]),this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(m+=this.rtlLineOffset),m},p.prototype.getSelections=function(r,f){var a=this.bidiMap,c=a.bidiLevels,h,m=[],y=0,v=Math.min(r,f)-this.wrapIndent,w=Math.max(r,f)-this.wrapIndent,k=!1,_=!1,S=0;this.wrapIndent&&(y+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,L=0;L<c.length;L++)x=a.logicalFromVisual[L],h=c[L],k=x>=v&&x<w,k&&!_?S=y:!k&&_&&m.push({left:S,width:y-S}),y+=this.charWidths[h],_=k;if(k&&L===c.length&&m.push({left:S,width:y-S}),this.isRtlDir)for(var I=0;I<m.length;I++)m[I].left+=this.rtlLineOffset;return m},p.prototype.offsetToCol=function(a){this.isRtlDir&&(a-=this.rtlLineOffset);var f=0,a=Math.max(a,0),c=0,h=0,m=this.bidiMap.bidiLevels,y=this.charWidths[m[h]];for(this.wrapIndent&&(a-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);a>c+y/2;){if(c+=y,h===m.length-1){y=0;break}y=this.charWidths[m[++h]]}return h>0&&m[h-1]%2!==0&&m[h]%2===0?(a<c&&h--,f=this.bidiMap.logicalFromVisual[h]):h>0&&m[h-1]%2===0&&m[h]%2!==0?f=1+(a>c?this.bidiMap.logicalFromVisual[h]:this.bidiMap.logicalFromVisual[h-1]):this.isRtlDir&&h===m.length-1&&y===0&&m[h-1]%2===0||!this.isRtlDir&&h===0&&m[h]%2!==0?f=1+this.bidiMap.logicalFromVisual[h]:(h>0&&m[h-1]%2!==0&&y!==0&&h--,f=this.bidiMap.logicalFromVisual[h]),f===0&&this.isRtlDir&&f++,f+this.wrapIndent},p}();i.BidiHandler=l}),(void 0)("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,i,s){var o=t("./lib/oop"),u=t("./lib/lang"),d=t("./lib/event_emitter").EventEmitter,l=t("./range").Range,p=function(){function r(f){this.session=f,this.doc=f.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var a=this;this.cursor.on("change",function(c){a.$cursorChanged=!0,a.$silent||a._emit("changeCursor"),!a.$isEmpty&&!a.$silent&&a._emit("changeSelection"),!a.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(a.$desiredColumn=null)}),this.anchor.on("change",function(){a.$anchorChanged=!0,!a.$isEmpty&&!a.$silent&&a._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(f,a){this.$isEmpty=!1,this.anchor.setPosition(f,a)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var f=this.anchor,a=this.lead;return f.row>a.row||f.row==a.row&&f.column>a.column},r.prototype.getRange=function(){var f=this.anchor,a=this.lead;return this.$isEmpty?l.fromPoints(a,a):this.isBackwards()?l.fromPoints(a,f):l.fromPoints(f,a)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(f,a){var c=a?f.end:f.start,h=a?f.start:f.end;this.$setSelection(c.row,c.column,h.row,h.column)},r.prototype.$setSelection=function(f,a,c,h){if(!this.$silent){var m=this.$isEmpty,y=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(f,a),this.cursor.setPosition(c,h),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||m!=this.$isEmpty||y)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(f){var a=this.lead;this.$isEmpty&&this.setSelectionAnchor(a.row,a.column),f.call(this)},r.prototype.selectTo=function(f,a){this.$moveSelection(function(){this.moveCursorTo(f,a)})},r.prototype.selectToPosition=function(f){this.$moveSelection(function(){this.moveCursorToPosition(f)})},r.prototype.moveTo=function(f,a){this.clearSelection(),this.moveCursorTo(f,a)},r.prototype.moveToPosition=function(f){this.clearSelection(),this.moveCursorToPosition(f)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(f,a){if(typeof a>"u"){var c=f||this.lead;f=c.row,a=c.column}return this.session.getWordRange(f,a)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var f=this.getCursor(),a=this.session.getAWordRange(f.row,f.column);this.setSelectionRange(a)},r.prototype.getLineRange=function(f,a){var c=typeof f=="number"?f:this.lead.row,h,m=this.session.getFoldLine(c);return m?(c=m.start.row,h=m.end.row):h=c,a===!0?new l(c,0,h,this.session.getLine(h).length):new l(c,0,h+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(f,a,c){var h=f.column,m=f.column+a;return c<0&&(h=f.column-a,m=f.column),this.session.isTabStop(f)&&this.doc.getLine(f.row).slice(h,m).split(" ").length-1==a},r.prototype.moveCursorLeft=function(){var f=this.lead.getPosition(),a;if(a=this.session.getFoldAt(f.row,f.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(f.column===0)f.row>0&&this.moveCursorTo(f.row-1,this.doc.getLine(f.row-1).length);else{var c=this.session.getTabSize();this.wouldMoveIntoSoftTab(f,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var f=this.lead.getPosition(),a;if(a=this.session.getFoldAt(f.row,f.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),f=this.lead;this.wouldMoveIntoSoftTab(f,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var f=this.lead.row,a=this.lead.column,c=this.session.documentToScreenRow(f,a),h=this.session.screenToDocumentPosition(c,0),m=this.session.getDisplayLine(f,null,h.row,h.column),y=m.match(/^\s*/);y[0].length!=a&&!this.session.$useEmacsStyleLineStart&&(h.column+=y[0].length),this.moveCursorToPosition(h)},r.prototype.moveCursorLineEnd=function(){var f=this.lead,a=this.session.getDocumentLastRowColumnPosition(f.row,f.column);if(this.lead.column==a.column){var c=this.session.getLine(a.row);if(a.column==c.length){var h=c.search(/\s+$/);h>0&&(a.column=h)}}this.moveCursorTo(a.row,a.column)},r.prototype.moveCursorFileEnd=function(){var f=this.doc.getLength()-1,a=this.doc.getLine(f).length;this.moveCursorTo(f,a)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var f=this.lead.row,a=this.lead.column,c=this.doc.getLine(f),h=c.substring(a);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var m=this.session.getFoldAt(f,a,1);if(m){this.moveCursorTo(m.end.row,m.end.column);return}if(this.session.nonTokenRe.exec(h)&&(a+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,h=c.substring(a)),a>=c.length){this.moveCursorTo(f,c.length),this.moveCursorRight(),f<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(h)&&(a+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(f,a)},r.prototype.moveCursorLongWordLeft=function(){var f=this.lead.row,a=this.lead.column,c;if(c=this.session.getFoldAt(f,a,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var h=this.session.getFoldStringAt(f,a,-1);h==null&&(h=this.doc.getLine(f).substring(0,a));var m=u.stringReverse(h);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(m)&&(a-=this.session.nonTokenRe.lastIndex,m=m.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),a<=0){this.moveCursorTo(f,0),this.moveCursorLeft(),f>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(m)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(f,a)},r.prototype.$shortWordEndIndex=function(f){var a=0,c,h=/\s/,m=this.session.tokenRe;if(m.lastIndex=0,this.session.tokenRe.exec(f))a=this.session.tokenRe.lastIndex;else{for(;(c=f[a])&&h.test(c);)a++;if(a<1){for(m.lastIndex=0;(c=f[a])&&!m.test(c);)if(m.lastIndex=0,a++,h.test(c)){if(a>2){a--;break}for(;(c=f[a])&&h.test(c);)a++;if(a>2)break}}}return m.lastIndex=0,a},r.prototype.moveCursorShortWordRight=function(){var f=this.lead.row,a=this.lead.column,c=this.doc.getLine(f),h=c.substring(a),m=this.session.getFoldAt(f,a,1);if(m)return this.moveCursorTo(m.end.row,m.end.column);if(a==c.length){var y=this.doc.getLength();do f++,h=this.doc.getLine(f);while(f<y&&/^\s*$/.test(h));/^\s+/.test(h)||(h=""),a=0}var v=this.$shortWordEndIndex(h);this.moveCursorTo(f,a+v)},r.prototype.moveCursorShortWordLeft=function(){var f=this.lead.row,a=this.lead.column,c;if(c=this.session.getFoldAt(f,a,-1))return this.moveCursorTo(c.start.row,c.start.column);var h=this.session.getLine(f).substring(0,a);if(a===0){do f--,h=this.doc.getLine(f);while(f>0&&/^\s*$/.test(h));a=h.length,/\s+$/.test(h)||(h="")}var m=u.stringReverse(h),y=this.$shortWordEndIndex(m);return this.moveCursorTo(f,a-y)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(f,a){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),h;if(a===0&&(f!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(h=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(h/this.session.$bidiHandler.charWidths[0])):h=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),f!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var m=this.session.lineWidgets[this.lead.row];f<0?f-=m.rowsAbove||0:f>0&&(f+=m.rowCount-(m.rowsAbove||0))}var y=this.session.screenToDocumentPosition(c.row+f,c.column,h);f!==0&&a===0&&y.row===this.lead.row&&(y.column,this.lead.column),this.moveCursorTo(y.row,y.column+a,a===0)},r.prototype.moveCursorToPosition=function(f){this.moveCursorTo(f.row,f.column)},r.prototype.moveCursorTo=function(f,a,c){var h=this.session.getFoldAt(f,a,1);h&&(f=h.start.row,a=h.start.column),this.$keepDesiredColumnOnChange=!0;var m=this.session.getLine(f);/[\uDC00-\uDFFF]/.test(m.charAt(a))&&m.charAt(a-1)&&(this.lead.row==f&&this.lead.column==a+1?a-=1:a+=1),this.lead.setPosition(f,a),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(f,a,c){var h=this.session.screenToDocumentPosition(f,a);this.moveCursorTo(h.row,h.column,c)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(f){this.setSelectionRange(f,f.cursor==f.start),this.$desiredColumn=f.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(f){var a=this.getRange();return f?(f.start.column=a.start.column,f.start.row=a.start.row,f.end.column=a.end.column,f.end.row=a.end.row):f=a,f.cursor=this.isBackwards()?f.start:f.end,f.desiredColumn=this.$desiredColumn,f},r.prototype.getRangeOfMovements=function(f){var a=this.getCursor();try{f(this);var c=this.getCursor();return l.fromPoints(a,c)}catch{return l.fromPoints(a,a)}finally{this.moveCursorToPosition(a)}},r.prototype.toJSON=function(){if(this.rangeCount)var f=this.ranges.map(function(a){var c=a.clone();return c.isBackwards=a.cursor==a.start,c});else{var f=this.getRange();f.isBackwards=this.isBackwards()}return f},r.prototype.fromJSON=function(f){if(f.start==null){if(this.rangeList&&f.length>1){this.toSingleRange(f[0]);for(var a=f.length;a--;){var c=l.fromPoints(f[a].start,f[a].end);f[a].isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}f=f[0]}this.rangeList&&this.toSingleRange(f),this.setSelectionRange(f,f.isBackwards)},r.prototype.isEqual=function(f){if((f.length||this.rangeCount)&&f.length!=this.rangeCount)return!1;if(!f.length||!this.ranges)return this.getRange().isEqual(f);for(var a=this.ranges.length;a--;)if(!this.ranges[a].isEqual(f[a]))return!1;return!0},r}();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,o.implement(p.prototype,d),i.Selection=p}),(void 0)("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,i,s){var o=t("./lib/report_error").reportError,u=2e3,d=function(){function l(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var r in this.states){for(var f=this.states[r],a=[],c=0,h=this.matchMappings[r]={defaultToken:"text"},m="g",y=[],v=0;v<f.length;v++){var w=f[v];if(w.defaultToken&&(h.defaultToken=w.defaultToken),w.caseInsensitive&&m.indexOf("i")===-1&&(m+="i"),w.unicode&&m.indexOf("u")===-1&&(m+="u"),w.regex!=null){w.regex instanceof RegExp&&(w.regex=w.regex.toString().slice(1,-1));var k=w.regex,_=new RegExp("(?:("+k+")|(.))").exec("a").length-2;Array.isArray(w.token)?w.token.length==1||_==1?w.token=w.token[0]:_-1!=w.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:w,groupCount:_-1}),w.token=w.token[0]):(w.tokenArray=w.token,w.token=null,w.onMatch=this.$arrayTokens):typeof w.token=="function"&&!w.onMatch&&(_>1?w.onMatch=this.$applyToken:w.onMatch=w.token),_>1&&(/\\\d/.test(w.regex)?k=w.regex.replace(/\\([0-9]+)/g,function(S,x){return"\\"+(parseInt(x,10)+c+1)}):(_=1,k=this.removeCapturingGroups(w.regex)),!w.splitRegex&&typeof w.token!="string"&&y.push(w)),h[c]=v,c+=_,a.push(k),w.onMatch||(w.onMatch=null)}}a.length||(h[0]=0,a.push("$")),y.forEach(function(S){S.splitRegex=this.createSplitterRegexp(S.regex,m)},this),this.regExps[r]=new RegExp("("+a.join(")|(")+")|($)",m)}}return l.prototype.$setMaxTokenCount=function(p){u=p|0},l.prototype.$applyToken=function(p){var r=this.splitRegex.exec(p).slice(1),f=this.token.apply(this,r);if(typeof f=="string")return[{type:f,value:p}];for(var a=[],c=0,h=f.length;c<h;c++)r[c]&&(a[a.length]={type:f[c],value:r[c]});return a},l.prototype.$arrayTokens=function(p){if(!p)return[];var r=this.splitRegex.exec(p);if(!r)return"text";for(var f=[],a=this.tokenArray,c=0,h=a.length;c<h;c++)r[c+1]&&(f[f.length]={type:a[c],value:r[c+1]});return f},l.prototype.removeCapturingGroups=function(p){var r=p.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(f,a){return a?"(?:":f});return r},l.prototype.createSplitterRegexp=function(p,r){if(p.indexOf("(?=")!=-1){var f=0,a=!1,c={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(h,m,y,v,w,k){return a?a=w!="]":w?a=!0:v?(f==c.stack&&(c.end=k+1,c.stack=-1),f--):y&&(f++,y.length!=1&&(c.stack=f,c.start=k)),h}),c.end!=null&&/^\)*$/.test(p.substr(c.end))&&(p=p.substring(0,c.start)+p.substr(c.end))}return p.charAt(0)!="^"&&(p="^"+p),p.charAt(p.length-1)!="$"&&(p+="$"),new RegExp(p,(r||"").replace("g",""))},l.prototype.getLineTokens=function(p,r){if(r&&typeof r!="string"){var f=r.slice(0);r=f[0],r==="#tmp"&&(f.shift(),r=f.shift())}else var f=[];var a=r||"start",c=this.states[a];c||(a="start",c=this.states[a]);var h=this.matchMappings[a],m=this.regExps[a];m.lastIndex=0;for(var y,v=[],w=0,k=0,_={type:null,value:""};y=m.exec(p);){var S=h.defaultToken,x=null,L=y[0],I=m.lastIndex;if(I-L.length>w){var $=p.substring(w,I-L.length);_.type==S?_.value+=$:(_.type&&v.push(_),_={type:S,value:$})}for(var T=0;T<y.length-2;T++)if(y[T+1]!==void 0){x=c[h[T]],x.onMatch?S=x.onMatch(L,a,f,p):S=x.token,x.next&&(typeof x.next=="string"?a=x.next:a=x.next(a,f),c=this.states[a],c||(this.reportError("state doesn't exist",a),a="start",c=this.states[a]),h=this.matchMappings[a],w=I,m=this.regExps[a],m.lastIndex=I),x.consumeLineEnd&&(w=I);break}if(L){if(typeof S=="string")x&&x.merge===!1||_.type!==S?(_.type&&v.push(_),_={type:S,value:L}):_.value+=L;else if(S){_.type&&v.push(_),_={type:null,value:""};for(var T=0;T<S.length;T++)v.push(S[T])}}if(w==p.length)break;if(w=I,k++>u){for(k>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:p});w<p.length;)_.type&&v.push(_),_={value:p.substring(w,w+=500),type:"overflow"};a="start",f=[];break}}return _.type&&v.push(_),f.length>1&&f[0]!==a&&f.unshift("#tmp",a),{tokens:v,state:f.length?f:a}},l}();d.prototype.reportError=o,i.Tokenizer=d}),(void 0)("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,i,s){var o=t("../lib/deep_copy").deepCopy,u;u=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(p,r){if(!r){for(var f in p)this.$rules[f]=p[f];return}for(var f in p){for(var a=p[f],c=0;c<a.length;c++){var h=a[c];(h.next||h.onMatch)&&(typeof h.next=="string"&&h.next.indexOf(r)!==0&&(h.next=r+h.next),h.nextState&&h.nextState.indexOf(r)!==0&&(h.nextState=r+h.nextState))}this.$rules[r+f]=a}},this.getRules=function(){return this.$rules},this.embedRules=function(p,r,f,a,c){var h=typeof p=="function"?new p().getRules():p;if(a)for(var m=0;m<a.length;m++)a[m]=r+a[m];else{a=[];for(var y in h)a.push(r+y)}if(this.addRules(h,r),f)for(var v=Array.prototype[c?"push":"unshift"],m=0;m<a.length;m++)v.apply(this.$rules[a[m]],o(f));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var d=function(p,r){return(p!="start"||r.length)&&r.unshift(this.nextState,p),this.nextState},l=function(p,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){function p(a){var c=f[a];c.processed=!0;for(var h=0;h<c.length;h++){var m=c[h],y=null;Array.isArray(m)&&(y=m,m={}),!m.regex&&m.start&&(m.regex=m.start,m.next||(m.next=[]),m.next.push({defaultToken:m.token},{token:m.token+".end",regex:m.end||m.start,next:"pop"}),m.token=m.token+".start",m.push=!0);var v=m.next||m.push;if(v&&Array.isArray(v)){var w=m.stateName;w||(w=m.token,typeof w!="string"&&(w=w[0]||""),f[w]&&(w+=r++)),f[w]=v,m.next=w,p(w)}else v=="pop"&&(m.next=l);if(m.push&&(m.nextState=m.next||m.push,m.next=d,delete m.push),m.rules)for(var k in m.rules)f[k]?f[k].push&&f[k].push.apply(f[k],m.rules[k]):f[k]=m.rules[k];var _=typeof m=="string"?m:m.include;if(_&&(_==="$self"&&(_="start"),Array.isArray(_)?y=_.map(function(x){return f[x]}):y=f[_]),y){var S=[h,1].concat(y);m.noEscape&&(S=S.filter(function(x){return!x.next})),c.splice.apply(c,S),h--}m.keywordMap&&(m.token=this.createKeywordMapper(m.keywordMap,m.defaultToken||"text",m.caseInsensitive),delete m.defaultToken)}}var r=0,f=this.$rules;Object.keys(f).forEach(p,this)},this.createKeywordMapper=function(p,r,f,a){var c=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(h){for(var m=p[h],y=m.split(a||"|"),v=y.length;v--;){var w=y[v];this.$keywordList.push(w),f&&(w=w.toLowerCase()),c[w]=h}},this),p=null,f?function(h){return c[h.toLowerCase()]||r}:function(h){return c[h]||r}},this.getKeywords=function(){return this.$keywords}}).call(u.prototype),i.TextHighlightRules=u}),(void 0)("ace/mode/behaviour",["require","exports","module"],function(t,i,s){var o;o=function(){this.$behaviours={}},(function(){this.add=function(u,d,l){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[u]:this.$behaviours[u]={}}this.$behaviours[u][d]=l},this.addBehaviours=function(u){for(var d in u)for(var l in u[d])this.add(d,l,u[d][l])},this.remove=function(u){this.$behaviours&&this.$behaviours[u]&&delete this.$behaviours[u]},this.inherit=function(u,d){if(typeof u=="function")var l=new u().getBehaviours(d);else var l=u.getBehaviours(d);this.addBehaviours(l)},this.getBehaviours=function(u){if(!u)return this.$behaviours;for(var d={},l=0;l<u.length;l++)this.$behaviours[u[l]]&&(d[u[l]]=this.$behaviours[u[l]]);return d}}).call(o.prototype),i.Behaviour=o}),(void 0)("ace/token_iterator",["require","exports","module","ace/range"],function(t,i,s){var o=t("./range").Range,u=function(){function d(l,p,r){this.$session=l,this.$row=p,this.$rowTokens=l.getTokens(p);var f=l.getTokenAt(p,r);this.$tokenIndex=f?f.index:-1}return d.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]},d.prototype.stepForward=function(){this.$tokenIndex+=1;for(var l;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,p=this.$tokenIndex,r=l[p].start;if(r!==void 0)return r;for(r=0;p>0;)p-=1,r+=l[p].value.length;return r},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new o(this.$row,p,this.$row,p+l.value.length)},d}();i.TokenIterator=u}),(void 0)("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,i,s){var o=t("../../lib/oop"),u=t("../behaviour").Behaviour,d=t("../../token_iterator").TokenIterator,l=t("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],f,a={},c={'"':'"',"'":"'"},h=function(v){var w=-1;if(v.multiSelect&&(w=v.selection.index,a.rangeCount!=v.multiSelect.rangeCount&&(a={rangeCount:v.multiSelect.rangeCount})),a[w])return f=a[w];f=a[w]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(v,w,k,_){var S=v.end.row-v.start.row;return{text:k+w+_,selection:[0,v.start.column+1,S,v.end.column+(S?0:1)]}},y;y=function(v){v=v||{},this.add("braces","insertion",function(w,k,_,S,x){var L=_.getCursorPosition(),I=S.doc.getLine(L.row);if(x=="{"){h(_);var $=_.getSelectionRange(),T=S.doc.getTextRange($),O=S.getTokenAt(L.row,L.column);if(T!==""&&T!=="{"&&_.getWrapBehavioursEnabled())return m($,T,"{","}");if(O&&/(?:string)\.quasi|\.xml/.test(O.type)){var C=[/tag\-(?:open|name)/,/attribute\-name/];return C.some(function(Y){return Y.test(O.type)})||/(string)\.quasi/.test(O.type)&&O.value[L.column-O.start-1]!=="$"?void 0:(y.recordAutoInsert(_,S,"}"),{text:"{}",selection:[1,1]})}if(y.isSaneInsertion(_,S))return/[\]\}\)]/.test(I[L.column])||_.inMultiSelectMode||v.braces?(y.recordAutoInsert(_,S,"}"),{text:"{}",selection:[1,1]}):(y.recordMaybeInsert(_,S,"{"),{text:"{",selection:[1,1]})}else if(x=="}"){h(_);var A=I.substring(L.column,L.column+1);if(A=="}"){var M=S.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(M!==null&&y.isAutoInsertedClosing(L,I,x))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if(x==`
|
|
313
|
+
`||x==`\r
|
|
314
|
+
`){h(_);var R="";y.isMaybeInsertedClosing(L,I)&&(R=l.stringRepeat("}",f.maybeInsertedBrackets),y.clearMaybeInsertedClosing());var A=I.substring(L.column,L.column+1);if(A==="}"){var N=S.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!N)return null;var H=this.$getIndent(S.getLine(N.row))}else{if(!R){y.clearMaybeInsertedClosing();return}var H=this.$getIndent(I)}var z=H+S.getTabString();return{text:`
|
|
315
|
+
`+z+`
|
|
316
|
+
`+H+R,selection:[1,z.length,1,z.length]}}y.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(w,k,_,S,x){var L=S.doc.getTextRange(x);if(!x.isMultiLine()&&L=="{"){h(_);var I=S.doc.getLine(x.start.row),$=I.substring(x.end.column,x.end.column+1);if($=="}")return x.end.column++,x;f.maybeInsertedBrackets--}}),this.add("parens","insertion",function(w,k,_,S,x){if(x=="("){h(_);var L=_.getSelectionRange(),I=S.doc.getTextRange(L);if(I!==""&&_.getWrapBehavioursEnabled())return m(L,I,"(",")");if(y.isSaneInsertion(_,S))return y.recordAutoInsert(_,S,")"),{text:"()",selection:[1,1]}}else if(x==")"){h(_);var $=_.getCursorPosition(),T=S.doc.getLine($.row),O=T.substring($.column,$.column+1);if(O==")"){var C=S.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(C!==null&&y.isAutoInsertedClosing($,T,x))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(w,k,_,S,x){var L=S.doc.getTextRange(x);if(!x.isMultiLine()&&L=="("){h(_);var I=S.doc.getLine(x.start.row),$=I.substring(x.start.column+1,x.start.column+2);if($==")")return x.end.column++,x}}),this.add("brackets","insertion",function(w,k,_,S,x){if(x=="["){h(_);var L=_.getSelectionRange(),I=S.doc.getTextRange(L);if(I!==""&&_.getWrapBehavioursEnabled())return m(L,I,"[","]");if(y.isSaneInsertion(_,S))return y.recordAutoInsert(_,S,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){h(_);var $=_.getCursorPosition(),T=S.doc.getLine($.row),O=T.substring($.column,$.column+1);if(O=="]"){var C=S.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(C!==null&&y.isAutoInsertedClosing($,T,x))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(w,k,_,S,x){var L=S.doc.getTextRange(x);if(!x.isMultiLine()&&L=="["){h(_);var I=S.doc.getLine(x.start.row),$=I.substring(x.start.column+1,x.start.column+2);if($=="]")return x.end.column++,x}}),this.add("string_dquotes","insertion",function(w,k,_,S,x){var L=S.$mode.$quotes||c;if(x.length==1&&L[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;h(_);var I=x,$=_.getSelectionRange(),T=S.doc.getTextRange($);if(T!==""&&(T.length!=1||!L[T])&&_.getWrapBehavioursEnabled())return m($,T,I,I);if(!T){var O=_.getCursorPosition(),C=S.doc.getLine(O.row),A=C.substring(O.column-1,O.column),M=C.substring(O.column,O.column+1),R=S.getTokenAt(O.row,O.column),N=S.getTokenAt(O.row,O.column+1);if(A=="\\"&&R&&/escape/.test(R.type))return null;var H=R&&/string|escape/.test(R.type),z=!N||/string|escape/.test(N.type),Y;if(M==I)Y=H!==z,Y&&/string\.end/.test(N.type)&&(Y=!1);else{if(H&&!z||H&&z)return null;var K=S.$mode.tokenRe;K.lastIndex=0;var re=K.test(A);K.lastIndex=0;var fe=K.test(M),U=S.$mode.$pairQuotesAfter,Q=U&&U[I]&&U[I].test(A);if(!Q&&re||fe||M&&!/[\s;,.})\]\\]/.test(M))return null;var ie=C[O.column-2];if(!(A!=I||ie!=I&&!K.test(ie)))return null;Y=!0}return{text:Y?I+I:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(w,k,_,S,x){var L=S.$mode.$quotes||c,I=S.doc.getTextRange(x);if(!x.isMultiLine()&&L.hasOwnProperty(I)){h(_);var $=S.doc.getLine(x.start.row),T=$.substring(x.start.column+1,x.start.column+2);if(T==I)return x.end.column++,x}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(w,k,_,S,x){if(w==="doc-start"&&(x===`
|
|
317
|
+
`||x===`\r
|
|
318
|
+
`)&&_.selection.isEmpty()){var L=_.getCursorPosition();if(L.column===0)return;for(var I=S.doc.getLine(L.row),$=S.doc.getLine(L.row+1),T=S.getTokens(L.row),O=0,C=0;C<T.length;C++){O+=T[C].value.length;var A=T[C];if(O>=L.column){if(O===L.column){if(!/\.doc/.test(A.type))return;if(/\*\//.test(A.value)){var M=T[C+1];if(!M||!/\.doc/.test(M.type))return}}var R=L.column-(O-A.value.length),N=A.value.indexOf("*/"),H=A.value.indexOf("/**",N>-1?N+2:0);if(H!==-1&&R>H&&R<H+3||N!==-1&&H!==-1&&R>=N&&R<=H||!/\.doc/.test(A.type))return;break}}var z=this.$getIndent(I);if(/\s*\*/.test($))return/^\s*\*/.test(I)?{text:x+z+"* ",selection:[1,2+z.length,1,2+z.length]}:{text:x+z+" * ",selection:[1,3+z.length,1,3+z.length]};if(/\/\*\*/.test(I.substring(0,L.column)))return{text:x+z+" * "+x+" "+z+"*/",selection:[1,4+z.length,1,4+z.length]}}})},y.isSaneInsertion=function(v,w){var k=v.getCursorPosition(),_=new d(w,k.row,k.column);if(!this.$matchTokenType(_.getCurrentToken()||"text",p)){if(/[)}\]]/.test(v.session.getLine(k.row)[k.column]))return!0;var S=new d(w,k.row,k.column+1);if(!this.$matchTokenType(S.getCurrentToken()||"text",p))return!1}return _.stepForward(),_.getCurrentTokenRow()!==k.row||this.$matchTokenType(_.getCurrentToken()||"text",r)},y.$matchTokenType=function(v,w){return w.indexOf(v.type||v)>-1},y.recordAutoInsert=function(v,w,k){var _=v.getCursorPosition(),S=w.doc.getLine(_.row);this.isAutoInsertedClosing(_,S,f.autoInsertedLineEnd[0])||(f.autoInsertedBrackets=0),f.autoInsertedRow=_.row,f.autoInsertedLineEnd=k+S.substr(_.column),f.autoInsertedBrackets++},y.recordMaybeInsert=function(v,w,k){var _=v.getCursorPosition(),S=w.doc.getLine(_.row);this.isMaybeInsertedClosing(_,S)||(f.maybeInsertedBrackets=0),f.maybeInsertedRow=_.row,f.maybeInsertedLineStart=S.substr(0,_.column)+k,f.maybeInsertedLineEnd=S.substr(_.column),f.maybeInsertedBrackets++},y.isAutoInsertedClosing=function(v,w,k){return f.autoInsertedBrackets>0&&v.row===f.autoInsertedRow&&k===f.autoInsertedLineEnd[0]&&w.substr(v.column)===f.autoInsertedLineEnd},y.isMaybeInsertedClosing=function(v,w){return f.maybeInsertedBrackets>0&&v.row===f.maybeInsertedRow&&w.substr(v.column)===f.maybeInsertedLineEnd&&w.substr(0,v.column)==f.maybeInsertedLineStart},y.popAutoInsertedClosing=function(){f.autoInsertedLineEnd=f.autoInsertedLineEnd.substr(1),f.autoInsertedBrackets--},y.clearMaybeInsertedClosing=function(){f&&(f.maybeInsertedBrackets=0,f.maybeInsertedRow=-1)},o.inherits(y,u),i.CstyleBehaviour=y}),(void 0)("ace/unicode",["require","exports","module"],function(t,i,s){for(var o=[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],u=0,d=[],l=0;l<o.length;l+=2)d.push(u+=o[l]),o[l+1]&&d.push(45,u+=o[l+1]);i.wordChars=String.fromCharCode.apply(null,d)}),(void 0)("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,i,s){var o=t("../config"),u=t("../tokenizer").Tokenizer,d=t("./text_highlight_rules").TextHighlightRules,l=t("./behaviour/cstyle").CstyleBehaviour,p=t("../unicode"),r=t("../lib/lang"),f=t("../token_iterator").TokenIterator,a=t("../range").Range,c;c=function(){this.HighlightRules=d},(function(){this.$defaultBehaviour=new l,this.tokenRe=new RegExp("^["+p.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+p.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new u(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(h,m,y,v){function w(Y){for(var K=y;K<=v;K++)Y(k.getLine(K),K)}var k=m.doc,_=!0,S=!0,x=1/0,L=m.getTabSize(),I=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var O=this.lineCommentStart.map(r.escapeRegExp).join("|"),$=this.lineCommentStart[0];else var O=r.escapeRegExp(this.lineCommentStart),$=this.lineCommentStart;O=new RegExp("^(\\s*)(?:"+O+") ?"),I=m.getUseSoftTabs();var M=function(Q,ie){var V=Q.match(O);if(V){var te=V[1].length,ae=V[0].length;!H(Q,te,ae)&&V[0][ae-1]==" "&&ae--,k.removeInLine(ie,te,ae)}},N=$+" ",A=function(Q,ie){(!_||/\S/.test(Q))&&(H(Q,x,x)?k.insertInLine({row:ie,column:x},N):k.insertInLine({row:ie,column:x},$))},R=function(Q,ie){return O.test(Q)},H=function(Q,ie,V){for(var te=0;ie--&&Q.charAt(ie)==" ";)te++;if(te%L!=0)return!1;for(var te=0;Q.charAt(V++)==" ";)te++;return L>2?te%L!=L-1:te%L==0}}else{if(!this.blockComment)return!1;var $=this.blockComment.start,T=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+r.escapeRegExp($)+")"),C=new RegExp("(?:"+r.escapeRegExp(T)+")\\s*$"),A=function(Y,K){R(Y,K)||(!_||/\S/.test(Y))&&(k.insertInLine({row:K,column:Y.length},T),k.insertInLine({row:K,column:x},$))},M=function(Y,K){var re;(re=Y.match(C))&&k.removeInLine(K,Y.length-re[0].length,Y.length),(re=Y.match(O))&&k.removeInLine(K,re[1].length,re[0].length)},R=function(Y,K){if(O.test(Y))return!0;for(var re=m.getTokens(K),fe=0;fe<re.length;fe++)if(re[fe].type==="comment")return!0}}var z=1/0;w(function(Y,K){var re=Y.search(/\S/);re!==-1?(re<x&&(x=re),S&&!R(Y,K)&&(S=!1)):z>Y.length&&(z=Y.length)}),x==1/0&&(x=z,_=!1,S=!1),I&&x%L!=0&&(x=Math.floor(x/L)*L),w(S?M:A)},this.toggleBlockComment=function(h,m,y,v){var w=this.blockComment;if(w){!w.start&&w[0]&&(w=w[0]);var k=new f(m,v.row,v.column),_=k.getCurrentToken();m.selection;var S=m.selection.toOrientedRange(),x,L;if(_&&/comment/.test(_.type)){for(var I,$;_&&/comment/.test(_.type);){var T=_.value.indexOf(w.start);if(T!=-1){var O=k.getCurrentTokenRow(),C=k.getCurrentTokenColumn()+T;I=new a(O,C,O,C+w.start.length);break}_=k.stepBackward()}for(var k=new f(m,v.row,v.column),_=k.getCurrentToken();_&&/comment/.test(_.type);){var T=_.value.indexOf(w.end);if(T!=-1){var O=k.getCurrentTokenRow(),C=k.getCurrentTokenColumn()+T;$=new a(O,C,O,C+w.end.length);break}_=k.stepForward()}$&&m.remove($),I&&(m.remove(I),x=I.start.row,L=-w.start.length)}else L=w.start.length,x=y.start.row,m.insert(y.end,w.end),m.insert(y.start,w.start);S.start.row==x&&(S.start.column+=L),S.end.row==x&&(S.end.column+=L),m.selection.fromOrientedRange(S)}},this.getNextLineIndent=function(h,m,y){return this.$getIndent(m)},this.checkOutdent=function(h,m,y){return!1},this.autoOutdent=function(h,m,y){},this.$getIndent=function(h){return h.match(/^\s*/)[0]},this.createWorker=function(h){return null},this.createModeDelegates=function(h){this.$embeds=[],this.$modes={};for(var m in h)if(h[m]){var y=h[m],v=y.prototype.$id,w=o.$modes[v];w||(o.$modes[v]=w=new y),o.$modes[m]||(o.$modes[m]=w),this.$embeds.push(m),this.$modes[m]=w}for(var k=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],_=function(x){(function(L){var I=k[x],$=L[I];L[k[x]]=function(){return this.$delegator(I,arguments,$)}})(S)},S=this,m=0;m<k.length;m++)_(m)},this.$delegator=function(h,m,y){var v=m[0]||"start";if(typeof v!="string"){if(Array.isArray(v[2])){var w=v[2][v[2].length-1],k=this.$modes[w];if(k)return k[h].apply(k,[v[1]].concat([].slice.call(m,1)))}v=v[0]||"start"}for(var _=0;_<this.$embeds.length;_++)if(this.$modes[this.$embeds[_]]){var S=v.split(this.$embeds[_]);if(!S[0]&&S[1]){m[0]=S[1];var k=this.$modes[this.$embeds[_]];return k[h].apply(k,m)}}var x=y.apply(this,m);return y?x:void 0},this.transformAction=function(h,m,y,v,w){if(this.$behaviour){var k=this.$behaviour.getBehaviours();for(var _ in k)if(k[_][m]){var S=k[_][m].apply(this,arguments);if(S)return S}}},this.getKeywords=function(h){if(!this.completionKeywords){var m=this.$tokenizer.rules,y=[];for(var v in m)for(var w=m[v],k=0,_=w.length;k<_;k++)if(typeof w[k].token=="string")/keyword|support|storage/.test(w[k].token)&&y.push(w[k].regex);else if(typeof w[k].token=="object"){for(var S=0,x=w[k].token.length;S<x;S++)if(/keyword|support|storage/.test(w[k].token[S])){var v=w[k].regex.match(/\(.+?\)/g)[S];y.push(v.substr(1,v.length-2))}}this.completionKeywords=y}return h?y.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(h,m,y,v){var w=this.$keywordList||this.$createKeywordList();return w.map(function(k){return{name:k,value:k,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),i.Mode=c}),(void 0)("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,i,s){var o=t("./lib/dom"),u=function(){function d(l){this.session=l,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 d.prototype.getRowLength=function(l){var p;return this.lineWidgets?p=this.lineWidgets[l]&&this.lineWidgets[l].rowCount||0:p=0,!this.$useWrapMode||!this.$wrapData[l]?1+p:this.$wrapData[l].length+1+p},d.prototype.$getWidgetScreenLength=function(){var l=0;return this.lineWidgets.forEach(function(p){p&&p.rowCount&&!p.hidden&&(l+=p.rowCount)}),l},d.prototype.$onChangeEditor=function(l){this.attach(l.editor)},d.prototype.attach=function(l){l&&l.widgetManager&&l.widgetManager!=this&&l.widgetManager.detach(),this.editor!=l&&(this.detach(),this.editor=l,l&&(l.widgetManager=this,l.renderer.on("beforeRender",this.measureWidgets),l.renderer.on("afterRender",this.renderWidgets)))},d.prototype.detach=function(l){var p=this.editor;if(p){this.editor=null,p.widgetManager=null,p.renderer.off("beforeRender",this.measureWidgets),p.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(f){f&&f.el&&f.el.parentNode&&(f._inDocument=!1,f.el.parentNode.removeChild(f.el))})}},d.prototype.updateOnFold=function(l,p){var r=p.lineWidgets;if(!(!r||!l.action)){for(var f=l.data,a=f.start.row,c=f.end.row,h=l.action=="add",m=a+1;m<c;m++)r[m]&&(r[m].hidden=h);r[c]&&(h?r[a]?r[c].hidden=h:r[a]=r[c]:(r[a]==r[c]&&(r[a]=void 0),r[c].hidden=h))}},d.prototype.updateOnChange=function(l){var p=this.session.lineWidgets;if(p){var r=l.start.row,f=l.end.row-r;if(f!==0)if(l.action=="remove"){var a=p.splice(r+1,f);!p[r]&&a[a.length-1]&&(p[r]=a.pop()),a.forEach(function(h){h&&this.removeLineWidget(h)},this),this.$updateRows()}else{var c=new Array(f);p[r]&&p[r].column!=null&&l.start.column>p[r].column&&r++,c.unshift(r,0),p.splice.apply(p,c),this.$updateRows()}}},d.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var p=!0;l.forEach(function(r,f){if(r)for(p=!1,r.row=f;r.$oldWidget;)r.$oldWidget.row=f,r=r.$oldWidget}),p&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[l.row];return p&&(l.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},d.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var p=this.editor.renderer;l.html&&!l.el&&(l.el=o.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=o.createElement("div"),l.el.textContent=l.text),l.el&&(o.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&o.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",p.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/p.layerConfig.lineHeight);var r=this.session.getFoldAt(l.row,0);if(l.$fold=r,r){var f=this.session.lineWidgets;l.row==r.end.row&&!f[r.start.row]?f[r.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(l),l},d.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var p=this.session.lineWidgets[l.row];if(p==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;p;){if(p.$oldWidget==l){p.$oldWidget=l.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(l){for(var p=this.session.lineWidgets,r=p&&p[l],f=[];r;)f.push(r),r=r.$oldWidget;return f},d.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(l,p){var r=this.session._changedWidgets,f=p.layerConfig;if(!(!r||!r.length)){for(var a=1/0,c=0;c<r.length;c++){var h=r[c];if(!(!h||!h.el)&&h.session==this.session){if(!h._inDocument){if(this.session.lineWidgets[h.row]!=h)continue;h._inDocument=!0,p.container.appendChild(h.el)}h.h=h.el.offsetHeight,h.fixedWidth||(h.w=h.el.offsetWidth,h.screenWidth=Math.ceil(h.w/f.characterWidth));var m=h.h/f.lineHeight;h.coverLine&&(m-=this.session.getRowLineCount(h.row),m<0&&(m=0)),h.rowCount!=m&&(h.rowCount=m,h.row<a&&(a=h.row))}}a!=1/0&&(this.session._emit("changeFold",{data:{start:{row:a}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},d.prototype.renderWidgets=function(l,p){var r=p.layerConfig,f=this.session.lineWidgets;if(f){for(var a=Math.min(this.firstRow,r.firstRow),c=Math.max(this.lastRow,r.lastRow,f.length);a>0&&!f[a];)a--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,p.$cursorLayer.config=r;for(var h=a;h<=c;h++){var m=f[h];if(!(!m||!m.el)){if(m.hidden){m.el.style.top=-100-(m.pixelHeight||0)+"px";continue}m._inDocument||(m._inDocument=!0,p.container.appendChild(m.el));var y=p.$cursorLayer.getPixelPosition({row:h,column:0},!0).top;m.coverLine||(y+=r.lineHeight*this.session.getRowLineCount(m.row)),m.el.style.top=y-r.offset+"px";var v=m.coverGutter?0:p.gutterWidth;m.fixedWidth||(v-=p.scrollLeft),m.el.style.left=v+"px",m.fullWidth&&m.screenWidth&&(m.el.style.minWidth=r.width+2*r.padding+"px"),m.fixedWidth?m.el.style.right=p.scrollBar.getWidth()+"px":m.el.style.right=""}}}},d}();i.LineWidgets=u}),(void 0)("ace/apply_delta",["require","exports","module"],function(t,i,s){i.applyDelta=function(o,u,d){var l=u.start.row,p=u.start.column,r=o[l]||"";switch(u.action){case"insert":var f=u.lines;if(f.length===1)o[l]=r.substring(0,p)+u.lines[0]+r.substring(p);else{var a=[l,1].concat(u.lines);o.splice.apply(o,a),o[l]=r.substring(0,p)+o[l],o[l+u.lines.length-1]+=r.substring(p)}break;case"remove":var c=u.end.column,h=u.end.row;l===h?o[l]=r.substring(0,p)+r.substring(c):o.splice(l,h-l+1,r.substring(0,p)+o[h].substring(c))}}}),(void 0)("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,i,s){function o(r,f,a){var c=a?r.column<=f.column:r.column<f.column;return r.row<f.row||r.row==f.row&&c}function u(r,f,a){var c=r.action=="insert",h=(c?1:-1)*(r.end.row-r.start.row),m=(c?1:-1)*(r.end.column-r.start.column),y=r.start,v=c?y:r.end;return o(f,y,a)?{row:f.row,column:f.column}:o(v,f,!a)?{row:f.row+h,column:f.column+(f.row==v.row?m:0)}:{row:y.row,column:y.column}}var d=t("./lib/oop"),l=t("./lib/event_emitter").EventEmitter,p=function(){function r(f,a,c){this.$onChange=this.onChange.bind(this),this.attach(f),typeof a!="number"?this.setPosition(a.row,a.column):this.setPosition(a,c)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(f){if(!(f.start.row==f.end.row&&f.start.row!=this.row)&&!(f.start.row>this.row)){var a=u(f,{row:this.row,column:this.column},this.$insertRight);this.setPosition(a.row,a.column,!0)}},r.prototype.setPosition=function(f,a,c){var h;if(c?h={row:f,column:a}:h=this.$clipPositionToDocument(f,a),!(this.row==h.row&&this.column==h.column)){var m={row:this.row,column:this.column};this.row=h.row,this.column=h.column,this._signal("change",{old:m,value:h})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(f){this.document=f||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(f,a){var c={};return f>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):f<0?(c.row=0,c.column=0):(c.row=f,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,a))),a<0&&(c.column=0),c},r}();p.prototype.$insertRight=!1,d.implement(p.prototype,l),i.Anchor=p}),(void 0)("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,i,s){var o=t("./lib/oop"),u=t("./apply_delta").applyDelta,d=t("./lib/event_emitter").EventEmitter,l=t("./range").Range,p=t("./anchor").Anchor,r=function(){function f(a){this.$lines=[""],a.length===0?this.$lines=[""]:Array.isArray(a)?this.insertMergedLines({row:0,column:0},a):this.insert({row:0,column:0},a)}return f.prototype.setValue=function(a){var c=this.getLength()-1;this.remove(new l(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},a||"")},f.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},f.prototype.createAnchor=function(a,c){return new p(this,a,c)},f.prototype.$detectNewLine=function(a){var c=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[1]:`
|
|
319
|
+
`,this._signal("changeNewLineMode")},f.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
320
|
+
`;case"unix":return`
|
|
321
|
+
`;default:return this.$autoNewLine||`
|
|
322
|
+
`}},f.prototype.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a,this._signal("changeNewLineMode"))},f.prototype.getNewLineMode=function(){return this.$newLineMode},f.prototype.isNewLine=function(a){return a==`\r
|
|
323
|
+
`||a=="\r"||a==`
|
|
324
|
+
`},f.prototype.getLine=function(a){return this.$lines[a]||""},f.prototype.getLines=function(a,c){return this.$lines.slice(a,c+1)},f.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},f.prototype.getLength=function(){return this.$lines.length},f.prototype.getTextRange=function(a){return this.getLinesForRange(a).join(this.getNewLineCharacter())},f.prototype.getLinesForRange=function(a){var c;if(a.start.row===a.end.row)c=[this.getLine(a.start.row).substring(a.start.column,a.end.column)];else{c=this.getLines(a.start.row,a.end.row),c[0]=(c[0]||"").substring(a.start.column);var h=c.length-1;a.end.row-a.start.row==h&&(c[h]=c[h].substring(0,a.end.column))}return c},f.prototype.insertLines=function(a,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(a,c)},f.prototype.removeLines=function(a,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(a,c)},f.prototype.insertNewLine=function(a){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(a,["",""])},f.prototype.insert=function(a,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(a,this.$split(c))},f.prototype.insertInLine=function(a,c){var h=this.clippedPos(a.row,a.column),m=this.pos(a.row,a.column+c.length);return this.applyDelta({start:h,end:m,action:"insert",lines:[c]},!0),this.clonePos(m)},f.prototype.clippedPos=function(a,c){var h=this.getLength();a===void 0?a=h:a<0?a=0:a>=h&&(a=h-1,c=void 0);var m=this.getLine(a);return c==null&&(c=m.length),c=Math.min(Math.max(c,0),m.length),{row:a,column:c}},f.prototype.clonePos=function(a){return{row:a.row,column:a.column}},f.prototype.pos=function(a,c){return{row:a,column:c}},f.prototype.$clipPosition=function(a){var c=this.getLength();return a.row>=c?(a.row=Math.max(0,c-1),a.column=this.getLine(c-1).length):(a.row=Math.max(0,a.row),a.column=Math.min(Math.max(a.column,0),this.getLine(a.row).length)),a},f.prototype.insertFullLines=function(a,c){a=Math.min(Math.max(a,0),this.getLength());var h=0;a<this.getLength()?(c=c.concat([""]),h=0):(c=[""].concat(c),a--,h=this.$lines[a].length),this.insertMergedLines({row:a,column:h},c)},f.prototype.insertMergedLines=function(a,c){var h=this.clippedPos(a.row,a.column),m={row:h.row+c.length-1,column:(c.length==1?h.column:0)+c[c.length-1].length};return this.applyDelta({start:h,end:m,action:"insert",lines:c}),this.clonePos(m)},f.prototype.remove=function(a){var c=this.clippedPos(a.start.row,a.start.column),h=this.clippedPos(a.end.row,a.end.column);return this.applyDelta({start:c,end:h,action:"remove",lines:this.getLinesForRange({start:c,end:h})}),this.clonePos(c)},f.prototype.removeInLine=function(a,c,h){var m=this.clippedPos(a,c),y=this.clippedPos(a,h);return this.applyDelta({start:m,end:y,action:"remove",lines:this.getLinesForRange({start:m,end:y})},!0),this.clonePos(m)},f.prototype.removeFullLines=function(a,c){a=Math.min(Math.max(0,a),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var h=c==this.getLength()-1&&a>0,m=c<this.getLength()-1,y=h?a-1:a,v=h?this.getLine(y).length:0,w=m?c+1:c,k=m?0:this.getLine(w).length,_=new l(y,v,w,k),S=this.$lines.slice(a,c+1);return this.applyDelta({start:_.start,end:_.end,action:"remove",lines:this.getLinesForRange(_)}),S},f.prototype.removeNewLine=function(a){a<this.getLength()-1&&a>=0&&this.applyDelta({start:this.pos(a,this.getLine(a).length),end:this.pos(a+1,0),action:"remove",lines:["",""]})},f.prototype.replace=function(a,c){if(a instanceof l||(a=l.fromPoints(a.start,a.end)),c.length===0&&a.isEmpty())return a.start;if(c==this.getTextRange(a))return a.end;this.remove(a);var h;return c?h=this.insert(a.start,c):h=a.start,h},f.prototype.applyDeltas=function(a){for(var c=0;c<a.length;c++)this.applyDelta(a[c])},f.prototype.revertDeltas=function(a){for(var c=a.length-1;c>=0;c--)this.revertDelta(a[c])},f.prototype.applyDelta=function(a,c){var h=a.action=="insert";(h?a.lines.length<=1&&!a.lines[0]:!l.comparePoints(a.start,a.end))||(h&&a.lines.length>2e4?this.$splitAndapplyLargeDelta(a,2e4):(u(this.$lines,a,c),this._signal("change",a)))},f.prototype.$safeApplyDelta=function(a){var c=this.$lines.length;(a.action=="remove"&&a.start.row<c&&a.end.row<c||a.action=="insert"&&a.start.row<=c)&&this.applyDelta(a)},f.prototype.$splitAndapplyLargeDelta=function(a,c){for(var h=a.lines,m=h.length-c+1,y=a.start.row,v=a.start.column,w=0,k=0;w<m;w=k){k+=c-1;var _=h.slice(w,k);_.push(""),this.applyDelta({start:this.pos(y+w,v),end:this.pos(y+k,v=0),action:a.action,lines:_},!0)}a.lines=h.slice(w),a.start.row=y+w,a.start.column=v,this.applyDelta(a,!0)},f.prototype.revertDelta=function(a){this.$safeApplyDelta({start:this.clonePos(a.start),end:this.clonePos(a.end),action:a.action=="insert"?"remove":"insert",lines:a.lines.slice()})},f.prototype.indexToPosition=function(a,c){for(var h=this.$lines||this.getAllLines(),m=this.getNewLineCharacter().length,y=c||0,v=h.length;y<v;y++)if(a-=h[y].length+m,a<0)return{row:y,column:a+h[y].length+m};return{row:v-1,column:a+h[v-1].length+m}},f.prototype.positionToIndex=function(a,c){for(var h=this.$lines||this.getAllLines(),m=this.getNewLineCharacter().length,y=0,v=Math.min(a.row,h.length),w=c||0;w<v;++w)y+=h[w].length+m;return y+a.column},f.prototype.$split=function(a){return a.split(/\r\n|\r|\n/)},f}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",o.implement(r.prototype,d),i.Document=r}),(void 0)("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,i,s){var o=t("./lib/oop"),u=t("./lib/event_emitter").EventEmitter,d=function(){function l(p,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=p;var f=this;this.$worker=function(){if(f.running){for(var a=new Date,c=f.currentLine,h=-1,m=f.doc,y=c;f.lines[c];)c++;var v=m.getLength(),w=0;for(f.running=!1;c<v;){f.$tokenizeRow(c),h=c;do c++;while(f.lines[c]);if(w++,w%5===0&&new Date-a>20){f.running=setTimeout(f.$worker,20);break}}f.currentLine=c,h==-1&&(h=c),y<=h&&f.fireUpdateEvent(y,h)}}}return l.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(p,r){var f={first:p,last:r};this._signal("update",{data:f})},l.prototype.start=function(p){this.currentLine=Math.min(p||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)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(p){var r=p.start.row,f=p.end.row-r;if(f===0)this.lines[r]=null;else if(p.action=="remove")this.lines.splice(r,f+1,null),this.states.splice(r,f+1,null);else{var a=Array(f+1);a.unshift(r,1),this.lines.splice.apply(this.lines,a),this.states.splice.apply(this.states,a)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},l.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},l.prototype.$tokenizeRow=function(p){var r=this.doc.getLine(p),f=this.states[p-1],a=this.tokenizer.getLineTokens(r,f,p);return this.states[p]+""!=a.state+""?(this.states[p]=a.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=a.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();o.implement(d.prototype,u),i.BackgroundTokenizer=d}),(void 0)("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,i,s){var o=t("./lib/lang"),u=t("./range").Range,d=function(){function l(p,r,f){f===void 0&&(f="text"),this.setRegexp(p),this.clazz=r,this.type=f}return l.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},l.prototype.update=function(p,r,f,a){if(this.regExp)for(var c=a.firstRow,h=a.lastRow,m={},y=c;y<=h;y++){var v=this.cache[y];v==null&&(v=o.getMatchOffsets(f.getLine(y),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(S){return new u(y,S.offset,y,S.offset+S.length)}),this.cache[y]=v.length?v:"");for(var w=v.length;w--;){var k=v[w].toScreenRange(f),_=k.toString();m[_]||(m[_]=!0,r.drawSingleLineMarker(p,k,this.clazz,a))}}},l}();d.prototype.MAX_RANGES=500,i.SearchHighlight=d}),(void 0)("ace/undomanager",["require","exports","module","ace/range"],function(t,i,s){function o(S,x){for(var L=x;L--;){var I=S[L];if(I&&!I[0].ignore){for(;L<x-1;){var $=f(S[L],S[L+1]);S[L]=$[0],S[L+1]=$[1],L++}return!0}}}function u(S){return{row:S.row,column:S.column}}function d(S){return{start:u(S.start),end:u(S.end),action:S.action,lines:S.lines.slice()}}function l(S){if(S=S||this,Array.isArray(S))return S.map(l).join(`
|
|
325
|
+
`);var x="";return S.action?(x=S.action=="insert"?"+":"-",x+="["+S.lines+"]"):S.value&&(Array.isArray(S.value)?x=S.value.map(p).join(`
|
|
326
|
+
`):x=p(S.value)),S.start&&(x+=p(S)),(S.id||S.rev)&&(x+=" ("+(S.id||S.rev)+")"),x}function p(S){return S.start.row+":"+S.start.column+"=>"+S.end.row+":"+S.end.column}function r(S,x){var L=S.action=="insert",I=x.action=="insert";if(L&&I)if(_(x.start,S.end)>=0)c(x,S,-1);else{if(!(_(x.start,S.start)<=0))return null;c(S,x,1)}else if(L&&!I)if(_(x.start,S.end)>=0)c(x,S,-1);else{if(!(_(x.end,S.start)<=0))return null;c(S,x,-1)}else if(!L&&I)if(_(x.start,S.start)>=0)c(x,S,1);else{if(!(_(x.start,S.start)<=0))return null;c(S,x,1)}else if(!L&&!I)if(_(x.start,S.start)>=0)c(x,S,1);else{if(!(_(x.end,S.start)<=0))return null;c(S,x,-1)}return[x,S]}function f(S,x){for(var L=S.length;L--;)for(var I=0;I<x.length;I++)if(!r(S[L],x[I])){for(;L<S.length;){for(;I--;)r(x[I],S[L]);I=x.length,L++}return[S,x]}return S.selectionBefore=x.selectionBefore=S.selectionAfter=x.selectionAfter=null,[x,S]}function a(S,x){var L=S.action=="insert",I=x.action=="insert";if(L&&I)_(S.start,x.start)<0?c(x,S,1):c(S,x,1);else if(L&&!I)_(S.start,x.end)>=0?c(S,x,-1):(_(S.start,x.start)<=0||c(S,k.fromPoints(x.start,S.start),-1),c(x,S,1));else if(!L&&I)_(x.start,S.end)>=0?c(x,S,-1):(_(x.start,S.start)<=0||c(x,k.fromPoints(S.start,x.start),-1),c(S,x,1));else if(!L&&!I)if(_(x.start,S.end)>=0)c(x,S,-1);else{if(!(_(x.end,S.start)<=0)){var $,T;return _(S.start,x.start)<0&&($=S,S=m(S,x.start)),_(S.end,x.end)>0&&(T=m(S,x.end)),h(x.end,S.start,S.end,-1),T&&!$&&(S.lines=T.lines,S.start=T.start,S.end=T.end,T=S),[x,$,T].filter(Boolean)}c(S,x,-1)}return[x,S]}function c(S,x,L){h(S.start,x.start,x.end,L),h(S.end,x.start,x.end,L)}function h(S,x,L,I){S.row==(I==1?x:L).row&&(S.column+=I*(L.column-x.column)),S.row+=I*(L.row-x.row)}function m(S,x){var L=S.lines,I=S.end;S.end=u(x);var $=S.end.row-S.start.row,T=L.splice($,L.length),O=$?x.column:x.column-S.start.column;L.push(T[0].substring(0,O)),T[0]=T[0].substr(O);var C={start:u(x),end:I,lines:T,action:S.action};return C}function y(S,x){x=d(x);for(var L=S.length;L--;){for(var I=S[L],$=0;$<I.length;$++){var T=I[$],O=a(T,x);x=O[0],O.length!=2&&(O[2]?(I.splice($+1,1,O[1],O[2]),$++):O[1]||(I.splice($,1),$--))}I.length||S.splice(L,1)}return S}function v(S,x){for(var L=0;L<x.length;L++)for(var I=x[L],$=0;$<I.length;$++)y(S,I[$])}var w=function(){function S(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return S.prototype.addSession=function(x){this.$session=x},S.prototype.add=function(x,L,I){if(!this.$fromUndo&&x!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),L===!1||!this.lastDeltas){this.lastDeltas=[];var $=this.$undoStack.length;$>this.$undoDepth-1&&this.$undoStack.splice(0,$-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),x.id=this.$rev=++this.$maxRev}(x.action=="remove"||x.action=="insert")&&(this.$lastDelta=x),this.lastDeltas.push(x)}},S.prototype.addSelection=function(x,L){this.selections.push({value:x,rev:L||this.$rev})},S.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},S.prototype.markIgnored=function(x,L){L==null&&(L=this.$rev+1);for(var I=this.$undoStack,$=I.length;$--;){var T=I[$][0];if(T.id<=x)break;T.id<L&&(T.ignore=!0)}this.lastDeltas=null},S.prototype.getSelection=function(x,L){for(var I=this.selections,$=I.length;$--;){var T=I[$];if(T.rev<x)return L&&(T=I[$+1]),T}},S.prototype.getRevision=function(){return this.$rev},S.prototype.getDeltas=function(x,L){L==null&&(L=this.$rev+1);for(var I=this.$undoStack,$=null,T=0,O=I.length;O--;){var C=I[O][0];if(C.id<L&&!$&&($=O+1),C.id<=x){T=O+1;break}}return I.slice(T,$)},S.prototype.getChangedRanges=function(x,L){L==null&&(L=this.$rev+1)},S.prototype.getChangedLines=function(x,L){L==null&&(L=this.$rev+1)},S.prototype.undo=function(x,L){this.lastDeltas=null;var I=this.$undoStack;if(o(I,I.length)){x||(x=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var $=I.pop(),T=null;return $&&(T=x.undoChanges($,L),this.$redoStack.push($),this.$syncRev()),this.$fromUndo=!1,T}},S.prototype.redo=function(x,L){if(this.lastDeltas=null,x||(x=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var I=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);v(this.$redoStack,I),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(O){O[0].id=++this.$maxRev},this)}var $=this.$redoStack.pop(),T=null;return $&&(T=x.redoChanges($,L),this.$undoStack.push($),this.$syncRev()),this.$fromUndo=!1,T},S.prototype.$syncRev=function(){var x=this.$undoStack,L=x[x.length-1],I=L&&L[0].id||0;this.$redoStackBaseRev=I,this.$rev=I},S.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},S.prototype.canUndo=function(){return this.$undoStack.length>0},S.prototype.canRedo=function(){return this.$redoStack.length>0},S.prototype.bookmark=function(x){x==null&&(x=this.$rev),this.mark=x},S.prototype.isAtBookmark=function(){return this.$rev===this.mark},S.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},S.prototype.fromJSON=function(x){this.reset(),this.$undoStack=x.$undoStack,this.$redoStack=x.$redoStack},S.prototype.$prettyPrint=function(x){return x?l(x):l(this.$undoStack)+`
|
|
327
|
+
---
|
|
328
|
+
`+l(this.$redoStack)},S}();w.prototype.hasUndo=w.prototype.canUndo,w.prototype.hasRedo=w.prototype.canRedo,w.prototype.isClean=w.prototype.isAtBookmark,w.prototype.markClean=w.prototype.bookmark;var k=t("./range").Range,_=k.comparePoints;k.comparePoints,i.UndoManager=w}),(void 0)("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,i,s){var o=t("../range").Range,u=function(){function d(l,p){this.foldData=l,Array.isArray(p)?this.folds=p:p=this.folds=[p];var r=p[p.length-1];this.range=new o(p[0].start.row,p[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(f){f.setFoldLine(this)},this)}return d.prototype.shiftRow=function(l){this.start.row+=l,this.end.row+=l,this.folds.forEach(function(p){p.start.row+=l,p.end.row+=l})},d.prototype.addFold=function(l){if(l.sameRow){if(l.start.row<this.startRow||l.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(p,r){return-p.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else{if(l.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column}l.foldLine=this},d.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},d.prototype.walk=function(l,p,r){var f=0,a=this.folds,c,h,m,y=!0;p==null&&(p=this.end.row,r=this.end.column);for(var v=0;v<a.length;v++){if(c=a[v],h=c.range.compareStart(p,r),h==-1){l(null,p,r,f,y);return}if(m=l(null,c.start.row,c.start.column,f,y),m=!m&&l(c.placeholder,c.start.row,c.start.column,f),m||h===0)return;y=!c.sameRow,f=c.end.column}l(null,p,r,f,y)},d.prototype.getNextFoldTo=function(l,p){for(var r,f,a=0;a<this.folds.length;a++){if(r=this.folds[a],f=r.range.compareEnd(l,p),f==-1)return{fold:r,kind:"after"};if(f===0)return{fold:r,kind:"inside"}}return null},d.prototype.addRemoveChars=function(l,p,r){var f=this.getNextFoldTo(l,p),a,c;if(f){if(a=f.fold,f.kind=="inside"&&a.start.column!=p&&a.start.row!=l)window.console&&window.console.log(l,p,a);else if(a.start.row==l){c=this.folds;var h=c.indexOf(a);for(h===0&&(this.start.column+=r),h;h<c.length;h++){if(a=c[h],a.start.column+=r,!a.sameRow)return;a.end.column+=r}this.end.column+=r}}},d.prototype.split=function(l,p){var r=this.getNextFoldTo(l,p);if(!r||r.kind=="inside")return null;var f=r.fold,a=this.folds,c=this.foldData,h=a.indexOf(f),m=a[h-1];this.end.row=m.end.row,this.end.column=m.end.column,a=a.splice(h,a.length-h);var y=new d(c,a);return c.splice(c.indexOf(this)+1,0,y),y},d.prototype.merge=function(l){for(var p=l.folds,r=0;r<p.length;r++)this.addFold(p[r]);var f=this.foldData;f.splice(f.indexOf(l),1)},d.prototype.toString=function(){var l=[this.range.toString()+": ["];return this.folds.forEach(function(p){l.push(" "+p.toString())}),l.push("]"),l.join(`
|
|
329
|
+
`)},d.prototype.idxToPosition=function(l){for(var p=0,r=0;r<this.folds.length;r++){var f=this.folds[r];if(l-=f.start.column-p,l<0)return{row:f.start.row,column:f.start.column+l};if(l-=f.placeholder.length,l<0)return f.start;p=f.end.column}return{row:this.end.row,column:this.end.column+l}},d}();i.FoldLine=u}),(void 0)("ace/range_list",["require","exports","module","ace/range"],function(t,i,s){var o=t("./range").Range,u=o.comparePoints,d=function(){function l(){this.ranges=[],this.$bias=1}return l.prototype.pointIndex=function(p,r,f){for(var a=this.ranges,c=f||0;c<a.length;c++){var h=a[c],m=u(p,h.end);if(!(m>0)){var y=u(p,h.start);return m===0?r&&y!==0?-c-2:c:y>0||y===0&&!r?c:-c-1}}return-c-1},l.prototype.add=function(p){var r=!p.isEmpty(),f=this.pointIndex(p.start,r);f<0&&(f=-f-1);var a=this.pointIndex(p.end,r,f);return a<0?a=-a-1:a++,this.ranges.splice(f,a-f,p)},l.prototype.addList=function(p){for(var r=[],f=p.length;f--;)r.push.apply(r,this.add(p[f]));return r},l.prototype.substractPoint=function(p){var r=this.pointIndex(p);if(r>=0)return this.ranges.splice(r,1)},l.prototype.merge=function(){var p=[],r=this.ranges;r=r.sort(function(m,y){return u(m.start,y.start)});for(var f=r[0],a,c=1;c<r.length;c++){a=f,f=r[c];var h=u(a.end,f.start);h<0||h==0&&!a.isEmpty()&&!f.isEmpty()||(u(a.end,f.end)<0&&(a.end.row=f.end.row,a.end.column=f.end.column),r.splice(c,1),p.push(f),f=a,c--)}return this.ranges=r,p},l.prototype.contains=function(p,r){return this.pointIndex({row:p,column:r})>=0},l.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},l.prototype.rangeAtPoint=function(p){var r=this.pointIndex(p);if(r>=0)return this.ranges[r]},l.prototype.clipRows=function(p,r){var f=this.ranges;if(f[0].start.row>r||f[f.length-1].start.row<p)return[];var a=this.pointIndex({row:p,column:0});a<0&&(a=-a-1);var c=this.pointIndex({row:r,column:0},a);c<0&&(c=-c-1);for(var h=[],m=a;m<c;m++)h.push(f[m]);return h},l.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},l.prototype.attach=function(p){this.session&&this.detach(),this.session=p,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},l.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},l.prototype.$onChange=function(p){for(var r=p.start,f=p.end,a=r.row,c=f.row,h=this.ranges,m=0,y=h.length;m<y;m++){var v=h[m];if(v.end.row>=a)break}if(p.action=="insert")for(var w=c-a,k=-r.column+f.column;m<y;m++){var v=h[m];if(v.start.row>a)break;if(v.start.row==a&&v.start.column>=r.column&&(v.start.column==r.column&&this.$bias<=0||(v.start.column+=k,v.start.row+=w)),v.end.row==a&&v.end.column>=r.column){if(v.end.column==r.column&&this.$bias<0)continue;v.end.column==r.column&&k>0&&m<y-1&&v.end.column>v.start.column&&v.end.column==h[m+1].start.column&&(v.end.column-=k),v.end.column+=k,v.end.row+=w}}else for(var w=a-c,k=r.column-f.column;m<y;m++){var v=h[m];if(v.start.row>c)break;v.end.row<c&&(a<v.end.row||a==v.end.row&&r.column<v.end.column)?(v.end.row=a,v.end.column=r.column):v.end.row==c?v.end.column<=f.column?(w||v.end.column>r.column)&&(v.end.column=r.column,v.end.row=r.row):(v.end.column+=k,v.end.row+=w):v.end.row>c&&(v.end.row+=w),v.start.row<c&&(a<v.start.row||a==v.start.row&&r.column<v.start.column)?(v.start.row=a,v.start.column=r.column):v.start.row==c?v.start.column<=f.column?(w||v.start.column>r.column)&&(v.start.column=r.column,v.start.row=r.row):(v.start.column+=k,v.start.row+=w):v.start.row>c&&(v.start.row+=w)}if(w!=0&&m<y)for(;m<y;m++){var v=h[m];v.start.row+=w,v.end.row+=w}},l}();d.prototype.comparePoints=u,i.RangeList=d}),(void 0)("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(t,i,s){function o(a,c){a.row-=c.row,a.row==0&&(a.column-=c.column)}function u(a,c){o(a.start,c),o(a.end,c)}function d(a,c){a.row==0&&(a.column+=c.column),a.row+=c.row}function l(a,c){d(a.start,c),d(a.end,c)}var p=this&&this.__extends||function(){var a=function(c,h){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var v in y)Object.prototype.hasOwnProperty.call(y,v)&&(m[v]=y[v])},a(c,h)};return function(c,h){function m(){this.constructor=c}if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");a(c,h),c.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}}(),r=t("../range_list").RangeList,f=function(a){function c(h,m){var y=a.call(this)||this;return y.foldLine=null,y.placeholder=m,y.range=h,y.start=h.start,y.end=h.end,y.sameRow=h.start.row==h.end.row,y.subFolds=y.ranges=[],y}return p(c,a),c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(h){this.foldLine=h,this.subFolds.forEach(function(m){m.setFoldLine(h)})},c.prototype.clone=function(){var h=this.range.clone(),m=new c(h,this.placeholder);return this.subFolds.forEach(function(y){m.subFolds.push(y.clone())}),m.collapseChildren=this.collapseChildren,m},c.prototype.addSubFold=function(h){if(!this.range.isEqual(h)){u(h,this.start);for(var k=h.start.row,_=h.start.column,m=0,y=-1;m<this.subFolds.length&&(y=this.subFolds[m].range.compare(k,_),y==1);m++);var v=this.subFolds[m],w=0;if(y==0){if(v.range.containsRange(h))return v.addSubFold(h);w=1}for(var k=h.range.end.row,_=h.range.end.column,S=m,y=-1;S<this.subFolds.length&&(y=this.subFolds[S].range.compare(k,_),y==1);S++);y==0&&S++;for(var x=this.subFolds.splice(m,S-m,h),L=y==0?x.length-1:x.length,I=w;I<L;I++)h.addSubFold(x[I]);return h.setFoldLine(this.foldLine),h}},c.prototype.restoreRange=function(h){return l(h,this.start)},c}(r);i.Fold=f}),(void 0)("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,i,s){function o(){this.getFoldAt=function(f,a,c){var h=this.getFoldLine(f);if(!h)return null;for(var m=h.folds,y=0;y<m.length;y++){var v=m[y].range;if(v.contains(f,a)){if(c==1&&v.isEnd(f,a)&&!v.isEmpty()||c==-1&&v.isStart(f,a)&&!v.isEmpty())continue;return m[y]}}},this.getFoldsInRange=function(f){var a=f.start,c=f.end,h=this.$foldData,m=[];a.column+=1,c.column-=1;for(var y=0;y<h.length;y++){var v=h[y].range.compareRange(f);if(v!=2){if(v==-2)break;for(var w=h[y].folds,k=0;k<w.length;k++){var _=w[k];if(v=_.range.compareRange(f),v==-2)break;if(v!=2){if(v==42)break;m.push(_)}}}}return a.column-=1,c.column+=1,m},this.getFoldsInRangeList=function(f){if(Array.isArray(f)){var a=[];f.forEach(function(h){a=a.concat(this.getFoldsInRange(h))},this)}else var a=this.getFoldsInRange(f);return a},this.getAllFolds=function(){for(var f=[],a=this.$foldData,c=0;c<a.length;c++)for(var h=0;h<a[c].folds.length;h++)f.push(a[c].folds[h]);return f},this.getFoldStringAt=function(f,a,c,h){if(h=h||this.getFoldLine(f),!h)return null;for(var m={end:{column:0}},y,v,w=0;w<h.folds.length;w++){v=h.folds[w];var k=v.range.compareEnd(f,a);if(k==-1){y=this.getLine(v.start.row).substring(m.end.column,v.start.column);break}if(k===0)return null;m=v}return y||(y=this.getLine(v.start.row).substring(m.end.column)),c==-1?y.substring(0,a-m.end.column):c==1?y.substring(a-m.end.column):y},this.getFoldLine=function(f,a){var c=this.$foldData,h=0;for(a&&(h=c.indexOf(a)),h==-1&&(h=0),h;h<c.length;h++){var m=c[h];if(m.start.row<=f&&m.end.row>=f)return m;if(m.end.row>f)return null}return null},this.getNextFoldLine=function(f,a){var c=this.$foldData,h=0;for(a&&(h=c.indexOf(a)),h==-1&&(h=0),h;h<c.length;h++){var m=c[h];if(m.end.row>=f)return m}return null},this.getFoldedRowCount=function(f,a){for(var c=this.$foldData,h=a-f+1,m=0;m<c.length;m++){var y=c[m],v=y.end.row,w=y.start.row;if(v>=a){w<a&&(w>=f?h-=a-w:h=0);break}v>=f&&(w>=f?h-=v-w:h-=v-f+1)}return h},this.$addFoldLine=function(f){return this.$foldData.push(f),this.$foldData.sort(function(a,c){return a.start.row-c.start.row}),f},this.addFold=function(f,a){var c=this.$foldData,h=!1,m;f instanceof l?m=f:(m=new l(a,f),m.collapseChildren=a.collapseChildren),this.$clipRangeToDocument(m.range);var y=m.start.row,v=m.start.column,w=m.end.row,k=m.end.column,_=this.getFoldAt(y,v,1),S=this.getFoldAt(w,k,-1);if(_&&S==_)return _.addSubFold(m);_&&!_.range.isStart(y,v)&&this.removeFold(_),S&&!S.range.isEnd(w,k)&&this.removeFold(S);var x=this.getFoldsInRange(m.range);x.length>0&&(this.removeFolds(x),m.collapseChildren||x.forEach(function(T){m.addSubFold(T)}));for(var L=0;L<c.length;L++){var I=c[L];if(w==I.start.row){I.addFold(m),h=!0;break}if(y==I.end.row){if(I.addFold(m),h=!0,!m.sameRow){var $=c[L+1];if($&&$.start.row==w){I.merge($);break}}break}if(w<=I.start.row)break}return h||(I=this.$addFoldLine(new d(this.$foldData,m))),this.$useWrapMode?this.$updateWrapData(I.start.row,I.start.row):this.$updateRowLengthCache(I.start.row,I.start.row),this.$modified=!0,this._signal("changeFold",{data:m,action:"add"}),m},this.addFolds=function(f){f.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(f){var a=f.foldLine,c=a.start.row,h=a.end.row,m=this.$foldData,y=a.folds;if(y.length==1)m.splice(m.indexOf(a),1);else if(a.range.isEnd(f.end.row,f.end.column))y.pop(),a.end.row=y[y.length-1].end.row,a.end.column=y[y.length-1].end.column;else if(a.range.isStart(f.start.row,f.start.column))y.shift(),a.start.row=y[0].start.row,a.start.column=y[0].start.column;else if(f.sameRow)y.splice(y.indexOf(f),1);else{var v=a.split(f.start.row,f.start.column);y=v.folds,y.shift(),v.start.row=y[0].start.row,v.start.column=y[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,h):this.$updateRowLengthCache(c,h)),this.$modified=!0,this._signal("changeFold",{data:f,action:"remove"})},this.removeFolds=function(f){for(var a=[],c=0;c<f.length;c++)a.push(f[c]);a.forEach(function(h){this.removeFold(h)},this),this.$modified=!0},this.expandFold=function(f){this.removeFold(f),f.subFolds.forEach(function(a){f.restoreRange(a),this.addFold(a)},this),f.collapseChildren>0&&this.foldAll(f.start.row+1,f.end.row,f.collapseChildren-1),f.subFolds=[]},this.expandFolds=function(f){f.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(f,a){var c,h;if(f==null)c=new u(0,0,this.getLength(),0),a==null&&(a=!0);else if(typeof f=="number")c=new u(f,0,f,this.getLine(f).length);else if("row"in f)c=u.fromPoints(f,f);else{if(Array.isArray(f))return h=[],f.forEach(function(y){h=h.concat(this.unfold(y))},this),h;c=f}h=this.getFoldsInRangeList(c);for(var m=h;h.length==1&&u.comparePoints(h[0].start,c.start)<0&&u.comparePoints(h[0].end,c.end)>0;)this.expandFolds(h),h=this.getFoldsInRangeList(c);if(a!=0?this.removeFolds(h):this.expandFolds(h),m.length)return m},this.isRowFolded=function(f,a){return!!this.getFoldLine(f,a)},this.getRowFoldEnd=function(f,a){var c=this.getFoldLine(f,a);return c?c.end.row:f},this.getRowFoldStart=function(f,a){var c=this.getFoldLine(f,a);return c?c.start.row:f},this.getFoldDisplayLine=function(f,a,c,h,m){h==null&&(h=f.start.row),m==null&&(m=0),a==null&&(a=f.end.row),c==null&&(c=this.getLine(a).length);var y=this.doc,v="";return f.walk(function(w,k,_,S){if(!(k<h)){if(k==h){if(_<m)return;S=Math.max(m,S)}w!=null?v+=w:v+=y.getLine(k).substring(S,_)}},a,c),v},this.getDisplayLine=function(f,a,c,h){var m=this.getFoldLine(f);if(!m){var y;return y=this.doc.getLine(f),y.substring(h||0,a||y.length)}return this.getFoldDisplayLine(m,f,a,c,h)},this.$cloneFoldData=function(){var f=[];return f=this.$foldData.map(function(a){var c=a.folds.map(function(h){return h.clone()});return new d(f,c)}),f},this.toggleFold=function(f){var a=this.selection,c=a.getRange(),h,m;if(c.isEmpty()){var y=c.start;if(h=this.getFoldAt(y.row,y.column),h){this.expandFold(h);return}(m=this.findMatchingBracket(y))?c.comparePoint(m)==1?c.end=m:(c.start=m,c.start.column++,c.end.column--):(m=this.findMatchingBracket({row:y.row,column:y.column+1}))?(c.comparePoint(m)==1?c.end=m:c.start=m,c.start.column++):c=this.getCommentFoldRange(y.row,y.column)||c}else{var v=this.getFoldsInRange(c);if(f&&v.length){this.expandFolds(v);return}v.length==1&&(h=v[0])}if(h||(h=this.getFoldAt(c.start.row,c.start.column)),h&&h.range.toString()==c.toString()){this.expandFold(h);return}var w="...";if(!c.isMultiLine()){if(w=this.getTextRange(c),w.length<4)return;w=w.trim().substring(0,2)+".."}this.addFold(w,c)},this.getCommentFoldRange=function(f,a,c){var h=new p(this,f,a),m=h.getCurrentToken(),y=m&&m.type;if(m&&/^comment|string/.test(y)){y=y.match(/comment|string/)[0],y=="comment"&&(y+="|doc-start|\\.doc");var v=new RegExp(y),w=new u;if(c!=1){do m=h.stepBackward();while(m&&v.test(m.type));m=h.stepForward()}w.start.row=h.getCurrentTokenRow(),w.start.column=h.getCurrentTokenColumn()+m.value.length,h=new p(this,f,a);var k=this.getState(h.$row);if(c!=-1){var _=-1;do if(m=h.stepForward(),_==-1){var S=this.getState(h.$row);k.toString()!==S.toString()&&(_=h.$row)}else if(h.$row>_)break;while(m&&v.test(m.type));m=h.stepBackward()}else m=h.getCurrentToken();return w.end.row=h.getCurrentTokenRow(),w.end.column=h.getCurrentTokenColumn(),w}},this.foldAll=function(f,a,c,h){c==null&&(c=1e5);var m=this.foldWidgets;if(m){a=a||this.getLength(),f=f||0;for(var y=f;y<a;y++)if(m[y]==null&&(m[y]=this.getFoldWidget(y)),m[y]=="start"&&!(h&&!h(y))){var v=this.getFoldWidgetRange(y);v&&v.isMultiLine()&&v.end.row<=a&&v.start.row>=f&&(y=v.end.row,v.collapseChildren=c,this.addFold("...",v))}}},this.foldToLevel=function(f){for(this.foldAll();f-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var f=this;this.foldAll(null,null,null,function(a){for(var c=f.getTokens(a),h=0;h<c.length;h++){var m=c[h];if(!(m.type=="text"&&/^\s+$/.test(m.value)))return!!/comment/.test(m.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(f){if(!this.$foldStyles[f])throw new Error("invalid fold style: "+f+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=f){this.$foldStyle=f,f=="manual"&&this.unfold();var a=this.$foldMode;this.$setFolding(null),this.$setFolding(a)}},this.$setFolding=function(f){if(this.$foldMode!=f){if(this.$foldMode=f,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!f||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=f.getFoldWidget.bind(f,this,this.$foldStyle),this.getFoldWidgetRange=f.getFoldWidgetRange.bind(f,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(f,a){var c=this.foldWidgets;if(!c||a&&c[f])return{};for(var h=f-1,m;h>=0;){var y=c[h];if(y==null&&(y=c[h]=this.getFoldWidget(h)),y=="start"){var v=this.getFoldWidgetRange(h);if(m||(m=v),v&&v.end.row>=f)break}h--}return{range:h!==-1&&v,firstRange:m}},this.onFoldWidgetClick=function(f,a){a instanceof r&&(a=a.domEvent);var c={children:a.shiftKey,all:a.ctrlKey||a.metaKey,siblings:a.altKey},h=this.$toggleFoldWidget(f,c);if(!h){var m=a.target||a.srcElement;m&&/ace_fold-widget/.test(m.className)&&(m.className+=" ace_invalid")}},this.$toggleFoldWidget=function(f,a){if(this.getFoldWidget){var c=this.getFoldWidget(f),h=this.getLine(f),m=c==="end"?-1:1,y=this.getFoldAt(f,m===-1?0:h.length,m);if(y)return a.children||a.all?this.removeFold(y):this.expandFold(y),y;var v=this.getFoldWidgetRange(f,!0);if(v&&!v.isMultiLine()&&(y=this.getFoldAt(v.start.row,v.start.column,1),y&&v.isEqual(y.range)))return this.removeFold(y),y;if(a.siblings){var w=this.getParentFoldRangeData(f);if(w.range)var k=w.range.start.row+1,_=w.range.end.row;this.foldAll(k,_,a.all?1e4:0)}else a.children?(_=v?v.end.row:this.getLength(),this.foldAll(f+1,_,a.all?1e4:0)):v&&(a.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(f){var a=this.selection.getCursor().row;a=this.getRowFoldStart(a);var c=this.$toggleFoldWidget(a,{});if(!c){var h=this.getParentFoldRangeData(a,!0);if(c=h.range||h.firstRange,c){a=c.start.row;var m=this.getFoldAt(a,this.getLine(a).length,1);m?this.removeFold(m):this.addFold("...",c)}}},this.updateFoldWidgets=function(f){var a=f.start.row,c=f.end.row-a;if(c===0)this.foldWidgets[a]=null;else if(f.action=="remove")this.foldWidgets.splice(a,c+1,null);else{var h=Array(c+1);h.unshift(a,1),this.foldWidgets.splice.apply(this.foldWidgets,h)}},this.tokenizerUpdateFoldWidgets=function(f){var a=f.data;a.first!=a.last&&this.foldWidgets.length>a.first&&this.foldWidgets.splice(a.first,this.foldWidgets.length)}}var u=t("../range").Range,d=t("./fold_line").FoldLine,l=t("./fold").Fold,p=t("../token_iterator").TokenIterator,r=t("../mouse/mouse_event").MouseEvent;i.Folding=o}),(void 0)("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,i,s){function o(){this.findMatchingBracket=function(l,p){if(l.column==0)return null;var r=p||this.getLine(l.row).charAt(l.column-1);if(r=="")return null;var f=r.match(/([\(\[\{])|([\)\]\}])/);return f?f[1]?this.$findClosingBracket(f[1],l):this.$findOpeningBracket(f[2],l):null},this.getBracketRange=function(l){var p=this.getLine(l.row),r=!0,f,a=p.charAt(l.column-1),c=a&&a.match(/([\(\[\{])|([\)\]\}])/);if(c||(a=p.charAt(l.column),l={row:l.row,column:l.column+1},c=a&&a.match(/([\(\[\{])|([\)\]\}])/),r=!1),!c)return null;if(c[1]){var h=this.$findClosingBracket(c[1],l);if(!h)return null;f=d.fromPoints(l,h),r||(f.end.column++,f.start.column--),f.cursor=f.end}else{var h=this.$findOpeningBracket(c[2],l);if(!h)return null;f=d.fromPoints(h,l),r||(f.start.column++,f.end.column--),f.cursor=f.start}return f},this.getMatchingBracketRanges=function(l,p){var r=this.getLine(l.row),f=/([\(\[\{])|([\)\]\}])/,a=!p&&r.charAt(l.column-1),c=a&&a.match(f);if(c||(a=(p===void 0||p)&&r.charAt(l.column),l={row:l.row,column:l.column+1},c=a&&a.match(f)),!c)return null;var h=new d(l.row,l.column-1,l.row,l.column),m=c[1]?this.$findClosingBracket(c[1],l):this.$findOpeningBracket(c[2],l);if(!m)return[h];var y=new d(m.row,m.column,m.row,m.column+1);return[h,y]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,p,r){var f=this.$brackets[l],a=1,c=new u(this,p.row,p.column),h=c.getCurrentToken();if(h||(h=c.stepForward()),!!h){r||(r=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var m=p.column-c.getCurrentTokenColumn()-2,y=h.value;;){for(;m>=0;){var v=y.charAt(m);if(v==f){if(a-=1,a==0)return{row:c.getCurrentTokenRow(),column:m+c.getCurrentTokenColumn()}}else v==l&&(a+=1);m-=1}do h=c.stepBackward();while(h&&!r.test(h.type));if(h==null)break;y=h.value,m=y.length-1}return null}},this.$findClosingBracket=function(l,p,r){var f=this.$brackets[l],a=1,c=new u(this,p.row,p.column),h=c.getCurrentToken();if(h||(h=c.stepForward()),!!h){r||(r=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var m=p.column-c.getCurrentTokenColumn();;){for(var y=h.value,v=y.length;m<v;){var w=y.charAt(m);if(w==f){if(a-=1,a==0)return{row:c.getCurrentTokenRow(),column:m+c.getCurrentTokenColumn()}}else w==l&&(a+=1);m+=1}do h=c.stepForward();while(h&&!r.test(h.type));if(h==null)break;m=0}return null}},this.getMatchingTags=function(l){var p=new u(this,l.row,l.column),r=this.$findTagName(p);if(r){var f=p.stepBackward();return f.value==="<"?this.$findClosingTag(p,r):this.$findOpeningTag(p,r)}},this.$findTagName=function(l){var p=l.getCurrentToken(),r=!1,f=!1;if(p&&p.type.indexOf("tag-name")===-1)do f?p=l.stepBackward():p=l.stepForward(),p&&(p.value==="/>"?f=!0:p.type.indexOf("tag-name")!==-1&&(r=!0));while(p&&!r);return p},this.$findClosingTag=function(l,p){var r,f=p.value,a=p.value,c=0,h=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);p=l.stepForward();var m=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+p.value.length),y=!1;do{if(r=p,r.type.indexOf("tag-close")!==-1&&!y){var v=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);y=!0}if(p=l.stepForward(),p){if(p.value===">"&&!y){var v=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);y=!0}if(p.type.indexOf("tag-name")!==-1){if(f=p.value,a===f){if(r.value==="<")c++;else if(r.value==="</"&&(c--,c<0)){l.stepBackward();var w=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2);p=l.stepForward();var k=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=l.stepForward()),!p||p.value!==">")return;var _=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}}else if(a===f&&p.value==="/>"&&(c--,c<0))var w=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),k=w,_=k,v=new d(m.end.row,m.end.column,m.end.row,m.end.column+1)}}while(p&&c>=0);if(h&&v&&w&&_&&m&&k)return{openTag:new d(h.start.row,h.start.column,v.end.row,v.end.column),closeTag:new d(w.start.row,w.start.column,_.end.row,_.end.column),openTagName:m,closeTagName:k}},this.$findOpeningTag=function(l,p){var r=l.getCurrentToken(),f=p.value,a=0,c=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn(),m=h+2,y=new d(c,h,c,m);l.stepForward();var v=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=l.stepForward()),!(!p||p.value!==">")){var w=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(p=r,c=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn(),m=h+p.value.length,r=l.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(f===p.value)if(r.value==="<"){if(a++,a>0){var k=new d(c,h,c,m),_=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do p=l.stepForward();while(p&&p.value!==">");var S=new d(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else r.value==="</"&&a--}else if(p.value==="/>"){for(var x=0,L=r;L;){if(L.type.indexOf("tag-name")!==-1&&L.value===f){a--;break}if(L.value==="<")break;L=l.stepBackward(),x++}for(var I=0;I<x;I++)l.stepForward()}}while(r&&a<=0);if(_&&S&&y&&w&&k&&v)return{openTag:new d(_.start.row,_.start.column,S.end.row,S.end.column),closeTag:new d(y.start.row,y.start.column,w.end.row,w.end.column),openTagName:k,closeTagName:v}}}}var u=t("../token_iterator").TokenIterator,d=t("../range").Range;i.BracketMatch=o}),(void 0)("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,i,s){function o(C){return C<4352?!1:C>=4352&&C<=4447||C>=4515&&C<=4519||C>=4602&&C<=4607||C>=9001&&C<=9002||C>=11904&&C<=11929||C>=11931&&C<=12019||C>=12032&&C<=12245||C>=12272&&C<=12283||C>=12288&&C<=12350||C>=12353&&C<=12438||C>=12441&&C<=12543||C>=12549&&C<=12589||C>=12593&&C<=12686||C>=12688&&C<=12730||C>=12736&&C<=12771||C>=12784&&C<=12830||C>=12832&&C<=12871||C>=12880&&C<=13054||C>=13056&&C<=19903||C>=19968&&C<=42124||C>=42128&&C<=42182||C>=43360&&C<=43388||C>=44032&&C<=55203||C>=55216&&C<=55238||C>=55243&&C<=55291||C>=63744&&C<=64255||C>=65040&&C<=65049||C>=65072&&C<=65106||C>=65108&&C<=65126||C>=65128&&C<=65131||C>=65281&&C<=65376||C>=65504&&C<=65510}var u=t("./lib/oop"),d=t("./lib/lang"),l=t("./bidihandler").BidiHandler,p=t("./config"),r=t("./lib/event_emitter").EventEmitter,f=t("./selection").Selection,a=t("./mode/text").Mode,c=t("./range").Range,h=t("./line_widgets").LineWidgets,m=t("./document").Document,y=t("./background_tokenizer").BackgroundTokenizer,v=t("./search_highlight").SearchHighlight,w=t("./undomanager").UndoManager,k=function(){function C(A,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"+ ++C.$uid,this.$foldData.toString=function(){return this.join(`
|
|
330
|
+
`)},this.bgTokenizer=new y(new a().getTokenizer(),this);var R=this;this.bgTokenizer.on("update",function(N){R._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof A!="object"||!A.getLine)&&(A=new m(A)),this.setDocument(A),this.selection=new f(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new l(this),p.resetOptions(this),this.setMode(M),p._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return C.prototype.$initOperationListeners=function(){var A=this;this.curOp=null,this.on("change",function(){A.curOp||(A.startOperation(),A.curOp.selectionBefore=A.$lastSel),A.curOp.docChanged=!0},!0),this.on("changeSelection",function(){A.curOp||(A.startOperation(),A.curOp.selectionBefore=A.$lastSel),A.curOp.selectionChanged=!0},!0),this.$operationResetTimer=d.delayedCall(this.endOperation.bind(this,!0))},C.prototype.startOperation=function(A){if(this.curOp){if(!A||this.curOp.command)return;this.prevOp=this.curOp}A||(A={}),this.$operationResetTimer.schedule(),this.curOp={command:A.command||{},args:A.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",A)},C.prototype.endOperation=function(A){if(this.curOp){if(A&&A.returnValue===!1){this.curOp=null,this._signal("endOperation",A);return}if(A==1&&this.curOp.command&&this.curOp.command.name=="mouse")return;var M=this.selection.toJSON();this.curOp.selectionAfter=M,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(M),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",A)}},C.prototype.setDocument=function(A){this.doc&&this.doc.off("change",this.$onChange),this.doc=A,A.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},C.prototype.getDocument=function(){return this.doc},Object.defineProperty(C.prototype,"widgetManager",{get:function(){var A=new h(this);return this.widgetManager=A,this.$editor&&A.attach(this.$editor),A},set:function(A){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:A})},enumerable:!1,configurable:!0}),C.prototype.$resetRowCache=function(A){if(!A){this.$docRowCache=[],this.$screenRowCache=[];return}var M=this.$docRowCache.length,R=this.$getRowCacheIndex(this.$docRowCache,A)+1;M>R&&(this.$docRowCache.splice(R,M),this.$screenRowCache.splice(R,M))},C.prototype.$getRowCacheIndex=function(A,M){for(var R=0,N=A.length-1;R<=N;){var H=R+N>>1,z=A[H];if(M>z)R=H+1;else{if(!(M<z))return H;N=H-1}}return R-1},C.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},C.prototype.onChangeFold=function(A){var M=A.data;this.$resetRowCache(M.start.row)},C.prototype.onChange=function(A){this.$modified=!0,this.$bidiHandler.onChange(A),this.$resetRowCache(A.start.row);var M=this.$updateInternalDataOnChange(A);!this.$fromUndo&&this.$undoManager&&(M&&M.length&&(this.$undoManager.add({action:"removeFolds",folds:M},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(A,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(A),this._signal("change",A)},C.prototype.onSelectionChange=function(){this._signal("changeSelection")},C.prototype.setValue=function(A){this.doc.setValue(A),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},C.fromJSON=function(A){typeof A=="string"&&(A=JSON.parse(A));var M=new w;M.$undoStack=A.history.undo,M.$redoStack=A.history.redo,M.mark=A.history.mark,M.$rev=A.history.rev;var R=new C(A.value);return A.folds.forEach(function(N){R.addFold("...",c.fromPoints(N.start,N.end))}),R.setAnnotations(A.annotations),R.setBreakpoints(A.breakpoints),R.setMode(A.mode),R.setScrollLeft(A.scrollLeft),R.setScrollTop(A.scrollTop),R.setUndoManager(M),R.selection.fromJSON(A.selection),R},C.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(A){return A.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},C.prototype.toString=function(){return this.doc.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.getState=function(A){return this.bgTokenizer.getState(A)},C.prototype.getTokens=function(A){return this.bgTokenizer.getTokens(A)},C.prototype.getTokenAt=function(A,M){var R=this.bgTokenizer.getTokens(A),N,H=0;if(M==null){var z=R.length-1;H=this.getLine(A).length}else for(var z=0;z<R.length&&(H+=R[z].value.length,!(H>=M));z++);return N=R[z],N?(N.index=z,N.start=H-N.value.length,N):null},C.prototype.setUndoManager=function(A){if(this.$undoManager=A,this.$informUndoManager&&this.$informUndoManager.cancel(),A){var M=this;A.addSession(this),this.$syncInformUndoManager=function(){M.$informUndoManager.cancel(),M.mergeUndoDeltas=!1},this.$informUndoManager=d.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},C.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},C.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},C.prototype.getTabString=function(){return this.getUseSoftTabs()?d.stringRepeat(" ",this.getTabSize()):" "},C.prototype.setUseSoftTabs=function(A){this.setOption("useSoftTabs",A)},C.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},C.prototype.setTabSize=function(A){this.setOption("tabSize",A)},C.prototype.getTabSize=function(){return this.$tabSize},C.prototype.isTabStop=function(A){return this.$useSoftTabs&&A.column%this.$tabSize===0},C.prototype.setNavigateWithinSoftTabs=function(A){this.setOption("navigateWithinSoftTabs",A)},C.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},C.prototype.setOverwrite=function(A){this.setOption("overwrite",A)},C.prototype.getOverwrite=function(){return this.$overwrite},C.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},C.prototype.addGutterDecoration=function(A,M){this.$decorations[A]||(this.$decorations[A]=""),this.$decorations[A]+=" "+M,this._signal("changeBreakpoint",{})},C.prototype.removeGutterDecoration=function(A,M){this.$decorations[A]=(this.$decorations[A]||"").replace(" "+M,""),this._signal("changeBreakpoint",{})},C.prototype.getBreakpoints=function(){return this.$breakpoints},C.prototype.setBreakpoints=function(A){this.$breakpoints=[];for(var M=0;M<A.length;M++)this.$breakpoints[A[M]]="ace_breakpoint";this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},C.prototype.setBreakpoint=function(A,M){M===void 0&&(M="ace_breakpoint"),M?this.$breakpoints[A]=M:delete this.$breakpoints[A],this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoint=function(A){delete this.$breakpoints[A],this._signal("changeBreakpoint",{})},C.prototype.addMarker=function(A,M,R,N){var H=this.$markerId++,z={range:A,type:R||"line",renderer:typeof R=="function"?R:null,clazz:M,inFront:!!N,id:H};return N?(this.$frontMarkers[H]=z,this._signal("changeFrontMarker")):(this.$backMarkers[H]=z,this._signal("changeBackMarker")),H},C.prototype.addDynamicMarker=function(A,M){if(A.update){var R=this.$markerId++;return A.id=R,A.inFront=!!M,M?(this.$frontMarkers[R]=A,this._signal("changeFrontMarker")):(this.$backMarkers[R]=A,this._signal("changeBackMarker")),A}},C.prototype.removeMarker=function(A){var M=this.$frontMarkers[A]||this.$backMarkers[A];if(M){var R=M.inFront?this.$frontMarkers:this.$backMarkers;delete R[A],this._signal(M.inFront?"changeFrontMarker":"changeBackMarker")}},C.prototype.getMarkers=function(A){return A?this.$frontMarkers:this.$backMarkers},C.prototype.highlight=function(A){if(!this.$searchHighlight){var M=new v(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(M)}this.$searchHighlight.setRegexp(A)},C.prototype.highlightLines=function(A,M,R,N){typeof M!="number"&&(R=M,M=A),R||(R="ace_step");var H=new c(A,0,M,1/0);return H.id=this.addMarker(H,R,"fullLine",N),H},C.prototype.setAnnotations=function(A){this.$annotations=A,this._signal("changeAnnotation",{})},C.prototype.getAnnotations=function(){return this.$annotations||[]},C.prototype.clearAnnotations=function(){this.setAnnotations([])},C.prototype.$detectNewLine=function(A){var M=A.match(/^.*?(\r?\n)/m);M?this.$autoNewLine=M[1]:this.$autoNewLine=`
|
|
331
|
+
`},C.prototype.getWordRange=function(A,M){var R=this.getLine(A),N=!1;if(M>0&&(N=!!R.charAt(M-1).match(this.tokenRe)),N||(N=!!R.charAt(M).match(this.tokenRe)),N)var H=this.tokenRe;else if(/^\s+$/.test(R.slice(M-1,M+1)))var H=/\s/;else var H=this.nonTokenRe;var z=M;if(z>0){do z--;while(z>=0&&R.charAt(z).match(H));z++}for(var Y=M;Y<R.length&&R.charAt(Y).match(H);)Y++;return new c(A,z,A,Y)},C.prototype.getAWordRange=function(A,M){for(var R=this.getWordRange(A,M),N=this.getLine(R.end.row);N.charAt(R.end.column).match(/[ \t]/);)R.end.column+=1;return R},C.prototype.setNewLineMode=function(A){this.doc.setNewLineMode(A)},C.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},C.prototype.setUseWorker=function(A){this.setOption("useWorker",A)},C.prototype.getUseWorker=function(){return this.$useWorker},C.prototype.onReloadTokenizer=function(A){var M=A.data;this.bgTokenizer.start(M.first),this._signal("tokenizerUpdate",A)},C.prototype.setMode=function(A,M){if(A&&typeof A=="object"){if(A.getTokenizer)return this.$onChangeMode(A);var R=A,N=R.path}else N=A||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!R){this.$onChangeMode(this.$modes[N]),M&&M();return}this.$modeId=N,p.loadModule(["mode",N],(function(H){if(!this.destroyed){if(this.$modeId!==N)return M&&M();this.$modes[N]&&!R?this.$onChangeMode(this.$modes[N]):H&&H.Mode&&(H=new H.Mode(R),R||(this.$modes[N]=H,H.$id=N),this.$onChangeMode(H)),M&&M()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},C.prototype.$onChangeMode=function(A,M){if(M||(this.$modeId=A.$id),this.$mode!==A){var R=this.$mode;this.$mode=A,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=A.getTokenizer();if(N.on!==void 0){var H=this.onReloadTokenizer.bind(this);N.on("update",H)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=A.tokenRe,this.nonTokenRe=A.nonTokenRe,M||(A.attachToSession&&A.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(A.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:R,mode:A}))}},C.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},C.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(A){p.warn("Could not load worker",A),this.$worker=null}},C.prototype.getMode=function(){return this.$mode},C.prototype.setScrollTop=function(A){this.$scrollTop===A||isNaN(A)||(this.$scrollTop=A,this._signal("changeScrollTop",A))},C.prototype.getScrollTop=function(){return this.$scrollTop},C.prototype.setScrollLeft=function(A){this.$scrollLeft===A||isNaN(A)||(this.$scrollLeft=A,this._signal("changeScrollLeft",A))},C.prototype.getScrollLeft=function(){return this.$scrollLeft},C.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},C.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var A=0;return this.lineWidgets.forEach(function(M){M&&M.screenWidth>A&&(A=M.screenWidth)}),this.lineWidgetWidth=A},C.prototype.$computeWidth=function(A){if(this.$modified||A){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var M=this.doc.getAllLines(),R=this.$rowLengthCache,N=0,H=0,z=this.$foldData[H],Y=z?z.start.row:1/0,K=M.length,re=0;re<K;re++){if(re>Y){if(re=z.end.row+1,re>=K)break;z=this.$foldData[H++],Y=z?z.start.row:1/0}R[re]==null&&(R[re]=this.$getStringScreenWidth(M[re])[0]),R[re]>N&&(N=R[re])}this.screenWidth=N}},C.prototype.getLine=function(A){return this.doc.getLine(A)},C.prototype.getLines=function(A,M){return this.doc.getLines(A,M)},C.prototype.getLength=function(){return this.doc.getLength()},C.prototype.getTextRange=function(A){return this.doc.getTextRange(A||this.selection.getRange())},C.prototype.insert=function(A,M){return this.doc.insert(A,M)},C.prototype.remove=function(A){return this.doc.remove(A)},C.prototype.removeFullLines=function(A,M){return this.doc.removeFullLines(A,M)},C.prototype.undoChanges=function(A,M){if(A.length){this.$fromUndo=!0;for(var R=A.length-1;R!=-1;R--){var N=A[R];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!M&&this.$undoSelect&&(A.selectionBefore?this.selection.fromJSON(A.selectionBefore):this.selection.setRange(this.$getUndoSelection(A,!0))),this.$fromUndo=!1}},C.prototype.redoChanges=function(A,M){if(A.length){this.$fromUndo=!0;for(var R=0;R<A.length;R++){var N=A[R];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!M&&this.$undoSelect&&(A.selectionAfter?this.selection.fromJSON(A.selectionAfter):this.selection.setRange(this.$getUndoSelection(A,!1))),this.$fromUndo=!1}},C.prototype.setUndoSelect=function(A){this.$undoSelect=A},C.prototype.$getUndoSelection=function(A,M){function R(K){return M?K.action!=="insert":K.action==="insert"}for(var N,H,z=0;z<A.length;z++){var Y=A[z];if(Y.start){if(!N){R(Y)?N=c.fromPoints(Y.start,Y.end):N=c.fromPoints(Y.start,Y.start);continue}R(Y)?(H=Y.start,N.compare(H.row,H.column)==-1&&N.setStart(H),H=Y.end,N.compare(H.row,H.column)==1&&N.setEnd(H)):(H=Y.start,N.compare(H.row,H.column)==-1&&(N=c.fromPoints(Y.start,Y.start)))}}return N},C.prototype.replace=function(A,M){return this.doc.replace(A,M)},C.prototype.moveText=function(A,M,R){var N=this.getTextRange(A),H=this.getFoldsInRange(A),z=c.fromPoints(M,M);if(!R){this.remove(A);var Y=A.start.row-A.end.row,K=Y?-A.end.column:A.start.column-A.end.column;K&&(z.start.row==A.end.row&&z.start.column>A.end.column&&(z.start.column+=K),z.end.row==A.end.row&&z.end.column>A.end.column&&(z.end.column+=K)),Y&&z.start.row>=A.end.row&&(z.start.row+=Y,z.end.row+=Y)}if(z.end=this.insert(z.start,N),H.length){var re=A.start,fe=z.start,Y=fe.row-re.row,K=fe.column-re.column;this.addFolds(H.map(function(ie){return ie=ie.clone(),ie.start.row==re.row&&(ie.start.column+=K),ie.end.row==re.row&&(ie.end.column+=K),ie.start.row+=Y,ie.end.row+=Y,ie}))}return z},C.prototype.indentRows=function(A,M,R){R=R.replace(/\t/g,this.getTabString());for(var N=A;N<=M;N++)this.doc.insertInLine({row:N,column:0},R)},C.prototype.outdentRows=function(A){for(var M=A.collapseRows(),R=new c(0,0,0,0),N=this.getTabSize(),H=M.start.row;H<=M.end.row;++H){var z=this.getLine(H);R.start.row=H,R.end.row=H;for(var Y=0;Y<N&&z.charAt(Y)==" ";++Y);Y<N&&z.charAt(Y)==" "?(R.start.column=Y,R.end.column=Y+1):(R.start.column=0,R.end.column=Y),this.remove(R)}},C.prototype.$moveLines=function(A,M,R){if(A=this.getRowFoldStart(A),M=this.getRowFoldEnd(M),R<0){var N=this.getRowFoldStart(A+R);if(N<0)return 0;var H=N-A}else if(R>0){var N=this.getRowFoldEnd(M+R);if(N>this.doc.getLength()-1)return 0;var H=N-M}else{A=this.$clipRowToDocument(A),M=this.$clipRowToDocument(M);var H=M-A+1}var z=new c(A,0,M,Number.MAX_VALUE),Y=this.getFoldsInRange(z).map(function(re){return re=re.clone(),re.start.row+=H,re.end.row+=H,re}),K=R==0?this.doc.getLines(A,M):this.doc.removeFullLines(A,M);return this.doc.insertFullLines(A+H,K),Y.length&&this.addFolds(Y),H},C.prototype.moveLinesUp=function(A,M){return this.$moveLines(A,M,-1)},C.prototype.moveLinesDown=function(A,M){return this.$moveLines(A,M,1)},C.prototype.duplicateLines=function(A,M){return this.$moveLines(A,M,0)},C.prototype.$clipRowToDocument=function(A){return Math.max(0,Math.min(A,this.doc.getLength()-1))},C.prototype.$clipColumnToRow=function(A,M){return M<0?0:Math.min(this.doc.getLine(A).length,M)},C.prototype.$clipPositionToDocument=function(A,M){if(M=Math.max(0,M),A<0)A=0,M=0;else{var R=this.doc.getLength();A>=R?(A=R-1,M=this.doc.getLine(R-1).length):M=Math.min(this.doc.getLine(A).length,M)}return{row:A,column:M}},C.prototype.$clipRangeToDocument=function(A){A.start.row<0?(A.start.row=0,A.start.column=0):A.start.column=this.$clipColumnToRow(A.start.row,A.start.column);var M=this.doc.getLength()-1;return A.end.row>M?(A.end.row=M,A.end.column=this.doc.getLine(M).length):A.end.column=this.$clipColumnToRow(A.end.row,A.end.column),A},C.prototype.setUseWrapMode=function(A){if(A!=this.$useWrapMode){if(this.$useWrapMode=A,this.$modified=!0,this.$resetRowCache(0),A){var M=this.getLength();this.$wrapData=Array(M),this.$updateWrapData(0,M-1)}this._signal("changeWrapMode")}},C.prototype.getUseWrapMode=function(){return this.$useWrapMode},C.prototype.setWrapLimitRange=function(A,M){(this.$wrapLimitRange.min!==A||this.$wrapLimitRange.max!==M)&&(this.$wrapLimitRange={min:A,max:M},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},C.prototype.adjustWrapLimit=function(A,M){var R=this.$wrapLimitRange;R.max<0&&(R={min:M,max:M});var N=this.$constrainWrapLimit(A,R.min,R.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},C.prototype.$constrainWrapLimit=function(A,M,R){return M&&(A=Math.max(M,A)),R&&(A=Math.min(R,A)),A},C.prototype.getWrapLimit=function(){return this.$wrapLimit},C.prototype.setWrapLimit=function(A){this.setWrapLimitRange(A,A)},C.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},C.prototype.$updateInternalDataOnChange=function(A){var M=this.$useWrapMode,R=A.action,N=A.start,H=A.end,z=N.row,Y=H.row,K=Y-z,re=null;if(this.$updating=!0,K!=0)if(R==="remove"){this[M?"$wrapData":"$rowLengthCache"].splice(z,K);var fe=this.$foldData;re=this.getFoldsInRange(A),this.removeFolds(re);var U=this.getFoldLine(H.row),Q=0;if(U){U.addRemoveChars(H.row,H.column,N.column-H.column),U.shiftRow(-K);var ie=this.getFoldLine(z);ie&&ie!==U&&(ie.merge(U),U=ie),Q=fe.indexOf(U)+1}for(Q;Q<fe.length;Q++){var U=fe[Q];U.start.row>=H.row&&U.shiftRow(-K)}Y=z}else{var V=Array(K);V.unshift(z,0);var te=M?this.$wrapData:this.$rowLengthCache;te.splice.apply(te,V);var fe=this.$foldData,U=this.getFoldLine(z),Q=0;if(U){var ae=U.range.compareInside(N.row,N.column);ae==0?(U=U.split(N.row,N.column),U&&(U.shiftRow(K),U.addRemoveChars(Y,0,H.column-N.column))):ae==-1&&(U.addRemoveChars(z,0,H.column-N.column),U.shiftRow(K)),Q=fe.indexOf(U)+1}for(Q;Q<fe.length;Q++){var U=fe[Q];U.start.row>=z&&U.shiftRow(K)}}else{K=Math.abs(A.start.column-A.end.column),R==="remove"&&(re=this.getFoldsInRange(A),this.removeFolds(re),K=-K);var U=this.getFoldLine(z);U&&U.addRemoveChars(z,N.column,K)}return M&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,M?this.$updateWrapData(z,Y):this.$updateRowLengthCache(z,Y),re},C.prototype.$updateRowLengthCache=function(A,M){this.$rowLengthCache[A]=null,this.$rowLengthCache[M]=null},C.prototype.$updateWrapData=function(A,M){var R=this.doc.getAllLines(),N=this.getTabSize(),H=this.$wrapData,z=this.$wrapLimit,Y,K,re=A;for(M=Math.min(M,R.length-1);re<=M;)K=this.getFoldLine(re,K),K?(Y=[],K.walk((function(fe,U,Q,ie){var V;if(fe!=null){V=this.$getDisplayTokens(fe,Y.length),V[0]=x;for(var te=1;te<V.length;te++)V[te]=L}else V=this.$getDisplayTokens(R[U].substring(ie,Q),Y.length);Y=Y.concat(V)}).bind(this),K.end.row,R[K.end.row].length+1),H[K.start.row]=this.$computeWrapSplits(Y,z,N),re=K.end.row+1):(Y=this.$getDisplayTokens(R[re]),H[re]=this.$computeWrapSplits(Y,z,N),re++)},C.prototype.$computeWrapSplits=function(A,M,R){function N(){var ae=0;if(Q===0)return ae;if(U)for(var ge=0;ge<A.length;ge++){var ue=A[ge];if(ue==$)ae+=1;else{if(ue!=T){if(ue==O)continue;break}ae+=R}}return fe&&U!==!1&&(ae+=R),Math.min(ae,Q)}function H(ae){for(var ge=ae-K,ue=K;ue<ae;ue++){var G=A[ue];(G===12||G===2)&&(ge-=1)}z.length||(ie=N(),z.indent=ie),re+=ge,z.push(re),K=ae}if(A.length==0)return[];for(var z=[],Y=A.length,K=0,re=0,fe=this.$wrapAsCode,U=this.$indentedSoftWrap,Q=M<=Math.max(2*R,8)||U===!1?0:Math.floor(M/2),ie=0;Y-K>M-ie;){var V=K+M-ie;if(A[V-1]>=$&&A[V]>=$){H(V);continue}if(A[V]==x||A[V]==L){for(V;V!=K-1&&A[V]!=x;V--);if(V>K){H(V);continue}for(V=K+M,V;V<A.length&&A[V]==L;V++);if(V==A.length)break;H(V);continue}for(var te=Math.max(V-(M-(M>>2)),K-1);V>te&&A[V]<x;)V--;if(fe){for(;V>te&&A[V]<x;)V--;for(;V>te&&A[V]==I;)V--}else for(;V>te&&A[V]<$;)V--;if(V>te){H(++V);continue}V=K+M,A[V]==S&&V--,H(V-ie)}return z},C.prototype.$getDisplayTokens=function(A,M){var R=[],N;M=M||0;for(var H=0;H<A.length;H++){var z=A.charCodeAt(H);if(z==9){N=this.getScreenTabSize(R.length+M),R.push(T);for(var Y=1;Y<N;Y++)R.push(O)}else z==32?R.push($):z>39&&z<48||z>57&&z<64?R.push(I):z>=4352&&o(z)?R.push(_,S):R.push(_)}return R},C.prototype.$getStringScreenWidth=function(A,M,R){if(M==0)return[0,0];M==null&&(M=1/0),R=R||0;var N,H;for(H=0;H<A.length&&(N=A.charCodeAt(H),N==9?R+=this.getScreenTabSize(R):N>=4352&&o(N)?R+=2:R+=1,!(R>M));H++);return[R,H]},C.prototype.getRowLength=function(A){var M=1;return this.lineWidgets&&(M+=this.lineWidgets[A]&&this.lineWidgets[A].rowCount||0),!this.$useWrapMode||!this.$wrapData[A]?M:this.$wrapData[A].length+M},C.prototype.getRowLineCount=function(A){return!this.$useWrapMode||!this.$wrapData[A]?1:this.$wrapData[A].length+1},C.prototype.getRowWrapIndent=function(A){if(this.$useWrapMode){var M=this.screenToDocumentPosition(A,Number.MAX_VALUE),R=this.$wrapData[M.row];return R.length&&R[0]<M.column?R.indent:0}return 0},C.prototype.getScreenLastRowColumn=function(A){var M=this.screenToDocumentPosition(A,Number.MAX_VALUE);return this.documentToScreenColumn(M.row,M.column)},C.prototype.getDocumentLastRowColumn=function(A,M){var R=this.documentToScreenRow(A,M);return this.getScreenLastRowColumn(R)},C.prototype.getDocumentLastRowColumnPosition=function(A,M){var R=this.documentToScreenRow(A,M);return this.screenToDocumentPosition(R,Number.MAX_VALUE/10)},C.prototype.getRowSplitData=function(A){return this.$useWrapMode?this.$wrapData[A]:void 0},C.prototype.getScreenTabSize=function(A){return this.$tabSize-(A%this.$tabSize|0)},C.prototype.screenToDocumentRow=function(A,M){return this.screenToDocumentPosition(A,M).row},C.prototype.screenToDocumentColumn=function(A,M){return this.screenToDocumentPosition(A,M).column},C.prototype.screenToDocumentPosition=function(A,M,R){if(A<0)return{row:0,column:0};var N,Q=0,H=0,z,U=0,Y=0,K=this.$screenRowCache,re=this.$getRowCacheIndex(K,A),fe=K.length;if(fe&&re>=0)var U=K[re],Q=this.$docRowCache[re],ie=A>K[fe-1];else var ie=!fe;for(var V=this.getLength()-1,te=this.getNextFoldLine(Q),ae=te?te.start.row:1/0;U<=A&&(Y=this.getRowLength(Q),!(U+Y>A||Q>=V));)U+=Y,Q++,Q>ae&&(Q=te.end.row+1,te=this.getNextFoldLine(Q,te),ae=te?te.start.row:1/0),ie&&(this.$docRowCache.push(Q),this.$screenRowCache.push(U));if(te&&te.start.row<=Q)N=this.getFoldDisplayLine(te),Q=te.start.row;else{if(U+Y<=A||Q>V)return{row:V,column:this.getLine(V).length};N=this.getLine(Q),te=null}var ge=0,ue=Math.floor(A-U);if(this.$useWrapMode){var G=this.$wrapData[Q];G&&(z=G[ue],ue>0&&G.length&&(ge=G.indent,H=G[ue-1]||G[G.length-1],N=N.substring(H)))}return R!==void 0&&this.$bidiHandler.isBidiRow(U+ue,Q,ue)&&(M=this.$bidiHandler.offsetToCol(R)),H+=this.$getStringScreenWidth(N,M-ge)[1],this.$useWrapMode&&H>=z&&(H=z-1),te?te.idxToPosition(H):{row:Q,column:H}},C.prototype.documentToScreenPosition=function(A,M){if(typeof M>"u")var R=this.$clipPositionToDocument(A.row,A.column);else R=this.$clipPositionToDocument(A,M);A=R.row,M=R.column;var U=0,N=null,H=null;H=this.getFoldAt(A,M,1),H&&(A=H.start.row,M=H.start.column);var z,fe=0,Y=this.$docRowCache,K=this.$getRowCacheIndex(Y,A),re=Y.length;if(re&&K>=0)var fe=Y[K],U=this.$screenRowCache[K],Q=A>Y[re-1];else var Q=!re;for(var ie=this.getNextFoldLine(fe),V=ie?ie.start.row:1/0;fe<A;){if(fe>=V){if(z=ie.end.row+1,z>A)break;ie=this.getNextFoldLine(z,ie),V=ie?ie.start.row:1/0}else z=fe+1;U+=this.getRowLength(fe),fe=z,Q&&(this.$docRowCache.push(fe),this.$screenRowCache.push(U))}var te="";ie&&fe>=V?(te=this.getFoldDisplayLine(ie,A,M),N=ie.start.row):(te=this.getLine(A).substring(0,M),N=A);var ae=0;if(this.$useWrapMode){var ge=this.$wrapData[N];if(ge){for(var ue=0;te.length>=ge[ue];)U++,ue++;te=te.substring(ge[ue-1]||0,te.length),ae=ue>0?ge.indent:0}}return this.lineWidgets&&this.lineWidgets[fe]&&this.lineWidgets[fe].rowsAbove&&(U+=this.lineWidgets[fe].rowsAbove),{row:U,column:ae+this.$getStringScreenWidth(te)[0]}},C.prototype.documentToScreenColumn=function(A,M){return this.documentToScreenPosition(A,M).column},C.prototype.documentToScreenRow=function(A,M){return this.documentToScreenPosition(A,M).row},C.prototype.getScreenLength=function(){var A=0,M=null;if(this.$useWrapMode)for(var H=this.$wrapData.length,z=0,N=0,M=this.$foldData[N++],Y=M?M.start.row:1/0;z<H;){var K=this.$wrapData[z];A+=K?K.length+1:1,z++,z>Y&&(z=M.end.row+1,M=this.$foldData[N++],Y=M?M.start.row:1/0)}else{A=this.getLength();for(var R=this.$foldData,N=0;N<R.length;N++)M=R[N],A-=M.end.row-M.start.row}return this.lineWidgets&&(A+=this.$getWidgetScreenLength()),A},C.prototype.$setFontMetrics=function(A){this.$enableVarChar&&(this.$getStringScreenWidth=function(M,R,N){if(R===0)return[0,0];R||(R=1/0),N=N||0;var H,z;for(z=0;z<M.length&&(H=M.charAt(z),H===" "?N+=this.getScreenTabSize(N):N+=A.getCharacterWidth(H),!(N>R));z++);return[N,z]})},C.prototype.getPrecedingCharacter=function(){var A=this.selection.getCursor();if(A.column===0)return A.row===0?"":this.doc.getNewLineCharacter();var M=this.getLine(A.row);return M[A.column-1]},C.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()},C}();k.$uid=0,k.prototype.$modes=p.$modes,k.prototype.getValue=k.prototype.toString,k.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},k.prototype.$overwrite=!1,k.prototype.$mode=null,k.prototype.$modeId=null,k.prototype.$scrollTop=0,k.prototype.$scrollLeft=0,k.prototype.$wrapLimit=80,k.prototype.$useWrapMode=!1,k.prototype.$wrapLimitRange={min:null,max:null},k.prototype.lineWidgets=null,k.prototype.isFullWidth=o,u.implement(k.prototype,r);var _=1,S=2,x=3,L=4,I=9,$=10,T=11,O=12;t("./edit_session/folding").Folding.call(k.prototype),t("./edit_session/bracket_match").BracketMatch.call(k.prototype),p.defineOptions(k.prototype,"session",{wrap:{set:function(C){if(!C||C=="off"?C=!1:C=="free"?C=!0:C=="printMargin"?C=-1:typeof C=="string"&&(C=parseInt(C,10)||!1),this.$wrap!=C)if(this.$wrap=C,!C)this.setUseWrapMode(!1);else{var A=typeof C=="number"?C:null;this.setWrapLimitRange(A,A),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(C){C=C=="auto"?this.$mode.type!="text":C!="text",C!=this.$wrapAsCode&&(this.$wrapAsCode=C,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(C){this.$useWorker=C,this.$stopWorker(),C&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(C){C=parseInt(C),C>0&&this.$tabSize!==C&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=C,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(C){this.setFoldStyle(C)},handlesSet:!0},overwrite:{set:function(C){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(C){this.doc.setNewLineMode(C)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(C){this.setMode(C)},get:function(){return this.$modeId},handlesSet:!0}}),i.EditSession=k}),(void 0)("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,i,s){function o(r,f){function a(v,w){w===void 0&&(w=!0);var k=c&&f.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(v)||f.regExp?c&&f.$supportsUnicodeFlag?w?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var c=u.supportsLookbehind(),h=Array.from(r),m=h[0],y=h[h.length-1];return a(m)+r+a(y,!1)}var u=t("./lib/lang"),d=t("./lib/oop"),l=t("./range").Range,p=function(){function r(){this.$options={}}return r.prototype.set=function(f){return d.mixin(this.$options,f),this},r.prototype.getOptions=function(){return u.copyObject(this.$options)},r.prototype.setOptions=function(f){this.$options=f},r.prototype.find=function(f){var a=this.$options,c=this.$matchIterator(f,a);if(!c)return!1;var h=null;return c.forEach(function(m,y,v,w){return h=new l(m,y,v,w),y==w&&a.start&&a.start.start&&a.skipCurrent!=0&&h.isEqual(a.start)?(h=null,!1):!0}),h},r.prototype.findAll=function(f){var a=this.$options;if(!a.needle)return[];this.$assembleRegExp(a);var c=a.range,h=c?f.getLines(c.start.row,c.end.row):f.doc.getAllLines(),m=[],y=a.re;if(a.$isMultiLine){var v=y.length,w=h.length-v,k;e:for(var _=y.offset||0;_<=w;_++){for(var S=0;S<v;S++)if(h[_+S].search(y[S])==-1)continue e;var x=h[_],L=h[_+v-1],I=x.length-x.match(y[0])[0].length,$=L.match(y[v-1])[0].length;k&&k.end.row===_&&k.end.column>I||(m.push(k=new l(_,I,_+v-1,$)),v>2&&(_=_+v-2))}}else for(var T=0;T<h.length;T++)for(var O=u.getMatchOffsets(h[T],y),S=0;S<O.length;S++){var C=O[S];m.push(new l(T,C.offset,T,C.offset+C.length))}if(c){for(var A=c.start.column,M=c.end.column,T=0,S=m.length-1;T<S&&m[T].start.column<A&&m[T].start.row==0;)T++;for(var R=c.end.row-c.start.row;T<S&&m[S].end.column>M&&m[S].end.row==R;)S--;for(m=m.slice(T,S+1),T=0,S=m.length;T<S;T++)m[T].start.row+=c.start.row,m[T].end.row+=c.start.row}return m},r.prototype.replace=function(f,a){var c=this.$options,h=this.$assembleRegExp(c);if(c.$isMultiLine)return a;if(h){var m=h.exec(f);if(!m||m[0].length!=f.length)return null;if(c.regExp||(a=a.replace(/\$/g,"$$$$")),a=f.replace(h,a),c.preserveCase){a=a.split("");for(var y=Math.min(f.length,f.length);y--;){var v=f[y];v&&v.toLowerCase()!=v?a[y]=a[y].toUpperCase():a[y]=a[y].toLowerCase()}a=a.join("")}return a}},r.prototype.$assembleRegExp=function(f,a){if(f.needle instanceof RegExp)return f.re=f.needle;var c=f.needle;if(!f.needle)return f.re=!1;f.regExp||(c=u.escapeRegExp(c));var h=f.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),f.$supportsUnicodeFlag=!0,h+="u"}catch{f.$supportsUnicodeFlag=!1}if(f.wholeWord&&(c=o(c,f)),f.$isMultiLine=!a&&/[\n\r]/.test(c),f.$isMultiLine)return f.re=this.$assembleMultilineRegExp(c,h);try{var m=new RegExp(c,h)}catch{m=!1}return f.re=m},r.prototype.$assembleMultilineRegExp=function(f,a){for(var c=f.replace(/\r\n|\r|\n/g,`$
|
|
332
|
+
^`).split(`
|
|
333
|
+
`),h=[],m=0;m<c.length;m++)try{h.push(new RegExp(c[m],a))}catch{return!1}return h},r.prototype.$matchIterator=function(f,a){var c=this.$assembleRegExp(a);if(!c)return!1;var h=a.backwards==1,m=a.skipCurrent!=0,y=c.unicode,v=a.range,w=a.start;w||(w=v?v[h?"end":"start"]:f.selection.getRange()),w.start&&(w=w[m!=h?"end":"start"]);var k=v?v.start.row:0,_=v?v.end.row:f.getLength()-1;if(h)var S=function(I){var $=w.row;if(!L($,w.column,I)){for($--;$>=k;$--)if(L($,Number.MAX_VALUE,I))return;if(a.wrap!=0){for($=_,k=w.row;$>=k;$--)if(L($,Number.MAX_VALUE,I))return}}};else var S=function(I){var $=w.row;if(!L($,w.column,I)){for($+=1;$<=_;$++)if(L($,0,I))return;if(a.wrap!=0){for($=k,_=w.row;$<=_;$++)if(L($,0,I))return}}};if(a.$isMultiLine)var x=c.length,L=function(I,$,T){var O=h?I-x+1:I;if(!(O<0||O+x>f.getLength())){var C=f.getLine(O),A=C.search(c[0]);if(!(!h&&A<$||A===-1)){for(var M=1;M<x;M++)if(C=f.getLine(O+M),C.search(c[M])==-1)return;var R=C.match(c[x-1])[0].length;if(!(h&&R>$)&&T(O,A,O+x-1,R))return!0}}};else if(h)var L=function(I,$,T){var O=f.getLine(I),C=[],A,M=0;for(c.lastIndex=0;A=c.exec(O);){var R=A[0].length;if(M=A.index,!R){if(M>=O.length)break;c.lastIndex=M+=u.skipEmptyMatch(O,M,y)}if(A.index+R>$)break;C.push(A.index,R)}for(var N=C.length-1;N>=0;N-=2){var H=C[N-1],R=C[N];if(T(I,H,I,H+R))return!0}};else var L=function(I,$,T){var O=f.getLine(I),C,A;for(c.lastIndex=$;A=c.exec(O);){var M=A[0].length;if(C=A.index,T(I,C,I,C+M))return!0;if(!M&&(c.lastIndex=C+=u.skipEmptyMatch(O,C,y),C>=O.length))return!1}};return{forEach:S}},r}();i.Search=p}),(void 0)("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,i,s){function o(a){return typeof a=="object"&&a.bindKey&&a.bindKey.position||(a.isDefault?-100:0)}var u=this&&this.__extends||function(){var a=function(c,h){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var v in y)Object.prototype.hasOwnProperty.call(y,v)&&(m[v]=y[v])},a(c,h)};return function(c,h){function m(){this.constructor=c}if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");a(c,h),c.prototype=h===null?Object.create(h):(m.prototype=h.prototype,new m)}}(),d=t("../lib/keys"),l=t("../lib/useragent"),p=d.KEY_MODS,r=function(){function a(c,h){this.$init(c,h,!1)}return a.prototype.$init=function(c,h,m){this.platform=h||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=m},a.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},a.prototype.removeCommand=function(c,h){var m=c&&(typeof c=="string"?c:c.name);c=this.commands[m],h||delete this.commands[m];var y=this.commandKeyBinding;for(var v in y){var w=y[v];if(w==c)delete y[v];else if(Array.isArray(w)){var k=w.indexOf(c);k!=-1&&(w.splice(k,1),w.length==1&&(y[v]=w[0]))}}},a.prototype.bindKey=function(c,h,m){if(typeof c=="object"&&c&&(m==null&&(m=c.position),c=c[this.platform]),!!c){if(typeof h=="function")return this.addCommand({exec:h,bindKey:c,name:h.name||c});c.split("|").forEach(function(y){var v="";if(y.indexOf(" ")!=-1){var w=y.split(/\s+/);y=w.pop(),w.forEach(function(S){var x=this.parseKeys(S),L=p[x.hashId]+x.key;v+=(v?" ":"")+L,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var k=this.parseKeys(y),_=p[k.hashId]+k.key;this._addCommandToBinding(v+_,h,m)},this)}},a.prototype._addCommandToBinding=function(c,h,m){var y=this.commandKeyBinding,v;if(!h)delete y[c];else if(!y[c]||this.$singleCommand)y[c]=h;else{Array.isArray(y[c])?(v=y[c].indexOf(h))!=-1&&y[c].splice(v,1):y[c]=[y[c]],typeof m!="number"&&(m=o(h));var w=y[c];for(v=0;v<w.length;v++){var k=w[v],_=o(k);if(_>m)break}w.splice(v,0,h)}},a.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(h){var m=c[h];if(m){if(typeof m=="string")return this.bindKey(m,h);typeof m=="function"&&(m={exec:m}),typeof m=="object"&&(m.name||(m.name=h),this.addCommand(m))}},this)},a.prototype.removeCommands=function(c){Object.keys(c).forEach(function(h){this.removeCommand(c[h])},this)},a.prototype.bindKeys=function(c){Object.keys(c).forEach(function(h){this.bindKey(h,c[h])},this)},a.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},a.prototype.parseKeys=function(c){var h=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(_){return _}),m=h.pop(),y=d[m];if(d.FUNCTION_KEYS[y])m=d.FUNCTION_KEYS[y].toLowerCase();else{if(!h.length)return{key:m,hashId:-1};if(h.length==1&&h[0]=="shift")return{key:m.toUpperCase(),hashId:-1}}for(var v=0,w=h.length;w--;){var k=d.KEY_MODS[h[w]];if(k==null)return typeof console<"u"&&console.error("invalid modifier "+h[w]+" in "+c),!1;v|=k}return{key:m,hashId:v}},a.prototype.findKeyCommand=function(c,h){var m=p[c]+h;return this.commandKeyBinding[m]},a.prototype.handleKeyboard=function(c,h,m,y){if(!(y<0)){var v=p[h]+m,w=this.commandKeyBinding[v];return c.$keyChain&&(c.$keyChain+=" "+v,w=this.commandKeyBinding[c.$keyChain]||w),w&&(w=="chainKeys"||w[w.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||v,{command:"null"}):(c.$keyChain&&(h&&h!=4||m.length!=1?(h==-1||y>0)&&(c.$keyChain=""):c.$keyChain=c.$keyChain.slice(0,-v.length-1)),{command:w})}},a.prototype.getStatusText=function(c,h){return h.$keyChain||""},a}(),f=function(a){function c(h,m){var y=a.call(this,h,m)||this;return y.$singleCommand=!0,y}return u(c,a),c}(r);f.call=function(a,c,h){r.prototype.$init.call(a,c,h,!0)},r.call=function(a,c,h){r.prototype.$init.call(a,c,h,!1)},i.HashHandler=f,i.MultiHashHandler=r}),(void 0)("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,i,s){var o=this&&this.__extends||function(){var r=function(f,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(c[m]=h[m])},r(f,a)};return function(f,a){function c(){this.constructor=f}if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");r(f,a),f.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}}(),u=t("../lib/oop"),d=t("../keyboard/hash_handler").MultiHashHandler,l=t("../lib/event_emitter").EventEmitter,p=function(r){function f(a,c){var h=r.call(this,c,a)||this;return h.byName=h.commands,h.setDefaultHandler("exec",function(m){return m.args?m.command.exec(m.editor,m.args,m.event,!1):m.command.exec(m.editor,{},m.event,!0)}),h}return o(f,r),f.prototype.exec=function(a,c,h){if(Array.isArray(a)){for(var m=a.length;m--;)if(this.exec(a[m],c,h))return!0;return!1}if(typeof a=="string"&&(a=this.commands[a]),!this.canExecute(a,c))return!1;var y={editor:c,command:a,args:h};return y.returnValue=this._emit("exec",y),this._signal("afterExec",y),y.returnValue!==!1},f.prototype.canExecute=function(a,c){return typeof a=="string"&&(a=this.commands[a]),a?c&&c.$readOnly&&!a.readOnly?!1:!(this.$checkCommandState!=0&&a.isAvailable&&!a.isAvailable(c)):!1},f.prototype.toggleRecording=function(a){if(!this.$inReplay)return a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(c){this.macro.push([c.command,c.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},f.prototype.replay=function(a){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,a):this.exec(c[0],a,c[1])},this)}finally{this.$inReplay=!1}}},f.prototype.trimMacro=function(a){return a.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},f}(d);u.implement(p.prototype,l),i.CommandManager=p}),(void 0)("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,i,s){function o(r,f){return{win:r,mac:f}}var u=t("../lib/lang"),d=t("../config"),l=t("../range").Range;i.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(r){d.loadModule("ace/ext/settings_menu",function(f){f.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(r){d.loadModule("ace/ext/error_marker",function(f){f.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(r){d.loadModule("ace/ext/error_marker",function(f){f.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(r,f){typeof f=="number"&&!isNaN(f)&&r.gotoLine(f),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(r){d.loadModule("ace/ext/searchbox",function(f){f.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(r,f){r.navigateUp(f.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(r,f){r.navigateDown(f.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(r,f){r.navigateLeft(f.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(r,f){r.navigateRight(f.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var f=r.$copyWithEmptySelection&&r.selection.isEmpty(),a=f?r.selection.getLineRange():r.selection.getRange();r._emit("cut",a),a.isEmpty()||r.session.remove(a),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,f){r.$handlePaste(f)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(r){d.loadModule("ace/ext/searchbox",function(f){f.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(r){if(!r.selection.isEmpty())return!1;r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(r){var f=r.selection.getRange();f.start.column=0,r.session.remove(f)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(r){var f=r.selection.getRange();f.end.column=Number.MAX_VALUE,r.session.remove(f)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,f){r.insert(f)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,f){r.insert(u.stringRepeat(f.text||"",f.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var f=r.selection.getRange();f.start.column=f.end.column=0,f.end.row++,r.selection.setRange(f,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(r){for(var f=r.selection.isBackwards(),a=f?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),c=f?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),h=r.session.doc.getLine(a.row).length,m=r.session.doc.getTextRange(r.selection.getRange()),y=m.replace(/\n\s*/," ").length,v=r.session.doc.getLine(a.row),w=a.row+1;w<=c.row+1;w++){var k=u.stringTrimLeft(u.stringTrimRight(r.session.doc.getLine(w)));k.length!==0&&(k=" "+k),v+=k}c.row+1<r.session.doc.getLength()-1&&(v+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new l(a.row,0,c.row+2,0),v),y>0?(r.selection.moveCursorTo(a.row,a.column),r.selection.selectTo(a.row,a.column+y)):(h=r.session.doc.getLine(a.row).length>h?h+1:h,r.selection.moveCursorTo(a.row,h))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(r){var f=r.session.doc.getLength()-1,a=r.session.doc.getLine(f).length,c=r.selection.rangeList.ranges,h=[];c.length<1&&(c=[r.selection.getRange()]);for(var m=0;m<c.length;m++)m==c.length-1&&(c[m].end.row!==f||c[m].end.column!==a)&&h.push(new l(c[m].end.row,c[m].end.column,f,a)),m===0?(c[m].start.row!==0||c[m].start.column!==0)&&h.push(new l(0,0,c[m].start.row,c[m].start.column)):h.push(new l(c[m-1].end.row,c[m-1].end.column,c[m].start.row,c[m].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var m=0;m<h.length;m++)r.selection.addRange(h[m],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(`
|
|
334
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var f=r.getCursorPosition();r.selection.moveTo(f.row-1,Number.MAX_VALUE),r.insert(`
|
|
335
|
+
`),f.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:o("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:o(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var p=1;p<9;p++)i.commands.push({name:"foldToLevel"+p,description:"Fold To Level "+p,level:p,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),(void 0)("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(t,i,s){var o=t("../lib/keys"),u=t("../mouse/default_gutter_handler").GutterTooltip,d=function(){function p(r){this.editor=r,this.gutterLayer=r.renderer.$gutterLayer,this.element=r.renderer.$gutter,this.lines=r.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new u(this.editor)}return p.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))},p.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))},p.prototype.$onGutterKeyDown=function(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===o.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=o.enter)return;r.preventDefault();var f=this.editor.getCursorPosition().row;this.editor.isRowVisible(f)||this.editor.scrollToLine(f,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldWidget(a),h=this.$findNearestAnnotation(a);if(!(c===null&&h===null)){if(c===null&&h!==null){this.activeRowIndex=h,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(c!==null&&h===null){this.activeRowIndex=c,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(h-a)<Math.abs(c-a)){this.activeRowIndex=h,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}this.activeRowIndex=c,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex)}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(r),setTimeout((function(){this.editor._signal("gutterkeydown",new l(r,this))}).bind(this),10)},p.prototype.$handleGutterKeyboardInteraction=function(r){if(r.keyCode===o.tab){r.preventDefault();return}if(r.keyCode===o.escape){r.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(r.keyCode===o.up){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}return}if(r.keyCode===o.down){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}return}if(r.keyCode===o.left){r.preventDefault(),this.$switchLane("annotation");return}if(r.keyCode===o.right){r.preventDefault(),this.$switchLane("fold");return}if(r.keyCode===o.enter||r.keyCode===o.space){switch(r.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var f=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),r),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==f&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(f),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var a=this.lines.cells[this.activeRowIndex].element.childNodes[2],c=a.getBoundingClientRect(),h=this.annotationTooltip.getElement().style;h.left=c.right+"px",h.top=c.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}return}},p.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},p.prototype.$isFoldWidgetVisible=function(r){var f=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),a=this.$getFoldWidget(r).style.display!=="none";return f&&a},p.prototype.$isAnnotationVisible=function(r){var f=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),a=this.$getAnnotation(r).style.display!=="none";return f&&a},p.prototype.$getFoldWidget=function(r){var f=this.lines.get(r),a=f.element;return a.childNodes[1]},p.prototype.$getAnnotation=function(r){var f=this.lines.get(r),a=f.element;return a.childNodes[2]},p.prototype.$findNearestFoldWidget=function(r){if(this.$isFoldWidgetVisible(r))return r;for(var f=0;r-f>0||r+f<this.lines.getLength()-1;){if(f++,r-f>=0&&this.$isFoldWidgetVisible(r-f))return r-f;if(r+f<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+f))return r+f}return null},p.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var f=0;r-f>0||r+f<this.lines.getLength()-1;){if(f++,r-f>=0&&this.$isAnnotationVisible(r-f))return r-f;if(r+f<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+f))return r+f}return null},p.prototype.$focusFoldWidget=function(r){if(r!=null){var f=this.$getFoldWidget(r);f.classList.add(this.editor.renderer.keyboardFocusClassName),f.focus()}},p.prototype.$focusAnnotation=function(r){if(r!=null){var f=this.$getAnnotation(r);f.classList.add(this.editor.renderer.keyboardFocusClassName),f.focus()}},p.prototype.$blurFoldWidget=function(r){var f=this.$getFoldWidget(r);f.classList.remove(this.editor.renderer.keyboardFocusClassName),f.blur()},p.prototype.$blurAnnotation=function(r){var f=this.$getAnnotation(r);f.classList.remove(this.editor.renderer.keyboardFocusClassName),f.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},p.prototype.$moveAnnotationUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$switchLane=function(r){switch(r){case"annotation":if(this.activeLane==="annotation")break;var f=this.$findNearestAnnotation(this.activeRowIndex);if(f==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=f,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldWidget(this.activeRowIndex);if(a==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$focusFoldWidget(this.activeRowIndex)}},p.prototype.$rowIndexToRow=function(r){var f=this.lines.get(r);return f?f.row:null},p.prototype.$rowToRowIndex=function(r){for(var f=0;f<this.lines.getLength();f++){var a=this.lines.get(f);if(a.row==r)return f}return null},p}();i.GutterKeyboardHandler=d;var l=function(){function p(r,f){this.gutterKeyboardHandler=f,this.domEvent=r}return p.prototype.getKey=function(){return o.keyCodeToString(this.domEvent.keyCode)},p.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},p.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},p.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},p}();i.GutterKeyboardEvent=l}),(void 0)("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"],function(t,i,s){var o=this&&this.__values||function(C){var A=typeof Symbol=="function"&&Symbol.iterator,M=A&&C[A],R=0;if(M)return M.call(C);if(C&&typeof C.length=="number")return{next:function(){return C&&R>=C.length&&(C=void 0),{value:C&&C[R++],done:!C}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},u=t("./lib/oop"),d=t("./lib/dom"),l=t("./lib/lang"),p=t("./lib/useragent"),r=t("./keyboard/textinput").TextInput,f=t("./mouse/mouse_handler").MouseHandler,a=t("./mouse/fold_handler").FoldHandler,c=t("./keyboard/keybinding").KeyBinding,h=t("./edit_session").EditSession,m=t("./search").Search,y=t("./range").Range,v=t("./lib/event_emitter").EventEmitter,w=t("./commands/command_manager").CommandManager,k=t("./commands/default_commands").commands,_=t("./config"),S=t("./token_iterator").TokenIterator,x=t("./keyboard/gutter_handler").GutterKeyboardHandler,L=t("./config").nls,I=t("./clipboard"),$=t("./lib/keys"),T=function(){function C(A,M,R){this.session,this.$toDestroy=[];var N=A.getContainerElement();this.container=N,this.renderer=A,this.id="editor"+ ++C.$uid,this.commands=new w(p.isMac?"mac":"win",k),typeof document=="object"&&(this.textInput=new r(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new f(this),new a(this)),this.keyBinding=new c(this),this.$search=new m().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(H,z){z._$emitInputEvent.schedule(31)}),this.setSession(M||R&&R.session||new h("")),_.resetOptions(this),R&&this.setOptions(R),_._signal("editor",this)}return C.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},C.prototype.startOperation=function(A){this.session.startOperation(A)},C.prototype.endOperation=function(A){this.session.endOperation(A)},C.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},C.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 M=this.curOp.command,R=M&&M.scrollIntoView;if(R){switch(R){case"center-animate":R="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var N=this.selection.getRange(),H=this.renderer.layerConfig;(N.start.row>=H.lastRow||N.end.row<=H.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}R=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},C.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var M=this.prevOp,R=this.$mergeableCommands,N=M.command&&A.command.name==M.command.name;if(A.command.name=="insertstring"){var H=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),N=N&&this.mergeNextCommand&&(!/\s/.test(H)||/\s/.test(M.args)),this.mergeNextCommand=!0}else N=N&&R.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(N=!1),N?this.session.mergeUndoDeltas=!0:R.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},C.prototype.setKeyboardHandler=function(A,M){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var R=this;_.loadModule(["keybinding",A],function(N){R.$keybindingId==A&&R.keyBinding.setKeyboardHandler(N&&N.handler),M&&M()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),M&&M()},C.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},C.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var M=this.session;if(M){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 R=this.session.getSelection();R.off("changeCursor",this.$onCursorChange),R.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),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:M}),this.curOp=null,M&&M._signal("changeEditor",{oldEditor:this}),M&&(M.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},C.prototype.getSession=function(){return this.session},C.prototype.setValue=function(A,M){return this.session.doc.setValue(A),M?M==1?this.navigateFileEnd():M==-1&&this.navigateFileStart():this.selectAll(),A},C.prototype.getValue=function(){return this.session.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.resize=function(A){this.renderer.onResize(A)},C.prototype.setTheme=function(A,M){this.renderer.setTheme(A,M)},C.prototype.getTheme=function(){return this.renderer.getTheme()},C.prototype.setStyle=function(A){this.renderer.setStyle(A)},C.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},C.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},C.prototype.setFontSize=function(A){this.setOption("fontSize",A)},C.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var M=A.session;if(!(!M||M.destroyed)){M.$bracketHighlight&&(M.$bracketHighlight.markerIds.forEach(function(U){M.removeMarker(U)}),M.$bracketHighlight=null);var R=A.getCursorPosition(),N=A.getKeyboardHandler(),H=N&&N.$getDirectionForHighlight&&N.$getDirectionForHighlight(A),z=M.getMatchingBracketRanges(R,H);if(!z){var Y=new S(M,R.row,R.column),K=Y.getCurrentToken();if(K&&/\b(?:tag-open|tag-name)/.test(K.type)){var re=M.getMatchingTags(R);re&&(z=[re.openTagName.isEmpty()?re.openTag:re.openTagName,re.closeTagName.isEmpty()?re.closeTag:re.closeTagName])}}if(!z&&M.$mode.getMatching&&(z=M.$mode.getMatching(A.session)),!z){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var fe="ace_bracket";Array.isArray(z)?z.length==1&&(fe="ace_error_bracket"):z=[z],z.length==2&&(y.comparePoints(z[0].end,z[1].start)==0?z=[y.fromPoints(z[0].start,z[1].end)]:y.comparePoints(z[0].start,z[1].end)==0&&(z=[y.fromPoints(z[1].start,z[0].end)])),M.$bracketHighlight={ranges:z,markerIds:z.map(function(U){return M.addMarker(U,fe,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},C.prototype.focus=function(){this.textInput.focus()},C.prototype.isFocused=function(){return this.textInput.isFocused()},C.prototype.blur=function(){this.textInput.blur()},C.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},C.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},C.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},C.prototype.onDocumentChange=function(A){var M=this.session.$useWrapMode,R=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,R,M),this._signal("change",A),this.$cursorChange()},C.prototype.onTokenizerUpdate=function(A){var M=A.data;this.renderer.updateLines(M.first,M.last)},C.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},C.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},C.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},C.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),M;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(M=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(M=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(M=!1)),A.$highlightLineMarker&&!M)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&M){var R=new y(M.row,M.column,M.row,1/0);R.id=A.addMarker(R,"ace_active-line","screenLine"),A.$highlightLineMarker=R}else M&&(A.$highlightLineMarker.start.row=M.row,A.$highlightLineMarker.end.row=M.row,A.$highlightLineMarker.start.column=M.column,A._signal("changeBackMarker"))},C.prototype.onSelectionChange=function(A){var M=this.session;if(M.$selectionMarker&&M.removeMarker(M.$selectionMarker),M.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var R=this.selection.getRange(),N=this.getSelectionStyle();M.$selectionMarker=M.addMarker(R,"ace_selection",N)}var H=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(H),this._signal("changeSelection")},C.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,M=this.getSelectionRange();if(!(M.isEmpty()||M.isMultiLine())){var R=M.start.column,N=M.end.column,H=A.getLine(M.start.row),z=H.substring(R,N);if(!(z.length>5e3||!/[\w\d]/.test(z))){var Y=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:z}),K=H.substring(R-1,N+1);if(Y.test(K))return Y}}},C.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},C.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},C.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},C.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},C.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},C.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},C.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},C.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},C.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},C.prototype.getCopyText=function(){var A=this.getSelectedText(),M=this.session.doc.getNewLineCharacter(),R=!1;if(!A&&this.$copyWithEmptySelection){R=!0;for(var N=this.selection.getAllRanges(),H=0;H<N.length;H++){var z=N[H];H&&N[H-1].start.row==z.start.row||(A+=this.session.getLine(z.start.row)+M)}}var Y={text:A};return this._signal("copy",Y),I.lineMode=R?Y.text:!1,Y.text},C.prototype.onCopy=function(){this.commands.exec("copy",this)},C.prototype.onCut=function(){this.commands.exec("cut",this)},C.prototype.onPaste=function(A,M){var R={text:A,event:M};this.commands.exec("paste",this,R)},C.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var M=A.text,R=M===I.lineMode,N=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)R?N.insert({row:this.selection.lead.row,column:0},M):this.insert(M);else if(R)this.selection.rangeList.ranges.forEach(function(fe){N.insert({row:fe.start.row,column:0},M)});else{var H=M.split(/\r\n|\r|\n/),z=this.selection.rangeList.ranges,Y=H.length==2&&(!H[0]||!H[1]);if(H.length!=z.length||Y)return this.commands.exec("insertstring",this,M);for(var K=z.length;K--;){var re=z[K];re.isEmpty()||N.remove(re),N.insert(re.start,H[K])}}},C.prototype.execCommand=function(A,M){return this.commands.exec(A,this,M)},C.prototype.insert=function(A,M){var R=this.session,N=R.getMode(),H=this.getCursorPosition();if(this.getBehavioursEnabled()&&!M){var z=N.transformAction(R.getState(H.row),"insertion",this,R,A);z&&(A!==z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=z.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
|
|
336
|
+
`)==-1){var Y=y.fromPoints(H,H);Y.end.column+=A.length,this.session.remove(Y)}}else{var Y=this.getSelectionRange();H=this.session.remove(Y),this.clearSelection()}if(A==`
|
|
337
|
+
`||A==`\r
|
|
338
|
+
`){var U=R.getLine(H.row);if(H.column>U.search(/\S|$/)){var K=U.substr(H.column).search(/\S|$/);R.doc.removeInLine(H.row,H.column,H.column+K)}}this.clearSelection();var re=H.column,fe=R.getState(H.row),U=R.getLine(H.row),Q=N.checkOutdent(fe,U,A);if(R.insert(H,A),z&&z.selection&&(z.selection.length==2?this.selection.setSelectionRange(new y(H.row,re+z.selection[0],H.row,re+z.selection[1])):this.selection.setSelectionRange(new y(H.row+z.selection[0],z.selection[1],H.row+z.selection[2],z.selection[3]))),this.$enableAutoIndent){if(R.getDocument().isNewLine(A)){var ie=N.getNextLineIndent(fe,U.slice(0,H.column),R.getTabString());R.insert({row:H.row+1,column:0},ie)}Q&&N.autoOutdent(fe,R,H.row)}},C.prototype.autoIndent=function(){for(var A=this.session,M=A.getMode(),R=this.selection.isEmpty()?[new y(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),N="",H="",z="",Y=A.getTabString(),K=0;K<R.length;K++)for(var re=R[K].start.row,fe=R[K].end.row,U=re;U<=fe;U++){U>0&&(N=A.getState(U-1),H=A.getLine(U-1),z=M.getNextLineIndent(N,H,Y));var Q=A.getLine(U),ie=M.$getIndent(Q);if(z!==ie){if(ie.length>0){var V=new y(U,0,U,ie.length);A.remove(V)}z.length>0&&A.insert({row:U,column:0},z)}M.autoOutdent(N,A,U)}},C.prototype.onTextInput=function(A,M){if(!M)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var R=this.applyComposition.bind(this,A,M);this.selection.rangeCount?this.forEachSelection(R):R(),this.endOperation()},C.prototype.applyComposition=function(A,M){if(M.extendLeft||M.extendRight){var R=this.selection.getRange();R.start.column-=M.extendLeft,R.end.column+=M.extendRight,R.start.column<0&&(R.start.row--,R.start.column+=this.session.getLine(R.start.row).length+1),this.selection.setRange(R),!A&&!R.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),M.restoreStart||M.restoreEnd){var R=this.selection.getRange();R.start.column-=M.restoreStart,R.end.column-=M.restoreEnd,this.selection.setRange(R)}},C.prototype.onCommandKey=function(A,M,R){return this.keyBinding.onCommandKey(A,M,R)},C.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},C.prototype.getOverwrite=function(){return this.session.getOverwrite()},C.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},C.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},C.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},C.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},C.prototype.getDragDelay=function(){return this.getOption("dragDelay")},C.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},C.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},C.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},C.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},C.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},C.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},C.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},C.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},C.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},C.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},C.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},C.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},C.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},C.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},C.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},C.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},C.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},C.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},C.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},C.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},C.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},C.prototype.getReadOnly=function(){return this.getOption("readOnly")},C.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},C.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},C.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},C.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},C.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},C.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},C.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},C.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},C.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var M=this.getSelectionRange();if(this.getBehavioursEnabled()){var R=this.session,N=R.getState(M.start.row),H=R.getMode().transformAction(N,"deletion",this,R,M);if(M.end.column===0){var z=R.getTextRange(M);if(z[z.length-1]==`
|
|
339
|
+
`){var Y=R.getLine(M.end.row);/^\s+$/.test(Y)&&(M.end.column=Y.length)}}H&&(M=H)}this.session.remove(M),this.clearSelection()},C.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},C.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()},C.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
|
|
340
|
+
`),this.moveCursorToPosition(A)},C.prototype.setGhostText=function(A,M){this.renderer.setGhostText(A,M)},C.prototype.removeGhostText=function(){this.renderer.removeGhostText()},C.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),M=A.column;if(M!==0){var R=this.session.getLine(A.row),N,H;M<R.length?(N=R.charAt(M)+R.charAt(M-1),H=new y(A.row,M-1,A.row,M+1)):(N=R.charAt(M-1)+R.charAt(M-2),H=new y(A.row,M-2,A.row,M)),this.session.replace(H,N),this.session.selection.moveToPosition(H.end)}}},C.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var M=this.getSelectionRange(),R=this.session.getTextRange(M);this.session.replace(M,R.toLowerCase()),this.selection.setSelectionRange(A)},C.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var M=this.getSelectionRange(),R=this.session.getTextRange(M);this.session.replace(M,R.toUpperCase()),this.selection.setSelectionRange(A)},C.prototype.indent=function(){var A=this.session,M=this.getSelectionRange();if(M.start.row<M.end.row){var R=this.$getSelectedRows();A.indentRows(R.first,R.last," ");return}if(M.start.column<M.end.column){var N=A.getTextRange(M);if(!/^\s+$/.test(N)){var R=this.$getSelectedRows();A.indentRows(R.first,R.last," ");return}}var H=A.getLine(M.start.row),z=M.start,Y=A.getTabSize(),K=A.documentToScreenColumn(z.row,z.column);if(this.session.getUseSoftTabs())var re=Y-K%Y,fe=l.stringRepeat(" ",re);else{for(var re=K%Y;H[M.start.column-1]==" "&&re;)M.start.column--,re--;this.selection.setSelectionRange(M),fe=" "}return this.insert(fe)},C.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},C.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},C.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),M=this.session,R=[],N=A.first;N<=A.last;N++)R.push(M.getLine(N));R.sort(function(Y,K){return Y.toLowerCase()<K.toLowerCase()?-1:Y.toLowerCase()>K.toLowerCase()?1:0});for(var H=new y(0,0,0,0),N=A.first;N<=A.last;N++){var z=M.getLine(N);H.start.row=N,H.end.row=N,H.end.column=z.length,M.replace(H,R[N-A.first])}},C.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),M=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,M.first,M.last)},C.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),M=this.session.getState(A.row),R=this.getSelectionRange();this.session.getMode().toggleBlockComment(M,this.session,R,A)},C.prototype.getNumberAt=function(A,M){var R=/[\-]?[0-9]+(?:\.[0-9]+)?/g;R.lastIndex=0;for(var N=this.session.getLine(A);R.lastIndex<M;){var H=R.exec(N);if(H.index<=M&&H.index+H[0].length>=M){var z={value:H[0],start:H.index,end:H.index+H[0].length};return z}}return null},C.prototype.modifyNumber=function(A){var M=this.selection.getCursor().row,R=this.selection.getCursor().column,N=new y(M,R-1,M,R),H=this.session.getTextRange(N);if(!isNaN(parseFloat(H))&&isFinite(H)){var z=this.getNumberAt(M,R);if(z){var Y=z.value.indexOf(".")>=0?z.start+z.value.indexOf(".")+1:z.end,K=z.start+z.value.length-Y,re=parseFloat(z.value);re*=Math.pow(10,K),Y!==z.end&&R<Y?A*=Math.pow(10,z.end-R-1):A*=Math.pow(10,z.end-R),re+=A,re/=Math.pow(10,K);var fe=re.toFixed(K),U=new y(M,z.start,M,z.end);this.session.replace(U,fe),this.moveCursorTo(M,Math.max(z.start+1,R+fe.length-z.value.length))}}else this.toggleWord()},C.prototype.toggleWord=function(){var A=this.selection.getCursor().row,M=this.selection.getCursor().column;this.selection.selectWord();var R=this.getSelectedText(),N=this.selection.getWordRange().start.column,H=R.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),z=M-N-1;z<0&&(z=0);var Y=0,K=0,re=this;R.match(/[A-Za-z0-9_]+/)&&H.forEach(function(ue,G){K=Y+ue.length,z>=Y&&z<=K&&(R=ue,re.selection.clearSelection(),re.moveCursorTo(A,Y+N),re.selection.selectTo(A,K+N)),Y=K});for(var fe=this.$toggleWordPairs,U,Q=0;Q<fe.length;Q++)for(var ie=fe[Q],V=0;V<=1;V++){var te=+!V,ae=R.match(new RegExp("^\\s?_?("+l.escapeRegExp(ie[V])+")\\s?$","i"));if(ae){var ge=R.match(new RegExp("([_]|^|\\s)("+l.escapeRegExp(ae[1])+")($|\\s)","g"));ge&&(U=R.replace(new RegExp(l.escapeRegExp(ie[V]),"i"),function(ue){var G=ie[te];return ue.toUpperCase()==ue?G=G.toUpperCase():ue.charAt(0).toUpperCase()==ue.charAt(0)&&(G=G.substr(0,0)+ie[te].charAt(0).toUpperCase()+G.substr(1)),G}),this.insert(U),U="")}}},C.prototype.findLinkAt=function(A,M){var R,N,H=this.session.getLine(A),z=H.split(/((?:https?|ftp):\/\/[\S]+)/),Y=M;Y<0&&(Y=0);var K=0,re=0,fe;try{for(var U=o(z),Q=U.next();!Q.done;Q=U.next()){var ie=Q.value;if(re=K+ie.length,Y>=K&&Y<=re&&ie.match(/((?:https?|ftp):\/\/[\S]+)/)){fe=ie.replace(/[\s:.,'";}\]]+$/,"");break}K=re}}catch(V){R={error:V}}finally{try{Q&&!Q.done&&(N=U.return)&&N.call(U)}finally{if(R)throw R.error}}return fe},C.prototype.openLink=function(){var A=this.selection.getCursor(),M=this.findLinkAt(A.row,A.column);return M&&window.open(M,"_blank"),M!=null},C.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},C.prototype.duplicateSelection=function(){var A=this.selection,M=this.session,R=A.getRange(),N=A.isBackwards();if(R.isEmpty()){var H=R.start.row;M.duplicateLines(H,H)}else{var z=N?R.start:R.end,Y=M.insert(z,M.getTextRange(R));R.start=z,R.end=Y,A.setSelectionRange(R,N)}},C.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},C.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},C.prototype.moveText=function(A,M,R){return this.session.moveText(A,M,R)},C.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},C.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},C.prototype.$moveLines=function(A,M){var R,N,H=this.selection;if(!H.inMultiSelectMode||this.inVirtualSelectionMode){var z=H.toOrientedRange();R=this.$getSelectedRows(z),N=this.session.$moveLines(R.first,R.last,M?0:A),M&&A==-1&&(N=0),z.moveBy(N,0),H.fromOrientedRange(z)}else{var Y=H.rangeList.ranges;H.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var K=0,re=0,fe=Y.length,U=0;U<fe;U++){var Q=U;Y[U].moveBy(K,0),R=this.$getSelectedRows(Y[U]);for(var ie=R.first,V=R.last;++U<fe;){re&&Y[U].moveBy(re,0);var te=this.$getSelectedRows(Y[U]);if(M&&te.first!=V||!M&&te.first>V+1)break;V=te.last}for(U--,K=this.session.$moveLines(ie,V,M?0:A),M&&A==-1&&(Q=U+1);Q<=U;)Y[Q].moveBy(K,0),Q++;M||(K=0),re+=K}H.fromOrientedRange(H.ranges[0]),H.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},C.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},C.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},C.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},C.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},C.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},C.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},C.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},C.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},C.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},C.prototype.$moveByPage=function(A,M){var R=this.renderer,N=this.renderer.layerConfig,H=A*Math.floor(N.height/N.lineHeight);M===!0?this.selection.$moveSelection(function(){this.moveCursorBy(H,0)}):M===!1&&(this.selection.moveCursorBy(H,0),this.selection.clearSelection());var z=R.scrollTop;R.scrollBy(0,H*N.lineHeight),M!=null&&R.scrollCursorIntoView(null,.5),R.animateScrolling(z)},C.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},C.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},C.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},C.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},C.prototype.scrollPageDown=function(){this.$moveByPage(1)},C.prototype.scrollPageUp=function(){this.$moveByPage(-1)},C.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},C.prototype.scrollToLine=function(A,M,R,N){this.renderer.scrollToLine(A,M,R,N)},C.prototype.centerSelection=function(){var A=this.getSelectionRange(),M={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(M,.5)},C.prototype.getCursorPosition=function(){return this.selection.getCursor()},C.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},C.prototype.getSelectionRange=function(){return this.selection.getRange()},C.prototype.selectAll=function(){this.selection.selectAll()},C.prototype.clearSelection=function(){this.selection.clearSelection()},C.prototype.moveCursorTo=function(A,M){this.selection.moveCursorTo(A,M)},C.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},C.prototype.jumpToMatching=function(A,M){var R=this.getCursorPosition(),N=new S(this.session,R.row,R.column),H=N.getCurrentToken(),z=0;H&&H.type.indexOf("tag-name")!==-1&&(H=N.stepBackward());var Y=H||N.stepForward();if(Y){var K,re=!1,fe={},U=R.column-Y.start,Q,ie={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Y.value.match(/[{}()\[\]]/g)){for(;U<Y.value.length&&!re;U++)if(ie[Y.value[U]])switch(Q=ie[Y.value[U]]+"."+Y.type.replace("rparen","lparen"),isNaN(fe[Q])&&(fe[Q]=0),Y.value[U]){case"(":case"[":case"{":fe[Q]++;break;case")":case"]":case"}":fe[Q]--,fe[Q]===-1&&(K="bracket",re=!0)}}else Y.type.indexOf("tag-name")!==-1&&(isNaN(fe[Y.value])&&(fe[Y.value]=0),H.value==="<"&&z>1?fe[Y.value]++:H.value==="</"&&fe[Y.value]--,fe[Y.value]===-1&&(K="tag",re=!0));re||(H=Y,z++,Y=N.stepForward(),U=0)}while(Y&&!re);if(K){var V,te;if(K==="bracket")V=this.session.getBracketRange(R),V||(V=new y(N.getCurrentTokenRow(),N.getCurrentTokenColumn()+U-1,N.getCurrentTokenRow(),N.getCurrentTokenColumn()+U-1),te=V.start,(M||te.row===R.row&&Math.abs(te.column-R.column)<2)&&(V=this.session.getBracketRange(te)));else if(K==="tag"){if(!Y||Y.type.indexOf("tag-name")===-1)return;if(V=new y(N.getCurrentTokenRow(),N.getCurrentTokenColumn()-2,N.getCurrentTokenRow(),N.getCurrentTokenColumn()-2),V.compare(R.row,R.column)===0){var ae=this.session.getMatchingTags(R);ae&&(ae.openTag.contains(R.row,R.column)?(V=ae.closeTag,te=V.start):(V=ae.openTag,ae.closeTag.start.row===R.row&&ae.closeTag.start.column===R.column?te=V.end:te=V.start))}te=te||V.start}te=V&&V.cursor||te,te&&(A?V&&M?this.selection.setRange(V):V&&V.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(te.row,te.column):this.selection.moveTo(te.row,te.column))}}},C.prototype.gotoLine=function(A,M,R){this.selection.clearSelection(),this.session.unfold({row:A-1,column:M||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,M||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,R)},C.prototype.navigateTo=function(A,M){this.selection.moveTo(A,M)},C.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var M=this.selection.anchor.getPosition();return this.moveCursorToPosition(M)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},C.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var M=this.selection.anchor.getPosition();return this.moveCursorToPosition(M)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},C.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var M=this.getSelectionRange().start;this.moveCursorToPosition(M)}this.clearSelection()},C.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var M=this.getSelectionRange().end;this.moveCursorToPosition(M)}this.clearSelection()},C.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},C.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},C.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},C.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},C.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},C.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},C.prototype.replace=function(A,M){M&&this.$search.set(M);var R=this.$search.find(this.session),N=0;return R&&(this.$tryReplace(R,A)&&(N=1),this.selection.setSelectionRange(R),this.renderer.scrollSelectionIntoView(R.start,R.end)),N},C.prototype.replaceAll=function(A,M){M&&this.$search.set(M);var R=this.$search.findAll(this.session),N=0;if(!R.length)return N;var H=this.getSelectionRange();this.selection.moveTo(0,0);for(var z=R.length-1;z>=0;--z)this.$tryReplace(R[z],A)&&N++;return this.selection.setSelectionRange(H),N},C.prototype.$tryReplace=function(A,M){var R=this.session.getTextRange(A);return M=this.$search.replace(R,M),M!==null?(A.end=this.session.replace(A,M),A):null},C.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},C.prototype.find=function(A,M,R){M||(M={}),typeof A=="string"||A instanceof RegExp?M.needle=A:typeof A=="object"&&u.mixin(M,A);var N=this.selection.getRange();M.needle==null&&(A=this.session.getTextRange(N)||this.$search.$options.needle,A||(N=this.session.getWordRange(N.start.row,N.start.column),A=this.session.getTextRange(N)),this.$search.set({needle:A})),this.$search.set(M),M.start||this.$search.set({start:N});var H=this.$search.find(this.session);if(M.preventScroll)return H;if(H)return this.revealRange(H,R),H;M.backwards?N.start=N.end:N.end=N.start,this.selection.setRange(N)},C.prototype.findNext=function(A,M){this.find({skipCurrent:!0,backwards:!1},A,M)},C.prototype.findPrevious=function(A,M){this.find(A,{skipCurrent:!0,backwards:!0},M)},C.prototype.revealRange=function(A,M){this.session.unfold(A),this.selection.setSelectionRange(A);var R=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),M!==!1&&this.renderer.animateScrolling(R)},C.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},C.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},C.prototype.setAutoScrollEditorIntoView=function(A){if(A){var M,R=this,N=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var H=this.$scrollAnchor;H.style.cssText="position:absolute",this.container.insertBefore(H,this.container.firstChild);var z=this.on("changeSelection",function(){N=!0}),Y=this.renderer.on("beforeRender",function(){N&&(M=R.renderer.container.getBoundingClientRect())}),K=this.renderer.on("afterRender",function(){if(N&&M&&(R.isFocused()||R.searchBox&&R.searchBox.isFocused())){var re=R.renderer,fe=re.$cursorLayer.$pixelPos,U=re.layerConfig,Q=fe.top-U.offset;fe.top>=0&&Q+M.top<0?N=!0:fe.top<U.height&&fe.top+M.top+U.lineHeight>window.innerHeight?N=!1:N=null,N!=null&&(H.style.top=Q+"px",H.style.left=fe.left+"px",H.style.height=U.lineHeight+"px",H.scrollIntoView(N)),N=M=null}});this.setAutoScrollEditorIntoView=function(re){re||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",z),this.renderer.off("afterRender",K),this.renderer.off("beforeRender",Y))}}},C.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",M=this.renderer.$cursorLayer;M&&(M.setSmoothBlinking(/smooth/.test(A)),M.isBlinking=!this.$readOnly&&A!="wide",d.setCssClass(M.element,"ace_slim-cursors",/slim/.test(A)))},C.prototype.prompt=function(A,M,R){var N=this;_.loadModule("ace/ext/prompt",function(H){H.prompt(N,A,M,R)})},C}();T.$uid=0,T.prototype.curOp=null,T.prototype.prevOp={},T.prototype.$mergeableCommands=["backspace","del","insertstring"],T.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"],["&&","||"],["==","!="]],u.implement(T.prototype,v),_.defineOptions(T.prototype,"editor",{selectionStyle:{set:function(C){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:C})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(C){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(C){this.textInput.setReadOnly(C),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(C){this.textInput.setCopyWithEmptySelection(C)},initialValue:!1},cursorStyle:{set:function(C){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(C){this.setAutoScrollEditorIntoView(C)}},keyboardHandler:{set:function(C){this.setKeyboardHandler(C)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(C){this.session.setValue(C)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(C){this.setSession(C)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(C){this.renderer.$gutterLayer.setShowLineNumbers(C),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),C&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(C){this.$showLineNumbers&&C?O.attach(this):O.detach(this)}},placeholder:{set:function(C){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),d.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),d.addCssClass(this.container,"ace_hasPlaceholder");var M=d.createElement("div");M.className="ace_placeholder",M.textContent=this.$placeholder||"",this.renderer.placeholderNode=M,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(C){var A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(N){N.blur(),N.renderer.scroller.focus()},readOnly:!0},M=function(N){if(N.target==this.renderer.scroller&&N.keyCode===$.enter){N.preventDefault();var H=this.getCursorPosition().row;this.isRowVisible(H)||this.scrollToLine(H,!0,!0),this.focus()}},R;C?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",M.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",L("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",L("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),R||(R=new x(this)),R.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",M.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),R&&R.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(C){this.$textInputAriaLabel=C},initialValue:""},enableMobileMenu:{set:function(C){this.$enableMobileMenu=C},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(C,A){return(Math.abs(C.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(C,A,M){return Math.max(A.toString().length,(M.lastRow+1).toString().length,2)*M.characterWidth},update:function(C,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(C){C.renderer.$gutterLayer.$renderer=this,C.on("changeSelection",this.update),this.update(null,C)},detach:function(C){C.renderer.$gutterLayer.$renderer==this&&(C.renderer.$gutterLayer.$renderer=null),C.off("changeSelection",this.update),this.update(null,C)}};i.Editor=T}),(void 0)("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,i,s){var o=t("../lib/dom"),u=function(){function d(l,p){this.element=l,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(l){o.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(l,p){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(l,p,r){var f=p.firstRowScreen*p.lineHeight,a=Math.floor(f/this.canvasHeight),c=r.documentToScreenRow(l,0)*p.lineHeight;return c-a*this.canvasHeight},d.prototype.computeLineHeight=function(l,p,r){return p.lineHeight*r.getRowLineCount(l)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(l){return this.cells[l]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var p=o.createFragment(this.element),r=0;r<l.length;r++)p.appendChild(l[r].element);this.element.appendChild(p)}else this.cells.push(l),this.element.appendChild(l.element)},d.prototype.unshift=function(l){if(Array.isArray(l)){this.cells.unshift.apply(this.cells,l);for(var p=o.createFragment(this.element),r=0;r<l.length;r++)p.appendChild(l[r].element);this.element.firstChild?this.element.insertBefore(p,this.element.firstChild):this.element.appendChild(p)}else this.cells.unshift(l),this.element.insertAdjacentElement("afterbegin",l.element)},d.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},d.prototype.$cacheCell=function(l){l&&(l.element.remove(),this.cellCache.push(l))},d.prototype.createCell=function(l,p,r,f){var a=this.cellCache.pop();if(!a){var c=o.createElement("div");f&&f(c),this.element.appendChild(c),a={element:c,text:"",row:l}}return a.row=l,a},d}();i.Lines=u}),(void 0)("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,i,s){function o(c){var h=document.createTextNode("");c.appendChild(h);var m=u.createElement("span");c.appendChild(m);var y=u.createElement("span");c.appendChild(y);var v=u.createElement("span");return y.appendChild(v),c}var u=t("../lib/dom"),d=t("../lib/oop"),l=t("../lib/lang"),p=t("../lib/event_emitter").EventEmitter,r=t("./lines").Lines,f=t("../config").nls,a=function(){function c(h){this.element=u.createElement("div"),this.element.className="ace_layer ace_gutter-layer",h.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new r(this.element),this.$lines.$offsetCoefficient=1}return c.prototype.setSession=function(h){this.session&&this.session.off("change",this.$updateAnnotations),this.session=h,h&&h.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(h,m){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(h,m)},c.prototype.removeGutterDecoration=function(h,m){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(h,m)},c.prototype.setAnnotations=function(h){this.$annotations=[];for(var m=0;m<h.length;m++){var y=h[m],v=y.row,w=this.$annotations[v];w||(w=this.$annotations[v]={text:[],type:[],displayText:[]});var k=y.text,_=y.text,S=y.type;k=k?l.escapeHTML(k):y.html||"",_=_||y.html||"",w.text.indexOf(k)===-1&&(w.text.push(k),w.type.push(S),w.displayText.push(_));var x=y.className;x?w.className=x:S==="error"?w.className=" ace_error":S==="security"&&!/\bace_error\b/.test(w.className)?w.className=" ace_security":S==="warning"&&!/\bace_(error|security)\b/.test(w.className)?w.className=" ace_warning":S==="info"&&!w.className?w.className=" ace_info":S==="hint"&&!w.className&&(w.className=" ace_hint")}},c.prototype.$updateAnnotations=function(h){if(this.$annotations.length){var m=h.start.row,y=h.end.row-m;if(y!==0)if(h.action=="remove")this.$annotations.splice(m,y+1,null);else{var v=new Array(y+1);v.unshift(m,1),this.$annotations.splice.apply(this.$annotations,v)}}},c.prototype.update=function(h){this.config=h;var m=this.session,y=h.firstRow,v=Math.min(h.lastRow+h.gutterOffset,m.getLength()-1);this.oldLastRow=v,this.config=h,this.$lines.moveContainer(h),this.$updateCursorRow();for(var w=m.getNextFoldLine(y),k=w?w.start.row:1/0,_=null,S=-1,x=y;;){if(x>k&&(x=w.end.row+1,w=m.getNextFoldLine(x,w),k=w?w.start.row:1/0),x>v){for(;this.$lines.getLength()>S+1;)this.$lines.pop();break}_=this.$lines.get(++S),_?_.row=x:(_=this.$lines.createCell(x,h,this.session,o),this.$lines.push(_)),this.$renderCell(_,h,w,x),x++}this._signal("afterRender"),this.$updateGutterWidth(h)},c.prototype.$updateGutterWidth=function(h){var m=this.session,y=m.gutterRenderer||this.$renderer,v=m.$firstLineNumber,w=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||m.$useWrapMode)&&(w=m.getLength()+v-1);var k=y?y.getWidth(m,w,h):w.toString().length*h.characterWidth,_=this.$padding||this.$computePadding();k+=_.left+_.right,k!==this.gutterWidth&&!isNaN(k)&&(this.gutterWidth=k,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",k))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var h=this.session.selection.getCursor();this.$cursorRow!==h.row&&(this.$cursorRow=h.row)}},c.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var h=this.session.selection.cursor.row;if(this.$cursorRow=h,!(this.$cursorCell&&this.$cursorCell.row==h)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var m=this.$lines.cells;this.$cursorCell=null;for(var y=0;y<m.length;y++){var v=m[y];if(v.row>=this.$cursorRow){if(v.row>this.$cursorRow){var w=this.session.getFoldLine(this.$cursorRow);if(!(y>0&&w&&w.start.row==m[y-1].row))break;v=m[y-1]}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},c.prototype.scrollLines=function(h){var m=this.config;if(this.config=h,this.$updateCursorRow(),this.$lines.pageChanged(m,h))return this.update(h);this.$lines.moveContainer(h);var y=Math.min(h.lastRow+h.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=y,!m||v<h.firstRow)return this.update(h);if(y<m.firstRow)return this.update(h);if(m.firstRow<h.firstRow)for(var w=this.session.getFoldedRowCount(m.firstRow,h.firstRow-1);w>0;w--)this.$lines.shift();if(v>y)for(var w=this.session.getFoldedRowCount(y+1,v);w>0;w--)this.$lines.pop();h.firstRow<m.firstRow&&this.$lines.unshift(this.$renderLines(h,h.firstRow,m.firstRow-1)),y>v&&this.$lines.push(this.$renderLines(h,v+1,y)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(h)},c.prototype.$renderLines=function(h,m,y){for(var v=[],w=m,k=this.session.getNextFoldLine(w),_=k?k.start.row:1/0;w>_&&(w=k.end.row+1,k=this.session.getNextFoldLine(w,k),_=k?k.start.row:1/0),!(w>y);){var S=this.$lines.createCell(w,h,this.session,o);this.$renderCell(S,h,k,w),v.push(S),w++}return v},c.prototype.$renderCell=function(h,m,y,v){var w=h.element,k=this.session,_=w.childNodes[0],S=w.childNodes[1],x=w.childNodes[2],L=x.firstChild,I=k.$firstLineNumber,$=k.$breakpoints,T=k.$decorations,O=k.gutterRenderer||this.$renderer,C=this.$showFoldWidgets&&k.foldWidgets,A=y?y.start.row:Number.MAX_VALUE,M=m.lineHeight+"px",R=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",N=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",H=(O?O.getText(k,v):v+I).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||y&&v<this.$cursorRow&&v>=A&&this.$cursorRow<=y.end.row)&&(R+="ace_gutter-active-line ",this.$cursorCell!=h&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=h)),$[v]&&(R+=$[v]),T[v]&&(R+=T[v]),this.$annotations[v]&&v!==A&&(R+=this.$annotations[v].className),C){var z=C[v];z==null&&(z=C[v]=k.getFoldWidget(v))}if(z){var Y="ace_fold-widget ace_"+z,K=z=="start"&&v==A&&v<y.end.row;if(K){Y+=" ace_closed";for(var re="",fe=!1,U=v+1;U<=y.end.row;U++)if(this.$annotations[U]){if(this.$annotations[U].className===" ace_error"){fe=!0,re=" ace_error_fold";break}this.$annotations[U].className===" ace_security"?(fe=!0,re=" ace_security_fold"):this.$annotations[U].className===" ace_warning"&&re!==" ace_security_fold"&&(fe=!0,re=" ace_warning_fold")}R+=re}else Y+=" ace_open";S.className!=Y&&(S.className=Y),u.setStyle(S.style,"height",M),u.setStyle(S.style,"display","inline-block"),S.setAttribute("role","button"),S.setAttribute("tabindex","-1");var Q=k.getFoldWidgetRange(v);Q?S.setAttribute("aria-label",f("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[Q.start.row+1,Q.end.row+1])):y?S.setAttribute("aria-label",f("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[y.start.row+1,y.end.row+1])):S.setAttribute("aria-label",f("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[v+1])),K?(S.setAttribute("aria-expanded","false"),S.setAttribute("title",f("gutter.code-folding.closed.title","Unfold code"))):(S.setAttribute("aria-expanded","true"),S.setAttribute("title",f("gutter.code-folding.open.title","Fold code")))}else S&&(u.setStyle(S.style,"display","none"),S.setAttribute("tabindex","0"),S.removeAttribute("role"),S.removeAttribute("aria-label"));if(fe&&this.$showFoldedAnnotations){x.className="ace_gutter_annotation",L.className=N,L.className+=re,u.setStyle(L.style,"height",M),u.setStyle(x.style,"display","block"),u.setStyle(x.style,"height",M);var ie;switch(re){case" ace_error_fold":ie=f("gutter.annotation.aria-label.error","Error, read annotations row $0",[H]);break;case" ace_security_fold":ie=f("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[H]);break;case" ace_warning_fold":ie=f("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[H])}x.setAttribute("aria-label",ie),x.setAttribute("tabindex","-1"),x.setAttribute("role","button")}else if(this.$annotations[v]){x.className="ace_gutter_annotation",L.className=N,this.$useSvgGutterIcons?L.className+=this.$annotations[v].className:w.classList.add(this.$annotations[v].className.replace(" ","")),u.setStyle(L.style,"height",M),u.setStyle(x.style,"display","block"),u.setStyle(x.style,"height",M);var ie;switch(this.$annotations[v].className){case" ace_error":ie=f("gutter.annotation.aria-label.error","Error, read annotations row $0",[H]);break;case" ace_security":ie=f("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[H]);break;case" ace_warning":ie=f("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[H]);break;case" ace_info":ie=f("gutter.annotation.aria-label.info","Info, read annotations row $0",[H]);break;case" ace_hint":ie=f("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[H])}x.setAttribute("aria-label",ie),x.setAttribute("tabindex","-1"),x.setAttribute("role","button")}else u.setStyle(x.style,"display","none"),x.removeAttribute("aria-label"),x.removeAttribute("role"),x.setAttribute("tabindex","0");return H!==_.data&&(_.data=H),w.className!=R&&(w.className=R),u.setStyle(h.element.style,"height",this.$lines.computeLineHeight(v,m,k)+"px"),u.setStyle(h.element.style,"top",this.$lines.computeLineTop(v,m,k)+"px"),h.text=H,x.style.display==="none"&&S.style.display==="none"?h.element.setAttribute("aria-hidden",!0):h.element.setAttribute("aria-hidden",!1),h},c.prototype.setHighlightGutterLine=function(h){this.$highlightGutterLine=h},c.prototype.setShowLineNumbers=function(h){this.$renderer=!h&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(h){h?u.addCssClass(this.element,"ace_folding-enabled"):u.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=h,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var h=u.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(h.borderLeftWidth)||0)+(parseInt(h.paddingLeft)||0)+1,this.$padding.right=(parseInt(h.borderRightWidth)||0)+(parseInt(h.paddingRight)||0),this.$padding},c.prototype.getRegion=function(h){var m=this.$padding||this.$computePadding(),y=this.element.getBoundingClientRect();if(h.x<m.left+y.left)return"markers";if(this.$showFoldWidgets&&h.x>y.right-m.right)return"foldWidgets"},c}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,d.implement(a.prototype,p),i.Gutter=a}),(void 0)("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,i,s){function o(p,r,f,a){return(p?1:0)|(r?2:0)|(f?4:0)|(a?8:0)}var u=t("../range").Range,d=t("../lib/dom"),l=function(){function p(r){this.element=d.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return p.prototype.setPadding=function(r){this.$padding=r},p.prototype.setSession=function(r){this.session=r},p.prototype.setMarkers=function(r){this.markers=r},p.prototype.elt=function(r,f){var a=this.i!=-1&&this.element.childNodes[this.i];a?this.i++:(a=document.createElement("div"),this.element.appendChild(a),this.i=-1),a.style.cssText=f,a.className=r},p.prototype.update=function(r){if(r){this.config=r,this.i=0;var f;for(var a in this.markers){var c=this.markers[a];if(!c.range){c.update(f,this,this.session,r);continue}var h=c.range.clipRows(r.firstRow,r.lastRow);if(!h.isEmpty())if(h=h.toScreenRange(this.session),c.renderer){var m=this.$getTop(h.start.row,r),y=this.$padding+h.start.column*r.characterWidth;c.renderer(f,h,y,m,r)}else c.type=="fullLine"?this.drawFullLineMarker(f,h,c.clazz,r):c.type=="screenLine"?this.drawScreenLineMarker(f,h,c.clazz,r):h.isMultiLine()?c.type=="text"?this.drawTextMarker(f,h,c.clazz,r):this.drawMultiLineMarker(f,h,c.clazz,r):this.drawSingleLineMarker(f,h,c.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},p.prototype.$getTop=function(r,f){return(r-f.firstRowScreen)*f.lineHeight},p.prototype.drawTextMarker=function(r,f,a,c,h){for(var m=this.session,y=f.start.row,v=f.end.row,w=y,k=0,_=0,S=m.getScreenLastRowColumn(w),x=new u(w,f.start.column,w,_);w<=v;w++)x.start.row=x.end.row=w,x.start.column=w==y?f.start.column:m.getRowWrapIndent(w),x.end.column=S,k=_,_=S,S=w+1<v?m.getScreenLastRowColumn(w+1):w==v?0:f.end.column,this.drawSingleLineMarker(r,x,a+(w==y?" ace_start":"")+" ace_br"+o(w==y||w==y+1&&f.start.column,k<_,_>S,w==v),c,w==v?0:1,h)},p.prototype.drawMultiLineMarker=function(r,f,a,c,h){var m=this.$padding,y=c.lineHeight,v=this.$getTop(f.start.row,c),w=m+f.start.column*c.characterWidth;if(h=h||"",this.session.$bidiHandler.isBidiRow(f.start.row)){var k=f.clone();k.end.row=k.start.row,k.end.column=this.session.getLine(k.start.row).length,this.drawBidiSingleLineMarker(r,k,a+" ace_br1 ace_start",c,null,h)}else this.elt(a+" ace_br1 ace_start","height:"+y+"px;right:"+m+"px;top:"+v+"px;left:"+w+"px;"+(h||""));if(this.session.$bidiHandler.isBidiRow(f.end.row)){var k=f.clone();k.start.row=k.end.row,k.start.column=0,this.drawBidiSingleLineMarker(r,k,a+" ace_br12",c,null,h)}else{v=this.$getTop(f.end.row,c);var _=f.end.column*c.characterWidth;this.elt(a+" ace_br12","height:"+y+"px;width:"+_+"px;top:"+v+"px;left:"+m+"px;"+(h||""))}if(y=(f.end.row-f.start.row-1)*c.lineHeight,!(y<=0)){v=this.$getTop(f.start.row+1,c);var S=(f.start.column?1:0)|(f.end.column?0:8);this.elt(a+(S?" ace_br"+S:""),"height:"+y+"px;right:"+m+"px;top:"+v+"px;left:"+m+"px;"+(h||""))}},p.prototype.drawSingleLineMarker=function(r,f,a,c,h,m){if(this.session.$bidiHandler.isBidiRow(f.start.row))return this.drawBidiSingleLineMarker(r,f,a,c,h,m);var y=c.lineHeight,v=(f.end.column+(h||0)-f.start.column)*c.characterWidth,w=this.$getTop(f.start.row,c),k=this.$padding+f.start.column*c.characterWidth;this.elt(a,"height:"+y+"px;width:"+v+"px;top:"+w+"px;left:"+k+"px;"+(m||""))},p.prototype.drawBidiSingleLineMarker=function(r,f,a,c,h,m){var y=c.lineHeight,v=this.$getTop(f.start.row,c),w=this.$padding,k=this.session.$bidiHandler.getSelections(f.start.column,f.end.column);k.forEach(function(_){this.elt(a,"height:"+y+"px;width:"+(_.width+(h||0))+"px;top:"+v+"px;left:"+(w+_.left)+"px;"+(m||""))},this)},p.prototype.drawFullLineMarker=function(r,f,a,c,h){var m=this.$getTop(f.start.row,c),y=c.lineHeight;f.start.row!=f.end.row&&(y+=this.$getTop(f.end.row,c)-m),this.elt(a,"height:"+y+"px;top:"+m+"px;left:0;right:0;"+(h||""))},p.prototype.drawScreenLineMarker=function(r,f,a,c,h){var m=this.$getTop(f.start.row,c),y=c.lineHeight;this.elt(a,"height:"+y+"px;top:"+m+"px;left:0;right:0;"+(h||""))},p}();l.prototype.$padding=0,i.Marker=l}),(void 0)("ace/layer/text_util",["require","exports","module"],function(t,i,s){var o=new Set(["text","rparen","lparen"]);i.isTextToken=function(u){return o.has(u)}}),(void 0)("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,i,s){var o=t("../lib/oop"),u=t("../lib/dom"),d=t("../lib/lang"),l=t("./lines").Lines,p=t("../lib/event_emitter").EventEmitter,r=t("../config").nls,f=t("./text_util").isTextToken,a=function(){function c(h){this.dom=u,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",h.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}return c.prototype.$updateEolChar=function(){var h=this.session.doc,m=h.getNewLineCharacter()==`
|
|
341
|
+
`&&h.getNewLineMode()!="windows",y=m?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=y)return this.EOL_CHAR=y,!0},c.prototype.setPadding=function(h){this.$padding=h,this.element.style.margin="0 "+h+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(h){this.$fontMetrics=h,this.$fontMetrics.on("changeCharacterSize",(function(m){this._signal("changeCharacterSize",m)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(h){this.session=h,h&&this.$computeTabString()},c.prototype.setShowInvisibles=function(h){return this.showInvisibles==h?!1:(this.showInvisibles=h,typeof h=="string"?(this.showSpaces=/tab/i.test(h),this.showTabs=/space/i.test(h),this.showEOL=/eol/i.test(h)):this.showSpaces=this.showTabs=this.showEOL=h,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(h){return this.displayIndentGuides==h?!1:(this.displayIndentGuides=h,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(h){return this.$highlightIndentGuides===h?!1:(this.$highlightIndentGuides=h,h)},c.prototype.$computeTabString=function(){var h=this.session.getTabSize();this.tabSize=h;for(var m=this.$tabStrings=[0],y=1;y<h+1;y++)if(this.showTabs){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_tab",v.textContent=d.stringRepeat(this.TAB_CHAR,y),m.push(v)}else m.push(this.dom.createTextNode(d.stringRepeat(" ",y),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var w="ace_indent-guide",k=this.showSpaces?" ace_invisible ace_invisible_space":"",_=this.showSpaces?d.stringRepeat(this.SPACE_CHAR,this.tabSize):d.stringRepeat(" ",this.tabSize),S=this.showTabs?" ace_invisible ace_invisible_tab":"",x=this.showTabs?d.stringRepeat(this.TAB_CHAR,this.tabSize):_,v=this.dom.createElement("span");v.className=w+k,v.textContent=_,this.$tabStrings[" "]=v;var v=this.dom.createElement("span");v.className=w+S,v.textContent=x,this.$tabStrings[" "]=v}},c.prototype.updateLines=function(h,m,y){if(this.config.lastRow!=h.lastRow||this.config.firstRow!=h.firstRow)return this.update(h);this.config=h;for(var v=Math.max(m,h.firstRow),w=Math.min(y,h.lastRow),k=this.element.childNodes,_=0,x=h.firstRow;x<v;x++){var L=this.session.getFoldLine(x);if(L){if(L.containsRow(v)){v=L.start.row;break}x=L.end.row}_++}for(var S=!1,x=v,L=this.session.getNextFoldLine(x),I=L?L.start.row:1/0;x>I&&(x=L.end.row+1,L=this.session.getNextFoldLine(x,L),I=L?L.start.row:1/0),!(x>w);){var $=k[_++];if($){this.dom.removeChildren($),this.$renderLine($,x,x==I?L:!1),S&&($.style.top=this.$lines.computeLineTop(x,h,this.session)+"px");var T=h.lineHeight*this.session.getRowLength(x)+"px";$.style.height!=T&&(S=!0,$.style.height=T)}x++}if(S)for(;_<this.$lines.cells.length;){var O=this.$lines.cells[_++];O.element.style.top=this.$lines.computeLineTop(O.row,h,this.session)+"px"}},c.prototype.scrollLines=function(h){var m=this.config;if(this.config=h,this.$lines.pageChanged(m,h))return this.update(h);this.$lines.moveContainer(h);var y=h.lastRow,v=m?m.lastRow:-1;if(!m||v<h.firstRow)return this.update(h);if(y<m.firstRow)return this.update(h);if(!m||m.lastRow<h.firstRow)return this.update(h);if(h.lastRow<m.firstRow)return this.update(h);if(m.firstRow<h.firstRow)for(var w=this.session.getFoldedRowCount(m.firstRow,h.firstRow-1);w>0;w--)this.$lines.shift();if(m.lastRow>h.lastRow)for(var w=this.session.getFoldedRowCount(h.lastRow+1,m.lastRow);w>0;w--)this.$lines.pop();h.firstRow<m.firstRow&&this.$lines.unshift(this.$renderLinesFragment(h,h.firstRow,m.firstRow-1)),h.lastRow>m.lastRow&&this.$lines.push(this.$renderLinesFragment(h,m.lastRow+1,h.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(h,m,y){for(var v=[],w=m,k=this.session.getNextFoldLine(w),_=k?k.start.row:1/0;w>_&&(w=k.end.row+1,k=this.session.getNextFoldLine(w,k),_=k?k.start.row:1/0),!(w>y);){var S=this.$lines.createCell(w,h,this.session),x=S.element;this.dom.removeChildren(x),u.setStyle(x.style,"height",this.$lines.computeLineHeight(w,h,this.session)+"px"),u.setStyle(x.style,"top",this.$lines.computeLineTop(w,h,this.session)+"px"),this.$renderLine(x,w,w==_?k:!1),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",v.push(S),w++}return v},c.prototype.update=function(h){this.$lines.moveContainer(h),this.config=h;for(var m=h.firstRow,y=h.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(h,m,y))},c.prototype.$renderToken=function(h,m,y,v){for(var w=this,k=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,_=this.dom.createFragment(this.element),S,x=0;S=k.exec(v);){var L=S[1],I=S[2],$=S[3],T=S[4],O=S[5];if(!(!w.showSpaces&&I)){var C=x!=S.index?v.slice(x,S.index):"";if(x=S.index+S[0].length,C&&_.appendChild(this.dom.createTextNode(C,this.element)),L){var A=w.session.getScreenTabSize(m+S.index);_.appendChild(w.$tabStrings[A].cloneNode(!0)),m+=A-1}else if(I)if(w.showSpaces){var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_space",M.textContent=d.stringRepeat(w.SPACE_CHAR,I.length),_.appendChild(M)}else _.appendChild(this.dom.createTextNode(I,this.element));else if($){var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_space ace_invalid",M.textContent=d.stringRepeat(w.SPACE_CHAR,$.length),_.appendChild(M)}else if(T){m+=1;var M=this.dom.createElement("span");M.style.width=w.config.characterWidth*2+"px",M.className=w.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",M.textContent=w.showSpaces?w.SPACE_CHAR:T,_.appendChild(M)}else if(O){m+=1;var M=this.dom.createElement("span");M.style.width=w.config.characterWidth*2+"px",M.className="ace_cjk",M.textContent=O,_.appendChild(M)}}}if(_.appendChild(this.dom.createTextNode(x?v.slice(x):v,this.element)),f(y.type))h.appendChild(_);else{var R="ace_"+y.type.replace(/\./g," ace_"),M=this.dom.createElement("span");y.type=="fold"&&(M.style.width=y.value.length*this.config.characterWidth+"px",M.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),M.className=R,M.appendChild(_),h.appendChild(M)}return m+v.length},c.prototype.renderIndentGuide=function(h,m,y){var v=m.search(this.$indentGuideRe);if(v<=0||v>=y)return m;if(m[0]==" "){v-=v%this.tabSize;for(var w=v/this.tabSize,k=0;k<w;k++)h.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),m.substr(v)}if(m[0]==" "){for(var k=0;k<v;k++)h.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),m.substr(v)}return this.$highlightIndentGuide(),m},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var h=this.session.doc.$lines;if(h){var m=this.session.selection.getCursor(),y=/^\s*/.exec(this.session.doc.getLine(m.row))[0].length,v=Math.floor(y/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:v,start:m.row};var w=this.session.$bracketHighlight;if(w){for(var k=this.session.$bracketHighlight.ranges,_=0;_<k.length;_++)if(m.row!==k[_].start.row){this.$highlightIndentGuideMarker.end=k[_].start.row+1,m.row>k[_].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&h[m.row]!==""&&m.column===h[m.row].length){this.$highlightIndentGuideMarker.dir=1;for(var _=m.row+1;_<h.length;_++){var S=h[_],x=/^\s*/.exec(S)[0].length;if(S!==""&&(this.$highlightIndentGuideMarker.end=_,x<=y))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){var h=this.element.querySelectorAll(".ace_indent-guide-active");h.forEach(function(m){m.classList.remove("ace_indent-guide-active")})},c.prototype.$setIndentGuideActive=function(h,m){var y=this.session.doc.getLine(h.row);if(y!==""){var v=h.element;if(h.element.classList&&h.element.classList.contains("ace_line_group")){if(!(h.element.childNodes.length>0))return;v=h.element.childNodes[0]}var w=v.childNodes;if(w){var k=w[m-1];k&&k.classList&&k.classList.contains("ace_indent-guide")&&k.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var h=this.$lines.cells;this.$clearActiveIndentGuide();var m=this.$highlightIndentGuideMarker.indentLevel;if(m!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var y=0;y<h.length;y++){var v=h[y];if(this.$highlightIndentGuideMarker.end&&v.row>=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,m)}}else for(var y=h.length-1;y>=0;y--){var v=h[y];if(this.$highlightIndentGuideMarker.end&&v.row<this.$highlightIndentGuideMarker.start){if(v.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,m)}}}},c.prototype.$createLineElement=function(h){var m=this.dom.createElement("div");return m.className="ace_line",m.style.height=this.config.lineHeight+"px",m},c.prototype.$renderWrappedLine=function(h,m,y){var v=0,w=0,k=y[0],_=0,S=this.$createLineElement();h.appendChild(S);for(var x=0;x<m.length;x++){var L=m[x],I=L.value;if(x==0&&this.displayIndentGuides){if(v=I.length,I=this.renderIndentGuide(S,I,k),!I)continue;v-=I.length}if(v+I.length<k)_=this.$renderToken(S,_,L,I),v+=I.length;else{for(;v+I.length>=k;)_=this.$renderToken(S,_,L,I.substring(0,k-v)),I=I.substring(k-v),v=k,S=this.$createLineElement(),h.appendChild(S),S.appendChild(this.dom.createTextNode(d.stringRepeat(" ",y.indent),this.element)),w++,_=0,k=y[w]||Number.MAX_VALUE;I.length!=0&&(v+=I.length,_=this.$renderToken(S,_,L,I))}}y[y.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,_,null,"",!0)},c.prototype.$renderSimpleLine=function(h,m){for(var y=0,v=0;v<m.length;v++){var w=m[v],k=w.value;if(!(v==0&&this.displayIndentGuides&&(k=this.renderIndentGuide(h,k),!k))){if(y+k.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(h,y,w,k);y=this.$renderToken(h,y,w,k)}}},c.prototype.$renderOverflowMessage=function(h,m,y,v,w){y&&this.$renderToken(h,m,y,v.slice(0,this.MAX_LINE_LENGTH-m));var k=this.dom.createElement("span");k.className="ace_inline_button ace_keyword ace_toggle_wrap",k.textContent=w?"<hide>":"<click to see more...>",h.appendChild(k)},c.prototype.$renderLine=function(h,m,y){if(!y&&y!=0&&(y=this.session.getFoldLine(m)),y)var v=this.$getFoldLineTokens(m,y);else var v=this.session.getTokens(m);var w=h;if(v.length){var k=this.session.getRowSplitData(m);if(k&&k.length){this.$renderWrappedLine(h,v,k);var w=h.lastChild}else{var w=h;this.$useLineGroups()&&(w=this.$createLineElement(),h.appendChild(w)),this.$renderSimpleLine(w,v)}}else this.$useLineGroups()&&(w=this.$createLineElement(),h.appendChild(w));if(this.showEOL&&w){y&&(m=y.end.row);var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_eol",_.textContent=m==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,w.appendChild(_)}},c.prototype.$getFoldLineTokens=function(h,m){function y(_,S,x){for(var L=0,I=0;I+_[L].value.length<S;)if(I+=_[L].value.length,L++,L==_.length)return;if(I!=S){var $=_[L].value.substring(S-I);$.length>x-S&&($=$.substring(0,x-S)),w.push({type:_[L].type,value:$}),I=S+$.length,L+=1}for(;I<x&&L<_.length;){var $=_[L].value;$.length+I>x?w.push({type:_[L].type,value:$.substring(0,x-I)}):w.push(_[L]),I+=$.length,L+=1}}var v=this.session,w=[],k=v.getTokens(h);return m.walk(function(_,S,x,L,I){_!=null?w.push({type:"fold",value:_}):(I&&(k=v.getTokens(S)),k.length&&y(k,L,x))},m.end.row,this.session.getLine(m.end.row).length),w},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c}();a.prototype.EOF_CHAR="¶",a.prototype.EOL_CHAR_LF="¬",a.prototype.EOL_CHAR_CRLF="¤",a.prototype.EOL_CHAR=a.prototype.EOL_CHAR_LF,a.prototype.TAB_CHAR="—",a.prototype.SPACE_CHAR="·",a.prototype.$padding=0,a.prototype.MAX_LINE_LENGTH=1e4,a.prototype.showInvisibles=!1,a.prototype.showSpaces=!1,a.prototype.showTabs=!1,a.prototype.showEOL=!1,a.prototype.displayIndentGuides=!0,a.prototype.$highlightIndentGuides=!0,a.prototype.$tabStrings=[],a.prototype.destroy={},a.prototype.onChangeTabSize=a.prototype.$computeTabString,o.implement(a.prototype,p),i.Text=a}),(void 0)("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,i,s){var o=t("../lib/dom"),u=function(){function d(l){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(l){for(var p=this.cursors,r=p.length;r--;)o.setStyle(p[r].style,"opacity",l?"":"0")},d.prototype.$startCssAnimation=function(){for(var l=this.cursors,p=l.length;p--;)l[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&o.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,o.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(l){this.$padding=l},d.prototype.setSession=function(l){this.session=l},d.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},d.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},d.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,o.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var l=o.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},d.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},d.prototype.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,o.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&o.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),o.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var p=(function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){l(!0),p()},this.blinkInterval),p()}},d.prototype.getPixelPosition=function(l,p){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(l),f=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,l.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),a=(r.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:f,top:a}},d.prototype.isCursorInView=function(l,p){return l.top>=0&&l.top<p.maxHeight},d.prototype.update=function(l){this.config=l;var p=this.session.$selectionMarkers,r=0,f=0;(p===void 0||p.length===0)&&(p=[{cursor:null}]);for(var r=0,a=p.length;r<a;r++){var c=this.getPixelPosition(p[r].cursor,!0);if(!((c.top>l.height+l.offset||c.top<0)&&r>1)){var h=this.cursors[f++]||this.addCursor(),m=h.style;this.drawCursor?this.drawCursor(h,c,l,p[r],this.session):this.isCursorInView(c,l)?(o.setStyle(m,"display","block"),o.translate(h,c.left,c.top),o.setStyle(m,"width",Math.round(l.characterWidth)+"px"),o.setStyle(m,"height",l.lineHeight+"px")):o.setStyle(m,"display","none")}}for(;this.cursors.length>f;)this.removeCursor();var y=this.session.getOverwrite();this.$setOverwrite(y),this.$pixelPos=c,this.restartTimer()},d.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d}();u.prototype.$padding=0,u.prototype.drawCursor=null,i.Cursor=u}),(void 0)("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,i,s){var o=this&&this.__extends||function(){var h=function(m,y){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var k in w)Object.prototype.hasOwnProperty.call(w,k)&&(v[k]=w[k])},h(m,y)};return function(m,y){function v(){this.constructor=m}if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");h(m,y),m.prototype=y===null?Object.create(y):(v.prototype=y.prototype,new v)}}(),u=t("./lib/oop"),d=t("./lib/dom"),l=t("./lib/event"),p=t("./lib/event_emitter").EventEmitter,r=32768,f=function(){function h(m,y){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+y,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),m.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return h.prototype.setVisible=function(m){this.element.style.display=m?"":"none",this.isVisible=m,this.coeff=1},h}();u.implement(f.prototype,p);var a=function(h){function m(y,v){var w=h.call(this,y,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,v.$scrollbarWidth=w.width=d.scrollbarWidth(y.ownerDocument),w.inner.style.width=w.element.style.width=(w.width||15)+5+"px",w.$minWidth=0,w}return o(m,h),m.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var y=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-y)/(this.coeff-y)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},m.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},m.prototype.setHeight=function(y){this.element.style.height=y+"px"},m.prototype.setScrollHeight=function(y){this.scrollHeight=y,y>r?(this.coeff=r/y,y=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=y+"px"},m.prototype.setScrollTop=function(y){this.scrollTop!=y&&(this.skipEvent=!0,this.scrollTop=y,this.element.scrollTop=y*this.coeff)},m}(f);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var c=function(h){function m(y,v){var w=h.call(this,y,"-h")||this;return w.scrollLeft=0,w.height=v.$scrollbarWidth,w.inner.style.height=w.element.style.height=(w.height||15)+5+"px",w}return o(m,h),m.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},m.prototype.getHeight=function(){return this.isVisible?this.height:0},m.prototype.setWidth=function(y){this.element.style.width=y+"px"},m.prototype.setInnerWidth=function(y){this.inner.style.width=y+"px"},m.prototype.setScrollWidth=function(y){this.inner.style.width=y+"px"},m.prototype.setScrollLeft=function(y){this.scrollLeft!=y&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=y)},m}(f);i.ScrollBar=a,i.ScrollBarV=a,i.ScrollBarH=c,i.VScrollBar=a,i.HScrollBar=c}),(void 0)("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,i,s){var o=this&&this.__extends||function(){var c=function(h,m){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,v){y.__proto__=v}||function(y,v){for(var w in v)Object.prototype.hasOwnProperty.call(v,w)&&(y[w]=v[w])},c(h,m)};return function(h,m){function y(){this.constructor=h}if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");c(h,m),h.prototype=m===null?Object.create(m):(y.prototype=m.prototype,new y)}}(),u=t("./lib/oop"),d=t("./lib/dom"),l=t("./lib/event"),p=t("./lib/event_emitter").EventEmitter;d.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
342
|
+
position: absolute;
|
|
343
|
+
background: rgba(128, 128, 128, 0.6);
|
|
344
|
+
-moz-box-sizing: border-box;
|
|
345
|
+
box-sizing: border-box;
|
|
346
|
+
border: 1px solid #bbb;
|
|
347
|
+
border-radius: 2px;
|
|
348
|
+
z-index: 8;
|
|
349
|
+
}
|
|
350
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
|
351
|
+
position: absolute;
|
|
352
|
+
z-index: 6;
|
|
353
|
+
background: none;
|
|
354
|
+
overflow: hidden!important;
|
|
355
|
+
}
|
|
356
|
+
.ace_editor>.ace_sb-v {
|
|
357
|
+
z-index: 6;
|
|
358
|
+
right: 0;
|
|
359
|
+
top: 0;
|
|
360
|
+
width: 12px;
|
|
361
|
+
}
|
|
362
|
+
.ace_editor>.ace_sb-v div {
|
|
363
|
+
z-index: 8;
|
|
364
|
+
right: 0;
|
|
365
|
+
width: 100%;
|
|
366
|
+
}
|
|
367
|
+
.ace_editor>.ace_sb-h {
|
|
368
|
+
bottom: 0;
|
|
369
|
+
left: 0;
|
|
370
|
+
height: 12px;
|
|
371
|
+
}
|
|
372
|
+
.ace_editor>.ace_sb-h div {
|
|
373
|
+
bottom: 0;
|
|
374
|
+
height: 100%;
|
|
375
|
+
}
|
|
376
|
+
.ace_editor>.ace_sb_grabbed {
|
|
377
|
+
z-index: 8;
|
|
378
|
+
background: #000;
|
|
379
|
+
}`,"ace_scrollbar.css",!1);var r=function(){function c(h,m){this.element=d.createElement("div"),this.element.className="ace_sb"+m,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,h.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(h){this.element.style.display=h?"":"none",this.isVisible=h,this.coeff=1},c}();u.implement(r.prototype,p);var f=function(c){function h(m,y){var v=c.call(this,m,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=m,v.width=v.VScrollWidth,v.renderer=y,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return o(h,c),h.prototype.onMouseDown=function(m,y){if(m==="mousedown"&&!(l.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var v=this,w=y.clientY,k=function(T){w=T.clientY},_=function(){clearInterval(I)},S=y.clientY,x=this.thumbTop,L=function(){if(w!==void 0){var T=v.scrollTopFromThumbTop(x+w-S);T!==v.scrollTop&&v._emit("scroll",{data:T})}};l.capture(this.inner,k,_);var I=setInterval(L,20);return l.preventDefault(y)}var $=y.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),l.preventDefault(y)}},h.prototype.getHeight=function(){return this.height},h.prototype.scrollTopFromThumbTop=function(m){var y=m*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return y>>=0,y<0?y=0:y>this.pageHeight-this.viewHeight&&(y=this.pageHeight-this.viewHeight),y},h.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},h.prototype.setHeight=function(m){this.height=Math.max(0,m),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},h.prototype.setScrollHeight=function(m,y){this.pageHeight===m&&!y||(this.pageHeight=m,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})))},h.prototype.setScrollTop=function(m){this.scrollTop=m,m<0&&(m=0),this.thumbTop=m*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},h}(r);f.prototype.setInnerHeight=f.prototype.setScrollHeight;var a=function(c){function h(m,y){var v=c.call(this,m,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=y,v}return o(h,c),h.prototype.onMouseDown=function(m,y){if(m==="mousedown"&&!(l.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var v=this,w=y.clientX,k=function(T){w=T.clientX},_=function(){clearInterval(I)},S=y.clientX,x=this.thumbLeft,L=function(){if(w!==void 0){var T=v.scrollLeftFromThumbLeft(x+w-S);T!==v.scrollLeft&&v._emit("scroll",{data:T})}};l.capture(this.inner,k,_);var I=setInterval(L,20);return l.preventDefault(y)}var $=y.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),l.preventDefault(y)}},h.prototype.getHeight=function(){return this.isVisible?this.height:0},h.prototype.scrollLeftFromThumbLeft=function(m){var y=m*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return y>>=0,y<0?y=0:y>this.pageWidth-this.viewWidth&&(y=this.pageWidth-this.viewWidth),y},h.prototype.setWidth=function(m){this.width=Math.max(0,m),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},h.prototype.setScrollWidth=function(m,y){this.pageWidth===m&&!y||(this.pageWidth=m,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})))},h.prototype.setScrollLeft=function(m){this.scrollLeft=m,m<0&&(m=0),this.thumbLeft=m*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},h}(r);a.prototype.setInnerWidth=a.prototype.setScrollWidth,i.ScrollBar=f,i.ScrollBarV=f,i.ScrollBarH=a,i.VScrollBar=f,i.HScrollBar=a}),(void 0)("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,i,s){var o=t("./lib/event"),u=function(){function d(l,p){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=p||window;var r=this;this._flush=function(f){r.pending=!1;var a=r.changes;if(a&&(o.blockIdle(100),r.changes=0,r.onRender(a)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return d.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(o.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(l){var p=this.changes;return this.changes=0,p},d}();i.RenderLoop=u}),(void 0)("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,i,s){var o=t("../lib/oop"),u=t("../lib/dom"),d=t("../lib/lang"),l=t("../lib/event"),p=t("../lib/useragent"),r=t("../lib/event_emitter").EventEmitter,f=512,a=typeof ResizeObserver=="function",c=200,h=function(){function m(y){this.el=u.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=u.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=u.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),y.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",f),this.$characterSize={width:0,height:0},a?this.$addObserver():this.checkForSizeChanges()}return m.prototype.$setMeasureNodeStyles=function(y,v){y.width=y.height="auto",y.left=y.top="0px",y.visibility="hidden",y.position="absolute",y.whiteSpace="pre",p.isIE<8?y["font-family"]="inherit":y.font="inherit",y.overflow=v?"hidden":"visible"},m.prototype.checkForSizeChanges=function(y){if(y===void 0&&(y=this.$measureSizes()),y&&(this.$characterSize.width!==y.width||this.$characterSize.height!==y.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=y,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===y.width&&v.height===y.height,this._emit("changeCharacterSize",{data:y})}},m.prototype.$addObserver=function(){var y=this;this.$observer=new window.ResizeObserver(function(v){y.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},m.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var y=this;return this.$pollSizeChangesTimer=l.onIdle(function v(){y.checkForSizeChanges(),l.onIdle(v,500)},500)},m.prototype.setPolling=function(y){y?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},m.prototype.$measureSizes=function(y){var v={height:(y||this.$measureNode).clientHeight,width:(y||this.$measureNode).clientWidth/f};return v.width===0||v.height===0?null:v},m.prototype.$measureCharWidth=function(y){this.$main.textContent=d.stringRepeat(y,f);var v=this.$main.getBoundingClientRect();return v.width/f},m.prototype.getCharacterWidth=function(y){var v=this.charSizes[y];return v===void 0&&(v=this.charSizes[y]=this.$measureCharWidth(y)/this.$characterSize.width),v},m.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},m.prototype.$getZoom=function(y){return!y||!y.parentElement?1:(Number(window.getComputedStyle(y).zoom)||1)*this.$getZoom(y.parentElement)},m.prototype.$initTransformMeasureNodes=function(){var y=function(v,w){return["div",{style:"position: absolute;top:"+v+"px;left:"+w+"px;"}]};this.els=u.buildDom([y(0,0),y(c,0),y(0,c),y(c,c)],this.el)},m.prototype.transformCoordinates=function(y,v){function w(K,re,fe){var U=K[1]*re[0]-K[0]*re[1];return[(-re[1]*fe[0]+re[0]*fe[1])/U,(+K[1]*fe[0]-K[0]*fe[1])/U]}function k(K,re){return[K[0]-re[0],K[1]-re[1]]}function _(K,re){return[K[0]+re[0],K[1]+re[1]]}function S(K,re){return[K*re[0],K*re[1]]}function x(K){var re=K.getBoundingClientRect();return[re.left,re.top]}if(y){var L=this.$getZoom(this.el);y=S(1/L,y)}this.els||this.$initTransformMeasureNodes();var I=x(this.els[0]),$=x(this.els[1]),T=x(this.els[2]),O=x(this.els[3]),C=w(k(O,$),k(O,T),k(_($,T),_(O,I))),A=S(1+C[0],k($,I)),M=S(1+C[1],k(T,I));if(v){var R=v,N=C[0]*R[0]/c+C[1]*R[1]/c+1,H=_(S(R[0],A),S(R[1],M));return _(S(1/N/c,H),I)}var z=k(y,I),Y=w(k(A,S(C[0],z)),k(M,S(C[1],z)),z);return S(c,Y)},m}();h.prototype.$characterSize={width:0,height:0},o.implement(h.prototype,r),i.FontMetrics=h}),(void 0)("ace/css/editor-css",["require","exports","module"],function(t,i,s){s.exports=`
|
|
380
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
|
381
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
|
382
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
383
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
|
384
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
|
385
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
|
386
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
|
387
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
|
388
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
|
389
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
|
390
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
391
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
392
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
393
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
394
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
.ace_editor {
|
|
398
|
+
position: relative;
|
|
399
|
+
overflow: hidden;
|
|
400
|
+
padding: 0;
|
|
401
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
|
402
|
+
direction: ltr;
|
|
403
|
+
text-align: left;
|
|
404
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
405
|
+
forced-color-adjust: none;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.ace_scroller {
|
|
409
|
+
position: absolute;
|
|
410
|
+
overflow: hidden;
|
|
411
|
+
top: 0;
|
|
412
|
+
bottom: 0;
|
|
413
|
+
background-color: inherit;
|
|
414
|
+
-ms-user-select: none;
|
|
415
|
+
-moz-user-select: none;
|
|
416
|
+
-webkit-user-select: none;
|
|
417
|
+
user-select: none;
|
|
418
|
+
cursor: text;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.ace_content {
|
|
422
|
+
position: absolute;
|
|
423
|
+
box-sizing: border-box;
|
|
424
|
+
min-width: 100%;
|
|
425
|
+
contain: style size layout;
|
|
426
|
+
font-variant-ligatures: no-common-ligatures;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.ace_keyboard-focus:focus {
|
|
430
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
|
431
|
+
outline: none;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.ace_dragging .ace_scroller:before{
|
|
435
|
+
position: absolute;
|
|
436
|
+
top: 0;
|
|
437
|
+
left: 0;
|
|
438
|
+
right: 0;
|
|
439
|
+
bottom: 0;
|
|
440
|
+
content: '';
|
|
441
|
+
background: rgba(250, 250, 250, 0.01);
|
|
442
|
+
z-index: 1000;
|
|
443
|
+
}
|
|
444
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
|
445
|
+
background: rgba(0, 0, 0, 0.01);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.ace_gutter {
|
|
449
|
+
position: absolute;
|
|
450
|
+
overflow : hidden;
|
|
451
|
+
width: auto;
|
|
452
|
+
top: 0;
|
|
453
|
+
bottom: 0;
|
|
454
|
+
left: 0;
|
|
455
|
+
cursor: default;
|
|
456
|
+
z-index: 4;
|
|
457
|
+
-ms-user-select: none;
|
|
458
|
+
-moz-user-select: none;
|
|
459
|
+
-webkit-user-select: none;
|
|
460
|
+
user-select: none;
|
|
461
|
+
contain: style size layout;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.ace_gutter-active-line {
|
|
465
|
+
position: absolute;
|
|
466
|
+
left: 0;
|
|
467
|
+
right: 0;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.ace_scroller.ace_scroll-left:after {
|
|
471
|
+
content: "";
|
|
472
|
+
position: absolute;
|
|
473
|
+
top: 0;
|
|
474
|
+
right: 0;
|
|
475
|
+
bottom: 0;
|
|
476
|
+
left: 0;
|
|
477
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
478
|
+
pointer-events: none;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
|
482
|
+
position: absolute;
|
|
483
|
+
top: 0;
|
|
484
|
+
left: 0;
|
|
485
|
+
right: 0;
|
|
486
|
+
padding-left: 19px;
|
|
487
|
+
padding-right: 6px;
|
|
488
|
+
background-repeat: no-repeat;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
|
492
|
+
margin-left: -14px;
|
|
493
|
+
float: left;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
|
497
|
+
margin-left: -19px;
|
|
498
|
+
float: left;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.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 {
|
|
502
|
+
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==");
|
|
503
|
+
background-repeat: no-repeat;
|
|
504
|
+
background-position: 2px center;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
|
508
|
+
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==");
|
|
509
|
+
background-repeat: no-repeat;
|
|
510
|
+
background-position: 2px center;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
|
514
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
515
|
+
background-repeat: no-repeat;
|
|
516
|
+
background-position: 2px center;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.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 {
|
|
520
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.ace_icon_svg.ace_error {
|
|
524
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
|
525
|
+
background-color: crimson;
|
|
526
|
+
}
|
|
527
|
+
.ace_icon_svg.ace_security {
|
|
528
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
|
529
|
+
background-color: crimson;
|
|
530
|
+
}
|
|
531
|
+
.ace_icon_svg.ace_warning {
|
|
532
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
|
533
|
+
background-color: darkorange;
|
|
534
|
+
}
|
|
535
|
+
.ace_icon_svg.ace_info {
|
|
536
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
|
537
|
+
background-color: royalblue;
|
|
538
|
+
}
|
|
539
|
+
.ace_icon_svg.ace_hint {
|
|
540
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
|
541
|
+
background-color: silver;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.ace_icon_svg.ace_error_fold {
|
|
545
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
546
|
+
background-color: crimson;
|
|
547
|
+
}
|
|
548
|
+
.ace_icon_svg.ace_security_fold {
|
|
549
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
550
|
+
background-color: crimson;
|
|
551
|
+
}
|
|
552
|
+
.ace_icon_svg.ace_warning_fold {
|
|
553
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
|
554
|
+
background-color: darkorange;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.ace_scrollbar {
|
|
558
|
+
contain: strict;
|
|
559
|
+
position: absolute;
|
|
560
|
+
right: 0;
|
|
561
|
+
bottom: 0;
|
|
562
|
+
z-index: 6;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.ace_scrollbar-inner {
|
|
566
|
+
position: absolute;
|
|
567
|
+
cursor: text;
|
|
568
|
+
left: 0;
|
|
569
|
+
top: 0;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.ace_scrollbar-v{
|
|
573
|
+
overflow-x: hidden;
|
|
574
|
+
overflow-y: scroll;
|
|
575
|
+
top: 0;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.ace_scrollbar-h {
|
|
579
|
+
overflow-x: scroll;
|
|
580
|
+
overflow-y: hidden;
|
|
581
|
+
left: 0;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.ace_print-margin {
|
|
585
|
+
position: absolute;
|
|
586
|
+
height: 100%;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.ace_text-input {
|
|
590
|
+
position: absolute;
|
|
591
|
+
z-index: 0;
|
|
592
|
+
width: 0.5em;
|
|
593
|
+
height: 1em;
|
|
594
|
+
opacity: 0;
|
|
595
|
+
background: transparent;
|
|
596
|
+
-moz-appearance: none;
|
|
597
|
+
appearance: none;
|
|
598
|
+
border: none;
|
|
599
|
+
resize: none;
|
|
600
|
+
outline: none;
|
|
601
|
+
overflow: hidden;
|
|
602
|
+
font: inherit;
|
|
603
|
+
padding: 0 1px;
|
|
604
|
+
margin: 0 -1px;
|
|
605
|
+
contain: strict;
|
|
606
|
+
-ms-user-select: text;
|
|
607
|
+
-moz-user-select: text;
|
|
608
|
+
-webkit-user-select: text;
|
|
609
|
+
user-select: text;
|
|
610
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
|
611
|
+
white-space: pre!important;
|
|
612
|
+
}
|
|
613
|
+
.ace_text-input.ace_composition {
|
|
614
|
+
background: transparent;
|
|
615
|
+
color: inherit;
|
|
616
|
+
z-index: 1000;
|
|
617
|
+
opacity: 1;
|
|
618
|
+
}
|
|
619
|
+
.ace_composition_placeholder { color: transparent }
|
|
620
|
+
.ace_composition_marker {
|
|
621
|
+
border-bottom: 1px solid;
|
|
622
|
+
position: absolute;
|
|
623
|
+
border-radius: 0;
|
|
624
|
+
margin-top: 1px;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
[ace_nocontext=true] {
|
|
628
|
+
transform: none!important;
|
|
629
|
+
filter: none!important;
|
|
630
|
+
clip-path: none!important;
|
|
631
|
+
mask : none!important;
|
|
632
|
+
contain: none!important;
|
|
633
|
+
perspective: none!important;
|
|
634
|
+
mix-blend-mode: initial!important;
|
|
635
|
+
z-index: auto;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.ace_layer {
|
|
639
|
+
z-index: 1;
|
|
640
|
+
position: absolute;
|
|
641
|
+
overflow: hidden;
|
|
642
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
|
643
|
+
word-wrap: normal;
|
|
644
|
+
white-space: pre;
|
|
645
|
+
height: 100%;
|
|
646
|
+
width: 100%;
|
|
647
|
+
box-sizing: border-box;
|
|
648
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
|
649
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
|
650
|
+
pointer-events: none;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.ace_gutter-layer {
|
|
654
|
+
position: relative;
|
|
655
|
+
width: auto;
|
|
656
|
+
text-align: right;
|
|
657
|
+
pointer-events: auto;
|
|
658
|
+
height: 1000000px;
|
|
659
|
+
contain: style size layout;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.ace_text-layer {
|
|
663
|
+
font: inherit !important;
|
|
664
|
+
position: absolute;
|
|
665
|
+
height: 1000000px;
|
|
666
|
+
width: 1000000px;
|
|
667
|
+
contain: style size layout;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
|
671
|
+
contain: style size layout;
|
|
672
|
+
position: absolute;
|
|
673
|
+
top: 0;
|
|
674
|
+
left: 0;
|
|
675
|
+
right: 0;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.ace_hidpi .ace_text-layer,
|
|
679
|
+
.ace_hidpi .ace_gutter-layer,
|
|
680
|
+
.ace_hidpi .ace_content,
|
|
681
|
+
.ace_hidpi .ace_gutter {
|
|
682
|
+
contain: strict;
|
|
683
|
+
}
|
|
684
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
|
685
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
|
686
|
+
contain: strict;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.ace_cjk {
|
|
690
|
+
display: inline-block;
|
|
691
|
+
text-align: center;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.ace_cursor-layer {
|
|
695
|
+
z-index: 4;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.ace_cursor {
|
|
699
|
+
z-index: 4;
|
|
700
|
+
position: absolute;
|
|
701
|
+
box-sizing: border-box;
|
|
702
|
+
border-left: 2px solid;
|
|
703
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
|
704
|
+
transform: translatez(0);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.ace_multiselect .ace_cursor {
|
|
708
|
+
border-left-width: 1px;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.ace_slim-cursors .ace_cursor {
|
|
712
|
+
border-left-width: 1px;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.ace_overwrite-cursors .ace_cursor {
|
|
716
|
+
border-left-width: 0;
|
|
717
|
+
border-bottom: 1px solid;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.ace_hidden-cursors .ace_cursor {
|
|
721
|
+
opacity: 0.2;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
|
725
|
+
opacity: 0;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.ace_smooth-blinking .ace_cursor {
|
|
729
|
+
transition: opacity 0.18s;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.ace_animate-blinking .ace_cursor {
|
|
733
|
+
animation-duration: 1000ms;
|
|
734
|
+
animation-timing-function: step-end;
|
|
735
|
+
animation-name: blink-ace-animate;
|
|
736
|
+
animation-iteration-count: infinite;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
|
740
|
+
animation-duration: 1000ms;
|
|
741
|
+
animation-timing-function: ease-in-out;
|
|
742
|
+
animation-name: blink-ace-animate-smooth;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
@keyframes blink-ace-animate {
|
|
746
|
+
from, to { opacity: 1; }
|
|
747
|
+
60% { opacity: 0; }
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
@keyframes blink-ace-animate-smooth {
|
|
751
|
+
from, to { opacity: 1; }
|
|
752
|
+
45% { opacity: 1; }
|
|
753
|
+
60% { opacity: 0; }
|
|
754
|
+
85% { opacity: 0; }
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
|
758
|
+
position: absolute;
|
|
759
|
+
z-index: 3;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.ace_marker-layer .ace_selection {
|
|
763
|
+
position: absolute;
|
|
764
|
+
z-index: 5;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.ace_marker-layer .ace_bracket {
|
|
768
|
+
position: absolute;
|
|
769
|
+
z-index: 6;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.ace_marker-layer .ace_error_bracket {
|
|
773
|
+
position: absolute;
|
|
774
|
+
border-bottom: 1px solid #DE5555;
|
|
775
|
+
border-radius: 0;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.ace_marker-layer .ace_active-line {
|
|
779
|
+
position: absolute;
|
|
780
|
+
z-index: 2;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.ace_marker-layer .ace_selected-word {
|
|
784
|
+
position: absolute;
|
|
785
|
+
z-index: 4;
|
|
786
|
+
box-sizing: border-box;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.ace_line .ace_fold {
|
|
790
|
+
box-sizing: border-box;
|
|
791
|
+
|
|
792
|
+
display: inline-block;
|
|
793
|
+
height: 11px;
|
|
794
|
+
margin-top: -2px;
|
|
795
|
+
vertical-align: middle;
|
|
796
|
+
|
|
797
|
+
background-image:
|
|
798
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
799
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
|
800
|
+
background-repeat: no-repeat, repeat-x;
|
|
801
|
+
background-position: center center, top left;
|
|
802
|
+
color: transparent;
|
|
803
|
+
|
|
804
|
+
border: 1px solid black;
|
|
805
|
+
border-radius: 2px;
|
|
806
|
+
|
|
807
|
+
cursor: pointer;
|
|
808
|
+
pointer-events: auto;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.ace_dark .ace_fold {
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
.ace_fold:hover{
|
|
815
|
+
background-image:
|
|
816
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
817
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.ace_tooltip {
|
|
821
|
+
background-color: #f5f5f5;
|
|
822
|
+
border: 1px solid gray;
|
|
823
|
+
border-radius: 1px;
|
|
824
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
825
|
+
color: black;
|
|
826
|
+
max-width: 100%;
|
|
827
|
+
padding: 3px 4px;
|
|
828
|
+
position: fixed;
|
|
829
|
+
z-index: 999999;
|
|
830
|
+
box-sizing: border-box;
|
|
831
|
+
cursor: default;
|
|
832
|
+
white-space: pre-wrap;
|
|
833
|
+
word-wrap: break-word;
|
|
834
|
+
line-height: normal;
|
|
835
|
+
font-style: normal;
|
|
836
|
+
font-weight: normal;
|
|
837
|
+
letter-spacing: normal;
|
|
838
|
+
pointer-events: none;
|
|
839
|
+
overflow: auto;
|
|
840
|
+
max-width: min(60em, 66vw);
|
|
841
|
+
overscroll-behavior: contain;
|
|
842
|
+
}
|
|
843
|
+
.ace_tooltip pre {
|
|
844
|
+
white-space: pre-wrap;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.ace_tooltip.ace_dark {
|
|
848
|
+
background-color: #636363;
|
|
849
|
+
color: #fff;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.ace_tooltip:focus {
|
|
853
|
+
outline: 1px solid #5E9ED6;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.ace_icon {
|
|
857
|
+
display: inline-block;
|
|
858
|
+
width: 18px;
|
|
859
|
+
vertical-align: top;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.ace_icon_svg {
|
|
863
|
+
display: inline-block;
|
|
864
|
+
width: 12px;
|
|
865
|
+
vertical-align: top;
|
|
866
|
+
-webkit-mask-repeat: no-repeat;
|
|
867
|
+
-webkit-mask-size: 12px;
|
|
868
|
+
-webkit-mask-position: center;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
|
872
|
+
padding-right: 13px;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
.ace_fold-widget {
|
|
876
|
+
box-sizing: border-box;
|
|
877
|
+
|
|
878
|
+
margin: 0 -12px 0 1px;
|
|
879
|
+
display: none;
|
|
880
|
+
width: 11px;
|
|
881
|
+
vertical-align: top;
|
|
882
|
+
|
|
883
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
|
884
|
+
background-repeat: no-repeat;
|
|
885
|
+
background-position: center;
|
|
886
|
+
|
|
887
|
+
border-radius: 3px;
|
|
888
|
+
|
|
889
|
+
border: 1px solid transparent;
|
|
890
|
+
cursor: pointer;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.ace_folding-enabled .ace_fold-widget {
|
|
894
|
+
display: inline-block;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
.ace_fold-widget.ace_end {
|
|
898
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.ace_fold-widget.ace_closed {
|
|
902
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.ace_fold-widget:hover {
|
|
906
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
907
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
908
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
.ace_fold-widget:active {
|
|
912
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
913
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
914
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Dark version for fold widgets
|
|
918
|
+
*/
|
|
919
|
+
.ace_dark .ace_fold-widget {
|
|
920
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
921
|
+
}
|
|
922
|
+
.ace_dark .ace_fold-widget.ace_end {
|
|
923
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
924
|
+
}
|
|
925
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
|
926
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
927
|
+
}
|
|
928
|
+
.ace_dark .ace_fold-widget:hover {
|
|
929
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
930
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
931
|
+
}
|
|
932
|
+
.ace_dark .ace_fold-widget:active {
|
|
933
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
.ace_inline_button {
|
|
937
|
+
border: 1px solid lightgray;
|
|
938
|
+
display: inline-block;
|
|
939
|
+
margin: -1px 8px;
|
|
940
|
+
padding: 0 5px;
|
|
941
|
+
pointer-events: auto;
|
|
942
|
+
cursor: pointer;
|
|
943
|
+
}
|
|
944
|
+
.ace_inline_button:hover {
|
|
945
|
+
border-color: gray;
|
|
946
|
+
background: rgba(200,200,200,0.2);
|
|
947
|
+
display: inline-block;
|
|
948
|
+
pointer-events: auto;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
.ace_fold-widget.ace_invalid {
|
|
952
|
+
background-color: #FFB4B4;
|
|
953
|
+
border-color: #DE5555;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
|
957
|
+
transition: opacity 0.4s ease 0.05s;
|
|
958
|
+
opacity: 0;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
962
|
+
transition: opacity 0.05s ease 0.05s;
|
|
963
|
+
opacity:1;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.ace_underline {
|
|
967
|
+
text-decoration: underline;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.ace_bold {
|
|
971
|
+
font-weight: bold;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
.ace_nobold .ace_bold {
|
|
975
|
+
font-weight: normal;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.ace_italic {
|
|
979
|
+
font-style: italic;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
.ace_error-marker {
|
|
984
|
+
background-color: rgba(255, 0, 0,0.2);
|
|
985
|
+
position: absolute;
|
|
986
|
+
z-index: 9;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
.ace_highlight-marker {
|
|
990
|
+
background-color: rgba(255, 255, 0,0.2);
|
|
991
|
+
position: absolute;
|
|
992
|
+
z-index: 8;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
.ace_mobile-menu {
|
|
996
|
+
position: absolute;
|
|
997
|
+
line-height: 1.5;
|
|
998
|
+
border-radius: 4px;
|
|
999
|
+
-ms-user-select: none;
|
|
1000
|
+
-moz-user-select: none;
|
|
1001
|
+
-webkit-user-select: none;
|
|
1002
|
+
user-select: none;
|
|
1003
|
+
background: white;
|
|
1004
|
+
box-shadow: 1px 3px 2px grey;
|
|
1005
|
+
border: 1px solid #dcdcdc;
|
|
1006
|
+
color: black;
|
|
1007
|
+
}
|
|
1008
|
+
.ace_dark > .ace_mobile-menu {
|
|
1009
|
+
background: #333;
|
|
1010
|
+
color: #ccc;
|
|
1011
|
+
box-shadow: 1px 3px 2px grey;
|
|
1012
|
+
border: 1px solid #444;
|
|
1013
|
+
|
|
1014
|
+
}
|
|
1015
|
+
.ace_mobile-button {
|
|
1016
|
+
padding: 2px;
|
|
1017
|
+
cursor: pointer;
|
|
1018
|
+
overflow: hidden;
|
|
1019
|
+
}
|
|
1020
|
+
.ace_mobile-button:hover {
|
|
1021
|
+
background-color: #eee;
|
|
1022
|
+
opacity:1;
|
|
1023
|
+
}
|
|
1024
|
+
.ace_mobile-button:active {
|
|
1025
|
+
background-color: #ddd;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.ace_placeholder {
|
|
1029
|
+
position: relative;
|
|
1030
|
+
font-family: arial;
|
|
1031
|
+
transform: scale(0.9);
|
|
1032
|
+
transform-origin: left;
|
|
1033
|
+
white-space: pre;
|
|
1034
|
+
opacity: 0.7;
|
|
1035
|
+
margin: 0 10px;
|
|
1036
|
+
z-index: 1;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.ace_ghost_text {
|
|
1040
|
+
opacity: 0.5;
|
|
1041
|
+
font-style: italic;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.ace_ghost_text_container > div {
|
|
1045
|
+
white-space: pre;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.ghost_text_line_wrapped::after {
|
|
1049
|
+
content: "↩";
|
|
1050
|
+
position: absolute;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
|
1054
|
+
margin: 0px 4px
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
.ace_screenreader-only {
|
|
1058
|
+
position:absolute;
|
|
1059
|
+
left:-10000px;
|
|
1060
|
+
top:auto;
|
|
1061
|
+
width:1px;
|
|
1062
|
+
height:1px;
|
|
1063
|
+
overflow:hidden;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.ace_hidden_token {
|
|
1067
|
+
display: none;
|
|
1068
|
+
}`}),(void 0)("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,i,s){var o=t("../lib/dom"),u=t("../lib/oop"),d=t("../lib/event_emitter").EventEmitter,l=function(){function p(r,f){this.canvas=o.createElement("canvas"),this.renderer=f,this.pixelRatio=1,this.maxHeight=f.layerConfig.maxHeight,this.lineHeight=f.layerConfig.lineHeight,this.canvasHeight=r.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=r.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},r.element.appendChild(this.canvas)}return p.prototype.$updateDecorators=function(r){function f(O,C){return O.priority<C.priority?-1:O.priority>C.priority?1:0}var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(r){this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height;var c=(r.lastRow+1)*this.lineHeight;c<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var h=this.canvas.getContext("2d"),m=this.renderer.session.$annotations;if(h.clearRect(0,0,this.canvas.width,this.canvas.height),m){var y={info:1,warning:2,error:3};m.forEach(function(O){O.priority=y[O.type]||null}),m=m.sort(f);for(var v=this.renderer.session.$foldData,w=0;w<m.length;w++){var k=m[w].row,_=this.compensateFoldRows(k,v),S=Math.round((k-_)*this.lineHeight*this.heightRatio),x=Math.round((k-_)*this.lineHeight*this.heightRatio),L=Math.round(((k-_)*this.lineHeight+this.lineHeight)*this.heightRatio),I=L-x;if(I<this.minDecorationHeight){var $=(x+L)/2|0;$<this.halfMinDecorationHeight?$=this.halfMinDecorationHeight:$+this.halfMinDecorationHeight>this.canvasHeight&&($=this.canvasHeight-this.halfMinDecorationHeight),x=Math.round($-this.halfMinDecorationHeight),L=Math.round($+this.halfMinDecorationHeight)}h.fillStyle=a[m[w].type]||null,h.fillRect(0,S,this.canvasWidth,L-x)}}var T=this.renderer.session.selection.getCursor();if(T){var _=this.compensateFoldRows(T.row,v),S=Math.round((T.row-_)*this.lineHeight*this.heightRatio);h.fillStyle="rgba(0, 0, 0, 0.5)",h.fillRect(0,S,this.canvasWidth,2)}},p.prototype.compensateFoldRows=function(r,f){var a=0;if(f&&f.length>0)for(var c=0;c<f.length;c++)r>f[c].start.row&&r<f[c].end.row?a+=r-f[c].start.row:r>=f[c].end.row&&(a+=f[c].end.row-f[c].start.row);return a},p}();u.implement(l.prototype,d),i.Decorator=l}),(void 0)("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,i,s){var o=t("./lib/oop"),u=t("./lib/dom"),d=t("./lib/lang"),l=t("./config"),p=t("./layer/gutter").Gutter,r=t("./layer/marker").Marker,f=t("./layer/text").Text,a=t("./layer/cursor").Cursor,c=t("./scrollbar").HScrollBar,h=t("./scrollbar").VScrollBar,m=t("./scrollbar_custom").HScrollBar,y=t("./scrollbar_custom").VScrollBar,v=t("./renderloop").RenderLoop,w=t("./layer/font_metrics").FontMetrics,k=t("./lib/event_emitter").EventEmitter,_=t("./css/editor-css"),S=t("./layer/decorators").Decorator,x=t("./lib/useragent"),L=t("./layer/text_util").isTextToken;u.importCssString(_,"ace_editor.css",!1);var I=function(){function $(T,O){var C=this;this.container=T||u.createElement("div"),u.addCssClass(this.container,"ace_editor"),u.HI_DPI&&u.addCssClass(this.container,"ace_hidpi"),this.setTheme(O),l.get("useStrictCSP")==null&&l.set("useStrictCSP",!1),this.$gutter=u.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=u.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=u.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var A=this.$textLayer=new f(this.content);this.canvas=A.element,this.$markerFront=new r(this.content),this.$cursorLayer=new a(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function(M){C.$scrollAnimation||C.session.setScrollTop(M.data-C.scrollMargin.top)}),this.scrollBarH.on("scroll",function(M){C.$scrollAnimation||C.session.setScrollLeft(M.data-C.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new w(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(M){C.updateCharacterSize(),C.onResize(!0,C.gutterWidth,C.$size.width,C.$size.height),C._signal("changeCharacterSize",M)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return $.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(),u.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},$.prototype.setSession=function(T){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=T,T&&this.scrollMargin.top&&T.getScrollTop()<=0&&T.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(T),this.$markerBack.setSession(T),this.$markerFront.setSession(T),this.$gutterLayer.setSession(T),this.$textLayer.setSession(T),T&&(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))},$.prototype.updateLines=function(T,O,C){if(O===void 0&&(O=1/0),this.$changedLines?(this.$changedLines.firstRow>T&&(this.$changedLines.firstRow=T),this.$changedLines.lastRow<O&&(this.$changedLines.lastRow=O)):this.$changedLines={firstRow:T,lastRow:O},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!C)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},$.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},$.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},$.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},$.prototype.updateFull=function(T){T?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},$.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},$.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},$.prototype.onResize=function(T,O,C,A){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=T?1:0;var M=this.container;A||(A=M.clientHeight||M.scrollHeight),!A&&this.$maxLines&&this.lineHeight>1&&(!M.style.height||M.style.height=="0px")&&(M.style.height="1px",A=M.clientHeight||M.scrollHeight),C||(C=M.clientWidth||M.scrollWidth);var R=this.$updateCachedSize(T,O,C,A);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!C&&!A)return this.resizing=0;T&&(this.$gutterLayer.$padding=null),T?this.$renderChanges(R|this.$changes,!0):this.$loop.schedule(R|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},$.prototype.$updateCachedSize=function(T,O,C,A){A-=this.$extraHeight||0;var M=0,R=this.$size,N={width:R.width,height:R.height,scrollerHeight:R.scrollerHeight,scrollerWidth:R.scrollerWidth};if(A&&(T||R.height!=A)&&(R.height=A,M|=this.CHANGE_SIZE,R.scrollerHeight=R.height,this.$horizScroll&&(R.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(R.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",M|=this.CHANGE_SCROLL),C&&(T||R.width!=C)){M|=this.CHANGE_SIZE,R.width=C,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,u.setStyle(this.scrollBarH.element.style,"left",O+"px"),u.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),R.scrollerWidth=Math.max(0,C-O-this.scrollBarV.getWidth()-this.margin.h),u.setStyle(this.$gutter.style,"left",this.margin.left+"px");var H=this.scrollBarV.getWidth()+"px";u.setStyle(this.scrollBarH.element.style,"right",H),u.setStyle(this.scroller.style,"right",H),u.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(R.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||T)&&(M|=this.CHANGE_FULL)}return R.$dirty=!C||!A,M&&this._signal("resize",N),M},$.prototype.onGutterResize=function(T){var O=this.$showGutter?T:0;O!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,O,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()},$.prototype.adjustWrapLimit=function(){var T=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(T/this.characterWidth);return this.session.adjustWrapLimit(O,this.$showPrintMargin&&this.$printMarginColumn)},$.prototype.setAnimatedScroll=function(T){this.setOption("animatedScroll",T)},$.prototype.getAnimatedScroll=function(){return this.$animatedScroll},$.prototype.setShowInvisibles=function(T){this.setOption("showInvisibles",T),this.session.$bidiHandler.setShowInvisibles(T)},$.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},$.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},$.prototype.setDisplayIndentGuides=function(T){this.setOption("displayIndentGuides",T)},$.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},$.prototype.setHighlightIndentGuides=function(T){this.setOption("highlightIndentGuides",T)},$.prototype.setShowPrintMargin=function(T){this.setOption("showPrintMargin",T)},$.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},$.prototype.setPrintMarginColumn=function(T){this.setOption("printMarginColumn",T)},$.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},$.prototype.getShowGutter=function(){return this.getOption("showGutter")},$.prototype.setShowGutter=function(T){return this.setOption("showGutter",T)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},$.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var T=u.createElement("div");T.className="ace_layer ace_print-margin-layer",this.$printMarginEl=u.createElement("div"),this.$printMarginEl.className="ace_print-margin",T.appendChild(this.$printMarginEl),this.content.insertBefore(T,this.content.firstChild)}var O=this.$printMarginEl.style;O.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",O.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},$.prototype.getContainerElement=function(){return this.container},$.prototype.getMouseEventTarget=function(){return this.scroller},$.prototype.getTextAreaContainer=function(){return this.container},$.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var T=this.textarea.style,O=this.$composition;if(!this.$keepTextAreaAtCursor&&!O){u.translate(this.textarea,-100,0);return}var C=this.$cursorLayer.$pixelPos;if(C){O&&O.markerRange&&(C=this.$cursorLayer.getPixelPosition(O.markerRange.start,!0));var A=this.layerConfig,M=C.top,R=C.left;M-=A.offset;var N=O&&O.useTextareaForIME||x.isMobile?this.lineHeight:1;if(M<0||M>A.height-N){u.translate(this.textarea,0,0);return}var H=1,z=this.$size.height-N;if(!O)M+=this.lineHeight;else if(O.useTextareaForIME){var Y=this.textarea.value;H=this.characterWidth*this.session.$getStringScreenWidth(Y)[0]}else M+=this.lineHeight+2;R-=this.scrollLeft,R>this.$size.scrollerWidth-H&&(R=this.$size.scrollerWidth-H),R+=this.gutterWidth+this.margin.left,u.setStyle(T,"height",N+"px"),u.setStyle(T,"width",H+"px"),u.translate(this.textarea,Math.min(R,this.$size.scrollerWidth-H),Math.min(M,z))}}},$.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},$.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},$.prototype.getLastFullyVisibleRow=function(){var T=this.layerConfig,O=T.lastRow,C=this.session.documentToScreenRow(O,0)*T.lineHeight;return C-this.session.getScrollTop()>T.height-T.lineHeight?O-1:O},$.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},$.prototype.setPadding=function(T){this.$padding=T,this.$textLayer.setPadding(T),this.$cursorLayer.setPadding(T),this.$markerFront.setPadding(T),this.$markerBack.setPadding(T),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},$.prototype.setScrollMargin=function(T,O,C,A){var M=this.scrollMargin;M.top=T|0,M.bottom=O|0,M.right=A|0,M.left=C|0,M.v=M.top+M.bottom,M.h=M.left+M.right,M.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-M.top),this.updateFull()},$.prototype.setMargin=function(T,O,C,A){var M=this.margin;M.top=T|0,M.bottom=O|0,M.right=A|0,M.left=C|0,M.v=M.top+M.bottom,M.h=M.left+M.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},$.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},$.prototype.setHScrollBarAlwaysVisible=function(T){this.setOption("hScrollBarAlwaysVisible",T)},$.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},$.prototype.setVScrollBarAlwaysVisible=function(T){this.setOption("vScrollBarAlwaysVisible",T)},$.prototype.$updateScrollBarV=function(){var T=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(T-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>T-O&&(T=this.scrollTop+O,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(T+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},$.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},$.prototype.freeze=function(){this.$frozen=!0},$.prototype.unfreeze=function(){this.$frozen=!1},$.prototype.$renderChanges=function(T,O){if(this.$changes&&(T|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!T&&!O){this.$changes|=T;return}if(this.$size.$dirty)return this.$changes|=T,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",T),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var C=this.layerConfig;if(T&this.CHANGE_FULL||T&this.CHANGE_SIZE||T&this.CHANGE_TEXT||T&this.CHANGE_LINES||T&this.CHANGE_SCROLL||T&this.CHANGE_H_SCROLL){if(T|=this.$computeLayerConfig()|this.$loop.clear(),C.firstRow!=this.layerConfig.firstRow&&C.firstRowScreen==this.layerConfig.firstRowScreen){var A=this.scrollTop+(C.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;A>0&&(this.scrollTop=A,T|=this.CHANGE_SCROLL,T|=this.$computeLayerConfig()|this.$loop.clear())}C=this.layerConfig,this.$updateScrollBarV(),T&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),u.translate(this.content,-this.scrollLeft,-C.offset);var M=C.width+2*this.$padding+"px",R=C.minHeight+"px";u.setStyle(this.content.style,"width",M),u.setStyle(this.content.style,"height",R)}if(T&this.CHANGE_H_SCROLL&&(u.translate(this.content,-this.scrollLeft,-C.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),T&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(C),this.$showGutter&&this.$gutterLayer.update(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C),this.$markerBack.update(C),this.$markerFront.update(C),this.$cursorLayer.update(C),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}if(T&this.CHANGE_SCROLL){this.$changedLines=null,T&this.CHANGE_TEXT||T&this.CHANGE_LINES?this.$textLayer.update(C):this.$textLayer.scrollLines(C),this.$showGutter&&(T&this.CHANGE_GUTTER||T&this.CHANGE_LINES?this.$gutterLayer.update(C):this.$gutterLayer.scrollLines(C)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C),this.$markerBack.update(C),this.$markerFront.update(C),this.$cursorLayer.update(C),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}T&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(C),this.$showGutter&&this.$gutterLayer.update(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C)):T&this.CHANGE_LINES?((this.$updateLines()||T&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C)):T&this.CHANGE_TEXT||T&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C)):T&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(C),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(C)),T&this.CHANGE_CURSOR&&(this.$cursorLayer.update(C),this.$moveTextAreaToCursor()),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(C),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(C),this._signal("afterRender",T)},$.prototype.$autosize=function(){var T=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,C=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,T))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(C+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&C>this.$maxPixelHeight&&(C=this.$maxPixelHeight);var A=C<=2*this.lineHeight,M=!A&&T>O;if(C!=this.desiredHeight||this.$size.height!=this.desiredHeight||M!=this.$vScroll){M!=this.$vScroll&&(this.$vScroll=M,this.scrollBarV.setVisible(M));var R=this.container.clientWidth;this.container.style.height=C+"px",this.$updateCachedSize(!0,this.$gutterWidth,R,C),this.desiredHeight=C,this._signal("autosize")}},$.prototype.$computeLayerConfig=function(){var T=this.session,O=this.$size,C=O.height<=2*this.lineHeight,A=this.session.getScreenLength(),M=A*this.lineHeight,R=this.$getLongestLine(),N=!C&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-R-2*this.$padding<0),H=this.$horizScroll!==N;H&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var z=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),C=O.height<=2*this.lineHeight);var Y=O.scrollerHeight+this.lineHeight,K=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;M+=K;var re=this.scrollMargin;this.session.setScrollTop(Math.max(-re.top,Math.min(this.scrollTop,M-O.scrollerHeight+re.bottom))),this.session.setScrollLeft(Math.max(-re.left,Math.min(this.scrollLeft,R+2*this.$padding-O.scrollerWidth+re.right)));var fe=!C&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-M+K<0||this.scrollTop>re.top),U=z!==fe;U&&(this.$vScroll=fe,this.scrollBarV.setVisible(fe));var Q=this.scrollTop%this.lineHeight,ie=Math.ceil(Y/this.lineHeight)-1,V=Math.max(0,Math.round((this.scrollTop-Q)/this.lineHeight)),te=V+ie,ae,ge,ue=this.lineHeight;V=T.screenToDocumentRow(V,0);var G=T.getFoldLine(V);G&&(V=G.start.row),ae=T.documentToScreenRow(V,0),ge=T.getRowLength(V)*ue,te=Math.min(T.screenToDocumentRow(te,0),T.getLength()-1),Y=O.scrollerHeight+T.getRowLength(te)*ue+ge,Q=this.scrollTop-ae*ue;var J=0;return(this.layerConfig.width!=R||H)&&(J=this.CHANGE_H_SCROLL),(H||U)&&(J|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),U&&(R=this.$getLongestLine())),this.layerConfig={width:R,padding:this.$padding,firstRow:V,firstRowScreen:ae,lastRow:te,lineHeight:ue,characterWidth:this.characterWidth,minHeight:Y,maxHeight:M,offset:Q,gutterOffset:ue?Math.max(0,Math.ceil((Q+O.height-O.scrollerHeight)/ue)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(R-this.$padding),J},$.prototype.$updateLines=function(){if(this.$changedLines){var T=this.$changedLines.firstRow,O=this.$changedLines.lastRow;this.$changedLines=null;var C=this.layerConfig;if(!(T>C.lastRow+1)&&!(O<C.firstRow)){if(O===1/0){this.$showGutter&&this.$gutterLayer.update(C),this.$textLayer.update(C);return}return this.$textLayer.updateLines(C,T,O),!0}}},$.prototype.$getLongestLine=function(){var T=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(T+=1),this.$textLayer&&T>this.$textLayer.MAX_LINE_LENGTH&&(T=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(T*this.characterWidth))},$.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},$.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},$.prototype.addGutterDecoration=function(T,O){this.$gutterLayer.addGutterDecoration(T,O)},$.prototype.removeGutterDecoration=function(T,O){this.$gutterLayer.removeGutterDecoration(T,O)},$.prototype.updateBreakpoints=function(T){this._rows=T,this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.setAnnotations=function(T){this.$gutterLayer.setAnnotations(T),this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},$.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},$.prototype.showCursor=function(){this.$cursorLayer.showCursor()},$.prototype.scrollSelectionIntoView=function(T,O,C){this.scrollCursorIntoView(T,C),this.scrollCursorIntoView(O,C)},$.prototype.scrollCursorIntoView=function(T,O,C){if(this.$size.scrollerHeight!==0){var A=this.$cursorLayer.getPixelPosition(T),M=A.left,R=A.top,N=C&&C.top||0,H=C&&C.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var z=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;z+N>R?(O&&z+N>R+this.lineHeight&&(R-=O*this.$size.scrollerHeight),R===0&&(R=-this.scrollMargin.top),this.session.setScrollTop(R)):z+this.$size.scrollerHeight-H<R+this.lineHeight&&(O&&z+this.$size.scrollerHeight-H<R-this.lineHeight&&(R+=O*this.$size.scrollerHeight),this.session.setScrollTop(R+this.lineHeight+H-this.$size.scrollerHeight));var Y=this.scrollLeft,K=2*this.layerConfig.characterWidth;M-K<Y?(M-=K,M<this.$padding+K&&(M=-this.scrollMargin.left),this.session.setScrollLeft(M)):(M+=K,Y+this.$size.scrollerWidth<M+this.characterWidth?this.session.setScrollLeft(Math.round(M+this.characterWidth-this.$size.scrollerWidth)):Y<=this.$padding&&M-Y<this.characterWidth&&this.session.setScrollLeft(0))}},$.prototype.getScrollTop=function(){return this.session.getScrollTop()},$.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},$.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},$.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},$.prototype.scrollToRow=function(T){this.session.setScrollTop(T*this.lineHeight)},$.prototype.alignCursor=function(T,O){typeof T=="number"&&(T={row:T,column:0});var C=this.$cursorLayer.getPixelPosition(T),A=this.$size.scrollerHeight-this.lineHeight,M=C.top-A*(O||0);return this.session.setScrollTop(M),M},$.prototype.$calcSteps=function(T,O){var C=0,A=this.STEPS,M=[],R=function(N,H,z){return z*(Math.pow(N-1,3)+1)+H};for(C=0;C<A;++C)M.push(R(C/this.STEPS,T,O-T));return M},$.prototype.scrollToLine=function(T,O,C,A){var M=this.$cursorLayer.getPixelPosition({row:T,column:0}),R=M.top;O&&(R-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(R),C!==!1&&this.animateScrolling(N,A)},$.prototype.animateScrolling=function(T,O){function C(){M.$timer=clearInterval(M.$timer),M.$scrollAnimation=null,M.$stopAnimation=!1,O&&O()}var A=this.scrollTop;if(this.$animatedScroll){var M=this;if(T!=A){if(this.$scrollAnimation){var R=this.$scrollAnimation.steps;if(R.length&&(T=R[0],T==A))return}var N=M.$calcSteps(T,A);this.$scrollAnimation={from:T,to:A,steps:N},clearInterval(this.$timer),M.session.setScrollTop(N.shift()),M.session.$scrollTop=A,this.$timer=setInterval(function(){if(M.$stopAnimation){C();return}if(!M.session)return clearInterval(M.$timer);N.length?(M.session.setScrollTop(N.shift()),M.session.$scrollTop=A):A!=null?(M.session.$scrollTop=-1,M.session.setScrollTop(A),A=null):C()},10)}}},$.prototype.scrollToY=function(T){this.scrollTop!==T&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=T)},$.prototype.scrollToX=function(T){this.scrollLeft!==T&&(this.scrollLeft=T),this.$loop.schedule(this.CHANGE_H_SCROLL)},$.prototype.scrollTo=function(T,O){this.session.setScrollTop(O),this.session.setScrollLeft(T)},$.prototype.scrollBy=function(T,O){O&&this.session.setScrollTop(this.session.getScrollTop()+O),T&&this.session.setScrollLeft(this.session.getScrollLeft()+T)},$.prototype.isScrollableBy=function(T,O){if(O<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||O>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||T<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||T>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},$.prototype.pixelToScreenCoordinates=function(T,O){var C;if(this.$hasCssTransforms){C={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([T,O]);T=A[1]-this.gutterWidth-this.margin.left,O=A[0]}else C=this.scroller.getBoundingClientRect();var M=T+this.scrollLeft-C.left-this.$padding,R=M/this.characterWidth,N=Math.floor((O+this.scrollTop-C.top)/this.lineHeight),H=this.$blockCursor?Math.floor(R):Math.round(R);return{row:N,column:H,side:R-H>0?1:-1,offsetX:M}},$.prototype.screenToTextCoordinates=function(T,O){var C;if(this.$hasCssTransforms){C={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([T,O]);T=A[1]-this.gutterWidth-this.margin.left,O=A[0]}else C=this.scroller.getBoundingClientRect();var M=T+this.scrollLeft-C.left-this.$padding,R=M/this.characterWidth,N=this.$blockCursor?Math.floor(R):Math.round(R),H=Math.floor((O+this.scrollTop-C.top)/this.lineHeight);return this.session.screenToDocumentPosition(H,Math.max(N,0),M)},$.prototype.textToScreenCoordinates=function(T,O){var C=this.scroller.getBoundingClientRect(),A=this.session.documentToScreenPosition(T,O),M=this.$padding+(this.session.$bidiHandler.isBidiRow(A.row,T)?this.session.$bidiHandler.getPosLeft(A.column):Math.round(A.column*this.characterWidth)),R=A.row*this.lineHeight;return{pageX:C.left+M-this.scrollLeft,pageY:C.top+R-this.scrollTop}},$.prototype.visualizeFocus=function(){u.addCssClass(this.container,"ace_focus")},$.prototype.visualizeBlur=function(){u.removeCssClass(this.container,"ace_focus")},$.prototype.showComposition=function(T){this.$composition=T,T.cssText||(T.cssText=this.textarea.style.cssText),T.useTextareaForIME==null&&(T.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(u.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):T.markerId=this.session.addMarker(T.markerRange,"ace_composition_marker","text")},$.prototype.setCompositionText=function(T){var O=this.session.selection.cursor;this.addToken(T,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},$.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),u.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var T=this.session.selection.cursor;this.removeExtraToken(T.row,T.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},$.prototype.setGhostText=function(T,O){var C=this.session.selection.cursor,A=O||{row:C.row,column:C.column};this.removeGhostText();var M=this.$calculateWrappedTextChunks(T,A);this.addToken(M[0].text,"ghost_text",A.row,A.column),this.$ghostText={text:T,position:{row:A.row,column:A.column}};var R=u.createElement("div");if(M.length>1){var N=this.hideTokensAfterPosition(A.row,A.column),H;M.slice(1).forEach(function(U){var Q=u.createElement("div"),ie=u.createElement("span");ie.className="ace_ghost_text",U.wrapped&&(Q.className="ghost_text_line_wrapped"),U.text.length===0&&(U.text=" "),ie.appendChild(u.createTextNode(U.text)),Q.appendChild(ie),R.appendChild(Q),H=Q}),N.forEach(function(U){var Q=u.createElement("span");L(U.type)||(Q.className="ace_"+U.type.replace(/\./g," ace_")),Q.appendChild(u.createTextNode(U.value)),H.appendChild(Q)}),this.$ghostTextWidget={el:R,row:A.row,column:A.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var z=this.$cursorLayer.getPixelPosition(A,!0),Y=this.container,K=Y.getBoundingClientRect().height,re=M.length*this.lineHeight,fe=re<K-z.top;if(fe)return;re<K?this.scrollBy(0,(M.length-1)*this.lineHeight):this.scrollToRow(A.row)}},$.prototype.$calculateWrappedTextChunks=function(T,O){var C=this.$size.scrollerWidth-this.$padding*2,A=Math.floor(C/this.characterWidth)-2;A=A<=0?60:A;for(var M=T.split(/\r?\n/),R=[],N=0;N<M.length;N++){var H=this.session.$getDisplayTokens(M[N],O.column),z=this.session.$computeWrapSplits(H,A,this.session.$tabSize);if(z.length>0){var Y=0;z.push(M[N].length);for(var K=0;K<z.length;K++){var re=M[N].slice(Y,z[K]);R.push({text:re,wrapped:!0}),Y=z[K]}}else R.push({text:M[N],wrapped:!1})}return R},$.prototype.removeGhostText=function(){if(this.$ghostText){var T=this.$ghostText.position;this.removeExtraToken(T.row,T.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},$.prototype.addToken=function(T,O,C,A){var M=this.session;M.bgTokenizer.lines[C]=null;var R={type:O,value:T},N=M.getTokens(C);if(A==null||!N.length)N.push(R);else for(var H=0,z=0;z<N.length;z++){var Y=N[z];if(H+=Y.value.length,A<=H){var K=Y.value.length-(H-A),re=Y.value.slice(0,K),fe=Y.value.slice(K);N.splice(z,1,{type:Y.type,value:re},R,{type:Y.type,value:fe});break}}this.updateLines(C,C)},$.prototype.hideTokensAfterPosition=function(T,O){for(var C=this.session.getTokens(T),A=0,M=!1,R=[],N=0;N<C.length;N++){var H=C[N];if(A+=H.value.length,H.type!=="ghost_text"){if(M){R.push({type:H.type,value:H.value}),H.type="hidden_token";continue}A===O&&(M=!0)}}return this.updateLines(T,T),R},$.prototype.removeExtraToken=function(T,O){this.session.bgTokenizer.lines[T]=null,this.updateLines(T,T)},$.prototype.setTheme=function(T,O){function C(R){if(A.$themeId!=T)return O&&O();if(!R||!R.cssClass)throw new Error("couldn't load module "+T+" or it didn't call define");R.$id&&(A.$themeId=R.$id),u.importCssString(R.cssText,R.cssClass,A.container),A.theme&&u.removeCssClass(A.container,A.theme.cssClass);var N="padding"in R?R.padding:"padding"in(A.theme||{})?4:A.$padding;A.$padding&&N!=A.$padding&&A.setPadding(N),A.$theme=R.cssClass,A.theme=R,u.addCssClass(A.container,R.cssClass),u.setCssClass(A.container,"ace_dark",R.isDark),A.$size&&(A.$size.width=0,A.$updateSizeAsync()),A._dispatchEvent("themeLoaded",{theme:R}),O&&O(),x.isSafari&&A.scroller&&(A.scroller.style.background="red",A.scroller.style.background="")}var A=this;if(this.$themeId=T,A._dispatchEvent("themeChange",{theme:T}),!T||typeof T=="string"){var M=T||this.$options.theme.initialValue;l.loadModule(["theme",M],C)}else C(T)},$.prototype.getTheme=function(){return this.$themeId},$.prototype.setStyle=function(T,O){u.setCssClass(this.container,T,O!==!1)},$.prototype.unsetStyle=function(T){u.removeCssClass(this.container,T)},$.prototype.setCursorStyle=function(T){u.setStyle(this.scroller.style,"cursor",T)},$.prototype.setMouseCursor=function(T){u.setStyle(this.scroller.style,"cursor",T)},$.prototype.attachToShadowRoot=function(){u.importCssString(_,"ace_editor.css",this.container)},$.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},$.prototype.$updateCustomScrollbar=function(T){var O=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,T===!0?(this.scrollBarV=new y(this.container,this),this.scrollBarH=new m(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(C){O.$scrollAnimation||O.session.setScrollTop(C.data-O.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(C){O.$scrollAnimation||O.session.setScrollLeft(C.data-O.scrollMargin.left)}),this.$scrollDecorator=new S(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(C){O.$scrollAnimation||O.session.setScrollTop(C.data-O.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(C){O.$scrollAnimation||O.session.setScrollLeft(C.data-O.scrollMargin.left)}))},$.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var T=this;this.$resizeTimer=d.delayedCall(function(){T.destroyed||T.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(O){var C=O[0].contentRect.width,A=O[0].contentRect.height;Math.abs(T.$size.width-C)>1||Math.abs(T.$size.height-A)>1?T.$resizeTimer.delay():T.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},$}();I.prototype.CHANGE_CURSOR=1,I.prototype.CHANGE_MARKER=2,I.prototype.CHANGE_GUTTER=4,I.prototype.CHANGE_SCROLL=8,I.prototype.CHANGE_LINES=16,I.prototype.CHANGE_TEXT=32,I.prototype.CHANGE_SIZE=64,I.prototype.CHANGE_MARKER_BACK=128,I.prototype.CHANGE_MARKER_FRONT=256,I.prototype.CHANGE_FULL=512,I.prototype.CHANGE_H_SCROLL=1024,I.prototype.$changes=0,I.prototype.$padding=null,I.prototype.$frozen=!1,I.prototype.STEPS=8,o.implement(I.prototype,k),l.defineOptions(I.prototype,"renderer",{useResizeObserver:{set:function($){!$&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):$&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function($){this.$textLayer.setShowInvisibles($)&&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($){typeof $=="number"&&(this.$printMarginColumn=$),this.$showPrintMargin=!!$,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function($){this.$gutter.style.display=$?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function($){this.$gutterLayer.$useSvgGutterIcons=$},initialValue:!1},showFoldedAnnotations:{set:function($){this.$gutterLayer.$showFoldedAnnotations=$},initialValue:!1},fadeFoldWidgets:{set:function($){u.setCssClass(this.$gutter,"ace_fade-fold-widgets",$)},initialValue:!1},showFoldWidgets:{set:function($){this.$gutterLayer.setShowFoldWidgets($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function($){this.$textLayer.setDisplayIndentGuides($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function($){this.$textLayer.setHighlightIndentGuides($)==1?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function($){this.$gutterLayer.setHighlightGutterLine($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function($){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function($){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function($){typeof $=="number"&&($+="px"),this.container.style.fontSize=$,this.updateFontSize()},initialValue:12},fontFamily:{set:function($){this.container.style.fontFamily=$,this.updateFontSize()}},maxLines:{set:function($){this.updateFull()}},minLines:{set:function($){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function($){this.updateFull()},initialValue:0},scrollPastEnd:{set:function($){$=+$||0,this.$scrollPastEnd!=$&&(this.$scrollPastEnd=$,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function($){this.$gutterLayer.$fixedWidth=!!$,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function($){this.$updateCustomScrollbar($)},initialValue:!1},theme:{set:function($){this.setTheme($)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),i.VirtualRenderer=I}),(void 0)("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,i,s){function o(c){var h="importScripts('"+l.qualifyURL(c)+"');";try{return new Blob([h],{type:"application/javascript"})}catch{var m=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,y=new m;return y.append(h),y.getBlob("application/javascript")}}function u(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(r.get("loadWorkerFromBlob")){var h=o(c),m=window.URL||window.webkitURL,y=m.createObjectURL(h);return new Worker(y)}return new Worker(c)}var d=t("../lib/oop"),l=t("../lib/net"),p=t("../lib/event_emitter").EventEmitter,r=t("../config"),f=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){d.implement(this,p),this.$createWorkerFromOldConfig=function(c,h,m,y,v){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),r.get("packaged")||!t.toUrl)y=y||r.moduleUrl(h,"worker");else{var w=this.$normalizePath;y=y||w(t.toUrl("ace/worker/worker.js",null,"_"));var k={};c.forEach(function(_){k[_]=w(t.toUrl(_,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=u(y),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:k,module:h,classname:m}),this.$worker},this.onMessage=function(c){var h=c.data;switch(h.type){case"event":this._signal(h.name,{data:h.data});break;case"call":var m=this.callbacks[h.id];m&&(m(h.data),delete this.callbacks[h.id]);break;case"error":this.reportError(h.data);break;case"log":window.console&&console.log&&console.log.apply(console,h.data)}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return l.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,h){this.$worker.postMessage({command:c,args:h})},this.call=function(c,h,m){if(m){var y=this.callbackId++;this.callbacks[y]=m,h.push(y)}this.send(c,h)},this.emit=function(c,h){try{h.data&&h.data.err&&(h.data.err={message:h.data.err.message,stack:h.data.err.stack,code:h.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:h.data}})}catch(m){console.error(m.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(f.prototype);var a=function(c,h,m){var y=null,v=!1,w=Object.create(p),k=[],_=new f({messageBuffer:k,terminate:function(){},postMessage:function(x){k.push(x),y&&(v?setTimeout(S):S())}});_.setEmitSync=function(x){v=x};var S=function(){var x=k.shift();x.command?y[x.command].apply(y,x.args):x.event&&w._signal(x.event,x.data)};return w.postMessage=function(x){_.onMessage({data:x})},w.callback=function(x,L){this.postMessage({type:"call",id:L,data:x})},w.emit=function(x,L){this.postMessage({type:"event",name:x,data:L})},r.loadModule(["worker",h],function(x){for(y=new x[m](w);k.length;)S()}),_};i.UIWorkerClient=a,i.WorkerClient=f,i.createWorker=u}),(void 0)("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,i,s){var o=t("./range").Range,u=t("./lib/event_emitter").EventEmitter,d=t("./lib/oop"),l=function(){function p(r,f,a,c,h,m){var y=this;this.length=f,this.session=r,this.doc=r.getDocument(),this.mainClass=h,this.othersClass=m,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){y.onCursorChange()})},this.$pos=a;var v=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return p.prototype.setup=function(){var r=this,f=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=f.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=a.addMarker(new o(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(h){var m=f.createAnchor(h.row,h.column);m.$insertRight=!0,m.detach(),r.others.push(m)}),a.setUndoSelect(!1)},p.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,f=this;this.othersActive=!0,this.others.forEach(function(a){a.markerId=r.addMarker(new o(a.row,a.column,a.row,a.column+f.length),f.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},p.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var f=r;if(f.start.row===f.end.row&&f.start.row===this.pos.row){this.$updating=!0;var a=r.action==="insert"?f.end.column-f.start.column:f.start.column-f.end.column,c=f.start.column>=this.pos.column&&f.start.column<=this.pos.column+this.length+1,h=f.start.column-this.pos.column;if(this.updateAnchors(r),c&&(this.length+=a),c&&!this.session.$fromUndo){if(r.action==="insert")for(var m=this.others.length-1;m>=0;m--){var y=this.others[m],v={row:y.row,column:y.column+h};this.doc.insertMergedLines(v,r.lines)}else if(r.action==="remove")for(var m=this.others.length-1;m>=0;m--){var y=this.others[m],v={row:y.row,column:y.column+h};this.doc.remove(new o(v.row,v.column,v.row,v.column-a))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var f=this.others.length;f--;)this.others[f].onChange(r);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var r=this,f=this.session,a=function(h,m){f.removeMarker(h.markerId),h.markerId=f.addMarker(new o(h.row,h.column,h.row,h.column+r.length),m,null,!1)};a(this.pos,this.mainClass);for(var c=this.others.length;c--;)a(this.others[c],this.othersClass)}},p.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var f=this.session.selection.getCursor();f.row===this.pos.row&&f.column>=this.pos.column&&f.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},p.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},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),f=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,a=0;a<f;a++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},p}();d.implement(l.prototype,u),i.PlaceHolder=l}),(void 0)("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,i,s){function o(p,r){return p.row==r.row&&p.column==r.column}function u(p){var r=p.domEvent,f=r.altKey,a=r.shiftKey,c=r.ctrlKey,h=p.getAccelKey(),m=p.getButton();if(c&&l.isMac&&(m=r.button),p.editor.inMultiSelectMode&&m==2){p.editor.textInput.onContextMenu(p.domEvent);return}if(!c&&!f&&!h){m===0&&p.editor.inMultiSelectMode&&p.editor.exitMultiSelectMode();return}if(m===0){var y=p.editor,v=y.selection,w=y.inMultiSelectMode,k=p.getDocumentPosition(),_=v.getCursor(),S=p.inSelection()||v.isEmpty()&&o(k,_),x=p.x,L=p.y,I=function(re){x=re.clientX,L=re.clientY},$=y.session,T=y.renderer.pixelToScreenCoordinates(x,L),O=T,C;if(y.$mouseHandler.$enableJumpToDef)c&&f||h&&f?C=a?"block":"add":f&&y.$blockSelectEnabled&&(C="block");else if(h&&!f){if(C="add",!w&&a)return}else f&&y.$blockSelectEnabled&&(C="block");if(C&&l.isMac&&r.ctrlKey&&y.$mouseHandler.cancelContextMenu(),C=="add"){if(!w&&S)return;if(!w){var A=v.toOrientedRange();y.addSelectionMarker(A)}var M=v.rangeList.rangeAtPoint(k);y.inVirtualSelectionMode=!0,a&&(M=null,A=v.ranges[0]||A,y.removeSelectionMarker(A)),y.once("mouseup",function(){var re=v.toOrientedRange();M&&re.isEmpty()&&o(M.cursor,re.cursor)?v.substractPoint(re.cursor):(a?v.substractPoint(A.cursor):A&&(y.removeSelectionMarker(A),v.addRange(A)),v.addRange(re)),y.inVirtualSelectionMode=!1})}else if(C=="block"){p.stop(),y.inVirtualSelectionMode=!0;var R,N=[],H=function(){var re=y.renderer.pixelToScreenCoordinates(x,L),fe=$.screenToDocumentPosition(re.row,re.column,re.offsetX);o(O,re)&&o(fe,v.lead)||(O=re,y.selection.moveToPosition(fe),y.renderer.scrollCursorIntoView(),y.removeSelectionMarkers(N),N=v.rectangularRangeBlock(O,T),y.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=y.$mouseHandler.$clickSelection.clone()),N.forEach(y.addSelectionMarker,y),y.updateSelectionMarkers())};w&&!h?v.toSingleRange():!w&&h&&(R=v.toOrientedRange(),y.addSelectionMarker(R)),a?T=$.documentToScreenPosition(v.lead):v.moveToPosition(k),O={row:-1,column:-1};var z=function(re){H(),clearInterval(K),y.removeSelectionMarkers(N),N.length||(N=[v.toOrientedRange()]),R&&(y.removeSelectionMarker(R),v.toSingleRange(R));for(var fe=0;fe<N.length;fe++)v.addRange(N[fe]);y.inVirtualSelectionMode=!1,y.$mouseHandler.$clickSelection=null},Y=H;d.capture(y.container,I,z);var K=setInterval(function(){Y()},20);return p.preventDefault()}}}var d=t("../lib/event"),l=t("../lib/useragent");i.onMouseDown=u}),(void 0)("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(t,i,s){i.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(u){u.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(u){u.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(u){u.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(u){u.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(u){u.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(u){u.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(u){u.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(u){u.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(u){u.multiSelect.rangeCount>1?u.multiSelect.joinSelections():u.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(u){u.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(u){u.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(u){u.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],i.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(u){u.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(u){return u&&u.inMultiSelectMode}}];var o=t("../keyboard/hash_handler").HashHandler;i.keyboardHandler=new o(i.multiSelectCommands)}),(void 0)("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,i,s){function o(_,S,x){return v.$options.wrap=!0,v.$options.needle=S,v.$options.backwards=x==-1,v.find(_)}function u(_,S){return _.row==S.row&&_.column==S.column}function d(_){_.$multiselectOnSessionChange||(_.$onAddRange=_.$onAddRange.bind(_),_.$onRemoveRange=_.$onRemoveRange.bind(_),_.$onMultiSelect=_.$onMultiSelect.bind(_),_.$onSingleSelect=_.$onSingleSelect.bind(_),_.$multiselectOnSessionChange=i.onSessionChange.bind(_),_.$checkMultiselectChange=_.$checkMultiselectChange.bind(_),_.$multiselectOnSessionChange(_),_.on("changeSession",_.$multiselectOnSessionChange),_.on("mousedown",a),_.commands.addCommands(m.defaultCommands),l(_))}function l(_){function S(I){L&&(_.renderer.setMouseCursor(""),L=!1)}if(_.textInput){var x=_.textInput.getElement(),L=!1;c.addListener(x,"keydown",function(I){var $=I.keyCode==18&&!(I.ctrlKey||I.shiftKey||I.metaKey);_.$blockSelectEnabled&&$?L||(_.renderer.setMouseCursor("crosshair"),L=!0):L&&S()},_),c.addListener(x,"keyup",S,_),c.addListener(x,"blur",S,_)}}var p=t("./range_list").RangeList,r=t("./range").Range,f=t("./selection").Selection,a=t("./mouse/multi_select_handler").onMouseDown,c=t("./lib/event"),h=t("./lib/lang"),m=t("./commands/multi_select_commands");i.commands=m.defaultCommands.concat(m.multiSelectCommands);var y=t("./search").Search,v=new y,w=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(w.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(_,S){if(_){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(_),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),S||this.fromOrientedRange(_);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}_.cursor||(_.cursor=_.end);var L=this.rangeList.add(_);return this.$onAddRange(_),L.length&&this.$onRemoveRange(L),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),S||this.fromOrientedRange(_)}},this.toSingleRange=function(_){_=_||this.ranges[0];var S=this.rangeList.removeAll();S.length&&this.$onRemoveRange(S),_&&this.fromOrientedRange(_)},this.substractPoint=function(_){var S=this.rangeList.substractPoint(_);if(S)return this.$onRemoveRange(S),S[0]},this.mergeOverlappingRanges=function(){var _=this.rangeList.merge();_.length&&this.$onRemoveRange(_)},this.$onAddRange=function(_){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(_),this._signal("addRange",{range:_})},this.$onRemoveRange=function(_){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var S=this.rangeList.ranges.pop();_.push(S),this.rangeCount=0}for(var x=_.length;x--;){var L=this.ranges.indexOf(_[x]);this.ranges.splice(L,1)}this._signal("removeRange",{ranges:_}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),S=S||this.ranges[0],S&&!S.isEqual(this.getRange())&&this.fromOrientedRange(S)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new p,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var _=this.ranges.length?this.ranges:[this.getRange()],S=[],x=0;x<_.length;x++){var L=_[x],I=L.start.row,$=L.end.row;if(I===$)S.push(L.clone());else{for(S.push(new r(I,L.start.column,I,this.session.getLine(I).length));++I<$;)S.push(this.getLineRange(I,!0));S.push(new r($,0,$,L.end.column))}x==0&&!this.isBackwards()&&(S=S.reverse())}this.toSingleRange();for(var x=S.length;x--;)this.addRange(S[x])},this.joinSelections=function(){var _=this.rangeList.ranges,S=_[_.length-1],x=r.fromPoints(_[0].start,S.end);this.toSingleRange(),this.setSelectionRange(x,S.cursor==S.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var _=this.rangeList.ranges,S=_[_.length-1],x=r.fromPoints(_[0].start,S.end);this.toSingleRange(),this.setSelectionRange(x,S.cursor==S.start)}else{var L=this.session.documentToScreenPosition(this.cursor),I=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(L,I);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(_,S,x){var L=[],I=_.column<S.column;if(I)var $=_.column,T=S.column,O=_.offsetX,C=S.offsetX;else var $=S.column,T=_.column,O=S.offsetX,C=_.offsetX;var A=_.row<S.row;if(A)var M=_.row,R=S.row;else var M=S.row,R=_.row;$<0&&($=0),M<0&&(M=0),M==R&&(x=!0);for(var N,H=M;H<=R;H++){var z=r.fromPoints(this.session.screenToDocumentPosition(H,$,O),this.session.screenToDocumentPosition(H,T,C));if(z.isEmpty()){if(N&&u(z.end,N))break;N=z.end}z.cursor=I?z.start:z.end,L.push(z)}if(A&&L.reverse(),!x){for(var Y=L.length-1;L[Y].isEmpty()&&Y>0;)Y--;if(Y>0)for(var K=0;L[K].isEmpty();)K++;for(var re=Y;re>=K;re--)L[re].isEmpty()&&L.splice(re,1)}return L}}).call(f.prototype);var k=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(_){_.cursor||(_.cursor=_.end);var S=this.getSelectionStyle();return _.marker=this.session.addMarker(_,"ace_selection",S),this.session.$selectionMarkers.push(_),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,_},this.removeSelectionMarker=function(_){if(_.marker){this.session.removeMarker(_.marker);var S=this.session.$selectionMarkers.indexOf(_);S!=-1&&this.session.$selectionMarkers.splice(S,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(_){for(var S=this.session.$selectionMarkers,x=_.length;x--;){var L=_[x];if(L.marker){this.session.removeMarker(L.marker);var I=S.indexOf(L);I!=-1&&S.splice(I,1)}}this.session.selectionMarkerCount=S.length},this.$onAddRange=function(_){this.addSelectionMarker(_.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(_){this.removeSelectionMarkers(_.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(_){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(m.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(_){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(m.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(_){var S=_.command,x=_.editor;if(x.multiSelect){if(S.multiSelectAction)S.multiSelectAction=="forEach"?L=x.forEachSelection(S,_.args):S.multiSelectAction=="forEachLine"?L=x.forEachSelection(S,_.args,!0):S.multiSelectAction=="single"?(x.exitMultiSelectMode(),L=S.exec(x,_.args||{})):L=S.multiSelectAction(x,_.args||{});else{var L=S.exec(x,_.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return L}},this.forEachSelection=function(_,S,x){if(!this.inVirtualSelectionMode){var L=x&&x.keepOrder,I=x==1||x&&x.$byLines,$=this.session,T=this.selection,O=T.rangeList,C=(L?T:O).ranges,A;if(!C.length)return _.exec?_.exec(this,S||{}):_(this,S||{});var M=T._eventRegistry;T._eventRegistry={};var R=new f($);this.inVirtualSelectionMode=!0;for(var N=C.length;N--;){if(I)for(;N>0&&C[N].start.row==C[N-1].end.row;)N--;R.fromOrientedRange(C[N]),R.index=N,this.selection=$.selection=R;var H=_.exec?_.exec(this,S||{}):_(this,S||{});!A&&H!==void 0&&(A=H),R.toOrientedRange(C[N])}R.detach(),this.selection=$.selection=T,this.inVirtualSelectionMode=!1,T._eventRegistry=M,T.mergeOverlappingRanges(),T.ranges[0]&&T.fromOrientedRange(T.ranges[0]);var z=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),z&&z.from==z.to&&this.renderer.animateScrolling(z.from),A}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var _="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var S=this.multiSelect.rangeList.ranges,x=[],L=0;L<S.length;L++)x.push(this.session.getTextRange(S[L]));var I=this.session.getDocument().getNewLineCharacter();_=x.join(I),_.length==(x.length-1)*I.length&&(_="")}else this.selection.isEmpty()||(_=this.session.getTextRange(this.getSelectionRange()));return _},this.$checkMultiselectChange=function(_,S){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var x=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&S==this.multiSelect.anchor)return;var L=S==this.multiSelect.anchor?x.cursor==x.start?x.end:x.start:x.cursor;L.row!=S.row||this.session.$clipPositionToDocument(L.row,L.column).column!=S.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(_,S,x){if(S=S||{},S.needle=_||S.needle,S.needle==null){var L=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();S.needle=this.session.getTextRange(L)}this.$search.set(S);var I=this.$search.findAll(this.session);if(!I.length)return 0;var $=this.multiSelect;x||$.toSingleRange(I[0]);for(var T=I.length;T--;)$.addRange(I[T],!0);return L&&$.rangeList.rangeAtPoint(L.start)&&$.addRange(L,!0),I.length},this.selectMoreLines=function(_,S){var x=this.selection.toOrientedRange(),L=x.cursor==x.end,I=this.session.documentToScreenPosition(x.cursor);this.selection.$desiredColumn&&(I.column=this.selection.$desiredColumn);var $=this.session.screenToDocumentPosition(I.row+_,I.column);if(x.isEmpty())var O=$;else var T=this.session.documentToScreenPosition(L?x.end:x.start),O=this.session.screenToDocumentPosition(T.row+_,T.column);if(L){var C=r.fromPoints($,O);C.cursor=C.start}else{var C=r.fromPoints(O,$);C.cursor=C.end}if(C.desiredColumn=I.column,!this.selection.inMultiSelectMode)this.selection.addRange(x);else if(S)var A=x.cursor;this.selection.addRange(C),A&&this.selection.substractPoint(A)},this.transposeSelections=function(_){for(var S=this.session,x=S.multiSelect,L=x.ranges,I=L.length;I--;){var $=L[I];if($.isEmpty()){var T=S.getWordRange($.start.row,$.start.column);$.start.row=T.start.row,$.start.column=T.start.column,$.end.row=T.end.row,$.end.column=T.end.column}}x.mergeOverlappingRanges();for(var O=[],I=L.length;I--;){var $=L[I];O.unshift(S.getTextRange($))}_<0?O.unshift(O.pop()):O.push(O.shift());for(var I=L.length;I--;){var $=L[I],C=$.clone();S.replace($,O[I]),$.start.row=C.start.row,$.start.column=C.start.column}x.fromOrientedRange(x.ranges[0])},this.selectMore=function(_,S,x){var L=this.session,I=L.multiSelect,$=I.toOrientedRange();if(!($.isEmpty()&&($=L.getWordRange($.start.row,$.start.column),$.cursor=_==-1?$.start:$.end,this.multiSelect.addRange($),x))){var T=L.getTextRange($),O=o(L,T,_);O&&(O.cursor=_==-1?O.start:O.end,this.session.unfold(O),this.multiSelect.addRange(O),this.renderer.scrollCursorIntoView(null,.5)),S&&this.multiSelect.substractPoint($.cursor)}},this.alignCursors=function(){var _=this.session,S=_.multiSelect,x=S.ranges,L=-1,I=x.filter(function(Y){if(Y.cursor.row==L)return!0;L=Y.cursor.row});if(!x.length||I.length==x.length-1){var $=this.selection.getRange(),T=$.start.row,O=$.end.row,C=T==O;if(C){var A=this.session.getLength(),M;do M=this.session.getLine(O);while(/[=:]/.test(M)&&++O<A);do M=this.session.getLine(T);while(/[=:]/.test(M)&&--T>0);T<0&&(T=0),O>=A&&(O=A-1)}var R=this.session.removeFullLines(T,O);R=this.$reAlignText(R,C),this.session.insert({row:T,column:0},R.join(`
|
|
1069
|
+
`)+`
|
|
1070
|
+
`),C||($.start.column=0,$.end.column=R[R.length-1].length),this.selection.setRange($)}else{I.forEach(function(Y){S.substractPoint(Y.cursor)});var N=0,H=1/0,z=x.map(function(Y){var K=Y.cursor,re=_.getLine(K.row),fe=re.substr(K.column).search(/\S/g);return fe==-1&&(fe=0),K.column>N&&(N=K.column),fe<H&&(H=fe),fe});x.forEach(function(Y,K){var re=Y.cursor,fe=N-re.column,U=z[K]-H;fe>U?_.insert(re,h.stringRepeat(" ",fe-U)):_.remove(new r(re.row,re.column,re.row,re.column-fe+U)),Y.start.column=Y.end.column=N,Y.start.row=Y.end.row=re.row,Y.cursor=Y.end}),S.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(_,S){function x(R){return h.stringRepeat(" ",R)}function L(R){return R[2]?x(C)+R[2]+x(A-R[2].length+M)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}function I(R){return R[2]?x(C+A-R[2].length)+R[2]+x(M)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}function $(R){return R[2]?x(C)+R[2]+x(M)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}var T=!0,O=!0,C,A,M;return _.map(function(R){var N=R.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?C==null?(C=N[1].length,A=N[2].length,M=N[3].length,N):(C+A+M!=N[1].length+N[2].length+N[3].length&&(O=!1),C!=N[1].length&&(T=!1),C>N[1].length&&(C=N[1].length),A<N[2].length&&(A=N[2].length),M>N[3].length&&(M=N[3].length),N):[R]}).map(S?L:T?O?I:L:$)}}).call(k.prototype),i.onSessionChange=function(_){var S=_.session;S&&!S.multiSelect&&(S.$selectionMarkers=[],S.selection.$initRangeList(),S.multiSelect=S.selection),this.multiSelect=S&&S.multiSelect;var x=_.oldSession;x&&(x.multiSelect.off("addRange",this.$onAddRange),x.multiSelect.off("removeRange",this.$onRemoveRange),x.multiSelect.off("multiSelect",this.$onMultiSelect),x.multiSelect.off("singleSelect",this.$onSingleSelect),x.multiSelect.lead.off("change",this.$checkMultiselectChange),x.multiSelect.anchor.off("change",this.$checkMultiselectChange)),S&&(S.multiSelect.on("addRange",this.$onAddRange),S.multiSelect.on("removeRange",this.$onRemoveRange),S.multiSelect.on("multiSelect",this.$onMultiSelect),S.multiSelect.on("singleSelect",this.$onSingleSelect),S.multiSelect.lead.on("change",this.$checkMultiselectChange),S.multiSelect.anchor.on("change",this.$checkMultiselectChange)),S&&this.inMultiSelectMode!=S.selection.inMultiSelectMode&&(S.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},i.MultiSelect=d,t("./config").defineOptions(k.prototype,"editor",{enableMultiselect:{set:function(_){d(this),_?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(_){this.$blockSelectEnabled=_},value:!0}})}),(void 0)("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,i,s){var o=t("../../range").Range,u=i.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,l,p){var r=d.getLine(p);return this.foldingStartMarker.test(r)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(d,l,p){return null},this.indentationBlock=function(d,l,p){var r=/\S/,f=d.getLine(l),a=f.search(r);if(a!=-1){for(var c=p||f.length,h=d.getLength(),m=l,y=l;++l<h;){var v=d.getLine(l).search(r);if(v!=-1){if(v<=a){var w=d.getTokenAt(l,0);if(!w||w.type!=="string")break}y=l}}if(y>m){var k=d.getLine(y).length;return new o(m,c,y,k)}}},this.openingBracketBlock=function(d,l,p,r,f){var a={row:p,column:r+1},c=d.$findClosingBracket(l,a,f);if(c){var h=d.foldWidgets[c.row];return h==null&&(h=d.getFoldWidget(c.row)),h=="start"&&c.row>a.row&&(c.row--,c.column=d.getLine(c.row).length),o.fromPoints(a,c)}},this.closingBracketBlock=function(d,l,p,r,f){var a={row:p,column:r},c=d.$findOpeningBracket(l,a);if(c)return c.column++,a.column--,o.fromPoints(c,a)}}).call(u.prototype)}),(void 0)("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,i,s){function o(r,f,a){for(var c=0,h=r.length-1;c<=h;){var m=c+h>>1,y=a(f,r[m]);if(y>0)c=m+1;else{if(!(y<0))return m;h=m-1}}return-(c+1)}function u(r,f,a){var c=r.getAnnotations().sort(l.comparePoints);if(c.length){var h=o(c,{row:f,column:-1},l.comparePoints);h<0&&(h=-h-1),h>=c.length?h=a>0?0:c.length-1:h===0&&a<0&&(h=c.length-1);var m=c[h];if(!(!m||!a)){if(m.row===f){do m=c[h+=a];while(m&&m.row===f);if(!m)return c.slice()}var y=[];f=m.row;do y[a<0?"unshift":"push"](m),m=c[h+=a];while(m&&m.row==f);return y.length&&y}}}var d=t("../lib/dom"),l=t("../range").Range,p=t("../config").nls;i.showErrorMarker=function(r,f){var a=r.session,c=r.getCursorPosition(),h=c.row,m=a.widgetManager.getWidgetsAtRow(h).filter(function(I){return I.type=="errorMarker"})[0];m?m.destroy():h-=f;var y=u(a,h,f),v;if(y){var w=y[0];c.column=(w.pos&&typeof w.column!="number"?w.pos.sc:w.column)||0,c.row=w.row,v=r.renderer.$gutterLayer.$annotations[c.row]}else{if(m)return;v={displayText:[p("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(c.row),r.selection.moveToPosition(c);var k={row:c.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},_=k.el.appendChild(d.createElement("div")),S=k.el.appendChild(d.createElement("div"));S.className="error_widget_arrow "+v.className;var x=r.renderer.$cursorLayer.getPixelPosition(c).left;S.style.left=x+r.renderer.gutterWidth-5+"px",k.el.className="error_widget_wrapper",_.className="error_widget "+v.className,v.displayText.forEach(function(I,$){_.appendChild(d.createTextNode(I)),$<v.displayText.length-1&&_.appendChild(d.createElement("br"))}),_.appendChild(d.createElement("div"));var L=function(I,$,T){if($===0&&(T==="esc"||T==="return"))return k.destroy(),{command:"null"}};k.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(L),a.widgetManager.removeLineWidget(k),r.off("changeSelection",k.destroy),r.off("changeSession",k.destroy),r.off("mouseup",k.destroy),r.off("change",k.destroy))},r.keyBinding.addKeyboardHandler(L),r.on("changeSelection",k.destroy),r.on("changeSession",k.destroy),r.on("mouseup",k.destroy),r.on("change",k.destroy),r.session.widgetManager.addLineWidget(k),k.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:k.el.offsetHeight})},d.importCssString(`
|
|
1071
|
+
.error_widget_wrapper {
|
|
1072
|
+
background: inherit;
|
|
1073
|
+
color: inherit;
|
|
1074
|
+
border:none
|
|
1075
|
+
}
|
|
1076
|
+
.error_widget {
|
|
1077
|
+
border-top: solid 2px;
|
|
1078
|
+
border-bottom: solid 2px;
|
|
1079
|
+
margin: 5px 0;
|
|
1080
|
+
padding: 10px 40px;
|
|
1081
|
+
white-space: pre-wrap;
|
|
1082
|
+
}
|
|
1083
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
1084
|
+
border-color: #ff5a5a
|
|
1085
|
+
}
|
|
1086
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
1087
|
+
border-color: #F1D817
|
|
1088
|
+
}
|
|
1089
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
1090
|
+
border-color: #5a5a5a
|
|
1091
|
+
}
|
|
1092
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
1093
|
+
border-color: #5aaa5a
|
|
1094
|
+
}
|
|
1095
|
+
.error_widget_arrow {
|
|
1096
|
+
position: absolute;
|
|
1097
|
+
border: solid 5px;
|
|
1098
|
+
border-top-color: transparent!important;
|
|
1099
|
+
border-right-color: transparent!important;
|
|
1100
|
+
border-left-color: transparent!important;
|
|
1101
|
+
top: -5px;
|
|
1102
|
+
}
|
|
1103
|
+
`,"error_marker.css",!1)}),(void 0)("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,i,s){t("./loader_build")(i);var o=t("./lib/dom"),u=t("./range").Range,d=t("./editor").Editor,l=t("./edit_session").EditSession,p=t("./undomanager").UndoManager,r=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"),i.config=t("./config"),i.edit=function(a,c){if(typeof a=="string"){var h=a;if(a=document.getElementById(h),!a)throw new Error("ace.edit can't find div #"+h)}if(a&&a.env&&a.env.editor instanceof d)return a.env.editor;var m="";if(a&&/input|textarea/i.test(a.tagName)){var y=a;m=y.value,a=o.createElement("pre"),y.parentNode.replaceChild(a,y)}else a&&(m=a.textContent,a.innerHTML="");var v=i.createEditSession(m),w=new d(new r(a),v,c),k={document:v,editor:w,onResize:w.resize.bind(w,null)};return y&&(k.textarea=y),w.on("destroy",function(){k.editor.container.env=null}),w.container.env=w.env=k,w},i.createEditSession=function(a,c){var h=new l(a,c);return h.setUndoManager(new p),h},i.Range=u,i.Editor=d,i.EditSession=l,i.UndoManager=p,i.VirtualRenderer=r;var f=i.config.version;i.version=f}),function(){window.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=window.define);var i=function(){return this}();!i&&typeof window<"u"&&(i=window),!i&&typeof self<"u"&&(i=self),i.ace||(i.ace=t);for(var s in t)t.hasOwnProperty(s)&&(i.ace[s]=t[s]);i.ace.default=i.ace,n&&(n.exports=i.ace)})}()}(Nh)),Nh.exports}var jb=RL();const Ub=di(jb),TL=Tl({__proto__:null,default:Ub},[jb]);var Fh={exports:{}},bv;function $L(){return bv||(bv=1,function(n,e){(void 0)("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,i,s){var o=t("../lib/oop"),u=t("./text_highlight_rules").TextHighlightRules,d=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"}]}};o.inherits(d,u),i.JsonHighlightRules=d}),(void 0)("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,i,s){var o=t("../range").Range,u=function(){};(function(){this.checkOutdent=function(d,l){return/^\s+$/.test(d)?/^\s*\}/.test(l):!1},this.autoOutdent=function(d,l){var p=d.getLine(l),r=p.match(/^(\s*\})/);if(!r)return 0;var f=r[1].length,a=d.findMatchingBracket({row:l,column:f});if(!a||a.row==l)return 0;var c=this.$getIndent(d.getLine(a.row));d.replace(new o(l,0,l,f-1),c)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(u.prototype),i.MatchingBraceOutdent=u}),(void 0)("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,i,s){var o=t("../../lib/oop"),u=t("../../range").Range,d=t("./fold_mode").FoldMode,l=i.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};o.inherits(l,d),(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(p,r,f){var a=p.getLine(f);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var c=this._getFoldWidgetBase(p,r,f);return!c&&this.startRegionRe.test(a)?"start":c},this.getFoldWidgetRange=function(p,r,f,a){var c=p.getLine(f);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(p,c,f);var y=c.match(this.foldingStartMarker);if(y){var h=y.index;if(y[1])return this.openingBracketBlock(p,y[1],f,h);var m=p.getCommentFoldRange(f,h+y[0].length,1);return m&&!m.isMultiLine()&&(a?m=this.getSectionRange(p,f):r!="all"&&(m=null)),m}if(r!=="markbegin"){var y=c.match(this.foldingStopMarker);if(y){var h=y.index+y[0].length;return y[1]?this.closingBracketBlock(p,y[1],f,h):p.getCommentFoldRange(f,h,-1)}}},this.getSectionRange=function(p,r){var f=p.getLine(r),a=f.search(/\S/),c=r,h=f.length;r+=1;for(var m=r,y=p.getLength();++r<y;){f=p.getLine(r);var v=f.search(/\S/);if(v!==-1){if(a>v)break;var w=this.getFoldWidgetRange(p,"all",r);if(w){if(w.start.row<=c)break;if(w.isMultiLine())r=w.end.row;else if(a==v)break}m=r}}return new u(c,h,m,p.getLine(m).length)},this.getCommentRegionBlock=function(p,r,f){for(var a=r.search(/\s*$/),c=p.getLength(),h=f,m=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,y=1;++f<c;){r=p.getLine(f);var v=m.exec(r);if(v&&(v[1]?y--:y++,!y))break}var w=f;if(w>h)return new u(h,a,w,r.length)}}).call(l.prototype)}),(void 0)("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,i,s){var o=t("../lib/oop"),u=t("./text").Mode,d=t("./json_highlight_rules").JsonHighlightRules,l=t("./matching_brace_outdent").MatchingBraceOutdent,p=t("./folding/cstyle").FoldMode,r=t("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=d,this.$outdent=new l,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new p};o.inherits(f,u),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(a,c,h){var m=this.$getIndent(c);if(a=="start"){var y=c.match(/^.*[\{\(\[]\s*$/);y&&(m+=h)}return m},this.checkOutdent=function(a,c,h){return this.$outdent.checkOutdent(c,h)},this.autoOutdent=function(a,c,h){this.$outdent.autoOutdent(c,h)},this.createWorker=function(a){var c=new r(["ace"],"ace/mode/json_worker","JsonWorker");return c.attachToDocument(a.getDocument()),c.on("annotate",function(h){a.setAnnotations(h.data)}),c.on("terminate",function(){a.clearAnnotations()}),c},this.$id="ace/mode/json"}).call(f.prototype),i.Mode=f}),function(){window.require(["ace/mode/json"],function(t){n&&(n.exports=t)})}()}(Fh)),Fh.exports}var Vb=$L();const qb=di(Vb),IL=Tl({__proto__:null,default:qb},[Vb]);var Wh={exports:{}},wv;function OL(){return wv||(wv=1,function(n,e){(void 0)("ace/theme/cloud9_night-css",["require","exports","module"],function(t,i,s){s.exports=`.ace-cloud9-night .ace_gutter {
|
|
1104
|
+
background: #303130;
|
|
1105
|
+
color: #eee
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.ace-cloud9-night .ace_print-margin {
|
|
1109
|
+
width: 1px;
|
|
1110
|
+
background: #222
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
.ace-cloud9-night {
|
|
1114
|
+
background-color: #181818;
|
|
1115
|
+
color: #EBEBEB
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.ace-cloud9-night .ace_cursor {
|
|
1119
|
+
color: #9F9F9F
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.ace-cloud9-night .ace_marker-layer .ace_selection {
|
|
1123
|
+
background: #424242
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
.ace-cloud9-night.ace_multiselect .ace_selection.ace_start {
|
|
1127
|
+
box-shadow: 0 0 3px 0px #000000;
|
|
1128
|
+
border-radius: 2px
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
.ace-cloud9-night .ace_marker-layer .ace_step {
|
|
1132
|
+
background: rgb(102, 82, 0)
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
.ace-cloud9-night .ace_marker-layer .ace_bracket {
|
|
1136
|
+
margin: -1px 0 0 -1px;
|
|
1137
|
+
border: 1px solid #888888
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
.ace-cloud9-night .ace_marker-layer .ace_highlight {
|
|
1141
|
+
border: 1px solid rgb(110, 119, 0);
|
|
1142
|
+
border-bottom: 0;
|
|
1143
|
+
box-shadow: inset 0 -1px rgb(110, 119, 0);
|
|
1144
|
+
margin: -1px 0 0 -1px;
|
|
1145
|
+
background: rgba(255, 235, 0, 0.1);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
.ace-cloud9-night .ace_marker-layer .ace_active-line {
|
|
1149
|
+
background: #292929
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
.ace-cloud9-night .ace_gutter-active-line {
|
|
1153
|
+
background-color: #3D3D3D
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
.ace-cloud9-night .ace_stack {
|
|
1157
|
+
background-color: rgb(66, 90, 44)
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
.ace-cloud9-night .ace_marker-layer .ace_selected-word {
|
|
1161
|
+
border: 1px solid #888888
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
.ace-cloud9-night .ace_invisible {
|
|
1165
|
+
color: #343434
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.ace-cloud9-night .ace_keyword,
|
|
1169
|
+
.ace-cloud9-night .ace_meta,
|
|
1170
|
+
.ace-cloud9-night .ace_storage,
|
|
1171
|
+
.ace-cloud9-night .ace_storage.ace_type,
|
|
1172
|
+
.ace-cloud9-night .ace_support.ace_type {
|
|
1173
|
+
color: #C397D8
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
.ace-cloud9-night .ace_keyword.ace_operator {
|
|
1177
|
+
color: #70C0B1
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
.ace-cloud9-night .ace_constant.ace_character,
|
|
1181
|
+
.ace-cloud9-night .ace_constant.ace_language,
|
|
1182
|
+
.ace-cloud9-night .ace_constant.ace_numeric,
|
|
1183
|
+
.ace-cloud9-night .ace_keyword.ace_other.ace_unit,
|
|
1184
|
+
.ace-cloud9-night .ace_support.ace_constant,
|
|
1185
|
+
.ace-cloud9-night .ace_variable.ace_parameter {
|
|
1186
|
+
color: #E78C45
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
.ace-cloud9-night .ace_constant.ace_other {
|
|
1190
|
+
color: #EEEEEE
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.ace-cloud9-night .ace_invalid {
|
|
1194
|
+
color: #CED2CF;
|
|
1195
|
+
background-color: #DF5F5F
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
.ace-cloud9-night .ace_invalid.ace_deprecated {
|
|
1199
|
+
color: #CED2CF;
|
|
1200
|
+
background-color: #B798BF
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
.ace-cloud9-night .ace_fold {
|
|
1204
|
+
background-color: #7AA6DA;
|
|
1205
|
+
border-color: #DEDEDE
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
.ace-cloud9-night .ace_entity.ace_name.ace_function,
|
|
1209
|
+
.ace-cloud9-night .ace_support.ace_function,
|
|
1210
|
+
.ace-cloud9-night .ace_variable:not(.ace_parameter),
|
|
1211
|
+
.ace-cloud9-night .ace_constant:not(.ace_numeric) {
|
|
1212
|
+
color: #7AA6DA
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
.ace-cloud9-night .ace_support.ace_class,
|
|
1216
|
+
.ace-cloud9-night .ace_support.ace_type {
|
|
1217
|
+
color: #E7C547
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
.ace-cloud9-night .ace_heading,
|
|
1221
|
+
.ace-cloud9-night .ace_markup.ace_heading,
|
|
1222
|
+
.ace-cloud9-night .ace_string {
|
|
1223
|
+
color: #B9CA4A
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
.ace-cloud9-night .ace_entity.ace_name.ace_tag,
|
|
1227
|
+
.ace-cloud9-night .ace_entity.ace_other.ace_attribute-name,
|
|
1228
|
+
.ace-cloud9-night .ace_meta.ace_tag,
|
|
1229
|
+
.ace-cloud9-night .ace_string.ace_regexp,
|
|
1230
|
+
.ace-cloud9-night .ace_variable {
|
|
1231
|
+
color: #D54E53
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.ace-cloud9-night .ace_comment {
|
|
1235
|
+
color: #969896
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.ace-cloud9-night .ace_c9searchresults.ace_keyword {
|
|
1239
|
+
color: #C2C280;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.ace-cloud9-night .ace_indent-guide {
|
|
1243
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
.ace-cloud9-night .ace_indent-guide-active {
|
|
1247
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1248
|
+
}
|
|
1249
|
+
`}),(void 0)("ace/theme/cloud9_night",["require","exports","module","ace/theme/cloud9_night-css","ace/lib/dom"],function(t,i,s){i.isDark=!0,i.cssClass="ace-cloud9-night",i.cssText=t("./cloud9_night-css");var o=t("../lib/dom");o.importCssString(i.cssText,i.cssClass)}),function(){window.require(["ace/theme/cloud9_night"],function(t){n&&(n.exports=t)})}()}(Wh)),Wh.exports}var Gb=OL();const Kb=di(Gb),DL=Tl({__proto__:null,default:Kb},[Gb]),PL=`
|
|
1250
|
+
<div class="editor container"></div>
|
|
1251
|
+
`,BL=Ub||TL,NL=qb||IL,FL=Kb||DL,WL=Ot.compile(PL);class Gf extends At{constructor(e){super(WL({})),this.options=e,this.instance=BL.edit(this.element),this.instance.setAnimatedScroll(!1),this.instance.setTheme(FL),this.instance.session.setTabSize(2),this.instance.session.setUseWorker(!1),this.instance.session.setMode(new NL.Mode),this.provide({})}extract(){return JSON.parse(this.instance.getValue()||"null")}clear(){return this.instance.setValue(""),this}provide(e){return this.instance.setValue(JSON.stringify(e,null,2)),this.instance.selection.clearSelection(),this}static build(e){return new Gf(e)}}const HL=`
|
|
1252
|
+
<div class="viewer container"></div>
|
|
1253
|
+
`;function zL(n,e){var t,i,s,o,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function d(l){return function(p){return function(r){if(t)throw new TypeError("Generator is already executing.");for(;u;)try{if(t=1,i&&(s=2&r[0]?i.return:r[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;switch(i=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return u.label++,{value:r[1],done:!1};case 5:u.label++,i=r[1],r=[0];continue;case 7:r=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!((s=s.length>0&&s[s.length-1])||r[0]!==6&&r[0]!==2)){u=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){u.label=r[1];break}if(r[0]===6&&u.label<s[1]){u.label=s[1],s=r;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(r);break}s[2]&&u.ops.pop(),u.trys.pop();continue}r=e.call(n,u)}catch(f){r=[6,f],i=0}finally{t=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([l,p])}}}function Yb(n){return n===null?"null":typeof n}function cf(n){return!!n&&typeof n=="object"}function Xb(n){if(n===void 0)return"";if(n===null||typeof n=="object"&&!n.constructor)return"Object";var e=/function ([^(]*)/.exec(n.constructor.toString());return e&&e.length>1?e[1]:""}function Qb(n,e,t){return n==="null"||n==="undefined"?n:(n!=="string"&&n!=="stringifiable"||(t=t.replace(/"/g,'\\"')),n==="function"?e.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":t)}function _v(n){var e="";return cf(n)?(e=Xb(n),Array.isArray(n)&&(e+="["+n.length+"]")):e=Qb(Yb(n),n,n),typeof e=="string"?'"'+e+'"':e}function mn(n){return"json-formatter-"+n}function Vt(n,e,t){var i=document.createElement(n);return e&&i.classList.add(mn(e)),t!==void 0&&(t instanceof Node?i.appendChild(t):i.appendChild(document.createTextNode(String(t)))),i}(function(n){if(typeof window<"u"){var e=document.createElement("style");e.setAttribute("media","screen"),e.innerHTML=n,document.head.appendChild(e)}})(`.json-formatter-row {
|
|
1254
|
+
font-family: monospace;
|
|
1255
|
+
}
|
|
1256
|
+
.json-formatter-row,
|
|
1257
|
+
.json-formatter-row a,
|
|
1258
|
+
.json-formatter-row a:hover {
|
|
1259
|
+
color: black;
|
|
1260
|
+
text-decoration: none;
|
|
1261
|
+
}
|
|
1262
|
+
.json-formatter-row .json-formatter-row {
|
|
1263
|
+
margin-left: 1rem;
|
|
1264
|
+
}
|
|
1265
|
+
.json-formatter-row .json-formatter-children.json-formatter-empty {
|
|
1266
|
+
opacity: 0.5;
|
|
1267
|
+
margin-left: 1rem;
|
|
1268
|
+
}
|
|
1269
|
+
.json-formatter-row .json-formatter-children.json-formatter-empty:after {
|
|
1270
|
+
display: none;
|
|
1271
|
+
}
|
|
1272
|
+
.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
|
|
1273
|
+
content: "No properties";
|
|
1274
|
+
}
|
|
1275
|
+
.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
|
|
1276
|
+
content: "[]";
|
|
1277
|
+
}
|
|
1278
|
+
.json-formatter-row .json-formatter-string,
|
|
1279
|
+
.json-formatter-row .json-formatter-stringifiable {
|
|
1280
|
+
color: green;
|
|
1281
|
+
white-space: pre;
|
|
1282
|
+
word-wrap: break-word;
|
|
1283
|
+
}
|
|
1284
|
+
.json-formatter-row .json-formatter-number {
|
|
1285
|
+
color: blue;
|
|
1286
|
+
}
|
|
1287
|
+
.json-formatter-row .json-formatter-boolean {
|
|
1288
|
+
color: red;
|
|
1289
|
+
}
|
|
1290
|
+
.json-formatter-row .json-formatter-null {
|
|
1291
|
+
color: #855A00;
|
|
1292
|
+
}
|
|
1293
|
+
.json-formatter-row .json-formatter-undefined {
|
|
1294
|
+
color: #ca0b69;
|
|
1295
|
+
}
|
|
1296
|
+
.json-formatter-row .json-formatter-function {
|
|
1297
|
+
color: #FF20ED;
|
|
1298
|
+
}
|
|
1299
|
+
.json-formatter-row .json-formatter-date {
|
|
1300
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
1301
|
+
}
|
|
1302
|
+
.json-formatter-row .json-formatter-url {
|
|
1303
|
+
text-decoration: underline;
|
|
1304
|
+
color: blue;
|
|
1305
|
+
cursor: pointer;
|
|
1306
|
+
}
|
|
1307
|
+
.json-formatter-row .json-formatter-bracket {
|
|
1308
|
+
color: blue;
|
|
1309
|
+
}
|
|
1310
|
+
.json-formatter-row .json-formatter-key {
|
|
1311
|
+
color: #00008B;
|
|
1312
|
+
padding-right: 0.2rem;
|
|
1313
|
+
}
|
|
1314
|
+
.json-formatter-row .json-formatter-toggler-link {
|
|
1315
|
+
cursor: pointer;
|
|
1316
|
+
}
|
|
1317
|
+
.json-formatter-row .json-formatter-toggler {
|
|
1318
|
+
line-height: 1.2rem;
|
|
1319
|
+
font-size: 0.7rem;
|
|
1320
|
+
vertical-align: middle;
|
|
1321
|
+
opacity: 0.6;
|
|
1322
|
+
cursor: pointer;
|
|
1323
|
+
padding-right: 0.2rem;
|
|
1324
|
+
}
|
|
1325
|
+
.json-formatter-row .json-formatter-toggler:after {
|
|
1326
|
+
display: inline-block;
|
|
1327
|
+
transition: transform 100ms ease-in;
|
|
1328
|
+
content: "►";
|
|
1329
|
+
}
|
|
1330
|
+
.json-formatter-row > a > .json-formatter-preview-text {
|
|
1331
|
+
opacity: 0;
|
|
1332
|
+
transition: opacity 0.15s ease-in;
|
|
1333
|
+
font-style: italic;
|
|
1334
|
+
}
|
|
1335
|
+
.json-formatter-row:hover > a > .json-formatter-preview-text {
|
|
1336
|
+
opacity: 0.6;
|
|
1337
|
+
}
|
|
1338
|
+
.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
|
|
1339
|
+
transform: rotate(90deg);
|
|
1340
|
+
}
|
|
1341
|
+
.json-formatter-row.json-formatter-open > .json-formatter-children:after {
|
|
1342
|
+
display: inline-block;
|
|
1343
|
+
}
|
|
1344
|
+
.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
|
|
1345
|
+
display: none;
|
|
1346
|
+
}
|
|
1347
|
+
.json-formatter-row.json-formatter-open.json-formatter-empty:after {
|
|
1348
|
+
display: block;
|
|
1349
|
+
}
|
|
1350
|
+
.json-formatter-dark.json-formatter-row {
|
|
1351
|
+
font-family: monospace;
|
|
1352
|
+
}
|
|
1353
|
+
.json-formatter-dark.json-formatter-row,
|
|
1354
|
+
.json-formatter-dark.json-formatter-row a,
|
|
1355
|
+
.json-formatter-dark.json-formatter-row a:hover {
|
|
1356
|
+
color: white;
|
|
1357
|
+
text-decoration: none;
|
|
1358
|
+
}
|
|
1359
|
+
.json-formatter-dark.json-formatter-row .json-formatter-row {
|
|
1360
|
+
margin-left: 1rem;
|
|
1361
|
+
}
|
|
1362
|
+
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {
|
|
1363
|
+
opacity: 0.5;
|
|
1364
|
+
margin-left: 1rem;
|
|
1365
|
+
}
|
|
1366
|
+
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {
|
|
1367
|
+
display: none;
|
|
1368
|
+
}
|
|
1369
|
+
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {
|
|
1370
|
+
content: "No properties";
|
|
1371
|
+
}
|
|
1372
|
+
.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {
|
|
1373
|
+
content: "[]";
|
|
1374
|
+
}
|
|
1375
|
+
.json-formatter-dark.json-formatter-row .json-formatter-string,
|
|
1376
|
+
.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {
|
|
1377
|
+
color: #31F031;
|
|
1378
|
+
white-space: pre;
|
|
1379
|
+
word-wrap: break-word;
|
|
1380
|
+
}
|
|
1381
|
+
.json-formatter-dark.json-formatter-row .json-formatter-number {
|
|
1382
|
+
color: #66C2FF;
|
|
1383
|
+
}
|
|
1384
|
+
.json-formatter-dark.json-formatter-row .json-formatter-boolean {
|
|
1385
|
+
color: #EC4242;
|
|
1386
|
+
}
|
|
1387
|
+
.json-formatter-dark.json-formatter-row .json-formatter-null {
|
|
1388
|
+
color: #EEC97D;
|
|
1389
|
+
}
|
|
1390
|
+
.json-formatter-dark.json-formatter-row .json-formatter-undefined {
|
|
1391
|
+
color: #ef8fbe;
|
|
1392
|
+
}
|
|
1393
|
+
.json-formatter-dark.json-formatter-row .json-formatter-function {
|
|
1394
|
+
color: #FD48CB;
|
|
1395
|
+
}
|
|
1396
|
+
.json-formatter-dark.json-formatter-row .json-formatter-date {
|
|
1397
|
+
background-color: rgba(255, 255, 255, 0.05);
|
|
1398
|
+
}
|
|
1399
|
+
.json-formatter-dark.json-formatter-row .json-formatter-url {
|
|
1400
|
+
text-decoration: underline;
|
|
1401
|
+
color: #027BFF;
|
|
1402
|
+
cursor: pointer;
|
|
1403
|
+
}
|
|
1404
|
+
.json-formatter-dark.json-formatter-row .json-formatter-bracket {
|
|
1405
|
+
color: #9494FF;
|
|
1406
|
+
}
|
|
1407
|
+
.json-formatter-dark.json-formatter-row .json-formatter-key {
|
|
1408
|
+
color: #23A0DB;
|
|
1409
|
+
padding-right: 0.2rem;
|
|
1410
|
+
}
|
|
1411
|
+
.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {
|
|
1412
|
+
cursor: pointer;
|
|
1413
|
+
}
|
|
1414
|
+
.json-formatter-dark.json-formatter-row .json-formatter-toggler {
|
|
1415
|
+
line-height: 1.2rem;
|
|
1416
|
+
font-size: 0.7rem;
|
|
1417
|
+
vertical-align: middle;
|
|
1418
|
+
opacity: 0.6;
|
|
1419
|
+
cursor: pointer;
|
|
1420
|
+
padding-right: 0.2rem;
|
|
1421
|
+
}
|
|
1422
|
+
.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {
|
|
1423
|
+
display: inline-block;
|
|
1424
|
+
transition: transform 100ms ease-in;
|
|
1425
|
+
content: "►";
|
|
1426
|
+
}
|
|
1427
|
+
.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {
|
|
1428
|
+
opacity: 0;
|
|
1429
|
+
transition: opacity 0.15s ease-in;
|
|
1430
|
+
font-style: italic;
|
|
1431
|
+
}
|
|
1432
|
+
.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {
|
|
1433
|
+
opacity: 0.6;
|
|
1434
|
+
}
|
|
1435
|
+
.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {
|
|
1436
|
+
transform: rotate(90deg);
|
|
1437
|
+
}
|
|
1438
|
+
.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {
|
|
1439
|
+
display: inline-block;
|
|
1440
|
+
}
|
|
1441
|
+
.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {
|
|
1442
|
+
display: none;
|
|
1443
|
+
}
|
|
1444
|
+
.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {
|
|
1445
|
+
display: block;
|
|
1446
|
+
}
|
|
1447
|
+
`);var jL=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,UL=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,VL=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,Va=window.requestAnimationFrame||function(n){return n(),0},Ur={hoverPreviewEnabled:!1,hoverPreviewArrayCount:10,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null,maxArrayItems:100,exposePath:!1,afterCopyHandler:function(){}},qL=function(){function n(e,t,i,s,o,u,d,l){t===void 0&&(t=1),i===void 0&&(i=Ur),u===void 0&&(u=[]),l===void 0&&(l=1),this.json=e,this.open=t,this.config=i,this.key=s,this.displayKey=o,this.path=u,this.arrayRange=d,this.level=l,this._isOpen=null,this.config.hoverPreviewEnabled===void 0&&(this.config.hoverPreviewEnabled=Ur.hoverPreviewEnabled),this.config.hoverPreviewArrayCount===void 0&&(this.config.hoverPreviewArrayCount=Ur.hoverPreviewArrayCount),this.config.hoverPreviewFieldCount===void 0&&(this.config.hoverPreviewFieldCount=Ur.hoverPreviewFieldCount),this.config.useToJSON===void 0&&(this.config.useToJSON=Ur.useToJSON),this.config.maxArrayItems===void 0&&(this.config.maxArrayItems=Ur.maxArrayItems),this.key===""&&(this.key='""'),this.displayKey===void 0&&(this.displayKey=this.key)}return Object.defineProperty(n.prototype,"isOpen",{get:function(){return this._isOpen!==null?this._isOpen:this.open>0},set:function(e){this._isOpen=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDate",{get:function(){return this.json instanceof Date||this.type==="string"&&(jL.test(this.json)||VL.test(this.json)||UL.test(this.json))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isUrl",{get:function(){return this.type==="string"&&this.json.indexOf("http")===0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isLargeArray",{get:function(){return this.isArray&&this.json.length>this.config.maxArrayItems},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isArrayRange",{get:function(){return this.isArray&&this.arrayRange!==void 0&&this.arrayRange.length==2},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isObject",{get:function(){return cf(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&this.type==="stringifiable"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hasKey",{get:function(){return this.key!==void 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"constructorName",{get:function(){return Xb(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":Yb(this.json)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"keys",{get:function(){if(this.isObject){var e=Object.keys(this.json);if(this.isLargeArray){var t=Math.ceil(this.json.length/this.config.maxArrayItems);e=[];for(var i=0;i<t;i++){var s=i*this.config.maxArrayItems,o=Math.min(this.json.length-1,s+(this.config.maxArrayItems-1));e.push(s+" … "+o)}}return!this.isArray&&this.config.sortPropertiesBy?e.sort(this.config.sortPropertiesBy):e}return[]},enumerable:!1,configurable:!0}),n.prototype.toggleOpen=function(e){var t,i;if(!((i=(t=e.target)===null||t===void 0?void 0:t.classList)===null||i===void 0)&&i.contains("json-formatter-copy"))return null;this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(mn("open")))},n.prototype.onCopy=function(e){var t,i,s,o,u,d;return s=this,o=void 0,d=function(){return zL(this,function(l){switch(l.label){case 0:return[4,navigator.clipboard.writeText(cf(this.json)?JSON.stringify(this.json):this.json)];case 1:return l.sent(),(i=(t=this.config).afterCopyHandler)===null||i===void 0||i.call(t),[2]}})},new((u=void 0)||(u=Promise))(function(l,p){function r(c){try{a(d.next(c))}catch(h){p(h)}}function f(c){try{a(d.throw(c))}catch(h){p(h)}}function a(c){c.done?l(c.value):new u(function(h){h(c.value)}).then(r,f)}a((d=d.apply(s,o||[])).next())})},n.prototype.openAtDepth=function(e){e===void 0&&(e=1),e<0||(this.open=e,this.isOpen=e!==0,this.element&&(this.removeChildren(!1),e===0?this.element.classList.remove(mn("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(mn("open")))))},n.prototype.getInlinepreview=function(){var e=this;if(this.isArray){var t=this.json.slice(0,this.config.hoverPreviewArrayCount).map(_v);return t.length<this.json.length&&t.push("..."),"["+t.join(", ")+"]"}var i=this.keys,s=i.slice(0,this.config.hoverPreviewFieldCount).map(function(u){var d=(u+": "+_v(e.json[u])).replace(/\n/g,"");return d.length>35?d.substring(0,32)+"...":d}),o=i.length>=this.config.hoverPreviewFieldCount?", …":"";return"{ "+s.join(", ")+o+" }"},n.prototype.render=function(){this.element=Vt("div","row");var e=this.isObject?Vt("a","toggler-link"):Vt("span");if(this.isArrayRange?e.appendChild(Vt("span","range","["+this.displayKey+"]")):this.hasKey&&(e.appendChild(Vt("span","key",this.displayKey+":")).classList.add("level-"+this.level),this.config.exposePath&&(this.element.dataset.path=JSON.stringify(this.path))),this.isObject&&!this.useToJSON&&e.appendChild(Vt("span","toggler")),this.isObject&&!this.useToJSON){var t=Vt("span","value"),i=Vt("span");if(!this.isArrayRange){var s=Vt("span","constructor-name",this.constructorName);i.appendChild(s)}if(this.isArray&&!this.isArrayRange){var o=Vt("span");o.appendChild(Vt("span","bracket","[")),o.appendChild(Vt("span","number",this.json.length)),o.appendChild(Vt("span","bracket","]")),i.appendChild(o)}var u=Vt("span","preview",this.getInlinepreview());i.appendChild(u),t.appendChild(i),e.appendChild(t)}else{(t=this.isUrl?Vt("a"):Vt("span")).classList.add(mn(this.type)),this.isDate&&t.classList.add(mn("date")),this.isUrl&&(t.classList.add(mn("url")),t.setAttribute("href",this.json));var d=Qb(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);t.appendChild(document.createTextNode(d)),e.appendChild(t)}if(this.isObject&&this.config.hoverPreviewEnabled){var l=Vt("span","preview-text");l.appendChild(document.createTextNode(this.getInlinepreview())),e.appendChild(l)}var p=Vt("div","children");this.isObject&&p.classList.add(mn("object")),this.isArray&&p.classList.add(mn("array")),this.isEmpty&&p.classList.add(mn("empty")),this.config&&this.config.theme&&this.element.classList.add(mn(this.config.theme)),this.isOpen&&this.element.classList.add(mn("open"));var r=Vt("button","copy");return r.classList.add("fas"),r.classList.add("fa-clone"),r.addEventListener("click",this.onCopy.bind(this)),e.prepend(r),this.element.appendChild(e),this.element.appendChild(p),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&e.addEventListener("click",this.toggleOpen.bind(this)),this.element},n.prototype.appendChildren=function(e){var t=this;e===void 0&&(e=!1);var i=this.element.querySelector("div."+mn("children"));if(i&&!this.isEmpty){var s=function(d,l){var p=t.isLargeArray?[l*t.config.maxArrayItems,Math.min(t.json.length-1,l*t.config.maxArrayItems+(t.config.maxArrayItems-1))]:void 0,r=t.isArrayRange?(t.arrayRange[0]+l).toString():d,f=new n(p?t.json.slice(p[0],p[1]+1):t.json[d],t.open-1,t.config,d,r,p?t.path:t.path.concat(r),p,t.level+1);i.appendChild(f.render())};if(e){var o=0,u=function(){var d=t.keys[o];s(d,o),(o+=1)<t.keys.length&&(o>10?u():Va(u))};Va(u)}else this.keys.forEach(function(d,l){return s(d,l)})}},n.prototype.removeChildren=function(e){e===void 0&&(e=!1);var t=this.element.querySelector("div."+mn("children"));if(e){var i=0,s=function(){t&&t.children.length&&(t.removeChild(t.children[0]),(i+=1)>10?s():Va(s))};Va(s)}else t&&(t.innerHTML="")},n}();const GL=Ot.compile(HL);class Fl extends At{constructor(e){var t;super(GL({})),this.options=e,this.instance=new qL({},((t=this.options)==null?void 0:t.depth)??3,{theme:"custom",afterCopyHandler:()=>He.shared.popups.push("Copied!")}),this.provide({})}provide(e){return this.instance.json=e,this.clear().append(this.instance.render())}static build(e){return new Fl(e)}}const KL=`
|
|
1448
|
+
<div class="empty">
|
|
1449
|
+
<i class="fas fa-hourglass-start"></i>
|
|
1450
|
+
<p>There's still nothing...</p>
|
|
1451
|
+
</div>
|
|
1452
|
+
`,YL=Ot.compile(KL);class Wl extends At{static build(){return new Wl(YL({}))}}/*!
|
|
1453
|
+
* @kurkle/color v0.3.4
|
|
1454
|
+
* https://github.com/kurkle/color#readme
|
|
1455
|
+
* (c) 2024 Jukka Kurkela
|
|
1456
|
+
* Released under the MIT License
|
|
1457
|
+
*/function bs(n){return n+.5|0}const qi=(n,e,t)=>Math.max(Math.min(n,t),e);function Ho(n){return qi(bs(n*2.55),0,255)}function Xi(n){return qi(bs(n*255),0,255)}function Mi(n){return qi(bs(n/2.55)/100,0,1)}function xv(n){return qi(bs(n*100),0,100)}const Fn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},uf=[..."0123456789ABCDEF"],XL=n=>uf[n&15],QL=n=>uf[(n&240)>>4]+uf[n&15],qa=n=>(n&240)>>4===(n&15),ZL=n=>qa(n.r)&&qa(n.g)&&qa(n.b)&&qa(n.a);function JL(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Fn[n[1]]*17,g:255&Fn[n[2]]*17,b:255&Fn[n[3]]*17,a:e===5?Fn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Fn[n[1]]<<4|Fn[n[2]],g:Fn[n[3]]<<4|Fn[n[4]],b:Fn[n[5]]<<4|Fn[n[6]],a:e===9?Fn[n[7]]<<4|Fn[n[8]]:255})),t}const eR=(n,e)=>n<255?e(n):"";function tR(n){var e=ZL(n)?XL:QL;return n?"#"+e(n.r)+e(n.g)+e(n.b)+eR(n.a,e):void 0}const nR=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Zb(n,e,t){const i=e*Math.min(t,1-t),s=(o,u=(o+n/30)%12)=>t-i*Math.max(Math.min(u-3,9-u,1),-1);return[s(0),s(8),s(4)]}function iR(n,e,t){const i=(s,o=(s+n/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function rR(n,e,t){const i=Zb(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function oR(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function Kf(n){const t=n.r/255,i=n.g/255,s=n.b/255,o=Math.max(t,i,s),u=Math.min(t,i,s),d=(o+u)/2;let l,p,r;return o!==u&&(r=o-u,p=d>.5?r/(2-o-u):r/(o+u),l=oR(t,i,s,r,o),l=l*60+.5),[l|0,p||0,d]}function Yf(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Xi)}function Xf(n,e,t){return Yf(Zb,n,e,t)}function sR(n,e,t){return Yf(rR,n,e,t)}function aR(n,e,t){return Yf(iR,n,e,t)}function Jb(n){return(n%360+360)%360}function lR(n){const e=nR.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Ho(+e[5]):Xi(+e[5]));const s=Jb(+e[2]),o=+e[3]/100,u=+e[4]/100;return e[1]==="hwb"?i=sR(s,o,u):e[1]==="hsv"?i=aR(s,o,u):i=Xf(s,o,u),{r:i[0],g:i[1],b:i[2],a:t}}function cR(n,e){var t=Kf(n);t[0]=Jb(t[0]+e),t=Xf(t),n.r=t[0],n.g=t[1],n.b=t[2]}function uR(n){if(!n)return;const e=Kf(n),t=e[0],i=xv(e[1]),s=xv(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${Mi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Sv={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Av={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function hR(){const n={},e=Object.keys(Av),t=Object.keys(Sv);let i,s,o,u,d;for(i=0;i<e.length;i++){for(u=d=e[i],s=0;s<t.length;s++)o=t[s],d=d.replace(o,Sv[o]);o=parseInt(Av[u],16),n[d]=[o>>16&255,o>>8&255,o&255]}return n}let Ga;function fR(n){Ga||(Ga=hR(),Ga.transparent=[0,0,0,0]);const e=Ga[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const dR=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function pR(n){const e=dR.exec(n);let t=255,i,s,o;if(e){if(e[7]!==i){const u=+e[7];t=e[8]?Ho(u):qi(u*255,0,255)}return i=+e[1],s=+e[3],o=+e[5],i=255&(e[2]?Ho(i):qi(i,0,255)),s=255&(e[4]?Ho(s):qi(s,0,255)),o=255&(e[6]?Ho(o):qi(o,0,255)),{r:i,g:s,b:o,a:t}}}function gR(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${Mi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Hh=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Vr=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function mR(n,e,t){const i=Vr(Mi(n.r)),s=Vr(Mi(n.g)),o=Vr(Mi(n.b));return{r:Xi(Hh(i+t*(Vr(Mi(e.r))-i))),g:Xi(Hh(s+t*(Vr(Mi(e.g))-s))),b:Xi(Hh(o+t*(Vr(Mi(e.b))-o))),a:n.a+t*(e.a-n.a)}}function Ka(n,e,t){if(n){let i=Kf(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Xf(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function ew(n,e){return n&&Object.assign(e||{},n)}function Cv(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=Xi(n[3]))):(e=ew(n,{r:0,g:0,b:0,a:1}),e.a=Xi(e.a)),e}function yR(n){return n.charAt(0)==="r"?pR(n):lR(n)}class os{constructor(e){if(e instanceof os)return e;const t=typeof e;let i;t==="object"?i=Cv(e):t==="string"&&(i=JL(e)||fR(e)||yR(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=ew(this._rgb);return e&&(e.a=Mi(e.a)),e}set rgb(e){this._rgb=Cv(e)}rgbString(){return this._valid?gR(this._rgb):void 0}hexString(){return this._valid?tR(this._rgb):void 0}hslString(){return this._valid?uR(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let o;const u=t===o?.5:t,d=2*u-1,l=i.a-s.a,p=((d*l===-1?d:(d+l)/(1+d*l))+1)/2;o=1-p,i.r=255&p*i.r+o*s.r+.5,i.g=255&p*i.g+o*s.g+.5,i.b=255&p*i.b+o*s.b+.5,i.a=u*i.a+(1-u)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=mR(this._rgb,e._rgb,t)),this}clone(){return new os(this.rgb)}alpha(e){return this._rgb.a=Xi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=bs(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ka(this._rgb,2,e),this}darken(e){return Ka(this._rgb,2,-e),this}saturate(e){return Ka(this._rgb,1,e),this}desaturate(e){return Ka(this._rgb,1,-e),this}rotate(e){return cR(this._rgb,e),this}}/*!
|
|
1458
|
+
* Chart.js v4.4.8
|
|
1459
|
+
* https://www.chartjs.org
|
|
1460
|
+
* (c) 2025 Chart.js Contributors
|
|
1461
|
+
* Released under the MIT License
|
|
1462
|
+
*/function Ai(){}const vR=(()=>{let n=0;return()=>n++})();function et(n){return n==null}function Tt(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function nt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function Bt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Mn(n,e){return Bt(n)?n:e}function qe(n,e){return typeof n>"u"?e:n}const bR=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/e,tw=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function xt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function pt(n,e,t,i){let s,o,u;if(Tt(n))for(o=n.length,s=0;s<o;s++)e.call(t,n[s],s);else if(nt(n))for(u=Object.keys(n),o=u.length,s=0;s<o;s++)e.call(t,n[u[s]],u[s])}function Sl(n,e){let t,i,s,o;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],o=e[t],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Al(n){if(Tt(n))return n.map(Al);if(nt(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=Al(n[t[s]]);return e}return n}function nw(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function wR(n,e,t,i){if(!nw(n))return;const s=e[n],o=t[n];nt(s)&&nt(o)?ss(s,o,i):e[n]=Al(o)}function ss(n,e,t){const i=Tt(e)?e:[e],s=i.length;if(!nt(n))return n;t=t||{};const o=t.merger||wR;let u;for(let d=0;d<s;++d){if(u=i[d],!nt(u))continue;const l=Object.keys(u);for(let p=0,r=l.length;p<r;++p)o(l[p],n,u,t)}return n}function Ko(n,e){return ss(n,e,{merger:_R})}function _R(n,e,t){if(!nw(n))return;const i=e[n],s=t[n];nt(i)&&nt(s)?Ko(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=Al(s))}const kv={"":n=>n,x:n=>n.x,y:n=>n.y};function xR(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function SR(n){const e=xR(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Qi(n,e){return(kv[e]||(kv[e]=SR(e)))(n)}function Qf(n){return n.charAt(0).toUpperCase()+n.slice(1)}const as=n=>typeof n<"u",Zi=n=>typeof n=="function",Mv=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function AR(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const kt=Math.PI,Ct=2*kt,CR=Ct+kt,Cl=Number.POSITIVE_INFINITY,kR=kt/180,Wt=kt/2,ur=kt/4,Ev=kt*2/3,Gi=Math.log10,hi=Math.sign;function Yo(n,e,t){return Math.abs(n-e)<t}function Lv(n){const e=Math.round(n);n=Yo(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Gi(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function MR(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,o)=>s-o).pop(),e}function ER(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function to(n){return!ER(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function LR(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function iw(n,e,t){let i,s,o;for(i=0,s=n.length;i<s;i++)o=n[i][t],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Xn(n){return n*(kt/180)}function Zf(n){return n*(180/kt)}function Rv(n){if(!Bt(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function rw(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let o=Math.atan2(i,t);return o<-.5*kt&&(o+=Ct),{angle:o,distance:s}}function hf(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function RR(n,e){return(n-e+CR)%Ct-kt}function En(n){return(n%Ct+Ct)%Ct}function ls(n,e,t,i){const s=En(n),o=En(e),u=En(t),d=En(o-s),l=En(u-s),p=En(s-o),r=En(s-u);return s===o||s===u||i&&o===u||d>l&&p<r}function Yt(n,e,t){return Math.max(e,Math.min(t,n))}function TR(n){return Yt(n,-32768,32767)}function Ti(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Jf(n,e,t){t=t||(u=>n[u]<e);let i=n.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,t(o)?s=o:i=o;return{lo:s,hi:i}}const $i=(n,e,t,i)=>Jf(n,t,i?s=>{const o=n[s][e];return o<t||o===t&&n[s+1][e]===t}:s=>n[s][e]<t),$R=(n,e,t)=>Jf(n,t,i=>n[i][e]>=t);function IR(n,e,t){let i=0,s=n.length;for(;i<s&&n[i]<e;)i++;for(;s>i&&n[s-1]>t;)s--;return i>0||s<n.length?n.slice(i,s):n}const ow=["push","pop","shift","splice","unshift"];function OR(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ow.forEach(t=>{const i="_onData"+Qf(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...o){const u=s.apply(this,o);return n._chartjs.listeners.forEach(d=>{typeof d[i]=="function"&&d[i](...o)}),u}})})}function Tv(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(ow.forEach(o=>{delete n[o]}),delete n._chartjs)}function sw(n){const e=new Set(n);return e.size===n.length?n:Array.from(e)}const aw=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function lw(n,e){let t=[],i=!1;return function(...s){t=s,i||(i=!0,aw.call(window,()=>{i=!1,n.apply(e,t)}))}}function DR(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const ed=n=>n==="start"?"left":n==="end"?"right":"center",nn=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2,PR=(n,e,t,i)=>n===(i?"left":"right")?t:n==="center"?(e+t)/2:e;function cw(n,e,t){const i=e.length;let s=0,o=i;if(n._sorted){const{iScale:u,vScale:d,_parsed:l}=n,p=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,r=u.axis,{min:f,max:a,minDefined:c,maxDefined:h}=u.getUserBounds();if(c){if(s=Math.min($i(l,r,f).lo,t?i:$i(e,r,u.getPixelForValue(f)).lo),p){const m=l.slice(0,s+1).reverse().findIndex(y=>!et(y[d.axis]));s-=Math.max(0,m)}s=Yt(s,0,i-1)}if(h){let m=Math.max($i(l,u.axis,a,!0).hi+1,t?0:$i(e,r,u.getPixelForValue(a),!0).hi+1);if(p){const y=l.slice(m-1).findIndex(v=>!et(v[d.axis]));m+=Math.max(0,y)}o=Yt(m,s,i)-s}else o=i-s}return{start:s,count:o}}function uw(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const o=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),o}const Ya=n=>n===0||n===1,$v=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*Ct/t)),Iv=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*Ct/t)+1,Xo={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Wt)+1,easeOutSine:n=>Math.sin(n*Wt),easeInOutSine:n=>-.5*(Math.cos(kt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Ya(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Ya(n)?n:$v(n,.075,.3),easeOutElastic:n=>Ya(n)?n:Iv(n,.075,.3),easeInOutElastic(n){return Ya(n)?n:n<.5?.5*$v(n*2,.1125,.45):.5+.5*Iv(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-Xo.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?Xo.easeInBounce(n*2)*.5:Xo.easeOutBounce(n*2-1)*.5+.5};function td(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Ov(n){return td(n)?n:new os(n)}function zh(n){return td(n)?n:new os(n).saturate(.5).darken(.1).hexString()}const BR=["x","y","borderWidth","radius","tension"],NR=["color","borderColor","backgroundColor"];function FR(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),n.set("animations",{colors:{type:"color",properties:NR},numbers:{type:"number",properties:BR}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function WR(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Dv=new Map;function HR(n,e){e=e||{};const t=n+JSON.stringify(e);let i=Dv.get(t);return i||(i=new Intl.NumberFormat(n,e),Dv.set(t,i)),i}function ws(n,e,t){return HR(e,t).format(n)}const hw={values(n){return Tt(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,o=n;if(t.length>1){const p=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(p<1e-4||p>1e15)&&(s="scientific"),o=zR(n,t)}const u=Gi(Math.abs(o)),d=isNaN(u)?1:Math.max(Math.min(-1*Math.floor(u),20),0),l={notation:s,minimumFractionDigits:d,maximumFractionDigits:d};return Object.assign(l,this.options.ticks.format),ws(n,i,l)},logarithmic(n,e,t){if(n===0)return"0";const i=t[e].significand||n/Math.pow(10,Math.floor(Gi(n)));return[1,2,3,5,10,15].includes(i)||e>.8*t.length?hw.numeric.call(this,n,e,t):""}};function zR(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Hl={formatters:hw};function jR(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Hl.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const xr=Object.create(null),ff=Object.create(null);function Qo(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;i<s;++i){const o=t[i];n=n[o]||(n[o]=Object.create(null))}return n}function jh(n,e,t){return typeof e=="string"?ss(Qo(n,e),t):ss(Qo(n,""),e)}class UR{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>zh(s.backgroundColor),this.hoverBorderColor=(i,s)=>zh(s.borderColor),this.hoverColor=(i,s)=>zh(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return jh(this,e,t)}get(e){return Qo(this,e)}describe(e,t){return jh(ff,e,t)}override(e,t){return jh(xr,e,t)}route(e,t,i,s){const o=Qo(this,e),u=Qo(this,i),d="_"+t;Object.defineProperties(o,{[d]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){const l=this[d],p=u[s];return nt(l)?Object.assign({},p,l):qe(l,p)},set(l){this[d]=l}}})}apply(e){e.forEach(t=>t(this))}}var $t=new UR({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[FR,WR,jR]);function VR(n){return!n||et(n.size)||et(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function kl(n,e,t,i,s){let o=e[s];return o||(o=e[s]=n.measureText(s).width,t.push(s)),o>i&&(i=o),i}function qR(n,e,t,i){i=i||{};let s=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},o=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let u=0;const d=t.length;let l,p,r,f,a;for(l=0;l<d;l++)if(f=t[l],f!=null&&!Tt(f))u=kl(n,s,o,u,f);else if(Tt(f))for(p=0,r=f.length;p<r;p++)a=f[p],a!=null&&!Tt(a)&&(u=kl(n,s,o,u,a));n.restore();const c=o.length/2;if(c>t.length){for(l=0;l<c;l++)delete s[o[l]];o.splice(0,c)}return u}function hr(n,e,t){const i=n.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((e-s)*i)/i+s}function Pv(n,e){!e&&!n||(e=e||n.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,n.width,n.height),e.restore())}function df(n,e,t,i){fw(n,e,t,i,null)}function fw(n,e,t,i,s){let o,u,d,l,p,r,f,a;const c=e.pointStyle,h=e.rotation,m=e.radius;let y=(h||0)*kR;if(c&&typeof c=="object"&&(o=c.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(t,i),n.rotate(y),n.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),n.restore();return}if(!(isNaN(m)||m<=0)){switch(n.beginPath(),c){default:s?n.ellipse(t,i,s/2,m,0,0,Ct):n.arc(t,i,m,0,Ct),n.closePath();break;case"triangle":r=s?s/2:m,n.moveTo(t+Math.sin(y)*r,i-Math.cos(y)*m),y+=Ev,n.lineTo(t+Math.sin(y)*r,i-Math.cos(y)*m),y+=Ev,n.lineTo(t+Math.sin(y)*r,i-Math.cos(y)*m),n.closePath();break;case"rectRounded":p=m*.516,l=m-p,u=Math.cos(y+ur)*l,f=Math.cos(y+ur)*(s?s/2-p:l),d=Math.sin(y+ur)*l,a=Math.sin(y+ur)*(s?s/2-p:l),n.arc(t-f,i-d,p,y-kt,y-Wt),n.arc(t+a,i-u,p,y-Wt,y),n.arc(t+f,i+d,p,y,y+Wt),n.arc(t-a,i+u,p,y+Wt,y+kt),n.closePath();break;case"rect":if(!h){l=Math.SQRT1_2*m,r=s?s/2:l,n.rect(t-r,i-l,2*r,2*l);break}y+=ur;case"rectRot":f=Math.cos(y)*(s?s/2:m),u=Math.cos(y)*m,d=Math.sin(y)*m,a=Math.sin(y)*(s?s/2:m),n.moveTo(t-f,i-d),n.lineTo(t+a,i-u),n.lineTo(t+f,i+d),n.lineTo(t-a,i+u),n.closePath();break;case"crossRot":y+=ur;case"cross":f=Math.cos(y)*(s?s/2:m),u=Math.cos(y)*m,d=Math.sin(y)*m,a=Math.sin(y)*(s?s/2:m),n.moveTo(t-f,i-d),n.lineTo(t+f,i+d),n.moveTo(t+a,i-u),n.lineTo(t-a,i+u);break;case"star":f=Math.cos(y)*(s?s/2:m),u=Math.cos(y)*m,d=Math.sin(y)*m,a=Math.sin(y)*(s?s/2:m),n.moveTo(t-f,i-d),n.lineTo(t+f,i+d),n.moveTo(t+a,i-u),n.lineTo(t-a,i+u),y+=ur,f=Math.cos(y)*(s?s/2:m),u=Math.cos(y)*m,d=Math.sin(y)*m,a=Math.sin(y)*(s?s/2:m),n.moveTo(t-f,i-d),n.lineTo(t+f,i+d),n.moveTo(t+a,i-u),n.lineTo(t-a,i+u);break;case"line":u=s?s/2:Math.cos(y)*m,d=Math.sin(y)*m,n.moveTo(t-u,i-d),n.lineTo(t+u,i+d);break;case"dash":n.moveTo(t,i),n.lineTo(t+Math.cos(y)*(s?s/2:m),i+Math.sin(y)*m);break;case!1:n.closePath();break}n.fill(),e.borderWidth>0&&n.stroke()}}function Ii(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.x<e.right+t&&n.y>e.top-t&&n.y<e.bottom+t}function zl(n,e){n.save(),n.beginPath(),n.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),n.clip()}function jl(n){n.restore()}function GR(n,e,t,i,s){if(!e)return n.lineTo(t.x,t.y);if(s==="middle"){const o=(e.x+t.x)/2;n.lineTo(o,e.y),n.lineTo(o,t.y)}else s==="after"!=!!i?n.lineTo(e.x,t.y):n.lineTo(t.x,e.y);n.lineTo(t.x,t.y)}function KR(n,e,t,i){if(!e)return n.lineTo(t.x,t.y);n.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?t.cp2x:t.cp1x,i?t.cp2y:t.cp1y,t.x,t.y)}function YR(n,e){e.translation&&n.translate(e.translation[0],e.translation[1]),et(e.rotation)||n.rotate(e.rotation),e.color&&(n.fillStyle=e.color),e.textAlign&&(n.textAlign=e.textAlign),e.textBaseline&&(n.textBaseline=e.textBaseline)}function XR(n,e,t,i,s){if(s.strikethrough||s.underline){const o=n.measureText(i),u=e-o.actualBoundingBoxLeft,d=e+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,p=t+o.actualBoundingBoxDescent,r=s.strikethrough?(l+p)/2:p;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(u,r),n.lineTo(d,r),n.stroke()}}function QR(n,e){const t=n.fillStyle;n.fillStyle=e.color,n.fillRect(e.left,e.top,e.width,e.height),n.fillStyle=t}function Sr(n,e,t,i,s,o={}){const u=Tt(e)?e:[e],d=o.strokeWidth>0&&o.strokeColor!=="";let l,p;for(n.save(),n.font=s.string,YR(n,o),l=0;l<u.length;++l)p=u[l],o.backdrop&&QR(n,o.backdrop),d&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),et(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(p,t,i,o.maxWidth)),n.fillText(p,t,i,o.maxWidth),XR(n,t,i,p,o),i+=Number(s.lineHeight);n.restore()}function cs(n,e){const{x:t,y:i,w:s,h:o,radius:u}=e;n.arc(t+u.topLeft,i+u.topLeft,u.topLeft,1.5*kt,kt,!0),n.lineTo(t,i+o-u.bottomLeft),n.arc(t+u.bottomLeft,i+o-u.bottomLeft,u.bottomLeft,kt,Wt,!0),n.lineTo(t+s-u.bottomRight,i+o),n.arc(t+s-u.bottomRight,i+o-u.bottomRight,u.bottomRight,Wt,0,!0),n.lineTo(t+s,i+u.topRight),n.arc(t+s-u.topRight,i+u.topRight,u.topRight,0,-Wt,!0),n.lineTo(t+u.topLeft,i)}const ZR=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,JR=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function eT(n,e){const t=(""+n).match(ZR);if(!t||t[1]==="normal")return e*1.2;switch(n=+t[2],t[3]){case"px":return n;case"%":n/=100;break}return e*n}const tT=n=>+n||0;function nd(n,e){const t={},i=nt(e),s=i?Object.keys(e):e,o=nt(n)?i?u=>qe(n[u],n[e[u]]):u=>n[u]:()=>n;for(const u of s)t[u]=tT(o(u));return t}function dw(n){return nd(n,{top:"y",right:"x",bottom:"y",left:"x"})}function wr(n){return nd(n,["topLeft","topRight","bottomLeft","bottomRight"])}function on(n){const e=dw(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Gt(n,e){n=n||{},e=e||$t.font;let t=qe(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=qe(n.style,e.style);i&&!(""+i).match(JR)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:qe(n.family,e.family),lineHeight:eT(qe(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:qe(n.weight,e.weight),string:""};return s.string=VR(s),s}function zo(n,e,t,i){let s,o,u;for(s=0,o=n.length;s<o;++s)if(u=n[s],u!==void 0&&u!==void 0)return u}function nT(n,e,t){const{min:i,max:s}=n,o=tw(e,(s-i)/2),u=(d,l)=>t&&d===0?0:d+l;return{min:u(i,-Math.abs(o)),max:u(s,o)}}function Ji(n,e){return Object.assign(Object.create(n),e)}function id(n,e=[""],t,i,s=()=>n[0]){const o=t||n;typeof i>"u"&&(i=yw("_fallback",n));const u={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:o,_fallback:i,_getTarget:s,override:d=>id([d,...n],e,o,i)};return new Proxy(u,{deleteProperty(d,l){return delete d[l],delete d._keys,delete n[0][l],!0},get(d,l){return gw(d,l,()=>uT(l,e,n,d))},getOwnPropertyDescriptor(d,l){return Reflect.getOwnPropertyDescriptor(d._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(d,l){return Nv(d).includes(l)},ownKeys(d){return Nv(d)},set(d,l,p){const r=d._storage||(d._storage=s());return d[l]=r[l]=p,delete d._keys,!0}})}function no(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:pw(n,i),setContext:o=>no(n,o,t,i),override:o=>no(n.override(o),e,t,i)};return new Proxy(s,{deleteProperty(o,u){return delete o[u],delete n[u],!0},get(o,u,d){return gw(o,u,()=>rT(o,u,d))},getOwnPropertyDescriptor(o,u){return o._descriptors.allKeys?Reflect.has(n,u)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,u)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,u){return Reflect.has(n,u)},ownKeys(){return Reflect.ownKeys(n)},set(o,u,d){return n[u]=d,delete o[u],!0}})}function pw(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:Zi(t)?t:()=>t,isIndexable:Zi(i)?i:()=>i}}const iT=(n,e)=>n?n+Qf(e):e,rd=(n,e)=>nt(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function gw(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e)||e==="constructor")return n[e];const i=t();return n[e]=i,i}function rT(n,e,t){const{_proxy:i,_context:s,_subProxy:o,_descriptors:u}=n;let d=i[e];return Zi(d)&&u.isScriptable(e)&&(d=oT(e,d,n,t)),Tt(d)&&d.length&&(d=sT(e,d,n,u.isIndexable)),rd(e,d)&&(d=no(d,s,o&&o[e],u)),d}function oT(n,e,t,i){const{_proxy:s,_context:o,_subProxy:u,_stack:d}=t;if(d.has(n))throw new Error("Recursion detected: "+Array.from(d).join("->")+"->"+n);d.add(n);let l=e(o,u||i);return d.delete(n),rd(n,l)&&(l=od(s._scopes,s,n,l)),l}function sT(n,e,t,i){const{_proxy:s,_context:o,_subProxy:u,_descriptors:d}=t;if(typeof o.index<"u"&&i(n))return e[o.index%e.length];if(nt(e[0])){const l=e,p=s._scopes.filter(r=>r!==l);e=[];for(const r of l){const f=od(p,s,n,r);e.push(no(f,o,u&&u[n],d))}}return e}function mw(n,e,t){return Zi(n)?n(e,t):n}const aT=(n,e)=>n===!0?e:typeof n=="string"?Qi(e,n):void 0;function lT(n,e,t,i,s){for(const o of e){const u=aT(t,o);if(u){n.add(u);const d=mw(u._fallback,t,s);if(typeof d<"u"&&d!==t&&d!==i)return d}else if(u===!1&&typeof i<"u"&&t!==i)return null}return!1}function od(n,e,t,i){const s=e._rootScopes,o=mw(e._fallback,t,i),u=[...n,...s],d=new Set;d.add(i);let l=Bv(d,u,t,o||t,i);return l===null||typeof o<"u"&&o!==t&&(l=Bv(d,u,o,l,i),l===null)?!1:id(Array.from(d),[""],s,o,()=>cT(e,t,i))}function Bv(n,e,t,i,s){for(;t;)t=lT(n,e,t,i,s);return t}function cT(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return Tt(s)&&nt(t)?t:s||{}}function uT(n,e,t,i){let s;for(const o of e)if(s=yw(iT(o,n),t),typeof s<"u")return rd(n,s)?od(t,i,n,s):s}function yw(n,e){for(const t of e){if(!t)continue;const i=t[n];if(typeof i<"u")return i}}function Nv(n){let e=n._keys;return e||(e=n._keys=hT(n._scopes)),e}function hT(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function vw(n,e,t,i){const{iScale:s}=n,{key:o="r"}=this._parsing,u=new Array(i);let d,l,p,r;for(d=0,l=i;d<l;++d)p=d+t,r=e[p],u[d]={r:s.parse(Qi(r,o),p)};return u}const fT=Number.EPSILON||1e-14,io=(n,e)=>e<n.length&&!n[e].skip&&n[e],bw=n=>n==="x"?"y":"x";function dT(n,e,t,i){const s=n.skip?e:n,o=e,u=t.skip?e:t,d=hf(o,s),l=hf(u,o);let p=d/(d+l),r=l/(d+l);p=isNaN(p)?0:p,r=isNaN(r)?0:r;const f=i*p,a=i*r;return{previous:{x:o.x-f*(u.x-s.x),y:o.y-f*(u.y-s.y)},next:{x:o.x+a*(u.x-s.x),y:o.y+a*(u.y-s.y)}}}function pT(n,e,t){const i=n.length;let s,o,u,d,l,p=io(n,0);for(let r=0;r<i-1;++r)if(l=p,p=io(n,r+1),!(!l||!p)){if(Yo(e[r],0,fT)){t[r]=t[r+1]=0;continue}s=t[r]/e[r],o=t[r+1]/e[r],d=Math.pow(s,2)+Math.pow(o,2),!(d<=9)&&(u=3/Math.sqrt(d),t[r]=s*u*e[r],t[r+1]=o*u*e[r])}}function gT(n,e,t="x"){const i=bw(t),s=n.length;let o,u,d,l=io(n,0);for(let p=0;p<s;++p){if(u=d,d=l,l=io(n,p+1),!d)continue;const r=d[t],f=d[i];u&&(o=(r-u[t])/3,d[`cp1${t}`]=r-o,d[`cp1${i}`]=f-o*e[p]),l&&(o=(l[t]-r)/3,d[`cp2${t}`]=r+o,d[`cp2${i}`]=f+o*e[p])}}function mT(n,e="x"){const t=bw(e),i=n.length,s=Array(i).fill(0),o=Array(i);let u,d,l,p=io(n,0);for(u=0;u<i;++u)if(d=l,l=p,p=io(n,u+1),!!l){if(p){const r=p[e]-l[e];s[u]=r!==0?(p[t]-l[t])/r:0}o[u]=d?p?hi(s[u-1])!==hi(s[u])?0:(s[u-1]+s[u])/2:s[u-1]:s[u]}pT(n,s,o),gT(n,o,e)}function Xa(n,e,t){return Math.max(Math.min(n,t),e)}function yT(n,e){let t,i,s,o,u,d=Ii(n[0],e);for(t=0,i=n.length;t<i;++t)u=o,o=d,d=t<i-1&&Ii(n[t+1],e),o&&(s=n[t],u&&(s.cp1x=Xa(s.cp1x,e.left,e.right),s.cp1y=Xa(s.cp1y,e.top,e.bottom)),d&&(s.cp2x=Xa(s.cp2x,e.left,e.right),s.cp2y=Xa(s.cp2y,e.top,e.bottom)))}function vT(n,e,t,i,s){let o,u,d,l;if(e.spanGaps&&(n=n.filter(p=>!p.skip)),e.cubicInterpolationMode==="monotone")mT(n,s);else{let p=i?n[n.length-1]:n[0];for(o=0,u=n.length;o<u;++o)d=n[o],l=dT(p,d,n[Math.min(o+1,u-(i?0:1))%u],e.tension),d.cp1x=l.previous.x,d.cp1y=l.previous.y,d.cp2x=l.next.x,d.cp2y=l.next.y,p=d}e.capBezierPoints&&yT(n,t)}function sd(){return typeof window<"u"&&typeof document<"u"}function ad(n){let e=n.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Ml(n,e,t){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*e.parentNode[t])):i=n,i}const Ul=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function bT(n,e){return Ul(n).getPropertyValue(e)}const wT=["top","right","bottom","left"];function _r(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const o=wT[s];i[o]=parseFloat(n[e+"-"+o+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const _T=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function xT(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:o}=i;let u=!1,d,l;if(_T(s,o,n.target))d=s,l=o;else{const p=e.getBoundingClientRect();d=i.clientX-p.left,l=i.clientY-p.top,u=!0}return{x:d,y:l,box:u}}function pr(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Ul(t),o=s.boxSizing==="border-box",u=_r(s,"padding"),d=_r(s,"border","width"),{x:l,y:p,box:r}=xT(n,t),f=u.left+(r&&d.left),a=u.top+(r&&d.top);let{width:c,height:h}=e;return o&&(c-=u.width+d.width,h-=u.height+d.height),{x:Math.round((l-f)/c*t.width/i),y:Math.round((p-a)/h*t.height/i)}}function ST(n,e,t){let i,s;if(e===void 0||t===void 0){const o=n&&ad(n);if(!o)e=n.clientWidth,t=n.clientHeight;else{const u=o.getBoundingClientRect(),d=Ul(o),l=_r(d,"border","width"),p=_r(d,"padding");e=u.width-p.width-l.width,t=u.height-p.height-l.height,i=Ml(d.maxWidth,o,"clientWidth"),s=Ml(d.maxHeight,o,"clientHeight")}}return{width:e,height:t,maxWidth:i||Cl,maxHeight:s||Cl}}const Qa=n=>Math.round(n*10)/10;function AT(n,e,t,i){const s=Ul(n),o=_r(s,"margin"),u=Ml(s.maxWidth,n,"clientWidth")||Cl,d=Ml(s.maxHeight,n,"clientHeight")||Cl,l=ST(n,e,t);let{width:p,height:r}=l;if(s.boxSizing==="content-box"){const a=_r(s,"border","width"),c=_r(s,"padding");p-=c.width+a.width,r-=c.height+a.height}return p=Math.max(0,p-o.width),r=Math.max(0,i?p/i:r-o.height),p=Qa(Math.min(p,u,l.maxWidth)),r=Qa(Math.min(r,d,l.maxHeight)),p&&!r&&(r=Qa(p/2)),(e!==void 0||t!==void 0)&&i&&l.height&&r>l.height&&(r=l.height,p=Qa(Math.floor(r*i))),{width:p,height:r}}function Fv(n,e,t){const i=e||1,s=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const u=n.canvas;return u.style&&(t||!u.style.height&&!u.style.width)&&(u.style.height=`${n.height}px`,u.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||u.height!==s||u.width!==o?(n.currentDevicePixelRatio=i,u.height=s,u.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const CT=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};sd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return n}();function Wv(n,e){const t=bT(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function gr(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function kT(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function MT(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},o={x:e.cp1x,y:e.cp1y},u=gr(n,s,t),d=gr(s,o,t),l=gr(o,e,t),p=gr(u,d,t),r=gr(d,l,t);return gr(p,r,t)}const ET=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},LT=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function Qr(n,e,t){return n?ET(e,t):LT()}function ww(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function _w(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function xw(n){return n==="angle"?{between:ls,compare:RR,normalize:En}:{between:Ti,compare:(e,t)=>e-t,normalize:e=>e}}function Hv({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function RT(n,e,t){const{property:i,start:s,end:o}=t,{between:u,normalize:d}=xw(i),l=e.length;let{start:p,end:r,loop:f}=n,a,c;if(f){for(p+=l,r+=l,a=0,c=l;a<c&&u(d(e[p%l][i]),s,o);++a)p--,r--;p%=l,r%=l}return r<p&&(r+=l),{start:p,end:r,loop:f,style:n.style}}function Sw(n,e,t){if(!t)return[n];const{property:i,start:s,end:o}=t,u=e.length,{compare:d,between:l,normalize:p}=xw(i),{start:r,end:f,loop:a,style:c}=RT(n,e,t),h=[];let m=!1,y=null,v,w,k;const _=()=>l(s,k,v)&&d(s,k)!==0,S=()=>d(o,v)===0||l(o,k,v),x=()=>m||_(),L=()=>!m||S();for(let I=r,$=r;I<=f;++I)w=e[I%u],!w.skip&&(v=p(w[i]),v!==k&&(m=l(v,s,o),y===null&&x()&&(y=d(v,s)===0?I:$),y!==null&&L()&&(h.push(Hv({start:y,end:I,loop:a,count:u,style:c})),y=null),$=I,k=v));return y!==null&&h.push(Hv({start:y,end:f,loop:a,count:u,style:c})),h}function Aw(n,e){const t=[],i=n.segments;for(let s=0;s<i.length;s++){const o=Sw(i[s],n.points,e);o.length&&t.push(...o)}return t}function TT(n,e,t,i){let s=0,o=e-1;if(t&&!i)for(;s<e&&!n[s].skip;)s++;for(;s<e&&n[s].skip;)s++;for(s%=e,t&&(o+=s);o>s&&n[o%e].skip;)o--;return o%=e,{start:s,end:o}}function $T(n,e,t,i){const s=n.length,o=[];let u=e,d=n[e],l;for(l=e+1;l<=t;++l){const p=n[l%s];p.skip||p.stop?d.skip||(i=!1,o.push({start:e%s,end:(l-1)%s,loop:i}),e=u=p.stop?l:null):(u=l,d.skip&&(e=l)),d=p}return u!==null&&o.push({start:e%s,end:u%s,loop:i}),o}function IT(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const o=!!n._loop,{start:u,end:d}=TT(t,s,o,i);if(i===!0)return zv(n,[{start:u,end:d,loop:o}],t,e);const l=d<u?d+s:d,p=!!n._fullLoop&&u===0&&d===s-1;return zv(n,$T(t,u,l,p),t,e)}function zv(n,e,t,i){return!i||!i.setContext||!t?e:OT(n,e,t,i)}function OT(n,e,t,i){const s=n._chart.getContext(),o=jv(n.options),{_datasetIndex:u,options:{spanGaps:d}}=n,l=t.length,p=[];let r=o,f=e[0].start,a=f;function c(h,m,y,v){const w=d?-1:1;if(h!==m){for(h+=l;t[h%l].skip;)h-=w;for(;t[m%l].skip;)m+=w;h%l!==m%l&&(p.push({start:h%l,end:m%l,loop:y,style:v}),r=v,f=m%l)}}for(const h of e){f=d?f:h.start;let m=t[f%l],y;for(a=f+1;a<=h.end;a++){const v=t[a%l];y=jv(i.setContext(Ji(s,{type:"segment",p0:m,p1:v,p0DataIndex:(a-1)%l,p1DataIndex:a%l,datasetIndex:u}))),DT(y,r)&&c(f,a-1,h.loop,r),m=v,r=y}f<a-1&&c(f,a-1,h.loop,r)}return p}function jv(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function DT(n,e){if(!e)return!1;const t=[],i=function(s,o){return td(o)?(t.includes(o)||t.push(o),t.indexOf(o)):o};return JSON.stringify(n,i)!==JSON.stringify(e,i)}/*!
|
|
1463
|
+
* Chart.js v4.4.8
|
|
1464
|
+
* https://www.chartjs.org
|
|
1465
|
+
* (c) 2025 Chart.js Contributors
|
|
1466
|
+
* Released under the MIT License
|
|
1467
|
+
*/class PT{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const o=t.listeners[s],u=t.duration;o.forEach(d=>d({chart:e,initial:t.initial,numSteps:u,currentStep:Math.min(i-t.start,u)}))}_refresh(){this._request||(this._running=!0,this._request=aw.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const o=i.items;let u=o.length-1,d=!1,l;for(;u>=0;--u)l=o[u],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),d=!0):(o[u]=o[o.length-1],o.pop());d&&(s.draw(),this._notify(s,i,e,"progress")),o.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Ci=new PT;const Uv="transparent",BT={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Ov(n||Uv),s=i.valid&&Ov(e||Uv);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class NT{constructor(e,t,i,s){const o=t[i];s=zo([e.to,s,o,e.from]);const u=zo([e.from,o,s]);this._active=!0,this._fn=e.fn||BT[e.type||typeof u],this._easing=Xo[e.easing]||Xo.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=u,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,u=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(u,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=zo([e.to,t,s,e.from]),this._from=zo([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,o=this._from,u=this._loop,d=this._to;let l;if(this._active=o!==d&&(u||t<i),!this._active){this._target[s]=d,this._notify(!0);return}if(t<0){this._target[s]=o;return}l=t/i%2,l=u&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,d,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}class Cw{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!nt(e))return;const t=Object.keys($t.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!nt(o))return;const u={};for(const d of t)u[d]=o[d];(Tt(o.properties)&&o.properties||[s]).forEach(d=>{(d===s||!i.has(d))&&i.set(d,u)})})}_animateOptions(e,t){const i=t.options,s=WT(e,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&FT(e.options.$animations,i).then(()=>{e.options=i},()=>{}),o}_createAnimations(e,t){const i=this._properties,s=[],o=e.$animations||(e.$animations={}),u=Object.keys(t),d=Date.now();let l;for(l=u.length-1;l>=0;--l){const p=u[l];if(p.charAt(0)==="$")continue;if(p==="options"){s.push(...this._animateOptions(e,t));continue}const r=t[p];let f=o[p];const a=i.get(p);if(f)if(a&&f.active()){f.update(a,r,d);continue}else f.cancel();if(!a||!a.duration){e[p]=r;continue}o[p]=f=new NT(a,e,p,r),s.push(f)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return Ci.add(this._chart,i),!0}}function FT(n,e){const t=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const o=n[i[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function WT(n,e){if(!e)return;let t=n.options;if(!t){n.options=e;return}return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function Vv(n,e){const t=n&&n.options||{},i=t.reverse,s=t.min===void 0?e:0,o=t.max===void 0?e:0;return{start:i?o:s,end:i?s:o}}function HT(n,e,t){if(t===!1)return!1;const i=Vv(n,t),s=Vv(e,t);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function zT(n){let e,t,i,s;return nt(n)?(e=n.top,t=n.right,i=n.bottom,s=n.left):e=t=i=s=n,{top:e,right:t,bottom:i,left:s,disabled:n===!1}}function kw(n,e){const t=[],i=n._getSortedDatasetMetas(e);let s,o;for(s=0,o=i.length;s<o;++s)t.push(i[s].index);return t}function qv(n,e,t,i={}){const s=n.keys,o=i.mode==="single";let u,d,l,p;if(e===null)return;let r=!1;for(u=0,d=s.length;u<d;++u){if(l=+s[u],l===t){if(r=!0,i.all)continue;break}p=n.values[l],Bt(p)&&(o||e===0||hi(e)===hi(p))&&(e+=p)}return!r&&!i.all?0:e}function jT(n,e){const{iScale:t,vScale:i}=e,s=t.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",u=Object.keys(n),d=new Array(u.length);let l,p,r;for(l=0,p=u.length;l<p;++l)r=u[l],d[l]={[s]:r,[o]:n[r]};return d}function Uh(n,e){const t=n&&n.options.stacked;return t||t===void 0&&e.stack!==void 0}function UT(n,e,t){return`${n.id}.${e.id}.${t.stack||t.type}`}function VT(n){const{min:e,max:t,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function qT(n,e,t){const i=n[e]||(n[e]={});return i[t]||(i[t]={})}function Gv(n,e,t,i){for(const s of e.getMatchingVisibleMetas(i).reverse()){const o=n[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function Kv(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:o,vScale:u,index:d}=i,l=o.axis,p=u.axis,r=UT(o,u,i),f=e.length;let a;for(let c=0;c<f;++c){const h=e[c],{[l]:m,[p]:y}=h,v=h._stacks||(h._stacks={});a=v[p]=qT(s,r,m),a[d]=y,a._top=Gv(a,u,!0,i.type),a._bottom=Gv(a,u,!1,i.type);const w=a._visualValues||(a._visualValues={});w[d]=y}}function Vh(n,e){const t=n.scales;return Object.keys(t).filter(i=>t[i].axis===e).shift()}function GT(n,e){return Ji(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function KT(n,e,t){return Ji(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function $o(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const o=s._stacks;if(!o||o[i]===void 0||o[i][t]===void 0)return;delete o[i][t],o[i]._visualValues!==void 0&&o[i]._visualValues[t]!==void 0&&delete o[i]._visualValues[t]}}}const qh=n=>n==="reset"||n==="none",Yv=(n,e)=>e?n:Object.assign({},n),YT=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:kw(t,!0),values:null};class Qn{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Uh(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&$o(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(f,a,c,h)=>f==="x"?a:f==="r"?h:c,o=t.xAxisID=qe(i.xAxisID,Vh(e,"x")),u=t.yAxisID=qe(i.yAxisID,Vh(e,"y")),d=t.rAxisID=qe(i.rAxisID,Vh(e,"r")),l=t.indexAxis,p=t.iAxisID=s(l,o,u,d),r=t.vAxisID=s(l,u,o,d);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(u),t.rScale=this.getScaleForId(d),t.iScale=this.getScaleForId(p),t.vScale=this.getScaleForId(r)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Tv(this._data,this),e._stacked&&$o(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(nt(t)){const s=this._cachedMeta;this._data=jT(t,s)}else if(i!==t){if(i){Tv(i,this);const s=this._cachedMeta;$o(s),s._parsed=[]}t&&Object.isExtensible(t)&&OR(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const o=t._stacked;t._stacked=Uh(t.vScale,t),t.stack!==i.stack&&(s=!0,$o(t),t.stack=i.stack),this._resyncElements(e),(s||o!==t._stacked)&&(Kv(this,t._parsed),t._stacked=Uh(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:u}=i,d=o.axis;let l=e===0&&t===s.length?!0:i._sorted,p=e>0&&i._parsed[e-1],r,f,a;if(this._parsing===!1)i._parsed=s,i._sorted=!0,a=s;else{Tt(s[e])?a=this.parseArrayData(i,s,e,t):nt(s[e])?a=this.parseObjectData(i,s,e,t):a=this.parsePrimitiveData(i,s,e,t);const c=()=>f[d]===null||p&&f[d]<p[d];for(r=0;r<t;++r)i._parsed[r+e]=f=a[r],l&&(c()&&(l=!1),p=f);i._sorted=l}u&&Kv(this,a)}parsePrimitiveData(e,t,i,s){const{iScale:o,vScale:u}=e,d=o.axis,l=u.axis,p=o.getLabels(),r=o===u,f=new Array(s);let a,c,h;for(a=0,c=s;a<c;++a)h=a+i,f[a]={[d]:r||o.parse(p[h],h),[l]:u.parse(t[h],h)};return f}parseArrayData(e,t,i,s){const{xScale:o,yScale:u}=e,d=new Array(s);let l,p,r,f;for(l=0,p=s;l<p;++l)r=l+i,f=t[r],d[l]={x:o.parse(f[0],r),y:u.parse(f[1],r)};return d}parseObjectData(e,t,i,s){const{xScale:o,yScale:u}=e,{xAxisKey:d="x",yAxisKey:l="y"}=this._parsing,p=new Array(s);let r,f,a,c;for(r=0,f=s;r<f;++r)a=r+i,c=t[a],p[r]={x:o.parse(Qi(c,d),a),y:u.parse(Qi(c,l),a)};return p}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,i){const s=this.chart,o=this._cachedMeta,u=t[e.axis],d={keys:kw(s,!0),values:t._stacks[e.axis]._visualValues};return qv(d,u,o.index,{mode:i})}updateRangeFromParsed(e,t,i,s){const o=i[t.axis];let u=o===null?NaN:o;const d=s&&i._stacks[t.axis];s&&d&&(s.values=d,u=qv(s,o,this._cachedMeta.index)),e.min=Math.min(e.min,u),e.max=Math.max(e.max,u)}getMinMax(e,t){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&e===i.iScale,u=s.length,d=this._getOtherScale(e),l=YT(t,i,this.chart),p={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:r,max:f}=VT(d);let a,c;function h(){c=s[a];const m=c[d.axis];return!Bt(c[e.axis])||r>m||f<m}for(a=0;a<u&&!(!h()&&(this.updateRangeFromParsed(p,e,c,l),o));++a);if(o){for(a=u-1;a>=0;--a)if(!h()){this.updateRangeFromParsed(p,e,c,l);break}}return p}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,o,u;for(s=0,o=t.length;s<o;++s)u=t[s][e.axis],Bt(u)&&i.push(u);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,i=t.iScale,s=t.vScale,o=this.getParsed(e);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=zT(qe(this.options.clip,HT(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,i=this._cachedMeta,s=i.data||[],o=t.chartArea,u=[],d=this._drawStart||0,l=this._drawCount||s.length-d,p=this.options.drawActiveElementsOnTop;let r;for(i.dataset&&i.dataset.draw(e,o,d,l),r=d;r<d+l;++r){const f=s[r];f.hidden||(f.active&&p?u.push(f):f.draw(e,o))}for(r=0;r<u.length;++r)u[r].draw(e,o)}getStyle(e,t){const i=t?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,t,i){const s=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const u=this._cachedMeta.data[e];o=u.$context||(u.$context=KT(this.getContext(),e,u)),o.parsed=this.getParsed(e),o.raw=s.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=GT(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=i,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",i){const s=t==="active",o=this._cachedDataOpts,u=e+"-"+t,d=o[u],l=this.enableOptionSharing&&as(i);if(d)return Yv(d,l);const p=this.chart.config,r=p.datasetElementScopeKeys(this._type,e),f=s?[`${e}Hover`,"hover",e,""]:[e,""],a=p.getOptionScopes(this.getDataset(),r),c=Object.keys($t.elements[e]),h=()=>this.getContext(i,s,t),m=p.resolveNamedOptions(a,c,h,f);return m.$shared&&(m.$shared=l,o[u]=Object.freeze(Yv(m,l))),m}_resolveAnimations(e,t,i){const s=this.chart,o=this._cachedDataOpts,u=`animation-${t}`,d=o[u];if(d)return d;let l;if(s.options.animation!==!1){const r=this.chart.config,f=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),f);l=r.createResolver(a,this.getContext(e,i,t))}const p=new Cw(s,l&&l.animations);return l&&l._cacheable&&(o[u]=Object.freeze(p)),p}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||qh(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,o=this.getSharedOptions(i),u=this.includeOptions(t,o)||o!==s;return this.updateSharedOptions(o,t,i),{sharedOptions:o,includeOptions:u}}updateElement(e,t,i,s){qh(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!qh(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const o=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[d,l,p]of this._syncList)this[d](l,p);this._syncList=[];const s=i.length,o=t.length,u=Math.min(o,s);u&&this.parse(0,u),o>s?this._insertElements(s,o-s,e):o<s&&this._removeElements(o,s-o)}_insertElements(e,t,i=!0){const s=this._cachedMeta,o=s.data,u=e+t;let d;const l=p=>{for(p.length+=t,d=p.length-1;d>=u;d--)p[d]=p[d-t]};for(l(o),d=e;d<u;++d)o[d]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(e,t),i&&this.updateElements(o,e,t,"reset")}updateElements(e,t,i,s){}_removeElements(e,t){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(e,t);i._stacked&&$o(i,s)}i.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,i,s]=e;this[t](i,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Re(Qn,"defaults",{}),Re(Qn,"datasetElementType",null),Re(Qn,"dataElementType",null);function XT(n,e){if(!n._cache.$bar){const t=n.getMatchingVisibleMetas(e);let i=[];for(let s=0,o=t.length;s<o;s++)i=i.concat(t[s].controller.getAllParsedValues(n));n._cache.$bar=sw(i.sort((s,o)=>s-o))}return n._cache.$bar}function QT(n){const e=n.iScale,t=XT(e,n.type);let i=e._length,s,o,u,d;const l=()=>{u===32767||u===-32768||(as(d)&&(i=Math.min(i,Math.abs(u-d)||i)),d=u)};for(s=0,o=t.length;s<o;++s)u=e.getPixelForValue(t[s]),l();for(d=void 0,s=0,o=e.ticks.length;s<o;++s)u=e.getPixelForTick(s),l();return i}function ZT(n,e,t,i){const s=t.barThickness;let o,u;return et(s)?(o=e.min*t.categoryPercentage,u=t.barPercentage):(o=s*i,u=1),{chunk:o/i,ratio:u,start:e.pixels[n]-o/2}}function JT(n,e,t,i){const s=e.pixels,o=s[n];let u=n>0?s[n-1]:null,d=n<s.length-1?s[n+1]:null;const l=t.categoryPercentage;u===null&&(u=o-(d===null?e.end-e.start:d-o)),d===null&&(d=o+o-u);const p=o-(o-Math.min(u,d))/2*l;return{chunk:Math.abs(d-u)/2*l/i,ratio:t.barPercentage,start:p}}function e$(n,e,t,i){const s=t.parse(n[0],i),o=t.parse(n[1],i),u=Math.min(s,o),d=Math.max(s,o);let l=u,p=d;Math.abs(u)>Math.abs(d)&&(l=d,p=u),e[t.axis]=p,e._custom={barStart:l,barEnd:p,start:s,end:o,min:u,max:d}}function Mw(n,e,t,i){return Tt(n)?e$(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Xv(n,e,t,i){const s=n.iScale,o=n.vScale,u=s.getLabels(),d=s===o,l=[];let p,r,f,a;for(p=t,r=t+i;p<r;++p)a=e[p],f={},f[s.axis]=d||s.parse(u[p],p),l.push(Mw(a,f,o,p));return l}function Gh(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function t$(n,e,t){return n!==0?hi(n):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}function n$(n){let e,t,i,s,o;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.base<n.y,t="bottom",i="top"),e?(s="end",o="start"):(s="start",o="end"),{start:t,end:i,reverse:e,top:s,bottom:o}}function i$(n,e,t,i){let s=e.borderSkipped;const o={};if(!s){n.borderSkipped=o;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:u,end:d,reverse:l,top:p,bottom:r}=n$(n);s==="middle"&&t&&(n.enableBorderRadius=!0,(t._top||0)===i?s=p:(t._bottom||0)===i?s=r:(o[Qv(r,u,d,l)]=!0,s=p)),o[Qv(s,u,d,l)]=!0,n.borderSkipped=o}function Qv(n,e,t,i){return i?(n=r$(n,e,t),n=Zv(n,t,e)):n=Zv(n,e,t),n}function r$(n,e,t){return n===e?t:n===t?e:n}function Zv(n,e,t){return n==="start"?e:n==="end"?t:n}function o$(n,{inflateAmount:e},t){n.inflateAmount=e==="auto"?t===1?.33:0:e}class pl extends Qn{parsePrimitiveData(e,t,i,s){return Xv(e,t,i,s)}parseArrayData(e,t,i,s){return Xv(e,t,i,s)}parseObjectData(e,t,i,s){const{iScale:o,vScale:u}=e,{xAxisKey:d="x",yAxisKey:l="y"}=this._parsing,p=o.axis==="x"?d:l,r=u.axis==="x"?d:l,f=[];let a,c,h,m;for(a=i,c=i+s;a<c;++a)m=t[a],h={},h[o.axis]=o.parse(Qi(m,p),a),f.push(Mw(Qi(m,r),h,u,a));return f}updateRangeFromParsed(e,t,i,s){super.updateRangeFromParsed(e,t,i,s);const o=i._custom;o&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:i,vScale:s}=t,o=this.getParsed(e),u=o._custom,d=Gh(u)?"["+u.start+", "+u.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:d}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,i,s){const o=s==="reset",{index:u,_cachedMeta:{vScale:d}}=this,l=d.getBasePixel(),p=d.isHorizontal(),r=this._getRuler(),{sharedOptions:f,includeOptions:a}=this._getSharedOptions(t,s);for(let c=t;c<t+i;c++){const h=this.getParsed(c),m=o||et(h[d.axis])?{base:l,head:l}:this._calculateBarValuePixels(c),y=this._calculateBarIndexPixels(c,r),v=(h._stacks||{})[d.axis],w={horizontal:p,base:m.base,enableBorderRadius:!v||Gh(h._custom)||u===v._top||u===v._bottom,x:p?m.head:y.center,y:p?y.center:m.head,height:p?y.size:Math.abs(m.size),width:p?Math.abs(m.size):y.size};a&&(w.options=f||this.resolveDataElementOptions(c,e[c].active?"active":s));const k=w.options||e[c].options;i$(w,k,v,u),o$(w,k,r.ratio),this.updateElement(e[c],c,w,s)}}_getStacks(e,t){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(r=>r.controller.options.grouped),o=i.options.stacked,u=[],d=this._cachedMeta.controller.getParsed(t),l=d&&d[i.axis],p=r=>{const f=r._parsed.find(c=>c[i.axis]===l),a=f&&f[r.vScale.axis];if(et(a)||isNaN(a))return!0};for(const r of s)if(!(t!==void 0&&p(r))&&((o===!1||u.indexOf(r.stack)===-1||o===void 0&&r.stack===void 0)&&u.push(r.stack),r.index===e))break;return u.length||u.push(void 0),u}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),o=t!==void 0?s.indexOf(t):-1;return o===-1?s.length-1:o}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let o,u;for(o=0,u=t.data.length;o<u;++o)s.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const d=e.barThickness;return{min:d||QT(t),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:d?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:i,index:s},options:{base:o,minBarLength:u}}=this,d=o||0,l=this.getParsed(e),p=l._custom,r=Gh(p);let f=l[t.axis],a=0,c=i?this.applyStack(t,l,i):f,h,m;c!==f&&(a=c-f,c=f),r&&(f=p.barStart,c=p.barEnd-p.barStart,f!==0&&hi(f)!==hi(p.barEnd)&&(a=0),a+=f);const y=!et(o)&&!r?o:a;let v=t.getPixelForValue(y);if(this.chart.getDataVisibility(e)?h=t.getPixelForValue(a+c):h=v,m=h-v,Math.abs(m)<u){m=t$(m,t,d)*u,f===d&&(v-=m/2);const w=t.getPixelForDecimal(0),k=t.getPixelForDecimal(1),_=Math.min(w,k),S=Math.max(w,k);v=Math.max(Math.min(v,S),_),h=v+m,i&&!r&&(l._stacks[t.axis]._visualValues[s]=t.getValueForPixel(h)-t.getValueForPixel(v))}if(v===t.getPixelForValue(d)){const w=hi(m)*t.getLineWidthForValue(d)/2;v+=w,m-=w}return{size:m,base:v,head:h,center:h+m/2}}_calculateBarIndexPixels(e,t){const i=t.scale,s=this.options,o=s.skipNull,u=qe(s.maxBarThickness,1/0);let d,l;if(t.grouped){const p=o?this._getStackCount(e):t.stackCount,r=s.barThickness==="flex"?JT(e,t,s,p):ZT(e,t,s,p),f=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);d=r.start+r.chunk*f+r.chunk/2,l=Math.min(u,r.chunk*r.ratio)}else d=i.getPixelForValue(this.getParsed(e)[i.axis],e),l=Math.min(u,t.min*t.ratio);return{base:d-l/2,head:d+l/2,center:d,size:l}}draw(){const e=this._cachedMeta,t=e.vScale,i=e.data,s=i.length;let o=0;for(;o<s;++o)this.getParsed(o)[t.axis]!==null&&!i[o].hidden&&i[o].draw(this._ctx)}}Re(pl,"id","bar"),Re(pl,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Re(pl,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class gl extends Qn{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,i,s){const o=super.parsePrimitiveData(e,t,i,s);for(let u=0;u<o.length;u++)o[u]._custom=this.resolveDataElementOptions(u+i).radius;return o}parseArrayData(e,t,i,s){const o=super.parseArrayData(e,t,i,s);for(let u=0;u<o.length;u++){const d=t[i+u];o[u]._custom=qe(d[2],this.resolveDataElementOptions(u+i).radius)}return o}parseObjectData(e,t,i,s){const o=super.parseObjectData(e,t,i,s);for(let u=0;u<o.length;u++){const d=t[i+u];o[u]._custom=qe(d&&d.r&&+d.r,this.resolveDataElementOptions(u+i).radius)}return o}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=t,u=this.getParsed(e),d=s.getLabelForValue(u.x),l=o.getLabelForValue(u.y),p=u._custom;return{label:i[e]||"",value:"("+d+", "+l+(p?", "+p:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const o=s==="reset",{iScale:u,vScale:d}=this._cachedMeta,{sharedOptions:l,includeOptions:p}=this._getSharedOptions(t,s),r=u.axis,f=d.axis;for(let a=t;a<t+i;a++){const c=e[a],h=!o&&this.getParsed(a),m={},y=m[r]=o?u.getPixelForDecimal(.5):u.getPixelForValue(h[r]),v=m[f]=o?d.getBasePixel():d.getPixelForValue(h[f]);m.skip=isNaN(y)||isNaN(v),p&&(m.options=l||this.resolveDataElementOptions(a,c.active?"active":s),o&&(m.options.radius=0)),this.updateElement(c,a,m,s)}}resolveDataElementOptions(e,t){const i=this.getParsed(e);let s=super.resolveDataElementOptions(e,t);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return t!=="active"&&(s.radius=0),s.radius+=qe(i&&i._custom,o),s}}Re(gl,"id","bubble"),Re(gl,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Re(gl,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function s$(n,e,t){let i=1,s=1,o=0,u=0;if(e<Ct){const d=n,l=d+e,p=Math.cos(d),r=Math.sin(d),f=Math.cos(l),a=Math.sin(l),c=(k,_,S)=>ls(k,d,l,!0)?1:Math.max(_,_*t,S,S*t),h=(k,_,S)=>ls(k,d,l,!0)?-1:Math.min(_,_*t,S,S*t),m=c(0,p,f),y=c(Wt,r,a),v=h(kt,p,f),w=h(kt+Wt,r,a);i=(m-v)/2,s=(y-w)/2,o=-(m+v)/2,u=-(y+w)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:u}}class vr extends Qn{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let o=l=>+i[l];if(nt(i[e])){const{key:l="value"}=this._parsing;o=p=>+Qi(i[p],l)}let u,d;for(u=e,d=e+t;u<d;++u)s._parsed[u]=o(u)}}_getRotation(){return Xn(this.options.rotation-90)}_getCircumference(){return Xn(this.options.circumference)}_getRotationExtents(){let e=Ct,t=-Ct;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,o=s._getRotation(),u=s._getCircumference();e=Math.min(e,o),t=Math.max(t,o+u)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:i}=t,s=this._cachedMeta,o=s.data,u=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,d=Math.max((Math.min(i.width,i.height)-u)/2,0),l=Math.min(bR(this.options.cutout,d),1),p=this._getRingWeight(this.index),{circumference:r,rotation:f}=this._getRotationExtents(),{ratioX:a,ratioY:c,offsetX:h,offsetY:m}=s$(f,r,l),y=(i.width-u)/a,v=(i.height-u)/c,w=Math.max(Math.min(y,v)/2,0),k=tw(this.options.radius,w),_=Math.max(k*l,0),S=(k-_)/this._getVisibleDatasetWeightTotal();this.offsetX=h*k,this.offsetY=m*k,s.total=this.calculateTotal(),this.outerRadius=k-S*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-S*p,0),this.updateElements(o,0,o.length,e)}_circumference(e,t){const i=this.options,s=this._cachedMeta,o=this._getCircumference();return t&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*o/Ct)}updateElements(e,t,i,s){const o=s==="reset",u=this.chart,d=u.chartArea,p=u.options.animation,r=(d.left+d.right)/2,f=(d.top+d.bottom)/2,a=o&&p.animateScale,c=a?0:this.innerRadius,h=a?0:this.outerRadius,{sharedOptions:m,includeOptions:y}=this._getSharedOptions(t,s);let v=this._getRotation(),w;for(w=0;w<t;++w)v+=this._circumference(w,o);for(w=t;w<t+i;++w){const k=this._circumference(w,o),_=e[w],S={x:r+this.offsetX,y:f+this.offsetY,startAngle:v,endAngle:v+k,circumference:k,outerRadius:h,innerRadius:c};y&&(S.options=m||this.resolveDataElementOptions(w,_.active?"active":s)),v+=k,this.updateElement(_,w,S,s)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let i=0,s;for(s=0;s<t.length;s++){const o=e._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!t[s].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?Ct*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=ws(t._parsed[e],i.options.locale);return{label:s[e]||"",value:o}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,o,u,d,l;if(!e){for(s=0,o=i.data.datasets.length;s<o;++s)if(i.isDatasetVisible(s)){u=i.getDatasetMeta(s),e=u.data,d=u.controller;break}}if(!e)return 0;for(s=0,o=e.length;s<o;++s)l=d.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let i=0,s=e.length;i<s;++i){const o=this.resolveDataElementOptions(i);t=Math.max(t,o.offset||0,o.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(t+=this._getRingWeight(i));return t}_getRingWeight(e){return Math.max(qe(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Re(vr,"id","doughnut"),Re(vr,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Re(vr,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Re(vr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return t.labels.map((o,u)=>{const l=e.getDatasetMeta(0).controller.getStyle(u);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(u),index:u}})}return[]}},onClick(e,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}}}});class ml extends Qn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=t,u=this.chart._animationsDisabled;let{start:d,count:l}=cw(t,s,u);this._drawStart=d,this._drawCount=l,uw(t)&&(d=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const p=this.resolveDatasetElementOptions(e);this.options.showLine||(p.borderWidth=0),p.segment=this.options.segment,this.updateElement(i,void 0,{animated:!u,options:p},e),this.updateElements(s,d,l,e)}updateElements(e,t,i,s){const o=s==="reset",{iScale:u,vScale:d,_stacked:l,_dataset:p}=this._cachedMeta,{sharedOptions:r,includeOptions:f}=this._getSharedOptions(t,s),a=u.axis,c=d.axis,{spanGaps:h,segment:m}=this.options,y=to(h)?h:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||s==="none",w=t+i,k=e.length;let _=t>0&&this.getParsed(t-1);for(let S=0;S<k;++S){const x=e[S],L=v?x:{};if(S<t||S>=w){L.skip=!0;continue}const I=this.getParsed(S),$=et(I[c]),T=L[a]=u.getPixelForValue(I[a],S),O=L[c]=o||$?d.getBasePixel():d.getPixelForValue(l?this.applyStack(d,I,l):I[c],S);L.skip=isNaN(T)||isNaN(O)||$,L.stop=S>0&&Math.abs(I[a]-_[a])>y,m&&(L.parsed=I,L.raw=p.data[S]),f&&(L.options=r||this.resolveDataElementOptions(S,x.active?"active":s)),v||this.updateElement(x,S,L,s),_=I}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),u=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,u)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Re(ml,"id","line"),Re(ml,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Re(ml,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Zo extends Qn{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=ws(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:o}}parseObjectData(e,t,i,s){return vw.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<t.min&&(t.min=o),o>t.max&&(t.max=o))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(s/2,0),u=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),d=(o-u)/e.getVisibleDatasetCount();this.outerRadius=o-d*this.index,this.innerRadius=this.outerRadius-d}updateElements(e,t,i,s){const o=s==="reset",u=this.chart,l=u.options.animation,p=this._cachedMeta.rScale,r=p.xCenter,f=p.yCenter,a=p.getIndexAngle(0)-.5*kt;let c=a,h;const m=360/this.countVisibleElements();for(h=0;h<t;++h)c+=this._computeAngle(h,s,m);for(h=t;h<t+i;h++){const y=e[h];let v=c,w=c+this._computeAngle(h,s,m),k=u.getDataVisibility(h)?p.getDistanceFromCenterForValue(this.getParsed(h).r):0;c=w,o&&(l.animateScale&&(k=0),l.animateRotate&&(v=w=a));const _={x:r,y:f,innerRadius:0,outerRadius:k,startAngle:v,endAngle:w,options:this.resolveDataElementOptions(h,y.active?"active":s)};this.updateElement(y,h,_,s)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Xn(this.resolveDataElementOptions(e,t).angle||i):0}}Re(Zo,"id","polarArea"),Re(Zo,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Re(Zo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return t.labels.map((o,u)=>{const l=e.getDatasetMeta(0).controller.getStyle(u);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(u),index:u}})}return[]}},onClick(e,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class pf extends vr{}Re(pf,"id","pie"),Re(pf,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class yl extends Qn{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return vw.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],o=t.iScale.getLabels();if(i.points=s,e!=="resize"){const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0);const d={_loop:!0,_fullLoop:o.length===s.length,options:u};this.updateElement(i,void 0,d,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const o=this._cachedMeta.rScale,u=s==="reset";for(let d=t;d<t+i;d++){const l=e[d],p=this.resolveDataElementOptions(d,l.active?"active":s),r=o.getPointPositionForValue(d,this.getParsed(d).r),f=u?o.xCenter:r.x,a=u?o.yCenter:r.y,c={x:f,y:a,angle:r.angle,skip:isNaN(f)||isNaN(a),options:p};this.updateElement(l,d,c,s)}}}Re(yl,"id","radar"),Re(yl,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Re(yl,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class vl extends Qn{getLabelAndValue(e){const t=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=t,u=this.getParsed(e),d=s.getLabelForValue(u.x),l=o.getLabelForValue(u.y);return{label:i[e]||"",value:"("+d+", "+l+")"}}update(e){const t=this._cachedMeta,{data:i=[]}=t,s=this.chart._animationsDisabled;let{start:o,count:u}=cw(t,i,s);if(this._drawStart=o,this._drawCount=u,uw(t)&&(o=0,u=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:d,_dataset:l}=t;d._chart=this.chart,d._datasetIndex=this.index,d._decimated=!!l._decimated,d.points=i;const p=this.resolveDatasetElementOptions(e);p.segment=this.options.segment,this.updateElement(d,void 0,{animated:!s,options:p},e)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(i,o,u,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,t,i,s){const o=s==="reset",{iScale:u,vScale:d,_stacked:l,_dataset:p}=this._cachedMeta,r=this.resolveDataElementOptions(t,s),f=this.getSharedOptions(r),a=this.includeOptions(s,f),c=u.axis,h=d.axis,{spanGaps:m,segment:y}=this.options,v=to(m)?m:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||o||s==="none";let k=t>0&&this.getParsed(t-1);for(let _=t;_<t+i;++_){const S=e[_],x=this.getParsed(_),L=w?S:{},I=et(x[h]),$=L[c]=u.getPixelForValue(x[c],_),T=L[h]=o||I?d.getBasePixel():d.getPixelForValue(l?this.applyStack(d,x,l):x[h],_);L.skip=isNaN($)||isNaN(T)||I,L.stop=_>0&&Math.abs(x[c]-k[c])>v,y&&(L.parsed=x,L.raw=p.data[_]),a&&(L.options=f||this.resolveDataElementOptions(_,S.active?"active":s)),w||this.updateElement(S,_,L,s),k=x}this.updateSharedOptions(f,s,r)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let d=0;for(let l=t.length-1;l>=0;--l)d=Math.max(d,t[l].size(this.resolveDataElementOptions(l))/2);return d>0&&d}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const o=t[0].size(this.resolveDataElementOptions(0)),u=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,o,u)/2}}Re(vl,"id","scatter"),Re(vl,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Re(vl,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var a$=Object.freeze({__proto__:null,BarController:pl,BubbleController:gl,DoughnutController:vr,LineController:ml,PieController:pf,PolarAreaController:Zo,RadarController:yl,ScatterController:vl});function fr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ld{constructor(e){Re(this,"options");this.options=e||{}}static override(e){Object.assign(ld.prototype,e)}init(){}formats(){return fr()}parse(){return fr()}format(){return fr()}add(){return fr()}diff(){return fr()}startOf(){return fr()}endOf(){return fr()}}var l$={_date:ld};function c$(n,e,t,i){const{controller:s,data:o,_sorted:u}=n,d=s._cachedMeta.iScale,l=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(d&&e===d.axis&&e!=="r"&&u&&o.length){const p=d._reversePixels?$R:$i;if(i){if(s._sharedOptions){const r=o[0],f=typeof r.getRange=="function"&&r.getRange(e);if(f){const a=p(o,e,t-f),c=p(o,e,t+f);return{lo:a.lo,hi:c.hi}}}}else{const r=p(o,e,t);if(l){const{vScale:f}=s._cachedMeta,{_parsed:a}=n,c=a.slice(0,r.lo+1).reverse().findIndex(m=>!et(m[f.axis]));r.lo-=Math.max(0,c);const h=a.slice(r.hi).findIndex(m=>!et(m[f.axis]));r.hi+=Math.max(0,h)}return r}}return{lo:0,hi:o.length-1}}function Vl(n,e,t,i,s){const o=n.getSortedVisibleDatasetMetas(),u=t[e];for(let d=0,l=o.length;d<l;++d){const{index:p,data:r}=o[d],{lo:f,hi:a}=c$(o[d],e,u,s);for(let c=f;c<=a;++c){const h=r[c];h.skip||i(h,p,c)}}}function u$(n){const e=n.indexOf("x")!==-1,t=n.indexOf("y")!==-1;return function(i,s){const o=e?Math.abs(i.x-s.x):0,u=t?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(u,2))}}function Kh(n,e,t,i,s){const o=[];return!s&&!n.isPointInArea(e)||Vl(n,t,e,function(d,l,p){!s&&!Ii(d,n.chartArea,0)||d.inRange(e.x,e.y,i)&&o.push({element:d,datasetIndex:l,index:p})},!0),o}function h$(n,e,t,i){let s=[];function o(u,d,l){const{startAngle:p,endAngle:r}=u.getProps(["startAngle","endAngle"],i),{angle:f}=rw(u,{x:e.x,y:e.y});ls(f,p,r)&&s.push({element:u,datasetIndex:d,index:l})}return Vl(n,t,e,o),s}function f$(n,e,t,i,s,o){let u=[];const d=u$(t);let l=Number.POSITIVE_INFINITY;function p(r,f,a){const c=r.inRange(e.x,e.y,s);if(i&&!c)return;const h=r.getCenterPoint(s);if(!(!!o||n.isPointInArea(h))&&!c)return;const y=d(e,h);y<l?(u=[{element:r,datasetIndex:f,index:a}],l=y):y===l&&u.push({element:r,datasetIndex:f,index:a})}return Vl(n,t,e,p),u}function Yh(n,e,t,i,s,o){return!o&&!n.isPointInArea(e)?[]:t==="r"&&!i?h$(n,e,t,s):f$(n,e,t,i,s,o)}function Jv(n,e,t,i,s){const o=[],u=t==="x"?"inXRange":"inYRange";let d=!1;return Vl(n,t,e,(l,p,r)=>{l[u]&&l[u](e[t],s)&&(o.push({element:l,datasetIndex:p,index:r}),d=d||l.inRange(e.x,e.y,s))}),i&&!d?[]:o}var d$={modes:{index(n,e,t,i){const s=pr(e,n),o=t.axis||"x",u=t.includeInvisible||!1,d=t.intersect?Kh(n,s,o,i,u):Yh(n,s,o,!1,i,u),l=[];return d.length?(n.getSortedVisibleDatasetMetas().forEach(p=>{const r=d[0].index,f=p.data[r];f&&!f.skip&&l.push({element:f,datasetIndex:p.index,index:r})}),l):[]},dataset(n,e,t,i){const s=pr(e,n),o=t.axis||"xy",u=t.includeInvisible||!1;let d=t.intersect?Kh(n,s,o,i,u):Yh(n,s,o,!1,i,u);if(d.length>0){const l=d[0].datasetIndex,p=n.getDatasetMeta(l).data;d=[];for(let r=0;r<p.length;++r)d.push({element:p[r],datasetIndex:l,index:r})}return d},point(n,e,t,i){const s=pr(e,n),o=t.axis||"xy",u=t.includeInvisible||!1;return Kh(n,s,o,i,u)},nearest(n,e,t,i){const s=pr(e,n),o=t.axis||"xy",u=t.includeInvisible||!1;return Yh(n,s,o,t.intersect,i,u)},x(n,e,t,i){const s=pr(e,n);return Jv(n,s,"x",t.intersect,i)},y(n,e,t,i){const s=pr(e,n);return Jv(n,s,"y",t.intersect,i)}}};const Ew=["left","top","right","bottom"];function Io(n,e){return n.filter(t=>t.pos===e)}function e0(n,e){return n.filter(t=>Ew.indexOf(t.pos)===-1&&t.box.axis===e)}function Oo(n,e){return n.sort((t,i)=>{const s=e?i:t,o=e?t:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function p$(n){const e=[];let t,i,s,o,u,d;for(t=0,i=(n||[]).length;t<i;++t)s=n[t],{position:o,options:{stack:u,stackWeight:d=1}}=s,e.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:u&&o+u,stackWeight:d});return e}function g$(n){const e={};for(const t of n){const{stack:i,pos:s,stackWeight:o}=t;if(!i||!Ew.includes(s))continue;const u=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});u.count++,u.weight+=o}return e}function m$(n,e){const t=g$(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=e;let o,u,d;for(o=0,u=n.length;o<u;++o){d=n[o];const{fullSize:l}=d.box,p=t[d.stack],r=p&&d.stackWeight/p.weight;d.horizontal?(d.width=r?r*i:l&&e.availableWidth,d.height=s):(d.width=i,d.height=r?r*s:l&&e.availableHeight)}return t}function y$(n){const e=p$(n),t=Oo(e.filter(p=>p.box.fullSize),!0),i=Oo(Io(e,"left"),!0),s=Oo(Io(e,"right")),o=Oo(Io(e,"top"),!0),u=Oo(Io(e,"bottom")),d=e0(e,"x"),l=e0(e,"y");return{fullSize:t,leftAndTop:i.concat(o),rightAndBottom:s.concat(l).concat(u).concat(d),chartArea:Io(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:o.concat(u).concat(d)}}function t0(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function Lw(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function v$(n,e,t,i){const{pos:s,box:o}=t,u=n.maxPadding;if(!nt(s)){t.size&&(n[s]-=t.size);const f=i[t.stack]||{size:0,count:1};f.size=Math.max(f.size,t.horizontal?o.height:o.width),t.size=f.size/f.count,n[s]+=t.size}o.getPadding&&Lw(u,o.getPadding());const d=Math.max(0,e.outerWidth-t0(u,n,"left","right")),l=Math.max(0,e.outerHeight-t0(u,n,"top","bottom")),p=d!==n.w,r=l!==n.h;return n.w=d,n.h=l,t.horizontal?{same:p,other:r}:{same:r,other:p}}function b$(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function w$(n,e){const t=e.maxPadding;function i(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(u=>{o[u]=Math.max(e[u],t[u])}),o}return i(n?["left","right"]:["top","bottom"])}function jo(n,e,t,i){const s=[];let o,u,d,l,p,r;for(o=0,u=n.length,p=0;o<u;++o){d=n[o],l=d.box,l.update(d.width||e.w,d.height||e.h,w$(d.horizontal,e));const{same:f,other:a}=v$(e,t,d,i);p|=f&&s.length,r=r||a,l.fullSize||s.push(d)}return p&&jo(s,e,t,i)||r}function Za(n,e,t,i,s){n.top=t,n.left=e,n.right=e+i,n.bottom=t+s,n.width=i,n.height=s}function n0(n,e,t,i){const s=t.padding;let{x:o,y:u}=e;for(const d of n){const l=d.box,p=i[d.stack]||{placed:0,weight:1},r=d.stackWeight/p.weight||1;if(d.horizontal){const f=e.w*r,a=p.size||l.height;as(p.start)&&(u=p.start),l.fullSize?Za(l,s.left,u,t.outerWidth-s.right-s.left,a):Za(l,e.left+p.placed,u,f,a),p.start=u,p.placed+=f,u=l.bottom}else{const f=e.h*r,a=p.size||l.width;as(p.start)&&(o=p.start),l.fullSize?Za(l,o,s.top,a,t.outerHeight-s.bottom-s.top):Za(l,o,e.top+p.placed,a,f),p.start=o,p.placed+=f,o=l.right}}e.x=o,e.y=u}var rn={addBox(n,e){n.boxes||(n.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},n.boxes.push(e)},removeBox(n,e){const t=n.boxes?n.boxes.indexOf(e):-1;t!==-1&&n.boxes.splice(t,1)},configure(n,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(n,e,t,i){if(!n)return;const s=on(n.options.layout.padding),o=Math.max(e-s.width,0),u=Math.max(t-s.height,0),d=y$(n.boxes),l=d.vertical,p=d.horizontal;pt(n.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const r=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:o,availableHeight:u,vBoxMaxWidth:o/2/r,hBoxMaxHeight:u/2}),a=Object.assign({},s);Lw(a,on(i));const c=Object.assign({maxPadding:a,w:o,h:u,x:s.left,y:s.top},s),h=m$(l.concat(p),f);jo(d.fullSize,c,f,h),jo(l,c,f,h),jo(p,c,f,h)&&jo(l,c,f,h),b$(c),n0(d.leftAndTop,c,f,h),c.x+=c.w,c.y+=c.h,n0(d.rightAndBottom,c,f,h),n.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h,height:c.h,width:c.w},pt(d.chartArea,m=>{const y=m.box;Object.assign(y,n.chartArea),y.update(c.w,c.h,{left:0,top:0,right:0,bottom:0})})}};class Rw{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class _$ extends Rw{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const bl="$chartjs",x$={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},i0=n=>n===null||n==="";function S$(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[bl]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",i0(s)){const o=Wv(n,"width");o!==void 0&&(n.width=o)}if(i0(i))if(n.style.height==="")n.height=n.width/(e||2);else{const o=Wv(n,"height");o!==void 0&&(n.height=o)}return n}const Tw=CT?{passive:!0}:!1;function A$(n,e,t){n&&n.addEventListener(e,t,Tw)}function C$(n,e,t){n&&n.canvas&&n.canvas.removeEventListener(e,t,Tw)}function k$(n,e){const t=x$[n.type]||n.type,{x:i,y:s}=pr(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function El(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function M$(n,e,t){const i=n.canvas,s=new MutationObserver(o=>{let u=!1;for(const d of o)u=u||El(d.addedNodes,i),u=u&&!El(d.removedNodes,i);u&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function E$(n,e,t){const i=n.canvas,s=new MutationObserver(o=>{let u=!1;for(const d of o)u=u||El(d.removedNodes,i),u=u&&!El(d.addedNodes,i);u&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const us=new Map;let r0=0;function $w(){const n=window.devicePixelRatio;n!==r0&&(r0=n,us.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function L$(n,e){us.size||window.addEventListener("resize",$w),us.set(n,e)}function R$(n){us.delete(n),us.size||window.removeEventListener("resize",$w)}function T$(n,e,t){const i=n.canvas,s=i&&ad(i);if(!s)return;const o=lw((d,l)=>{const p=s.clientWidth;t(d,l),p<s.clientWidth&&t()},window),u=new ResizeObserver(d=>{const l=d[0],p=l.contentRect.width,r=l.contentRect.height;p===0&&r===0||o(p,r)});return u.observe(s),L$(n,o),u}function Xh(n,e,t){t&&t.disconnect(),e==="resize"&&R$(n)}function $$(n,e,t){const i=n.canvas,s=lw(o=>{n.ctx!==null&&t(k$(o,n))},n);return A$(i,e,s),s}class I$ extends Rw{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(S$(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[bl])return!1;const i=t[bl].initial;["height","width"].forEach(o=>{const u=i[o];et(u)?t.removeAttribute(o):t.setAttribute(o,u)});const s=i.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[bl],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),u={attach:M$,detach:E$,resize:T$}[t]||$$;s[t]=u(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:Xh,detach:Xh,resize:Xh}[t]||C$)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return AT(e,t,i,s)}isAttached(e){const t=e&&ad(e);return!!(t&&t.isConnected)}}function O$(n){return!sd()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?_$:I$}class Zn{constructor(){Re(this,"x");Re(this,"y");Re(this,"active",!1);Re(this,"options");Re(this,"$animations")}tooltipPosition(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return to(this.x)&&to(this.y)}getProps(e,t){const i=this.$animations;if(!t||!i)return this;const s={};return e.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}}Re(Zn,"defaults",{}),Re(Zn,"defaultRoutes");function D$(n,e){const t=n.options.ticks,i=P$(n),s=Math.min(t.maxTicksLimit||i,i),o=t.major.enabled?N$(e):[],u=o.length,d=o[0],l=o[u-1],p=[];if(u>s)return F$(e,p,o,u/s),p;const r=B$(o,e,s);if(u>0){let f,a;const c=u>1?Math.round((l-d)/(u-1)):null;for(Ja(e,p,r,et(c)?0:d-c,d),f=0,a=u-1;f<a;f++)Ja(e,p,r,o[f],o[f+1]);return Ja(e,p,r,l,et(c)?e.length:l+c),p}return Ja(e,p,r),p}function P$(n){const e=n.options.offset,t=n._tickSize(),i=n._length/t+(e?0:1),s=n._maxLength/t;return Math.floor(Math.min(i,s))}function B$(n,e,t){const i=W$(n),s=e.length/t;if(!i)return Math.max(s,1);const o=MR(i);for(let u=0,d=o.length-1;u<d;u++){const l=o[u];if(l>s)return l}return Math.max(s,1)}function N$(n){const e=[];let t,i;for(t=0,i=n.length;t<i;t++)n[t].major&&e.push(t);return e}function F$(n,e,t,i){let s=0,o=t[0],u;for(i=Math.ceil(i),u=0;u<n.length;u++)u===o&&(e.push(n[u]),s++,o=t[s*i])}function Ja(n,e,t,i,s){const o=qe(i,0),u=Math.min(qe(s,n.length),n.length);let d=0,l,p,r;for(t=Math.ceil(t),s&&(l=s-i,t=l/Math.floor(l/t)),r=o;r<0;)d++,r=Math.round(o+d*t);for(p=Math.max(o,0);p<u;p++)p===r&&(e.push(n[p]),d++,r=Math.round(o+d*t))}function W$(n){const e=n.length;let t,i;if(e<2)return!1;for(i=n[0],t=1;t<e;++t)if(n[t]-n[t-1]!==i)return!1;return i}const H$=n=>n==="left"?"right":n==="right"?"left":n,o0=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t,s0=(n,e)=>Math.min(e||n,n);function a0(n,e){const t=[],i=n.length/e,s=n.length;let o=0;for(;o<s;o+=i)t.push(n[Math.floor(o)]);return t}function z$(n,e,t){const i=n.ticks.length,s=Math.min(e,i-1),o=n._startPixel,u=n._endPixel,d=1e-6;let l=n.getPixelForTick(s),p;if(!(t&&(i===1?p=Math.max(l-o,u-l):e===0?p=(n.getPixelForTick(1)-l)/2:p=(l-n.getPixelForTick(s-1))/2,l+=s<e?p:-p,l<o-d||l>u+d)))return l}function j$(n,e){pt(n,t=>{const i=t.gc,s=i.length/2;let o;if(s>e){for(o=0;o<s;++o)delete t.data[i[o]];i.splice(0,s)}})}function Do(n){return n.drawTicks?n.tickLength:0}function l0(n,e){if(!n.display)return 0;const t=Gt(n.font,e),i=on(n.padding);return(Tt(n.text)?n.text.length:1)*t.lineHeight+i.height}function U$(n,e){return Ji(n,{scale:e,type:"scale"})}function V$(n,e,t){return Ji(n,{tick:t,index:e,type:"tick"})}function q$(n,e,t){let i=ed(n);return(t&&e!=="right"||!t&&e==="right")&&(i=H$(i)),i}function G$(n,e,t,i){const{top:s,left:o,bottom:u,right:d,chart:l}=n,{chartArea:p,scales:r}=l;let f=0,a,c,h;const m=u-s,y=d-o;if(n.isHorizontal()){if(c=nn(i,o,d),nt(t)){const v=Object.keys(t)[0],w=t[v];h=r[v].getPixelForValue(w)+m-e}else t==="center"?h=(p.bottom+p.top)/2+m-e:h=o0(n,t,e);a=d-o}else{if(nt(t)){const v=Object.keys(t)[0],w=t[v];c=r[v].getPixelForValue(w)-y+e}else t==="center"?c=(p.left+p.right)/2-y+e:c=o0(n,t,e);h=nn(i,u,s),f=t==="left"?-Wt:Wt}return{titleX:c,titleY:h,maxWidth:a,rotation:f}}class Cr extends Zn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:s}=this;return e=Mn(e,Number.POSITIVE_INFINITY),t=Mn(t,Number.NEGATIVE_INFINITY),i=Mn(i,Number.POSITIVE_INFINITY),s=Mn(s,Number.NEGATIVE_INFINITY),{min:Mn(e,i),max:Mn(t,s),minDefined:Bt(e),maxDefined:Bt(t)}}getMinMax(e){let{min:t,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),u;if(s&&o)return{min:t,max:i};const d=this.getMatchingVisibleMetas();for(let l=0,p=d.length;l<p;++l)u=d[l].controller.getMinMax(this,e),s||(t=Math.min(t,u.min)),o||(i=Math.max(i,u.max));return t=o&&t>i?i:t,i=s&&t>i?t:i,{min:Mn(t,Mn(i,t)),max:Mn(i,Mn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){xt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:o,ticks:u}=this.options,d=u.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=nT(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=d<this.ticks.length;this._convertTicksToLabels(l?a0(this.ticks,d):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),u.display&&(u.autoSkip||u.source==="auto")&&(this.ticks=D$(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,i;this.isHorizontal()?(t=this.left,i=this.right):(t=this.top,i=this.bottom,e=!e),this._startPixel=t,this._endPixel=i,this._reversePixels=e,this._length=i-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){xt(this.options.afterUpdate,[this])}beforeSetDimensions(){xt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){xt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),xt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){xt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let i,s,o;for(i=0,s=e.length;i<s;i++)o=e[i],o.label=xt(t.callback,[o.value,i,e],this)}afterTickToLabelConversion(){xt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){xt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,i=s0(this.ticks.length,e.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation;let u=s,d,l,p;if(!this._isVisible()||!t.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const r=this._getLabelSizes(),f=r.widest.width,a=r.highest.height,c=Yt(this.chart.width-f,0,this.maxWidth);d=e.offset?this.maxWidth/i:c/(i-1),f+6>d&&(d=c/(i-(e.offset?.5:1)),l=this.maxHeight-Do(e.grid)-t.padding-l0(e.title,this.chart.options.font),p=Math.sqrt(f*f+a*a),u=Zf(Math.min(Math.asin(Yt((r.highest.height+6)/d,-1,1)),Math.asin(Yt(l/p,-1,1))-Math.asin(Yt(a/p,-1,1)))),u=Math.max(s,Math.min(o,u))),this.labelRotation=u}afterCalculateLabelRotation(){xt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){xt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:o}}=this,u=this._isVisible(),d=this.isHorizontal();if(u){const l=l0(s,t.options.font);if(d?(e.width=this.maxWidth,e.height=Do(o)+l):(e.height=this.maxHeight,e.width=Do(o)+l),i.display&&this.ticks.length){const{first:p,last:r,widest:f,highest:a}=this._getLabelSizes(),c=i.padding*2,h=Xn(this.labelRotation),m=Math.cos(h),y=Math.sin(h);if(d){const v=i.mirror?0:y*f.width+m*a.height;e.height=Math.min(this.maxHeight,e.height+v+c)}else{const v=i.mirror?0:m*f.width+y*a.height;e.width=Math.min(this.maxWidth,e.width+v+c)}this._calculatePadding(p,r,y,m)}}this._handleMargins(),d?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:o,padding:u},position:d}=this.options,l=this.labelRotation!==0,p=d!=="top"&&this.axis==="x";if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let a=0,c=0;l?p?(a=s*e.width,c=i*t.height):(a=i*e.height,c=s*t.width):o==="start"?c=t.width:o==="end"?a=e.width:o!=="inner"&&(a=e.width/2,c=t.width/2),this.paddingLeft=Math.max((a-r+u)*this.width/(this.width-r),0),this.paddingRight=Math.max((c-f+u)*this.width/(this.width-f),0)}else{let r=t.height/2,f=e.height/2;o==="start"?(r=0,f=e.height):o==="end"&&(r=t.height,f=0),this.paddingTop=r+u,this.paddingBottom=f+u}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){xt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t<i;t++)et(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=a0(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,i){const{ctx:s,_longestTextCache:o}=this,u=[],d=[],l=Math.floor(t/s0(t,i));let p=0,r=0,f,a,c,h,m,y,v,w,k,_,S;for(f=0;f<t;f+=l){if(h=e[f].label,m=this._resolveTickFontOptions(f),s.font=y=m.string,v=o[y]=o[y]||{data:{},gc:[]},w=m.lineHeight,k=_=0,!et(h)&&!Tt(h))k=kl(s,v.data,v.gc,k,h),_=w;else if(Tt(h))for(a=0,c=h.length;a<c;++a)S=h[a],!et(S)&&!Tt(S)&&(k=kl(s,v.data,v.gc,k,S),_+=w);u.push(k),d.push(_),p=Math.max(k,p),r=Math.max(_,r)}j$(o,t);const x=u.indexOf(p),L=d.indexOf(r),I=$=>({width:u[$]||0,height:d[$]||0});return{first:I(0),last:I(t-1),widest:I(x),highest:I(L),widths:u,heights:d}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return TR(this._alignToPixels?hr(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const i=t[e];return i.$context||(i.$context=V$(this.getContext(),e,i))}return this.$context||(this.$context=U$(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=Xn(this.labelRotation),i=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),u=e.autoSkipPadding||0,d=o?o.widest.width+u:0,l=o?o.highest.height+u:0;return this.isHorizontal()?l*i>d*s?d/i:l/s:l*s<d*i?l/i:d/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:o,position:u,border:d}=s,l=o.offset,p=this.isHorizontal(),f=this.ticks.length+(l?1:0),a=Do(o),c=[],h=d.setContext(this.getContext()),m=h.display?h.width:0,y=m/2,v=function(N){return hr(i,N,m)};let w,k,_,S,x,L,I,$,T,O,C,A;if(u==="top")w=v(this.bottom),L=this.bottom-a,$=w-y,O=v(e.top)+y,A=e.bottom;else if(u==="bottom")w=v(this.top),O=e.top,A=v(e.bottom)-y,L=w+y,$=this.top+a;else if(u==="left")w=v(this.right),x=this.right-a,I=w-y,T=v(e.left)+y,C=e.right;else if(u==="right")w=v(this.left),T=e.left,C=v(e.right)-y,x=w+y,I=this.left+a;else if(t==="x"){if(u==="center")w=v((e.top+e.bottom)/2+.5);else if(nt(u)){const N=Object.keys(u)[0],H=u[N];w=v(this.chart.scales[N].getPixelForValue(H))}O=e.top,A=e.bottom,L=w+y,$=L+a}else if(t==="y"){if(u==="center")w=v((e.left+e.right)/2);else if(nt(u)){const N=Object.keys(u)[0],H=u[N];w=v(this.chart.scales[N].getPixelForValue(H))}x=w-y,I=x-a,T=e.left,C=e.right}const M=qe(s.ticks.maxTicksLimit,f),R=Math.max(1,Math.ceil(f/M));for(k=0;k<f;k+=R){const N=this.getContext(k),H=o.setContext(N),z=d.setContext(N),Y=H.lineWidth,K=H.color,re=z.dash||[],fe=z.dashOffset,U=H.tickWidth,Q=H.tickColor,ie=H.tickBorderDash||[],V=H.tickBorderDashOffset;_=z$(this,k,l),_!==void 0&&(S=hr(i,_,Y),p?x=I=T=C=S:L=$=O=A=S,c.push({tx1:x,ty1:L,tx2:I,ty2:$,x1:T,y1:O,x2:C,y2:A,width:Y,color:K,borderDash:re,borderDashOffset:fe,tickWidth:U,tickColor:Q,tickBorderDash:ie,tickBorderDashOffset:V}))}return this._ticksLength=f,this._borderValue=w,c}_computeLabelItems(e){const t=this.axis,i=this.options,{position:s,ticks:o}=i,u=this.isHorizontal(),d=this.ticks,{align:l,crossAlign:p,padding:r,mirror:f}=o,a=Do(i.grid),c=a+r,h=f?-r:c,m=-Xn(this.labelRotation),y=[];let v,w,k,_,S,x,L,I,$,T,O,C,A="middle";if(s==="top")x=this.bottom-h,L=this._getXAxisLabelAlignment();else if(s==="bottom")x=this.top+h,L=this._getXAxisLabelAlignment();else if(s==="left"){const R=this._getYAxisLabelAlignment(a);L=R.textAlign,S=R.x}else if(s==="right"){const R=this._getYAxisLabelAlignment(a);L=R.textAlign,S=R.x}else if(t==="x"){if(s==="center")x=(e.top+e.bottom)/2+c;else if(nt(s)){const R=Object.keys(s)[0],N=s[R];x=this.chart.scales[R].getPixelForValue(N)+c}L=this._getXAxisLabelAlignment()}else if(t==="y"){if(s==="center")S=(e.left+e.right)/2-c;else if(nt(s)){const R=Object.keys(s)[0],N=s[R];S=this.chart.scales[R].getPixelForValue(N)}L=this._getYAxisLabelAlignment(a).textAlign}t==="y"&&(l==="start"?A="top":l==="end"&&(A="bottom"));const M=this._getLabelSizes();for(v=0,w=d.length;v<w;++v){k=d[v],_=k.label;const R=o.setContext(this.getContext(v));I=this.getPixelForTick(v)+o.labelOffset,$=this._resolveTickFontOptions(v),T=$.lineHeight,O=Tt(_)?_.length:1;const N=O/2,H=R.color,z=R.textStrokeColor,Y=R.textStrokeWidth;let K=L;u?(S=I,L==="inner"&&(v===w-1?K=this.options.reverse?"left":"right":v===0?K=this.options.reverse?"right":"left":K="center"),s==="top"?p==="near"||m!==0?C=-O*T+T/2:p==="center"?C=-M.highest.height/2-N*T+T:C=-M.highest.height+T/2:p==="near"||m!==0?C=T/2:p==="center"?C=M.highest.height/2-N*T:C=M.highest.height-O*T,f&&(C*=-1),m!==0&&!R.showLabelBackdrop&&(S+=T/2*Math.sin(m))):(x=I,C=(1-O)*T/2);let re;if(R.showLabelBackdrop){const fe=on(R.backdropPadding),U=M.heights[v],Q=M.widths[v];let ie=C-fe.top,V=0-fe.left;switch(A){case"middle":ie-=U/2;break;case"bottom":ie-=U;break}switch(L){case"center":V-=Q/2;break;case"right":V-=Q;break;case"inner":v===w-1?V-=Q:v>0&&(V-=Q/2);break}re={left:V,top:ie,width:Q+fe.width,height:U+fe.height,color:R.backdropColor}}y.push({label:_,font:$,textOffset:C,options:{rotation:m,color:H,strokeColor:z,strokeWidth:Y,textAlign:K,textBaseline:A,translation:[S,x],backdrop:re}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Xn(this.labelRotation))return e==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,u=this._getLabelSizes(),d=e+o,l=u.widest.width;let p,r;return t==="left"?s?(r=this.right+o,i==="near"?p="left":i==="center"?(p="center",r+=l/2):(p="right",r+=l)):(r=this.right-d,i==="near"?p="right":i==="center"?(p="center",r-=l/2):(p="left",r=this.left)):t==="right"?s?(r=this.left+o,i==="near"?p="right":i==="center"?(p="center",r-=l/2):(p="left",r-=l)):(r=this.left+d,i==="near"?p="left":i==="center"?(p="center",r+=l/2):(p="right",r=this.right)):p="right",{textAlign:p,x:r}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:i,top:s,width:o,height:u}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,s,o,u),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(o=>o.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,u;const d=(l,p,r)=>{!r.width||!r.color||(i.save(),i.lineWidth=r.width,i.strokeStyle=r.color,i.setLineDash(r.borderDash||[]),i.lineDashOffset=r.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(p.x,p.y),i.stroke(),i.restore())};if(t.display)for(o=0,u=s.length;o<u;++o){const l=s[o];t.drawOnChartArea&&d({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&d({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),u=i.display?o.width:0;if(!u)return;const d=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let p,r,f,a;this.isHorizontal()?(p=hr(e,this.left,u)-u/2,r=hr(e,this.right,d)+d/2,f=a=l):(f=hr(e,this.top,u)-u/2,a=hr(e,this.bottom,d)+d/2,p=r=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(p,f),t.lineTo(r,a),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&zl(i,s);const o=this.getLabelItems(e);for(const u of o){const d=u.options,l=u.font,p=u.label,r=u.textOffset;Sr(i,p,0,r,l,d)}s&&jl(i)}drawTitle(){const{ctx:e,options:{position:t,title:i,reverse:s}}=this;if(!i.display)return;const o=Gt(i.font),u=on(i.padding),d=i.align;let l=o.lineHeight/2;t==="bottom"||t==="center"||nt(t)?(l+=u.bottom,Tt(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=u.top;const{titleX:p,titleY:r,maxWidth:f,rotation:a}=G$(this,l,t,d);Sr(e,i.text,0,0,o,{color:i.color,maxWidth:f,rotation:a,textAlign:q$(d,t,s),textBaseline:"middle",translation:[p,r]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,i=qe(e.grid&&e.grid.z,-1),s=qe(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Cr.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let o,u;for(o=0,u=t.length;o<u;++o){const d=t[o];d[i]===this.id&&(!e||d.type===e)&&s.push(d)}return s}_resolveTickFontOptions(e){const t=this.options.ticks.setContext(this.getContext(e));return Gt(t.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class el{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let i;X$(t)&&(i=this.register(t));const s=this.items,o=e.id,u=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in s||(s[o]=e,K$(e,u,i),this.override&&$t.override(e.id,e.overrides)),u}get(e){return this.items[e]}unregister(e){const t=this.items,i=e.id,s=this.scope;i in t&&delete t[i],s&&i in $t[s]&&(delete $t[s][i],this.override&&delete xr[i])}}function K$(n,e,t){const i=ss(Object.create(null),[t?$t.get(t):{},$t.get(e),n.defaults]);$t.set(e,i),n.defaultRoutes&&Y$(e,n.defaultRoutes),n.descriptors&&$t.describe(e,n.descriptors)}function Y$(n,e){Object.keys(e).forEach(t=>{const i=t.split("."),s=i.pop(),o=[n].concat(i).join("."),u=e[t].split("."),d=u.pop(),l=u.join(".");$t.route(o,s,l,d)})}function X$(n){return"id"in n&&"defaults"in n}class Q${constructor(){this.controllers=new el(Qn,"datasets",!0),this.elements=new el(Zn,"elements"),this.plugins=new el(Object,"plugins"),this.scales=new el(Cr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(e,o,s):pt(s,u=>{const d=i||this._getRegistryForType(u);this._exec(e,d,u)})})}_exec(e,t,i){const s=Qf(e);xt(i["before"+s],[],i),t[e](i),xt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){const s=t.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return s}}var si=new Q$;class Z${constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=s?this._descriptors(e).filter(s):this._descriptors(e),u=this._notify(o,e,t,i);return t==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),u}_notify(e,t,i,s){s=s||{};for(const o of e){const u=o.plugin,d=u[i],l=[t,s,o.options];if(xt(d,l,u)===!1&&s.cancelable)return!1}return!0}invalidate(){et(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=qe(i.options&&i.options.plugins,{}),o=J$(i);return s===!1&&!t?[]:tI(e,o,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(o,u)=>o.filter(d=>!u.some(l=>d.plugin.id===l.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function J$(n){const e={},t=[],i=Object.keys(si.plugins.items);for(let o=0;o<i.length;o++)t.push(si.getPlugin(i[o]));const s=n.plugins||[];for(let o=0;o<s.length;o++){const u=s[o];t.indexOf(u)===-1&&(t.push(u),e[u.id]=!0)}return{plugins:t,localIds:e}}function eI(n,e){return!e&&n===!1?null:n===!0?{}:n}function tI(n,{plugins:e,localIds:t},i,s){const o=[],u=n.getContext();for(const d of e){const l=d.id,p=eI(i[l],s);p!==null&&o.push({plugin:d,options:nI(n.config,{plugin:d,local:t[l]},p,u)})}return o}function nI(n,{plugin:e,local:t},i,s){const o=n.pluginScopeKeys(e),u=n.getOptionScopes(i,o);return t&&e.defaults&&u.push(e.defaults),n.createResolver(u,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function gf(n,e){const t=$t.datasets[n]||{};return((e.datasets||{})[n]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function iI(n,e){let t=n;return n==="_index_"?t=e:n==="_value_"&&(t=e==="x"?"y":"x"),t}function rI(n,e){return n===e?"_index_":"_value_"}function c0(n){if(n==="x"||n==="y"||n==="r")return n}function oI(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function mf(n,...e){if(c0(n))return n;for(const t of e){const i=t.axis||oI(t.position)||n.length>1&&c0(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function u0(n,e,t){if(t[e+"AxisID"]===n)return{axis:e}}function sI(n,e){if(e.data&&e.data.datasets){const t=e.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(t.length)return u0(n,"x",t[0])||u0(n,"y",t[0])}return{}}function aI(n,e){const t=xr[n.type]||{scales:{}},i=e.scales||{},s=gf(n.type,e),o=Object.create(null);return Object.keys(i).forEach(u=>{const d=i[u];if(!nt(d))return console.error(`Invalid scale configuration for scale: ${u}`);if(d._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${u}`);const l=mf(u,d,sI(u,n),$t.scales[d.type]),p=rI(l,s),r=t.scales||{};o[u]=Ko(Object.create(null),[{axis:l},d,r[l],r[p]])}),n.data.datasets.forEach(u=>{const d=u.type||n.type,l=u.indexAxis||gf(d,e),r=(xr[d]||{}).scales||{};Object.keys(r).forEach(f=>{const a=iI(f,l),c=u[a+"AxisID"]||a;o[c]=o[c]||Object.create(null),Ko(o[c],[{axis:a},i[c],r[f]])})}),Object.keys(o).forEach(u=>{const d=o[u];Ko(d,[$t.scales[d.type],$t.scale])}),o}function Iw(n){const e=n.options||(n.options={});e.plugins=qe(e.plugins,{}),e.scales=aI(n,e)}function Ow(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function lI(n){return n=n||{},n.data=Ow(n.data),Iw(n),n}const h0=new Map,Dw=new Set;function tl(n,e){let t=h0.get(n);return t||(t=e(),h0.set(n,t),Dw.add(t)),t}const Po=(n,e,t)=>{const i=Qi(e,t);i!==void 0&&n.add(i)};class cI{constructor(e){this._config=lI(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Ow(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Iw(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return tl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return tl(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return tl(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return tl(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:o}=this,u=this._cachedScopes(e,i),d=u.get(t);if(d)return d;const l=new Set;t.forEach(r=>{e&&(l.add(e),r.forEach(f=>Po(l,e,f))),r.forEach(f=>Po(l,s,f)),r.forEach(f=>Po(l,xr[o]||{},f)),r.forEach(f=>Po(l,$t,f)),r.forEach(f=>Po(l,ff,f))});const p=Array.from(l);return p.length===0&&p.push(Object.create(null)),Dw.has(t)&&u.set(t,p),p}chartOptionScopes(){const{options:e,type:t}=this;return[e,xr[t]||{},$t.datasets[t]||{},{type:t},$t,ff]}resolveNamedOptions(e,t,i,s=[""]){const o={$shared:!0},{resolver:u,subPrefixes:d}=f0(this._resolverCache,e,s);let l=u;if(hI(u,t)){o.$shared=!1,i=Zi(i)?i():i;const p=this.createResolver(e,i,d);l=no(u,i,p)}for(const p of t)o[p]=l[p];return o}createResolver(e,t,i=[""],s){const{resolver:o}=f0(this._resolverCache,e,i);return nt(t)?no(o,t,void 0,s):o}}function f0(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let o=i.get(s);return o||(o={resolver:id(e,t),subPrefixes:t.filter(d=>!d.toLowerCase().includes("hover"))},i.set(s,o)),o}const uI=n=>nt(n)&&Object.getOwnPropertyNames(n).some(e=>Zi(n[e]));function hI(n,e){const{isScriptable:t,isIndexable:i}=pw(n);for(const s of e){const o=t(s),u=i(s),d=(u||o)&&n[s];if(o&&(Zi(d)||uI(d))||u&&Tt(d))return!0}return!1}var fI="4.4.8";const dI=["top","bottom","left","right","chartArea"];function d0(n,e){return n==="top"||n==="bottom"||dI.indexOf(n)===-1&&e==="x"}function p0(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function g0(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),xt(t&&t.onComplete,[n],e)}function pI(n){const e=n.chart,t=e.options.animation;xt(t&&t.onProgress,[n],e)}function Pw(n){return sd()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const wl={},m0=n=>{const e=Pw(n);return Object.values(wl).filter(t=>t.canvas===e).pop()};function gI(n,e,t){const i=Object.keys(n);for(const s of i){const o=+s;if(o>=e){const u=n[s];delete n[s],(t>0||o>e)&&(n[o+t]=u)}}}function mI(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}function nl(n,e,t){return n.options.clip?n[t]:e[t]}function yI(n,e){const{xScale:t,yScale:i}=n;return t&&i?{left:nl(t,e,"left"),right:nl(t,e,"right"),top:nl(i,e,"top"),bottom:nl(i,e,"bottom")}:e}class Ei{static register(...e){si.add(...e),y0()}static unregister(...e){si.remove(...e),y0()}constructor(e,t){const i=this.config=new cI(t),s=Pw(e),o=m0(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const u=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||O$(s)),this.platform.updateConfig(i);const d=this.platform.acquireContext(s,u.aspectRatio),l=d&&d.canvas,p=l&&l.height,r=l&&l.width;if(this.id=vR(),this.ctx=d,this.canvas=l,this.width=r,this.height=p,this._options=u,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Z$,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=DR(f=>this.update(f),u.resizeDelay||0),this._dataChanges=[],wl[this.id]=this,!d||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ci.listen(this,"complete",g0),Ci.listen(this,"progress",pI),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:o}=this;return et(e)?t&&o?o:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return si}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Fv(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Pv(this.canvas,this.ctx),this}stop(){return Ci.stop(this),this}resize(e,t){Ci.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,u=this.platform.getMaximumSize(s,e,t,o),d=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=u.width,this.height=u.height,this._aspectRatio=this.aspectRatio,Fv(this,d,!0)&&(this.notifyPlugins("resize",{size:u}),xt(i.onResize,[this,u],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};pt(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((u,d)=>(u[d]=!1,u),{});let o=[];t&&(o=o.concat(Object.keys(t).map(u=>{const d=t[u],l=mf(u,d),p=l==="r",r=l==="x";return{options:d,dposition:p?"chartArea":r?"bottom":"left",dtype:p?"radialLinear":r?"category":"linear"}}))),pt(o,u=>{const d=u.options,l=d.id,p=mf(l,d),r=qe(d.type,u.dtype);(d.position===void 0||d0(d.position,p)!==d0(u.dposition))&&(d.position=u.dposition),s[l]=!0;let f=null;if(l in i&&i[l].type===r)f=i[l];else{const a=si.getScale(r);f=new a({id:l,type:r,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(d,e)}),pt(s,(u,d)=>{u||delete i[d]}),pt(i,u=>{rn.configure(this,u,u.options),rn.addBox(this,u)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,o)=>s.index-o.index),i>t){for(let s=t;s<i;++s)this._destroyDatasetMeta(s);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(p0("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i<s;i++){const o=t[i];let u=this.getDatasetMeta(i);const d=o.type||this.config.type;if(u.type&&u.type!==d&&(this._destroyDatasetMeta(i),u=this.getDatasetMeta(i)),u.type=d,u.indexAxis=o.indexAxis||gf(d,this.options),u.order=o.order||0,u.index=i,u.label=""+o.label,u.visible=this.isDatasetVisible(i),u.controller)u.controller.updateIndex(i),u.controller.linkScales();else{const l=si.getController(d),{datasetElementType:p,dataElementType:r}=$t.datasets[d];Object.assign(l,{dataElementType:si.getElement(r),datasetElementType:p&&si.getElement(p)}),u.controller=new l(this,i),e.push(u.controller)}}return this._updateMetasets(),e}_resetElements(){pt(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let u=0;for(let p=0,r=this.data.datasets.length;p<r;p++){const{controller:f}=this.getDatasetMeta(p),a=!s&&o.indexOf(f)===-1;f.buildOrUpdateElements(a),u=Math.max(+f.getMaxOverflow(),u)}u=this._minPadding=i.layout.autoPadding?u:0,this._updateLayout(u),s||pt(o,p=>{p.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(p0("z","_idx"));const{_active:d,_lastEvent:l}=this;l?this._eventHandler(l,!0):d.length&&this._updateHoverStyles(d,d,!0),this.render()}_updateScales(){pt(this.scales,e=>{rn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Mv(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:o}of t){const u=i==="_removeElements"?-o:o;gI(e,s,u)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=o=>new Set(e.filter(u=>u[0]===o).map((u,d)=>d+","+u.splice(1).join(","))),s=i(0);for(let o=1;o<t;o++)if(!Mv(s,i(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;rn.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],pt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t<i;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,Zi(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const i=this.getDatasetMeta(e),s={meta:i,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(t),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ci.has(this)?this.attached&&!Ci.running(this)&&Ci.start(this):(this.draw(),g0({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,i=[];let s,o;for(s=0,o=t.length;s<o;++s){const u=t[s];(!e||u.visible)&&i.push(u)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,o=yI(e,this.chartArea),u={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",u)!==!1&&(s&&zl(t,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),e.controller.draw(),s&&jl(t),u.cancelable=!1,this.notifyPlugins("afterDatasetDraw",u))}isPointInArea(e){return Ii(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const o=d$.modes[t];return typeof o=="function"?o(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(o=>o&&o._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Ji(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",o=this.getDatasetMeta(e),u=o.controller._resolveAnimations(void 0,s);as(t)?(o.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),u.update(o,{visible:i}),this.update(d=>d.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Ci.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Pv(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete wl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,i=(o,u)=>{t.addEventListener(this,o,u),e[o]=u},s=(o,u,d)=>{o.offsetX=u,o.offsetY=d,this._eventHandler(o)};pt(this.options.events,o=>i(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(l,p)=>{t.addEventListener(this,l,p),e[l]=p},s=(l,p)=>{e[l]&&(t.removeEventListener(this,l,p),delete e[l])},o=(l,p)=>{this.canvas&&this.resize(l,p)};let u;const d=()=>{s("attach",d),this.attached=!0,this.resize(),i("resize",o),i("detach",u)};u=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),i("attach",d)},t.isAttached(this.canvas)?d():u()}unbindEvents(){pt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},pt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let o,u,d,l;for(t==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),d=0,l=e.length;d<l;++d){u=e[d];const p=u&&this.getDatasetMeta(u.datasetIndex).controller;p&&p[s+"HoverStyle"](u.element,u.datasetIndex,u.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],i=e.map(({datasetIndex:o,index:u})=>{const d=this.getDatasetMeta(o);if(!d)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:d.data[u],index:u}});!Sl(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,i){const s=this.options.hover,o=(l,p)=>l.filter(r=>!p.some(f=>r.datasetIndex===f.datasetIndex&&r.index===f.index)),u=o(t,e),d=i?e:o(e,t);u.length&&this.updateHoverStyle(u,s.mode,!1),d.length&&s.mode&&this.updateHoverStyle(d,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=u=>(u.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const o=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(o||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:o}=this,u=t,d=this._getActiveElements(e,s,i,u),l=AR(e),p=mI(e,this._lastEvent,i,l);i&&(this._lastEvent=null,xt(o.onHover,[e,d,this],this),l&&xt(o.onClick,[e,d,this],this));const r=!Sl(d,s);return(r||t)&&(this._active=d,this._updateHoverStyles(d,s,t)),this._lastEvent=p,r}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,s)}}Re(Ei,"defaults",$t),Re(Ei,"instances",wl),Re(Ei,"overrides",xr),Re(Ei,"registry",si),Re(Ei,"version",fI),Re(Ei,"getChart",m0);function y0(){return pt(Ei.instances,n=>n._plugins.invalidate())}function vI(n,e,t){const{startAngle:i,pixelMargin:s,x:o,y:u,outerRadius:d,innerRadius:l}=e;let p=s/d;n.beginPath(),n.arc(o,u,d,i-p,t+p),l>s?(p=s/l,n.arc(o,u,l,t+p,i-p,!0)):n.arc(o,u,s,t+Wt,i-Wt),n.closePath(),n.clip()}function bI(n){return nd(n,["outerStart","outerEnd","innerStart","innerEnd"])}function wI(n,e,t,i){const s=bI(n.options.borderRadius),o=(t-e)/2,u=Math.min(o,i*e/2),d=l=>{const p=(t-Math.min(o,l))*i/2;return Yt(l,0,Math.min(o,p))};return{outerStart:d(s.outerStart),outerEnd:d(s.outerEnd),innerStart:Yt(s.innerStart,0,u),innerEnd:Yt(s.innerEnd,0,u)}}function qr(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function Ll(n,e,t,i,s,o){const{x:u,y:d,startAngle:l,pixelMargin:p,innerRadius:r}=e,f=Math.max(e.outerRadius+i+t-p,0),a=r>0?r+i+t+p:0;let c=0;const h=s-l;if(i){const R=r>0?r-i:0,N=f>0?f-i:0,H=(R+N)/2,z=H!==0?h*H/(H+i):h;c=(h-z)/2}const m=Math.max(.001,h*f-t/kt)/f,y=(h-m)/2,v=l+y+c,w=s-y-c,{outerStart:k,outerEnd:_,innerStart:S,innerEnd:x}=wI(e,a,f,w-v),L=f-k,I=f-_,$=v+k/L,T=w-_/I,O=a+S,C=a+x,A=v+S/O,M=w-x/C;if(n.beginPath(),o){const R=($+T)/2;if(n.arc(u,d,f,$,R),n.arc(u,d,f,R,T),_>0){const Y=qr(I,T,u,d);n.arc(Y.x,Y.y,_,T,w+Wt)}const N=qr(C,w,u,d);if(n.lineTo(N.x,N.y),x>0){const Y=qr(C,M,u,d);n.arc(Y.x,Y.y,x,w+Wt,M+Math.PI)}const H=(w-x/a+(v+S/a))/2;if(n.arc(u,d,a,w-x/a,H,!0),n.arc(u,d,a,H,v+S/a,!0),S>0){const Y=qr(O,A,u,d);n.arc(Y.x,Y.y,S,A+Math.PI,v-Wt)}const z=qr(L,v,u,d);if(n.lineTo(z.x,z.y),k>0){const Y=qr(L,$,u,d);n.arc(Y.x,Y.y,k,v-Wt,$)}}else{n.moveTo(u,d);const R=Math.cos($)*f+u,N=Math.sin($)*f+d;n.lineTo(R,N);const H=Math.cos(T)*f+u,z=Math.sin(T)*f+d;n.lineTo(H,z)}n.closePath()}function _I(n,e,t,i,s){const{fullCircles:o,startAngle:u,circumference:d}=e;let l=e.endAngle;if(o){Ll(n,e,t,i,l,s);for(let p=0;p<o;++p)n.fill();isNaN(d)||(l=u+(d%Ct||Ct))}return Ll(n,e,t,i,l,s),n.fill(),l}function xI(n,e,t,i,s){const{fullCircles:o,startAngle:u,circumference:d,options:l}=e,{borderWidth:p,borderJoinStyle:r,borderDash:f,borderDashOffset:a}=l,c=l.borderAlign==="inner";if(!p)return;n.setLineDash(f||[]),n.lineDashOffset=a,c?(n.lineWidth=p*2,n.lineJoin=r||"round"):(n.lineWidth=p,n.lineJoin=r||"bevel");let h=e.endAngle;if(o){Ll(n,e,t,i,h,s);for(let m=0;m<o;++m)n.stroke();isNaN(d)||(h=u+(d%Ct||Ct))}c&&vI(n,e,h),o||(Ll(n,e,t,i,h,s),n.stroke())}class Uo extends Zn{constructor(t){super();Re(this,"circumference");Re(this,"endAngle");Re(this,"fullCircles");Re(this,"innerRadius");Re(this,"outerRadius");Re(this,"pixelMargin");Re(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,i,s){const o=this.getProps(["x","y"],s),{angle:u,distance:d}=rw(o,{x:t,y:i}),{startAngle:l,endAngle:p,innerRadius:r,outerRadius:f,circumference:a}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),c=(this.options.spacing+this.options.borderWidth)/2,h=qe(a,p-l),m=ls(u,l,p)&&l!==p,y=h>=Ct||m,v=Ti(d,r+c,f+c);return y&&v}getCenterPoint(t){const{x:i,y:s,startAngle:o,endAngle:u,innerRadius:d,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:p,spacing:r}=this.options,f=(o+u)/2,a=(d+l+r+p)/2;return{x:i+Math.cos(f)*a,y:s+Math.sin(f)*a}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:i,circumference:s}=this,o=(i.offset||0)/4,u=(i.spacing||0)/2,d=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>Ct?Math.floor(s/Ct):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*o,Math.sin(l)*o);const p=1-Math.sin(Math.min(kt,s||0)),r=o*p;t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor,_I(t,this,r,u,d),xI(t,this,r,u,d),t.restore()}}Re(Uo,"id","arc"),Re(Uo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Re(Uo,"defaultRoutes",{backgroundColor:"backgroundColor"}),Re(Uo,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"});function Bw(n,e,t=e){n.lineCap=qe(t.borderCapStyle,e.borderCapStyle),n.setLineDash(qe(t.borderDash,e.borderDash)),n.lineDashOffset=qe(t.borderDashOffset,e.borderDashOffset),n.lineJoin=qe(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=qe(t.borderWidth,e.borderWidth),n.strokeStyle=qe(t.borderColor,e.borderColor)}function SI(n,e,t){n.lineTo(t.x,t.y)}function AI(n){return n.stepped?GR:n.tension||n.cubicInterpolationMode==="monotone"?KR:SI}function Nw(n,e,t={}){const i=n.length,{start:s=0,end:o=i-1}=t,{start:u,end:d}=e,l=Math.max(s,u),p=Math.min(o,d),r=s<u&&o<u||s>d&&o>d;return{count:i,start:l,loop:e.loop,ilen:p<l&&!r?i+p-l:p-l}}function CI(n,e,t,i){const{points:s,options:o}=e,{count:u,start:d,loop:l,ilen:p}=Nw(s,t,i),r=AI(o);let{move:f=!0,reverse:a}=i||{},c,h,m;for(c=0;c<=p;++c)h=s[(d+(a?p-c:c))%u],!h.skip&&(f?(n.moveTo(h.x,h.y),f=!1):r(n,m,h,a,o.stepped),m=h);return l&&(h=s[(d+(a?p:0))%u],r(n,m,h,a,o.stepped)),!!l}function kI(n,e,t,i){const s=e.points,{count:o,start:u,ilen:d}=Nw(s,t,i),{move:l=!0,reverse:p}=i||{};let r=0,f=0,a,c,h,m,y,v;const w=_=>(u+(p?d-_:_))%o,k=()=>{m!==y&&(n.lineTo(r,y),n.lineTo(r,m),n.lineTo(r,v))};for(l&&(c=s[w(0)],n.moveTo(c.x,c.y)),a=0;a<=d;++a){if(c=s[w(a)],c.skip)continue;const _=c.x,S=c.y,x=_|0;x===h?(S<m?m=S:S>y&&(y=S),r=(f*r+_)/++f):(k(),n.lineTo(_,S),h=x,f=0,m=y=S),v=S}k()}function yf(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?kI:CI}function MI(n){return n.stepped?kT:n.tension||n.cubicInterpolationMode==="monotone"?MT:gr}function EI(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),Bw(n,e.options),n.stroke(s)}function LI(n,e,t,i){const{segments:s,options:o}=e,u=yf(e);for(const d of s)Bw(n,o,d.style),n.beginPath(),u(n,e,d,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const RI=typeof Path2D=="function";function TI(n,e,t,i){RI&&!e.options.segment?EI(n,e,t,i):LI(n,e,t,i)}class Ki extends Zn{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;vT(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=IT(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],o=this.points,u=Aw(this,{property:t,start:s,end:s});if(!u.length)return;const d=[],l=MI(i);let p,r;for(p=0,r=u.length;p<r;++p){const{start:f,end:a}=u[p],c=o[f],h=o[a];if(c===h){d.push(c);continue}const m=Math.abs((s-c[t])/(h[t]-c[t])),y=l(c,h,m,i.stepped);y[t]=e[t],d.push(y)}return d.length===1?d[0]:d}pathSegment(e,t,i){return yf(this)(e,this,t,i)}path(e,t,i){const s=this.segments,o=yf(this);let u=this._loop;t=t||0,i=i||this.points.length-t;for(const d of s)u&=o(e,this,d,{start:t,end:t+i-1});return!!u}draw(e,t,i,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),TI(e,this,i,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Re(Ki,"id","line"),Re(Ki,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Re(Ki,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Re(Ki,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function v0(n,e,t,i){const s=n.options,{[t]:o}=n.getProps([t],i);return Math.abs(e-o)<s.radius+s.hitRadius}class _l extends Zn{constructor(t){super();Re(this,"parsed");Re(this,"skip");Re(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,i,s){const o=this.options,{x:u,y:d}=this.getProps(["x","y"],s);return Math.pow(t-u,2)+Math.pow(i-d,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,i){return v0(this,t,"x",i)}inYRange(t,i){return v0(this,t,"y",i)}getCenterPoint(t){const{x:i,y:s}=this.getProps(["x","y"],t);return{x:i,y:s}}size(t){t=t||this.options||{};let i=t.radius||0;i=Math.max(i,i&&t.hoverRadius||0);const s=i&&t.borderWidth||0;return(i+s)*2}draw(t,i){const s=this.options;this.skip||s.radius<.1||!Ii(this,i,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,df(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}Re(_l,"id","point"),Re(_l,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Re(_l,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Fw(n,e){const{x:t,y:i,base:s,width:o,height:u}=n.getProps(["x","y","base","width","height"],e);let d,l,p,r,f;return n.horizontal?(f=u/2,d=Math.min(t,s),l=Math.max(t,s),p=i-f,r=i+f):(f=o/2,d=t-f,l=t+f,p=Math.min(i,s),r=Math.max(i,s)),{left:d,top:p,right:l,bottom:r}}function Yi(n,e,t,i){return n?0:Yt(e,t,i)}function $I(n,e,t){const i=n.options.borderWidth,s=n.borderSkipped,o=dw(i);return{t:Yi(s.top,o.top,0,t),r:Yi(s.right,o.right,0,e),b:Yi(s.bottom,o.bottom,0,t),l:Yi(s.left,o.left,0,e)}}function II(n,e,t){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,o=wr(s),u=Math.min(e,t),d=n.borderSkipped,l=i||nt(s);return{topLeft:Yi(!l||d.top||d.left,o.topLeft,0,u),topRight:Yi(!l||d.top||d.right,o.topRight,0,u),bottomLeft:Yi(!l||d.bottom||d.left,o.bottomLeft,0,u),bottomRight:Yi(!l||d.bottom||d.right,o.bottomRight,0,u)}}function OI(n){const e=Fw(n),t=e.right-e.left,i=e.bottom-e.top,s=$I(n,t/2,i/2),o=II(n,t/2,i/2);return{outer:{x:e.left,y:e.top,w:t,h:i,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Qh(n,e,t,i){const s=e===null,o=t===null,d=n&&!(s&&o)&&Fw(n,i);return d&&(s||Ti(e,d.left,d.right))&&(o||Ti(t,d.top,d.bottom))}function DI(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function PI(n,e){n.rect(e.x,e.y,e.w,e.h)}function Zh(n,e,t={}){const i=n.x!==t.x?-e:0,s=n.y!==t.y?-e:0,o=(n.x+n.w!==t.x+t.w?e:0)-i,u=(n.y+n.h!==t.y+t.h?e:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+o,h:n.h+u,radius:n.radius}}class xl extends Zn{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:i,backgroundColor:s}}=this,{inner:o,outer:u}=OI(this),d=DI(u.radius)?cs:PI;e.save(),(u.w!==o.w||u.h!==o.h)&&(e.beginPath(),d(e,Zh(u,t,o)),e.clip(),d(e,Zh(o,-t,u)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),d(e,Zh(o,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,i){return Qh(this,e,t,i)}inXRange(e,t){return Qh(this,e,null,t)}inYRange(e,t){return Qh(this,null,e,t)}getCenterPoint(e){const{x:t,y:i,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+s)/2:t,y:o?i:(i+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Re(xl,"id","bar"),Re(xl,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Re(xl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var BI=Object.freeze({__proto__:null,ArcElement:Uo,BarElement:xl,LineElement:Ki,PointElement:_l});const vf=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],b0=vf.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ww(n){return vf[n%vf.length]}function Hw(n){return b0[n%b0.length]}function NI(n,e){return n.borderColor=Ww(e),n.backgroundColor=Hw(e),++e}function FI(n,e){return n.backgroundColor=n.data.map(()=>Ww(e++)),e}function WI(n,e){return n.backgroundColor=n.data.map(()=>Hw(e++)),e}function HI(n){let e=0;return(t,i)=>{const s=n.getDatasetMeta(i).controller;s instanceof vr?e=FI(t,e):s instanceof Zo?e=WI(t,e):s&&(e=NI(t,e))}}function w0(n){let e;for(e in n)if(n[e].borderColor||n[e].backgroundColor)return!0;return!1}function zI(n){return n&&(n.borderColor||n.backgroundColor)}function jI(){return $t.borderColor!=="rgba(0,0,0,0.1)"||$t.backgroundColor!=="rgba(0,0,0,0.1)"}var UI={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,e,t){if(!t.enabled)return;const{data:{datasets:i},options:s}=n.config,{elements:o}=s,u=w0(i)||zI(s)||o&&w0(o)||jI();if(!t.forceOverride&&u)return;const d=HI(n);i.forEach(d)}};function VI(n,e,t,i,s){const o=s.samples||i;if(o>=t)return n.slice(e,e+t);const u=[],d=(t-2)/(o-2);let l=0;const p=e+t-1;let r=e,f,a,c,h,m;for(u[l++]=n[r],f=0;f<o-2;f++){let y=0,v=0,w;const k=Math.floor((f+1)*d)+1+e,_=Math.min(Math.floor((f+2)*d)+1,t)+e,S=_-k;for(w=k;w<_;w++)y+=n[w].x,v+=n[w].y;y/=S,v/=S;const x=Math.floor(f*d)+1+e,L=Math.min(Math.floor((f+1)*d)+1,t)+e,{x:I,y:$}=n[r];for(c=h=-1,w=x;w<L;w++)h=.5*Math.abs((I-y)*(n[w].y-$)-(I-n[w].x)*(v-$)),h>c&&(c=h,a=n[w],m=w);u[l++]=a,r=m}return u[l++]=n[p],u}function qI(n,e,t,i){let s=0,o=0,u,d,l,p,r,f,a,c,h,m;const y=[],v=e+t-1,w=n[e].x,_=n[v].x-w;for(u=e;u<e+t;++u){d=n[u],l=(d.x-w)/_*i,p=d.y;const S=l|0;if(S===r)p<h?(h=p,f=u):p>m&&(m=p,a=u),s=(o*s+d.x)/++o;else{const x=u-1;if(!et(f)&&!et(a)){const L=Math.min(f,a),I=Math.max(f,a);L!==c&&L!==x&&y.push({...n[L],x:s}),I!==c&&I!==x&&y.push({...n[I],x:s})}u>0&&x!==c&&y.push(n[x]),y.push(d),r=S,o=0,h=m=p,f=a=c=u}}return y}function zw(n){if(n._decimated){const e=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function _0(n){n.data.datasets.forEach(e=>{zw(e)})}function GI(n,e){const t=e.length;let i=0,s;const{iScale:o}=n,{min:u,max:d,minDefined:l,maxDefined:p}=o.getUserBounds();return l&&(i=Yt($i(e,o.axis,u).lo,0,t-1)),p?s=Yt($i(e,o.axis,d).hi+1,i,t)-i:s=t-i,{start:i,count:s}}var KI={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,e,t)=>{if(!t.enabled){_0(n);return}const i=n.width;n.data.datasets.forEach((s,o)=>{const{_data:u,indexAxis:d}=s,l=n.getDatasetMeta(o),p=u||s.data;if(zo([d,n.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const r=n.scales[l.xAxisID];if(r.type!=="linear"&&r.type!=="time"||n.options.parsing)return;let{start:f,count:a}=GI(l,p);const c=t.threshold||4*i;if(a<=c){zw(s);return}et(u)&&(s._data=p,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let h;switch(t.algorithm){case"lttb":h=VI(p,f,a,i,t);break;case"min-max":h=qI(p,f,a,i);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=h})},destroy(n){_0(n)}};function YI(n,e,t){const i=n.segments,s=n.points,o=e.points,u=[];for(const d of i){let{start:l,end:p}=d;p=cd(l,p,s);const r=bf(t,s[l],s[p],d.loop);if(!e.segments){u.push({source:d,target:r,start:s[l],end:s[p]});continue}const f=Aw(e,r);for(const a of f){const c=bf(t,o[a.start],o[a.end],a.loop),h=Sw(d,s,c);for(const m of h)u.push({source:m,target:a,start:{[t]:x0(r,c,"start",Math.max)},end:{[t]:x0(r,c,"end",Math.min)}})}}return u}function bf(n,e,t,i){if(i)return;let s=e[n],o=t[n];return n==="angle"&&(s=En(s),o=En(o)),{property:n,start:s,end:o}}function XI(n,e){const{x:t=null,y:i=null}=n||{},s=e.points,o=[];return e.segments.forEach(({start:u,end:d})=>{d=cd(u,d,s);const l=s[u],p=s[d];i!==null?(o.push({x:l.x,y:i}),o.push({x:p.x,y:i})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:p.y}))}),o}function cd(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function x0(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function jw(n,e){let t=[],i=!1;return Tt(n)?(i=!0,t=n):t=XI(n,e),t.length?new Ki({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function S0(n){return n&&n.fill!==!1}function QI(n,e,t){let s=n[e].fill;const o=[e];let u;if(!t)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!Bt(s))return s;if(u=n[s],!u)return!1;if(u.visible)return s;o.push(s),s=u.fill}return!1}function ZI(n,e,t){const i=nO(n);if(nt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Bt(s)&&Math.floor(s)===s?JI(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function JI(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function eO(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:nt(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function tO(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:nt(n)?i=n.value:i=e.getBaseValue(),i}function nO(n){const e=n.options,t=e.fill;let i=qe(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function iO(n){const{scale:e,index:t,line:i}=n,s=[],o=i.segments,u=i.points,d=rO(e,t);d.push(jw({x:null,y:e.bottom},i));for(let l=0;l<o.length;l++){const p=o[l];for(let r=p.start;r<=p.end;r++)oO(s,u[r],d)}return new Ki({points:s,options:{}})}function rO(n,e){const t=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const o=i[s];if(o.index===e)break;o.hidden||t.unshift(o.dataset)}return t}function oO(n,e,t){const i=[];for(let s=0;s<t.length;s++){const o=t[s],{first:u,last:d,point:l}=sO(o,e,"x");if(!(!l||u&&d)){if(u)i.unshift(l);else if(n.push(l),!d)break}}n.push(...i)}function sO(n,e,t){const i=n.interpolate(e,t);if(!i)return{};const s=i[t],o=n.segments,u=n.points;let d=!1,l=!1;for(let p=0;p<o.length;p++){const r=o[p],f=u[r.start][t],a=u[r.end][t];if(Ti(s,f,a)){d=s===f,l=s===a;break}}return{first:d,last:l,point:i}}class Uw{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,i){const{x:s,y:o,radius:u}=this;return t=t||{start:0,end:Ct},e.arc(s,o,u,t.end,t.start,!0),!i.bounds}interpolate(e){const{x:t,y:i,radius:s}=this,o=e.angle;return{x:t+Math.cos(o)*s,y:i+Math.sin(o)*s,angle:o}}}function aO(n){const{chart:e,fill:t,line:i}=n;if(Bt(t))return lO(e,t);if(t==="stack")return iO(n);if(t==="shape")return!0;const s=cO(n);return s instanceof Uw?s:jw(s,i)}function lO(n,e){const t=n.getDatasetMeta(e);return t&&n.isDatasetVisible(e)?t.dataset:null}function cO(n){return(n.scale||{}).getPointPositionForValue?hO(n):uO(n)}function uO(n){const{scale:e={},fill:t}=n,i=eO(t,e);if(Bt(i)){const s=e.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function hO(n){const{scale:e,fill:t}=n,i=e.options,s=e.getLabels().length,o=i.reverse?e.max:e.min,u=tO(t,e,o),d=[];if(i.grid.circular){const l=e.getPointPositionForValue(0,o);return new Uw({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(u)})}for(let l=0;l<s;++l)d.push(e.getPointPositionForValue(l,u));return d}function Jh(n,e,t){const i=aO(e),{line:s,scale:o,axis:u}=e,d=s.options,l=d.fill,p=d.backgroundColor,{above:r=p,below:f=p}=l||{};i&&s.points.length&&(zl(n,t),fO(n,{line:s,target:i,above:r,below:f,area:t,scale:o,axis:u}),jl(n))}function fO(n,e){const{line:t,target:i,above:s,below:o,area:u,scale:d}=e,l=t._loop?"angle":e.axis;n.save(),l==="x"&&o!==s&&(A0(n,i,u.top),C0(n,{line:t,target:i,color:s,scale:d,property:l}),n.restore(),n.save(),A0(n,i,u.bottom)),C0(n,{line:t,target:i,color:o,scale:d,property:l}),n.restore()}function A0(n,e,t){const{segments:i,points:s}=e;let o=!0,u=!1;n.beginPath();for(const d of i){const{start:l,end:p}=d,r=s[l],f=s[cd(l,p,s)];o?(n.moveTo(r.x,r.y),o=!1):(n.lineTo(r.x,t),n.lineTo(r.x,r.y)),u=!!e.pathSegment(n,d,{move:u}),u?n.closePath():n.lineTo(f.x,t)}n.lineTo(e.first().x,t),n.closePath(),n.clip()}function C0(n,e){const{line:t,target:i,property:s,color:o,scale:u}=e,d=YI(t,i,s);for(const{source:l,target:p,start:r,end:f}of d){const{style:{backgroundColor:a=o}={}}=l,c=i!==!0;n.save(),n.fillStyle=a,dO(n,u,c&&bf(s,r,f)),n.beginPath();const h=!!t.pathSegment(n,l);let m;if(c){h?n.closePath():k0(n,i,f,s);const y=!!i.pathSegment(n,p,{move:h,reverse:!0});m=h&&y,m||k0(n,i,r,s)}n.closePath(),n.fill(m?"evenodd":"nonzero"),n.restore()}}function dO(n,e,t){const{top:i,bottom:s}=e.chart.chartArea,{property:o,start:u,end:d}=t||{};o==="x"&&(n.beginPath(),n.rect(u,i,d-u,s-i),n.clip())}function k0(n,e,t,i){const s=e.interpolate(t,i);s&&n.lineTo(s.x,s.y)}var pO={id:"filler",afterDatasetsUpdate(n,e,t){const i=(n.data.datasets||[]).length,s=[];let o,u,d,l;for(u=0;u<i;++u)o=n.getDatasetMeta(u),d=o.dataset,l=null,d&&d.options&&d instanceof Ki&&(l={visible:n.isDatasetVisible(u),index:u,fill:ZI(d,u,i),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:d}),o.$filler=l,s.push(l);for(u=0;u<i;++u)l=s[u],!(!l||l.fill===!1)&&(l.fill=QI(s,u,t.propagate))},beforeDraw(n,e,t){const i=t.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let u=s.length-1;u>=0;--u){const d=s[u].$filler;d&&(d.line.updateControlPoints(o,d.axis),i&&d.fill&&Jh(n.ctx,d,o))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;S0(o)&&Jh(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!S0(i)||t.drawTime!=="beforeDatasetDraw"||Jh(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const M0=(n,e)=>{let{boxHeight:t=e,boxWidth:i=e}=n;return n.usePointStyle&&(t=Math.min(t,e),i=n.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:t,itemHeight:Math.max(e,t)}},gO=(n,e)=>n!==null&&e!==null&&n.datasetIndex===e.datasetIndex&&n.index===e.index;class E0 extends Zn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,i){this.maxWidth=e,this.maxHeight=t,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=xt(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(i=>e.filter(i,this.chart.data))),e.sort&&(t=t.sort((i,s)=>e.sort(i,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,s=Gt(i.font),o=s.size,u=this._computeTitleHeight(),{boxWidth:d,itemHeight:l}=M0(i,o);let p,r;t.font=s.string,this.isHorizontal()?(p=this.maxWidth,r=this._fitRows(u,o,d,l)+10):(r=this.maxHeight,p=this._fitCols(u,s,d,l)+10),this.width=Math.min(p,e.maxWidth||this.maxWidth),this.height=Math.min(r,e.maxHeight||this.maxHeight)}_fitRows(e,t,i,s){const{ctx:o,maxWidth:u,options:{labels:{padding:d}}}=this,l=this.legendHitBoxes=[],p=this.lineWidths=[0],r=s+d;let f=e;o.textAlign="left",o.textBaseline="middle";let a=-1,c=-r;return this.legendItems.forEach((h,m)=>{const y=i+t/2+o.measureText(h.text).width;(m===0||p[p.length-1]+y+2*d>u)&&(f+=r,p[p.length-(m>0?0:1)]=0,c+=r,a++),l[m]={left:0,top:c,row:a,width:y,height:s},p[p.length-1]+=y+d}),f}_fitCols(e,t,i,s){const{ctx:o,maxHeight:u,options:{labels:{padding:d}}}=this,l=this.legendHitBoxes=[],p=this.columnSizes=[],r=u-e;let f=d,a=0,c=0,h=0,m=0;return this.legendItems.forEach((y,v)=>{const{itemWidth:w,itemHeight:k}=mO(i,t,o,y,s);v>0&&c+k+2*d>r&&(f+=a+d,p.push({width:a,height:c}),h+=a+d,m++,a=c=0),l[v]={left:h,top:c,col:m,width:w,height:k},a=Math.max(a,w),c+=k+d}),f+=a,p.push({width:a,height:c}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:i,labels:{padding:s},rtl:o}}=this,u=Qr(o,this.left,this.width);if(this.isHorizontal()){let d=0,l=nn(i,this.left+s,this.right-this.lineWidths[d]);for(const p of t)d!==p.row&&(d=p.row,l=nn(i,this.left+s,this.right-this.lineWidths[d])),p.top+=this.top+e+s,p.left=u.leftForLtr(u.x(l),p.width),l+=p.width+s}else{let d=0,l=nn(i,this.top+e+s,this.bottom-this.columnSizes[d].height);for(const p of t)p.col!==d&&(d=p.col,l=nn(i,this.top+e+s,this.bottom-this.columnSizes[d].height)),p.top=l,p.left+=this.left+s,p.left=u.leftForLtr(u.x(p.left),p.width),l+=p.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;zl(e,this),this._draw(),jl(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:i,ctx:s}=this,{align:o,labels:u}=e,d=$t.color,l=Qr(e.rtl,this.left,this.width),p=Gt(u.font),{padding:r}=u,f=p.size,a=f/2;let c;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=p.string;const{boxWidth:h,boxHeight:m,itemHeight:y}=M0(u,f),v=function(x,L,I){if(isNaN(h)||h<=0||isNaN(m)||m<0)return;s.save();const $=qe(I.lineWidth,1);if(s.fillStyle=qe(I.fillStyle,d),s.lineCap=qe(I.lineCap,"butt"),s.lineDashOffset=qe(I.lineDashOffset,0),s.lineJoin=qe(I.lineJoin,"miter"),s.lineWidth=$,s.strokeStyle=qe(I.strokeStyle,d),s.setLineDash(qe(I.lineDash,[])),u.usePointStyle){const T={radius:m*Math.SQRT2/2,pointStyle:I.pointStyle,rotation:I.rotation,borderWidth:$},O=l.xPlus(x,h/2),C=L+a;fw(s,T,O,C,u.pointStyleWidth&&h)}else{const T=L+Math.max((f-m)/2,0),O=l.leftForLtr(x,h),C=wr(I.borderRadius);s.beginPath(),Object.values(C).some(A=>A!==0)?cs(s,{x:O,y:T,w:h,h:m,radius:C}):s.rect(O,T,h,m),s.fill(),$!==0&&s.stroke()}s.restore()},w=function(x,L,I){Sr(s,I.text,x,L+y/2,p,{strikethrough:I.hidden,textAlign:l.textAlign(I.textAlign)})},k=this.isHorizontal(),_=this._computeTitleHeight();k?c={x:nn(o,this.left+r,this.right-i[0]),y:this.top+r+_,line:0}:c={x:this.left+r,y:nn(o,this.top+_+r,this.bottom-t[0].height),line:0},ww(this.ctx,e.textDirection);const S=y+r;this.legendItems.forEach((x,L)=>{s.strokeStyle=x.fontColor,s.fillStyle=x.fontColor;const I=s.measureText(x.text).width,$=l.textAlign(x.textAlign||(x.textAlign=u.textAlign)),T=h+a+I;let O=c.x,C=c.y;l.setWidth(this.width),k?L>0&&O+T+r>this.right&&(C=c.y+=S,c.line++,O=c.x=nn(o,this.left+r,this.right-i[c.line])):L>0&&C+S>this.bottom&&(O=c.x=O+t[c.line].width+r,c.line++,C=c.y=nn(o,this.top+_+r,this.bottom-t[c.line].height));const A=l.x(O);if(v(A,C,x),O=PR($,O+h+a,k?O+T:this.right,e.rtl),w(l.x(O),C,x),k)c.x+=T+r;else if(typeof x.text!="string"){const M=p.lineHeight;c.y+=Vw(x,M)+r}else c.y+=S}),_w(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,i=Gt(t.font),s=on(t.padding);if(!t.display)return;const o=Qr(e.rtl,this.left,this.width),u=this.ctx,d=t.position,l=i.size/2,p=s.top+l;let r,f=this.left,a=this.width;if(this.isHorizontal())a=Math.max(...this.lineWidths),r=this.top+p,f=nn(e.align,f,this.right-a);else{const h=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);r=p+nn(e.align,this.top,this.bottom-h-e.labels.padding-this._computeTitleHeight())}const c=nn(d,f,f+a);u.textAlign=o.textAlign(ed(d)),u.textBaseline="middle",u.strokeStyle=t.color,u.fillStyle=t.color,u.font=i.string,Sr(u,t.text,c,r,i)}_computeTitleHeight(){const e=this.options.title,t=Gt(e.font),i=on(e.padding);return e.display?t.lineHeight+i.height:0}_getLegendItemAt(e,t){let i,s,o;if(Ti(e,this.left,this.right)&&Ti(t,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],Ti(e,s.left,s.left+s.width)&&Ti(t,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(e){const t=this.options;if(!bO(e.type,t))return;const i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,o=gO(s,i);s&&!o&&xt(t.onLeave,[e,s,this],this),this._hoveredItem=i,i&&!o&&xt(t.onHover,[e,i,this],this)}else i&&xt(t.onClick,[e,i,this],this)}}function mO(n,e,t,i,s){const o=yO(i,n,e,t),u=vO(s,i,e.lineHeight);return{itemWidth:o,itemHeight:u}}function yO(n,e,t,i){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((o,u)=>o.length>u.length?o:u)),e+t.size/2+i.measureText(s).width}function vO(n,e,t){let i=n;return typeof e.text!="string"&&(i=Vw(e,t)),i}function Vw(n,e){const t=n.text?n.text.length:0;return e*t}function bO(n,e){return!!((n==="mousemove"||n==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(n==="click"||n==="mouseup"))}var wO={id:"legend",_element:E0,start(n,e,t){const i=n.legend=new E0({ctx:n.ctx,options:t,chart:n});rn.configure(n,i,t),rn.addBox(n,i)},stop(n){rn.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,e,t){const i=n.legend;rn.configure(n,i,t),i.options=t},afterUpdate(n){const e=n.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(n,e){e.replay||n.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,e,t){const i=e.datasetIndex,s=t.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const e=n.data.datasets,{labels:{usePointStyle:t,pointStyle:i,textAlign:s,color:o,useBorderRadius:u,borderRadius:d}}=n.legend.options;return n._getSortedDatasetMetas().map(l=>{const p=l.controller.getStyle(t?0:void 0),r=on(p.borderWidth);return{text:e[l.index].label,fillStyle:p.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:p.borderCapStyle,lineDash:p.borderDash,lineDashOffset:p.borderDashOffset,lineJoin:p.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:p.borderColor,pointStyle:i||p.pointStyle,rotation:p.rotation,textAlign:s||p.textAlign,borderRadius:u&&(d||p.borderRadius),datasetIndex:l.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class ud extends Zn{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;const s=Tt(i.text)?i.text.length:1;this._padding=on(i.padding);const o=s*Gt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:t,left:i,bottom:s,right:o,options:u}=this,d=u.align;let l=0,p,r,f;return this.isHorizontal()?(r=nn(d,i,o),f=t+e,p=o-i):(u.position==="left"?(r=i+e,f=nn(d,s,t),l=kt*-.5):(r=o-e,f=nn(d,t,s),l=kt*.5),p=s-t),{titleX:r,titleY:f,maxWidth:p,rotation:l}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const i=Gt(t.font),o=i.lineHeight/2+this._padding.top,{titleX:u,titleY:d,maxWidth:l,rotation:p}=this._drawArgs(o);Sr(e,t.text,0,0,i,{color:t.color,maxWidth:l,rotation:p,textAlign:ed(t.align),textBaseline:"middle",translation:[u,d]})}}function _O(n,e){const t=new ud({ctx:n.ctx,options:e,chart:n});rn.configure(n,t,e),rn.addBox(n,t),n.titleBlock=t}var xO={id:"title",_element:ud,start(n,e,t){_O(n,t)},stop(n){const e=n.titleBlock;rn.removeBox(n,e),delete n.titleBlock},beforeUpdate(n,e,t){const i=n.titleBlock;rn.configure(n,i,t),i.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const il=new WeakMap;var SO={id:"subtitle",start(n,e,t){const i=new ud({ctx:n.ctx,options:t,chart:n});rn.configure(n,i,t),rn.addBox(n,i),il.set(n,i)},stop(n){rn.removeBox(n,il.get(n)),il.delete(n)},beforeUpdate(n,e,t){const i=il.get(n);rn.configure(n,i,t),i.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Vo={average(n){if(!n.length)return!1;let e,t,i=new Set,s=0,o=0;for(e=0,t=n.length;e<t;++e){const d=n[e].element;if(d&&d.hasValue()){const l=d.tooltipPosition();i.add(l.x),s+=l.y,++o}}return o===0||i.size===0?!1:{x:[...i].reduce((d,l)=>d+l)/i.size,y:s/o}},nearest(n,e){if(!n.length)return!1;let t=e.x,i=e.y,s=Number.POSITIVE_INFINITY,o,u,d;for(o=0,u=n.length;o<u;++o){const l=n[o].element;if(l&&l.hasValue()){const p=l.getCenterPoint(),r=hf(e,p);r<s&&(s=r,d=l)}}if(d){const l=d.tooltipPosition();t=l.x,i=l.y}return{x:t,y:i}}};function oi(n,e){return e&&(Tt(e)?Array.prototype.push.apply(n,e):n.push(e)),n}function ki(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
1468
|
+
`)>-1?n.split(`
|
|
1469
|
+
`):n}function AO(n,e){const{element:t,datasetIndex:i,index:s}=e,o=n.getDatasetMeta(i).controller,{label:u,value:d}=o.getLabelAndValue(s);return{chart:n,label:u,parsed:o.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:d,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function L0(n,e){const t=n.chart.ctx,{body:i,footer:s,title:o}=n,{boxWidth:u,boxHeight:d}=e,l=Gt(e.bodyFont),p=Gt(e.titleFont),r=Gt(e.footerFont),f=o.length,a=s.length,c=i.length,h=on(e.padding);let m=h.height,y=0,v=i.reduce((_,S)=>_+S.before.length+S.lines.length+S.after.length,0);if(v+=n.beforeBody.length+n.afterBody.length,f&&(m+=f*p.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),v){const _=e.displayColors?Math.max(d,l.lineHeight):l.lineHeight;m+=c*_+(v-c)*l.lineHeight+(v-1)*e.bodySpacing}a&&(m+=e.footerMarginTop+a*r.lineHeight+(a-1)*e.footerSpacing);let w=0;const k=function(_){y=Math.max(y,t.measureText(_).width+w)};return t.save(),t.font=p.string,pt(n.title,k),t.font=l.string,pt(n.beforeBody.concat(n.afterBody),k),w=e.displayColors?u+2+e.boxPadding:0,pt(i,_=>{pt(_.before,k),pt(_.lines,k),pt(_.after,k)}),w=0,t.font=r.string,pt(n.footer,k),t.restore(),y+=h.width,{width:y,height:m}}function CO(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function kO(n,e,t,i){const{x:s,width:o}=i,u=t.caretSize+t.caretPadding;if(n==="left"&&s+o+u>e.width||n==="right"&&s-o-u<0)return!0}function MO(n,e,t,i){const{x:s,width:o}=t,{width:u,chartArea:{left:d,right:l}}=n;let p="center";return i==="center"?p=s<=(d+l)/2?"left":"right":s<=o/2?p="left":s>=u-o/2&&(p="right"),kO(p,n,e,t)&&(p="center"),p}function R0(n,e,t){const i=t.yAlign||e.yAlign||CO(n,t);return{xAlign:t.xAlign||e.xAlign||MO(n,e,t,i),yAlign:i}}function EO(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function LO(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function T0(n,e,t,i){const{caretSize:s,caretPadding:o,cornerRadius:u}=n,{xAlign:d,yAlign:l}=t,p=s+o,{topLeft:r,topRight:f,bottomLeft:a,bottomRight:c}=wr(u);let h=EO(e,d);const m=LO(e,l,p);return l==="center"?d==="left"?h+=p:d==="right"&&(h-=p):d==="left"?h-=Math.max(r,a)+s:d==="right"&&(h+=Math.max(f,c)+s),{x:Yt(h,0,i.width-e.width),y:Yt(m,0,i.height-e.height)}}function rl(n,e,t){const i=on(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function $0(n){return oi([],ki(n))}function RO(n,e,t){return Ji(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function I0(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}const qw={beforeTitle:Ai,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return t[e.dataIndex]}return""},afterTitle:Ai,beforeBody:Ai,beforeLabel:Ai,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let e=n.dataset.label||"";e&&(e+=": ");const t=n.formattedValue;return et(t)||(e+=t),e},labelColor(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Ai,afterBody:Ai,beforeFooter:Ai,footer:Ai,afterFooter:Ai};function pn(n,e,t,i){const s=n[e].call(t,i);return typeof s>"u"?qw[e].call(t,i):s}class wf extends Zn{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,o=new Cw(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=RO(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=pn(i,"beforeTitle",this,e),o=pn(i,"title",this,e),u=pn(i,"afterTitle",this,e);let d=[];return d=oi(d,ki(s)),d=oi(d,ki(o)),d=oi(d,ki(u)),d}getBeforeBody(e,t){return $0(pn(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:i}=t,s=[];return pt(e,o=>{const u={before:[],lines:[],after:[]},d=I0(i,o);oi(u.before,ki(pn(d,"beforeLabel",this,o))),oi(u.lines,pn(d,"label",this,o)),oi(u.after,ki(pn(d,"afterLabel",this,o))),s.push(u)}),s}getAfterBody(e,t){return $0(pn(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:i}=t,s=pn(i,"beforeFooter",this,e),o=pn(i,"footer",this,e),u=pn(i,"afterFooter",this,e);let d=[];return d=oi(d,ki(s)),d=oi(d,ki(o)),d=oi(d,ki(u)),d}_createItems(e){const t=this._active,i=this.chart.data,s=[],o=[],u=[];let d=[],l,p;for(l=0,p=t.length;l<p;++l)d.push(AO(this.chart,t[l]));return e.filter&&(d=d.filter((r,f,a)=>e.filter(r,f,a,i))),e.itemSort&&(d=d.sort((r,f)=>e.itemSort(r,f,i))),pt(d,r=>{const f=I0(e.callbacks,r);s.push(pn(f,"labelColor",this,r)),o.push(pn(f,"labelPointStyle",this,r)),u.push(pn(f,"labelTextColor",this,r))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=u,this.dataPoints=d,d}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let o,u=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const d=Vo[i.position].call(this,s,this._eventPosition);u=this._createItems(i),this.title=this.getTitle(u,i),this.beforeBody=this.getBeforeBody(u,i),this.body=this.getBody(u,i),this.afterBody=this.getAfterBody(u,i),this.footer=this.getFooter(u,i);const l=this._size=L0(this,i),p=Object.assign({},d,l),r=R0(this.chart,i,p),f=T0(i,p,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:d.x,caretY:d.y}}this._tooltipItems=u,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const o=this.getCaretPosition(e,i,s);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:o}=this,{caretSize:u,cornerRadius:d}=i,{topLeft:l,topRight:p,bottomLeft:r,bottomRight:f}=wr(d),{x:a,y:c}=e,{width:h,height:m}=t;let y,v,w,k,_,S;return o==="center"?(_=c+m/2,s==="left"?(y=a,v=y-u,k=_+u,S=_-u):(y=a+h,v=y+u,k=_-u,S=_+u),w=y):(s==="left"?v=a+Math.max(l,r)+u:s==="right"?v=a+h-Math.max(p,f)-u:v=this.caretX,o==="top"?(k=c,_=k-u,y=v-u,w=v+u):(k=c+m,_=k+u,y=v+u,w=v-u),S=k),{x1:y,x2:v,x3:w,y1:k,y2:_,y3:S}}drawTitle(e,t,i){const s=this.title,o=s.length;let u,d,l;if(o){const p=Qr(i.rtl,this.x,this.width);for(e.x=rl(this,i.titleAlign,i),t.textAlign=p.textAlign(i.titleAlign),t.textBaseline="middle",u=Gt(i.titleFont),d=i.titleSpacing,t.fillStyle=i.titleColor,t.font=u.string,l=0;l<o;++l)t.fillText(s[l],p.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+d,l+1===o&&(e.y+=i.titleMarginBottom-d)}}_drawColorBox(e,t,i,s,o){const u=this.labelColors[i],d=this.labelPointStyles[i],{boxHeight:l,boxWidth:p}=o,r=Gt(o.bodyFont),f=rl(this,"left",o),a=s.x(f),c=l<r.lineHeight?(r.lineHeight-l)/2:0,h=t.y+c;if(o.usePointStyle){const m={radius:Math.min(p,l)/2,pointStyle:d.pointStyle,rotation:d.rotation,borderWidth:1},y=s.leftForLtr(a,p)+p/2,v=h+l/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,df(e,m,y,v),e.strokeStyle=u.borderColor,e.fillStyle=u.backgroundColor,df(e,m,y,v)}else{e.lineWidth=nt(u.borderWidth)?Math.max(...Object.values(u.borderWidth)):u.borderWidth||1,e.strokeStyle=u.borderColor,e.setLineDash(u.borderDash||[]),e.lineDashOffset=u.borderDashOffset||0;const m=s.leftForLtr(a,p),y=s.leftForLtr(s.xPlus(a,1),p-2),v=wr(u.borderRadius);Object.values(v).some(w=>w!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,cs(e,{x:m,y:h,w:p,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=u.backgroundColor,e.beginPath(),cs(e,{x:y,y:h+1,w:p-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(m,h,p,l),e.strokeRect(m,h,p,l),e.fillStyle=u.backgroundColor,e.fillRect(y,h+1,p-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:o,bodyAlign:u,displayColors:d,boxHeight:l,boxWidth:p,boxPadding:r}=i,f=Gt(i.bodyFont);let a=f.lineHeight,c=0;const h=Qr(i.rtl,this.x,this.width),m=function(I){t.fillText(I,h.x(e.x+c),e.y+a/2),e.y+=a+o},y=h.textAlign(u);let v,w,k,_,S,x,L;for(t.textAlign=u,t.textBaseline="middle",t.font=f.string,e.x=rl(this,y,i),t.fillStyle=i.bodyColor,pt(this.beforeBody,m),c=d&&y!=="right"?u==="center"?p/2+r:p+2+r:0,_=0,x=s.length;_<x;++_){for(v=s[_],w=this.labelTextColors[_],t.fillStyle=w,pt(v.before,m),k=v.lines,d&&k.length&&(this._drawColorBox(t,e,_,h,i),a=Math.max(f.lineHeight,l)),S=0,L=k.length;S<L;++S)m(k[S]),a=f.lineHeight;pt(v.after,m)}c=0,a=f.lineHeight,pt(this.afterBody,m),e.y-=o}drawFooter(e,t,i){const s=this.footer,o=s.length;let u,d;if(o){const l=Qr(i.rtl,this.x,this.width);for(e.x=rl(this,i.footerAlign,i),e.y+=i.footerMarginTop,t.textAlign=l.textAlign(i.footerAlign),t.textBaseline="middle",u=Gt(i.footerFont),t.fillStyle=i.footerColor,t.font=u.string,d=0;d<o;++d)t.fillText(s[d],l.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+i.footerSpacing}}drawBackground(e,t,i,s){const{xAlign:o,yAlign:u}=this,{x:d,y:l}=e,{width:p,height:r}=i,{topLeft:f,topRight:a,bottomLeft:c,bottomRight:h}=wr(s.cornerRadius);t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.beginPath(),t.moveTo(d+f,l),u==="top"&&this.drawCaret(e,t,i,s),t.lineTo(d+p-a,l),t.quadraticCurveTo(d+p,l,d+p,l+a),u==="center"&&o==="right"&&this.drawCaret(e,t,i,s),t.lineTo(d+p,l+r-h),t.quadraticCurveTo(d+p,l+r,d+p-h,l+r),u==="bottom"&&this.drawCaret(e,t,i,s),t.lineTo(d+c,l+r),t.quadraticCurveTo(d,l+r,d,l+r-c),u==="center"&&o==="left"&&this.drawCaret(e,t,i,s),t.lineTo(d,l+f),t.quadraticCurveTo(d,l,d+f,l),t.closePath(),t.fill(),s.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,o=i&&i.y;if(s||o){const u=Vo[e.position].call(this,this._active,this._eventPosition);if(!u)return;const d=this._size=L0(this,e),l=Object.assign({},u,this._size),p=R0(t,e,l),r=T0(e,l,p,t);(s._to!==r.x||o._to!==r.y)&&(this.xAlign=p.xAlign,this.yAlign=p.yAlign,this.width=d.width,this.height=d.height,this.caretX=u.x,this.caretY=u.y,this._resolveAnimations().update(this,r))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const u=on(t.padding),d=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&d&&(e.save(),e.globalAlpha=i,this.drawBackground(o,e,s,t),ww(e,t.textDirection),o.y+=u.top,this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),_w(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:d,index:l})=>{const p=this.chart.getDatasetMeta(d);if(!p)throw new Error("Cannot find a dataset at index "+d);return{datasetIndex:d,element:p.data[l],index:l}}),o=!Sl(i,s),u=this._positionChanged(s,t);(o||u)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],u=this._getActiveElements(e,o,t,i),d=this._positionChanged(u,e),l=t||!Sl(u,o)||d;return l&&(this._active=u,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),l}_getActiveElements(e,t,i,s){const o=this.options;if(e.type==="mouseout")return[];if(!s)return t.filter(d=>this.chart.data.datasets[d.datasetIndex]&&this.chart.getDatasetMeta(d.datasetIndex).controller.getParsed(d.index)!==void 0);const u=this.chart.getElementsAtEventForMode(e,o.mode,o,i);return o.reverse&&u.reverse(),u}_positionChanged(e,t){const{caretX:i,caretY:s,options:o}=this,u=Vo[o.position].call(this,e,t);return u!==!1&&(i!==u.x||s!==u.y)}}Re(wf,"positioners",Vo);var TO={id:"tooltip",_element:wf,positioners:Vo,afterInit(n,e,t){t&&(n.tooltip=new wf({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0})===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:qw},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},$O=Object.freeze({__proto__:null,Colors:UI,Decimation:KI,Filler:pO,Legend:wO,SubTitle:SO,Title:xO,Tooltip:TO});const IO=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function OO(n,e,t,i){const s=n.indexOf(e);if(s===-1)return IO(n,e,t,i);const o=n.lastIndexOf(e);return s!==o?t:s}const DO=(n,e)=>n===null?null:Yt(Math.round(n),0,e);function O0(n){const e=this.getLabels();return n>=0&&n<e.length?e[n]:n}class _f extends Cr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:o}of t)i[s]===o&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(et(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:OO(i,e,qe(t,e),this._addedLabels),DO(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let o=this.getLabels();o=e===0&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let u=e;u<=t;u++)s.push({value:u});return s}getLabelForValue(e){return O0.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Re(_f,"id","category"),Re(_f,"defaults",{ticks:{callback:O0}});function PO(n,e){const t=[],{bounds:s,step:o,min:u,max:d,precision:l,count:p,maxTicks:r,maxDigits:f,includeBounds:a}=n,c=o||1,h=r-1,{min:m,max:y}=e,v=!et(u),w=!et(d),k=!et(p),_=(y-m)/(f+1);let S=Lv((y-m)/h/c)*c,x,L,I,$;if(S<1e-14&&!v&&!w)return[{value:m},{value:y}];$=Math.ceil(y/S)-Math.floor(m/S),$>h&&(S=Lv($*S/h/c)*c),et(l)||(x=Math.pow(10,l),S=Math.ceil(S*x)/x),s==="ticks"?(L=Math.floor(m/S)*S,I=Math.ceil(y/S)*S):(L=m,I=y),v&&w&&o&&LR((d-u)/o,S/1e3)?($=Math.round(Math.min((d-u)/S,r)),S=(d-u)/$,L=u,I=d):k?(L=v?u:L,I=w?d:I,$=p-1,S=(I-L)/$):($=(I-L)/S,Yo($,Math.round($),S/1e3)?$=Math.round($):$=Math.ceil($));const T=Math.max(Rv(S),Rv(L));x=Math.pow(10,et(l)?T:l),L=Math.round(L*x)/x,I=Math.round(I*x)/x;let O=0;for(v&&(a&&L!==u?(t.push({value:u}),L<u&&O++,Yo(Math.round((L+O*S)*x)/x,u,D0(u,_,n))&&O++):L<u&&O++);O<$;++O){const C=Math.round((L+O*S)*x)/x;if(w&&C>d)break;t.push({value:C})}return w&&a&&I!==d?t.length&&Yo(t[t.length-1].value,d,D0(d,_,n))?t[t.length-1].value=d:t.push({value:d}):(!w||I===d)&&t.push({value:I}),t}function D0(n,e,{horizontal:t,minRotation:i}){const s=Xn(i),o=(t?Math.sin(s):Math.cos(s))||.001,u=.75*e*(""+n).length;return Math.min(e/o,u)}class Rl extends Cr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return et(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const u=l=>s=t?s:l,d=l=>o=i?o:l;if(e){const l=hi(s),p=hi(o);l<0&&p<0?d(0):l>0&&p>0&&u(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);d(o+l),e||u(s-l)}this.min=s,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,u=PO(s,o);return e.bounds==="ticks"&&iw(u,this,"value"),e.reverse?(u.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),u}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return ws(e,this.chart.options.locale,this.options.ticks.format)}}class xf extends Rl{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Bt(e)?e:0,this.max=Bt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Xn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Re(xf,"id","linear"),Re(xf,"defaults",{ticks:{callback:Hl.formatters.numeric}});const hs=n=>Math.floor(Gi(n)),dr=(n,e)=>Math.pow(10,hs(n)+e);function P0(n){return n/Math.pow(10,hs(n))===1}function B0(n,e,t){const i=Math.pow(10,t),s=Math.floor(n/i);return Math.ceil(e/i)-s}function BO(n,e){const t=e-n;let i=hs(t);for(;B0(n,e,i)>10;)i++;for(;B0(n,e,i)<10;)i--;return Math.min(i,hs(n))}function NO(n,{min:e,max:t}){e=Mn(n.min,e);const i=[],s=hs(e);let o=BO(e,t),u=o<0?Math.pow(10,Math.abs(o)):1;const d=Math.pow(10,o),l=s>o?Math.pow(10,s):0,p=Math.round((e-l)*u)/u,r=Math.floor((e-l)/d/10)*d*10;let f=Math.floor((p-r)/Math.pow(10,o)),a=Mn(n.min,Math.round((l+r+f*Math.pow(10,o))*u)/u);for(;a<t;)i.push({value:a,major:P0(a),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,u=o>=0?1:u),a=Math.round((l+r+f*Math.pow(10,o))*u)/u;const c=Mn(n.max,a);return i.push({value:c,major:P0(c),significand:f}),i}class Sf extends Cr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const i=Rl.prototype.parse.apply(this,[e,t]);if(i===0){this._zero=!0;return}return Bt(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Bt(e)?Math.max(0,e):null,this.max=Bt(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Bt(this._userMin)&&(this.min=e===dr(this.min,0)?dr(this.min,-1):dr(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const o=d=>i=e?i:d,u=d=>s=t?s:d;i===s&&(i<=0?(o(1),u(10)):(o(dr(i,-1)),u(dr(s,1)))),i<=0&&o(dr(s,-1)),s<=0&&u(dr(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=NO(t,this);return e.bounds==="ticks"&&iw(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":ws(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Gi(e),this._valueRange=Gi(this.max)-Gi(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Gi(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}Re(Sf,"id","logarithmic"),Re(Sf,"defaults",{ticks:{callback:Hl.formatters.logarithmic,major:{enabled:!0}}});function Af(n){const e=n.ticks;if(e.display&&n.display){const t=on(e.backdropPadding);return qe(e.font&&e.font.size,$t.font.size)+t.height}return 0}function FO(n,e,t){return t=Tt(t)?t:[t],{w:qR(n,e.string,t),h:t.length*e.lineHeight}}function N0(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:n<i||n>s?{start:e-t,end:e}:{start:e,end:e+t}}function WO(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],o=n._pointLabels.length,u=n.options.pointLabels,d=u.centerPointLabels?kt/o:0;for(let l=0;l<o;l++){const p=u.setContext(n.getPointLabelContext(l));s[l]=p.padding;const r=n.getPointPosition(l,n.drawingArea+s[l],d),f=Gt(p.font),a=FO(n.ctx,f,n._pointLabels[l]);i[l]=a;const c=En(n.getIndexAngle(l)+d),h=Math.round(Zf(c)),m=N0(h,r.x,a.w,0,180),y=N0(h,r.y,a.h,90,270);HO(t,e,c,m,y)}n.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),n._pointLabelItems=UO(n,i,s)}function HO(n,e,t,i,s){const o=Math.abs(Math.sin(t)),u=Math.abs(Math.cos(t));let d=0,l=0;i.start<e.l?(d=(e.l-i.start)/o,n.l=Math.min(n.l,e.l-d)):i.end>e.r&&(d=(i.end-e.r)/o,n.r=Math.max(n.r,e.r+d)),s.start<e.t?(l=(e.t-s.start)/u,n.t=Math.min(n.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/u,n.b=Math.max(n.b,e.b+l))}function zO(n,e,t){const i=n.drawingArea,{extra:s,additionalAngle:o,padding:u,size:d}=t,l=n.getPointPosition(e,i+s+u,o),p=Math.round(Zf(En(l.angle+Wt))),r=GO(l.y,d.h,p),f=VO(p),a=qO(l.x,d.w,f);return{visible:!0,x:l.x,y:r,textAlign:f,left:a,top:r,right:a+d.w,bottom:r+d.h}}function jO(n,e){if(!e)return!0;const{left:t,top:i,right:s,bottom:o}=n;return!(Ii({x:t,y:i},e)||Ii({x:t,y:o},e)||Ii({x:s,y:i},e)||Ii({x:s,y:o},e))}function UO(n,e,t){const i=[],s=n._pointLabels.length,o=n.options,{centerPointLabels:u,display:d}=o.pointLabels,l={extra:Af(o)/2,additionalAngle:u?kt/s:0};let p;for(let r=0;r<s;r++){l.padding=t[r],l.size=e[r];const f=zO(n,r,l);i.push(f),d==="auto"&&(f.visible=jO(f,p),f.visible&&(p=f))}return i}function VO(n){return n===0||n===180?"center":n<180?"left":"right"}function qO(n,e,t){return t==="right"?n-=e:t==="center"&&(n-=e/2),n}function GO(n,e,t){return t===90||t===270?n-=e/2:(t>270||t<90)&&(n-=e),n}function KO(n,e,t){const{left:i,top:s,right:o,bottom:u}=t,{backdropColor:d}=e;if(!et(d)){const l=wr(e.borderRadius),p=on(e.backdropPadding);n.fillStyle=d;const r=i-p.left,f=s-p.top,a=o-i+p.width,c=u-s+p.height;Object.values(l).some(h=>h!==0)?(n.beginPath(),cs(n,{x:r,y:f,w:a,h:c,radius:l}),n.fill()):n.fillRect(r,f,a,c)}}function YO(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const o=n._pointLabelItems[s];if(!o.visible)continue;const u=i.setContext(n.getPointLabelContext(s));KO(t,u,o);const d=Gt(u.font),{x:l,y:p,textAlign:r}=o;Sr(t,n._pointLabels[s],l,p+d.lineHeight/2,d,{color:u.color,textAlign:r,textBaseline:"middle"})}}function Gw(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,Ct);else{let o=n.getPointPosition(0,e);s.moveTo(o.x,o.y);for(let u=1;u<i;u++)o=n.getPointPosition(u,e),s.lineTo(o.x,o.y)}}function XO(n,e,t,i,s){const o=n.ctx,u=e.circular,{color:d,lineWidth:l}=e;!u&&!i||!d||!l||t<0||(o.save(),o.strokeStyle=d,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),Gw(n,t,u,i),o.closePath(),o.stroke(),o.restore())}function QO(n,e,t){return Ji(n,{label:t,index:e,type:"pointLabel"})}class qo extends Rl{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=on(Af(this.options)/2),t=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(t,i)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=Bt(e)&&!isNaN(e)?e:0,this.max=Bt(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Af(this.options))}generateTickLabels(e){Rl.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,i)=>{const s=xt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?WO(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=Ct/(this._pointLabels.length||1),i=this.options.startAngle||0;return En(e*t+Xn(i))}getDistanceFromCenterForValue(e){if(et(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(et(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const i=t[e];return QO(this.getContext(),e,i)}}getPointPosition(e,t,i=0){const s=this.getIndexAngle(e)-Wt+i;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:i,right:s,bottom:o}=this._pointLabelItems[e];return{left:t,top:i,right:s,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),Gw(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:i,grid:s,border:o}=t,u=this._pointLabels.length;let d,l,p;if(t.pointLabels.display&&YO(this,u),s.display&&this.ticks.forEach((r,f)=>{if(f!==0||f===0&&this.min<0){l=this.getDistanceFromCenterForValue(r.value);const a=this.getContext(f),c=s.setContext(a),h=o.setContext(a);XO(this,c,l,u,h)}}),i.display){for(e.save(),d=u-1;d>=0;d--){const r=i.setContext(this.getPointLabelContext(d)),{color:f,lineWidth:a}=r;!a||!f||(e.lineWidth=a,e.strokeStyle=f,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),p=this.getPointPosition(d,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(p.x,p.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let o,u;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((d,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;const p=i.setContext(this.getContext(l)),r=Gt(p.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),p.showLabelBackdrop){e.font=r.string,u=e.measureText(d.label).width,e.fillStyle=p.backdropColor;const f=on(p.backdropPadding);e.fillRect(-u/2-f.left,-o-r.size/2-f.top,u+f.width,r.size+f.height)}Sr(e,d.label,0,-o,r,{color:p.color,strokeColor:p.textStrokeColor,strokeWidth:p.textStrokeWidth})}),e.restore()}drawTitle(){}}Re(qo,"id","radialLinear"),Re(qo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Hl.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Re(qo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Re(qo,"descriptors",{angleLines:{_fallback:"grid"}});const ql={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},yn=Object.keys(ql);function F0(n,e){return n-e}function W0(n,e){if(et(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:o}=n._parseOpts;let u=e;return typeof i=="function"&&(u=i(u)),Bt(u)||(u=typeof i=="string"?t.parse(u,i):t.parse(u)),u===null?null:(s&&(u=s==="week"&&(to(o)||o===!0)?t.startOf(u,"isoWeek",o):t.startOf(u,s)),+u)}function H0(n,e,t,i){const s=yn.length;for(let o=yn.indexOf(n);o<s-1;++o){const u=ql[yn[o]],d=u.steps?u.steps:Number.MAX_SAFE_INTEGER;if(u.common&&Math.ceil((t-e)/(d*u.size))<=i)return yn[o]}return yn[s-1]}function ZO(n,e,t,i,s){for(let o=yn.length-1;o>=yn.indexOf(t);o--){const u=yn[o];if(ql[u].common&&n._adapter.diff(s,i,u)>=e-1)return u}return yn[t?yn.indexOf(t):0]}function JO(n){for(let e=yn.indexOf(n)+1,t=yn.length;e<t;++e)if(ql[yn[e]].common)return yn[e]}function z0(n,e,t){if(!t)n[e]=!0;else if(t.length){const{lo:i,hi:s}=Jf(t,e),o=t[i]>=e?t[i]:t[s];n[o]=!0}}function eD(n,e,t,i){const s=n._adapter,o=+s.startOf(e[0].value,i),u=e[e.length-1].value;let d,l;for(d=o;d<=u;d=+s.add(d,1,i))l=t[d],l>=0&&(e[l].major=!0);return e}function j0(n,e,t){const i=[],s={},o=e.length;let u,d;for(u=0;u<o;++u)d=e[u],s[d]=u,i.push({value:d,major:!1});return o===0||!t?i:eD(n,i,s,t)}class fs extends Cr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const i=e.time||(e.time={}),s=this._adapter=new l$._date(e.adapters.date);s.init(t),Ko(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:W0(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,i=e.time.unit||"day";let{min:s,max:o,minDefined:u,maxDefined:d}=this.getUserBounds();function l(p){!u&&!isNaN(p.min)&&(s=Math.min(s,p.min)),!d&&!isNaN(p.max)&&(o=Math.max(o,p.max))}(!u||!d)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=Bt(s)&&!isNaN(s)?s:+t.startOf(Date.now(),i),o=Bt(o)&&!isNaN(o)?o:+t.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],i=e[e.length-1]),{min:t,max:i}}buildTicks(){const e=this.options,t=e.time,i=e.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,u=this.max,d=IR(s,o,u);return this._unit=t.unit||(i.autoSkip?H0(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):ZO(this,d.length,t.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:JO(this._unit),this.initOffsets(s),e.reverse&&d.reverse(),j0(this,d,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t=0,i=0,s,o;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?i=o:i=(o-this.getDecimalForValue(e[e.length-2]))/2);const u=e.length<3?.5:.25;t=Yt(t,0,u),i=Yt(i,0,u),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,o=s.time,u=o.unit||H0(o.minUnit,t,i,this._getLabelCapacity(t)),d=qe(s.ticks.stepSize,1),l=u==="week"?o.isoWeekday:!1,p=to(l)||l===!0,r={};let f=t,a,c;if(p&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,p?"day":u),e.diff(i,t,u)>1e5*d)throw new Error(t+" and "+i+" are too far apart with stepSize of "+d+" "+u);const h=s.ticks.source==="data"&&this.getDataTimestamps();for(a=f,c=0;a<i;a=+e.add(a,d,u),c++)z0(r,a,h);return(a===i||s.bounds==="ticks"||c===1)&&z0(r,a,h),Object.keys(r).sort(F0).map(m=>+m)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}format(e,t){const s=this.options.time.displayFormats,o=this._unit,u=t||s[o];return this._adapter.format(e,u)}_tickFormatFunction(e,t,i,s){const o=this.options,u=o.ticks.callback;if(u)return xt(u,[e,t,i],this);const d=o.time.displayFormats,l=this._unit,p=this._majorUnit,r=l&&d[l],f=p&&d[p],a=i[t],c=p&&f&&a&&a.major;return this._adapter.format(e,s||(c?f:r))}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t<i;++t)s=e[t],s.label=this._tickFormatFunction(s.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+i)*t.factor)}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,i=this.ctx.measureText(e).width,s=Xn(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(s),u=Math.sin(s),d=this._resolveTickFontOptions(0).size;return{w:i*o+d*u,h:i*u+d*o}}_getLabelCapacity(e){const t=this.options.time,i=t.displayFormats,s=i[t.unit]||i.millisecond,o=this._tickFormatFunction(e,0,j0(this,[e],this._majorUnit),s),u=this._getLabelSize(o),d=Math.floor(this.isHorizontal()?this.width/u.w:this.height/u.h)-1;return d>0?d:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t<i;++t)e=e.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let t,i;if(e.length)return e;const s=this.getLabels();for(t=0,i=s.length;t<i;++t)e.push(W0(this,s[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return sw(e.sort(F0))}}Re(fs,"id","time"),Re(fs,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ol(n,e,t){let i=0,s=n.length-1,o,u,d,l;t?(e>=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=$i(n,"pos",e)),{pos:o,time:d}=n[i],{pos:u,time:l}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=$i(n,"time",e)),{time:o,pos:d}=n[i],{time:u,pos:l}=n[s]);const p=u-o;return p?d+(l-d)*(e-o)/p:d}class Cf extends fs{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=ol(t,this.min),this._tableRange=ol(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],o=[];let u,d,l,p,r;for(u=0,d=e.length;u<d;++u)p=e[u],p>=t&&p<=i&&s.push(p);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(u=0,d=s.length;u<d;++u)r=s[u+1],l=s[u-1],p=s[u],Math.round((r+l)/2)!==p&&o.push({time:p,pos:u/(d-1)});return o}_generate(){const e=this.min,t=this.max;let i=super.getDataTimestamps();return(!i.includes(e)||!i.length)&&i.splice(0,0,e),(!i.includes(t)||i.length===1)&&i.push(t),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return t.length&&i.length?e=this.normalize(t.concat(i)):e=t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(ol(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return ol(this._table,i*this._tableRange+this._minPos,!0)}}Re(Cf,"id","timeseries"),Re(Cf,"defaults",fs.defaults);var tD=Object.freeze({__proto__:null,CategoryScale:_f,LinearScale:xf,LogarithmicScale:Sf,RadialLinearScale:qo,TimeScale:fs,TimeSeriesScale:Cf});const nD=[a$,BI,$O,tD];Ei.register(...nD);let sl;const iD=new Uint8Array(16);function rD(){if(!sl&&(sl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!sl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return sl(iD)}const Zt=[];for(let n=0;n<256;++n)Zt.push((n+256).toString(16).slice(1));function oD(n,e=0){return(Zt[n[e+0]]+Zt[n[e+1]]+Zt[n[e+2]]+Zt[n[e+3]]+"-"+Zt[n[e+4]]+Zt[n[e+5]]+"-"+Zt[n[e+6]]+Zt[n[e+7]]+"-"+Zt[n[e+8]]+Zt[n[e+9]]+"-"+Zt[n[e+10]]+Zt[n[e+11]]+Zt[n[e+12]]+Zt[n[e+13]]+Zt[n[e+14]]+Zt[n[e+15]]).toLowerCase()}const sD=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),U0={randomUUID:sD};function aD(n,e,t){if(U0.randomUUID&&!n)return U0.randomUUID();n=n||{};const i=n.random||(n.rng||rD)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,oD(i)}const lD=n=>jn({XL:20,L:10,M:8,S:7,XS:5})[n],cD=n=>jn({XL:200,L:100,M:80,S:60,XS:40})[n];class Kr extends At{constructor(e){super(),this.provided=e,this.revision=aD(),this.counter=LE(),this.aliases={},this.stack=[],this.points=new Map,this.labels=new Set,this.limits={legend:lD(this.provided.width??"L"),point:this.provided.limit??cD(this.provided.width??"L")},this.source=new Ei(document.createElement("canvas"),{type:"line",data:{labels:jn([]),datasets:[]},options:{scales:{y:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{maxTicksLimit:this.limits.legend*2}},x:{grid:{color:"rgba(255, 255, 255, 0.05)"},ticks:{maxTicksLimit:this.limits.legend}}},plugins:{legend:{labels:{usePointStyle:!0,pointStyle:"circle",boxHeight:5,boxWidth:5}}}}}),this.panel=Li.build({...this.provided,class:"chart"}).replace(this.source.canvas),this.replace(this.panel)}provide(e){e.forEach(i=>{if(this.provided.mode==="aggregation"){const o=this.aliases[i.legend]??this.counter(),u=this.points.get(o)??jn({legend:i.legend,values:{}});return this.aliases[i.legend]||(this.aliases[i.legend]=o,this.points.set(o,u),this.stack.push(o)),Object.entries(i.values).forEach(([d,l])=>{u.values[d]=(u.values[d]??0)+l,this.labels.add(d)})}const s=this.counter();this.stack.push(s),this.points.set(s,i),Object.keys(i.values).forEach(o=>this.labels.add(o))}),this.stack.slice(0,Ln.clamp(this.stack.length-this.limits.point,0,1/0)).forEach(i=>{const s=this.points.get(i);s&&Ln.unset(this.aliases,s.legend),this.points.delete(i),this.stack.shift()});const t=[...this.points.values()];return this.source.data={labels:t.map(i=>i.legend),datasets:[...this.labels.values()].map(i=>({label:i,data:Array(t.length).fill(null).map((s,o)=>t[o].values[i]??null),tension:.3,pointRadius:2,pointHitRadius:20,pointHoverRadius:5,borderWidth:1,borderColor:ns(i,`chart:${this.revision}`),backgroundColor:ns(i,`chart:${this.revision}`)}))},this.source.update("none"),this}clear(){return this.source.reset(),this.points.clear(),this.labels.clear(),this.aliases={},this.stack=[],this}static build(e){return new Kr(e)}}const uD=`
|
|
1470
|
+
<section id="expectations">
|
|
1471
|
+
<div class="storage"></div>
|
|
1472
|
+
|
|
1473
|
+
<div class="controls">
|
|
1474
|
+
<div class="main">
|
|
1475
|
+
<button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>
|
|
1476
|
+
</div>
|
|
1477
|
+
|
|
1478
|
+
<div class="additional container hidden"></div>
|
|
1479
|
+
</div>
|
|
1480
|
+
|
|
1481
|
+
<div class="content"></div>
|
|
1482
|
+
</section>
|
|
1483
|
+
`,hD=`
|
|
1484
|
+
<div class="container expectation" id="{{data.id}}">
|
|
1485
|
+
<div class="meta">
|
|
1486
|
+
<div class="segment">
|
|
1487
|
+
<button id="activity">
|
|
1488
|
+
{{#if data.isEnabled}}
|
|
1489
|
+
<i class="fas fa-plug"></i>
|
|
1490
|
+
{{else}}
|
|
1491
|
+
<i class="fas fa-power-off"></i>
|
|
1492
|
+
{{/if}}
|
|
1493
|
+
</button>
|
|
1494
|
+
|
|
1495
|
+
<button id="edit">
|
|
1496
|
+
<i class="far fa-edit"></i>
|
|
1497
|
+
</button>
|
|
1498
|
+
|
|
1499
|
+
<span class="calls-count {{#compare data.meta.metrics.executions 'gt' 0}}active{{/compare}}">
|
|
1500
|
+
<i class="fas fa-undo-alt"></i>{{data.meta.metrics.executions}}
|
|
1501
|
+
</span>
|
|
1502
|
+
|
|
1503
|
+
<span class="name"><b style="color: {{toColor data.group 'group'}};">{{data.group}}</b> {{data.name}}</span>
|
|
1504
|
+
</div>
|
|
1505
|
+
|
|
1506
|
+
<div class="segment">
|
|
1507
|
+
{{#each data.transports}}<span class="transport">{{this}}</span>{{/each}}
|
|
1508
|
+
|
|
1509
|
+
{{#each data.meta.tags.incoming.method}}
|
|
1510
|
+
<span class="method" style="color: {{toColor this 'method'}};">{{this}}</span>
|
|
1511
|
+
{{/each}}
|
|
1512
|
+
|
|
1513
|
+
{{#each data.meta.tags.incoming.path}}
|
|
1514
|
+
{{> metaPath value=this size=../options.pathSize}}
|
|
1515
|
+
{{/each}}
|
|
1516
|
+
|
|
1517
|
+
{{#each data.meta.tags.incoming.error}}
|
|
1518
|
+
<span class="error">{{this}}</span>
|
|
1519
|
+
{{/each}}
|
|
1520
|
+
|
|
1521
|
+
{{#each data.meta.tags.outgoing.status}}
|
|
1522
|
+
<span class="status {{#compare this 'lt' 400}}green{{/compare}} {{#compare this 'gte' 400}}red{{/compare}}">
|
|
1523
|
+
<b>{{this}}</b>
|
|
1524
|
+
</span>
|
|
1525
|
+
{{/each}}
|
|
1526
|
+
</div>
|
|
1527
|
+
|
|
1528
|
+
{{#with data.meta.tags.forward.url}}
|
|
1529
|
+
<div class="segment">
|
|
1530
|
+
<span class="forward">{{> truncated value=this length=45}}</span>
|
|
1531
|
+
</div>
|
|
1532
|
+
{{/with}}
|
|
1533
|
+
</div>
|
|
1534
|
+
</div>
|
|
1535
|
+
`,fD=`
|
|
1536
|
+
<div class="container expectation" id="expectation-editor">
|
|
1537
|
+
<div class="meta">
|
|
1538
|
+
<div class="segment">
|
|
1539
|
+
<span class="name"><b style="color: {{toColor data.group 'group'}};">{{data.group}}</b> {{data.name}}</span>
|
|
1540
|
+
</div>
|
|
1541
|
+
|
|
1542
|
+
<div class="segment">
|
|
1543
|
+
{{#each data.transports}}<span class="transport">{{this}}</span>{{/each}}
|
|
1544
|
+
|
|
1545
|
+
{{#each data.meta.tags.incoming.method}}
|
|
1546
|
+
<span class="method" style="color: {{toColor this 'method'}};">{{this}}</span>
|
|
1547
|
+
{{/each}}
|
|
1548
|
+
|
|
1549
|
+
{{#each data.meta.tags.incoming.path}}
|
|
1550
|
+
{{> metaPath value=this size=../options.pathSize}}
|
|
1551
|
+
{{/each}}
|
|
1552
|
+
|
|
1553
|
+
{{#each data.meta.tags.incoming.error}}
|
|
1554
|
+
<span class="error">{{this}}</span>
|
|
1555
|
+
{{/each}}
|
|
1556
|
+
|
|
1557
|
+
{{#each data.meta.tags.outgoing.status}}
|
|
1558
|
+
<span class="status {{#compare this 'lt' 400}}green{{/compare}} {{#compare this 'gte' 400}}red{{/compare}}">
|
|
1559
|
+
<b>{{this}}</b>
|
|
1560
|
+
</span>
|
|
1561
|
+
{{/each}}
|
|
1562
|
+
</div>
|
|
1563
|
+
|
|
1564
|
+
{{#with data.meta.tags.forward.url}}
|
|
1565
|
+
<div class="segment">
|
|
1566
|
+
<span class="forward">{{> truncated value=this length=45}}</span>
|
|
1567
|
+
</div>
|
|
1568
|
+
{{/with}}
|
|
1569
|
+
</div>
|
|
1570
|
+
|
|
1571
|
+
<div class="content"></div>
|
|
1572
|
+
|
|
1573
|
+
<div class="buttons">
|
|
1574
|
+
<button id="save"><i class="fas fa-save"></i>Save</button>
|
|
1575
|
+
</div>
|
|
1576
|
+
</div>
|
|
1577
|
+
`,V0={expectation:Ot.compile(hD),editor:Ot.compile(fD)};class Jo extends At{constructor(e,t){super(),this.data=e,this.options=t,this.viewer=Fl.build({depth:3}).hide(),this.editor=(()=>{var o;const i=Gf.build(),s=new At(V0.editor({data:this.data,options:jn({pathSize:"M"})}));return(o=s.element.querySelector("div.content"))==null||o.append(i.element),{model:i,view:s}})(),this.refresh(t),zn.build(this.editor.view.element.querySelector("button#save")).handle(async()=>{var i;await He.services.io.exec("expectations:update",{id:this.data.id,set:{defaults:((i=this.editor.model.extract())==null?void 0:i.defaults)??{}}}),He.shared.popups.push("Saved")})}provide(e){return Object.assign(this,{data:e})}assign(e){return Object.assign(this,e)}refresh(e=this.options){return this.assign({options:e}).replace(V0.expectation({options:e,data:this.data})).append(this.viewer),this.viewer.provide(Ln.pick(this.data,["id","type","transports","defaults","schema"])),zn.build(this.element.querySelector("button#activity")).handle(()=>He.services.io.exec("expectations:update",{id:this.data.id,set:{isEnabled:!this.data.isEnabled}})),zn.build(this.element.querySelector("button#edit")).handle(async()=>{this.data.format==="compact"&&await this.fetch(),this.editor.model.provide({defaults:this.data.defaults??{state:{}}}),He.shared.curtain.clear().append(this.editor.view).show()}),this.element.querySelector("div.meta").addEventListener("click",t=>t.composedPath().some(i=>{var s;return(s=i==null?void 0:i.classList)==null?void 0:s.contains("meta")})&&t.target.nodeName!=="BUTTON"?this.viewer.isHidden?this.expand():this.viewer.hide():null),this}match(e){var t,i,s,o,u,d,l,p,r;return[this.data.group,this.data.name,(t=this.data.meta.tags.forward)==null?void 0:t.url,(s=(i=this.data.meta.tags.incoming)==null?void 0:i.path)==null?void 0:s.join(),(u=(o=this.data.meta.tags.incoming)==null?void 0:o.error)==null?void 0:u.join(),(l=(d=this.data.meta.tags.incoming)==null?void 0:d.method)==null?void 0:l.join(),(r=(p=this.data.meta.tags.outgoing)==null?void 0:p.status)==null?void 0:r.join()].some(f=>f==null?void 0:f.includes(e))}async fetch(){const e=await He.services.io.exec("expectations:get-by-id",{id:this.data.id}).catch(t=>console.error(t));this.data=(e==null?void 0:e.data)??this.data}async expand(){this.data.format==="compact"&&(await this.fetch(),this.refresh()),this.viewer.show()}static build(e,t){return new Jo(e,t)}}const dD=Ot.compile(uD),kf=Wl.build(),Jt={storage:new Map,filters:{search:jn(null),groups:jn(null)}},kn={search:Bl.build({title:"Search expectations"}).on("clear",()=>{Jt.filters.search=null,Yr()}).on("input",n=>{Jt.filters.search=n,Yr()}),filter:eo.build({title:{text:"Groups filter",icon:"fas fa-filter",description:"shows/hides items in the list below"},storage:{key:"expectations:filters:groups"},width:"L"}),switcher:eo.build({title:{text:"Groups switcher",icon:"fas fa-power-off",description:"turnes on/off items in the list below"},width:"L"})},pD=n=>{let e=n;return Jt.filters.groups&&(e=e.filter(t=>Jt.filters.groups.includes(t.data.group))),Jt.filters.search&&(e=e.filter(t=>t.match(Jt.filters.search))),e},Yr=(n=[...Jt.storage.values()])=>{const e=pD(n.map(t=>t.hide())).map(t=>t.show());n.length===Jt.storage.size&&(e.length?kf.hide():kf.show())},ef=n=>(n??He.services.groups.storage).forEach(e=>{var i,s;[...Jt.storage.values()].filter(o=>o.data.group===e).every(o=>!o.data.isEnabled)?(i=kn.switcher.buttons.provided[e])==null||i.disable("silent"):(s=kn.switcher.buttons.provided[e])==null||s.enable("silent")}),Bo=()=>({pathSize:He.services.settings.get("settings:visual:path-size")}),hd=so.build(dD({})).assignMeta({name:"Expectations",icon:"fas fa-magic"}).once("initialize",n=>{n.append(kf),n.controls.main.append(kn.search),n.controls.additional.append(kn.filter),n.controls.additional.append(kn.switcher),He.services.groups.on("register",e=>{kn.switcher.provide({name:e,isEnabled:!0,colorify:{prefix:"group"}}),kn.filter.provide({name:e,isEnabled:!0,colorify:{prefix:"group"}})}),kn.switcher.on("enable",e=>He.services.io.exec("expectations:group:update",{name:e.name,set:{isEnabled:!0}})),kn.switcher.on("disable",e=>He.services.io.exec("expectations:group:update",{name:e.name,set:{isEnabled:!1}})),kn.filter.on("switch",e=>{Jt.filters.groups=e.filter(t=>t.isEnabled).map(t=>t.name),Yr()}),He.services.settings.on("assign:settings:visual:path-size",()=>Jt.storage.forEach(e=>e.refresh(Bo()))),He.services.io.subscribe("expectation:added",e=>{const t=Jo.build(e,Bo());Jt.storage.set(e.id,t),He.services.groups.register(e.group),n.content.append(t),Yr([t]),ef([t.data.group])}),He.services.io.subscribe("expectation:updated",e=>{const t=Jt.storage.get(e.id)??Jo.build(e,Bo());Jt.storage.has(e.id)&&t.provide(e).refresh(Bo()),n.content.element.querySelector(`div.expectation[id="${e.id}"]`)||(n.content.append(t),Yr([t])),Jt.storage.set(e.id,t),He.services.groups.register(e.group),ef([t.data.group])})}).on("initialize",async n=>{He.services.groups.clear(),n.content.clear(),kn.switcher.clear(),kn.filter.clear(),Jt.storage.clear();const{data:e}=await He.services.io.exec("expectations:compact:get-list");e.forEach(t=>{const i=Jo.build(t,Bo());Jt.storage.set(t.id,i),He.services.groups.register(t.group),n.content.append(i)}),kn.filter.trigger(),Yr(),ef()}),gD=`
|
|
1578
|
+
<section id="analytics">
|
|
1579
|
+
<div class="storage"></div>
|
|
1580
|
+
<div class="content container"></div>
|
|
1581
|
+
</section>
|
|
1582
|
+
`,mD=Ot.compile(gD),gn={memory:Kr.build({title:{text:"Server memory usage",icon:"fas fa-memory",description:"updates every 5 seconds"},width:"L"}),cache:Kr.build({title:{text:"Cache memory usage",icon:"fas fa-database",description:"updates every 10 minutes"},width:"L"}),containers:Kr.build({title:{text:"Registered containers",icon:"fas fa-box",description:"updates every 10 minutes"},width:"S"}),rate:Kr.build({title:{text:"Requests rate",icon:"fas fa-rocket",description:"updates instantly"},mode:"aggregation",width:"S"})},Kw=so.build(mD({})).assignMeta({icon:"fas fa-chart-line"}).once("initialize",n=>{n.content.append(gn.memory),n.content.append(gn.cache),n.content.append(gn.containers),n.content.append(gn.rate),He.services.io.subscribe("metric:registered",({name:e,point:{timestamp:t,values:i}})=>e in gn?gn[e].provide([{values:i,legend:Ui(t).format("HH:mm")}]):null)}).on("initialize",async()=>{gn.containers.clear(),gn.memory.clear(),gn.cache.clear(),gn.rate.clear();const{data:n}=await He.services.io.exec("metrics:get");gn.memory.provide(n.memory.map(({timestamp:e,values:t})=>({values:t,legend:Ui(e).format("HH:mm")}))),gn.cache.provide(n.cache.map(({timestamp:e,values:t})=>({values:t,legend:Ui(e).format("HH:mm")}))),gn.rate.provide(n.rate.map(({timestamp:e,values:t})=>({values:t,legend:Ui(e).format("HH:mm")}))),gn.containers.provide(n.containers.map(({timestamp:e,values:t})=>({values:t,legend:Ui(e).format("HH:mm")})))}),yD=`
|
|
1583
|
+
<div class="content">
|
|
1584
|
+
<div class="input size-M" title="Backup file"><input type="file" data-key="files"></div>
|
|
1585
|
+
<div class="input size-XS" title="TTL (seconds)"><input type="text" data-key="ttl" value="3600"></div>
|
|
1586
|
+
|
|
1587
|
+
<button id="restore"><i class="fas fa-undo"></i>Restore</button>
|
|
1588
|
+
</div>
|
|
1589
|
+
`,vD=`
|
|
1590
|
+
<div class="content">
|
|
1591
|
+
<div class="input size-L" title="prefix"><input type="text" data-key="prefix" value="*"></div>
|
|
1592
|
+
<button id="delete"><i class="fas fa-trash-alt"></i>Delete</button>
|
|
1593
|
+
</div>
|
|
1594
|
+
`,bD=`
|
|
1595
|
+
<div class="content">
|
|
1596
|
+
<button id="backup"><i class="fas fa-save"></i>Backup</button>
|
|
1597
|
+
</div>
|
|
1598
|
+
`,wD=`
|
|
1599
|
+
<section id="settings">
|
|
1600
|
+
<div class="storage"></div>
|
|
1601
|
+
<div class="content container"></div>
|
|
1602
|
+
</section>
|
|
1603
|
+
`,_D=`
|
|
1604
|
+
<div class="content">
|
|
1605
|
+
<p class="version"><span>Version</span><b>{{version}}</b></p>
|
|
1606
|
+
<p class="version"><span>Uptime</span><b>{{uptime}}</b></p>
|
|
1607
|
+
</div>
|
|
1608
|
+
`,es={cacheRestoration:Ot.compile(yD),cacheDeletion:Ot.compile(vD),cacheBackup:Ot.compile(bD),section:Ot.compile(wD),stats:Ot.compile(_D)},Wn={system:{stats:Li.build({title:{text:"Stats",icon:"fas fa-server"},class:"stats",height:"XS",width:"XS"})},cache:{deletion:Li.build({title:{text:"Cache deletion",icon:"fas fa-database"},class:"cache",height:"XS",width:"S"}).replace(es.cacheDeletion({})),backup:Li.build({title:{text:"Cache backup",icon:"fas fa-database"},class:"cache",height:"XS",width:"XS"}).replace(es.cacheBackup({})),restoration:Li.build({title:{text:"Cache restoration",icon:"fas fa-database"},class:"cache",height:"XS",width:"M"}).replace(es.cacheRestoration({}))},visual:{pathSize:eo.build({title:{text:"Expectation/history path box size",icon:"fas fa-palette"},storage:{key:"settings:visual:path-size"},class:"visual",type:"radio",height:"XS",width:"S"}).provide({name:"S"},{name:"M",isEnabled:!0},{name:"L"},{name:"XL"},{name:"XXL"},{name:"Unlimited"})}},al={cache:{deletion:Zr.build("settings:cache:deletion",Wn.cache.deletion),restoration:Zr.build("settings:cache:restoration",Wn.cache.restoration)}},Yw=so.build(es.section({})).assignMeta({icon:"fas fa-cog"}).once("initialize",n=>{n.content.append(br.build("System")),n.content.append(Wn.system.stats),n.content.append(br.build("Cache")),n.content.append(Wn.cache.backup),n.content.append(Wn.cache.restoration),n.content.append(Wn.cache.deletion),n.content.append(br.build("Visual")),n.content.append(Wn.visual.pathSize),al.cache.deletion.sync(),al.cache.restoration.sync(),zn.build(Wn.cache.deletion.element.querySelector("button#delete")).handle(async()=>{var i;const e=await al.cache.deletion.save(),{data:t}=await He.services.io.exec("cache:delete",{prefix:e.prefix});He.shared.popups.push(`Deleted <b>${((i=t.redis)==null?void 0:i.count)??0}</b> cache keys`)}),zn.build(Wn.cache.backup.element.querySelector("button#backup")).handle(async()=>{const{data:e}=await He.services.io.exec("cache:backup"),t=document.createElement("a"),i=new Date;t.download=`mock-server-cache-backup-${i.toLocaleDateString()}-${i.getTime()}.txt`,t.href=URL.createObjectURL(new Blob([e],{type:"text"})),t.click()}),zn.build(Wn.cache.restoration.element.querySelector("button#restore")).handle(async()=>{var s;const e=await al.cache.restoration.save();if(!((s=e.files)!=null&&s.length))return He.shared.popups.push("File is not provided",{level:"warning"});const t=1024*300,i=Ph.createStream({highWaterMark:t});Ph(He.instances.io).emit("cache:restore:stream",i,{ttl:e.ttl}),Ph.createBlobReadStream(e.files[0].source,{highWaterMark:t}).pipe(i),await new Promise(o=>i.once("finish",o)),He.shared.popups.push("Restored")}),Wn.visual.pathSize.on("enable",e=>He.services.settings.assign("settings:visual:path-size",e.name))}).on("select",async()=>{const{data:n}=await He.services.io.exec("stats");Wn.system.stats.replace(es.stats(n))}),xD=`
|
|
1609
|
+
<section id="history">
|
|
1610
|
+
<div class="storage"></div>
|
|
1611
|
+
|
|
1612
|
+
<div class="controls">
|
|
1613
|
+
<div class="main">
|
|
1614
|
+
<button class="icon-only" id="expand"><i class="fas fa-chevron-down"></i></button>
|
|
1615
|
+
</div>
|
|
1616
|
+
|
|
1617
|
+
<div class="additional container hidden"></div>
|
|
1618
|
+
</div>
|
|
1619
|
+
|
|
1620
|
+
<div class="content"></div>
|
|
1621
|
+
</section>
|
|
1622
|
+
`,SD=`
|
|
1623
|
+
<div class="buttons">
|
|
1624
|
+
<button id="add-separator"><i class="fas fa-comment"></i>Add separator</button>
|
|
1625
|
+
<button id="delete-separators"><i class="fas fa-trash-alt"></i>Delete separators</button>
|
|
1626
|
+
<button id="clear"><i class="fas fa-trash-alt"></i>Clear list</button>
|
|
1627
|
+
</div>
|
|
1628
|
+
`,AD=`
|
|
1629
|
+
<div class="container history" id="{{data.id}}">
|
|
1630
|
+
<div class="meta">
|
|
1631
|
+
<div class="segment">
|
|
1632
|
+
<span class="time">{{#toLocaleTime data.timestamp}}{{/toLocaleTime}}</span>
|
|
1633
|
+
|
|
1634
|
+
{{#if data.meta.tags.error}}
|
|
1635
|
+
<span class="error">
|
|
1636
|
+
{{#compare data.meta.tags.error.code.length 'lte' 24}}{{data.meta.tags.error.code}}{{/compare}}
|
|
1637
|
+
{{#compare data.meta.tags.error.code.length 'gt' 24}}Error{{/compare}}
|
|
1638
|
+
</span>
|
|
1639
|
+
{{/if}}
|
|
1640
|
+
|
|
1641
|
+
{{#compare data.status 'eq' 'pending'}}
|
|
1642
|
+
<span class="pending"><i class="fas fa-hourglass-start"></i></span>
|
|
1643
|
+
{{/compare}}
|
|
1644
|
+
|
|
1645
|
+
{{#compare data.status 'eq' 'completed'}}
|
|
1646
|
+
{{#unless data.meta.tags.error}}
|
|
1647
|
+
<span class="status
|
|
1648
|
+
{{#compare data.meta.tags.transport 'eq' 'http'}}
|
|
1649
|
+
{{#compare data.meta.tags.outgoing.status 'lt' 400}}green{{/compare}}
|
|
1650
|
+
{{#compare data.meta.tags.outgoing.status 'gte' 400}}red{{/compare}}
|
|
1651
|
+
{{/compare}}
|
|
1652
|
+
"><b>{{data.meta.tags.outgoing.status}}</b> {{toSeconds data.meta.metrics.duration}}s</span>
|
|
1653
|
+
{{/unless}}
|
|
1654
|
+
{{/compare}}
|
|
1655
|
+
|
|
1656
|
+
<span class="method" style="color: {{toColor data.meta.tags.incoming.method 'method'}};">
|
|
1657
|
+
{{data.meta.tags.incoming.method}}
|
|
1658
|
+
</span>
|
|
1659
|
+
|
|
1660
|
+
{{> metaPath value=data.meta.tags.incoming.path size=options.pathSize}}
|
|
1661
|
+
{{#if data.meta.tags.seed}}<span class="seed">{{data.meta.tags.seed}}</span>{{/if}}
|
|
1662
|
+
</div>
|
|
1663
|
+
|
|
1664
|
+
{{#if data.expectation}}
|
|
1665
|
+
<div class="segment">
|
|
1666
|
+
<span class="name">
|
|
1667
|
+
<b style="color: {{toColor data.expectation.group 'group'}};">{{data.expectation.group}}</b>
|
|
1668
|
+
{{data.expectation.name}}
|
|
1669
|
+
</span>
|
|
1670
|
+
|
|
1671
|
+
{{#if data.meta.tags.forward.url}}
|
|
1672
|
+
<span class="forward">{{> truncated value=data.meta.tags.forward.url length=45}}</span>
|
|
1673
|
+
{{/if}}
|
|
1674
|
+
</div>
|
|
1675
|
+
{{else}}
|
|
1676
|
+
<div class="segment"><span class="handled-with red">Nowhere</span></div>
|
|
1677
|
+
{{/if}}
|
|
1678
|
+
|
|
1679
|
+
<div class="segment">
|
|
1680
|
+
{{#if data.meta.tags.cache.hasWritten}}<span class="cache written"><i class="fas fa-database"></i></span>{{/if}}
|
|
1681
|
+
{{#if data.meta.tags.cache.hasRead}}<span class="cache read"><i class="fas fa-database"></i></span>{{/if}}
|
|
1682
|
+
</div>
|
|
1683
|
+
</div>
|
|
1684
|
+
|
|
1685
|
+
{{!-- {{#if snapshot.messages}}
|
|
1686
|
+
<p class="messages-title">
|
|
1687
|
+
<span class="count">Total messages <b>{{snapshot.messages.length}}</b></span>
|
|
1688
|
+
</p>
|
|
1689
|
+
|
|
1690
|
+
<div class="messages">
|
|
1691
|
+
{{#each snapshot.messages}}
|
|
1692
|
+
<div id="{{id}}" class="message {{location}}">
|
|
1693
|
+
<p class="header">
|
|
1694
|
+
{{#compare location 'eq' 'incoming'}}<i class="fas fa-angle-right"></i>{{/compare}}
|
|
1695
|
+
{{#compare location 'eq' 'outgoing'}}<i class="fas fa-angle-left"></i>{{/compare}}
|
|
1696
|
+
<span class="time">{{#toLocaleTime timestamp}}{{/toLocaleTime}}</span>
|
|
1697
|
+
</p>
|
|
1698
|
+
|
|
1699
|
+
<pre class="panel hidden"></pre>
|
|
1700
|
+
</div>
|
|
1701
|
+
{{/each}}
|
|
1702
|
+
</div>
|
|
1703
|
+
{{/if}} --}}
|
|
1704
|
+
</div>
|
|
1705
|
+
`,CD=Ot.compile(AD);class ts extends At{constructor(e,t){super(),this.data=e,this.options=t,this.viewer=Fl.build({depth:2}).hide(),this.refresh(t)}provide(e){return Object.assign(this,{data:e})}assign(e){return Object.assign(this,e)}refresh(e=this.options){var t;return this.assign({options:e}).replace(CD({options:e,data:this.data})).append(this.viewer),this.data.format==="plain"&&this.viewer.provide({event:this.data.snapshot.event,transport:this.data.snapshot.transport,...this.data.snapshot.seed&&{seed:this.data.snapshot.seed},...this.data.snapshot.container&&{container:this.data.snapshot.container},...this.data.snapshot.overrides&&{overrides:this.data.snapshot.overrides},...Object.keys(this.data.snapshot.flags).length&&{flags:this.data.snapshot.flags},...Object.keys(this.data.snapshot.state).length&&{state:this.data.snapshot.state},...this.data.expectation&&{expectation:{id:this.data.expectation.id,group:this.data.expectation.group,...this.data.expectation.schema.forward&&{forward:this.data.expectation.schema.forward}}},...(this.data.snapshot.cache.hasRead||this.data.snapshot.cache.hasWritten)&&{cache:this.data.snapshot.cache},incoming:this.data.snapshot.incoming,...this.data.snapshot.error&&{error:this.data.snapshot.error},...this.data.status==="completed"&&{outgoing:this.data.snapshot.outgoing},...this.data.snapshot.forwarded&&{forwarded:this.data.snapshot.forwarded},...((t=this.data.snapshot.messages)==null?void 0:t.length)&&{messages:this.data.snapshot.messages}}),this.element.querySelector("div.meta").addEventListener("click",i=>i.composedPath().some(s=>{var o;return(o=s==null?void 0:s.classList)==null?void 0:o.contains("meta")})?this.viewer.isHidden?this.expand():this.viewer.hide():null),this}match(e){var t,i,s,o;return[this.data.group,(t=this.data.expectation)==null?void 0:t.name,this.data.meta.tags.incoming.path,this.data.meta.tags.incoming.method,(i=this.data.meta.tags.error)==null?void 0:i.code,(s=this.data.meta.tags.error)==null?void 0:s.message,String(((o=this.data.meta.tags.outgoing)==null?void 0:o.status)??""),String(this.data.meta.tags.seed??"")].some(u=>u==null?void 0:u.includes(e))}async expand(){if(this.data.format==="compact"){const e=await He.services.io.exec("history:get-by-id",{id:this.data.id}).catch(t=>console.error(t));this.data=(e==null?void 0:e.data)??this.data,this.refresh()}this.viewer.show()}static build(e,t){return new ts(e,t)}}const Mf=Wl.build(),Xw={section:Ot.compile(xD),actions:Ot.compile(SD)},Je={storage:new Map,stack:jn([]),separators:{date:new Set,custom:new Set},filters:{search:jn(null),groups:jn(null)}},ri={search:Bl.build({title:"Search history"}).on("clear",()=>{Je.filters.search=null,mr()}).on("input",n=>{Je.filters.search=n,mr()}),filter:eo.build({title:{text:"Groups filter",icon:"fas fa-filter",description:"shows/hides items in the list below"},storage:{key:"history:filters:groups"},width:"L"}),actions:Li.build({title:{text:"Actions",icon:"fas fa-sliders-h"},class:"actions",width:"L"}).append(Xw.actions({}))},kD=n=>{let e=n;return Je.filters.groups&&(e=e.filter(t=>Je.filters.groups.includes(t.data.group))),Je.filters.search&&(e=e.filter(t=>t.match(Je.filters.search))),e},Qw=(n=[...Je.storage.values()])=>{const e=Date.now(),t={},i={"30 seconds ago":e-30*1e3,"1 minute ago":e-60*1e3,"5 minutes ago":e-5*60*1e3,"15 minutes ago":e-15*60*1e3,"30 minutes ago":e-30*60*1e3,"1 hour ago":e-60*60*1e3,"3 hours ago":e-3*60*60*1e3,"6 hours ago":e-6*60*60*1e3,"12 hours ago":e-12*60*60*1e3},s=Object.keys(i).reverse(),o=+Ui().startOf("day");for(const u of Je.separators.date.values())Je.separators.date.delete(u),u.delete();n.sort((u,d)=>d.data.timestamp-u.data.timestamp).forEach(u=>{if(u.isHidden)return null;if(u.data.timestamp<o){const d=Ui(u.data.timestamp).format("DD MMM");return t[d]=t[d]??u,null}for(const d of s){if(t[d])break;if(u.data.timestamp<i[d]){t[d]=u;break}}}),Object.entries(t).forEach(([u,d])=>{const l=br.build(u);d.element.insertAdjacentElement("beforebegin",l.element),Je.separators.date.add(l)})},mr=(n=[...Je.storage.values()])=>{const e=kD(n.map(t=>t.hide())).map(t=>t.show());n.length===Je.storage.size&&(e.length?Mf.hide():Mf.show(),Qw(e))},No=()=>({pathSize:He.services.settings.get("settings:visual:path-size")}),Zw=so.build(Xw.section({})).assignMeta({name:"History",icon:"fas fa-history"}).once("initialize",n=>{n.append(Mf),n.controls.main.append(ri.search),n.controls.additional.append(ri.filter),n.controls.additional.append(ri.actions),zn.build(ri.actions.element.querySelector("button#clear")).handle(async()=>{if(!Je.stack.length)return He.shared.popups.push("Nothing to clear",{level:"warning"});await He.services.io.exec("history:delete"),Je.separators.custom.clear(),Je.separators.date.clear(),Je.storage.clear(),Je.stack=[],n.content.clear(),He.shared.popups.push("History has cleared"),mr()}),zn.build(ri.actions.element.querySelector("button#add-separator")).handle(()=>{const e=br.build(`#${Je.separators.custom.size+1}`).highlight();n.content.prepend(e),Je.separators.custom.add(e)}),zn.build(ri.actions.element.querySelector("button#delete-separators")).handle(()=>{for(const e of Je.separators.custom.values())Je.separators.custom.delete(e),e.delete()}),He.services.groups.on("register",e=>ri.filter.provide({name:e,isEnabled:!0,colorify:{prefix:"group"}})),He.services.settings.on("assign:settings:visual:path-size",()=>Je.storage.forEach(e=>e.refresh(No()))),ri.filter.on("switch",e=>{Je.filters.groups=e.filter(t=>t.isEnabled).map(t=>t.name),mr()}),He.services.io.subscribe("history:added",e=>{var i;const t=ts.build(e,No());if(Je.storage.set(e.id,t),Je.stack.push(e.id),Je.stack.length>He.services.config.storage.history.limit*He.services.groups.storage.size){const s=Je.stack.shift();(i=Je.storage.get(s))==null||i.delete(),Je.storage.delete(s)}n.content.prepend(t),mr([t])}),He.services.io.subscribe("history:updated",e=>{const t=Je.storage.get(e.id)??ts.build(e,No());Je.storage.has(e.id)?t.provide(e).refresh(No()):Je.stack.push(e.id),Je.storage.set(e.id,t),n.element.querySelector(`div.history[id="${e.id}"]`)||(n.content.prepend(t),mr([t]))}),setInterval(()=>Qw(),30*1e3)}).on("initialize",async n=>{ri.filter.clear(),Je.stack=[],n.content.clear(),Je.storage.clear();const{data:e}=await He.services.io.exec("history:compact:get-list");e.forEach(t=>{const i=ts.build(t,No());Je.storage.set(t.id,i),Je.stack.push(t.id),n.content.append(i)}),ri.filter.trigger(),mr()}),Jw=Object.freeze(Object.defineProperty({__proto__:null,analytics:Kw,expectations:hd,history:Zw,settings:Yw},Symbol.toStringTag,{value:"Module"})),e1=Ff.build().show(),MD=qf.build([{type:"section",entity:Yw.hide()},{type:"section",entity:Kw.hide()},{type:"separator"},{type:"section",entity:hd},{type:"section",entity:Zw.hide()}]);He.switchStorage(hd.storage).share({popups:Wf.build(),curtain:Pl.build()});document.body.prepend(MD.element);document.body.append(e1.element);document.body.append(He.shared.popups.element);document.body.append(He.shared.curtain.element);Object.values(Jw).map(n=>n.compile()).forEach(n=>document.body.append(n.element));He.instances.io.on("connect",async()=>{console.log("WebSocket has connected"),await He.services.io.exec("ping");const{data:n}=await He.services.io.exec("config:get");He.services.config.assign(n),He.shared.popups.push("Connected!"),Object.values(Jw).forEach(e=>e.initialize()),e1.hide()});
|