@cluesmith/codev 3.3.3 → 3.3.5
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/dashboard-dist/assets/index-BuflRUi6.js +220 -0
- package/dashboard-dist/assets/index-BuflRUi6.js.map +1 -0
- package/dashboard-dist/assets/index-r3bZzLmX.css +32 -0
- package/dashboard-dist/index.html +2 -2
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +48 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/ide.d.ts +20 -0
- package/dist/agent-farm/commands/ide.d.ts.map +1 -0
- package/dist/agent-farm/commands/ide.js +138 -0
- package/dist/agent-farm/commands/ide.js.map +1 -0
- package/dist/agent-farm/commands/inbox.d.ts.map +1 -1
- package/dist/agent-farm/commands/inbox.js +15 -3
- package/dist/agent-farm/commands/inbox.js.map +1 -1
- package/dist/agent-farm/commands/send.d.ts +3 -2
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +40 -6
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +28 -9
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/commands/tower.d.ts +21 -9
- package/dist/agent-farm/commands/tower.d.ts.map +1 -1
- package/dist/agent-farm/commands/tower.js +90 -30
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/db/tower-owner.d.ts +168 -0
- package/dist/agent-farm/db/tower-owner.d.ts.map +1 -0
- package/dist/agent-farm/db/tower-owner.js +369 -0
- package/dist/agent-farm/db/tower-owner.js.map +1 -0
- package/dist/agent-farm/db/types.d.ts +30 -5
- package/dist/agent-farm/db/types.d.ts.map +1 -1
- package/dist/agent-farm/db/types.js.map +1 -1
- package/dist/agent-farm/lib/ide-record.d.ts +65 -0
- package/dist/agent-farm/lib/ide-record.d.ts.map +1 -0
- package/dist/agent-farm/lib/ide-record.js +118 -0
- package/dist/agent-farm/lib/ide-record.js.map +1 -0
- package/dist/agent-farm/lib/tunnel-client.d.ts +22 -0
- package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.js +53 -5
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/decisions/file.d.ts +50 -0
- package/dist/agent-farm/servers/decisions/file.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/file.js +146 -0
- package/dist/agent-farm/servers/decisions/file.js.map +1 -0
- package/dist/agent-farm/servers/decisions/grammar.d.ts +36 -0
- package/dist/agent-farm/servers/decisions/grammar.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/grammar.js +109 -0
- package/dist/agent-farm/servers/decisions/grammar.js.map +1 -0
- package/dist/agent-farm/servers/decisions/notice.d.ts +11 -0
- package/dist/agent-farm/servers/decisions/notice.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/notice.js +18 -0
- package/dist/agent-farm/servers/decisions/notice.js.map +1 -0
- package/dist/agent-farm/servers/decisions/parse.d.ts +36 -0
- package/dist/agent-farm/servers/decisions/parse.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/parse.js +308 -0
- package/dist/agent-farm/servers/decisions/parse.js.map +1 -0
- package/dist/agent-farm/servers/decisions/routes.d.ts +17 -0
- package/dist/agent-farm/servers/decisions/routes.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/routes.js +160 -0
- package/dist/agent-farm/servers/decisions/routes.js.map +1 -0
- package/dist/agent-farm/servers/decisions/splice.d.ts +26 -0
- package/dist/agent-farm/servers/decisions/splice.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/splice.js +120 -0
- package/dist/agent-farm/servers/decisions/splice.js.map +1 -0
- package/dist/agent-farm/servers/decisions/stamp.d.ts +4 -0
- package/dist/agent-farm/servers/decisions/stamp.d.ts.map +1 -0
- package/dist/agent-farm/servers/decisions/stamp.js +171 -0
- package/dist/agent-farm/servers/decisions/stamp.js.map +1 -0
- package/dist/agent-farm/servers/gate-profiles.d.ts +23 -2
- package/dist/agent-farm/servers/gate-profiles.d.ts.map +1 -1
- package/dist/agent-farm/servers/gate-profiles.js +43 -2
- package/dist/agent-farm/servers/gate-profiles.js.map +1 -1
- package/dist/agent-farm/servers/ide-forward.d.ts +62 -0
- package/dist/agent-farm/servers/ide-forward.d.ts.map +1 -0
- package/dist/agent-farm/servers/ide-forward.js +274 -0
- package/dist/agent-farm/servers/ide-forward.js.map +1 -0
- package/dist/agent-farm/servers/ide-server.d.ts +68 -0
- package/dist/agent-farm/servers/ide-server.d.ts.map +1 -0
- package/dist/agent-farm/servers/ide-server.js +281 -0
- package/dist/agent-farm/servers/ide-server.js.map +1 -0
- package/dist/agent-farm/servers/mailbox-delivery.d.ts +213 -4
- package/dist/agent-farm/servers/mailbox-delivery.d.ts.map +1 -1
- package/dist/agent-farm/servers/mailbox-delivery.js +489 -68
- package/dist/agent-farm/servers/mailbox-delivery.js.map +1 -1
- package/dist/agent-farm/servers/mailbox-wiring.d.ts +18 -4
- package/dist/agent-farm/servers/mailbox-wiring.d.ts.map +1 -1
- package/dist/agent-farm/servers/mailbox-wiring.js +94 -21
- package/dist/agent-farm/servers/mailbox-wiring.js.map +1 -1
- package/dist/agent-farm/servers/message-write.d.ts +138 -11
- package/dist/agent-farm/servers/message-write.d.ts.map +1 -1
- package/dist/agent-farm/servers/message-write.js +144 -35
- package/dist/agent-farm/servers/message-write.js.map +1 -1
- package/dist/agent-farm/servers/overview.d.ts +32 -15
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +181 -103
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/render-gate.d.ts +53 -0
- package/dist/agent-farm/servers/render-gate.d.ts.map +1 -1
- package/dist/agent-farm/servers/render-gate.js +135 -24
- package/dist/agent-farm/servers/render-gate.js.map +1 -1
- package/dist/agent-farm/servers/session-submit.d.ts +7 -4
- package/dist/agent-farm/servers/session-submit.d.ts.map +1 -1
- package/dist/agent-farm/servers/session-submit.js +7 -4
- package/dist/agent-farm/servers/session-submit.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-cron.js +4 -1
- package/dist/agent-farm/servers/tower-cron.js.map +1 -1
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +6 -7
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +116 -18
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +64 -7
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +53 -8
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.js +18 -1
- package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
- package/dist/agent-farm/utils/message-format.d.ts +8 -0
- package/dist/agent-farm/utils/message-format.d.ts.map +1 -1
- package/dist/agent-farm/utils/message-format.js +21 -6
- package/dist/agent-farm/utils/message-format.js.map +1 -1
- package/dist/agent-farm/utils/port.d.ts +22 -0
- package/dist/agent-farm/utils/port.d.ts.map +1 -0
- package/dist/agent-farm/utils/port.js +35 -0
- package/dist/agent-farm/utils/port.js.map +1 -0
- package/dist/agent-farm/utils/server-utils.d.ts +26 -0
- package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
- package/dist/agent-farm/utils/server-utils.js +36 -0
- package/dist/agent-farm/utils/server-utils.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/consult/index.d.ts +20 -1
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +117 -3
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/consult/tree-tripwire.d.ts +177 -0
- package/dist/commands/consult/tree-tripwire.d.ts.map +1 -0
- package/dist/commands/consult/tree-tripwire.js +356 -0
- package/dist/commands/consult/tree-tripwire.js.map +1 -0
- package/dist/commands/doctor.d.ts +69 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +163 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/generate-image.d.ts +5 -0
- package/dist/commands/generate-image.d.ts.map +1 -1
- package/dist/commands/generate-image.js +225 -4
- package/dist/commands/generate-image.js.map +1 -1
- package/dist/commands/porch/checks.d.ts +7 -1
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +77 -14
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/index.d.ts +38 -1
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +79 -43
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/protocol.d.ts +4 -3
- package/dist/commands/porch/protocol.d.ts.map +1 -1
- package/dist/commands/porch/protocol.js +32 -5
- package/dist/commands/porch/protocol.js.map +1 -1
- package/dist/commands/porch/types.d.ts +2 -0
- package/dist/commands/porch/types.d.ts.map +1 -1
- package/dist/lib/agent-env.d.ts +95 -0
- package/dist/lib/agent-env.d.ts.map +1 -0
- package/dist/lib/agent-env.js +137 -0
- package/dist/lib/agent-env.js.map +1 -0
- package/dist/lib/config.d.ts +8 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/forge-contracts.d.ts +10 -0
- package/dist/lib/forge-contracts.d.ts.map +1 -1
- package/dist/lib/forge-contracts.js.map +1 -1
- package/dist/lib/forge-rate-limit.d.ts +45 -0
- package/dist/lib/forge-rate-limit.d.ts.map +1 -0
- package/dist/lib/forge-rate-limit.js +89 -0
- package/dist/lib/forge-rate-limit.js.map +1 -0
- package/dist/lib/forge.d.ts +28 -0
- package/dist/lib/forge.d.ts.map +1 -1
- package/dist/lib/forge.js +63 -10
- package/dist/lib/forge.js.map +1 -1
- package/dist/lib/github.d.ts +13 -1
- package/dist/lib/github.d.ts.map +1 -1
- package/dist/lib/github.js +58 -15
- package/dist/lib/github.js.map +1 -1
- package/dist/lib/test-env.d.ts +17 -0
- package/dist/lib/test-env.d.ts.map +1 -1
- package/dist/lib/test-env.js +20 -0
- package/dist/lib/test-env.js.map +1 -1
- package/dist/terminal/pty-session.d.ts +122 -4
- package/dist/terminal/pty-session.d.ts.map +1 -1
- package/dist/terminal/pty-session.js +142 -7
- package/dist/terminal/pty-session.js.map +1 -1
- package/dist/terminal/session-manager.d.ts +23 -2
- package/dist/terminal/session-manager.d.ts.map +1 -1
- package/dist/terminal/session-manager.js +115 -36
- package/dist/terminal/session-manager.js.map +1 -1
- package/dist/terminal/session-screen.d.ts +34 -5
- package/dist/terminal/session-screen.d.ts.map +1 -1
- package/dist/terminal/session-screen.js +52 -6
- package/dist/terminal/session-screen.js.map +1 -1
- package/dist/terminal/terminal-replies.d.ts +102 -0
- package/dist/terminal/terminal-replies.d.ts.map +1 -0
- package/dist/terminal/terminal-replies.js +181 -0
- package/dist/terminal/terminal-replies.js.map +1 -0
- package/package.json +4 -4
- package/scripts/forge/github/pr-list.sh +6 -2
- package/scripts/forge/github/pr-search.sh +4 -2
- package/scripts/forge/gitlab/issue-search.sh +1 -0
- package/scripts/forge/gitlab/pr-search.sh +35 -2
- package/scripts/forge/linear/auth-status.sh +1 -0
- package/scripts/forge/linear/issue-comment.sh +1 -0
- package/scripts/forge/linear/issue-list.sh +1 -0
- package/scripts/forge/linear/issue-search.sh +1 -0
- package/scripts/forge/linear/issue-view.sh +1 -0
- package/scripts/forge/linear/recently-closed.sh +1 -0
- package/scripts/forge/linear/user-identity.sh +1 -0
- package/skeleton/.claude/skills/afx/SKILL.md +15 -0
- package/skeleton/.claude/skills/arch-init/SKILL.md +56 -9
- package/skeleton/.claude/skills/arch-save/SKILL.md +100 -9
- package/skeleton/.claude/skills/consult/SKILL.md +9 -0
- package/skeleton/.claude/skills/generate-image/SKILL.md +19 -2
- package/skeleton/.claude/skills/porch/SKILL.md +18 -0
- package/skeleton/.codex/skills/afx/SKILL.md +15 -0
- package/skeleton/.codex/skills/arch-init/SKILL.md +56 -9
- package/skeleton/.codex/skills/arch-save/SKILL.md +100 -9
- package/skeleton/.codex/skills/consult/SKILL.md +9 -0
- package/skeleton/.codex/skills/generate-image/SKILL.md +19 -2
- package/skeleton/.codex/skills/porch/SKILL.md +18 -0
- package/skeleton/protocol-schema.json +6 -0
- package/skeleton/protocols/maintain/protocol.md +5 -0
- package/skeleton/protocols/pir/prompts/review.md +0 -1
- package/skeleton/protocols/protocol-schema.json +6 -0
- package/skeleton/resources/commands/agent-farm.md +71 -2
- package/skeleton/resources/commands/consult.md +9 -2
- package/skeleton/roles/consultant.md +32 -0
- package/skeleton/templates/AGENTS.md +1 -1
- package/skeleton/templates/CLAUDE.md +1 -1
- package/skeleton/templates/cheatsheet.md +1 -1
- package/dashboard-dist/assets/index-CUIjS_Vb.js +0 -199
- package/dashboard-dist/assets/index-CUIjS_Vb.js.map +0 -1
- package/dashboard-dist/assets/index-DnYLy5C_.css +0 -32
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
var $O=Object.defineProperty;var UO=(e,t,r)=>t in e?$O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var zt=(e,t,r)=>UO(e,typeof t!="symbol"?t+"":t,r);function qO(e,t){for(var r=0;r<t.length;r++){const i=t[r];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function r(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=r(o);fetch(o.href,l)}})();function Gs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uv={exports:{}},gu={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var HS;function WO(){if(HS)return gu;HS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,o,l){var d=null;if(l!==void 0&&(d=""+l),o.key!==void 0&&(d=""+o.key),"key"in o){l={};for(var a in o)a!=="key"&&(l[a]=o[a])}else l=o;return o=l.ref,{$$typeof:e,type:i,key:d,ref:o!==void 0?o:null,props:l}}return gu.Fragment=t,gu.jsx=r,gu.jsxs=r,gu}var $S;function GO(){return $S||($S=1,uv.exports=WO()),uv.exports}var B=GO(),cv={exports:{}},ze={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var US;function KO(){if(US)return ze;US=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),d=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),g=Symbol.iterator;function b(z){return z===null||typeof z!="object"?null:(z=g&&z[g]||z["@@iterator"],typeof z=="function"?z:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function y(z,q,J){this.props=z,this.context=q,this.refs=v,this.updater=J||S}y.prototype.isReactComponent={},y.prototype.setState=function(z,q){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,q,"setState")},y.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function x(){}x.prototype=y.prototype;function C(z,q,J){this.props=z,this.context=q,this.refs=v,this.updater=J||S}var E=C.prototype=new x;E.constructor=C,m(E,y.prototype),E.isPureReactComponent=!0;var D=Array.isArray;function w(){}var M={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function O(z,q,J){var ie=J.ref;return{$$typeof:e,type:z,key:q,ref:ie!==void 0?ie:null,props:J}}function L(z,q){return O(z.type,q,z.props)}function P(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function R(z){var q={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(J){return q[J]})}var I=/\/+/g;function $(z,q){return typeof z=="object"&&z!==null&&z.key!=null?R(""+z.key):q.toString(36)}function V(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(w,w):(z.status="pending",z.then(function(q){z.status==="pending"&&(z.status="fulfilled",z.value=q)},function(q){z.status==="pending"&&(z.status="rejected",z.reason=q)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function U(z,q,J,ie,pe){var he=typeof z;(he==="undefined"||he==="boolean")&&(z=null);var Z=!1;if(z===null)Z=!0;else switch(he){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(z.$$typeof){case e:case t:Z=!0;break;case p:return Z=z._init,U(Z(z._payload),q,J,ie,pe)}}if(Z)return pe=pe(z),Z=ie===""?"."+$(z,0):ie,D(pe)?(J="",Z!=null&&(J=Z.replace(I,"$&/")+"/"),U(pe,q,J,"",function(Q){return Q})):pe!=null&&(P(pe)&&(pe=L(pe,J+(pe.key==null||z&&z.key===pe.key?"":(""+pe.key).replace(I,"$&/")+"/")+Z)),q.push(pe)),1;Z=0;var W=ie===""?".":ie+":";if(D(z))for(var te=0;te<z.length;te++)ie=z[te],he=W+$(ie,te),Z+=U(ie,q,J,he,pe);else if(te=b(z),typeof te=="function")for(z=te.call(z),te=0;!(ie=z.next()).done;)ie=ie.value,he=W+$(ie,te++),Z+=U(ie,q,J,he,pe);else if(he==="object"){if(typeof z.then=="function")return U(V(z),q,J,ie,pe);throw q=String(z),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Z}function K(z,q,J){if(z==null)return z;var ie=[],pe=0;return U(z,ie,"","",function(he){return q.call(J,he,pe++)}),ie}function G(z){if(z._status===-1){var q=z._result;q=q(),q.then(function(J){(z._status===0||z._status===-1)&&(z._status=1,z._result=J)},function(J){(z._status===0||z._status===-1)&&(z._status=2,z._result=J)}),z._status===-1&&(z._status=0,z._result=q)}if(z._status===1)return z._result.default;throw z._result}var N=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},H={map:K,forEach:function(z,q,J){K(z,function(){q.apply(this,arguments)},J)},count:function(z){var q=0;return K(z,function(){q++}),q},toArray:function(z){return K(z,function(q){return q})||[]},only:function(z){if(!P(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return ze.Activity=f,ze.Children=H,ze.Component=y,ze.Fragment=r,ze.Profiler=o,ze.PureComponent=C,ze.StrictMode=i,ze.Suspense=u,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,ze.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},ze.cache=function(z){return function(){return z.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(z,q,J){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ie=m({},z.props),pe=z.key;if(q!=null)for(he in q.key!==void 0&&(pe=""+q.key),q)!T.call(q,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&q.ref===void 0||(ie[he]=q[he]);var he=arguments.length-2;if(he===1)ie.children=J;else if(1<he){for(var Z=Array(he),W=0;W<he;W++)Z[W]=arguments[W+2];ie.children=Z}return O(z.type,pe,ie)},ze.createContext=function(z){return z={$$typeof:d,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:l,_context:z},z},ze.createElement=function(z,q,J){var ie,pe={},he=null;if(q!=null)for(ie in q.key!==void 0&&(he=""+q.key),q)T.call(q,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(pe[ie]=q[ie]);var Z=arguments.length-2;if(Z===1)pe.children=J;else if(1<Z){for(var W=Array(Z),te=0;te<Z;te++)W[te]=arguments[te+2];pe.children=W}if(z&&z.defaultProps)for(ie in Z=z.defaultProps,Z)pe[ie]===void 0&&(pe[ie]=Z[ie]);return O(z,he,pe)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(z){return{$$typeof:a,render:z}},ze.isValidElement=P,ze.lazy=function(z){return{$$typeof:p,_payload:{_status:-1,_result:z},_init:G}},ze.memo=function(z,q){return{$$typeof:c,type:z,compare:q===void 0?null:q}},ze.startTransition=function(z){var q=M.T,J={};M.T=J;try{var ie=z(),pe=M.S;pe!==null&&pe(J,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(w,N)}catch(he){N(he)}finally{q!==null&&J.types!==null&&(q.types=J.types),M.T=q}},ze.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},ze.use=function(z){return M.H.use(z)},ze.useActionState=function(z,q,J){return M.H.useActionState(z,q,J)},ze.useCallback=function(z,q){return M.H.useCallback(z,q)},ze.useContext=function(z){return M.H.useContext(z)},ze.useDebugValue=function(){},ze.useDeferredValue=function(z,q){return M.H.useDeferredValue(z,q)},ze.useEffect=function(z,q){return M.H.useEffect(z,q)},ze.useEffectEvent=function(z){return M.H.useEffectEvent(z)},ze.useId=function(){return M.H.useId()},ze.useImperativeHandle=function(z,q,J){return M.H.useImperativeHandle(z,q,J)},ze.useInsertionEffect=function(z,q){return M.H.useInsertionEffect(z,q)},ze.useLayoutEffect=function(z,q){return M.H.useLayoutEffect(z,q)},ze.useMemo=function(z,q){return M.H.useMemo(z,q)},ze.useOptimistic=function(z,q){return M.H.useOptimistic(z,q)},ze.useReducer=function(z,q,J){return M.H.useReducer(z,q,J)},ze.useRef=function(z){return M.H.useRef(z)},ze.useState=function(z){return M.H.useState(z)},ze.useSyncExternalStore=function(z,q,J){return M.H.useSyncExternalStore(z,q,J)},ze.useTransition=function(){return M.H.useTransition()},ze.version="19.2.5",ze}var qS;function dl(){return qS||(qS=1,cv.exports=KO()),cv.exports}var j=dl();const YO=Gs(j),VO=qO({__proto__:null,default:YO},[j]);var hv={exports:{}},_u={},fv={exports:{}},dv={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var WS;function XO(){return WS||(WS=1,(function(e){function t(U,K){var G=U.length;U.push(K);e:for(;0<G;){var N=G-1>>>1,H=U[N];if(0<o(H,K))U[N]=K,U[G]=H,G=N;else break e}}function r(U){return U.length===0?null:U[0]}function i(U){if(U.length===0)return null;var K=U[0],G=U.pop();if(G!==K){U[0]=G;e:for(var N=0,H=U.length,z=H>>>1;N<z;){var q=2*(N+1)-1,J=U[q],ie=q+1,pe=U[ie];if(0>o(J,G))ie<H&&0>o(pe,J)?(U[N]=pe,U[ie]=G,N=ie):(U[N]=J,U[q]=G,N=q);else if(ie<H&&0>o(pe,G))U[N]=pe,U[ie]=G,N=ie;else break e}}return K}function o(U,K){var G=U.sortIndex-K.sortIndex;return G!==0?G:U.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var d=Date,a=d.now();e.unstable_now=function(){return d.now()-a}}var u=[],c=[],p=1,f=null,g=3,b=!1,S=!1,m=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function E(U){for(var K=r(c);K!==null;){if(K.callback===null)i(c);else if(K.startTime<=U)i(c),K.sortIndex=K.expirationTime,t(u,K);else break;K=r(c)}}function D(U){if(m=!1,E(U),!S)if(r(u)!==null)S=!0,w||(w=!0,R());else{var K=r(c);K!==null&&V(D,K.startTime-U)}}var w=!1,M=-1,T=5,O=-1;function L(){return v?!0:!(e.unstable_now()-O<T)}function P(){if(v=!1,w){var U=e.unstable_now();O=U;var K=!0;try{e:{S=!1,m&&(m=!1,x(M),M=-1),b=!0;var G=g;try{t:{for(E(U),f=r(u);f!==null&&!(f.expirationTime>U&&L());){var N=f.callback;if(typeof N=="function"){f.callback=null,g=f.priorityLevel;var H=N(f.expirationTime<=U);if(U=e.unstable_now(),typeof H=="function"){f.callback=H,E(U),K=!0;break t}f===r(u)&&i(u),E(U)}else i(u);f=r(u)}if(f!==null)K=!0;else{var z=r(c);z!==null&&V(D,z.startTime-U),K=!1}}break e}finally{f=null,g=G,b=!1}K=void 0}}finally{K?R():w=!1}}}var R;if(typeof C=="function")R=function(){C(P)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,$=I.port2;I.port1.onmessage=P,R=function(){$.postMessage(null)}}else R=function(){y(P,0)};function V(U,K){M=y(function(){U(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(U){switch(g){case 1:case 2:case 3:var K=3;break;default:K=g}var G=g;g=K;try{return U()}finally{g=G}},e.unstable_requestPaint=function(){v=!0},e.unstable_runWithPriority=function(U,K){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var G=g;g=U;try{return K()}finally{g=G}},e.unstable_scheduleCallback=function(U,K,G){var N=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?N+G:N):G=N,U){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=G+H,U={id:p++,callback:K,priorityLevel:U,startTime:G,expirationTime:H,sortIndex:-1},G>N?(U.sortIndex=G,t(c,U),r(u)===null&&U===r(c)&&(m?(x(M),M=-1):m=!0,V(D,G-N))):(U.sortIndex=H,t(u,U),S||b||(S=!0,w||(w=!0,R()))),U},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(U){var K=g;return function(){var G=g;g=K;try{return U.apply(this,arguments)}finally{g=G}}}})(dv)),dv}var GS;function ZO(){return GS||(GS=1,fv.exports=XO()),fv.exports}var pv={exports:{}},Mr={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var KS;function QO(){if(KS)return Mr;KS=1;var e=dl();function t(u){var c="https://react.dev/errors/"+u;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)c+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(u,c,p){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:f==null?null:""+f,children:u,containerInfo:c,implementation:p}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,c){if(u==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return Mr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Mr.createPortal=function(u,c){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return l(u,c,null,p)},Mr.flushSync=function(u){var c=d.T,p=i.p;try{if(d.T=null,i.p=2,u)return u()}finally{d.T=c,i.p=p,i.d.f()}},Mr.preconnect=function(u,c){typeof u=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,i.d.C(u,c))},Mr.prefetchDNS=function(u){typeof u=="string"&&i.d.D(u)},Mr.preinit=function(u,c){if(typeof u=="string"&&c&&typeof c.as=="string"){var p=c.as,f=a(p,c.crossOrigin),g=typeof c.integrity=="string"?c.integrity:void 0,b=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;p==="style"?i.d.S(u,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:g,fetchPriority:b}):p==="script"&&i.d.X(u,{crossOrigin:f,integrity:g,fetchPriority:b,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},Mr.preinitModule=function(u,c){if(typeof u=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var p=a(c.as,c.crossOrigin);i.d.M(u,{crossOrigin:p,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&i.d.M(u)},Mr.preload=function(u,c){if(typeof u=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var p=c.as,f=a(p,c.crossOrigin);i.d.L(u,p,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},Mr.preloadModule=function(u,c){if(typeof u=="string")if(c){var p=a(c.as,c.crossOrigin);i.d.m(u,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:p,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else i.d.m(u)},Mr.requestFormReset=function(u){i.d.r(u)},Mr.unstable_batchedUpdates=function(u,c){return u(c)},Mr.useFormState=function(u,c,p){return d.H.useFormState(u,c,p)},Mr.useFormStatus=function(){return d.H.useHostTransitionStatus()},Mr.version="19.2.5",Mr}var YS;function LE(){if(YS)return pv.exports;YS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),pv.exports=QO(),pv.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var VS;function JO(){if(VS)return _u;VS=1;var e=ZO(),t=dl(),r=LE();function i(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)s+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var s=n,h=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(h=s.return),n=s.return;while(n)}return s.tag===3?h:null}function d(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function a(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function u(n){if(l(n)!==n)throw Error(i(188))}function c(n){var s=n.alternate;if(!s){if(s=l(n),s===null)throw Error(i(188));return s!==n?null:n}for(var h=n,_=s;;){var A=h.return;if(A===null)break;var k=A.alternate;if(k===null){if(_=A.return,_!==null){h=_;continue}break}if(A.child===k.child){for(k=A.child;k;){if(k===h)return u(A),n;if(k===_)return u(A),s;k=k.sibling}throw Error(i(188))}if(h.return!==_.return)h=A,_=k;else{for(var F=!1,Y=A.child;Y;){if(Y===h){F=!0,h=A,_=k;break}if(Y===_){F=!0,_=A,h=k;break}Y=Y.sibling}if(!F){for(Y=k.child;Y;){if(Y===h){F=!0,h=k,_=A;break}if(Y===_){F=!0,_=k,h=A;break}Y=Y.sibling}if(!F)throw Error(i(189))}}if(h.alternate!==_)throw Error(i(190))}if(h.tag!==3)throw Error(i(188));return h.stateNode.current===h?n:s}function p(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=p(n),s!==null)return s;n=n.sibling}return null}var f=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),C=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function R(n){return n===null||typeof n!="object"?null:(n=P&&n[P]||n["@@iterator"],typeof n=="function"?n:null)}var I=Symbol.for("react.client.reference");function $(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===I?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case m:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case D:return"Suspense";case w:return"SuspenseList";case O:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case C:return n.displayName||"Context";case x:return(n._context.displayName||"Context")+".Consumer";case E:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case M:return s=n.displayName||null,s!==null?s:$(n.type)||"Memo";case T:s=n._payload,n=n._init;try{return $(n(s))}catch{}}return null}var V=Array.isArray,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},N=[],H=-1;function z(n){return{current:n}}function q(n){0>H||(n.current=N[H],N[H]=null,H--)}function J(n,s){H++,N[H]=n.current,n.current=s}var ie=z(null),pe=z(null),he=z(null),Z=z(null);function W(n,s){switch(J(he,s),J(pe,n),J(ie,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?cS(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=cS(s),n=hS(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}q(ie),J(ie,n)}function te(){q(ie),q(pe),q(he)}function Q(n){n.memoizedState!==null&&J(Z,n);var s=ie.current,h=hS(s,n.type);s!==h&&(J(pe,n),J(ie,h))}function se(n){pe.current===n&&(q(ie),q(pe)),Z.current===n&&(q(Z),du._currentValue=G)}var re,be;function ve(n){if(re===void 0)try{throw Error()}catch(h){var s=h.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||"",be=-1<h.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+re+n+be}var Se=!1;function Le(n,s){if(!n||Se)return"";Se=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var _={DetermineComponentFrameRoot:function(){try{if(s){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(fe){var ce=fe}Reflect.construct(n,[],ye)}else{try{ye.call()}catch(fe){ce=fe}n.call(ye.prototype)}}else{try{throw Error()}catch(fe){ce=fe}(ye=n())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(fe){if(fe&&ce&&typeof fe.stack=="string")return[fe.stack,ce.stack]}return[null,null]}};_.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var A=Object.getOwnPropertyDescriptor(_.DetermineComponentFrameRoot,"name");A&&A.configurable&&Object.defineProperty(_.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=_.DetermineComponentFrameRoot(),F=k[0],Y=k[1];if(F&&Y){var ee=F.split(`
|
|
44
|
+
`),le=Y.split(`
|
|
45
|
+
`);for(A=_=0;_<ee.length&&!ee[_].includes("DetermineComponentFrameRoot");)_++;for(;A<le.length&&!le[A].includes("DetermineComponentFrameRoot");)A++;if(_===ee.length||A===le.length)for(_=ee.length-1,A=le.length-1;1<=_&&0<=A&&ee[_]!==le[A];)A--;for(;1<=_&&0<=A;_--,A--)if(ee[_]!==le[A]){if(_!==1||A!==1)do if(_--,A--,0>A||ee[_]!==le[A]){var me=`
|
|
46
|
+
`+ee[_].replace(" at new "," at ");return n.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",n.displayName)),me}while(1<=_&&0<=A);break}}}finally{Se=!1,Error.prepareStackTrace=h}return(h=n?n.displayName||n.name:"")?ve(h):""}function xe(n,s){switch(n.tag){case 26:case 27:case 5:return ve(n.type);case 16:return ve("Lazy");case 13:return n.child!==s&&s!==null?ve("Suspense Fallback"):ve("Suspense");case 19:return ve("SuspenseList");case 0:case 15:return Le(n.type,!1);case 11:return Le(n.type.render,!1);case 1:return Le(n.type,!0);case 31:return ve("Activity");default:return""}}function Ke(n){try{var s="",h=null;do s+=xe(n,h),h=n,n=n.return;while(n);return s}catch(_){return`
|
|
47
|
+
Error generating stack: `+_.message+`
|
|
48
|
+
`+_.stack}}var xt=Object.prototype.hasOwnProperty,Ae=e.unstable_scheduleCallback,Ce=e.unstable_cancelCallback,we=e.unstable_shouldYield,de=e.unstable_requestPaint,Ee=e.unstable_now,$e=e.unstable_getCurrentPriorityLevel,je=e.unstable_ImmediatePriority,qt=e.unstable_UserBlockingPriority,ct=e.unstable_NormalPriority,_t=e.unstable_LowPriority,Ue=e.unstable_IdlePriority,Pe=e.log,Oe=e.unstable_setDisableYieldValue,rr=null,yt=null;function Wt(n){if(typeof Pe=="function"&&Oe(n),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(rr,n)}catch{}}var Rt=Math.clz32?Math.clz32:Yi,Ur=Math.log,Ki=Math.LN2;function Yi(n){return n>>>=0,n===0?32:31-(Ur(n)/Ki|0)|0}var Pt=256,yr=262144,qr=4194304;function Br(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Ka(n,s,h){var _=n.pendingLanes;if(_===0)return 0;var A=0,k=n.suspendedLanes,F=n.pingedLanes;n=n.warmLanes;var Y=_&134217727;return Y!==0?(_=Y&~k,_!==0?A=Br(_):(F&=Y,F!==0?A=Br(F):h||(h=Y&~n,h!==0&&(A=Br(h))))):(Y=_&~k,Y!==0?A=Br(Y):F!==0?A=Br(F):h||(h=_&~n,h!==0&&(A=Br(h)))),A===0?0:s!==0&&s!==A&&(s&k)===0&&(k=A&-A,h=s&-s,k>=h||k===32&&(h&4194048)!==0)?s:A}function Sn(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function El(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wc(){var n=qr;return qr<<=1,(qr&62914560)===0&&(qr=4194304),n}function xn(n){for(var s=[],h=0;31>h;h++)s.push(n);return s}function Zs(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function r0(n,s,h,_,A,k){var F=n.pendingLanes;n.pendingLanes=h,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=h,n.entangledLanes&=h,n.errorRecoveryDisabledLanes&=h,n.shellSuspendCounter=0;var Y=n.entanglements,ee=n.expirationTimes,le=n.hiddenUpdates;for(h=F&~h;0<h;){var me=31-Rt(h),ye=1<<me;Y[me]=0,ee[me]=-1;var ce=le[me];if(ce!==null)for(le[me]=null,me=0;me<ce.length;me++){var fe=ce[me];fe!==null&&(fe.lane&=-536870913)}h&=~ye}_!==0&&Tt(n,_,0),k!==0&&A===0&&n.tag!==0&&(n.suspendedLanes|=k&~(F&~s))}function Tt(n,s,h){n.pendingLanes|=s,n.suspendedLanes&=~s;var _=31-Rt(s);n.entangledLanes|=s,n.entanglements[_]=n.entanglements[_]|1073741824|h&261930}function Cn(n,s){var h=n.entangledLanes|=s;for(n=n.entanglements;h;){var _=31-Rt(h),A=1<<_;A&s|n[_]&s&&(n[_]|=s),h&=~A}}function Ec(n,s){var h=s&-s;return h=(h&42)!==0?1:Ya(h),(h&(n.suspendedLanes|s))!==0?0:h}function Ya(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Qs(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Al(){var n=K.p;return n!==0?n:(n=window.event,n===void 0?32:PS(n.type))}function Dl(n,s){var h=K.p;try{return K.p=n,s()}finally{K.p=h}}var Vi=Math.random().toString(36).slice(2),ot="__reactFiber$"+Vi,It="__reactProps$"+Vi,wn="__reactContainer$"+Vi,Va="__reactEvents$"+Vi,Tl="__reactListeners$"+Vi,Xa="__reactHandles$"+Vi,En="__reactResources$"+Vi,Xi="__reactMarker$"+Vi;function ei(n){delete n[ot],delete n[It],delete n[Va],delete n[Tl],delete n[Xa]}function An(n){var s=n[ot];if(s)return s;for(var h=n.parentNode;h;){if(s=h[wn]||h[ot]){if(h=s.alternate,s.child!==null||h!==null&&h.child!==null)for(n=_S(n);n!==null;){if(h=n[ot])return h;n=_S(n)}return s}n=h,h=n.parentNode}return null}function Dn(n){if(n=n[ot]||n[wn]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function Js(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(i(33))}function Tn(n){var s=n[En];return s||(s=n[En]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Gt(n){n[Xi]=!0}var ea=new Set,Mn={};function Te(n,s){X(n,s),X(n+"Capture",s)}function X(n,s){for(Mn[n]=s,n=0;n<s.length;n++)ea.add(s[n])}var ge=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),De={},et={};function qe(n){return xt.call(et,n)?!0:xt.call(De,n)?!1:ge.test(n)?et[n]=!0:(De[n]=!0,!1)}function tt(n,s,h){if(qe(s))if(h===null)n.removeAttribute(s);else{switch(typeof h){case"undefined":case"function":case"symbol":n.removeAttribute(s);return;case"boolean":var _=s.toLowerCase().slice(0,5);if(_!=="data-"&&_!=="aria-"){n.removeAttribute(s);return}}n.setAttribute(s,""+h)}}function Mt(n,s,h){if(h===null)n.removeAttribute(s);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttribute(s,""+h)}}function Nt(n,s,h,_){if(_===null)n.removeAttribute(h);else{switch(typeof _){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(h);return}n.setAttributeNS(s,h,""+_)}}function kt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Za(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Vt(n,s,h){var _=Object.getOwnPropertyDescriptor(n.constructor.prototype,s);if(!n.hasOwnProperty(s)&&typeof _<"u"&&typeof _.get=="function"&&typeof _.set=="function"){var A=_.get,k=_.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return A.call(this)},set:function(F){h=""+F,k.call(this,F)}}),Object.defineProperty(n,s,{enumerable:_.enumerable}),{getValue:function(){return h},setValue:function(F){h=""+F},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function Qa(n){if(!n._valueTracker){var s=Za(n)?"checked":"value";n._valueTracker=Vt(n,s,""+n[s])}}function Ml(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var h=s.getValue(),_="";return n&&(_=Za(n)?n.checked?"true":"false":n.value),n=_,n!==h?(s.setValue(n),!0):!1}function Ac(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var IM=/[\n"\\]/g;function mi(n){return n.replace(IM,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function i0(n,s,h,_,A,k,F,Y){n.name="",F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?n.type=F:n.removeAttribute("type"),s!=null?F==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+kt(s)):n.value!==""+kt(s)&&(n.value=""+kt(s)):F!=="submit"&&F!=="reset"||n.removeAttribute("value"),s!=null?n0(n,F,kt(s)):h!=null?n0(n,F,kt(h)):_!=null&&n.removeAttribute("value"),A==null&&k!=null&&(n.defaultChecked=!!k),A!=null&&(n.checked=A&&typeof A!="function"&&typeof A!="symbol"),Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?n.name=""+kt(Y):n.removeAttribute("name")}function ny(n,s,h,_,A,k,F,Y){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(n.type=k),s!=null||h!=null){if(!(k!=="submit"&&k!=="reset"||s!=null)){Qa(n);return}h=h!=null?""+kt(h):"",s=s!=null?""+kt(s):h,Y||s===n.value||(n.value=s),n.defaultValue=s}_=_??A,_=typeof _!="function"&&typeof _!="symbol"&&!!_,n.checked=Y?n.checked:!!_,n.defaultChecked=!!_,F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(n.name=F),Qa(n)}function n0(n,s,h){s==="number"&&Ac(n.ownerDocument)===n||n.defaultValue===""+h||(n.defaultValue=""+h)}function Ja(n,s,h,_){if(n=n.options,s){s={};for(var A=0;A<h.length;A++)s["$"+h[A]]=!0;for(h=0;h<n.length;h++)A=s.hasOwnProperty("$"+n[h].value),n[h].selected!==A&&(n[h].selected=A),A&&_&&(n[h].defaultSelected=!0)}else{for(h=""+kt(h),s=null,A=0;A<n.length;A++){if(n[A].value===h){n[A].selected=!0,_&&(n[A].defaultSelected=!0);return}s!==null||n[A].disabled||(s=n[A])}s!==null&&(s.selected=!0)}}function sy(n,s,h){if(s!=null&&(s=""+kt(s),s!==n.value&&(n.value=s),h==null)){n.defaultValue!==s&&(n.defaultValue=s);return}n.defaultValue=h!=null?""+kt(h):""}function ay(n,s,h,_){if(s==null){if(_!=null){if(h!=null)throw Error(i(92));if(V(_)){if(1<_.length)throw Error(i(93));_=_[0]}h=_}h==null&&(h=""),s=h}h=kt(s),n.defaultValue=h,_=n.textContent,_===h&&_!==""&&_!==null&&(n.value=_),Qa(n)}function eo(n,s){if(s){var h=n.firstChild;if(h&&h===n.lastChild&&h.nodeType===3){h.nodeValue=s;return}}n.textContent=s}var NM=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function oy(n,s,h){var _=s.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?_?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="":_?n.setProperty(s,h):typeof h!="number"||h===0||NM.has(s)?s==="float"?n.cssFloat=h:n[s]=(""+h).trim():n[s]=h+"px"}function ly(n,s,h){if(s!=null&&typeof s!="object")throw Error(i(62));if(n=n.style,h!=null){for(var _ in h)!h.hasOwnProperty(_)||s!=null&&s.hasOwnProperty(_)||(_.indexOf("--")===0?n.setProperty(_,""):_==="float"?n.cssFloat="":n[_]="");for(var A in s)_=s[A],s.hasOwnProperty(A)&&h[A]!==_&&oy(n,A,_)}else for(var k in s)s.hasOwnProperty(k)&&oy(n,k,s[k])}function s0(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jM=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),FM=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Dc(n){return FM.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function kn(){}var a0=null;function o0(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var to=null,ro=null;function uy(n){var s=Dn(n);if(s&&(n=s.stateNode)){var h=n[It]||null;e:switch(n=s.stateNode,s.type){case"input":if(i0(n,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),s=h.name,h.type==="radio"&&s!=null){for(h=n;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+mi(""+s)+'"][type="radio"]'),s=0;s<h.length;s++){var _=h[s];if(_!==n&&_.form===n.form){var A=_[It]||null;if(!A)throw Error(i(90));i0(_,A.value,A.defaultValue,A.defaultValue,A.checked,A.defaultChecked,A.type,A.name)}}for(s=0;s<h.length;s++)_=h[s],_.form===n.form&&Ml(_)}break e;case"textarea":sy(n,h.value,h.defaultValue);break e;case"select":s=h.value,s!=null&&Ja(n,!!h.multiple,s,!1)}}}var l0=!1;function cy(n,s,h){if(l0)return n(s,h);l0=!0;try{var _=n(s);return _}finally{if(l0=!1,(to!==null||ro!==null)&&(ph(),to&&(s=to,n=ro,ro=to=null,uy(s),n)))for(s=0;s<n.length;s++)uy(n[s])}}function kl(n,s){var h=n.stateNode;if(h===null)return null;var _=h[It]||null;if(_===null)return null;h=_[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(_=!_.disabled)||(n=n.type,_=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!_;break e;default:n=!1}if(n)return null;if(h&&typeof h!="function")throw Error(i(231,s,typeof h));return h}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u0=!1;if(On)try{var Ol={};Object.defineProperty(Ol,"passive",{get:function(){u0=!0}}),window.addEventListener("test",Ol,Ol),window.removeEventListener("test",Ol,Ol)}catch{u0=!1}var cs=null,c0=null,Tc=null;function hy(){if(Tc)return Tc;var n,s=c0,h=s.length,_,A="value"in cs?cs.value:cs.textContent,k=A.length;for(n=0;n<h&&s[n]===A[n];n++);var F=h-n;for(_=1;_<=F&&s[h-_]===A[k-_];_++);return Tc=A.slice(n,1<_?1-_:void 0)}function Mc(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function kc(){return!0}function fy(){return!1}function Wr(n){function s(h,_,A,k,F){this._reactName=h,this._targetInst=A,this.type=_,this.nativeEvent=k,this.target=F,this.currentTarget=null;for(var Y in n)n.hasOwnProperty(Y)&&(h=n[Y],this[Y]=h?h(k):k[Y]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?kc:fy,this.isPropagationStopped=fy,this}return f(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=kc)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=kc)},persist:function(){},isPersistent:kc}),s}var ta={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Oc=Wr(ta),Ll=f({},ta,{view:0,detail:0}),zM=Wr(Ll),h0,f0,Rl,Lc=f({},Ll,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:p0,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Rl&&(Rl&&n.type==="mousemove"?(h0=n.screenX-Rl.screenX,f0=n.screenY-Rl.screenY):f0=h0=0,Rl=n),h0)},movementY:function(n){return"movementY"in n?n.movementY:f0}}),dy=Wr(Lc),HM=f({},Lc,{dataTransfer:0}),$M=Wr(HM),UM=f({},Ll,{relatedTarget:0}),d0=Wr(UM),qM=f({},ta,{animationName:0,elapsedTime:0,pseudoElement:0}),WM=Wr(qM),GM=f({},ta,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),KM=Wr(GM),YM=f({},ta,{data:0}),py=Wr(YM),VM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ZM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QM(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=ZM[n])?!!s[n]:!1}function p0(){return QM}var JM=f({},Ll,{key:function(n){if(n.key){var s=VM[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Mc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?XM[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:p0,charCode:function(n){return n.type==="keypress"?Mc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Mc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),ek=Wr(JM),tk=f({},Lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vy=Wr(tk),rk=f({},Ll,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:p0}),ik=Wr(rk),nk=f({},ta,{propertyName:0,elapsedTime:0,pseudoElement:0}),sk=Wr(nk),ak=f({},Lc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),ok=Wr(ak),lk=f({},ta,{newState:0,oldState:0}),uk=Wr(lk),ck=[9,13,27,32],v0=On&&"CompositionEvent"in window,Pl=null;On&&"documentMode"in document&&(Pl=document.documentMode);var hk=On&&"TextEvent"in window&&!Pl,my=On&&(!v0||Pl&&8<Pl&&11>=Pl),gy=" ",_y=!1;function yy(n,s){switch(n){case"keyup":return ck.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function by(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var io=!1;function fk(n,s){switch(n){case"compositionend":return by(s);case"keypress":return s.which!==32?null:(_y=!0,gy);case"textInput":return n=s.data,n===gy&&_y?null:n;default:return null}}function dk(n,s){if(io)return n==="compositionend"||!v0&&yy(n,s)?(n=hy(),Tc=c0=cs=null,io=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return my&&s.locale!=="ko"?null:s.data;default:return null}}var pk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Sy(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!pk[n.type]:s==="textarea"}function xy(n,s,h,_){to?ro?ro.push(_):ro=[_]:to=_,s=Sh(s,"onChange"),0<s.length&&(h=new Oc("onChange","change",null,h,_),n.push({event:h,listeners:s}))}var Bl=null,Il=null;function vk(n){nS(n,0)}function Rc(n){var s=Js(n);if(Ml(s))return n}function Cy(n,s){if(n==="change")return s}var wy=!1;if(On){var m0;if(On){var g0="oninput"in document;if(!g0){var Ey=document.createElement("div");Ey.setAttribute("oninput","return;"),g0=typeof Ey.oninput=="function"}m0=g0}else m0=!1;wy=m0&&(!document.documentMode||9<document.documentMode)}function Ay(){Bl&&(Bl.detachEvent("onpropertychange",Dy),Il=Bl=null)}function Dy(n){if(n.propertyName==="value"&&Rc(Il)){var s=[];xy(s,Il,n,o0(n)),cy(vk,s)}}function mk(n,s,h){n==="focusin"?(Ay(),Bl=s,Il=h,Bl.attachEvent("onpropertychange",Dy)):n==="focusout"&&Ay()}function gk(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Rc(Il)}function _k(n,s){if(n==="click")return Rc(s)}function yk(n,s){if(n==="input"||n==="change")return Rc(s)}function bk(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var ti=typeof Object.is=="function"?Object.is:bk;function Nl(n,s){if(ti(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var h=Object.keys(n),_=Object.keys(s);if(h.length!==_.length)return!1;for(_=0;_<h.length;_++){var A=h[_];if(!xt.call(s,A)||!ti(n[A],s[A]))return!1}return!0}function Ty(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function My(n,s){var h=Ty(n);n=0;for(var _;h;){if(h.nodeType===3){if(_=n+h.textContent.length,n<=s&&_>=s)return{node:h,offset:s-n};n=_}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=Ty(h)}}function ky(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?ky(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function Oy(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var s=Ac(n.document);s instanceof n.HTMLIFrameElement;){try{var h=typeof s.contentWindow.location.href=="string"}catch{h=!1}if(h)n=s.contentWindow;else break;s=Ac(n.document)}return s}function _0(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}var Sk=On&&"documentMode"in document&&11>=document.documentMode,no=null,y0=null,jl=null,b0=!1;function Ly(n,s,h){var _=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;b0||no==null||no!==Ac(_)||(_=no,"selectionStart"in _&&_0(_)?_={start:_.selectionStart,end:_.selectionEnd}:(_=(_.ownerDocument&&_.ownerDocument.defaultView||window).getSelection(),_={anchorNode:_.anchorNode,anchorOffset:_.anchorOffset,focusNode:_.focusNode,focusOffset:_.focusOffset}),jl&&Nl(jl,_)||(jl=_,_=Sh(y0,"onSelect"),0<_.length&&(s=new Oc("onSelect","select",null,s,h),n.push({event:s,listeners:_}),s.target=no)))}function ra(n,s){var h={};return h[n.toLowerCase()]=s.toLowerCase(),h["Webkit"+n]="webkit"+s,h["Moz"+n]="moz"+s,h}var so={animationend:ra("Animation","AnimationEnd"),animationiteration:ra("Animation","AnimationIteration"),animationstart:ra("Animation","AnimationStart"),transitionrun:ra("Transition","TransitionRun"),transitionstart:ra("Transition","TransitionStart"),transitioncancel:ra("Transition","TransitionCancel"),transitionend:ra("Transition","TransitionEnd")},S0={},Ry={};On&&(Ry=document.createElement("div").style,"AnimationEvent"in window||(delete so.animationend.animation,delete so.animationiteration.animation,delete so.animationstart.animation),"TransitionEvent"in window||delete so.transitionend.transition);function ia(n){if(S0[n])return S0[n];if(!so[n])return n;var s=so[n],h;for(h in s)if(s.hasOwnProperty(h)&&h in Ry)return S0[n]=s[h];return n}var Py=ia("animationend"),By=ia("animationiteration"),Iy=ia("animationstart"),xk=ia("transitionrun"),Ck=ia("transitionstart"),wk=ia("transitioncancel"),Ny=ia("transitionend"),jy=new Map,x0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");x0.push("scrollEnd");function Ii(n,s){jy.set(n,s),Te(s,[n])}var Pc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},gi=[],ao=0,C0=0;function Bc(){for(var n=ao,s=C0=ao=0;s<n;){var h=gi[s];gi[s++]=null;var _=gi[s];gi[s++]=null;var A=gi[s];gi[s++]=null;var k=gi[s];if(gi[s++]=null,_!==null&&A!==null){var F=_.pending;F===null?A.next=A:(A.next=F.next,F.next=A),_.pending=A}k!==0&&Fy(h,A,k)}}function Ic(n,s,h,_){gi[ao++]=n,gi[ao++]=s,gi[ao++]=h,gi[ao++]=_,C0|=_,n.lanes|=_,n=n.alternate,n!==null&&(n.lanes|=_)}function w0(n,s,h,_){return Ic(n,s,h,_),Nc(n)}function na(n,s){return Ic(n,null,null,s),Nc(n)}function Fy(n,s,h){n.lanes|=h;var _=n.alternate;_!==null&&(_.lanes|=h);for(var A=!1,k=n.return;k!==null;)k.childLanes|=h,_=k.alternate,_!==null&&(_.childLanes|=h),k.tag===22&&(n=k.stateNode,n===null||n._visibility&1||(A=!0)),n=k,k=k.return;return n.tag===3?(k=n.stateNode,A&&s!==null&&(A=31-Rt(h),n=k.hiddenUpdates,_=n[A],_===null?n[A]=[s]:_.push(s),s.lane=h|536870912),k):null}function Nc(n){if(50<au)throw au=0,Rp=null,Error(i(185));for(var s=n.return;s!==null;)n=s,s=n.return;return n.tag===3?n.stateNode:null}var oo={};function Ek(n,s,h,_){this.tag=n,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ri(n,s,h,_){return new Ek(n,s,h,_)}function E0(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ln(n,s){var h=n.alternate;return h===null?(h=ri(n.tag,s,n.key,n.mode),h.elementType=n.elementType,h.type=n.type,h.stateNode=n.stateNode,h.alternate=n,n.alternate=h):(h.pendingProps=s,h.type=n.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=n.flags&65011712,h.childLanes=n.childLanes,h.lanes=n.lanes,h.child=n.child,h.memoizedProps=n.memoizedProps,h.memoizedState=n.memoizedState,h.updateQueue=n.updateQueue,s=n.dependencies,h.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},h.sibling=n.sibling,h.index=n.index,h.ref=n.ref,h.refCleanup=n.refCleanup,h}function zy(n,s){n.flags&=65011714;var h=n.alternate;return h===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=h.childLanes,n.lanes=h.lanes,n.child=h.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=h.memoizedProps,n.memoizedState=h.memoizedState,n.updateQueue=h.updateQueue,n.type=h.type,s=h.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),n}function jc(n,s,h,_,A,k){var F=0;if(_=n,typeof n=="function")E0(n)&&(F=1);else if(typeof n=="string")F=kO(n,h,ie.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case O:return n=ri(31,h,s,A),n.elementType=O,n.lanes=k,n;case m:return sa(h.children,A,k,s);case v:F=8,A|=24;break;case y:return n=ri(12,h,s,A|2),n.elementType=y,n.lanes=k,n;case D:return n=ri(13,h,s,A),n.elementType=D,n.lanes=k,n;case w:return n=ri(19,h,s,A),n.elementType=w,n.lanes=k,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case C:F=10;break e;case x:F=9;break e;case E:F=11;break e;case M:F=14;break e;case T:F=16,_=null;break e}F=29,h=Error(i(130,n===null?"null":typeof n,"")),_=null}return s=ri(F,h,s,A),s.elementType=n,s.type=_,s.lanes=k,s}function sa(n,s,h,_){return n=ri(7,n,_,s),n.lanes=h,n}function A0(n,s,h){return n=ri(6,n,null,s),n.lanes=h,n}function Hy(n){var s=ri(18,null,null,0);return s.stateNode=n,s}function D0(n,s,h){return s=ri(4,n.children!==null?n.children:[],n.key,s),s.lanes=h,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}var $y=new WeakMap;function _i(n,s){if(typeof n=="object"&&n!==null){var h=$y.get(n);return h!==void 0?h:(s={value:n,source:s,stack:Ke(s)},$y.set(n,s),s)}return{value:n,source:s,stack:Ke(s)}}var lo=[],uo=0,Fc=null,Fl=0,yi=[],bi=0,hs=null,Zi=1,Qi="";function Rn(n,s){lo[uo++]=Fl,lo[uo++]=Fc,Fc=n,Fl=s}function Uy(n,s,h){yi[bi++]=Zi,yi[bi++]=Qi,yi[bi++]=hs,hs=n;var _=Zi;n=Qi;var A=32-Rt(_)-1;_&=~(1<<A),h+=1;var k=32-Rt(s)+A;if(30<k){var F=A-A%5;k=(_&(1<<F)-1).toString(32),_>>=F,A-=F,Zi=1<<32-Rt(s)+A|h<<A|_,Qi=k+n}else Zi=1<<k|h<<A|_,Qi=n}function T0(n){n.return!==null&&(Rn(n,1),Uy(n,1,0))}function M0(n){for(;n===Fc;)Fc=lo[--uo],lo[uo]=null,Fl=lo[--uo],lo[uo]=null;for(;n===hs;)hs=yi[--bi],yi[bi]=null,Qi=yi[--bi],yi[bi]=null,Zi=yi[--bi],yi[bi]=null}function qy(n,s){yi[bi++]=Zi,yi[bi++]=Qi,yi[bi++]=hs,Zi=s.id,Qi=s.overflow,hs=n}var br=null,Ct=null,Qe=!1,fs=null,Si=!1,k0=Error(i(519));function ds(n){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zl(_i(s,n)),k0}function Wy(n){var s=n.stateNode,h=n.type,_=n.memoizedProps;switch(s[ot]=n,s[It]=_,h){case"dialog":Ve("cancel",s),Ve("close",s);break;case"iframe":case"object":case"embed":Ve("load",s);break;case"video":case"audio":for(h=0;h<lu.length;h++)Ve(lu[h],s);break;case"source":Ve("error",s);break;case"img":case"image":case"link":Ve("error",s),Ve("load",s);break;case"details":Ve("toggle",s);break;case"input":Ve("invalid",s),ny(s,_.value,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name,!0);break;case"select":Ve("invalid",s);break;case"textarea":Ve("invalid",s),ay(s,_.value,_.defaultValue,_.children)}h=_.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||s.textContent===""+h||_.suppressHydrationWarning===!0||lS(s.textContent,h)?(_.popover!=null&&(Ve("beforetoggle",s),Ve("toggle",s)),_.onScroll!=null&&Ve("scroll",s),_.onScrollEnd!=null&&Ve("scrollend",s),_.onClick!=null&&(s.onclick=kn),s=!0):s=!1,s||ds(n,!0)}function Gy(n){for(br=n.return;br;)switch(br.tag){case 5:case 31:case 13:Si=!1;return;case 27:case 3:Si=!0;return;default:br=br.return}}function co(n){if(n!==br)return!1;if(!Qe)return Gy(n),Qe=!0,!1;var s=n.tag,h;if((h=s!==3&&s!==27)&&((h=s===5)&&(h=n.type,h=!(h!=="form"&&h!=="button")||Yp(n.type,n.memoizedProps)),h=!h),h&&Ct&&ds(n),Gy(n),s===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Ct=gS(n)}else if(s===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Ct=gS(n)}else s===27?(s=Ct,Ds(n.type)?(n=Jp,Jp=null,Ct=n):Ct=s):Ct=br?Ci(n.stateNode.nextSibling):null;return!0}function aa(){Ct=br=null,Qe=!1}function O0(){var n=fs;return n!==null&&(Vr===null?Vr=n:Vr.push.apply(Vr,n),fs=null),n}function zl(n){fs===null?fs=[n]:fs.push(n)}var L0=z(null),oa=null,Pn=null;function ps(n,s,h){J(L0,s._currentValue),s._currentValue=h}function Bn(n){n._currentValue=L0.current,q(L0)}function R0(n,s,h){for(;n!==null;){var _=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,_!==null&&(_.childLanes|=s)):_!==null&&(_.childLanes&s)!==s&&(_.childLanes|=s),n===h)break;n=n.return}}function P0(n,s,h,_){var A=n.child;for(A!==null&&(A.return=n);A!==null;){var k=A.dependencies;if(k!==null){var F=A.child;k=k.firstContext;e:for(;k!==null;){var Y=k;k=A;for(var ee=0;ee<s.length;ee++)if(Y.context===s[ee]){k.lanes|=h,Y=k.alternate,Y!==null&&(Y.lanes|=h),R0(k.return,h,n),_||(F=null);break e}k=Y.next}}else if(A.tag===18){if(F=A.return,F===null)throw Error(i(341));F.lanes|=h,k=F.alternate,k!==null&&(k.lanes|=h),R0(F,h,n),F=null}else F=A.child;if(F!==null)F.return=A;else for(F=A;F!==null;){if(F===n){F=null;break}if(A=F.sibling,A!==null){A.return=F.return,F=A;break}F=F.return}A=F}}function ho(n,s,h,_){n=null;for(var A=s,k=!1;A!==null;){if(!k){if((A.flags&524288)!==0)k=!0;else if((A.flags&262144)!==0)break}if(A.tag===10){var F=A.alternate;if(F===null)throw Error(i(387));if(F=F.memoizedProps,F!==null){var Y=A.type;ti(A.pendingProps.value,F.value)||(n!==null?n.push(Y):n=[Y])}}else if(A===Z.current){if(F=A.alternate,F===null)throw Error(i(387));F.memoizedState.memoizedState!==A.memoizedState.memoizedState&&(n!==null?n.push(du):n=[du])}A=A.return}n!==null&&P0(s,n,h,_),s.flags|=262144}function zc(n){for(n=n.firstContext;n!==null;){if(!ti(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function la(n){oa=n,Pn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Sr(n){return Ky(oa,n)}function Hc(n,s){return oa===null&&la(n),Ky(n,s)}function Ky(n,s){var h=s._currentValue;if(s={context:s,memoizedValue:h,next:null},Pn===null){if(n===null)throw Error(i(308));Pn=s,n.dependencies={lanes:0,firstContext:s},n.flags|=524288}else Pn=Pn.next=s;return h}var Ak=typeof AbortController<"u"?AbortController:function(){var n=[],s=this.signal={aborted:!1,addEventListener:function(h,_){n.push(_)}};this.abort=function(){s.aborted=!0,n.forEach(function(h){return h()})}},Dk=e.unstable_scheduleCallback,Tk=e.unstable_NormalPriority,Xt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function B0(){return{controller:new Ak,data:new Map,refCount:0}}function Hl(n){n.refCount--,n.refCount===0&&Dk(Tk,function(){n.controller.abort()})}var $l=null,I0=0,fo=0,po=null;function Mk(n,s){if($l===null){var h=$l=[];I0=0,fo=Fp(),po={status:"pending",value:void 0,then:function(_){h.push(_)}}}return I0++,s.then(Yy,Yy),s}function Yy(){if(--I0===0&&$l!==null){po!==null&&(po.status="fulfilled");var n=$l;$l=null,fo=0,po=null;for(var s=0;s<n.length;s++)(0,n[s])()}}function kk(n,s){var h=[],_={status:"pending",value:null,reason:null,then:function(A){h.push(A)}};return n.then(function(){_.status="fulfilled",_.value=s;for(var A=0;A<h.length;A++)(0,h[A])(s)},function(A){for(_.status="rejected",_.reason=A,A=0;A<h.length;A++)(0,h[A])(void 0)}),_}var Vy=U.S;U.S=function(n,s){L2=Ee(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Mk(n,s),Vy!==null&&Vy(n,s)};var ua=z(null);function N0(){var n=ua.current;return n!==null?n:vt.pooledCache}function $c(n,s){s===null?J(ua,ua.current):J(ua,s.pool)}function Xy(){var n=N0();return n===null?null:{parent:Xt._currentValue,pool:n}}var vo=Error(i(460)),j0=Error(i(474)),Uc=Error(i(542)),qc={then:function(){}};function Zy(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Qy(n,s,h){switch(h=n[h],h===void 0?n.push(s):h!==s&&(s.then(kn,kn),s=h),s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,eb(n),n;default:if(typeof s.status=="string")s.then(kn,kn);else{if(n=vt,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=s,n.status="pending",n.then(function(_){if(s.status==="pending"){var A=s;A.status="fulfilled",A.value=_}},function(_){if(s.status==="pending"){var A=s;A.status="rejected",A.reason=_}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw n=s.reason,eb(n),n}throw ha=s,vo}}function ca(n){try{var s=n._init;return s(n._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(ha=h,vo):h}}var ha=null;function Jy(){if(ha===null)throw Error(i(459));var n=ha;return ha=null,n}function eb(n){if(n===vo||n===Uc)throw Error(i(483))}var mo=null,Ul=0;function Wc(n){var s=Ul;return Ul+=1,mo===null&&(mo=[]),Qy(mo,n,s)}function ql(n,s){s=s.props.ref,n.ref=s!==void 0?s:null}function Gc(n,s){throw s.$$typeof===g?Error(i(525)):(n=Object.prototype.toString.call(s),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n)))}function tb(n){function s(ae,ne){if(n){var oe=ae.deletions;oe===null?(ae.deletions=[ne],ae.flags|=16):oe.push(ne)}}function h(ae,ne){if(!n)return null;for(;ne!==null;)s(ae,ne),ne=ne.sibling;return null}function _(ae){for(var ne=new Map;ae!==null;)ae.key!==null?ne.set(ae.key,ae):ne.set(ae.index,ae),ae=ae.sibling;return ne}function A(ae,ne){return ae=Ln(ae,ne),ae.index=0,ae.sibling=null,ae}function k(ae,ne,oe){return ae.index=oe,n?(oe=ae.alternate,oe!==null?(oe=oe.index,oe<ne?(ae.flags|=67108866,ne):oe):(ae.flags|=67108866,ne)):(ae.flags|=1048576,ne)}function F(ae){return n&&ae.alternate===null&&(ae.flags|=67108866),ae}function Y(ae,ne,oe,_e){return ne===null||ne.tag!==6?(ne=A0(oe,ae.mode,_e),ne.return=ae,ne):(ne=A(ne,oe),ne.return=ae,ne)}function ee(ae,ne,oe,_e){var Be=oe.type;return Be===m?me(ae,ne,oe.props.children,_e,oe.key):ne!==null&&(ne.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===T&&ca(Be)===ne.type)?(ne=A(ne,oe.props),ql(ne,oe),ne.return=ae,ne):(ne=jc(oe.type,oe.key,oe.props,null,ae.mode,_e),ql(ne,oe),ne.return=ae,ne)}function le(ae,ne,oe,_e){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==oe.containerInfo||ne.stateNode.implementation!==oe.implementation?(ne=D0(oe,ae.mode,_e),ne.return=ae,ne):(ne=A(ne,oe.children||[]),ne.return=ae,ne)}function me(ae,ne,oe,_e,Be){return ne===null||ne.tag!==7?(ne=sa(oe,ae.mode,_e,Be),ne.return=ae,ne):(ne=A(ne,oe),ne.return=ae,ne)}function ye(ae,ne,oe){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return ne=A0(""+ne,ae.mode,oe),ne.return=ae,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case b:return oe=jc(ne.type,ne.key,ne.props,null,ae.mode,oe),ql(oe,ne),oe.return=ae,oe;case S:return ne=D0(ne,ae.mode,oe),ne.return=ae,ne;case T:return ne=ca(ne),ye(ae,ne,oe)}if(V(ne)||R(ne))return ne=sa(ne,ae.mode,oe,null),ne.return=ae,ne;if(typeof ne.then=="function")return ye(ae,Wc(ne),oe);if(ne.$$typeof===C)return ye(ae,Hc(ae,ne),oe);Gc(ae,ne)}return null}function ce(ae,ne,oe,_e){var Be=ne!==null?ne.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Be!==null?null:Y(ae,ne,""+oe,_e);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return oe.key===Be?ee(ae,ne,oe,_e):null;case S:return oe.key===Be?le(ae,ne,oe,_e):null;case T:return oe=ca(oe),ce(ae,ne,oe,_e)}if(V(oe)||R(oe))return Be!==null?null:me(ae,ne,oe,_e,null);if(typeof oe.then=="function")return ce(ae,ne,Wc(oe),_e);if(oe.$$typeof===C)return ce(ae,ne,Hc(ae,oe),_e);Gc(ae,oe)}return null}function fe(ae,ne,oe,_e,Be){if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return ae=ae.get(oe)||null,Y(ne,ae,""+_e,Be);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case b:return ae=ae.get(_e.key===null?oe:_e.key)||null,ee(ne,ae,_e,Be);case S:return ae=ae.get(_e.key===null?oe:_e.key)||null,le(ne,ae,_e,Be);case T:return _e=ca(_e),fe(ae,ne,oe,_e,Be)}if(V(_e)||R(_e))return ae=ae.get(oe)||null,me(ne,ae,_e,Be,null);if(typeof _e.then=="function")return fe(ae,ne,oe,Wc(_e),Be);if(_e.$$typeof===C)return fe(ae,ne,oe,Hc(ne,_e),Be);Gc(ne,_e)}return null}function ke(ae,ne,oe,_e){for(var Be=null,rt=null,Re=ne,We=ne=0,Ze=null;Re!==null&&We<oe.length;We++){Re.index>We?(Ze=Re,Re=null):Ze=Re.sibling;var it=ce(ae,Re,oe[We],_e);if(it===null){Re===null&&(Re=Ze);break}n&&Re&&it.alternate===null&&s(ae,Re),ne=k(it,ne,We),rt===null?Be=it:rt.sibling=it,rt=it,Re=Ze}if(We===oe.length)return h(ae,Re),Qe&&Rn(ae,We),Be;if(Re===null){for(;We<oe.length;We++)Re=ye(ae,oe[We],_e),Re!==null&&(ne=k(Re,ne,We),rt===null?Be=Re:rt.sibling=Re,rt=Re);return Qe&&Rn(ae,We),Be}for(Re=_(Re);We<oe.length;We++)Ze=fe(Re,ae,We,oe[We],_e),Ze!==null&&(n&&Ze.alternate!==null&&Re.delete(Ze.key===null?We:Ze.key),ne=k(Ze,ne,We),rt===null?Be=Ze:rt.sibling=Ze,rt=Ze);return n&&Re.forEach(function(Ls){return s(ae,Ls)}),Qe&&Rn(ae,We),Be}function Fe(ae,ne,oe,_e){if(oe==null)throw Error(i(151));for(var Be=null,rt=null,Re=ne,We=ne=0,Ze=null,it=oe.next();Re!==null&&!it.done;We++,it=oe.next()){Re.index>We?(Ze=Re,Re=null):Ze=Re.sibling;var Ls=ce(ae,Re,it.value,_e);if(Ls===null){Re===null&&(Re=Ze);break}n&&Re&&Ls.alternate===null&&s(ae,Re),ne=k(Ls,ne,We),rt===null?Be=Ls:rt.sibling=Ls,rt=Ls,Re=Ze}if(it.done)return h(ae,Re),Qe&&Rn(ae,We),Be;if(Re===null){for(;!it.done;We++,it=oe.next())it=ye(ae,it.value,_e),it!==null&&(ne=k(it,ne,We),rt===null?Be=it:rt.sibling=it,rt=it);return Qe&&Rn(ae,We),Be}for(Re=_(Re);!it.done;We++,it=oe.next())it=fe(Re,ae,We,it.value,_e),it!==null&&(n&&it.alternate!==null&&Re.delete(it.key===null?We:it.key),ne=k(it,ne,We),rt===null?Be=it:rt.sibling=it,rt=it);return n&&Re.forEach(function(HO){return s(ae,HO)}),Qe&&Rn(ae,We),Be}function dt(ae,ne,oe,_e){if(typeof oe=="object"&&oe!==null&&oe.type===m&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:e:{for(var Be=oe.key;ne!==null;){if(ne.key===Be){if(Be=oe.type,Be===m){if(ne.tag===7){h(ae,ne.sibling),_e=A(ne,oe.props.children),_e.return=ae,ae=_e;break e}}else if(ne.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===T&&ca(Be)===ne.type){h(ae,ne.sibling),_e=A(ne,oe.props),ql(_e,oe),_e.return=ae,ae=_e;break e}h(ae,ne);break}else s(ae,ne);ne=ne.sibling}oe.type===m?(_e=sa(oe.props.children,ae.mode,_e,oe.key),_e.return=ae,ae=_e):(_e=jc(oe.type,oe.key,oe.props,null,ae.mode,_e),ql(_e,oe),_e.return=ae,ae=_e)}return F(ae);case S:e:{for(Be=oe.key;ne!==null;){if(ne.key===Be)if(ne.tag===4&&ne.stateNode.containerInfo===oe.containerInfo&&ne.stateNode.implementation===oe.implementation){h(ae,ne.sibling),_e=A(ne,oe.children||[]),_e.return=ae,ae=_e;break e}else{h(ae,ne);break}else s(ae,ne);ne=ne.sibling}_e=D0(oe,ae.mode,_e),_e.return=ae,ae=_e}return F(ae);case T:return oe=ca(oe),dt(ae,ne,oe,_e)}if(V(oe))return ke(ae,ne,oe,_e);if(R(oe)){if(Be=R(oe),typeof Be!="function")throw Error(i(150));return oe=Be.call(oe),Fe(ae,ne,oe,_e)}if(typeof oe.then=="function")return dt(ae,ne,Wc(oe),_e);if(oe.$$typeof===C)return dt(ae,ne,Hc(ae,oe),_e);Gc(ae,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,ne!==null&&ne.tag===6?(h(ae,ne.sibling),_e=A(ne,oe),_e.return=ae,ae=_e):(h(ae,ne),_e=A0(oe,ae.mode,_e),_e.return=ae,ae=_e),F(ae)):h(ae,ne)}return function(ae,ne,oe,_e){try{Ul=0;var Be=dt(ae,ne,oe,_e);return mo=null,Be}catch(Re){if(Re===vo||Re===Uc)throw Re;var rt=ri(29,Re,null,ae.mode);return rt.lanes=_e,rt.return=ae,rt}finally{}}}var fa=tb(!0),rb=tb(!1),vs=!1;function F0(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function z0(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ms(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function gs(n,s,h){var _=n.updateQueue;if(_===null)return null;if(_=_.shared,(st&2)!==0){var A=_.pending;return A===null?s.next=s:(s.next=A.next,A.next=s),_.pending=s,s=Nc(n),Fy(n,null,h),s}return Ic(n,_,s,h),Nc(n)}function Wl(n,s,h){if(s=s.updateQueue,s!==null&&(s=s.shared,(h&4194048)!==0)){var _=s.lanes;_&=n.pendingLanes,h|=_,s.lanes=h,Cn(n,h)}}function H0(n,s){var h=n.updateQueue,_=n.alternate;if(_!==null&&(_=_.updateQueue,h===_)){var A=null,k=null;if(h=h.firstBaseUpdate,h!==null){do{var F={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};k===null?A=k=F:k=k.next=F,h=h.next}while(h!==null);k===null?A=k=s:k=k.next=s}else A=k=s;h={baseState:_.baseState,firstBaseUpdate:A,lastBaseUpdate:k,shared:_.shared,callbacks:_.callbacks},n.updateQueue=h;return}n=h.lastBaseUpdate,n===null?h.firstBaseUpdate=s:n.next=s,h.lastBaseUpdate=s}var $0=!1;function Gl(){if($0){var n=po;if(n!==null)throw n}}function Kl(n,s,h,_){$0=!1;var A=n.updateQueue;vs=!1;var k=A.firstBaseUpdate,F=A.lastBaseUpdate,Y=A.shared.pending;if(Y!==null){A.shared.pending=null;var ee=Y,le=ee.next;ee.next=null,F===null?k=le:F.next=le,F=ee;var me=n.alternate;me!==null&&(me=me.updateQueue,Y=me.lastBaseUpdate,Y!==F&&(Y===null?me.firstBaseUpdate=le:Y.next=le,me.lastBaseUpdate=ee))}if(k!==null){var ye=A.baseState;F=0,me=le=ee=null,Y=k;do{var ce=Y.lane&-536870913,fe=ce!==Y.lane;if(fe?(Xe&ce)===ce:(_&ce)===ce){ce!==0&&ce===fo&&($0=!0),me!==null&&(me=me.next={lane:0,tag:Y.tag,payload:Y.payload,callback:null,next:null});e:{var ke=n,Fe=Y;ce=s;var dt=h;switch(Fe.tag){case 1:if(ke=Fe.payload,typeof ke=="function"){ye=ke.call(dt,ye,ce);break e}ye=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Fe.payload,ce=typeof ke=="function"?ke.call(dt,ye,ce):ke,ce==null)break e;ye=f({},ye,ce);break e;case 2:vs=!0}}ce=Y.callback,ce!==null&&(n.flags|=64,fe&&(n.flags|=8192),fe=A.callbacks,fe===null?A.callbacks=[ce]:fe.push(ce))}else fe={lane:ce,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},me===null?(le=me=fe,ee=ye):me=me.next=fe,F|=ce;if(Y=Y.next,Y===null){if(Y=A.shared.pending,Y===null)break;fe=Y,Y=fe.next,fe.next=null,A.lastBaseUpdate=fe,A.shared.pending=null}}while(!0);me===null&&(ee=ye),A.baseState=ee,A.firstBaseUpdate=le,A.lastBaseUpdate=me,k===null&&(A.shared.lanes=0),xs|=F,n.lanes=F,n.memoizedState=ye}}function ib(n,s){if(typeof n!="function")throw Error(i(191,n));n.call(s)}function nb(n,s){var h=n.callbacks;if(h!==null)for(n.callbacks=null,n=0;n<h.length;n++)ib(h[n],s)}var go=z(null),Kc=z(0);function sb(n,s){n=qn,J(Kc,n),J(go,s),qn=n|s.baseLanes}function U0(){J(Kc,qn),J(go,go.current)}function q0(){qn=Kc.current,q(go),q(Kc)}var ii=z(null),xi=null;function _s(n){var s=n.alternate;J(Kt,Kt.current&1),J(ii,n),xi===null&&(s===null||go.current!==null||s.memoizedState!==null)&&(xi=n)}function W0(n){J(Kt,Kt.current),J(ii,n),xi===null&&(xi=n)}function ab(n){n.tag===22?(J(Kt,Kt.current),J(ii,n),xi===null&&(xi=n)):ys()}function ys(){J(Kt,Kt.current),J(ii,ii.current)}function ni(n){q(ii),xi===n&&(xi=null),q(Kt)}var Kt=z(0);function Yc(n){for(var s=n;s!==null;){if(s.tag===13){var h=s.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||Zp(h)||Qp(h)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var In=0,He=null,ht=null,Zt=null,Vc=!1,_o=!1,da=!1,Xc=0,Yl=0,yo=null,Ok=0;function jt(){throw Error(i(321))}function G0(n,s){if(s===null)return!1;for(var h=0;h<s.length&&h<n.length;h++)if(!ti(n[h],s[h]))return!1;return!0}function K0(n,s,h,_,A,k){return In=k,He=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,U.H=n===null||n.memoizedState===null?Ub:lp,da=!1,k=h(_,A),da=!1,_o&&(k=lb(s,h,_,A)),ob(n),k}function ob(n){U.H=Zl;var s=ht!==null&&ht.next!==null;if(In=0,Zt=ht=He=null,Vc=!1,Yl=0,yo=null,s)throw Error(i(300));n===null||Qt||(n=n.dependencies,n!==null&&zc(n)&&(Qt=!0))}function lb(n,s,h,_){He=n;var A=0;do{if(_o&&(yo=null),Yl=0,_o=!1,25<=A)throw Error(i(301));if(A+=1,Zt=ht=null,n.updateQueue!=null){var k=n.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}U.H=qb,k=s(h,_)}while(_o);return k}function Lk(){var n=U.H,s=n.useState()[0];return s=typeof s.then=="function"?Vl(s):s,n=n.useState()[0],(ht!==null?ht.memoizedState:null)!==n&&(He.flags|=1024),s}function Y0(){var n=Xc!==0;return Xc=0,n}function V0(n,s,h){s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~h}function X0(n){if(Vc){for(n=n.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Vc=!1}In=0,Zt=ht=He=null,_o=!1,Yl=Xc=0,yo=null}function Ir(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?He.memoizedState=Zt=n:Zt=Zt.next=n,Zt}function Yt(){if(ht===null){var n=He.alternate;n=n!==null?n.memoizedState:null}else n=ht.next;var s=Zt===null?He.memoizedState:Zt.next;if(s!==null)Zt=s,ht=n;else{if(n===null)throw He.alternate===null?Error(i(467)):Error(i(310));ht=n,n={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Zt===null?He.memoizedState=Zt=n:Zt=Zt.next=n}return Zt}function Zc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vl(n){var s=Yl;return Yl+=1,yo===null&&(yo=[]),n=Qy(yo,n,s),s=He,(Zt===null?s.memoizedState:Zt.next)===null&&(s=s.alternate,U.H=s===null||s.memoizedState===null?Ub:lp),n}function Qc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Vl(n);if(n.$$typeof===C)return Sr(n)}throw Error(i(438,String(n)))}function Z0(n){var s=null,h=He.updateQueue;if(h!==null&&(s=h.memoCache),s==null){var _=He.alternate;_!==null&&(_=_.updateQueue,_!==null&&(_=_.memoCache,_!=null&&(s={data:_.data.map(function(A){return A.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),h===null&&(h=Zc(),He.updateQueue=h),h.memoCache=s,h=s.data[s.index],h===void 0)for(h=s.data[s.index]=Array(n),_=0;_<n;_++)h[_]=L;return s.index++,h}function Nn(n,s){return typeof s=="function"?s(n):s}function Jc(n){var s=Yt();return Q0(s,ht,n)}function Q0(n,s,h){var _=n.queue;if(_===null)throw Error(i(311));_.lastRenderedReducer=h;var A=n.baseQueue,k=_.pending;if(k!==null){if(A!==null){var F=A.next;A.next=k.next,k.next=F}s.baseQueue=A=k,_.pending=null}if(k=n.baseState,A===null)n.memoizedState=k;else{s=A.next;var Y=F=null,ee=null,le=s,me=!1;do{var ye=le.lane&-536870913;if(ye!==le.lane?(Xe&ye)===ye:(In&ye)===ye){var ce=le.revertLane;if(ce===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),ye===fo&&(me=!0);else if((In&ce)===ce){le=le.next,ce===fo&&(me=!0);continue}else ye={lane:0,revertLane:le.revertLane,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},ee===null?(Y=ee=ye,F=k):ee=ee.next=ye,He.lanes|=ce,xs|=ce;ye=le.action,da&&h(k,ye),k=le.hasEagerState?le.eagerState:h(k,ye)}else ce={lane:ye,revertLane:le.revertLane,gesture:le.gesture,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},ee===null?(Y=ee=ce,F=k):ee=ee.next=ce,He.lanes|=ye,xs|=ye;le=le.next}while(le!==null&&le!==s);if(ee===null?F=k:ee.next=Y,!ti(k,n.memoizedState)&&(Qt=!0,me&&(h=po,h!==null)))throw h;n.memoizedState=k,n.baseState=F,n.baseQueue=ee,_.lastRenderedState=k}return A===null&&(_.lanes=0),[n.memoizedState,_.dispatch]}function J0(n){var s=Yt(),h=s.queue;if(h===null)throw Error(i(311));h.lastRenderedReducer=n;var _=h.dispatch,A=h.pending,k=s.memoizedState;if(A!==null){h.pending=null;var F=A=A.next;do k=n(k,F.action),F=F.next;while(F!==A);ti(k,s.memoizedState)||(Qt=!0),s.memoizedState=k,s.baseQueue===null&&(s.baseState=k),h.lastRenderedState=k}return[k,_]}function ub(n,s,h){var _=He,A=Yt(),k=Qe;if(k){if(h===void 0)throw Error(i(407));h=h()}else h=s();var F=!ti((ht||A).memoizedState,h);if(F&&(A.memoizedState=h,Qt=!0),A=A.queue,rp(fb.bind(null,_,A,n),[n]),A.getSnapshot!==s||F||Zt!==null&&Zt.memoizedState.tag&1){if(_.flags|=2048,bo(9,{destroy:void 0},hb.bind(null,_,A,h,s),null),vt===null)throw Error(i(349));k||(In&127)!==0||cb(_,s,h)}return h}function cb(n,s,h){n.flags|=16384,n={getSnapshot:s,value:h},s=He.updateQueue,s===null?(s=Zc(),He.updateQueue=s,s.stores=[n]):(h=s.stores,h===null?s.stores=[n]:h.push(n))}function hb(n,s,h,_){s.value=h,s.getSnapshot=_,db(s)&&pb(n)}function fb(n,s,h){return h(function(){db(s)&&pb(n)})}function db(n){var s=n.getSnapshot;n=n.value;try{var h=s();return!ti(n,h)}catch{return!0}}function pb(n){var s=na(n,2);s!==null&&Xr(s,n,2)}function ep(n){var s=Ir();if(typeof n=="function"){var h=n;if(n=h(),da){Wt(!0);try{h()}finally{Wt(!1)}}}return s.memoizedState=s.baseState=n,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:n},s}function vb(n,s,h,_){return n.baseState=h,Q0(n,ht,typeof _=="function"?_:Nn)}function Rk(n,s,h,_,A){if(rh(n))throw Error(i(485));if(n=s.action,n!==null){var k={payload:A,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(F){k.listeners.push(F)}};U.T!==null?h(!0):k.isTransition=!1,_(k),h=s.pending,h===null?(k.next=s.pending=k,mb(s,k)):(k.next=h.next,s.pending=h.next=k)}}function mb(n,s){var h=s.action,_=s.payload,A=n.state;if(s.isTransition){var k=U.T,F={};U.T=F;try{var Y=h(A,_),ee=U.S;ee!==null&&ee(F,Y),gb(n,s,Y)}catch(le){tp(n,s,le)}finally{k!==null&&F.types!==null&&(k.types=F.types),U.T=k}}else try{k=h(A,_),gb(n,s,k)}catch(le){tp(n,s,le)}}function gb(n,s,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(_){_b(n,s,_)},function(_){return tp(n,s,_)}):_b(n,s,h)}function _b(n,s,h){s.status="fulfilled",s.value=h,yb(s),n.state=h,s=n.pending,s!==null&&(h=s.next,h===s?n.pending=null:(h=h.next,s.next=h,mb(n,h)))}function tp(n,s,h){var _=n.pending;if(n.pending=null,_!==null){_=_.next;do s.status="rejected",s.reason=h,yb(s),s=s.next;while(s!==_)}n.action=null}function yb(n){n=n.listeners;for(var s=0;s<n.length;s++)(0,n[s])()}function bb(n,s){return s}function Sb(n,s){if(Qe){var h=vt.formState;if(h!==null){e:{var _=He;if(Qe){if(Ct){t:{for(var A=Ct,k=Si;A.nodeType!==8;){if(!k){A=null;break t}if(A=Ci(A.nextSibling),A===null){A=null;break t}}k=A.data,A=k==="F!"||k==="F"?A:null}if(A){Ct=Ci(A.nextSibling),_=A.data==="F!";break e}}ds(_)}_=!1}_&&(s=h[0])}}return h=Ir(),h.memoizedState=h.baseState=s,_={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bb,lastRenderedState:s},h.queue=_,h=zb.bind(null,He,_),_.dispatch=h,_=ep(!1),k=op.bind(null,He,!1,_.queue),_=Ir(),A={state:s,dispatch:null,action:n,pending:null},_.queue=A,h=Rk.bind(null,He,A,k,h),A.dispatch=h,_.memoizedState=n,[s,h,!1]}function xb(n){var s=Yt();return Cb(s,ht,n)}function Cb(n,s,h){if(s=Q0(n,s,bb)[0],n=Jc(Nn)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var _=Vl(s)}catch(F){throw F===vo?Uc:F}else _=s;s=Yt();var A=s.queue,k=A.dispatch;return h!==s.memoizedState&&(He.flags|=2048,bo(9,{destroy:void 0},Pk.bind(null,A,h),null)),[_,k,n]}function Pk(n,s){n.action=s}function wb(n){var s=Yt(),h=ht;if(h!==null)return Cb(s,h,n);Yt(),s=s.memoizedState,h=Yt();var _=h.queue.dispatch;return h.memoizedState=n,[s,_,!1]}function bo(n,s,h,_){return n={tag:n,create:h,deps:_,inst:s,next:null},s=He.updateQueue,s===null&&(s=Zc(),He.updateQueue=s),h=s.lastEffect,h===null?s.lastEffect=n.next=n:(_=h.next,h.next=n,n.next=_,s.lastEffect=n),n}function Eb(){return Yt().memoizedState}function eh(n,s,h,_){var A=Ir();He.flags|=n,A.memoizedState=bo(1|s,{destroy:void 0},h,_===void 0?null:_)}function th(n,s,h,_){var A=Yt();_=_===void 0?null:_;var k=A.memoizedState.inst;ht!==null&&_!==null&&G0(_,ht.memoizedState.deps)?A.memoizedState=bo(s,k,h,_):(He.flags|=n,A.memoizedState=bo(1|s,k,h,_))}function Ab(n,s){eh(8390656,8,n,s)}function rp(n,s){th(2048,8,n,s)}function Bk(n){He.flags|=4;var s=He.updateQueue;if(s===null)s=Zc(),He.updateQueue=s,s.events=[n];else{var h=s.events;h===null?s.events=[n]:h.push(n)}}function Db(n){var s=Yt().memoizedState;return Bk({ref:s,nextImpl:n}),function(){if((st&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function Tb(n,s){return th(4,2,n,s)}function Mb(n,s){return th(4,4,n,s)}function kb(n,s){if(typeof s=="function"){n=n();var h=s(n);return function(){typeof h=="function"?h():s(null)}}if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function Ob(n,s,h){h=h!=null?h.concat([n]):null,th(4,4,kb.bind(null,s,n),h)}function ip(){}function Lb(n,s){var h=Yt();s=s===void 0?null:s;var _=h.memoizedState;return s!==null&&G0(s,_[1])?_[0]:(h.memoizedState=[n,s],n)}function Rb(n,s){var h=Yt();s=s===void 0?null:s;var _=h.memoizedState;if(s!==null&&G0(s,_[1]))return _[0];if(_=n(),da){Wt(!0);try{n()}finally{Wt(!1)}}return h.memoizedState=[_,s],_}function np(n,s,h){return h===void 0||(In&1073741824)!==0&&(Xe&261930)===0?n.memoizedState=s:(n.memoizedState=h,n=P2(),He.lanes|=n,xs|=n,h)}function Pb(n,s,h,_){return ti(h,s)?h:go.current!==null?(n=np(n,h,_),ti(n,s)||(Qt=!0),n):(In&42)===0||(In&1073741824)!==0&&(Xe&261930)===0?(Qt=!0,n.memoizedState=h):(n=P2(),He.lanes|=n,xs|=n,s)}function Bb(n,s,h,_,A){var k=K.p;K.p=k!==0&&8>k?k:8;var F=U.T,Y={};U.T=Y,op(n,!1,s,h);try{var ee=A(),le=U.S;if(le!==null&&le(Y,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var me=kk(ee,_);Xl(n,s,me,oi(n))}else Xl(n,s,_,oi(n))}catch(ye){Xl(n,s,{then:function(){},status:"rejected",reason:ye},oi())}finally{K.p=k,F!==null&&Y.types!==null&&(F.types=Y.types),U.T=F}}function Ik(){}function sp(n,s,h,_){if(n.tag!==5)throw Error(i(476));var A=Ib(n).queue;Bb(n,A,s,G,h===null?Ik:function(){return Nb(n),h(_)})}function Ib(n){var s=n.memoizedState;if(s!==null)return s;s={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:G},next:null};var h={};return s.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:h},next:null},n.memoizedState=s,n=n.alternate,n!==null&&(n.memoizedState=s),s}function Nb(n){var s=Ib(n);s.next===null&&(s=n.alternate.memoizedState),Xl(n,s.next.queue,{},oi())}function ap(){return Sr(du)}function jb(){return Yt().memoizedState}function Fb(){return Yt().memoizedState}function Nk(n){for(var s=n.return;s!==null;){switch(s.tag){case 24:case 3:var h=oi();n=ms(h);var _=gs(s,n,h);_!==null&&(Xr(_,s,h),Wl(_,s,h)),s={cache:B0()},n.payload=s;return}s=s.return}}function jk(n,s,h){var _=oi();h={lane:_,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},rh(n)?Hb(s,h):(h=w0(n,s,h,_),h!==null&&(Xr(h,n,_),$b(h,s,_)))}function zb(n,s,h){var _=oi();Xl(n,s,h,_)}function Xl(n,s,h,_){var A={lane:_,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(rh(n))Hb(s,A);else{var k=n.alternate;if(n.lanes===0&&(k===null||k.lanes===0)&&(k=s.lastRenderedReducer,k!==null))try{var F=s.lastRenderedState,Y=k(F,h);if(A.hasEagerState=!0,A.eagerState=Y,ti(Y,F))return Ic(n,s,A,0),vt===null&&Bc(),!1}catch{}finally{}if(h=w0(n,s,A,_),h!==null)return Xr(h,n,_),$b(h,s,_),!0}return!1}function op(n,s,h,_){if(_={lane:2,revertLane:Fp(),gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},rh(n)){if(s)throw Error(i(479))}else s=w0(n,h,_,2),s!==null&&Xr(s,n,2)}function rh(n){var s=n.alternate;return n===He||s!==null&&s===He}function Hb(n,s){_o=Vc=!0;var h=n.pending;h===null?s.next=s:(s.next=h.next,h.next=s),n.pending=s}function $b(n,s,h){if((h&4194048)!==0){var _=s.lanes;_&=n.pendingLanes,h|=_,s.lanes=h,Cn(n,h)}}var Zl={readContext:Sr,use:Qc,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};Zl.useEffectEvent=jt;var Ub={readContext:Sr,use:Qc,useCallback:function(n,s){return Ir().memoizedState=[n,s===void 0?null:s],n},useContext:Sr,useEffect:Ab,useImperativeHandle:function(n,s,h){h=h!=null?h.concat([n]):null,eh(4194308,4,kb.bind(null,s,n),h)},useLayoutEffect:function(n,s){return eh(4194308,4,n,s)},useInsertionEffect:function(n,s){eh(4,2,n,s)},useMemo:function(n,s){var h=Ir();s=s===void 0?null:s;var _=n();if(da){Wt(!0);try{n()}finally{Wt(!1)}}return h.memoizedState=[_,s],_},useReducer:function(n,s,h){var _=Ir();if(h!==void 0){var A=h(s);if(da){Wt(!0);try{h(s)}finally{Wt(!1)}}}else A=s;return _.memoizedState=_.baseState=A,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:A},_.queue=n,n=n.dispatch=jk.bind(null,He,n),[_.memoizedState,n]},useRef:function(n){var s=Ir();return n={current:n},s.memoizedState=n},useState:function(n){n=ep(n);var s=n.queue,h=zb.bind(null,He,s);return s.dispatch=h,[n.memoizedState,h]},useDebugValue:ip,useDeferredValue:function(n,s){var h=Ir();return np(h,n,s)},useTransition:function(){var n=ep(!1);return n=Bb.bind(null,He,n.queue,!0,!1),Ir().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,s,h){var _=He,A=Ir();if(Qe){if(h===void 0)throw Error(i(407));h=h()}else{if(h=s(),vt===null)throw Error(i(349));(Xe&127)!==0||cb(_,s,h)}A.memoizedState=h;var k={value:h,getSnapshot:s};return A.queue=k,Ab(fb.bind(null,_,k,n),[n]),_.flags|=2048,bo(9,{destroy:void 0},hb.bind(null,_,k,h,s),null),h},useId:function(){var n=Ir(),s=vt.identifierPrefix;if(Qe){var h=Qi,_=Zi;h=(_&~(1<<32-Rt(_)-1)).toString(32)+h,s="_"+s+"R_"+h,h=Xc++,0<h&&(s+="H"+h.toString(32)),s+="_"}else h=Ok++,s="_"+s+"r_"+h.toString(32)+"_";return n.memoizedState=s},useHostTransitionStatus:ap,useFormState:Sb,useActionState:Sb,useOptimistic:function(n){var s=Ir();s.memoizedState=s.baseState=n;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=h,s=op.bind(null,He,!0,h),h.dispatch=s,[n,s]},useMemoCache:Z0,useCacheRefresh:function(){return Ir().memoizedState=Nk.bind(null,He)},useEffectEvent:function(n){var s=Ir(),h={impl:n};return s.memoizedState=h,function(){if((st&2)!==0)throw Error(i(440));return h.impl.apply(void 0,arguments)}}},lp={readContext:Sr,use:Qc,useCallback:Lb,useContext:Sr,useEffect:rp,useImperativeHandle:Ob,useInsertionEffect:Tb,useLayoutEffect:Mb,useMemo:Rb,useReducer:Jc,useRef:Eb,useState:function(){return Jc(Nn)},useDebugValue:ip,useDeferredValue:function(n,s){var h=Yt();return Pb(h,ht.memoizedState,n,s)},useTransition:function(){var n=Jc(Nn)[0],s=Yt().memoizedState;return[typeof n=="boolean"?n:Vl(n),s]},useSyncExternalStore:ub,useId:jb,useHostTransitionStatus:ap,useFormState:xb,useActionState:xb,useOptimistic:function(n,s){var h=Yt();return vb(h,ht,n,s)},useMemoCache:Z0,useCacheRefresh:Fb};lp.useEffectEvent=Db;var qb={readContext:Sr,use:Qc,useCallback:Lb,useContext:Sr,useEffect:rp,useImperativeHandle:Ob,useInsertionEffect:Tb,useLayoutEffect:Mb,useMemo:Rb,useReducer:J0,useRef:Eb,useState:function(){return J0(Nn)},useDebugValue:ip,useDeferredValue:function(n,s){var h=Yt();return ht===null?np(h,n,s):Pb(h,ht.memoizedState,n,s)},useTransition:function(){var n=J0(Nn)[0],s=Yt().memoizedState;return[typeof n=="boolean"?n:Vl(n),s]},useSyncExternalStore:ub,useId:jb,useHostTransitionStatus:ap,useFormState:wb,useActionState:wb,useOptimistic:function(n,s){var h=Yt();return ht!==null?vb(h,ht,n,s):(h.baseState=n,[n,h.queue.dispatch])},useMemoCache:Z0,useCacheRefresh:Fb};qb.useEffectEvent=Db;function up(n,s,h,_){s=n.memoizedState,h=h(_,s),h=h==null?s:f({},s,h),n.memoizedState=h,n.lanes===0&&(n.updateQueue.baseState=h)}var cp={enqueueSetState:function(n,s,h){n=n._reactInternals;var _=oi(),A=ms(_);A.payload=s,h!=null&&(A.callback=h),s=gs(n,A,_),s!==null&&(Xr(s,n,_),Wl(s,n,_))},enqueueReplaceState:function(n,s,h){n=n._reactInternals;var _=oi(),A=ms(_);A.tag=1,A.payload=s,h!=null&&(A.callback=h),s=gs(n,A,_),s!==null&&(Xr(s,n,_),Wl(s,n,_))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var h=oi(),_=ms(h);_.tag=2,s!=null&&(_.callback=s),s=gs(n,_,h),s!==null&&(Xr(s,n,h),Wl(s,n,h))}};function Wb(n,s,h,_,A,k,F){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(_,k,F):s.prototype&&s.prototype.isPureReactComponent?!Nl(h,_)||!Nl(A,k):!0}function Gb(n,s,h,_){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(h,_),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(h,_),s.state!==n&&cp.enqueueReplaceState(s,s.state,null)}function pa(n,s){var h=s;if("ref"in s){h={};for(var _ in s)_!=="ref"&&(h[_]=s[_])}if(n=n.defaultProps){h===s&&(h=f({},h));for(var A in n)h[A]===void 0&&(h[A]=n[A])}return h}function Kb(n){Pc(n)}function Yb(n){console.error(n)}function Vb(n){Pc(n)}function ih(n,s){try{var h=n.onUncaughtError;h(s.value,{componentStack:s.stack})}catch(_){setTimeout(function(){throw _})}}function Xb(n,s,h){try{var _=n.onCaughtError;_(h.value,{componentStack:h.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(A){setTimeout(function(){throw A})}}function hp(n,s,h){return h=ms(h),h.tag=3,h.payload={element:null},h.callback=function(){ih(n,s)},h}function Zb(n){return n=ms(n),n.tag=3,n}function Qb(n,s,h,_){var A=h.type.getDerivedStateFromError;if(typeof A=="function"){var k=_.value;n.payload=function(){return A(k)},n.callback=function(){Xb(s,h,_)}}var F=h.stateNode;F!==null&&typeof F.componentDidCatch=="function"&&(n.callback=function(){Xb(s,h,_),typeof A!="function"&&(Cs===null?Cs=new Set([this]):Cs.add(this));var Y=_.stack;this.componentDidCatch(_.value,{componentStack:Y!==null?Y:""})})}function Fk(n,s,h,_,A){if(h.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){if(s=h.alternate,s!==null&&ho(s,h,A,!0),h=ii.current,h!==null){switch(h.tag){case 31:case 13:return xi===null?vh():h.alternate===null&&Ft===0&&(Ft=3),h.flags&=-257,h.flags|=65536,h.lanes=A,_===qc?h.flags|=16384:(s=h.updateQueue,s===null?h.updateQueue=new Set([_]):s.add(_),Ip(n,_,A)),!1;case 22:return h.flags|=65536,_===qc?h.flags|=16384:(s=h.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([_])},h.updateQueue=s):(h=s.retryQueue,h===null?s.retryQueue=new Set([_]):h.add(_)),Ip(n,_,A)),!1}throw Error(i(435,h.tag))}return Ip(n,_,A),vh(),!1}if(Qe)return s=ii.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=A,_!==k0&&(n=Error(i(422),{cause:_}),zl(_i(n,h)))):(_!==k0&&(s=Error(i(423),{cause:_}),zl(_i(s,h))),n=n.current.alternate,n.flags|=65536,A&=-A,n.lanes|=A,_=_i(_,h),A=hp(n.stateNode,_,A),H0(n,A),Ft!==4&&(Ft=2)),!1;var k=Error(i(520),{cause:_});if(k=_i(k,h),su===null?su=[k]:su.push(k),Ft!==4&&(Ft=2),s===null)return!0;_=_i(_,h),h=s;do{switch(h.tag){case 3:return h.flags|=65536,n=A&-A,h.lanes|=n,n=hp(h.stateNode,_,n),H0(h,n),!1;case 1:if(s=h.type,k=h.stateNode,(h.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(Cs===null||!Cs.has(k))))return h.flags|=65536,A&=-A,h.lanes|=A,A=Zb(A),Qb(A,n,h,_),H0(h,A),!1}h=h.return}while(h!==null);return!1}var fp=Error(i(461)),Qt=!1;function xr(n,s,h,_){s.child=n===null?rb(s,null,h,_):fa(s,n.child,h,_)}function Jb(n,s,h,_,A){h=h.render;var k=s.ref;if("ref"in _){var F={};for(var Y in _)Y!=="ref"&&(F[Y]=_[Y])}else F=_;return la(s),_=K0(n,s,h,F,k,A),Y=Y0(),n!==null&&!Qt?(V0(n,s,A),jn(n,s,A)):(Qe&&Y&&T0(s),s.flags|=1,xr(n,s,_,A),s.child)}function e2(n,s,h,_,A){if(n===null){var k=h.type;return typeof k=="function"&&!E0(k)&&k.defaultProps===void 0&&h.compare===null?(s.tag=15,s.type=k,t2(n,s,k,_,A)):(n=jc(h.type,null,_,s,s.mode,A),n.ref=s.ref,n.return=s,s.child=n)}if(k=n.child,!bp(n,A)){var F=k.memoizedProps;if(h=h.compare,h=h!==null?h:Nl,h(F,_)&&n.ref===s.ref)return jn(n,s,A)}return s.flags|=1,n=Ln(k,_),n.ref=s.ref,n.return=s,s.child=n}function t2(n,s,h,_,A){if(n!==null){var k=n.memoizedProps;if(Nl(k,_)&&n.ref===s.ref)if(Qt=!1,s.pendingProps=_=k,bp(n,A))(n.flags&131072)!==0&&(Qt=!0);else return s.lanes=n.lanes,jn(n,s,A)}return dp(n,s,h,_,A)}function r2(n,s,h,_){var A=_.children,k=n!==null?n.memoizedState:null;if(n===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),_.mode==="hidden"){if((s.flags&128)!==0){if(k=k!==null?k.baseLanes|h:h,n!==null){for(_=s.child=n.child,A=0;_!==null;)A=A|_.lanes|_.childLanes,_=_.sibling;_=A&~k}else _=0,s.child=null;return i2(n,s,k,h,_)}if((h&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},n!==null&&$c(s,k!==null?k.cachePool:null),k!==null?sb(s,k):U0(),ab(s);else return _=s.lanes=536870912,i2(n,s,k!==null?k.baseLanes|h:h,h,_)}else k!==null?($c(s,k.cachePool),sb(s,k),ys(),s.memoizedState=null):(n!==null&&$c(s,null),U0(),ys());return xr(n,s,A,h),s.child}function Ql(n,s){return n!==null&&n.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function i2(n,s,h,_,A){var k=N0();return k=k===null?null:{parent:Xt._currentValue,pool:k},s.memoizedState={baseLanes:h,cachePool:k},n!==null&&$c(s,null),U0(),ab(s),n!==null&&ho(n,s,_,!0),s.childLanes=A,null}function nh(n,s){return s=ah({mode:s.mode,children:s.children},n.mode),s.ref=n.ref,n.child=s,s.return=n,s}function n2(n,s,h){return fa(s,n.child,null,h),n=nh(s,s.pendingProps),n.flags|=2,ni(s),s.memoizedState=null,n}function zk(n,s,h){var _=s.pendingProps,A=(s.flags&128)!==0;if(s.flags&=-129,n===null){if(Qe){if(_.mode==="hidden")return n=nh(s,_),s.lanes=536870912,Ql(null,n);if(W0(s),(n=Ct)?(n=mS(n,Si),n=n!==null&&n.data==="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:hs!==null?{id:Zi,overflow:Qi}:null,retryLane:536870912,hydrationErrors:null},h=Hy(n),h.return=s,s.child=h,br=s,Ct=null)):n=null,n===null)throw ds(s);return s.lanes=536870912,null}return nh(s,_)}var k=n.memoizedState;if(k!==null){var F=k.dehydrated;if(W0(s),A)if(s.flags&256)s.flags&=-257,s=n2(n,s,h);else if(s.memoizedState!==null)s.child=n.child,s.flags|=128,s=null;else throw Error(i(558));else if(Qt||ho(n,s,h,!1),A=(h&n.childLanes)!==0,Qt||A){if(_=vt,_!==null&&(F=Ec(_,h),F!==0&&F!==k.retryLane))throw k.retryLane=F,na(n,F),Xr(_,n,F),fp;vh(),s=n2(n,s,h)}else n=k.treeContext,Ct=Ci(F.nextSibling),br=s,Qe=!0,fs=null,Si=!1,n!==null&&qy(s,n),s=nh(s,_),s.flags|=4096;return s}return n=Ln(n.child,{mode:_.mode,children:_.children}),n.ref=s.ref,s.child=n,n.return=s,n}function sh(n,s){var h=s.ref;if(h===null)n!==null&&n.ref!==null&&(s.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(i(284));(n===null||n.ref!==h)&&(s.flags|=4194816)}}function dp(n,s,h,_,A){return la(s),h=K0(n,s,h,_,void 0,A),_=Y0(),n!==null&&!Qt?(V0(n,s,A),jn(n,s,A)):(Qe&&_&&T0(s),s.flags|=1,xr(n,s,h,A),s.child)}function s2(n,s,h,_,A,k){return la(s),s.updateQueue=null,h=lb(s,_,h,A),ob(n),_=Y0(),n!==null&&!Qt?(V0(n,s,k),jn(n,s,k)):(Qe&&_&&T0(s),s.flags|=1,xr(n,s,h,k),s.child)}function a2(n,s,h,_,A){if(la(s),s.stateNode===null){var k=oo,F=h.contextType;typeof F=="object"&&F!==null&&(k=Sr(F)),k=new h(_,k),s.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=cp,s.stateNode=k,k._reactInternals=s,k=s.stateNode,k.props=_,k.state=s.memoizedState,k.refs={},F0(s),F=h.contextType,k.context=typeof F=="object"&&F!==null?Sr(F):oo,k.state=s.memoizedState,F=h.getDerivedStateFromProps,typeof F=="function"&&(up(s,h,F,_),k.state=s.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(F=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),F!==k.state&&cp.enqueueReplaceState(k,k.state,null),Kl(s,_,k,A),Gl(),k.state=s.memoizedState),typeof k.componentDidMount=="function"&&(s.flags|=4194308),_=!0}else if(n===null){k=s.stateNode;var Y=s.memoizedProps,ee=pa(h,Y);k.props=ee;var le=k.context,me=h.contextType;F=oo,typeof me=="object"&&me!==null&&(F=Sr(me));var ye=h.getDerivedStateFromProps;me=typeof ye=="function"||typeof k.getSnapshotBeforeUpdate=="function",Y=s.pendingProps!==Y,me||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(Y||le!==F)&&Gb(s,k,_,F),vs=!1;var ce=s.memoizedState;k.state=ce,Kl(s,_,k,A),Gl(),le=s.memoizedState,Y||ce!==le||vs?(typeof ye=="function"&&(up(s,h,ye,_),le=s.memoizedState),(ee=vs||Wb(s,h,ee,_,ce,le,F))?(me||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(s.flags|=4194308)):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=_,s.memoizedState=le),k.props=_,k.state=le,k.context=F,_=ee):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),_=!1)}else{k=s.stateNode,z0(n,s),F=s.memoizedProps,me=pa(h,F),k.props=me,ye=s.pendingProps,ce=k.context,le=h.contextType,ee=oo,typeof le=="object"&&le!==null&&(ee=Sr(le)),Y=h.getDerivedStateFromProps,(le=typeof Y=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(F!==ye||ce!==ee)&&Gb(s,k,_,ee),vs=!1,ce=s.memoizedState,k.state=ce,Kl(s,_,k,A),Gl();var fe=s.memoizedState;F!==ye||ce!==fe||vs||n!==null&&n.dependencies!==null&&zc(n.dependencies)?(typeof Y=="function"&&(up(s,h,Y,_),fe=s.memoizedState),(me=vs||Wb(s,h,me,_,ce,fe,ee)||n!==null&&n.dependencies!==null&&zc(n.dependencies))?(le||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(_,fe,ee),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(_,fe,ee)),typeof k.componentDidUpdate=="function"&&(s.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof k.componentDidUpdate!="function"||F===n.memoizedProps&&ce===n.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||F===n.memoizedProps&&ce===n.memoizedState||(s.flags|=1024),s.memoizedProps=_,s.memoizedState=fe),k.props=_,k.state=fe,k.context=ee,_=me):(typeof k.componentDidUpdate!="function"||F===n.memoizedProps&&ce===n.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||F===n.memoizedProps&&ce===n.memoizedState||(s.flags|=1024),_=!1)}return k=_,sh(n,s),_=(s.flags&128)!==0,k||_?(k=s.stateNode,h=_&&typeof h.getDerivedStateFromError!="function"?null:k.render(),s.flags|=1,n!==null&&_?(s.child=fa(s,n.child,null,A),s.child=fa(s,null,h,A)):xr(n,s,h,A),s.memoizedState=k.state,n=s.child):n=jn(n,s,A),n}function o2(n,s,h,_){return aa(),s.flags|=256,xr(n,s,h,_),s.child}var pp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vp(n){return{baseLanes:n,cachePool:Xy()}}function mp(n,s,h){return n=n!==null?n.childLanes&~h:0,s&&(n|=ai),n}function l2(n,s,h){var _=s.pendingProps,A=!1,k=(s.flags&128)!==0,F;if((F=k)||(F=n!==null&&n.memoizedState===null?!1:(Kt.current&2)!==0),F&&(A=!0,s.flags&=-129),F=(s.flags&32)!==0,s.flags&=-33,n===null){if(Qe){if(A?_s(s):ys(),(n=Ct)?(n=mS(n,Si),n=n!==null&&n.data!=="&"?n:null,n!==null&&(s.memoizedState={dehydrated:n,treeContext:hs!==null?{id:Zi,overflow:Qi}:null,retryLane:536870912,hydrationErrors:null},h=Hy(n),h.return=s,s.child=h,br=s,Ct=null)):n=null,n===null)throw ds(s);return Qp(n)?s.lanes=32:s.lanes=536870912,null}var Y=_.children;return _=_.fallback,A?(ys(),A=s.mode,Y=ah({mode:"hidden",children:Y},A),_=sa(_,A,h,null),Y.return=s,_.return=s,Y.sibling=_,s.child=Y,_=s.child,_.memoizedState=vp(h),_.childLanes=mp(n,F,h),s.memoizedState=pp,Ql(null,_)):(_s(s),gp(s,Y))}var ee=n.memoizedState;if(ee!==null&&(Y=ee.dehydrated,Y!==null)){if(k)s.flags&256?(_s(s),s.flags&=-257,s=_p(n,s,h)):s.memoizedState!==null?(ys(),s.child=n.child,s.flags|=128,s=null):(ys(),Y=_.fallback,A=s.mode,_=ah({mode:"visible",children:_.children},A),Y=sa(Y,A,h,null),Y.flags|=2,_.return=s,Y.return=s,_.sibling=Y,s.child=_,fa(s,n.child,null,h),_=s.child,_.memoizedState=vp(h),_.childLanes=mp(n,F,h),s.memoizedState=pp,s=Ql(null,_));else if(_s(s),Qp(Y)){if(F=Y.nextSibling&&Y.nextSibling.dataset,F)var le=F.dgst;F=le,_=Error(i(419)),_.stack="",_.digest=F,zl({value:_,source:null,stack:null}),s=_p(n,s,h)}else if(Qt||ho(n,s,h,!1),F=(h&n.childLanes)!==0,Qt||F){if(F=vt,F!==null&&(_=Ec(F,h),_!==0&&_!==ee.retryLane))throw ee.retryLane=_,na(n,_),Xr(F,n,_),fp;Zp(Y)||vh(),s=_p(n,s,h)}else Zp(Y)?(s.flags|=192,s.child=n.child,s=null):(n=ee.treeContext,Ct=Ci(Y.nextSibling),br=s,Qe=!0,fs=null,Si=!1,n!==null&&qy(s,n),s=gp(s,_.children),s.flags|=4096);return s}return A?(ys(),Y=_.fallback,A=s.mode,ee=n.child,le=ee.sibling,_=Ln(ee,{mode:"hidden",children:_.children}),_.subtreeFlags=ee.subtreeFlags&65011712,le!==null?Y=Ln(le,Y):(Y=sa(Y,A,h,null),Y.flags|=2),Y.return=s,_.return=s,_.sibling=Y,s.child=_,Ql(null,_),_=s.child,Y=n.child.memoizedState,Y===null?Y=vp(h):(A=Y.cachePool,A!==null?(ee=Xt._currentValue,A=A.parent!==ee?{parent:ee,pool:ee}:A):A=Xy(),Y={baseLanes:Y.baseLanes|h,cachePool:A}),_.memoizedState=Y,_.childLanes=mp(n,F,h),s.memoizedState=pp,Ql(n.child,_)):(_s(s),h=n.child,n=h.sibling,h=Ln(h,{mode:"visible",children:_.children}),h.return=s,h.sibling=null,n!==null&&(F=s.deletions,F===null?(s.deletions=[n],s.flags|=16):F.push(n)),s.child=h,s.memoizedState=null,h)}function gp(n,s){return s=ah({mode:"visible",children:s},n.mode),s.return=n,n.child=s}function ah(n,s){return n=ri(22,n,null,s),n.lanes=0,n}function _p(n,s,h){return fa(s,n.child,null,h),n=gp(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function u2(n,s,h){n.lanes|=s;var _=n.alternate;_!==null&&(_.lanes|=s),R0(n.return,s,h)}function yp(n,s,h,_,A,k){var F=n.memoizedState;F===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:_,tail:h,tailMode:A,treeForkCount:k}:(F.isBackwards=s,F.rendering=null,F.renderingStartTime=0,F.last=_,F.tail=h,F.tailMode=A,F.treeForkCount=k)}function c2(n,s,h){var _=s.pendingProps,A=_.revealOrder,k=_.tail;_=_.children;var F=Kt.current,Y=(F&2)!==0;if(Y?(F=F&1|2,s.flags|=128):F&=1,J(Kt,F),xr(n,s,_,h),_=Qe?Fl:0,!Y&&n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&u2(n,h,s);else if(n.tag===19)u2(n,h,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(A){case"forwards":for(h=s.child,A=null;h!==null;)n=h.alternate,n!==null&&Yc(n)===null&&(A=h),h=h.sibling;h=A,h===null?(A=s.child,s.child=null):(A=h.sibling,h.sibling=null),yp(s,!1,A,h,k,_);break;case"backwards":case"unstable_legacy-backwards":for(h=null,A=s.child,s.child=null;A!==null;){if(n=A.alternate,n!==null&&Yc(n)===null){s.child=A;break}n=A.sibling,A.sibling=h,h=A,A=n}yp(s,!0,h,null,k,_);break;case"together":yp(s,!1,null,null,void 0,_);break;default:s.memoizedState=null}return s.child}function jn(n,s,h){if(n!==null&&(s.dependencies=n.dependencies),xs|=s.lanes,(h&s.childLanes)===0)if(n!==null){if(ho(n,s,h,!1),(h&s.childLanes)===0)return null}else return null;if(n!==null&&s.child!==n.child)throw Error(i(153));if(s.child!==null){for(n=s.child,h=Ln(n,n.pendingProps),s.child=h,h.return=s;n.sibling!==null;)n=n.sibling,h=h.sibling=Ln(n,n.pendingProps),h.return=s;h.sibling=null}return s.child}function bp(n,s){return(n.lanes&s)!==0?!0:(n=n.dependencies,!!(n!==null&&zc(n)))}function Hk(n,s,h){switch(s.tag){case 3:W(s,s.stateNode.containerInfo),ps(s,Xt,n.memoizedState.cache),aa();break;case 27:case 5:Q(s);break;case 4:W(s,s.stateNode.containerInfo);break;case 10:ps(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,W0(s),null;break;case 13:var _=s.memoizedState;if(_!==null)return _.dehydrated!==null?(_s(s),s.flags|=128,null):(h&s.child.childLanes)!==0?l2(n,s,h):(_s(s),n=jn(n,s,h),n!==null?n.sibling:null);_s(s);break;case 19:var A=(n.flags&128)!==0;if(_=(h&s.childLanes)!==0,_||(ho(n,s,h,!1),_=(h&s.childLanes)!==0),A){if(_)return c2(n,s,h);s.flags|=128}if(A=s.memoizedState,A!==null&&(A.rendering=null,A.tail=null,A.lastEffect=null),J(Kt,Kt.current),_)break;return null;case 22:return s.lanes=0,r2(n,s,h,s.pendingProps);case 24:ps(s,Xt,n.memoizedState.cache)}return jn(n,s,h)}function h2(n,s,h){if(n!==null)if(n.memoizedProps!==s.pendingProps)Qt=!0;else{if(!bp(n,h)&&(s.flags&128)===0)return Qt=!1,Hk(n,s,h);Qt=(n.flags&131072)!==0}else Qt=!1,Qe&&(s.flags&1048576)!==0&&Uy(s,Fl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var _=s.pendingProps;if(n=ca(s.elementType),s.type=n,typeof n=="function")E0(n)?(_=pa(n,_),s.tag=1,s=a2(null,s,n,_,h)):(s.tag=0,s=dp(null,s,n,_,h));else{if(n!=null){var A=n.$$typeof;if(A===E){s.tag=11,s=Jb(null,s,n,_,h);break e}else if(A===M){s.tag=14,s=e2(null,s,n,_,h);break e}}throw s=$(n)||n,Error(i(306,s,""))}}return s;case 0:return dp(n,s,s.type,s.pendingProps,h);case 1:return _=s.type,A=pa(_,s.pendingProps),a2(n,s,_,A,h);case 3:e:{if(W(s,s.stateNode.containerInfo),n===null)throw Error(i(387));_=s.pendingProps;var k=s.memoizedState;A=k.element,z0(n,s),Kl(s,_,null,h);var F=s.memoizedState;if(_=F.cache,ps(s,Xt,_),_!==k.cache&&P0(s,[Xt],h,!0),Gl(),_=F.element,k.isDehydrated)if(k={element:_,isDehydrated:!1,cache:F.cache},s.updateQueue.baseState=k,s.memoizedState=k,s.flags&256){s=o2(n,s,_,h);break e}else if(_!==A){A=_i(Error(i(424)),s),zl(A),s=o2(n,s,_,h);break e}else{switch(n=s.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(Ct=Ci(n.firstChild),br=s,Qe=!0,fs=null,Si=!0,h=rb(s,null,_,h),s.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(aa(),_===A){s=jn(n,s,h);break e}xr(n,s,_,h)}s=s.child}return s;case 26:return sh(n,s),n===null?(h=xS(s.type,null,s.pendingProps,null))?s.memoizedState=h:Qe||(h=s.type,n=s.pendingProps,_=xh(he.current).createElement(h),_[ot]=s,_[It]=n,Cr(_,h,n),Gt(_),s.stateNode=_):s.memoizedState=xS(s.type,n.memoizedProps,s.pendingProps,n.memoizedState),null;case 27:return Q(s),n===null&&Qe&&(_=s.stateNode=yS(s.type,s.pendingProps,he.current),br=s,Si=!0,A=Ct,Ds(s.type)?(Jp=A,Ct=Ci(_.firstChild)):Ct=A),xr(n,s,s.pendingProps.children,h),sh(n,s),n===null&&(s.flags|=4194304),s.child;case 5:return n===null&&Qe&&((A=_=Ct)&&(_=gO(_,s.type,s.pendingProps,Si),_!==null?(s.stateNode=_,br=s,Ct=Ci(_.firstChild),Si=!1,A=!0):A=!1),A||ds(s)),Q(s),A=s.type,k=s.pendingProps,F=n!==null?n.memoizedProps:null,_=k.children,Yp(A,k)?_=null:F!==null&&Yp(A,F)&&(s.flags|=32),s.memoizedState!==null&&(A=K0(n,s,Lk,null,null,h),du._currentValue=A),sh(n,s),xr(n,s,_,h),s.child;case 6:return n===null&&Qe&&((n=h=Ct)&&(h=_O(h,s.pendingProps,Si),h!==null?(s.stateNode=h,br=s,Ct=null,n=!0):n=!1),n||ds(s)),null;case 13:return l2(n,s,h);case 4:return W(s,s.stateNode.containerInfo),_=s.pendingProps,n===null?s.child=fa(s,null,_,h):xr(n,s,_,h),s.child;case 11:return Jb(n,s,s.type,s.pendingProps,h);case 7:return xr(n,s,s.pendingProps,h),s.child;case 8:return xr(n,s,s.pendingProps.children,h),s.child;case 12:return xr(n,s,s.pendingProps.children,h),s.child;case 10:return _=s.pendingProps,ps(s,s.type,_.value),xr(n,s,_.children,h),s.child;case 9:return A=s.type._context,_=s.pendingProps.children,la(s),A=Sr(A),_=_(A),s.flags|=1,xr(n,s,_,h),s.child;case 14:return e2(n,s,s.type,s.pendingProps,h);case 15:return t2(n,s,s.type,s.pendingProps,h);case 19:return c2(n,s,h);case 31:return zk(n,s,h);case 22:return r2(n,s,h,s.pendingProps);case 24:return la(s),_=Sr(Xt),n===null?(A=N0(),A===null&&(A=vt,k=B0(),A.pooledCache=k,k.refCount++,k!==null&&(A.pooledCacheLanes|=h),A=k),s.memoizedState={parent:_,cache:A},F0(s),ps(s,Xt,A)):((n.lanes&h)!==0&&(z0(n,s),Kl(s,null,null,h),Gl()),A=n.memoizedState,k=s.memoizedState,A.parent!==_?(A={parent:_,cache:_},s.memoizedState=A,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=A),ps(s,Xt,_)):(_=k.cache,ps(s,Xt,_),_!==A.cache&&P0(s,[Xt],h,!0))),xr(n,s,s.pendingProps.children,h),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function Fn(n){n.flags|=4}function Sp(n,s,h,_,A){if((s=(n.mode&32)!==0)&&(s=!1),s){if(n.flags|=16777216,(A&335544128)===A)if(n.stateNode.complete)n.flags|=8192;else if(j2())n.flags|=8192;else throw ha=qc,j0}else n.flags&=-16777217}function f2(n,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!DS(s))if(j2())n.flags|=8192;else throw ha=qc,j0}function oh(n,s){s!==null&&(n.flags|=4),n.flags&16384&&(s=n.tag!==22?wc():536870912,n.lanes|=s,wo|=s)}function Jl(n,s){if(!Qe)switch(n.tailMode){case"hidden":s=n.tail;for(var h=null;s!==null;)s.alternate!==null&&(h=s),s=s.sibling;h===null?n.tail=null:h.sibling=null;break;case"collapsed":h=n.tail;for(var _=null;h!==null;)h.alternate!==null&&(_=h),h=h.sibling;_===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:_.sibling=null}}function wt(n){var s=n.alternate!==null&&n.alternate.child===n.child,h=0,_=0;if(s)for(var A=n.child;A!==null;)h|=A.lanes|A.childLanes,_|=A.subtreeFlags&65011712,_|=A.flags&65011712,A.return=n,A=A.sibling;else for(A=n.child;A!==null;)h|=A.lanes|A.childLanes,_|=A.subtreeFlags,_|=A.flags,A.return=n,A=A.sibling;return n.subtreeFlags|=_,n.childLanes=h,s}function $k(n,s,h){var _=s.pendingProps;switch(M0(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(s),null;case 1:return wt(s),null;case 3:return h=s.stateNode,_=null,n!==null&&(_=n.memoizedState.cache),s.memoizedState.cache!==_&&(s.flags|=2048),Bn(Xt),te(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(n===null||n.child===null)&&(co(s)?Fn(s):n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,O0())),wt(s),null;case 26:var A=s.type,k=s.memoizedState;return n===null?(Fn(s),k!==null?(wt(s),f2(s,k)):(wt(s),Sp(s,A,null,_,h))):k?k!==n.memoizedState?(Fn(s),wt(s),f2(s,k)):(wt(s),s.flags&=-16777217):(n=n.memoizedProps,n!==_&&Fn(s),wt(s),Sp(s,A,n,_,h)),null;case 27:if(se(s),h=he.current,A=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==_&&Fn(s);else{if(!_){if(s.stateNode===null)throw Error(i(166));return wt(s),null}n=ie.current,co(s)?Wy(s):(n=yS(A,_,h),s.stateNode=n,Fn(s))}return wt(s),null;case 5:if(se(s),A=s.type,n!==null&&s.stateNode!=null)n.memoizedProps!==_&&Fn(s);else{if(!_){if(s.stateNode===null)throw Error(i(166));return wt(s),null}if(k=ie.current,co(s))Wy(s);else{var F=xh(he.current);switch(k){case 1:k=F.createElementNS("http://www.w3.org/2000/svg",A);break;case 2:k=F.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;default:switch(A){case"svg":k=F.createElementNS("http://www.w3.org/2000/svg",A);break;case"math":k=F.createElementNS("http://www.w3.org/1998/Math/MathML",A);break;case"script":k=F.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof _.is=="string"?F.createElement("select",{is:_.is}):F.createElement("select"),_.multiple?k.multiple=!0:_.size&&(k.size=_.size);break;default:k=typeof _.is=="string"?F.createElement(A,{is:_.is}):F.createElement(A)}}k[ot]=s,k[It]=_;e:for(F=s.child;F!==null;){if(F.tag===5||F.tag===6)k.appendChild(F.stateNode);else if(F.tag!==4&&F.tag!==27&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===s)break e;for(;F.sibling===null;){if(F.return===null||F.return===s)break e;F=F.return}F.sibling.return=F.return,F=F.sibling}s.stateNode=k;e:switch(Cr(k,A,_),A){case"button":case"input":case"select":case"textarea":_=!!_.autoFocus;break e;case"img":_=!0;break e;default:_=!1}_&&Fn(s)}}return wt(s),Sp(s,s.type,n===null?null:n.memoizedProps,s.pendingProps,h),null;case 6:if(n&&s.stateNode!=null)n.memoizedProps!==_&&Fn(s);else{if(typeof _!="string"&&s.stateNode===null)throw Error(i(166));if(n=he.current,co(s)){if(n=s.stateNode,h=s.memoizedProps,_=null,A=br,A!==null)switch(A.tag){case 27:case 5:_=A.memoizedProps}n[ot]=s,n=!!(n.nodeValue===h||_!==null&&_.suppressHydrationWarning===!0||lS(n.nodeValue,h)),n||ds(s,!0)}else n=xh(n).createTextNode(_),n[ot]=s,s.stateNode=n}return wt(s),null;case 31:if(h=s.memoizedState,n===null||n.memoizedState!==null){if(_=co(s),h!==null){if(n===null){if(!_)throw Error(i(318));if(n=s.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[ot]=s}else aa(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;wt(s),n=!1}else h=O0(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),n=!0;if(!n)return s.flags&256?(ni(s),s):(ni(s),null);if((s.flags&128)!==0)throw Error(i(558))}return wt(s),null;case 13:if(_=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(A=co(s),_!==null&&_.dehydrated!==null){if(n===null){if(!A)throw Error(i(318));if(A=s.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(i(317));A[ot]=s}else aa(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;wt(s),A=!1}else A=O0(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=A),A=!0;if(!A)return s.flags&256?(ni(s),s):(ni(s),null)}return ni(s),(s.flags&128)!==0?(s.lanes=h,s):(h=_!==null,n=n!==null&&n.memoizedState!==null,h&&(_=s.child,A=null,_.alternate!==null&&_.alternate.memoizedState!==null&&_.alternate.memoizedState.cachePool!==null&&(A=_.alternate.memoizedState.cachePool.pool),k=null,_.memoizedState!==null&&_.memoizedState.cachePool!==null&&(k=_.memoizedState.cachePool.pool),k!==A&&(_.flags|=2048)),h!==n&&h&&(s.child.flags|=8192),oh(s,s.updateQueue),wt(s),null);case 4:return te(),n===null&&Up(s.stateNode.containerInfo),wt(s),null;case 10:return Bn(s.type),wt(s),null;case 19:if(q(Kt),_=s.memoizedState,_===null)return wt(s),null;if(A=(s.flags&128)!==0,k=_.rendering,k===null)if(A)Jl(_,!1);else{if(Ft!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(k=Yc(n),k!==null){for(s.flags|=128,Jl(_,!1),n=k.updateQueue,s.updateQueue=n,oh(s,n),s.subtreeFlags=0,n=h,h=s.child;h!==null;)zy(h,n),h=h.sibling;return J(Kt,Kt.current&1|2),Qe&&Rn(s,_.treeForkCount),s.child}n=n.sibling}_.tail!==null&&Ee()>fh&&(s.flags|=128,A=!0,Jl(_,!1),s.lanes=4194304)}else{if(!A)if(n=Yc(k),n!==null){if(s.flags|=128,A=!0,n=n.updateQueue,s.updateQueue=n,oh(s,n),Jl(_,!0),_.tail===null&&_.tailMode==="hidden"&&!k.alternate&&!Qe)return wt(s),null}else 2*Ee()-_.renderingStartTime>fh&&h!==536870912&&(s.flags|=128,A=!0,Jl(_,!1),s.lanes=4194304);_.isBackwards?(k.sibling=s.child,s.child=k):(n=_.last,n!==null?n.sibling=k:s.child=k,_.last=k)}return _.tail!==null?(n=_.tail,_.rendering=n,_.tail=n.sibling,_.renderingStartTime=Ee(),n.sibling=null,h=Kt.current,J(Kt,A?h&1|2:h&1),Qe&&Rn(s,_.treeForkCount),n):(wt(s),null);case 22:case 23:return ni(s),q0(),_=s.memoizedState!==null,n!==null?n.memoizedState!==null!==_&&(s.flags|=8192):_&&(s.flags|=8192),_?(h&536870912)!==0&&(s.flags&128)===0&&(wt(s),s.subtreeFlags&6&&(s.flags|=8192)):wt(s),h=s.updateQueue,h!==null&&oh(s,h.retryQueue),h=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(h=n.memoizedState.cachePool.pool),_=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(_=s.memoizedState.cachePool.pool),_!==h&&(s.flags|=2048),n!==null&&q(ua),null;case 24:return h=null,n!==null&&(h=n.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Bn(Xt),wt(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function Uk(n,s){switch(M0(s),s.tag){case 1:return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return Bn(Xt),te(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 26:case 27:case 5:return se(s),null;case 31:if(s.memoizedState!==null){if(ni(s),s.alternate===null)throw Error(i(340));aa()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 13:if(ni(s),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(i(340));aa()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return q(Kt),null;case 4:return te(),null;case 10:return Bn(s.type),null;case 22:case 23:return ni(s),q0(),n!==null&&q(ua),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 24:return Bn(Xt),null;case 25:return null;default:return null}}function d2(n,s){switch(M0(s),s.tag){case 3:Bn(Xt),te();break;case 26:case 27:case 5:se(s);break;case 4:te();break;case 31:s.memoizedState!==null&&ni(s);break;case 13:ni(s);break;case 19:q(Kt);break;case 10:Bn(s.type);break;case 22:case 23:ni(s),q0(),n!==null&&q(ua);break;case 24:Bn(Xt)}}function eu(n,s){try{var h=s.updateQueue,_=h!==null?h.lastEffect:null;if(_!==null){var A=_.next;h=A;do{if((h.tag&n)===n){_=void 0;var k=h.create,F=h.inst;_=k(),F.destroy=_}h=h.next}while(h!==A)}}catch(Y){ut(s,s.return,Y)}}function bs(n,s,h){try{var _=s.updateQueue,A=_!==null?_.lastEffect:null;if(A!==null){var k=A.next;_=k;do{if((_.tag&n)===n){var F=_.inst,Y=F.destroy;if(Y!==void 0){F.destroy=void 0,A=s;var ee=h,le=Y;try{le()}catch(me){ut(A,ee,me)}}}_=_.next}while(_!==k)}}catch(me){ut(s,s.return,me)}}function p2(n){var s=n.updateQueue;if(s!==null){var h=n.stateNode;try{nb(s,h)}catch(_){ut(n,n.return,_)}}}function v2(n,s,h){h.props=pa(n.type,n.memoizedProps),h.state=n.memoizedState;try{h.componentWillUnmount()}catch(_){ut(n,s,_)}}function tu(n,s){try{var h=n.ref;if(h!==null){switch(n.tag){case 26:case 27:case 5:var _=n.stateNode;break;case 30:_=n.stateNode;break;default:_=n.stateNode}typeof h=="function"?n.refCleanup=h(_):h.current=_}}catch(A){ut(n,s,A)}}function Ji(n,s){var h=n.ref,_=n.refCleanup;if(h!==null)if(typeof _=="function")try{_()}catch(A){ut(n,s,A)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(A){ut(n,s,A)}else h.current=null}function m2(n){var s=n.type,h=n.memoizedProps,_=n.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":h.autoFocus&&_.focus();break e;case"img":h.src?_.src=h.src:h.srcSet&&(_.srcset=h.srcSet)}}catch(A){ut(n,n.return,A)}}function xp(n,s,h){try{var _=n.stateNode;hO(_,n.type,h,s),_[It]=s}catch(A){ut(n,n.return,A)}}function g2(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ds(n.type)||n.tag===4}function Cp(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||g2(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ds(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function wp(n,s,h){var _=n.tag;if(_===5||_===6)n=n.stateNode,s?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(n,s):(s=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,s.appendChild(n),h=h._reactRootContainer,h!=null||s.onclick!==null||(s.onclick=kn));else if(_!==4&&(_===27&&Ds(n.type)&&(h=n.stateNode,s=null),n=n.child,n!==null))for(wp(n,s,h),n=n.sibling;n!==null;)wp(n,s,h),n=n.sibling}function lh(n,s,h){var _=n.tag;if(_===5||_===6)n=n.stateNode,s?h.insertBefore(n,s):h.appendChild(n);else if(_!==4&&(_===27&&Ds(n.type)&&(h=n.stateNode),n=n.child,n!==null))for(lh(n,s,h),n=n.sibling;n!==null;)lh(n,s,h),n=n.sibling}function _2(n){var s=n.stateNode,h=n.memoizedProps;try{for(var _=n.type,A=s.attributes;A.length;)s.removeAttributeNode(A[0]);Cr(s,_,h),s[ot]=n,s[It]=h}catch(k){ut(n,n.return,k)}}var zn=!1,Jt=!1,Ep=!1,y2=typeof WeakSet=="function"?WeakSet:Set,cr=null;function qk(n,s){if(n=n.containerInfo,Gp=Mh,n=Oy(n),_0(n)){if("selectionStart"in n)var h={start:n.selectionStart,end:n.selectionEnd};else e:{h=(h=n.ownerDocument)&&h.defaultView||window;var _=h.getSelection&&h.getSelection();if(_&&_.rangeCount!==0){h=_.anchorNode;var A=_.anchorOffset,k=_.focusNode;_=_.focusOffset;try{h.nodeType,k.nodeType}catch{h=null;break e}var F=0,Y=-1,ee=-1,le=0,me=0,ye=n,ce=null;t:for(;;){for(var fe;ye!==h||A!==0&&ye.nodeType!==3||(Y=F+A),ye!==k||_!==0&&ye.nodeType!==3||(ee=F+_),ye.nodeType===3&&(F+=ye.nodeValue.length),(fe=ye.firstChild)!==null;)ce=ye,ye=fe;for(;;){if(ye===n)break t;if(ce===h&&++le===A&&(Y=F),ce===k&&++me===_&&(ee=F),(fe=ye.nextSibling)!==null)break;ye=ce,ce=ye.parentNode}ye=fe}h=Y===-1||ee===-1?null:{start:Y,end:ee}}else h=null}h=h||{start:0,end:0}}else h=null;for(Kp={focusedElem:n,selectionRange:h},Mh=!1,cr=s;cr!==null;)if(s=cr,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,cr=n;else for(;cr!==null;){switch(s=cr,k=s.alternate,n=s.flags,s.tag){case 0:if((n&4)!==0&&(n=s.updateQueue,n=n!==null?n.events:null,n!==null))for(h=0;h<n.length;h++)A=n[h],A.ref.impl=A.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&k!==null){n=void 0,h=s,A=k.memoizedProps,k=k.memoizedState,_=h.stateNode;try{var ke=pa(h.type,A);n=_.getSnapshotBeforeUpdate(ke,k),_.__reactInternalSnapshotBeforeUpdate=n}catch(Fe){ut(h,h.return,Fe)}}break;case 3:if((n&1024)!==0){if(n=s.stateNode.containerInfo,h=n.nodeType,h===9)Xp(n);else if(h===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Xp(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=s.sibling,n!==null){n.return=s.return,cr=n;break}cr=s.return}}function b2(n,s,h){var _=h.flags;switch(h.tag){case 0:case 11:case 15:$n(n,h),_&4&&eu(5,h);break;case 1:if($n(n,h),_&4)if(n=h.stateNode,s===null)try{n.componentDidMount()}catch(F){ut(h,h.return,F)}else{var A=pa(h.type,s.memoizedProps);s=s.memoizedState;try{n.componentDidUpdate(A,s,n.__reactInternalSnapshotBeforeUpdate)}catch(F){ut(h,h.return,F)}}_&64&&p2(h),_&512&&tu(h,h.return);break;case 3:if($n(n,h),_&64&&(n=h.updateQueue,n!==null)){if(s=null,h.child!==null)switch(h.child.tag){case 27:case 5:s=h.child.stateNode;break;case 1:s=h.child.stateNode}try{nb(n,s)}catch(F){ut(h,h.return,F)}}break;case 27:s===null&&_&4&&_2(h);case 26:case 5:$n(n,h),s===null&&_&4&&m2(h),_&512&&tu(h,h.return);break;case 12:$n(n,h);break;case 31:$n(n,h),_&4&&C2(n,h);break;case 13:$n(n,h),_&4&&w2(n,h),_&64&&(n=h.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(h=Jk.bind(null,h),yO(n,h))));break;case 22:if(_=h.memoizedState!==null||zn,!_){s=s!==null&&s.memoizedState!==null||Jt,A=zn;var k=Jt;zn=_,(Jt=s)&&!k?Un(n,h,(h.subtreeFlags&8772)!==0):$n(n,h),zn=A,Jt=k}break;case 30:break;default:$n(n,h)}}function S2(n){var s=n.alternate;s!==null&&(n.alternate=null,S2(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&ei(s)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Ot=null,Gr=!1;function Hn(n,s,h){for(h=h.child;h!==null;)x2(n,s,h),h=h.sibling}function x2(n,s,h){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(rr,h)}catch{}switch(h.tag){case 26:Jt||Ji(h,s),Hn(n,s,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:Jt||Ji(h,s);var _=Ot,A=Gr;Ds(h.type)&&(Ot=h.stateNode,Gr=!1),Hn(n,s,h),cu(h.stateNode),Ot=_,Gr=A;break;case 5:Jt||Ji(h,s);case 6:if(_=Ot,A=Gr,Ot=null,Hn(n,s,h),Ot=_,Gr=A,Ot!==null)if(Gr)try{(Ot.nodeType===9?Ot.body:Ot.nodeName==="HTML"?Ot.ownerDocument.body:Ot).removeChild(h.stateNode)}catch(k){ut(h,s,k)}else try{Ot.removeChild(h.stateNode)}catch(k){ut(h,s,k)}break;case 18:Ot!==null&&(Gr?(n=Ot,pS(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,h.stateNode),Lo(n)):pS(Ot,h.stateNode));break;case 4:_=Ot,A=Gr,Ot=h.stateNode.containerInfo,Gr=!0,Hn(n,s,h),Ot=_,Gr=A;break;case 0:case 11:case 14:case 15:bs(2,h,s),Jt||bs(4,h,s),Hn(n,s,h);break;case 1:Jt||(Ji(h,s),_=h.stateNode,typeof _.componentWillUnmount=="function"&&v2(h,s,_)),Hn(n,s,h);break;case 21:Hn(n,s,h);break;case 22:Jt=(_=Jt)||h.memoizedState!==null,Hn(n,s,h),Jt=_;break;default:Hn(n,s,h)}}function C2(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Lo(n)}catch(h){ut(s,s.return,h)}}}function w2(n,s){if(s.memoizedState===null&&(n=s.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Lo(n)}catch(h){ut(s,s.return,h)}}function Wk(n){switch(n.tag){case 31:case 13:case 19:var s=n.stateNode;return s===null&&(s=n.stateNode=new y2),s;case 22:return n=n.stateNode,s=n._retryCache,s===null&&(s=n._retryCache=new y2),s;default:throw Error(i(435,n.tag))}}function uh(n,s){var h=Wk(n);s.forEach(function(_){if(!h.has(_)){h.add(_);var A=eO.bind(null,n,_);_.then(A,A)}})}function Kr(n,s){var h=s.deletions;if(h!==null)for(var _=0;_<h.length;_++){var A=h[_],k=n,F=s,Y=F;e:for(;Y!==null;){switch(Y.tag){case 27:if(Ds(Y.type)){Ot=Y.stateNode,Gr=!1;break e}break;case 5:Ot=Y.stateNode,Gr=!1;break e;case 3:case 4:Ot=Y.stateNode.containerInfo,Gr=!0;break e}Y=Y.return}if(Ot===null)throw Error(i(160));x2(k,F,A),Ot=null,Gr=!1,k=A.alternate,k!==null&&(k.return=null),A.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)E2(s,n),s=s.sibling}var Ni=null;function E2(n,s){var h=n.alternate,_=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Kr(s,n),Yr(n),_&4&&(bs(3,n,n.return),eu(3,n),bs(5,n,n.return));break;case 1:Kr(s,n),Yr(n),_&512&&(Jt||h===null||Ji(h,h.return)),_&64&&zn&&(n=n.updateQueue,n!==null&&(_=n.callbacks,_!==null&&(h=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=h===null?_:h.concat(_))));break;case 26:var A=Ni;if(Kr(s,n),Yr(n),_&512&&(Jt||h===null||Ji(h,h.return)),_&4){var k=h!==null?h.memoizedState:null;if(_=n.memoizedState,h===null)if(_===null)if(n.stateNode===null){e:{_=n.type,h=n.memoizedProps,A=A.ownerDocument||A;t:switch(_){case"title":k=A.getElementsByTagName("title")[0],(!k||k[Xi]||k[ot]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=A.createElement(_),A.head.insertBefore(k,A.querySelector("head > title"))),Cr(k,_,h),k[ot]=n,Gt(k),_=k;break e;case"link":var F=ES("link","href",A).get(_+(h.href||""));if(F){for(var Y=0;Y<F.length;Y++)if(k=F[Y],k.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&k.getAttribute("rel")===(h.rel==null?null:h.rel)&&k.getAttribute("title")===(h.title==null?null:h.title)&&k.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){F.splice(Y,1);break t}}k=A.createElement(_),Cr(k,_,h),A.head.appendChild(k);break;case"meta":if(F=ES("meta","content",A).get(_+(h.content||""))){for(Y=0;Y<F.length;Y++)if(k=F[Y],k.getAttribute("content")===(h.content==null?null:""+h.content)&&k.getAttribute("name")===(h.name==null?null:h.name)&&k.getAttribute("property")===(h.property==null?null:h.property)&&k.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&k.getAttribute("charset")===(h.charSet==null?null:h.charSet)){F.splice(Y,1);break t}}k=A.createElement(_),Cr(k,_,h),A.head.appendChild(k);break;default:throw Error(i(468,_))}k[ot]=n,Gt(k),_=k}n.stateNode=_}else AS(A,n.type,n.stateNode);else n.stateNode=wS(A,_,n.memoizedProps);else k!==_?(k===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):k.count--,_===null?AS(A,n.type,n.stateNode):wS(A,_,n.memoizedProps)):_===null&&n.stateNode!==null&&xp(n,n.memoizedProps,h.memoizedProps)}break;case 27:Kr(s,n),Yr(n),_&512&&(Jt||h===null||Ji(h,h.return)),h!==null&&_&4&&xp(n,n.memoizedProps,h.memoizedProps);break;case 5:if(Kr(s,n),Yr(n),_&512&&(Jt||h===null||Ji(h,h.return)),n.flags&32){A=n.stateNode;try{eo(A,"")}catch(ke){ut(n,n.return,ke)}}_&4&&n.stateNode!=null&&(A=n.memoizedProps,xp(n,A,h!==null?h.memoizedProps:A)),_&1024&&(Ep=!0);break;case 6:if(Kr(s,n),Yr(n),_&4){if(n.stateNode===null)throw Error(i(162));_=n.memoizedProps,h=n.stateNode;try{h.nodeValue=_}catch(ke){ut(n,n.return,ke)}}break;case 3:if(Eh=null,A=Ni,Ni=Ch(s.containerInfo),Kr(s,n),Ni=A,Yr(n),_&4&&h!==null&&h.memoizedState.isDehydrated)try{Lo(s.containerInfo)}catch(ke){ut(n,n.return,ke)}Ep&&(Ep=!1,A2(n));break;case 4:_=Ni,Ni=Ch(n.stateNode.containerInfo),Kr(s,n),Yr(n),Ni=_;break;case 12:Kr(s,n),Yr(n);break;case 31:Kr(s,n),Yr(n),_&4&&(_=n.updateQueue,_!==null&&(n.updateQueue=null,uh(n,_)));break;case 13:Kr(s,n),Yr(n),n.child.flags&8192&&n.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(hh=Ee()),_&4&&(_=n.updateQueue,_!==null&&(n.updateQueue=null,uh(n,_)));break;case 22:A=n.memoizedState!==null;var ee=h!==null&&h.memoizedState!==null,le=zn,me=Jt;if(zn=le||A,Jt=me||ee,Kr(s,n),Jt=me,zn=le,Yr(n),_&8192)e:for(s=n.stateNode,s._visibility=A?s._visibility&-2:s._visibility|1,A&&(h===null||ee||zn||Jt||va(n)),h=null,s=n;;){if(s.tag===5||s.tag===26){if(h===null){ee=h=s;try{if(k=ee.stateNode,A)F=k.style,typeof F.setProperty=="function"?F.setProperty("display","none","important"):F.display="none";else{Y=ee.stateNode;var ye=ee.memoizedProps.style,ce=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;Y.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(ke){ut(ee,ee.return,ke)}}}else if(s.tag===6){if(h===null){ee=s;try{ee.stateNode.nodeValue=A?"":ee.memoizedProps}catch(ke){ut(ee,ee.return,ke)}}}else if(s.tag===18){if(h===null){ee=s;try{var fe=ee.stateNode;A?vS(fe,!0):vS(ee.stateNode,!1)}catch(ke){ut(ee,ee.return,ke)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===n)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break e;for(;s.sibling===null;){if(s.return===null||s.return===n)break e;h===s&&(h=null),s=s.return}h===s&&(h=null),s.sibling.return=s.return,s=s.sibling}_&4&&(_=n.updateQueue,_!==null&&(h=_.retryQueue,h!==null&&(_.retryQueue=null,uh(n,h))));break;case 19:Kr(s,n),Yr(n),_&4&&(_=n.updateQueue,_!==null&&(n.updateQueue=null,uh(n,_)));break;case 30:break;case 21:break;default:Kr(s,n),Yr(n)}}function Yr(n){var s=n.flags;if(s&2){try{for(var h,_=n.return;_!==null;){if(g2(_)){h=_;break}_=_.return}if(h==null)throw Error(i(160));switch(h.tag){case 27:var A=h.stateNode,k=Cp(n);lh(n,k,A);break;case 5:var F=h.stateNode;h.flags&32&&(eo(F,""),h.flags&=-33);var Y=Cp(n);lh(n,Y,F);break;case 3:case 4:var ee=h.stateNode.containerInfo,le=Cp(n);wp(n,le,ee);break;default:throw Error(i(161))}}catch(me){ut(n,n.return,me)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function A2(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var s=n;A2(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),n=n.sibling}}function $n(n,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)b2(n,s.alternate,s),s=s.sibling}function va(n){for(n=n.child;n!==null;){var s=n;switch(s.tag){case 0:case 11:case 14:case 15:bs(4,s,s.return),va(s);break;case 1:Ji(s,s.return);var h=s.stateNode;typeof h.componentWillUnmount=="function"&&v2(s,s.return,h),va(s);break;case 27:cu(s.stateNode);case 26:case 5:Ji(s,s.return),va(s);break;case 22:s.memoizedState===null&&va(s);break;case 30:va(s);break;default:va(s)}n=n.sibling}}function Un(n,s,h){for(h=h&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var _=s.alternate,A=n,k=s,F=k.flags;switch(k.tag){case 0:case 11:case 15:Un(A,k,h),eu(4,k);break;case 1:if(Un(A,k,h),_=k,A=_.stateNode,typeof A.componentDidMount=="function")try{A.componentDidMount()}catch(le){ut(_,_.return,le)}if(_=k,A=_.updateQueue,A!==null){var Y=_.stateNode;try{var ee=A.shared.hiddenCallbacks;if(ee!==null)for(A.shared.hiddenCallbacks=null,A=0;A<ee.length;A++)ib(ee[A],Y)}catch(le){ut(_,_.return,le)}}h&&F&64&&p2(k),tu(k,k.return);break;case 27:_2(k);case 26:case 5:Un(A,k,h),h&&_===null&&F&4&&m2(k),tu(k,k.return);break;case 12:Un(A,k,h);break;case 31:Un(A,k,h),h&&F&4&&C2(A,k);break;case 13:Un(A,k,h),h&&F&4&&w2(A,k);break;case 22:k.memoizedState===null&&Un(A,k,h),tu(k,k.return);break;case 30:break;default:Un(A,k,h)}s=s.sibling}}function Ap(n,s){var h=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(h=n.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==h&&(n!=null&&n.refCount++,h!=null&&Hl(h))}function Dp(n,s){n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Hl(n))}function ji(n,s,h,_){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)D2(n,s,h,_),s=s.sibling}function D2(n,s,h,_){var A=s.flags;switch(s.tag){case 0:case 11:case 15:ji(n,s,h,_),A&2048&&eu(9,s);break;case 1:ji(n,s,h,_);break;case 3:ji(n,s,h,_),A&2048&&(n=null,s.alternate!==null&&(n=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==n&&(s.refCount++,n!=null&&Hl(n)));break;case 12:if(A&2048){ji(n,s,h,_),n=s.stateNode;try{var k=s.memoizedProps,F=k.id,Y=k.onPostCommit;typeof Y=="function"&&Y(F,s.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(ee){ut(s,s.return,ee)}}else ji(n,s,h,_);break;case 31:ji(n,s,h,_);break;case 13:ji(n,s,h,_);break;case 23:break;case 22:k=s.stateNode,F=s.alternate,s.memoizedState!==null?k._visibility&2?ji(n,s,h,_):ru(n,s):k._visibility&2?ji(n,s,h,_):(k._visibility|=2,So(n,s,h,_,(s.subtreeFlags&10256)!==0||!1)),A&2048&&Ap(F,s);break;case 24:ji(n,s,h,_),A&2048&&Dp(s.alternate,s);break;default:ji(n,s,h,_)}}function So(n,s,h,_,A){for(A=A&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var k=n,F=s,Y=h,ee=_,le=F.flags;switch(F.tag){case 0:case 11:case 15:So(k,F,Y,ee,A),eu(8,F);break;case 23:break;case 22:var me=F.stateNode;F.memoizedState!==null?me._visibility&2?So(k,F,Y,ee,A):ru(k,F):(me._visibility|=2,So(k,F,Y,ee,A)),A&&le&2048&&Ap(F.alternate,F);break;case 24:So(k,F,Y,ee,A),A&&le&2048&&Dp(F.alternate,F);break;default:So(k,F,Y,ee,A)}s=s.sibling}}function ru(n,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var h=n,_=s,A=_.flags;switch(_.tag){case 22:ru(h,_),A&2048&&Ap(_.alternate,_);break;case 24:ru(h,_),A&2048&&Dp(_.alternate,_);break;default:ru(h,_)}s=s.sibling}}var iu=8192;function xo(n,s,h){if(n.subtreeFlags&iu)for(n=n.child;n!==null;)T2(n,s,h),n=n.sibling}function T2(n,s,h){switch(n.tag){case 26:xo(n,s,h),n.flags&iu&&n.memoizedState!==null&&OO(h,Ni,n.memoizedState,n.memoizedProps);break;case 5:xo(n,s,h);break;case 3:case 4:var _=Ni;Ni=Ch(n.stateNode.containerInfo),xo(n,s,h),Ni=_;break;case 22:n.memoizedState===null&&(_=n.alternate,_!==null&&_.memoizedState!==null?(_=iu,iu=16777216,xo(n,s,h),iu=_):xo(n,s,h));break;default:xo(n,s,h)}}function M2(n){var s=n.alternate;if(s!==null&&(n=s.child,n!==null)){s.child=null;do s=n.sibling,n.sibling=null,n=s;while(n!==null)}}function nu(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var h=0;h<s.length;h++){var _=s[h];cr=_,O2(_,n)}M2(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)k2(n),n=n.sibling}function k2(n){switch(n.tag){case 0:case 11:case 15:nu(n),n.flags&2048&&bs(9,n,n.return);break;case 3:nu(n);break;case 12:nu(n);break;case 22:var s=n.stateNode;n.memoizedState!==null&&s._visibility&2&&(n.return===null||n.return.tag!==13)?(s._visibility&=-3,ch(n)):nu(n);break;default:nu(n)}}function ch(n){var s=n.deletions;if((n.flags&16)!==0){if(s!==null)for(var h=0;h<s.length;h++){var _=s[h];cr=_,O2(_,n)}M2(n)}for(n=n.child;n!==null;){switch(s=n,s.tag){case 0:case 11:case 15:bs(8,s,s.return),ch(s);break;case 22:h=s.stateNode,h._visibility&2&&(h._visibility&=-3,ch(s));break;default:ch(s)}n=n.sibling}}function O2(n,s){for(;cr!==null;){var h=cr;switch(h.tag){case 0:case 11:case 15:bs(8,h,s);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var _=h.memoizedState.cachePool.pool;_!=null&&_.refCount++}break;case 24:Hl(h.memoizedState.cache)}if(_=h.child,_!==null)_.return=h,cr=_;else e:for(h=n;cr!==null;){_=cr;var A=_.sibling,k=_.return;if(S2(_),_===h){cr=null;break e}if(A!==null){A.return=k,cr=A;break e}cr=k}}}var Gk={getCacheForType:function(n){var s=Sr(Xt),h=s.data.get(n);return h===void 0&&(h=n(),s.data.set(n,h)),h},cacheSignal:function(){return Sr(Xt).controller.signal}},Kk=typeof WeakMap=="function"?WeakMap:Map,st=0,vt=null,Ye=null,Xe=0,lt=0,si=null,Ss=!1,Co=!1,Tp=!1,qn=0,Ft=0,xs=0,ma=0,Mp=0,ai=0,wo=0,su=null,Vr=null,kp=!1,hh=0,L2=0,fh=1/0,dh=null,Cs=null,ir=0,ws=null,Eo=null,Wn=0,Op=0,Lp=null,R2=null,au=0,Rp=null;function oi(){return(st&2)!==0&&Xe!==0?Xe&-Xe:U.T!==null?Fp():Al()}function P2(){if(ai===0)if((Xe&536870912)===0||Qe){var n=yr;yr<<=1,(yr&3932160)===0&&(yr=262144),ai=n}else ai=536870912;return n=ii.current,n!==null&&(n.flags|=32),ai}function Xr(n,s,h){(n===vt&&(lt===2||lt===9)||n.cancelPendingCommit!==null)&&(Ao(n,0),Es(n,Xe,ai,!1)),Zs(n,h),((st&2)===0||n!==vt)&&(n===vt&&((st&2)===0&&(ma|=h),Ft===4&&Es(n,Xe,ai,!1)),en(n))}function B2(n,s,h){if((st&6)!==0)throw Error(i(327));var _=!h&&(s&127)===0&&(s&n.expiredLanes)===0||Sn(n,s),A=_?Xk(n,s):Bp(n,s,!0),k=_;do{if(A===0){Co&&!_&&Es(n,s,0,!1);break}else{if(h=n.current.alternate,k&&!Yk(h)){A=Bp(n,s,!1),k=!1;continue}if(A===2){if(k=s,n.errorRecoveryDisabledLanes&k)var F=0;else F=n.pendingLanes&-536870913,F=F!==0?F:F&536870912?536870912:0;if(F!==0){s=F;e:{var Y=n;A=su;var ee=Y.current.memoizedState.isDehydrated;if(ee&&(Ao(Y,F).flags|=256),F=Bp(Y,F,!1),F!==2){if(Tp&&!ee){Y.errorRecoveryDisabledLanes|=k,ma|=k,A=4;break e}k=Vr,Vr=A,k!==null&&(Vr===null?Vr=k:Vr.push.apply(Vr,k))}A=F}if(k=!1,A!==2)continue}}if(A===1){Ao(n,0),Es(n,s,0,!0);break}e:{switch(_=n,k=A,k){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:Es(_,s,ai,!Ss);break e;case 2:Vr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(A=hh+300-Ee(),10<A)){if(Es(_,s,ai,!Ss),Ka(_,0,!0)!==0)break e;Wn=s,_.timeoutHandle=fS(I2.bind(null,_,h,Vr,dh,kp,s,ai,ma,wo,Ss,k,"Throttled",-0,0),A);break e}I2(_,h,Vr,dh,kp,s,ai,ma,wo,Ss,k,null,-0,0)}}break}while(!0);en(n)}function I2(n,s,h,_,A,k,F,Y,ee,le,me,ye,ce,fe){if(n.timeoutHandle=-1,ye=s.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:kn},T2(s,k,ye);var ke=(k&62914560)===k?hh-Ee():(k&4194048)===k?L2-Ee():0;if(ke=LO(ye,ke),ke!==null){Wn=k,n.cancelPendingCommit=ke(q2.bind(null,n,s,k,h,_,A,F,Y,ee,me,ye,null,ce,fe)),Es(n,k,F,!le);return}}q2(n,s,k,h,_,A,F,Y,ee)}function Yk(n){for(var s=n;;){var h=s.tag;if((h===0||h===11||h===15)&&s.flags&16384&&(h=s.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var _=0;_<h.length;_++){var A=h[_],k=A.getSnapshot;A=A.value;try{if(!ti(k(),A))return!1}catch{return!1}}if(h=s.child,s.subtreeFlags&16384&&h!==null)h.return=s,s=h;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Es(n,s,h,_){s&=~Mp,s&=~ma,n.suspendedLanes|=s,n.pingedLanes&=~s,_&&(n.warmLanes|=s),_=n.expirationTimes;for(var A=s;0<A;){var k=31-Rt(A),F=1<<k;_[k]=-1,A&=~F}h!==0&&Tt(n,h,s)}function ph(){return(st&6)===0?(ou(0),!1):!0}function Pp(){if(Ye!==null){if(lt===0)var n=Ye.return;else n=Ye,Pn=oa=null,X0(n),mo=null,Ul=0,n=Ye;for(;n!==null;)d2(n.alternate,n),n=n.return;Ye=null}}function Ao(n,s){var h=n.timeoutHandle;h!==-1&&(n.timeoutHandle=-1,pO(h)),h=n.cancelPendingCommit,h!==null&&(n.cancelPendingCommit=null,h()),Wn=0,Pp(),vt=n,Ye=h=Ln(n.current,null),Xe=s,lt=0,si=null,Ss=!1,Co=Sn(n,s),Tp=!1,wo=ai=Mp=ma=xs=Ft=0,Vr=su=null,kp=!1,(s&8)!==0&&(s|=s&32);var _=n.entangledLanes;if(_!==0)for(n=n.entanglements,_&=s;0<_;){var A=31-Rt(_),k=1<<A;s|=n[A],_&=~k}return qn=s,Bc(),h}function N2(n,s){He=null,U.H=Zl,s===vo||s===Uc?(s=Jy(),lt=3):s===j0?(s=Jy(),lt=4):lt=s===fp?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,si=s,Ye===null&&(Ft=1,ih(n,_i(s,n.current)))}function j2(){var n=ii.current;return n===null?!0:(Xe&4194048)===Xe?xi===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?n===xi:!1}function F2(){var n=U.H;return U.H=Zl,n===null?Zl:n}function z2(){var n=U.A;return U.A=Gk,n}function vh(){Ft=4,Ss||(Xe&4194048)!==Xe&&ii.current!==null||(Co=!0),(xs&134217727)===0&&(ma&134217727)===0||vt===null||Es(vt,Xe,ai,!1)}function Bp(n,s,h){var _=st;st|=2;var A=F2(),k=z2();(vt!==n||Xe!==s)&&(dh=null,Ao(n,s)),s=!1;var F=Ft;e:do try{if(lt!==0&&Ye!==null){var Y=Ye,ee=si;switch(lt){case 8:Pp(),F=6;break e;case 3:case 2:case 9:case 6:ii.current===null&&(s=!0);var le=lt;if(lt=0,si=null,Do(n,Y,ee,le),h&&Co){F=0;break e}break;default:le=lt,lt=0,si=null,Do(n,Y,ee,le)}}Vk(),F=Ft;break}catch(me){N2(n,me)}while(!0);return s&&n.shellSuspendCounter++,Pn=oa=null,st=_,U.H=A,U.A=k,Ye===null&&(vt=null,Xe=0,Bc()),F}function Vk(){for(;Ye!==null;)H2(Ye)}function Xk(n,s){var h=st;st|=2;var _=F2(),A=z2();vt!==n||Xe!==s?(dh=null,fh=Ee()+500,Ao(n,s)):Co=Sn(n,s);e:do try{if(lt!==0&&Ye!==null){s=Ye;var k=si;t:switch(lt){case 1:lt=0,si=null,Do(n,s,k,1);break;case 2:case 9:if(Zy(k)){lt=0,si=null,$2(s);break}s=function(){lt!==2&<!==9||vt!==n||(lt=7),en(n)},k.then(s,s);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Zy(k)?(lt=0,si=null,$2(s)):(lt=0,si=null,Do(n,s,k,7));break;case 5:var F=null;switch(Ye.tag){case 26:F=Ye.memoizedState;case 5:case 27:var Y=Ye;if(F?DS(F):Y.stateNode.complete){lt=0,si=null;var ee=Y.sibling;if(ee!==null)Ye=ee;else{var le=Y.return;le!==null?(Ye=le,mh(le)):Ye=null}break t}}lt=0,si=null,Do(n,s,k,5);break;case 6:lt=0,si=null,Do(n,s,k,6);break;case 8:Pp(),Ft=6;break e;default:throw Error(i(462))}}Zk();break}catch(me){N2(n,me)}while(!0);return Pn=oa=null,U.H=_,U.A=A,st=h,Ye!==null?0:(vt=null,Xe=0,Bc(),Ft)}function Zk(){for(;Ye!==null&&!we();)H2(Ye)}function H2(n){var s=h2(n.alternate,n,qn);n.memoizedProps=n.pendingProps,s===null?mh(n):Ye=s}function $2(n){var s=n,h=s.alternate;switch(s.tag){case 15:case 0:s=s2(h,s,s.pendingProps,s.type,void 0,Xe);break;case 11:s=s2(h,s,s.pendingProps,s.type.render,s.ref,Xe);break;case 5:X0(s);default:d2(h,s),s=Ye=zy(s,qn),s=h2(h,s,qn)}n.memoizedProps=n.pendingProps,s===null?mh(n):Ye=s}function Do(n,s,h,_){Pn=oa=null,X0(s),mo=null,Ul=0;var A=s.return;try{if(Fk(n,A,s,h,Xe)){Ft=1,ih(n,_i(h,n.current)),Ye=null;return}}catch(k){if(A!==null)throw Ye=A,k;Ft=1,ih(n,_i(h,n.current)),Ye=null;return}s.flags&32768?(Qe||_===1?n=!0:Co||(Xe&536870912)!==0?n=!1:(Ss=n=!0,(_===2||_===9||_===3||_===6)&&(_=ii.current,_!==null&&_.tag===13&&(_.flags|=16384))),U2(s,n)):mh(s)}function mh(n){var s=n;do{if((s.flags&32768)!==0){U2(s,Ss);return}n=s.return;var h=$k(s.alternate,s,qn);if(h!==null){Ye=h;return}if(s=s.sibling,s!==null){Ye=s;return}Ye=s=n}while(s!==null);Ft===0&&(Ft=5)}function U2(n,s){do{var h=Uk(n.alternate,n);if(h!==null){h.flags&=32767,Ye=h;return}if(h=n.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!s&&(n=n.sibling,n!==null)){Ye=n;return}Ye=n=h}while(n!==null);Ft=6,Ye=null}function q2(n,s,h,_,A,k,F,Y,ee){n.cancelPendingCommit=null;do gh();while(ir!==0);if((st&6)!==0)throw Error(i(327));if(s!==null){if(s===n.current)throw Error(i(177));if(k=s.lanes|s.childLanes,k|=C0,r0(n,h,k,F,Y,ee),n===vt&&(Ye=vt=null,Xe=0),Eo=s,ws=n,Wn=h,Op=k,Lp=A,R2=_,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,tO(ct,function(){return V2(),null})):(n.callbackNode=null,n.callbackPriority=0),_=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||_){_=U.T,U.T=null,A=K.p,K.p=2,F=st,st|=4;try{qk(n,s,h)}finally{st=F,K.p=A,U.T=_}}ir=1,W2(),G2(),K2()}}function W2(){if(ir===1){ir=0;var n=ws,s=Eo,h=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||h){h=U.T,U.T=null;var _=K.p;K.p=2;var A=st;st|=4;try{E2(s,n);var k=Kp,F=Oy(n.containerInfo),Y=k.focusedElem,ee=k.selectionRange;if(F!==Y&&Y&&Y.ownerDocument&&ky(Y.ownerDocument.documentElement,Y)){if(ee!==null&&_0(Y)){var le=ee.start,me=ee.end;if(me===void 0&&(me=le),"selectionStart"in Y)Y.selectionStart=le,Y.selectionEnd=Math.min(me,Y.value.length);else{var ye=Y.ownerDocument||document,ce=ye&&ye.defaultView||window;if(ce.getSelection){var fe=ce.getSelection(),ke=Y.textContent.length,Fe=Math.min(ee.start,ke),dt=ee.end===void 0?Fe:Math.min(ee.end,ke);!fe.extend&&Fe>dt&&(F=dt,dt=Fe,Fe=F);var ae=My(Y,Fe),ne=My(Y,dt);if(ae&&ne&&(fe.rangeCount!==1||fe.anchorNode!==ae.node||fe.anchorOffset!==ae.offset||fe.focusNode!==ne.node||fe.focusOffset!==ne.offset)){var oe=ye.createRange();oe.setStart(ae.node,ae.offset),fe.removeAllRanges(),Fe>dt?(fe.addRange(oe),fe.extend(ne.node,ne.offset)):(oe.setEnd(ne.node,ne.offset),fe.addRange(oe))}}}}for(ye=[],fe=Y;fe=fe.parentNode;)fe.nodeType===1&&ye.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof Y.focus=="function"&&Y.focus(),Y=0;Y<ye.length;Y++){var _e=ye[Y];_e.element.scrollLeft=_e.left,_e.element.scrollTop=_e.top}}Mh=!!Gp,Kp=Gp=null}finally{st=A,K.p=_,U.T=h}}n.current=s,ir=2}}function G2(){if(ir===2){ir=0;var n=ws,s=Eo,h=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||h){h=U.T,U.T=null;var _=K.p;K.p=2;var A=st;st|=4;try{b2(n,s.alternate,s)}finally{st=A,K.p=_,U.T=h}}ir=3}}function K2(){if(ir===4||ir===3){ir=0,de();var n=ws,s=Eo,h=Wn,_=R2;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ir=5:(ir=0,Eo=ws=null,Y2(n,n.pendingLanes));var A=n.pendingLanes;if(A===0&&(Cs=null),Qs(h),s=s.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(rr,s,void 0,(s.current.flags&128)===128)}catch{}if(_!==null){s=U.T,A=K.p,K.p=2,U.T=null;try{for(var k=n.onRecoverableError,F=0;F<_.length;F++){var Y=_[F];k(Y.value,{componentStack:Y.stack})}}finally{U.T=s,K.p=A}}(Wn&3)!==0&&gh(),en(n),A=n.pendingLanes,(h&261930)!==0&&(A&42)!==0?n===Rp?au++:(au=0,Rp=n):au=0,ou(0)}}function Y2(n,s){(n.pooledCacheLanes&=s)===0&&(s=n.pooledCache,s!=null&&(n.pooledCache=null,Hl(s)))}function gh(){return W2(),G2(),K2(),V2()}function V2(){if(ir!==5)return!1;var n=ws,s=Op;Op=0;var h=Qs(Wn),_=U.T,A=K.p;try{K.p=32>h?32:h,U.T=null,h=Lp,Lp=null;var k=ws,F=Wn;if(ir=0,Eo=ws=null,Wn=0,(st&6)!==0)throw Error(i(331));var Y=st;if(st|=4,k2(k.current),D2(k,k.current,F,h),st=Y,ou(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(rr,k)}catch{}return!0}finally{K.p=A,U.T=_,Y2(n,s)}}function X2(n,s,h){s=_i(h,s),s=hp(n.stateNode,s,2),n=gs(n,s,2),n!==null&&(Zs(n,2),en(n))}function ut(n,s,h){if(n.tag===3)X2(n,n,h);else for(;s!==null;){if(s.tag===3){X2(s,n,h);break}else if(s.tag===1){var _=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof _.componentDidCatch=="function"&&(Cs===null||!Cs.has(_))){n=_i(h,n),h=Zb(2),_=gs(s,h,2),_!==null&&(Qb(h,_,s,n),Zs(_,2),en(_));break}}s=s.return}}function Ip(n,s,h){var _=n.pingCache;if(_===null){_=n.pingCache=new Kk;var A=new Set;_.set(s,A)}else A=_.get(s),A===void 0&&(A=new Set,_.set(s,A));A.has(h)||(Tp=!0,A.add(h),n=Qk.bind(null,n,s,h),s.then(n,n))}function Qk(n,s,h){var _=n.pingCache;_!==null&&_.delete(s),n.pingedLanes|=n.suspendedLanes&h,n.warmLanes&=~h,vt===n&&(Xe&h)===h&&(Ft===4||Ft===3&&(Xe&62914560)===Xe&&300>Ee()-hh?(st&2)===0&&Ao(n,0):Mp|=h,wo===Xe&&(wo=0)),en(n)}function Z2(n,s){s===0&&(s=wc()),n=na(n,s),n!==null&&(Zs(n,s),en(n))}function Jk(n){var s=n.memoizedState,h=0;s!==null&&(h=s.retryLane),Z2(n,h)}function eO(n,s){var h=0;switch(n.tag){case 31:case 13:var _=n.stateNode,A=n.memoizedState;A!==null&&(h=A.retryLane);break;case 19:_=n.stateNode;break;case 22:_=n.stateNode._retryCache;break;default:throw Error(i(314))}_!==null&&_.delete(s),Z2(n,h)}function tO(n,s){return Ae(n,s)}var _h=null,To=null,Np=!1,yh=!1,jp=!1,As=0;function en(n){n!==To&&n.next===null&&(To===null?_h=To=n:To=To.next=n),yh=!0,Np||(Np=!0,iO())}function ou(n,s){if(!jp&&yh){jp=!0;do for(var h=!1,_=_h;_!==null;){if(n!==0){var A=_.pendingLanes;if(A===0)var k=0;else{var F=_.suspendedLanes,Y=_.pingedLanes;k=(1<<31-Rt(42|n)+1)-1,k&=A&~(F&~Y),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(h=!0,tS(_,k))}else k=Xe,k=Ka(_,_===vt?k:0,_.cancelPendingCommit!==null||_.timeoutHandle!==-1),(k&3)===0||Sn(_,k)||(h=!0,tS(_,k));_=_.next}while(h);jp=!1}}function rO(){Q2()}function Q2(){yh=Np=!1;var n=0;As!==0&&dO()&&(n=As);for(var s=Ee(),h=null,_=_h;_!==null;){var A=_.next,k=J2(_,s);k===0?(_.next=null,h===null?_h=A:h.next=A,A===null&&(To=h)):(h=_,(n!==0||(k&3)!==0)&&(yh=!0)),_=A}ir!==0&&ir!==5||ou(n),As!==0&&(As=0)}function J2(n,s){for(var h=n.suspendedLanes,_=n.pingedLanes,A=n.expirationTimes,k=n.pendingLanes&-62914561;0<k;){var F=31-Rt(k),Y=1<<F,ee=A[F];ee===-1?((Y&h)===0||(Y&_)!==0)&&(A[F]=El(Y,s)):ee<=s&&(n.expiredLanes|=Y),k&=~Y}if(s=vt,h=Xe,h=Ka(n,n===s?h:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),_=n.callbackNode,h===0||n===s&&(lt===2||lt===9)||n.cancelPendingCommit!==null)return _!==null&&_!==null&&Ce(_),n.callbackNode=null,n.callbackPriority=0;if((h&3)===0||Sn(n,h)){if(s=h&-h,s===n.callbackPriority)return s;switch(_!==null&&Ce(_),Qs(h)){case 2:case 8:h=qt;break;case 32:h=ct;break;case 268435456:h=Ue;break;default:h=ct}return _=eS.bind(null,n),h=Ae(h,_),n.callbackPriority=s,n.callbackNode=h,s}return _!==null&&_!==null&&Ce(_),n.callbackPriority=2,n.callbackNode=null,2}function eS(n,s){if(ir!==0&&ir!==5)return n.callbackNode=null,n.callbackPriority=0,null;var h=n.callbackNode;if(gh()&&n.callbackNode!==h)return null;var _=Xe;return _=Ka(n,n===vt?_:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),_===0?null:(B2(n,_,s),J2(n,Ee()),n.callbackNode!=null&&n.callbackNode===h?eS.bind(null,n):null)}function tS(n,s){if(gh())return null;B2(n,s,!0)}function iO(){vO(function(){(st&6)!==0?Ae(je,rO):Q2()})}function Fp(){if(As===0){var n=fo;n===0&&(n=Pt,Pt<<=1,(Pt&261888)===0&&(Pt=256)),As=n}return As}function rS(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Dc(""+n)}function iS(n,s){var h=s.ownerDocument.createElement("input");return h.name=s.name,h.value=s.value,n.id&&h.setAttribute("form",n.id),s.parentNode.insertBefore(h,s),n=new FormData(n),h.parentNode.removeChild(h),n}function nO(n,s,h,_,A){if(s==="submit"&&h&&h.stateNode===A){var k=rS((A[It]||null).action),F=_.submitter;F&&(s=(s=F[It]||null)?rS(s.formAction):F.getAttribute("formAction"),s!==null&&(k=s,F=null));var Y=new Oc("action","action",null,_,A);n.push({event:Y,listeners:[{instance:null,listener:function(){if(_.defaultPrevented){if(As!==0){var ee=F?iS(A,F):new FormData(A);sp(h,{pending:!0,data:ee,method:A.method,action:k},null,ee)}}else typeof k=="function"&&(Y.preventDefault(),ee=F?iS(A,F):new FormData(A),sp(h,{pending:!0,data:ee,method:A.method,action:k},k,ee))},currentTarget:A}]})}}for(var zp=0;zp<x0.length;zp++){var Hp=x0[zp],sO=Hp.toLowerCase(),aO=Hp[0].toUpperCase()+Hp.slice(1);Ii(sO,"on"+aO)}Ii(Py,"onAnimationEnd"),Ii(By,"onAnimationIteration"),Ii(Iy,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii(xk,"onTransitionRun"),Ii(Ck,"onTransitionStart"),Ii(wk,"onTransitionCancel"),Ii(Ny,"onTransitionEnd"),X("onMouseEnter",["mouseout","mouseover"]),X("onMouseLeave",["mouseout","mouseover"]),X("onPointerEnter",["pointerout","pointerover"]),X("onPointerLeave",["pointerout","pointerover"]),Te("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Te("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Te("onBeforeInput",["compositionend","keypress","textInput","paste"]),Te("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Te("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Te("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),oO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lu));function nS(n,s){s=(s&4)!==0;for(var h=0;h<n.length;h++){var _=n[h],A=_.event;_=_.listeners;e:{var k=void 0;if(s)for(var F=_.length-1;0<=F;F--){var Y=_[F],ee=Y.instance,le=Y.currentTarget;if(Y=Y.listener,ee!==k&&A.isPropagationStopped())break e;k=Y,A.currentTarget=le;try{k(A)}catch(me){Pc(me)}A.currentTarget=null,k=ee}else for(F=0;F<_.length;F++){if(Y=_[F],ee=Y.instance,le=Y.currentTarget,Y=Y.listener,ee!==k&&A.isPropagationStopped())break e;k=Y,A.currentTarget=le;try{k(A)}catch(me){Pc(me)}A.currentTarget=null,k=ee}}}}function Ve(n,s){var h=s[Va];h===void 0&&(h=s[Va]=new Set);var _=n+"__bubble";h.has(_)||(sS(s,n,2,!1),h.add(_))}function $p(n,s,h){var _=0;s&&(_|=4),sS(h,n,_,s)}var bh="_reactListening"+Math.random().toString(36).slice(2);function Up(n){if(!n[bh]){n[bh]=!0,ea.forEach(function(h){h!=="selectionchange"&&(oO.has(h)||$p(h,!1,n),$p(h,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[bh]||(s[bh]=!0,$p("selectionchange",!1,s))}}function sS(n,s,h,_){switch(PS(s)){case 2:var A=BO;break;case 8:A=IO;break;default:A=nv}h=A.bind(null,s,h,n),A=void 0,!u0||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(A=!0),_?A!==void 0?n.addEventListener(s,h,{capture:!0,passive:A}):n.addEventListener(s,h,!0):A!==void 0?n.addEventListener(s,h,{passive:A}):n.addEventListener(s,h,!1)}function qp(n,s,h,_,A){var k=_;if((s&1)===0&&(s&2)===0&&_!==null)e:for(;;){if(_===null)return;var F=_.tag;if(F===3||F===4){var Y=_.stateNode.containerInfo;if(Y===A)break;if(F===4)for(F=_.return;F!==null;){var ee=F.tag;if((ee===3||ee===4)&&F.stateNode.containerInfo===A)return;F=F.return}for(;Y!==null;){if(F=An(Y),F===null)return;if(ee=F.tag,ee===5||ee===6||ee===26||ee===27){_=k=F;continue e}Y=Y.parentNode}}_=_.return}cy(function(){var le=k,me=o0(h),ye=[];e:{var ce=jy.get(n);if(ce!==void 0){var fe=Oc,ke=n;switch(n){case"keypress":if(Mc(h)===0)break e;case"keydown":case"keyup":fe=ek;break;case"focusin":ke="focus",fe=d0;break;case"focusout":ke="blur",fe=d0;break;case"beforeblur":case"afterblur":fe=d0;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=dy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=$M;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=ik;break;case Py:case By:case Iy:fe=WM;break;case Ny:fe=sk;break;case"scroll":case"scrollend":fe=zM;break;case"wheel":fe=ok;break;case"copy":case"cut":case"paste":fe=KM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=vy;break;case"toggle":case"beforetoggle":fe=uk}var Fe=(s&4)!==0,dt=!Fe&&(n==="scroll"||n==="scrollend"),ae=Fe?ce!==null?ce+"Capture":null:ce;Fe=[];for(var ne=le,oe;ne!==null;){var _e=ne;if(oe=_e.stateNode,_e=_e.tag,_e!==5&&_e!==26&&_e!==27||oe===null||ae===null||(_e=kl(ne,ae),_e!=null&&Fe.push(uu(ne,_e,oe))),dt)break;ne=ne.return}0<Fe.length&&(ce=new fe(ce,ke,null,h,me),ye.push({event:ce,listeners:Fe}))}}if((s&7)===0){e:{if(ce=n==="mouseover"||n==="pointerover",fe=n==="mouseout"||n==="pointerout",ce&&h!==a0&&(ke=h.relatedTarget||h.fromElement)&&(An(ke)||ke[wn]))break e;if((fe||ce)&&(ce=me.window===me?me:(ce=me.ownerDocument)?ce.defaultView||ce.parentWindow:window,fe?(ke=h.relatedTarget||h.toElement,fe=le,ke=ke?An(ke):null,ke!==null&&(dt=l(ke),Fe=ke.tag,ke!==dt||Fe!==5&&Fe!==27&&Fe!==6)&&(ke=null)):(fe=null,ke=le),fe!==ke)){if(Fe=dy,_e="onMouseLeave",ae="onMouseEnter",ne="mouse",(n==="pointerout"||n==="pointerover")&&(Fe=vy,_e="onPointerLeave",ae="onPointerEnter",ne="pointer"),dt=fe==null?ce:Js(fe),oe=ke==null?ce:Js(ke),ce=new Fe(_e,ne+"leave",fe,h,me),ce.target=dt,ce.relatedTarget=oe,_e=null,An(me)===le&&(Fe=new Fe(ae,ne+"enter",ke,h,me),Fe.target=oe,Fe.relatedTarget=dt,_e=Fe),dt=_e,fe&&ke)t:{for(Fe=lO,ae=fe,ne=ke,oe=0,_e=ae;_e;_e=Fe(_e))oe++;_e=0;for(var Be=ne;Be;Be=Fe(Be))_e++;for(;0<oe-_e;)ae=Fe(ae),oe--;for(;0<_e-oe;)ne=Fe(ne),_e--;for(;oe--;){if(ae===ne||ne!==null&&ae===ne.alternate){Fe=ae;break t}ae=Fe(ae),ne=Fe(ne)}Fe=null}else Fe=null;fe!==null&&aS(ye,ce,fe,Fe,!1),ke!==null&&dt!==null&&aS(ye,dt,ke,Fe,!0)}}e:{if(ce=le?Js(le):window,fe=ce.nodeName&&ce.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ce.type==="file")var rt=Cy;else if(Sy(ce))if(wy)rt=yk;else{rt=gk;var Re=mk}else fe=ce.nodeName,!fe||fe.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?le&&s0(le.elementType)&&(rt=Cy):rt=_k;if(rt&&(rt=rt(n,le))){xy(ye,rt,h,me);break e}Re&&Re(n,ce,le),n==="focusout"&&le&&ce.type==="number"&&le.memoizedProps.value!=null&&n0(ce,"number",ce.value)}switch(Re=le?Js(le):window,n){case"focusin":(Sy(Re)||Re.contentEditable==="true")&&(no=Re,y0=le,jl=null);break;case"focusout":jl=y0=no=null;break;case"mousedown":b0=!0;break;case"contextmenu":case"mouseup":case"dragend":b0=!1,Ly(ye,h,me);break;case"selectionchange":if(Sk)break;case"keydown":case"keyup":Ly(ye,h,me)}var We;if(v0)e:{switch(n){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else io?yy(n,h)&&(Ze="onCompositionEnd"):n==="keydown"&&h.keyCode===229&&(Ze="onCompositionStart");Ze&&(my&&h.locale!=="ko"&&(io||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&io&&(We=hy()):(cs=me,c0="value"in cs?cs.value:cs.textContent,io=!0)),Re=Sh(le,Ze),0<Re.length&&(Ze=new py(Ze,n,null,h,me),ye.push({event:Ze,listeners:Re}),We?Ze.data=We:(We=by(h),We!==null&&(Ze.data=We)))),(We=hk?fk(n,h):dk(n,h))&&(Ze=Sh(le,"onBeforeInput"),0<Ze.length&&(Re=new py("onBeforeInput","beforeinput",null,h,me),ye.push({event:Re,listeners:Ze}),Re.data=We)),nO(ye,n,le,h,me)}nS(ye,s)})}function uu(n,s,h){return{instance:n,listener:s,currentTarget:h}}function Sh(n,s){for(var h=s+"Capture",_=[];n!==null;){var A=n,k=A.stateNode;if(A=A.tag,A!==5&&A!==26&&A!==27||k===null||(A=kl(n,h),A!=null&&_.unshift(uu(n,A,k)),A=kl(n,s),A!=null&&_.push(uu(n,A,k))),n.tag===3)return _;n=n.return}return[]}function lO(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function aS(n,s,h,_,A){for(var k=s._reactName,F=[];h!==null&&h!==_;){var Y=h,ee=Y.alternate,le=Y.stateNode;if(Y=Y.tag,ee!==null&&ee===_)break;Y!==5&&Y!==26&&Y!==27||le===null||(ee=le,A?(le=kl(h,k),le!=null&&F.unshift(uu(h,le,ee))):A||(le=kl(h,k),le!=null&&F.push(uu(h,le,ee)))),h=h.return}F.length!==0&&n.push({event:s,listeners:F})}var uO=/\r\n?/g,cO=/\u0000|\uFFFD/g;function oS(n){return(typeof n=="string"?n:""+n).replace(uO,`
|
|
49
|
+
`).replace(cO,"")}function lS(n,s){return s=oS(s),oS(n)===s}function ft(n,s,h,_,A,k){switch(h){case"children":typeof _=="string"?s==="body"||s==="textarea"&&_===""||eo(n,_):(typeof _=="number"||typeof _=="bigint")&&s!=="body"&&eo(n,""+_);break;case"className":Mt(n,"class",_);break;case"tabIndex":Mt(n,"tabindex",_);break;case"dir":case"role":case"viewBox":case"width":case"height":Mt(n,h,_);break;case"style":ly(n,_,k);break;case"data":if(s!=="object"){Mt(n,"data",_);break}case"src":case"href":if(_===""&&(s!=="a"||h!=="href")){n.removeAttribute(h);break}if(_==null||typeof _=="function"||typeof _=="symbol"||typeof _=="boolean"){n.removeAttribute(h);break}_=Dc(""+_),n.setAttribute(h,_);break;case"action":case"formAction":if(typeof _=="function"){n.setAttribute(h,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof k=="function"&&(h==="formAction"?(s!=="input"&&ft(n,s,"name",A.name,A,null),ft(n,s,"formEncType",A.formEncType,A,null),ft(n,s,"formMethod",A.formMethod,A,null),ft(n,s,"formTarget",A.formTarget,A,null)):(ft(n,s,"encType",A.encType,A,null),ft(n,s,"method",A.method,A,null),ft(n,s,"target",A.target,A,null)));if(_==null||typeof _=="symbol"||typeof _=="boolean"){n.removeAttribute(h);break}_=Dc(""+_),n.setAttribute(h,_);break;case"onClick":_!=null&&(n.onclick=kn);break;case"onScroll":_!=null&&Ve("scroll",n);break;case"onScrollEnd":_!=null&&Ve("scrollend",n);break;case"dangerouslySetInnerHTML":if(_!=null){if(typeof _!="object"||!("__html"in _))throw Error(i(61));if(h=_.__html,h!=null){if(A.children!=null)throw Error(i(60));n.innerHTML=h}}break;case"multiple":n.multiple=_&&typeof _!="function"&&typeof _!="symbol";break;case"muted":n.muted=_&&typeof _!="function"&&typeof _!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(_==null||typeof _=="function"||typeof _=="boolean"||typeof _=="symbol"){n.removeAttribute("xlink:href");break}h=Dc(""+_),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":_!=null&&typeof _!="function"&&typeof _!="symbol"?n.setAttribute(h,""+_):n.removeAttribute(h);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":_&&typeof _!="function"&&typeof _!="symbol"?n.setAttribute(h,""):n.removeAttribute(h);break;case"capture":case"download":_===!0?n.setAttribute(h,""):_!==!1&&_!=null&&typeof _!="function"&&typeof _!="symbol"?n.setAttribute(h,_):n.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":_!=null&&typeof _!="function"&&typeof _!="symbol"&&!isNaN(_)&&1<=_?n.setAttribute(h,_):n.removeAttribute(h);break;case"rowSpan":case"start":_==null||typeof _=="function"||typeof _=="symbol"||isNaN(_)?n.removeAttribute(h):n.setAttribute(h,_);break;case"popover":Ve("beforetoggle",n),Ve("toggle",n),tt(n,"popover",_);break;case"xlinkActuate":Nt(n,"http://www.w3.org/1999/xlink","xlink:actuate",_);break;case"xlinkArcrole":Nt(n,"http://www.w3.org/1999/xlink","xlink:arcrole",_);break;case"xlinkRole":Nt(n,"http://www.w3.org/1999/xlink","xlink:role",_);break;case"xlinkShow":Nt(n,"http://www.w3.org/1999/xlink","xlink:show",_);break;case"xlinkTitle":Nt(n,"http://www.w3.org/1999/xlink","xlink:title",_);break;case"xlinkType":Nt(n,"http://www.w3.org/1999/xlink","xlink:type",_);break;case"xmlBase":Nt(n,"http://www.w3.org/XML/1998/namespace","xml:base",_);break;case"xmlLang":Nt(n,"http://www.w3.org/XML/1998/namespace","xml:lang",_);break;case"xmlSpace":Nt(n,"http://www.w3.org/XML/1998/namespace","xml:space",_);break;case"is":tt(n,"is",_);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=jM.get(h)||h,tt(n,h,_))}}function Wp(n,s,h,_,A,k){switch(h){case"style":ly(n,_,k);break;case"dangerouslySetInnerHTML":if(_!=null){if(typeof _!="object"||!("__html"in _))throw Error(i(61));if(h=_.__html,h!=null){if(A.children!=null)throw Error(i(60));n.innerHTML=h}}break;case"children":typeof _=="string"?eo(n,_):(typeof _=="number"||typeof _=="bigint")&&eo(n,""+_);break;case"onScroll":_!=null&&Ve("scroll",n);break;case"onScrollEnd":_!=null&&Ve("scrollend",n);break;case"onClick":_!=null&&(n.onclick=kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mn.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(A=h.endsWith("Capture"),s=h.slice(2,A?h.length-7:void 0),k=n[It]||null,k=k!=null?k[h]:null,typeof k=="function"&&n.removeEventListener(s,k,A),typeof _=="function")){typeof k!="function"&&k!==null&&(h in n?n[h]=null:n.hasAttribute(h)&&n.removeAttribute(h)),n.addEventListener(s,_,A);break e}h in n?n[h]=_:_===!0?n.setAttribute(h,""):tt(n,h,_)}}}function Cr(n,s,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",n),Ve("load",n);var _=!1,A=!1,k;for(k in h)if(h.hasOwnProperty(k)){var F=h[k];if(F!=null)switch(k){case"src":_=!0;break;case"srcSet":A=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:ft(n,s,k,F,h,null)}}A&&ft(n,s,"srcSet",h.srcSet,h,null),_&&ft(n,s,"src",h.src,h,null);return;case"input":Ve("invalid",n);var Y=k=F=A=null,ee=null,le=null;for(_ in h)if(h.hasOwnProperty(_)){var me=h[_];if(me!=null)switch(_){case"name":A=me;break;case"type":F=me;break;case"checked":ee=me;break;case"defaultChecked":le=me;break;case"value":k=me;break;case"defaultValue":Y=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(i(137,s));break;default:ft(n,s,_,me,h,null)}}ny(n,k,Y,ee,le,F,A,!1);return;case"select":Ve("invalid",n),_=F=k=null;for(A in h)if(h.hasOwnProperty(A)&&(Y=h[A],Y!=null))switch(A){case"value":k=Y;break;case"defaultValue":F=Y;break;case"multiple":_=Y;default:ft(n,s,A,Y,h,null)}s=k,h=F,n.multiple=!!_,s!=null?Ja(n,!!_,s,!1):h!=null&&Ja(n,!!_,h,!0);return;case"textarea":Ve("invalid",n),k=A=_=null;for(F in h)if(h.hasOwnProperty(F)&&(Y=h[F],Y!=null))switch(F){case"value":_=Y;break;case"defaultValue":A=Y;break;case"children":k=Y;break;case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(91));break;default:ft(n,s,F,Y,h,null)}ay(n,_,A,k);return;case"option":for(ee in h)if(h.hasOwnProperty(ee)&&(_=h[ee],_!=null))switch(ee){case"selected":n.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:ft(n,s,ee,_,h,null)}return;case"dialog":Ve("beforetoggle",n),Ve("toggle",n),Ve("cancel",n),Ve("close",n);break;case"iframe":case"object":Ve("load",n);break;case"video":case"audio":for(_=0;_<lu.length;_++)Ve(lu[_],n);break;case"image":Ve("error",n),Ve("load",n);break;case"details":Ve("toggle",n);break;case"embed":case"source":case"link":Ve("error",n),Ve("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(le in h)if(h.hasOwnProperty(le)&&(_=h[le],_!=null))switch(le){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:ft(n,s,le,_,h,null)}return;default:if(s0(s)){for(me in h)h.hasOwnProperty(me)&&(_=h[me],_!==void 0&&Wp(n,s,me,_,h,void 0));return}}for(Y in h)h.hasOwnProperty(Y)&&(_=h[Y],_!=null&&ft(n,s,Y,_,h,null))}function hO(n,s,h,_){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var A=null,k=null,F=null,Y=null,ee=null,le=null,me=null;for(fe in h){var ye=h[fe];if(h.hasOwnProperty(fe)&&ye!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":ee=ye;default:_.hasOwnProperty(fe)||ft(n,s,fe,null,_,ye)}}for(var ce in _){var fe=_[ce];if(ye=h[ce],_.hasOwnProperty(ce)&&(fe!=null||ye!=null))switch(ce){case"type":k=fe;break;case"name":A=fe;break;case"checked":le=fe;break;case"defaultChecked":me=fe;break;case"value":F=fe;break;case"defaultValue":Y=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(i(137,s));break;default:fe!==ye&&ft(n,s,ce,fe,_,ye)}}i0(n,F,Y,ee,le,me,k,A);return;case"select":fe=F=Y=ce=null;for(k in h)if(ee=h[k],h.hasOwnProperty(k)&&ee!=null)switch(k){case"value":break;case"multiple":fe=ee;default:_.hasOwnProperty(k)||ft(n,s,k,null,_,ee)}for(A in _)if(k=_[A],ee=h[A],_.hasOwnProperty(A)&&(k!=null||ee!=null))switch(A){case"value":ce=k;break;case"defaultValue":Y=k;break;case"multiple":F=k;default:k!==ee&&ft(n,s,A,k,_,ee)}s=Y,h=F,_=fe,ce!=null?Ja(n,!!h,ce,!1):!!_!=!!h&&(s!=null?Ja(n,!!h,s,!0):Ja(n,!!h,h?[]:"",!1));return;case"textarea":fe=ce=null;for(Y in h)if(A=h[Y],h.hasOwnProperty(Y)&&A!=null&&!_.hasOwnProperty(Y))switch(Y){case"value":break;case"children":break;default:ft(n,s,Y,null,_,A)}for(F in _)if(A=_[F],k=h[F],_.hasOwnProperty(F)&&(A!=null||k!=null))switch(F){case"value":ce=A;break;case"defaultValue":fe=A;break;case"children":break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(i(91));break;default:A!==k&&ft(n,s,F,A,_,k)}sy(n,ce,fe);return;case"option":for(var ke in h)if(ce=h[ke],h.hasOwnProperty(ke)&&ce!=null&&!_.hasOwnProperty(ke))switch(ke){case"selected":n.selected=!1;break;default:ft(n,s,ke,null,_,ce)}for(ee in _)if(ce=_[ee],fe=h[ee],_.hasOwnProperty(ee)&&ce!==fe&&(ce!=null||fe!=null))switch(ee){case"selected":n.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:ft(n,s,ee,ce,_,fe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Fe in h)ce=h[Fe],h.hasOwnProperty(Fe)&&ce!=null&&!_.hasOwnProperty(Fe)&&ft(n,s,Fe,null,_,ce);for(le in _)if(ce=_[le],fe=h[le],_.hasOwnProperty(le)&&ce!==fe&&(ce!=null||fe!=null))switch(le){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,s));break;default:ft(n,s,le,ce,_,fe)}return;default:if(s0(s)){for(var dt in h)ce=h[dt],h.hasOwnProperty(dt)&&ce!==void 0&&!_.hasOwnProperty(dt)&&Wp(n,s,dt,void 0,_,ce);for(me in _)ce=_[me],fe=h[me],!_.hasOwnProperty(me)||ce===fe||ce===void 0&&fe===void 0||Wp(n,s,me,ce,_,fe);return}}for(var ae in h)ce=h[ae],h.hasOwnProperty(ae)&&ce!=null&&!_.hasOwnProperty(ae)&&ft(n,s,ae,null,_,ce);for(ye in _)ce=_[ye],fe=h[ye],!_.hasOwnProperty(ye)||ce===fe||ce==null&&fe==null||ft(n,s,ye,ce,_,fe)}function uS(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fO(){if(typeof performance.getEntriesByType=="function"){for(var n=0,s=0,h=performance.getEntriesByType("resource"),_=0;_<h.length;_++){var A=h[_],k=A.transferSize,F=A.initiatorType,Y=A.duration;if(k&&Y&&uS(F)){for(F=0,Y=A.responseEnd,_+=1;_<h.length;_++){var ee=h[_],le=ee.startTime;if(le>Y)break;var me=ee.transferSize,ye=ee.initiatorType;me&&uS(ye)&&(ee=ee.responseEnd,F+=me*(ee<Y?1:(Y-le)/(ee-le)))}if(--_,s+=8*(k+F)/(A.duration/1e3),n++,10<n)break}}if(0<n)return s/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Gp=null,Kp=null;function xh(n){return n.nodeType===9?n:n.ownerDocument}function cS(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hS(n,s){if(n===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&s==="foreignObject"?0:n}function Yp(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Vp=null;function dO(){var n=window.event;return n&&n.type==="popstate"?n===Vp?!1:(Vp=n,!0):(Vp=null,!1)}var fS=typeof setTimeout=="function"?setTimeout:void 0,pO=typeof clearTimeout=="function"?clearTimeout:void 0,dS=typeof Promise=="function"?Promise:void 0,vO=typeof queueMicrotask=="function"?queueMicrotask:typeof dS<"u"?function(n){return dS.resolve(null).then(n).catch(mO)}:fS;function mO(n){setTimeout(function(){throw n})}function Ds(n){return n==="head"}function pS(n,s){var h=s,_=0;do{var A=h.nextSibling;if(n.removeChild(h),A&&A.nodeType===8)if(h=A.data,h==="/$"||h==="/&"){if(_===0){n.removeChild(A),Lo(s);return}_--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")_++;else if(h==="html")cu(n.ownerDocument.documentElement);else if(h==="head"){h=n.ownerDocument.head,cu(h);for(var k=h.firstChild;k;){var F=k.nextSibling,Y=k.nodeName;k[Xi]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&k.rel.toLowerCase()==="stylesheet"||h.removeChild(k),k=F}}else h==="body"&&cu(n.ownerDocument.body);h=A}while(h);Lo(s)}function vS(n,s){var h=n;n=0;do{var _=h.nextSibling;if(h.nodeType===1?s?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(s?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),_&&_.nodeType===8)if(h=_.data,h==="/$"){if(n===0)break;n--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||n++;h=_}while(h)}function Xp(n){var s=n.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var h=s;switch(s=s.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":Xp(h),ei(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}n.removeChild(h)}}function gO(n,s,h,_){for(;n.nodeType===1;){var A=h;if(n.nodeName.toLowerCase()!==s.toLowerCase()){if(!_&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(_){if(!n[Xi])switch(s){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(k=n.getAttribute("rel"),k==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(k!==A.rel||n.getAttribute("href")!==(A.href==null||A.href===""?null:A.href)||n.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin)||n.getAttribute("title")!==(A.title==null?null:A.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(k=n.getAttribute("src"),(k!==(A.src==null?null:A.src)||n.getAttribute("type")!==(A.type==null?null:A.type)||n.getAttribute("crossorigin")!==(A.crossOrigin==null?null:A.crossOrigin))&&k&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(s==="input"&&n.type==="hidden"){var k=A.name==null?null:""+A.name;if(A.type==="hidden"&&n.getAttribute("name")===k)return n}else return n;if(n=Ci(n.nextSibling),n===null)break}return null}function _O(n,s,h){if(s==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!h||(n=Ci(n.nextSibling),n===null))return null;return n}function mS(n,s){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Ci(n.nextSibling),n===null))return null;return n}function Zp(n){return n.data==="$?"||n.data==="$~"}function Qp(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function yO(n,s){var h=n.ownerDocument;if(n.data==="$~")n._reactRetry=s;else if(n.data!=="$?"||h.readyState!=="loading")s();else{var _=function(){s(),h.removeEventListener("DOMContentLoaded",_)};h.addEventListener("DOMContentLoaded",_),n._reactRetry=_}}function Ci(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return n}var Jp=null;function gS(n){n=n.nextSibling;for(var s=0;n;){if(n.nodeType===8){var h=n.data;if(h==="/$"||h==="/&"){if(s===0)return Ci(n.nextSibling);s--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||s++}n=n.nextSibling}return null}function _S(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var h=n.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(s===0)return n;s--}else h!=="/$"&&h!=="/&"||s++}n=n.previousSibling}return null}function yS(n,s,h){switch(s=xh(h),n){case"html":if(n=s.documentElement,!n)throw Error(i(452));return n;case"head":if(n=s.head,!n)throw Error(i(453));return n;case"body":if(n=s.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function cu(n){for(var s=n.attributes;s.length;)n.removeAttributeNode(s[0]);ei(n)}var wi=new Map,bS=new Set;function Ch(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Gn=K.d;K.d={f:bO,r:SO,D:xO,C:CO,L:wO,m:EO,X:DO,S:AO,M:TO};function bO(){var n=Gn.f(),s=ph();return n||s}function SO(n){var s=Dn(n);s!==null&&s.tag===5&&s.type==="form"?Nb(s):Gn.r(n)}var Mo=typeof document>"u"?null:document;function SS(n,s,h){var _=Mo;if(_&&typeof s=="string"&&s){var A=mi(s);A='link[rel="'+n+'"][href="'+A+'"]',typeof h=="string"&&(A+='[crossorigin="'+h+'"]'),bS.has(A)||(bS.add(A),n={rel:n,crossOrigin:h,href:s},_.querySelector(A)===null&&(s=_.createElement("link"),Cr(s,"link",n),Gt(s),_.head.appendChild(s)))}}function xO(n){Gn.D(n),SS("dns-prefetch",n,null)}function CO(n,s){Gn.C(n,s),SS("preconnect",n,s)}function wO(n,s,h){Gn.L(n,s,h);var _=Mo;if(_&&n&&s){var A='link[rel="preload"][as="'+mi(s)+'"]';s==="image"&&h&&h.imageSrcSet?(A+='[imagesrcset="'+mi(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(A+='[imagesizes="'+mi(h.imageSizes)+'"]')):A+='[href="'+mi(n)+'"]';var k=A;switch(s){case"style":k=ko(n);break;case"script":k=Oo(n)}wi.has(k)||(n=f({rel:"preload",href:s==="image"&&h&&h.imageSrcSet?void 0:n,as:s},h),wi.set(k,n),_.querySelector(A)!==null||s==="style"&&_.querySelector(hu(k))||s==="script"&&_.querySelector(fu(k))||(s=_.createElement("link"),Cr(s,"link",n),Gt(s),_.head.appendChild(s)))}}function EO(n,s){Gn.m(n,s);var h=Mo;if(h&&n){var _=s&&typeof s.as=="string"?s.as:"script",A='link[rel="modulepreload"][as="'+mi(_)+'"][href="'+mi(n)+'"]',k=A;switch(_){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=Oo(n)}if(!wi.has(k)&&(n=f({rel:"modulepreload",href:n},s),wi.set(k,n),h.querySelector(A)===null)){switch(_){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(fu(k)))return}_=h.createElement("link"),Cr(_,"link",n),Gt(_),h.head.appendChild(_)}}}function AO(n,s,h){Gn.S(n,s,h);var _=Mo;if(_&&n){var A=Tn(_).hoistableStyles,k=ko(n);s=s||"default";var F=A.get(k);if(!F){var Y={loading:0,preload:null};if(F=_.querySelector(hu(k)))Y.loading=5;else{n=f({rel:"stylesheet",href:n,"data-precedence":s},h),(h=wi.get(k))&&ev(n,h);var ee=F=_.createElement("link");Gt(ee),Cr(ee,"link",n),ee._p=new Promise(function(le,me){ee.onload=le,ee.onerror=me}),ee.addEventListener("load",function(){Y.loading|=1}),ee.addEventListener("error",function(){Y.loading|=2}),Y.loading|=4,wh(F,s,_)}F={type:"stylesheet",instance:F,count:1,state:Y},A.set(k,F)}}}function DO(n,s){Gn.X(n,s);var h=Mo;if(h&&n){var _=Tn(h).hoistableScripts,A=Oo(n),k=_.get(A);k||(k=h.querySelector(fu(A)),k||(n=f({src:n,async:!0},s),(s=wi.get(A))&&tv(n,s),k=h.createElement("script"),Gt(k),Cr(k,"link",n),h.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},_.set(A,k))}}function TO(n,s){Gn.M(n,s);var h=Mo;if(h&&n){var _=Tn(h).hoistableScripts,A=Oo(n),k=_.get(A);k||(k=h.querySelector(fu(A)),k||(n=f({src:n,async:!0,type:"module"},s),(s=wi.get(A))&&tv(n,s),k=h.createElement("script"),Gt(k),Cr(k,"link",n),h.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},_.set(A,k))}}function xS(n,s,h,_){var A=(A=he.current)?Ch(A):null;if(!A)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(s=ko(h.href),h=Tn(A).hoistableStyles,_=h.get(s),_||(_={type:"style",instance:null,count:0,state:null},h.set(s,_)),_):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){n=ko(h.href);var k=Tn(A).hoistableStyles,F=k.get(n);if(F||(A=A.ownerDocument||A,F={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(n,F),(k=A.querySelector(hu(n)))&&!k._p&&(F.instance=k,F.state.loading=5),wi.has(n)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},wi.set(n,h),k||MO(A,n,h,F.state))),s&&_===null)throw Error(i(528,""));return F}if(s&&_!==null)throw Error(i(529,""));return null;case"script":return s=h.async,h=h.src,typeof h=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Oo(h),h=Tn(A).hoistableScripts,_=h.get(s),_||(_={type:"script",instance:null,count:0,state:null},h.set(s,_)),_):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function ko(n){return'href="'+mi(n)+'"'}function hu(n){return'link[rel="stylesheet"]['+n+"]"}function CS(n){return f({},n,{"data-precedence":n.precedence,precedence:null})}function MO(n,s,h,_){n.querySelector('link[rel="preload"][as="style"]['+s+"]")?_.loading=1:(s=n.createElement("link"),_.preload=s,s.addEventListener("load",function(){return _.loading|=1}),s.addEventListener("error",function(){return _.loading|=2}),Cr(s,"link",h),Gt(s),n.head.appendChild(s))}function Oo(n){return'[src="'+mi(n)+'"]'}function fu(n){return"script[async]"+n}function wS(n,s,h){if(s.count++,s.instance===null)switch(s.type){case"style":var _=n.querySelector('style[data-href~="'+mi(h.href)+'"]');if(_)return s.instance=_,Gt(_),_;var A=f({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return _=(n.ownerDocument||n).createElement("style"),Gt(_),Cr(_,"style",A),wh(_,h.precedence,n),s.instance=_;case"stylesheet":A=ko(h.href);var k=n.querySelector(hu(A));if(k)return s.state.loading|=4,s.instance=k,Gt(k),k;_=CS(h),(A=wi.get(A))&&ev(_,A),k=(n.ownerDocument||n).createElement("link"),Gt(k);var F=k;return F._p=new Promise(function(Y,ee){F.onload=Y,F.onerror=ee}),Cr(k,"link",_),s.state.loading|=4,wh(k,h.precedence,n),s.instance=k;case"script":return k=Oo(h.src),(A=n.querySelector(fu(k)))?(s.instance=A,Gt(A),A):(_=h,(A=wi.get(k))&&(_=f({},h),tv(_,A)),n=n.ownerDocument||n,A=n.createElement("script"),Gt(A),Cr(A,"link",_),n.head.appendChild(A),s.instance=A);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(_=s.instance,s.state.loading|=4,wh(_,h.precedence,n));return s.instance}function wh(n,s,h){for(var _=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=_.length?_[_.length-1]:null,k=A,F=0;F<_.length;F++){var Y=_[F];if(Y.dataset.precedence===s)k=Y;else if(k!==A)break}k?k.parentNode.insertBefore(n,k.nextSibling):(s=h.nodeType===9?h.head:h,s.insertBefore(n,s.firstChild))}function ev(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.title==null&&(n.title=s.title)}function tv(n,s){n.crossOrigin==null&&(n.crossOrigin=s.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=s.referrerPolicy),n.integrity==null&&(n.integrity=s.integrity)}var Eh=null;function ES(n,s,h){if(Eh===null){var _=new Map,A=Eh=new Map;A.set(h,_)}else A=Eh,_=A.get(h),_||(_=new Map,A.set(h,_));if(_.has(n))return _;for(_.set(n,null),h=h.getElementsByTagName(n),A=0;A<h.length;A++){var k=h[A];if(!(k[Xi]||k[ot]||n==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var F=k.getAttribute(s)||"";F=n+F;var Y=_.get(F);Y?Y.push(k):_.set(F,[k])}}return _}function AS(n,s,h){n=n.ownerDocument||n,n.head.insertBefore(h,s==="title"?n.querySelector("head > title"):null)}function kO(n,s,h){if(h===1||s.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return n=s.disabled,typeof s.precedence=="string"&&n==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function DS(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function OO(n,s,h,_){if(h.type==="stylesheet"&&(typeof _.media!="string"||matchMedia(_.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var A=ko(_.href),k=s.querySelector(hu(A));if(k){s=k._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(n.count++,n=Ah.bind(n),s.then(n,n)),h.state.loading|=4,h.instance=k,Gt(k);return}k=s.ownerDocument||s,_=CS(_),(A=wi.get(A))&&ev(_,A),k=k.createElement("link"),Gt(k);var F=k;F._p=new Promise(function(Y,ee){F.onload=Y,F.onerror=ee}),Cr(k,"link",_),h.instance=k}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(h,s),(s=h.state.preload)&&(h.state.loading&3)===0&&(n.count++,h=Ah.bind(n),s.addEventListener("load",h),s.addEventListener("error",h))}}var rv=0;function LO(n,s){return n.stylesheets&&n.count===0&&Th(n,n.stylesheets),0<n.count||0<n.imgCount?function(h){var _=setTimeout(function(){if(n.stylesheets&&Th(n,n.stylesheets),n.unsuspend){var k=n.unsuspend;n.unsuspend=null,k()}},6e4+s);0<n.imgBytes&&rv===0&&(rv=62500*fO());var A=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Th(n,n.stylesheets),n.unsuspend)){var k=n.unsuspend;n.unsuspend=null,k()}},(n.imgBytes>rv?50:800)+s);return n.unsuspend=h,function(){n.unsuspend=null,clearTimeout(_),clearTimeout(A)}}:null}function Ah(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Th(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Dh=null;function Th(n,s){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Dh=new Map,s.forEach(RO,n),Dh=null,Ah.call(n))}function RO(n,s){if(!(s.state.loading&4)){var h=Dh.get(n);if(h)var _=h.get(null);else{h=new Map,Dh.set(n,h);for(var A=n.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<A.length;k++){var F=A[k];(F.nodeName==="LINK"||F.getAttribute("media")!=="not all")&&(h.set(F.dataset.precedence,F),_=F)}_&&h.set(null,_)}A=s.instance,F=A.getAttribute("data-precedence"),k=h.get(F)||_,k===_&&h.set(null,A),h.set(F,A),this.count++,_=Ah.bind(this),A.addEventListener("load",_),A.addEventListener("error",_),k?k.parentNode.insertBefore(A,k.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(A,n.firstChild)),s.state.loading|=4}}var du={$$typeof:C,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function PO(n,s,h,_,A,k,F,Y,ee){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=xn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xn(0),this.hiddenUpdates=xn(null),this.identifierPrefix=_,this.onUncaughtError=A,this.onCaughtError=k,this.onRecoverableError=F,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function TS(n,s,h,_,A,k,F,Y,ee,le,me,ye){return n=new PO(n,s,h,F,ee,le,me,ye,Y),s=1,k===!0&&(s|=24),k=ri(3,null,null,s),n.current=k,k.stateNode=n,s=B0(),s.refCount++,n.pooledCache=s,s.refCount++,k.memoizedState={element:_,isDehydrated:h,cache:s},F0(k),n}function MS(n){return n?(n=oo,n):oo}function kS(n,s,h,_,A,k){A=MS(A),_.context===null?_.context=A:_.pendingContext=A,_=ms(s),_.payload={element:h},k=k===void 0?null:k,k!==null&&(_.callback=k),h=gs(n,_,s),h!==null&&(Xr(h,n,s),Wl(h,n,s))}function OS(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var h=n.retryLane;n.retryLane=h!==0&&h<s?h:s}}function iv(n,s){OS(n,s),(n=n.alternate)&&OS(n,s)}function LS(n){if(n.tag===13||n.tag===31){var s=na(n,67108864);s!==null&&Xr(s,n,67108864),iv(n,67108864)}}function RS(n){if(n.tag===13||n.tag===31){var s=oi();s=Ya(s);var h=na(n,s);h!==null&&Xr(h,n,s),iv(n,s)}}var Mh=!0;function BO(n,s,h,_){var A=U.T;U.T=null;var k=K.p;try{K.p=2,nv(n,s,h,_)}finally{K.p=k,U.T=A}}function IO(n,s,h,_){var A=U.T;U.T=null;var k=K.p;try{K.p=8,nv(n,s,h,_)}finally{K.p=k,U.T=A}}function nv(n,s,h,_){if(Mh){var A=sv(_);if(A===null)qp(n,s,_,kh,h),BS(n,_);else if(jO(A,n,s,h,_))_.stopPropagation();else if(BS(n,_),s&4&&-1<NO.indexOf(n)){for(;A!==null;){var k=Dn(A);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var F=Br(k.pendingLanes);if(F!==0){var Y=k;for(Y.pendingLanes|=2,Y.entangledLanes|=2;F;){var ee=1<<31-Rt(F);Y.entanglements[1]|=ee,F&=~ee}en(k),(st&6)===0&&(fh=Ee()+500,ou(0))}}break;case 31:case 13:Y=na(k,2),Y!==null&&Xr(Y,k,2),ph(),iv(k,2)}if(k=sv(_),k===null&&qp(n,s,_,kh,h),k===A)break;A=k}A!==null&&_.stopPropagation()}else qp(n,s,_,null,h)}}function sv(n){return n=o0(n),av(n)}var kh=null;function av(n){if(kh=null,n=An(n),n!==null){var s=l(n);if(s===null)n=null;else{var h=s.tag;if(h===13){if(n=d(s),n!==null)return n;n=null}else if(h===31){if(n=a(s),n!==null)return n;n=null}else if(h===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null)}}return kh=n,null}function PS(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($e()){case je:return 2;case qt:return 8;case ct:case _t:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var ov=!1,Ts=null,Ms=null,ks=null,pu=new Map,vu=new Map,Os=[],NO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function BS(n,s){switch(n){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":Ms=null;break;case"mouseover":case"mouseout":ks=null;break;case"pointerover":case"pointerout":pu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":vu.delete(s.pointerId)}}function mu(n,s,h,_,A,k){return n===null||n.nativeEvent!==k?(n={blockedOn:s,domEventName:h,eventSystemFlags:_,nativeEvent:k,targetContainers:[A]},s!==null&&(s=Dn(s),s!==null&&LS(s)),n):(n.eventSystemFlags|=_,s=n.targetContainers,A!==null&&s.indexOf(A)===-1&&s.push(A),n)}function jO(n,s,h,_,A){switch(s){case"focusin":return Ts=mu(Ts,n,s,h,_,A),!0;case"dragenter":return Ms=mu(Ms,n,s,h,_,A),!0;case"mouseover":return ks=mu(ks,n,s,h,_,A),!0;case"pointerover":var k=A.pointerId;return pu.set(k,mu(pu.get(k)||null,n,s,h,_,A)),!0;case"gotpointercapture":return k=A.pointerId,vu.set(k,mu(vu.get(k)||null,n,s,h,_,A)),!0}return!1}function IS(n){var s=An(n.target);if(s!==null){var h=l(s);if(h!==null){if(s=h.tag,s===13){if(s=d(h),s!==null){n.blockedOn=s,Dl(n.priority,function(){RS(h)});return}}else if(s===31){if(s=a(h),s!==null){n.blockedOn=s,Dl(n.priority,function(){RS(h)});return}}else if(s===3&&h.stateNode.current.memoizedState.isDehydrated){n.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Oh(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var h=sv(n.nativeEvent);if(h===null){h=n.nativeEvent;var _=new h.constructor(h.type,h);a0=_,h.target.dispatchEvent(_),a0=null}else return s=Dn(h),s!==null&&LS(s),n.blockedOn=h,!1;s.shift()}return!0}function NS(n,s,h){Oh(n)&&h.delete(s)}function FO(){ov=!1,Ts!==null&&Oh(Ts)&&(Ts=null),Ms!==null&&Oh(Ms)&&(Ms=null),ks!==null&&Oh(ks)&&(ks=null),pu.forEach(NS),vu.forEach(NS)}function Lh(n,s){n.blockedOn===s&&(n.blockedOn=null,ov||(ov=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,FO)))}var Rh=null;function jS(n){Rh!==n&&(Rh=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Rh===n&&(Rh=null);for(var s=0;s<n.length;s+=3){var h=n[s],_=n[s+1],A=n[s+2];if(typeof _!="function"){if(av(_||h)===null)continue;break}var k=Dn(h);k!==null&&(n.splice(s,3),s-=3,sp(k,{pending:!0,data:A,method:h.method,action:_},_,A))}}))}function Lo(n){function s(ee){return Lh(ee,n)}Ts!==null&&Lh(Ts,n),Ms!==null&&Lh(Ms,n),ks!==null&&Lh(ks,n),pu.forEach(s),vu.forEach(s);for(var h=0;h<Os.length;h++){var _=Os[h];_.blockedOn===n&&(_.blockedOn=null)}for(;0<Os.length&&(h=Os[0],h.blockedOn===null);)IS(h),h.blockedOn===null&&Os.shift();if(h=(n.ownerDocument||n).$$reactFormReplay,h!=null)for(_=0;_<h.length;_+=3){var A=h[_],k=h[_+1],F=A[It]||null;if(typeof k=="function")F||jS(h);else if(F){var Y=null;if(k&&k.hasAttribute("formAction")){if(A=k,F=k[It]||null)Y=F.formAction;else if(av(A)!==null)continue}else Y=F.action;typeof Y=="function"?h[_+1]=Y:(h.splice(_,3),_-=3),jS(h)}}}function FS(){function n(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(F){return A=F})},focusReset:"manual",scroll:"manual"})}function s(){A!==null&&(A(),A=null),_||setTimeout(h,20)}function h(){if(!_&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var _=!1,A=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(h,100),function(){_=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),A!==null&&(A(),A=null)}}}function lv(n){this._internalRoot=n}Ph.prototype.render=lv.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(i(409));var h=s.current,_=oi();kS(h,_,n,s,null,null)},Ph.prototype.unmount=lv.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;kS(n.current,2,null,n,null,null),ph(),s[wn]=null}};function Ph(n){this._internalRoot=n}Ph.prototype.unstable_scheduleHydration=function(n){if(n){var s=Al();n={blockedOn:null,target:n,priority:s};for(var h=0;h<Os.length&&s!==0&&s<Os[h].priority;h++);Os.splice(h,0,n),h===0&&IS(n)}};var zS=t.version;if(zS!=="19.2.5")throw Error(i(527,zS,"19.2.5"));K.findDOMNode=function(n){var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=c(s),n=n!==null?p(n):null,n=n===null?null:n.stateNode,n};var zO={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bh.isDisabled&&Bh.supportsFiber)try{rr=Bh.inject(zO),yt=Bh}catch{}}return _u.createRoot=function(n,s){if(!o(n))throw Error(i(299));var h=!1,_="",A=Kb,k=Yb,F=Vb;return s!=null&&(s.unstable_strictMode===!0&&(h=!0),s.identifierPrefix!==void 0&&(_=s.identifierPrefix),s.onUncaughtError!==void 0&&(A=s.onUncaughtError),s.onCaughtError!==void 0&&(k=s.onCaughtError),s.onRecoverableError!==void 0&&(F=s.onRecoverableError)),s=TS(n,1,!1,null,null,h,_,null,A,k,F,FS),n[wn]=s.current,Up(n),new lv(s)},_u.hydrateRoot=function(n,s,h){if(!o(n))throw Error(i(299));var _=!1,A="",k=Kb,F=Yb,Y=Vb,ee=null;return h!=null&&(h.unstable_strictMode===!0&&(_=!0),h.identifierPrefix!==void 0&&(A=h.identifierPrefix),h.onUncaughtError!==void 0&&(k=h.onUncaughtError),h.onCaughtError!==void 0&&(F=h.onCaughtError),h.onRecoverableError!==void 0&&(Y=h.onRecoverableError),h.formState!==void 0&&(ee=h.formState)),s=TS(n,1,!0,s,h??null,_,A,ee,k,F,Y,FS),s.context=MS(null),h=s.current,_=oi(),_=Ya(_),A=ms(_),A.callback=null,gs(h,A,_),h=_,s.current.lanes=h,Zs(s,h),en(s),n[wn]=s.current,Up(n),new Ph(s)},_u.version="19.2.5",_u}var XS;function eL(){if(XS)return hv.exports;XS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hv.exports=JO(),hv.exports}var tL=eL();const RE="codev-tower-key",rL="codev.tower.v1",iL="codev-key.";function nL(e){return e?[rL,`${iL}${e}`]:void 0}const PE=768,sL=1e3;function BE(){return"./"}function Lr(e){const t=BE(),r=e.startsWith("/")?e.slice(1):e;return t+r}function m_(){const e=window.__CODEV_TOWER_KEY__;if(e){try{localStorage.setItem("codev-tower-key",e)}catch{}return e}return localStorage.getItem("codev-tower-key")}function Rr(){const e=m_();return e?{[RE]:e}:{}}async function aL(){const e=await fetch(Lr("api/state"),{headers:Rr()});if(!e.ok)throw new Error(`Failed to fetch state: ${e.status}`);return e.json()}async function oL(e){const t=await fetch(Lr(`api/architects/${encodeURIComponent(e)}`),{method:"DELETE",headers:Rr()});if(t.ok)return{success:!0};try{const r=await t.json();return{success:!1,error:(r==null?void 0:r.error)??`HTTP ${t.status}`}}catch{return{success:!1,error:`HTTP ${t.status}`}}}async function lL(e,t){const r=new URLSearchParams({range:e});t&&r.set("refresh","1");const i=await fetch(Lr(`api/analytics?${r}`),{headers:Rr()});if(!i.ok)throw new Error(`Failed to fetch analytics: ${i.status}`);return i.json()}async function uL(){const e=await fetch(Lr("api/team"),{headers:Rr()});if(!e.ok)throw new Error(`Failed to fetch team: ${e.status}`);return e.json()}function vv(e){return typeof e=="object"&&e!==null}async function IE(e,t){let r;try{r=await fetch(Lr(e),t)}catch(o){return{kind:"error",message:`Could not reach Tower: ${o instanceof Error?o.message:String(o)}`}}let i;try{i=await r.json()}catch{return{kind:"error",message:`Unexpected response from Tower (HTTP ${r.status})`}}return vv(i)&&i.ok===!0&&vv(i.document)&&typeof i.document.version=="string"&&Array.isArray(i.document.items)?{kind:"document",document:i.document}:vv(i)&&i.ok===!1&&typeof i.code=="string"&&typeof i.message=="string"?{kind:"refused",code:i.code,message:i.message}:{kind:"error",message:`Unexpected response from Tower (HTTP ${r.status})`}}async function cL(){const e=await IE("api/decisions",{headers:Rr()});return e.kind!=="refused"?e:e.code==="not-found"?{kind:"not-found",message:e.message}:{kind:"error",message:e.message}}async function hL(e){return IE("api/decisions/rule",{method:"POST",headers:{"Content-Type":"application/json",...Rr()},body:JSON.stringify(e)})}async function fL(){const e=await fetch(Lr("api/overview"),{headers:Rr()});if(!e.ok)throw new Error(`Failed to fetch overview: ${e.status}`);return e.json()}async function dL(){const e=await fetch(Lr("api/inbox"),{headers:Rr()});if(!e.ok)throw new Error(`Failed to fetch held messages: ${e.status}`);return e.json()}async function pL(){await fetch(Lr("api/overview/refresh"),{method:"POST",headers:Rr()})}async function vL(){const e=await fetch(Lr("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...Rr()}});if(!e.ok)throw new Error(await e.text());return e.json()}async function ud(e,t,r){const i=await fetch(Lr("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...Rr()},body:JSON.stringify({path:e,line:t,terminalId:r})});if(!i.ok)throw new Error(await i.text());return i.json()}async function mL(e){const t=await fetch(Lr(`api/tabs/${e}`),{method:"DELETE",headers:Rr()});if(!t.ok)throw new Error(await t.text())}async function gL(){const e=await fetch(Lr("api/files"),{headers:Rr()});if(!e.ok)throw new Error(`Failed to fetch files: ${e.status}`);return e.json()}async function NE(e){const t=await fetch(Lr("api/paste-image"),{method:"POST",headers:{"Content-Type":e.type||"image/png",...Rr()},body:e});if(!t.ok)throw new Error(`Image upload failed: ${t.status}`);return t.json()}function mv(e){if(e.terminalId){const t=window.location.pathname;return`${t.endsWith("/")?t:t+"/"}ws/terminal/${e.terminalId}`}return null}function _L(){return Lr("api/events")}async function yL(){const e=await fetch(Lr("api/git/status"),{headers:Rr()});if(!e.ok)throw new Error(`Failed to fetch git status: ${e.status}`);return e.json()}async function bL(){const e=await fetch(Lr("api/files/recent"),{headers:Rr()});if(!e.ok)throw new Error(`Failed to fetch recent files: ${e.status}`);return e.json()}const Yo=new Set;let Ma=null,ZS=!1,Vo=null;function jE(){for(const e of Yo)e()}function g_(){if(Ma||typeof fetch>"u"||typeof document<"u"&&document.hidden)return;const e=new AbortController;Ma=e,SL(e)}async function SL(e){const t={},r=m_();r&&(t[RE]=r);try{const i=await fetch(_L(),{headers:t,signal:e.signal});if(!i.ok||!i.body){Ma===e&&(ff(),QS());return}const o=i.body.getReader(),l=new TextDecoder;let d="";for(;;){const{done:a,value:u}=await o.read();if(a)break;d+=l.decode(u,{stream:!0});const c=d.split(`
|
|
50
|
+
|
|
51
|
+
`);d=c.pop()||"";for(const p of c)/^data:/m.test(p)&&jE()}}catch{}Ma===e&&(ff(),QS())}function QS(){if(Vo||Yo.size===0)return;const e=2e3+Math.floor(Math.random()*3e3);Vo=setTimeout(()=>{Vo=null,g_()},e)}function ff(){Vo&&(clearTimeout(Vo),Vo=null),Ma&&(Ma.abort(),Ma=null)}function xL(){document.hidden?ff():Yo.size>0&&(g_(),jE())}function CL(){ZS||typeof document>"u"||(document.addEventListener("visibilitychange",xL),ZS=!0)}function FE(e){j.useEffect(()=>(Yo.add(e),CL(),g_(),()=>{Yo.delete(e),Yo.size===0&&ff()}),[e])}function wL(){const[e,t]=j.useState(null),[r,i]=j.useState(null),o=j.useCallback(async()=>{try{const l=await aL();t(l),i(null)}catch(l){i(l.message)}},[]);return j.useEffect(()=>{o();const l=setInterval(o,sL);return()=>clearInterval(l)},[o]),FE(o),{state:e,error:r,refresh:o}}function EL(e,t){return e===0?"architect":`architect:${t}`}function AL(e){const t=(e==null?void 0:e.architects)??(e!=null&&e.architect?[e.architect]:[]),r=t.length===1;return t.map((i,o)=>{const l=i.name??"main";return{id:EL(o,l),type:"architect",label:r?"Architect":l,closable:l!=="main",terminalId:i.terminalId,persistent:i.persistent,architectName:l}})}function DL(e,t){const r=[{id:"work",type:"work",label:"Work",closable:!1},{id:"analytics",type:"analytics",label:"Analytics",closable:!1,persistent:!0}];e!=null&&e.teamEnabled&&r.push({id:"team",type:"team",label:"Team",closable:!1}),t&&r.push({id:"decisions",type:"decisions",label:"Decisions",closable:!1}),r.push(...AL(e));for(const i of(e==null?void 0:e.builders)??[])r.push({id:i.id,type:"builder",label:i.name||i.id,closable:!0,projectId:i.id,terminalId:i.terminalId,persistent:i.persistent});for(const i of(e==null?void 0:e.utils)??[])!i.terminalId&&(!i.pid||i.pid===0)||r.push({id:i.id,type:"shell",label:i.name||`Shell ${i.id}`,closable:!0,utilId:i.id,terminalId:i.terminalId,persistent:i.persistent});for(const i of(e==null?void 0:e.annotations)??[]){const o=i.file.split("/").pop()??i.file;r.push({id:i.id,type:"file",label:o,closable:!0,annotationId:i.id,filePath:i.file})}return r}function TL(e){const[t,r]=j.useState("work"),i=j.useRef(null),o=j.useRef(!1),[l,d]=j.useState(!1);(e==null?void 0:e.decisionsEnabled)===!0&&!l&&d(!0);const a=DL(e,l||(e==null?void 0:e.decisionsEnabled)===!0);j.useEffect(()=>{if(o.current||e===null)return;const f=new URLSearchParams(window.location.search).get("tab");if(f){if(f.startsWith("architect:")){const b=f.slice(10),S=a.find(m=>m.type==="architect"&&m.architectName===b)??a.find(m=>m.type==="architect");if(S){r(S.id),o.current=!0;const m=new URL(window.location.href);m.searchParams.delete("tab"),window.history.replaceState({},"",m.toString());return}}const g=a.find(b=>b.id===f||b.type===f);if(g){r(g.id),o.current=!0;const b=new URL(window.location.href);b.searchParams.delete("tab"),window.history.replaceState({},"",b.toString());return}}o.current=!0},[a,e]),j.useEffect(()=>{const p=new Set(a.map(f=>f.id));if(i.current===null){e!==null&&(i.current=p);return}for(const f of a)i.current.has(f.id)||r(f.id);p.has(t)||(a.find(g=>g.id==="architect")?r("architect"):a.length>0&&r(a[0].id)),i.current=p},[a.map(p=>p.id).join(","),e!==null,t]);const u=j.useCallback(p=>{r(p)},[]),c=a.find(p=>p.id===t)??a[0];return{tabs:a,activeTab:c,activeTabId:t,selectTab:u}}function zE(e){const[t,r]=j.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return j.useEffect(()=>{const i=window.matchMedia(e),o=l=>r(l.matches);return i.addEventListener("change",o),r(i.matches),()=>i.removeEventListener("change",o)},[e]),t}const ML=2500;function HE(){const[e,t]=j.useState(null),[r,i]=j.useState(null),o=j.useCallback(async()=>{try{const d=await fL();t(a=>a!==null&&JSON.stringify(a)===JSON.stringify(d)?a:d),i(null)}catch(d){i(d instanceof Error?d.message:"Failed to fetch overview")}},[]);j.useEffect(()=>{o();const d=setInterval(o,ML);return()=>clearInterval(d)},[o]),FE(o);const l=j.useCallback(async()=>{await pL(),await o()},[o]);return{data:e,error:r,refresh:l}}const $E="codev-active-architect:";function UE(){return window.location.pathname}function kL(){try{return localStorage.getItem($E+UE())}catch{return null}}function OL(e){try{localStorage.setItem($E+UE(),e)}catch{}}function LL({left:e,right:t,defaultSplit:r=50,collapsedPane:i=null,onExpandLeft:o,onExpandRight:l}){const[d,a]=j.useState(r),u=j.useRef(null),c=j.useRef(!1),p=j.useCallback(b=>{b.preventDefault(),c.current=!0;const S=v=>{if(!c.current||!u.current)return;const y=u.current.getBoundingClientRect(),x=(v.clientX-y.left)/y.width*100;a(Math.max(20,Math.min(80,x)))},m=()=>{c.current=!1,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",S),document.addEventListener("mouseup",m)},[]),f=i==="left",g=i==="right";return B.jsxs("div",{ref:u,className:"split-pane",children:[f&&o&&B.jsx("button",{className:"expand-bar expand-bar-left",onClick:o,title:"Expand architect panel","aria-label":"Expand architect panel",children:B.jsx("svg",{width:"10",height:"24",viewBox:"0 0 10 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:B.jsx("path",{d:"M3 8l4 4-4 4"})})}),B.jsx("div",{className:"split-left",style:{width:f?0:g?void 0:`${d}%`,flex:g?1:void 0,display:f?"none":void 0},children:e}),!i&&B.jsx("div",{className:"split-handle",onMouseDown:p,role:"separator","aria-label":"Resize panels"}),B.jsx("div",{className:"split-right",style:{width:g?0:f?void 0:`${100-d}%`,flex:f?1:void 0,display:g?"none":void 0},children:t}),g&&l&&B.jsx("button",{className:"expand-bar expand-bar-right",onClick:l,title:"Expand work panel","aria-label":"Expand work panel",children:B.jsx("svg",{width:"10",height:"24",viewBox:"0 0 10 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:B.jsx("path",{d:"M7 8l-4 4 4 4"})})})]})}const RL={work:"📋",architect:"🏛️",builder:"🔨",shell:"💻",file:"📄",activity:"⚡",files:"📁",analytics:"📊",team:"👥",decisions:"⚖️"};function qE({tabs:e,activeTabId:t,onSelectTab:r,onRefresh:i}){const o=async(l,d)=>{l.stopPropagation();try{await mL(d.id),i()}catch(a){console.error("Failed to close tab:",a)}};return B.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:e.map(l=>B.jsxs("button",{role:"tab","aria-selected":l.id===t,className:`tab ${l.id===t?"tab-active":""}`,onClick:()=>r(l.id),title:l.label,children:[B.jsx("span",{className:"tab-icon","aria-hidden":"true",children:RL[l.type]}),B.jsx("span",{className:"tab-label",children:l.label}),l.closable&&B.jsx("span",{className:"tab-close",onClick:d=>o(d,l),role:"button","aria-label":`Close ${l.label}`,tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),o(d,l))},children:"×"})]},l.id))})}function PL({tabs:e,activeTabId:t,onSelectTab:r,onRequestRemove:i}){function o(l,d){l.stopPropagation(),l.preventDefault(),!(!d.architectName||!i)&&i(d.architectName)}return B.jsx("div",{className:"architect-tab-strip tab-bar",role:"tablist","aria-label":"Architect tabs",children:e.map(l=>B.jsxs("button",{role:"tab","aria-selected":l.id===t,className:`tab ${l.id===t?"tab-active":""}`,onClick:()=>r(l.id),title:l.label,children:[B.jsx("span",{className:"tab-label",children:l.label}),l.closable&&B.jsx("span",{className:"tab-close",onClick:d=>o(d,l),role:"button","aria-label":`Close ${l.label}`,tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&o(d,l)},children:B.jsx("span",{"aria-hidden":"true",children:"×"})})]},l.id))})}var gv={exports:{}},JS;function BL(){return JS||(JS=1,(function(e,t){(function(r,i){e.exports=i()})(globalThis,(()=>(()=>{var r={4567:function(d,a,u){var c=this&&this.__decorate||function(x,C,E,D){var w,M=arguments.length,T=M<3?C:D===null?D=Object.getOwnPropertyDescriptor(C,E):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,C,E,D);else for(var O=x.length-1;O>=0;O--)(w=x[O])&&(T=(M<3?w(T):M>3?w(C,E,T):w(C,E))||T);return M>3&&T&&Object.defineProperty(C,E,T),T},p=this&&this.__param||function(x,C){return function(E,D){C(E,D,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const f=u(9042),g=u(9924),b=u(844),S=u(4725),m=u(2585),v=u(3656);let y=a.AccessibilityManager=class extends b.Disposable{constructor(x,C,E,D){super(),this._terminal=x,this._coreBrowserService=E,this._renderService=D,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let w=0;w<this._terminal.rows;w++)this._rowElements[w]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[w]);if(this._topBoundaryFocusListener=w=>this._handleBoundaryFocus(w,0),this._bottomBoundaryFocusListener=w=>this._handleBoundaryFocus(w,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new g.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((w=>this._handleResize(w.rows)))),this.register(this._terminal.onRender((w=>this._refreshRows(w.start,w.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((w=>this._handleChar(w)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
52
|
+
`)))),this.register(this._terminal.onA11yTab((w=>this._handleTab(w)))),this.register(this._terminal.onKey((w=>this._handleKey(w.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,b.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(x){for(let C=0;C<x;C++)this._handleChar(" ")}_handleChar(x){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==x&&(this._charsToAnnounce+=x):this._charsToAnnounce+=x,x===`
|
|
53
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,C){this._liveRegionDebouncer.refresh(x,C,this._terminal.rows)}_renderRows(x,C){const E=this._terminal.buffer,D=E.lines.length.toString();for(let w=x;w<=C;w++){const M=E.lines.get(E.ydisp+w),T=[],O=(M==null?void 0:M.translateToString(!0,void 0,void 0,T))||"",L=(E.ydisp+w+1).toString(),P=this._rowElements[w];P&&(O.length===0?(P.innerText=" ",this._rowColumns.set(P,[0,1])):(P.textContent=O,this._rowColumns.set(P,T)),P.setAttribute("aria-posinset",L),P.setAttribute("aria-setsize",D))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,C){const E=x.target,D=this._rowElements[C===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(C===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==D)return;let w,M;if(C===0?(w=E,M=this._rowElements.pop(),this._rowContainer.removeChild(M)):(w=this._rowElements.shift(),M=E,this._rowContainer.removeChild(w)),w.removeEventListener("focus",this._topBoundaryFocusListener),M.removeEventListener("focus",this._bottomBoundaryFocusListener),C===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(C===0?-1:1),this._rowElements[C===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var O;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let C={node:x.anchorNode,offset:x.anchorOffset},E={node:x.focusNode,offset:x.focusOffset};if((C.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||C.node===E.node&&C.offset>E.offset)&&([C,E]=[E,C]),C.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(C={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(C.node))return;const D=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(D)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:D,offset:((O=D.textContent)==null?void 0:O.length)??0}),!this._rowContainer.contains(E.node))return;const w=({node:L,offset:P})=>{const R=L instanceof Text?L.parentNode:L;let I=parseInt(R==null?void 0:R.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const $=this._rowColumns.get(R);if(!$)return console.warn("columns is null. Race condition?"),null;let V=P<$.length?$[P]:$.slice(-1)[0]+1;return V>=this._terminal.cols&&(++I,V=0),{row:I,column:V}},M=w(C),T=w(E);if(M&&T){if(M.row>T.row||M.row===T.row&&M.column>=T.column)throw new Error("invalid range");this._terminal.select(M.column,M.row,(T.row-M.row)*this._terminal.cols-M.column+T.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let C=this._rowContainer.children.length;C<this._terminal.rows;C++)this._rowElements[C]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[C]);for(;this._rowElements.length>x;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x<this._terminal.rows;x++)this._refreshRowDimensions(this._rowElements[x])}}_refreshRowDimensions(x){x.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=y=c([p(1,m.IInstantiationService),p(2,S.ICoreBrowserService),p(3,S.IRenderService)],y)},3614:(d,a)=>{function u(g){return g.replace(/\r?\n/g,"\r")}function c(g,b){return b?"\x1B[200~"+g+"\x1B[201~":g}function p(g,b,S,m){g=c(g=u(g),S.decPrivateModes.bracketedPasteMode&&m.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(g,!0),b.value=""}function f(g,b,S){const m=S.getBoundingClientRect(),v=g.clientX-m.left-10,y=g.clientY-m.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${v}px`,b.style.top=`${y}px`,b.style.zIndex="1000",b.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=u,a.bracketTextForPaste=c,a.copyHandler=function(g,b){g.clipboardData&&g.clipboardData.setData("text/plain",b.selectionText),g.preventDefault()},a.handlePasteEvent=function(g,b,S,m){g.stopPropagation(),g.clipboardData&&p(g.clipboardData.getData("text/plain"),b,S,m)},a.paste=p,a.moveTextAreaUnderMouseCursor=f,a.rightClickHandler=function(g,b,S,m,v){f(g,b,S),v&&m.rightClickSelect(g),b.value=m.selectionText,b.select()}},7239:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const c=u(1505);a.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(p,f,g){this._css.set(p,f,g)}getCss(p,f){return this._css.get(p,f)}setColor(p,f,g){this._color.set(p,f,g)}getColor(p,f){return this._color.get(p,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,c,p,f){u.addEventListener(c,p,f);let g=!1;return{dispose:()=>{g||(g=!0,u.removeEventListener(c,p,f))}}}},3551:function(d,a,u){var c=this&&this.__decorate||function(y,x,C,E){var D,w=arguments.length,M=w<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,x,C,E);else for(var T=y.length-1;T>=0;T--)(D=y[T])&&(M=(w<3?D(M):w>3?D(x,C,M):D(x,C))||M);return w>3&&M&&Object.defineProperty(x,C,M),M},p=this&&this.__param||function(y,x){return function(C,E){x(C,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const f=u(3656),g=u(8460),b=u(844),S=u(2585),m=u(4725);let v=a.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(y,x,C,E,D){super(),this._element=y,this._mouseService=x,this._renderService=C,this._bufferService=E,this._linkProviderService=D,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.toDisposable)((()=>{var w;this._lastMouseEvent=void 0,(w=this._activeProviderReplies)==null||w.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(y){this._lastMouseEvent=y;const x=this._positionFromMouseEvent(y,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const C=y.composedPath();for(let E=0;E<C.length;E++){const D=C[E];if(D.classList.contains("xterm"))break;if(D.classList.contains("xterm-hover"))return}this._lastBufferCell&&x.x===this._lastBufferCell.x&&x.y===this._lastBufferCell.y||(this._handleHover(x),this._lastBufferCell=x)}_handleHover(y){if(this._activeLine!==y.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(y,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,y)||(this._clearCurrentLink(),this._askForLink(y,!0))}_askForLink(y,x){var E,D;this._activeProviderReplies&&x||((E=this._activeProviderReplies)==null||E.forEach((w=>{w==null||w.forEach((M=>{M.link.dispose&&M.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=y.y);let C=!1;for(const[w,M]of this._linkProviderService.linkProviders.entries())x?(D=this._activeProviderReplies)!=null&&D.get(w)&&(C=this._checkLinkProviderResult(w,y,C)):M.provideLinks(y.y,(T=>{var L,P;if(this._isMouseOut)return;const O=T==null?void 0:T.map((R=>({link:R})));(L=this._activeProviderReplies)==null||L.set(w,O),C=this._checkLinkProviderResult(w,y,C),((P=this._activeProviderReplies)==null?void 0:P.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(y.y,this._activeProviderReplies)}))}_removeIntersectingLinks(y,x){const C=new Set;for(let E=0;E<x.size;E++){const D=x.get(E);if(D)for(let w=0;w<D.length;w++){const M=D[w],T=M.link.range.start.y<y?0:M.link.range.start.x,O=M.link.range.end.y>y?this._bufferService.cols:M.link.range.end.x;for(let L=T;L<=O;L++){if(C.has(L)){D.splice(w--,1);break}C.add(L)}}}}_checkLinkProviderResult(y,x,C){var w;if(!this._activeProviderReplies)return C;const E=this._activeProviderReplies.get(y);let D=!1;for(let M=0;M<y;M++)this._activeProviderReplies.has(M)&&!this._activeProviderReplies.get(M)||(D=!0);if(!D&&E){const M=E.find((T=>this._linkAtPosition(T.link,x)));M&&(C=!0,this._handleNewLink(M))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!C)for(let M=0;M<this._activeProviderReplies.size;M++){const T=(w=this._activeProviderReplies.get(M))==null?void 0:w.find((O=>this._linkAtPosition(O.link,x)));if(T){C=!0,this._handleNewLink(T);break}}return C}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(y){if(!this._currentLink)return;const x=this._positionFromMouseEvent(y,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(y,this._currentLink.link.text)}_clearCurrentLink(y,x){this._currentLink&&this._lastMouseEvent&&(!y||!x||this._currentLink.link.range.start.y>=y&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,b.disposeArray)(this._linkCacheDisposables))}_handleNewLink(y){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(y.link,x)&&(this._currentLink=y,this._currentLink.state={decorations:{underline:y.link.decorations===void 0||y.link.decorations.underline,pointerCursor:y.link.decorations===void 0||y.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,y.link,this._lastMouseEvent),y.link.decorations={},Object.defineProperties(y.link.decorations,{pointerCursor:{get:()=>{var C,E;return(E=(C=this._currentLink)==null?void 0:C.state)==null?void 0:E.decorations.pointerCursor},set:C=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==C&&(this._currentLink.state.decorations.pointerCursor=C,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",C))}},underline:{get:()=>{var C,E;return(E=(C=this._currentLink)==null?void 0:C.state)==null?void 0:E.decorations.underline},set:C=>{var E,D,w;(E=this._currentLink)!=null&&E.state&&((w=(D=this._currentLink)==null?void 0:D.state)==null?void 0:w.decorations.underline)!==C&&(this._currentLink.state.decorations.underline=C,this._currentLink.state.isHovered&&this._fireUnderlineEvent(y.link,C))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((C=>{if(!this._currentLink)return;const E=C.start===0?0:C.start+1+this._bufferService.buffer.ydisp,D=this._bufferService.buffer.ydisp+1+C.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=D&&(this._clearCurrentLink(E,D),this._lastMouseEvent)){const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._askForLink(w,!1)}}))))}_linkHover(y,x,C){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&y.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(C,x.text)}_fireUnderlineEvent(y,x){const C=y.range,E=this._bufferService.buffer.ydisp,D=this._createLinkUnderlineEvent(C.start.x-1,C.start.y-E-1,C.end.x,C.end.y-E-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(D)}_linkLeave(y,x,C){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&y.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(C,x.text)}_linkAtPosition(y,x){const C=y.range.start.y*this._bufferService.cols+y.range.start.x,E=y.range.end.y*this._bufferService.cols+y.range.end.x,D=x.y*this._bufferService.cols+x.x;return C<=D&&D<=E}_positionFromMouseEvent(y,x,C){const E=C.getCoords(y,x,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(y,x,C,E,D){return{x1:y,y1:x,x2:C,y2:E,cols:this._bufferService.cols,fg:D}}};a.Linkifier=v=c([p(1,m.IMouseService),p(2,m.IRenderService),p(3,S.IBufferService),p(4,m.ILinkProviderService)],v)},9042:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(d,a,u){var c=this&&this.__decorate||function(m,v,y,x){var C,E=arguments.length,D=E<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,v,y,x);else for(var w=m.length-1;w>=0;w--)(C=m[w])&&(D=(E<3?C(D):E>3?C(v,y,D):C(v,y))||D);return E>3&&D&&Object.defineProperty(v,y,D),D},p=this&&this.__param||function(m,v){return function(y,x){v(y,x,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const f=u(511),g=u(2585);let b=a.OscLinkProvider=class{constructor(m,v,y){this._bufferService=m,this._optionsService=v,this._oscLinkService=y}provideLinks(m,v){var O;const y=this._bufferService.buffer.lines.get(m-1);if(!y)return void v(void 0);const x=[],C=this._optionsService.rawOptions.linkHandler,E=new f.CellData,D=y.getTrimmedLength();let w=-1,M=-1,T=!1;for(let L=0;L<D;L++)if(M!==-1||y.hasContent(L)){if(y.loadCell(L,E),E.hasExtendedAttrs()&&E.extended.urlId){if(M===-1){M=L,w=E.extended.urlId;continue}T=E.extended.urlId!==w}else M!==-1&&(T=!0);if(T||M!==-1&&L===D-1){const P=(O=this._oscLinkService.getLinkData(w))==null?void 0:O.uri;if(P){const R={start:{x:M+1,y:m},end:{x:L+(T||L!==D-1?0:1),y:m}};let I=!1;if(!(C!=null&&C.allowNonHttpProtocols))try{const $=new URL(P);["http:","https:"].includes($.protocol)||(I=!0)}catch{I=!0}I||x.push({text:P,range:R,activate:($,V)=>C?C.activate($,V,R):S(0,V),hover:($,V)=>{var U;return(U=C==null?void 0:C.hover)==null?void 0:U.call(C,$,V,R)},leave:($,V)=>{var U;return(U=C==null?void 0:C.leave)==null?void 0:U.call(C,$,V,R)}})}T=!1,E.hasExtendedAttrs()&&E.extended.urlId?(M=L,w=E.extended.urlId):(M=-1,w=-1)}}v(x)}};function S(m,v){if(confirm(`Do you want to navigate to ${v}?
|
|
54
|
+
|
|
55
|
+
WARNING: This link could potentially be dangerous`)){const y=window.open();if(y){try{y.opener=null}catch{}y.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=b=c([p(0,g.IBufferService),p(1,g.IOptionsService),p(2,g.IOscLinkService)],b)},6193:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,c){this._renderCallback=u,this._coreBrowserService=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,c,p){this._rowCount=p,u=u!==void 0?u:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const c=u(3614),p=u(3656),f=u(3551),g=u(9042),b=u(3730),S=u(1680),m=u(3107),v=u(5744),y=u(2950),x=u(1296),C=u(428),E=u(4269),D=u(5114),w=u(8934),M=u(3230),T=u(9312),O=u(4725),L=u(6731),P=u(8055),R=u(8969),I=u(8460),$=u(844),V=u(6114),U=u(8437),K=u(2584),G=u(7399),N=u(5941),H=u(9074),z=u(2585),q=u(5435),J=u(4567),ie=u(779);class pe extends R.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(Z={}){super(Z),this.browser=V,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new $.MutableDisposable),this._onCursorMove=this.register(new I.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new I.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new I.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new I.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new I.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new I.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new I.EventEmitter),this._onBlur=this.register(new I.EventEmitter),this._onA11yCharEmitter=this.register(new I.EventEmitter),this._onA11yTabEmitter=this.register(new I.EventEmitter),this._onWillOpen=this.register(new I.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ie.LinkProviderService),this._instantiationService.setService(O.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(b.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((W,te)=>this.refresh(W,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((W=>this._reportWindowsOptions(W)))),this.register(this._inputHandler.onColor((W=>this._handleColorEvent(W)))),this.register((0,I.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,I.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,I.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((W=>this._afterResize(W.cols,W.rows)))),this.register((0,$.toDisposable)((()=>{var W,te;this._customKeyEventHandler=void 0,(te=(W=this.element)==null?void 0:W.parentNode)==null||te.removeChild(this.element)})))}_handleColorEvent(Z){if(this._themeService)for(const W of Z){let te,Q="";switch(W.index){case 256:te="foreground",Q="10";break;case 257:te="background",Q="11";break;case 258:te="cursor",Q="12";break;default:te="ansi",Q="4;"+W.index}switch(W.type){case 0:const se=P.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[W.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${K.C0.ESC}]${Q};${(0,N.toRgbString)(se)}${K.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((re=>re.ansi[W.index]=P.channels.toColor(...W.color)));else{const re=te;this._themeService.modifyColors((be=>be[re]=P.channels.toColor(...W.color)))}break;case 2:this._themeService.restoreColor(W.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Z){Z?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(J.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Z){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Z;return(Z=this.textarea)==null?void 0:Z.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const Z=this.buffer.ybase+this.buffer.y,W=this.buffer.lines.get(Z);if(!W)return;const te=Math.min(this.buffer.x,this.cols-1),Q=this._renderService.dimensions.css.cell.height,se=W.getWidth(te),re=this._renderService.dimensions.css.cell.width*se,be=this.buffer.y*this._renderService.dimensions.css.cell.height,ve=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ve+"px",this.textarea.style.top=be+"px",this.textarea.style.width=re+"px",this.textarea.style.height=Q+"px",this.textarea.style.lineHeight=Q+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(W=>{this.hasSelection()&&(0,c.copyHandler)(W,this._selectionService)})));const Z=W=>(0,c.handlePasteEvent)(W,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",Z)),this.register((0,p.addDisposableDomListener)(this.element,"paste",Z)),V.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(W=>{W.button===2&&(0,c.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(W=>{(0,c.rightClickHandler)(W,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),V.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(W=>{W.button===1&&(0,c.moveTextAreaUnderMouseCursor)(W,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(Z=>this._keyUp(Z)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(Z=>this._keyDown(Z)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(Z=>this._keyPress(Z)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(Z=>this._compositionHelper.compositionupdate(Z)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(Z=>this._inputEvent(Z)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Z){var te;if(!Z)throw new Error("Terminal requires a parent element.");if(Z.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((te=this.element)==null?void 0:te.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Z.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),Z.appendChild(this.element);const W=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),W.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",(Q=>this.updateCursorStyle(Q)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),W.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),V.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(D.CoreBrowserService,this.textarea,Z.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(O.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(Q=>this._handleTextAreaFocus(Q)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(C.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(O.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(O.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(O.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(M.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(O.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((Q=>this._onRender.fire(Q)))),this.onResize((Q=>this._renderService.resize(Q.cols,Q.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(y.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(w.MouseService),this._instantiationService.setService(O.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(W);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((Q=>this.scrollLines(Q.amount,Q.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(O.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((Q=>this.scrollLines(Q.amount,Q.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Q=>this._renderService.handleSelectionChanged(Q.start,Q.end,Q.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Q=>{this.textarea.value=Q,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Q=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(m.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(Q=>this._selectionService.handleMouseDown(Q)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(J.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(Q=>this._handleScreenReaderModeOptionChange(Q)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Q=>{!this._overviewRulerRenderer&&Q&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Z=this,W=this.element;function te(re){const be=Z._mouseService.getMouseReportCoords(re,Z.screenElement);if(!be)return!1;let ve,Se;switch(re.overrideType||re.type){case"mousemove":Se=32,re.buttons===void 0?(ve=3,re.button!==void 0&&(ve=re.button<3?re.button:3)):ve=1&re.buttons?0:4&re.buttons?1:2&re.buttons?2:3;break;case"mouseup":Se=0,ve=re.button<3?re.button:3;break;case"mousedown":Se=1,ve=re.button<3?re.button:3;break;case"wheel":if(Z._customWheelEventHandler&&Z._customWheelEventHandler(re)===!1||Z.viewport.getLinesScrolled(re)===0)return!1;Se=re.deltaY<0?0:1,ve=4;break;default:return!1}return!(Se===void 0||ve===void 0||ve>4)&&Z.coreMouseService.triggerMouseEvent({col:be.col,row:be.row,x:be.x,y:be.y,button:ve,action:Se,ctrl:re.ctrlKey,alt:re.altKey,shift:re.shiftKey})}const Q={mouseup:null,wheel:null,mousedrag:null,mousemove:null},se={mouseup:re=>(te(re),re.buttons||(this._document.removeEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.removeEventListener("mousemove",Q.mousedrag)),this.cancel(re)),wheel:re=>(te(re),this.cancel(re,!0)),mousedrag:re=>{re.buttons&&te(re)},mousemove:re=>{re.buttons||te(re)}};this.register(this.coreMouseService.onProtocolChange((re=>{re?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(re)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&re?Q.mousemove||(W.addEventListener("mousemove",se.mousemove),Q.mousemove=se.mousemove):(W.removeEventListener("mousemove",Q.mousemove),Q.mousemove=null),16&re?Q.wheel||(W.addEventListener("wheel",se.wheel,{passive:!1}),Q.wheel=se.wheel):(W.removeEventListener("wheel",Q.wheel),Q.wheel=null),2&re?Q.mouseup||(Q.mouseup=se.mouseup):(this._document.removeEventListener("mouseup",Q.mouseup),Q.mouseup=null),4&re?Q.mousedrag||(Q.mousedrag=se.mousedrag):(this._document.removeEventListener("mousemove",Q.mousedrag),Q.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(W,"mousedown",(re=>{if(re.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(re))return te(re),Q.mouseup&&this._document.addEventListener("mouseup",Q.mouseup),Q.mousedrag&&this._document.addEventListener("mousemove",Q.mousedrag),this.cancel(re)}))),this.register((0,p.addDisposableDomListener)(W,"wheel",(re=>{if(!Q.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(re)===!1)return!1;if(!this.buffer.hasScrollback){const be=this.viewport.getLinesScrolled(re);if(be===0)return;const ve=K.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(re.deltaY<0?"A":"B");let Se="";for(let Le=0;Le<Math.abs(be);Le++)Se+=ve;return this.coreService.triggerDataEvent(Se,!0),this.cancel(re,!0)}return this.viewport.handleWheel(re)?this.cancel(re):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(W,"touchstart",(re=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(re),this.cancel(re)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(W,"touchmove",(re=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(re)?void 0:this.cancel(re)}),{passive:!1}))}refresh(Z,W){var te;(te=this._renderService)==null||te.refreshRows(Z,W)}updateCursorStyle(Z){var W;(W=this._selectionService)!=null&&W.shouldColumnSelect(Z)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(Z,W,te=0){var Q;te===1?(super.scrollLines(Z,W,te),this.refresh(0,this.rows-1)):(Q=this.viewport)==null||Q.scrollLines(Z)}paste(Z){(0,c.paste)(Z,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Z){this._customKeyEventHandler=Z}attachCustomWheelEventHandler(Z){this._customWheelEventHandler=Z}registerLinkProvider(Z){return this._linkProviderService.registerLinkProvider(Z)}registerCharacterJoiner(Z){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const W=this._characterJoinerService.register(Z);return this.refresh(0,this.rows-1),W}deregisterCharacterJoiner(Z){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Z)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Z){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Z)}registerDecoration(Z){return this._decorationService.registerDecoration(Z)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Z,W,te){this._selectionService.setSelection(Z,W,te)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var Z;(Z=this._selectionService)==null||Z.clearSelection()}selectAll(){var Z;(Z=this._selectionService)==null||Z.selectAll()}selectLines(Z,W){var te;(te=this._selectionService)==null||te.selectLines(Z,W)}_keyDown(Z){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1)return!1;const W=this.browser.isMac&&this.options.macOptionIsMeta&&Z.altKey;if(!W&&!this._compositionHelper.keydown(Z))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;W||Z.key!=="Dead"&&Z.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,G.evaluateKeyboardEvent)(Z,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Z),te.type===3||te.type===2){const Q=this.rows-1;return this.scrollLines(te.type===2?-Q:Q),this.cancel(Z,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Z)||(te.cancel&&this.cancel(Z,!0),!te.key||!!(Z.key&&!Z.ctrlKey&&!Z.altKey&&!Z.metaKey&&Z.key.length===1&&Z.key.charCodeAt(0)>=65&&Z.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(te.key!==K.C0.ETX&&te.key!==K.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:Z}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||Z.altKey||Z.ctrlKey?this.cancel(Z,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Z,W){const te=Z.isMac&&!this.options.macOptionIsMeta&&W.altKey&&!W.ctrlKey&&!W.metaKey||Z.isWindows&&W.altKey&&W.ctrlKey&&!W.metaKey||Z.isWindows&&W.getModifierState("AltGraph");return W.type==="keypress"?te:te&&(!W.keyCode||W.keyCode>47)}_keyUp(Z){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1||((function(W){return W.keyCode===16||W.keyCode===17||W.keyCode===18})(Z)||this.focus(),this.updateCursorStyle(Z),this._keyPressHandled=!1)}_keyPress(Z){let W;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Z)===!1)return!1;if(this.cancel(Z),Z.charCode)W=Z.charCode;else if(Z.which===null||Z.which===void 0)W=Z.keyCode;else{if(Z.which===0||Z.charCode===0)return!1;W=Z.which}return!(!W||(Z.altKey||Z.ctrlKey||Z.metaKey)&&!this._isThirdLevelShift(this.browser,Z)||(W=String.fromCharCode(W),this._onKey.fire({key:W,domEvent:Z}),this._showCursor(),this.coreService.triggerDataEvent(W,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Z){if(Z.data&&Z.inputType==="insertText"&&(!Z.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const W=Z.data;return this.coreService.triggerDataEvent(W,!0),this.cancel(Z),!0}return!1}resize(Z,W){Z!==this.cols||W!==this.rows?super.resize(Z,W):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Z,W){var te,Q;(te=this._charSizeService)==null||te.measure(),(Q=this.viewport)==null||Q.syncScrollArea(!0)}clear(){var Z;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let W=1;W<this.rows;W++)this.buffer.lines.push(this.buffer.getBlankLine(U.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Z=this.viewport)==null||Z.reset(),this.refresh(0,this.rows-1)}}reset(){var W,te;this.options.rows=this.rows,this.options.cols=this.cols;const Z=this._customKeyEventHandler;this._setup(),super.reset(),(W=this._selectionService)==null||W.reset(),this._decorationService.reset(),(te=this.viewport)==null||te.reset(),this._customKeyEventHandler=Z,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Z;(Z=this._renderService)==null||Z.clearTextureAtlas()}_reportFocus(){var Z;(Z=this.element)!=null&&Z.classList.contains("focus")?this.coreService.triggerDataEvent(K.C0.ESC+"[I"):this.coreService.triggerDataEvent(K.C0.ESC+"[O")}_reportWindowsOptions(Z){if(this._renderService)switch(Z){case q.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const W=this._renderService.dimensions.css.canvas.width.toFixed(0),te=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[4;${te};${W}t`);break;case q.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Q=this._renderService.dimensions.css.cell.width.toFixed(0),se=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[6;${se};${Q}t`)}}cancel(Z,W){if(this.options.cancelEvents||W)return Z.preventDefault(),Z.stopPropagation(),!1}}a.Terminal=pe},9924:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,c=1e3){this._renderCallback=u,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,c,p){this._rowCount=p,u=u!==void 0?u:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=f-this._lastRefreshMs,b=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,c)}}},1680:function(d,a,u){var c=this&&this.__decorate||function(y,x,C,E){var D,w=arguments.length,M=w<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,x,C,E);else for(var T=y.length-1;T>=0;T--)(D=y[T])&&(M=(w<3?D(M):w>3?D(x,C,M):D(x,C))||M);return w>3&&M&&Object.defineProperty(x,C,M),M},p=this&&this.__param||function(y,x){return function(C,E){x(C,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const f=u(3656),g=u(4725),b=u(8460),S=u(844),m=u(2585);let v=a.Viewport=class extends S.Disposable{constructor(y,x,C,E,D,w,M,T){super(),this._viewportElement=y,this._scrollArea=x,this._bufferService=C,this._optionsService=E,this._charSizeService=D,this._renderService=w,this._coreBrowserService=M,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((O=>this._activeBuffer=O.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((O=>this._renderDimensions=O))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((O=>this._handleThemeChange(O)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(y){this._viewportElement.style.backgroundColor=y.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(y){if(y)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const y=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==y&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=y),this._refreshAnimationFrame=null}syncScrollArea(y=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(y);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(y)}_handleScroll(y){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const y=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(y*(this._smoothScrollState.target-this._smoothScrollState.origin)),y<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(y,x){const C=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&C<this._lastRecordedBufferHeight)||(y.cancelable&&y.preventDefault(),!1)}handleWheel(y){const x=this._getPixelsScrolled(y);return x!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+x:this._smoothScrollState.target+=x,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=x,this._bubbleScroll(y,x))}scrollLines(y){if(y!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const x=y*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+x,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!1})}_getPixelsScrolled(y){if(y.deltaY===0||y.shiftKey)return 0;let x=this._applyScrollModifier(y.deltaY,y);return y.deltaMode===WheelEvent.DOM_DELTA_LINE?x*=this._currentRowHeight:y.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._currentRowHeight*this._bufferService.rows),x}getBufferElements(y,x){var T;let C,E="";const D=[],w=x??this._bufferService.buffer.lines.length,M=this._bufferService.buffer.lines;for(let O=y;O<w;O++){const L=M.get(O);if(!L)continue;const P=(T=M.get(O+1))==null?void 0:T.isWrapped;if(E+=L.translateToString(!P),!P||O===M.length-1){const R=document.createElement("div");R.textContent=E,D.push(R),E.length>0&&(C=R),E=""}}return{bufferElements:D,cursorElement:C}}getLinesScrolled(y){if(y.deltaY===0||y.shiftKey)return 0;let x=this._applyScrollModifier(y.deltaY,y);return y.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):y.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(y,x){const C=this._optionsService.rawOptions.fastScrollModifier;return C==="alt"&&x.altKey||C==="ctrl"&&x.ctrlKey||C==="shift"&&x.shiftKey?y*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:y*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(y){this._lastTouchY=y.touches[0].pageY}handleTouchMove(y){const x=this._lastTouchY-y.touches[0].pageY;return this._lastTouchY=y.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(y,x))}};a.Viewport=v=c([p(2,m.IBufferService),p(3,m.IOptionsService),p(4,g.ICharSizeService),p(5,g.IRenderService),p(6,g.ICoreBrowserService),p(7,g.IThemeService)],v)},3107:function(d,a,u){var c=this&&this.__decorate||function(m,v,y,x){var C,E=arguments.length,D=E<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,v,y,x);else for(var w=m.length-1;w>=0;w--)(C=m[w])&&(D=(E<3?C(D):E>3?C(v,y,D):C(v,y))||D);return E>3&&D&&Object.defineProperty(v,y,D),D},p=this&&this.__param||function(m,v){return function(y,x){v(y,x,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const f=u(4725),g=u(844),b=u(2585);let S=a.BufferDecorationRenderer=class extends g.Disposable{constructor(m,v,y,x,C){super(),this._screenElement=m,this._bufferService=v,this._coreBrowserService=y,this._decorationService=x,this._renderService=C,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((E=>this._removeDecoration(E)))),this.register((0,g.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const m of this._decorationService.decorations)this._renderDecoration(m);this._dimensionsChanged=!1}_renderDecoration(m){this._refreshStyle(m),this._dimensionsChanged&&this._refreshXPosition(m)}_createElement(m){var x;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((x=m==null?void 0:m.options)==null?void 0:x.layer)==="top"),v.style.width=`${Math.round((m.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(m.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(m.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const y=m.options.x??0;return y&&y>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(m,v),v}_refreshStyle(m){const v=m.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)m.element&&(m.element.style.display="none",m.onRenderEmitter.fire(m.element));else{let y=this._decorationElements.get(m);y||(y=this._createElement(m),m.element=y,this._decorationElements.set(m,y),this._container.appendChild(y),m.onDispose((()=>{this._decorationElements.delete(m),y.remove()}))),y.style.top=v*this._renderService.dimensions.css.cell.height+"px",y.style.display=this._altBufferIsActive?"none":"block",m.onRenderEmitter.fire(y)}}_refreshXPosition(m,v=m.element){if(!v)return;const y=m.options.x??0;(m.options.anchor||"left")==="right"?v.style.right=y?y*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=y?y*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(m){var v;(v=this._decorationElements.get(m))==null||v.remove(),this._decorationElements.delete(m),m.dispose()}};a.BufferDecorationRenderer=S=c([p(1,b.IBufferService),p(2,f.ICoreBrowserService),p(3,b.IDecorationService),p(4,f.IRenderService)],S)},5871:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const c of this._zones)if(c.color===u.options.overviewRulerOptions.color&&c.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,u.marker.line))return;if(this._lineAdjacentToZone(c,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(c,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,c){return c>=u.startBufferLine&&c<=u.endBufferLine}_lineAdjacentToZone(u,c,p){return c>=u.startBufferLine-this._linePadding[p||"full"]&&c<=u.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(u,c){u.startBufferLine=Math.min(u.startBufferLine,c),u.endBufferLine=Math.max(u.endBufferLine,c)}}},5744:function(d,a,u){var c=this&&this.__decorate||function(C,E,D,w){var M,T=arguments.length,O=T<3?E:w===null?w=Object.getOwnPropertyDescriptor(E,D):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(C,E,D,w);else for(var L=C.length-1;L>=0;L--)(M=C[L])&&(O=(T<3?M(O):T>3?M(E,D,O):M(E,D))||O);return T>3&&O&&Object.defineProperty(E,D,O),O},p=this&&this.__param||function(C,E){return function(D,w){E(D,w,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const f=u(5871),g=u(4725),b=u(844),S=u(2585),m={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},y={full:0,left:0,center:0,right:0};let x=a.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(C,E,D,w,M,T,O){var P;super(),this._viewportElement=C,this._screenElement=E,this._bufferService=D,this._decorationService=w,this._renderService=M,this._optionsService=T,this._coreBrowserService=O,this._colorZoneStore=new f.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(P=this._viewportElement.parentElement)==null||P.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,b.toDisposable)((()=>{var R;(R=this._canvas)==null||R.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const C=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=C,v.center=E,v.right=C,this._refreshDrawHeightConstants(),y.full=0,y.left=0,y.center=v.left,y.right=v.left+v.center}_refreshDrawHeightConstants(){m.full=Math.round(2*this._coreBrowserService.dpr);const C=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(C,12),6)*this._coreBrowserService.dpr);m.left=E,m.center=E,m.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*m.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*m.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*m.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*m.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const C=this._colorZoneStore.zones;for(const E of C)E.position!=="full"&&this._renderColorZone(E);for(const E of C)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(C){this._ctx.fillStyle=C.color,this._ctx.fillRect(y[C.position||"full"],Math.round((this._canvas.height-1)*(C.startBufferLine/this._bufferService.buffers.active.lines.length)-m[C.position||"full"]/2),v[C.position||"full"],Math.round((this._canvas.height-1)*((C.endBufferLine-C.startBufferLine)/this._bufferService.buffers.active.lines.length)+m[C.position||"full"]))}_queueRefresh(C,E){this._shouldUpdateDimensions=C||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=x=c([p(2,S.IBufferService),p(3,S.IDecorationService),p(4,g.IRenderService),p(5,S.IOptionsService),p(6,g.ICoreBrowserService)],x)},2950:function(d,a,u){var c=this&&this.__decorate||function(m,v,y,x){var C,E=arguments.length,D=E<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,v,y,x);else for(var w=m.length-1;w>=0;w--)(C=m[w])&&(D=(E<3?C(D):E>3?C(v,y,D):C(v,y))||D);return E>3&&D&&Object.defineProperty(v,y,D),D},p=this&&this.__param||function(m,v){return function(y,x){v(y,x,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const f=u(4725),g=u(2585),b=u(2584);let S=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(m,v,y,x,C,E){this._textarea=m,this._compositionView=v,this._bufferService=y,this._optionsService=x,this._coreService=C,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(m){this._compositionView.textContent=m.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(m){if(this._isComposing||this._isSendingComposition){if(m.keyCode===229||m.keyCode===16||m.keyCode===17||m.keyCode===18)return!1;this._finalizeComposition(!1)}return m.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(m){if(this._compositionView.classList.remove("active"),this._isComposing=!1,m){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let y;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,y=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),y.length>0&&this._coreService.triggerDataEvent(y,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const m=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,y=v.replace(m,"");this._dataAlreadySent=y,v.length>m.length?this._coreService.triggerDataEvent(y,!0):v.length<m.length?this._coreService.triggerDataEvent(`${b.C0.DEL}`,!0):v.length===m.length&&v!==m&&this._coreService.triggerDataEvent(v,!0)}}),0)}updateCompositionElements(m){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const v=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),y=this._renderService.dimensions.css.cell.height,x=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,C=v*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=C+"px",this._compositionView.style.top=x+"px",this._compositionView.style.height=y+"px",this._compositionView.style.lineHeight=y+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=C+"px",this._textarea.style.top=x+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}m||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=S=c([p(2,g.IBufferService),p(3,g.IOptionsService),p(4,g.ICoreService),p(5,f.IRenderService)],S)},9806:(d,a)=>{function u(c,p,f){const g=f.getBoundingClientRect(),b=c.getComputedStyle(f),S=parseInt(b.getPropertyValue("padding-left")),m=parseInt(b.getPropertyValue("padding-top"));return[p.clientX-g.left-S,p.clientY-g.top-m]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(c,p,f,g,b,S,m,v,y){if(!S)return;const x=u(c,p,f);return x?(x[0]=Math.ceil((x[0]+(y?m/2:0))/m),x[1]=Math.ceil(x[1]/v),x[0]=Math.min(Math.max(x[0],1),g+(y?1:0)),x[1]=Math.min(Math.max(x[1],1),b),x):void 0}},9504:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const c=u(2584);function p(v,y,x,C){const E=v-f(v,x),D=y-f(y,x),w=Math.abs(E-D)-(function(M,T,O){let L=0;const P=M-f(M,O),R=T-f(T,O);for(let I=0;I<Math.abs(P-R);I++){const $=g(M,T)==="A"?-1:1,V=O.buffer.lines.get(P+$*I);V!=null&&V.isWrapped&&L++}return L})(v,y,x);return m(w,S(g(v,y),C))}function f(v,y){let x=0,C=y.buffer.lines.get(v),E=C==null?void 0:C.isWrapped;for(;E&&v>=0&&v<y.rows;)x++,C=y.buffer.lines.get(--v),E=C==null?void 0:C.isWrapped;return x}function g(v,y){return v>y?"A":"B"}function b(v,y,x,C,E,D){let w=v,M=y,T="";for(;w!==x||M!==C;)w+=E?1:-1,E&&w>D.cols-1?(T+=D.buffer.translateBufferLineToString(M,!1,v,w),w=0,v=0,M++):!E&&w<0&&(T+=D.buffer.translateBufferLineToString(M,!1,0,v+1),w=D.cols-1,v=w,M--);return T+D.buffer.translateBufferLineToString(M,!1,v,w)}function S(v,y){const x=y?"O":"[";return c.C0.ESC+x+v}function m(v,y){v=Math.floor(v);let x="";for(let C=0;C<v;C++)x+=y;return x}a.moveToCellSequence=function(v,y,x,C){const E=x.buffer.x,D=x.buffer.y;if(!x.buffer.hasScrollback)return(function(T,O,L,P,R,I){return p(O,P,R,I).length===0?"":m(b(T,O,T,O-f(O,R),!1,R).length,S("D",I))})(E,D,0,y,x,C)+p(D,y,x,C)+(function(T,O,L,P,R,I){let $;$=p(O,P,R,I).length>0?P-f(P,R):O;const V=P,U=(function(K,G,N,H,z,q){let J;return J=p(N,H,z,q).length>0?H-f(H,z):G,K<N&&J<=H||K>=N&&J<H?"C":"D"})(T,O,L,P,R,I);return m(b(T,$,L,V,U==="C",R).length,S(U,I))})(E,D,v,y,x,C);let w;if(D===y)return w=E>v?"D":"C",m(Math.abs(E-v),S(w,C));w=D>y?"D":"C";const M=Math.abs(D-y);return m((function(T,O){return O.cols-T})(D>y?v:E,x)+(M-1)*x.cols+1+((D>y?E:v)-1),S(w,C))}},1296:function(d,a,u){var c=this&&this.__decorate||function(I,$,V,U){var K,G=arguments.length,N=G<3?$:U===null?U=Object.getOwnPropertyDescriptor($,V):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(I,$,V,U);else for(var H=I.length-1;H>=0;H--)(K=I[H])&&(N=(G<3?K(N):G>3?K($,V,N):K($,V))||N);return G>3&&N&&Object.defineProperty($,V,N),N},p=this&&this.__param||function(I,$){return function(V,U){$(V,U,I)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const f=u(3787),g=u(2550),b=u(2223),S=u(6171),m=u(6052),v=u(4725),y=u(8055),x=u(8460),C=u(844),E=u(2585),D="xterm-dom-renderer-owner-",w="xterm-rows",M="xterm-fg-",T="xterm-bg-",O="xterm-focus",L="xterm-selection";let P=1,R=a.DomRenderer=class extends C.Disposable{constructor(I,$,V,U,K,G,N,H,z,q,J,ie,pe){super(),this._terminal=I,this._document=$,this._element=V,this._screenElement=U,this._viewportElement=K,this._helperContainer=G,this._linkifier2=N,this._charSizeService=z,this._optionsService=q,this._bufferService=J,this._coreBrowserService=ie,this._themeService=pe,this._terminalClass=P++,this._rowElements=[],this._selectionRenderModel=(0,m.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(w),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(D+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,C.toDisposable)((()=>{this._element.classList.remove(D+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const I=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*I,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*I),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/I),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/I),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const V of this._rowElements)V.style.width=`${this.dimensions.css.canvas.width}px`,V.style.height=`${this.dimensions.css.cell.height}px`,V.style.lineHeight=`${this.dimensions.css.cell.height}px`,V.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const $=`${this._terminalSelector} .${w} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=$,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(I){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let $=`${this._terminalSelector} .${w} { color: ${I.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;$+=`${this._terminalSelector} .${w} .xterm-dim { color: ${y.color.multiplyOpacity(I.foreground,.5).css};}`,$+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const V=`blink_underline_${this._terminalClass}`,U=`blink_bar_${this._terminalClass}`,K=`blink_block_${this._terminalClass}`;$+=`@keyframes ${V} { 50% { border-bottom-style: hidden; }}`,$+=`@keyframes ${U} { 50% { box-shadow: none; }}`,$+=`@keyframes ${K} { 0% { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css}; } 50% { background-color: inherit; color: ${I.cursor.css}; }}`,$+=`${this._terminalSelector} .${w}.${O} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${w}.${O} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${w}.${O} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block { background-color: ${I.cursor.css}; color: ${I.cursorAccent.css};}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${I.cursor.css} !important; color: ${I.cursorAccent.css} !important;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${I.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${I.cursor.css} inset;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${I.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,$+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${I.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${I.selectionInactiveBackgroundOpaque.css};}`;for(const[G,N]of I.ansi.entries())$+=`${this._terminalSelector} .${M}${G} { color: ${N.css}; }${this._terminalSelector} .${M}${G}.xterm-dim { color: ${y.color.multiplyOpacity(N,.5).css}; }${this._terminalSelector} .${T}${G} { background-color: ${N.css}; }`;$+=`${this._terminalSelector} .${M}${b.INVERTED_DEFAULT_COLOR} { color: ${y.color.opaque(I.background).css}; }${this._terminalSelector} .${M}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${y.color.multiplyOpacity(y.color.opaque(I.background),.5).css}; }${this._terminalSelector} .${T}${b.INVERTED_DEFAULT_COLOR} { background-color: ${I.foreground.css}; }`,this._themeStyleElement.textContent=$}_setDefaultSpacing(){const I=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${I}px`,this._rowFactory.defaultSpacing=I}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(I,$){for(let V=this._rowElements.length;V<=$;V++){const U=this._document.createElement("div");this._rowContainer.appendChild(U),this._rowElements.push(U)}for(;this._rowElements.length>$;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(I,$){this._refreshRowElements(I,$),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(O),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(O),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(I,$,V){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(I,$,V),this.renderRows(0,this._bufferService.rows-1),!I||!$)return;this._selectionRenderModel.update(this._terminal,I,$,V);const U=this._selectionRenderModel.viewportStartRow,K=this._selectionRenderModel.viewportEndRow,G=this._selectionRenderModel.viewportCappedStartRow,N=this._selectionRenderModel.viewportCappedEndRow;if(G>=this._bufferService.rows||N<0)return;const H=this._document.createDocumentFragment();if(V){const z=I[0]>$[0];H.appendChild(this._createSelectionElement(G,z?$[0]:I[0],z?I[0]:$[0],N-G+1))}else{const z=U===G?I[0]:0,q=G===K?$[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(G,z,q));const J=N-G-1;if(H.appendChild(this._createSelectionElement(G+1,0,this._bufferService.cols,J)),G!==N){const ie=K===N?$[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(N,0,ie))}}this._selectionContainer.appendChild(H)}_createSelectionElement(I,$,V,U=1){const K=this._document.createElement("div"),G=$*this.dimensions.css.cell.width;let N=this.dimensions.css.cell.width*(V-$);return G+N>this.dimensions.css.canvas.width&&(N=this.dimensions.css.canvas.width-G),K.style.height=U*this.dimensions.css.cell.height+"px",K.style.top=I*this.dimensions.css.cell.height+"px",K.style.left=`${G}px`,K.style.width=`${N}px`,K}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const I of this._rowElements)I.replaceChildren()}renderRows(I,$){const V=this._bufferService.buffer,U=V.ybase+V.y,K=Math.min(V.x,this._bufferService.cols-1),G=this._optionsService.rawOptions.cursorBlink,N=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=I;z<=$;z++){const q=z+V.ydisp,J=this._rowElements[z],ie=V.lines.get(q);if(!J||!ie)break;J.replaceChildren(...this._rowFactory.createRow(ie,q,q===U,N,H,K,G,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${D}${this._terminalClass}`}_handleLinkHover(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!0)}_handleLinkLeave(I){this._setCellUnderline(I.x1,I.x2,I.y1,I.y2,I.cols,!1)}_setCellUnderline(I,$,V,U,K,G){V<0&&(I=0),U<0&&($=0);const N=this._bufferService.rows-1;V=Math.max(Math.min(V,N),0),U=Math.max(Math.min(U,N),0),K=Math.min(K,this._bufferService.cols);const H=this._bufferService.buffer,z=H.ybase+H.y,q=Math.min(H.x,K-1),J=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,pe=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=V;he<=U;++he){const Z=he+H.ydisp,W=this._rowElements[he],te=H.lines.get(Z);if(!W||!te)break;W.replaceChildren(...this._rowFactory.createRow(te,Z,Z===z,ie,pe,q,J,this.dimensions.css.cell.width,this._widthCache,G?he===V?I:0:-1,G?(he===U?$:K)-1:-1))}}};a.DomRenderer=R=c([p(7,E.IInstantiationService),p(8,v.ICharSizeService),p(9,E.IOptionsService),p(10,E.IBufferService),p(11,v.ICoreBrowserService),p(12,v.IThemeService)],R)},3787:function(d,a,u){var c=this&&this.__decorate||function(w,M,T,O){var L,P=arguments.length,R=P<3?M:O===null?O=Object.getOwnPropertyDescriptor(M,T):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(w,M,T,O);else for(var I=w.length-1;I>=0;I--)(L=w[I])&&(R=(P<3?L(R):P>3?L(M,T,R):L(M,T))||R);return P>3&&R&&Object.defineProperty(M,T,R),R},p=this&&this.__param||function(w,M){return function(T,O){M(T,O,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const f=u(2223),g=u(643),b=u(511),S=u(2585),m=u(8055),v=u(4725),y=u(4269),x=u(6171),C=u(3734);let E=a.DomRendererRowFactory=class{constructor(w,M,T,O,L,P,R){this._document=w,this._characterJoinerService=M,this._optionsService=T,this._coreBrowserService=O,this._coreService=L,this._decorationService=P,this._themeService=R,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(w,M,T){this._selectionStart=w,this._selectionEnd=M,this._columnSelectMode=T}createRow(w,M,T,O,L,P,R,I,$,V,U){const K=[],G=this._characterJoinerService.getJoinedCharacters(M),N=this._themeService.colors;let H,z=w.getNoBgTrimmedLength();T&&z<P+1&&(z=P+1);let q=0,J="",ie=0,pe=0,he=0,Z=!1,W=0,te=!1,Q=0;const se=[],re=V!==-1&&U!==-1;for(let be=0;be<z;be++){w.loadCell(be,this._workCell);let ve=this._workCell.getWidth();if(ve===0)continue;let Se=!1,Le=be,xe=this._workCell;if(G.length>0&&be===G[0][0]){Se=!0;const Oe=G.shift();xe=new y.JoinedCellData(this._workCell,w.translateToString(!0,Oe[0],Oe[1]),Oe[1]-Oe[0]),Le=Oe[1]-1,ve=xe.getWidth()}const Ke=this._isCellInSelection(be,M),xt=T&&be===P,Ae=re&&be>=V&&be<=U;let Ce=!1;this._decorationService.forEachDecorationAtCell(be,M,void 0,(Oe=>{Ce=!0}));let we=xe.getChars()||g.WHITESPACE_CELL_CHAR;if(we===" "&&(xe.isUnderline()||xe.isOverline())&&(we=" "),Q=ve*I-$.get(we,xe.isBold(),xe.isItalic()),H){if(q&&(Ke&&te||!Ke&&!te&&xe.bg===ie)&&(Ke&&te&&N.selectionForeground||xe.fg===pe)&&xe.extended.ext===he&&Ae===Z&&Q===W&&!xt&&!Se&&!Ce){xe.isInvisible()?J+=g.WHITESPACE_CELL_CHAR:J+=we,q++;continue}q&&(H.textContent=J),H=this._document.createElement("span"),q=0,J=""}else H=this._document.createElement("span");if(ie=xe.bg,pe=xe.fg,he=xe.extended.ext,Z=Ae,W=Q,te=Ke,Se&&P>=be&&P<=Le&&(P=be),!this._coreService.isCursorHidden&&xt&&this._coreService.isCursorInitialized){if(se.push("xterm-cursor"),this._coreBrowserService.isFocused)R&&se.push("xterm-cursor-blink"),se.push(O==="bar"?"xterm-cursor-bar":O==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":se.push("xterm-cursor-outline");break;case"block":se.push("xterm-cursor-block");break;case"bar":se.push("xterm-cursor-bar");break;case"underline":se.push("xterm-cursor-underline")}}if(xe.isBold()&&se.push("xterm-bold"),xe.isItalic()&&se.push("xterm-italic"),xe.isDim()&&se.push("xterm-dim"),J=xe.isInvisible()?g.WHITESPACE_CELL_CHAR:xe.getChars()||g.WHITESPACE_CELL_CHAR,xe.isUnderline()&&(se.push(`xterm-underline-${xe.extended.underlineStyle}`),J===" "&&(J=" "),!xe.isUnderlineColorDefault()))if(xe.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${C.AttributeData.toColorRGB(xe.getUnderlineColor()).join(",")})`;else{let Oe=xe.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&xe.isBold()&&Oe<8&&(Oe+=8),H.style.textDecorationColor=N.ansi[Oe].css}xe.isOverline()&&(se.push("xterm-overline"),J===" "&&(J=" ")),xe.isStrikethrough()&&se.push("xterm-strikethrough"),Ae&&(H.style.textDecoration="underline");let de=xe.getFgColor(),Ee=xe.getFgColorMode(),$e=xe.getBgColor(),je=xe.getBgColorMode();const qt=!!xe.isInverse();if(qt){const Oe=de;de=$e,$e=Oe;const rr=Ee;Ee=je,je=rr}let ct,_t,Ue,Pe=!1;switch(this._decorationService.forEachDecorationAtCell(be,M,void 0,(Oe=>{Oe.options.layer!=="top"&&Pe||(Oe.backgroundColorRGB&&(je=50331648,$e=Oe.backgroundColorRGB.rgba>>8&16777215,ct=Oe.backgroundColorRGB),Oe.foregroundColorRGB&&(Ee=50331648,de=Oe.foregroundColorRGB.rgba>>8&16777215,_t=Oe.foregroundColorRGB),Pe=Oe.options.layer==="top")})),!Pe&&Ke&&(ct=this._coreBrowserService.isFocused?N.selectionBackgroundOpaque:N.selectionInactiveBackgroundOpaque,$e=ct.rgba>>8&16777215,je=50331648,Pe=!0,N.selectionForeground&&(Ee=50331648,de=N.selectionForeground.rgba>>8&16777215,_t=N.selectionForeground)),Pe&&se.push("xterm-decoration-top"),je){case 16777216:case 33554432:Ue=N.ansi[$e],se.push(`xterm-bg-${$e}`);break;case 50331648:Ue=m.channels.toColor($e>>16,$e>>8&255,255&$e),this._addStyle(H,`background-color:#${D(($e>>>0).toString(16),"0",6)}`);break;default:qt?(Ue=N.foreground,se.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):Ue=N.background}switch(ct||xe.isDim()&&(ct=m.color.multiplyOpacity(Ue,.5)),Ee){case 16777216:case 33554432:xe.isBold()&&de<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(de+=8),this._applyMinimumContrast(H,Ue,N.ansi[de],xe,ct,void 0)||se.push(`xterm-fg-${de}`);break;case 50331648:const Oe=m.channels.toColor(de>>16&255,de>>8&255,255&de);this._applyMinimumContrast(H,Ue,Oe,xe,ct,_t)||this._addStyle(H,`color:#${D(de.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,Ue,N.foreground,xe,ct,_t)||qt&&se.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}se.length&&(H.className=se.join(" "),se.length=0),xt||Se||Ce?H.textContent=J:q++,Q!==this.defaultSpacing&&(H.style.letterSpacing=`${Q}px`),K.push(H),be=Le}return H&&q&&(H.textContent=J),K}_applyMinimumContrast(w,M,T,O,L,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(O.getCode()))return!1;const R=this._getContrastCache(O);let I;if(L||P||(I=R.getColor(M.rgba,T.rgba)),I===void 0){const $=this._optionsService.rawOptions.minimumContrastRatio/(O.isDim()?2:1);I=m.color.ensureContrastRatio(L||M,P||T,$),R.setColor((L||M).rgba,(P||T).rgba,I??null)}return!!I&&(this._addStyle(w,`color:${I.css}`),!0)}_getContrastCache(w){return w.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(w,M){w.setAttribute("style",`${w.getAttribute("style")||""}${M};`)}_isCellInSelection(w,M){const T=this._selectionStart,O=this._selectionEnd;return!(!T||!O)&&(this._columnSelectMode?T[0]<=O[0]?w>=T[0]&&M>=T[1]&&w<O[0]&&M<=O[1]:w<T[0]&&M>=T[1]&&w>=O[0]&&M<=O[1]:M>T[1]&&M<O[1]||T[1]===O[1]&&M===T[1]&&w>=T[0]&&w<O[0]||T[1]<O[1]&&M===O[1]&&w<O[0]||T[1]<O[1]&&M===T[1]&&w>=T[0])}};function D(w,M,T){for(;w.length<T;)w=M+w;return w}a.DomRendererRowFactory=E=c([p(1,v.ICharacterJoinerService),p(2,S.IOptionsService),p(3,v.ICoreBrowserService),p(4,S.ICoreService),p(5,S.IDecorationService),p(6,v.IThemeService)],E)},2550:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=u.createElement("span");p.classList.add("xterm-char-measure-element");const f=u.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const g=u.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const b=u.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[p,f,g,b],this._container.appendChild(p),this._container.appendChild(f),this._container.appendChild(g),this._container.appendChild(b),c.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,c,p,f){u===this._font&&c===this._fontSize&&p===this._weight&&f===this._weightBold||(this._font=u,this._fontSize=c,this._weight=p,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(u,c,p){let f=0;if(!c&&!p&&u.length===1&&(f=u.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const S=this._measure(u,0);return S>0&&(this._flat[f]=S),S}let g=u;c&&(g+="B"),p&&(g+="I");let b=this._holey.get(g);if(b===void 0){let S=0;c&&(S|=1),p&&(S|=2),b=this._measure(u,S),b>0&&this._holey.set(g,b)}return b}_measure(u,c){const p=this._measureElements[c];return p.textContent=u.repeat(32),p.offsetWidth/32}}},2223:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const c=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(d,a)=>{function u(p){return 57508<=p&&p<=57558}function c(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=c,a.allowRescaling=function(p,f,g,b){return f===1&&g>Math.ceil(1.5*b)&&p!==void 0&&p>255&&!c(p)&&!u(p)&&!(function(S){return 57344<=S&&S<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return u(p)||(function(f){return 9472<=f&&f<=9631})(p)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(p,f,g=0){return(p-(2*Math.round(f)-g))%(2*Math.round(f))}},6052:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,f,g,b=!1){if(this.selectionStart=f,this.selectionEnd=g,!f||!g||f[0]===g[0]&&f[1]===g[1])return void this.clear();const S=p.buffers.active.ydisp,m=f[1]-S,v=g[1]-S,y=Math.max(m,0),x=Math.min(v,p.rows-1);y>=p.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=m,this.viewportEndRow=v,this.viewportCappedStartRow=y,this.viewportCappedEndRow=x,this.startCol=f[0],this.endCol=g[0])}isCellSelected(p,f,g){return!!this.hasSelection&&(g-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&g>=this.viewportCappedStartRow&&f<this.endCol&&g<=this.viewportCappedEndRow:f<this.startCol&&g>=this.viewportCappedStartRow&&f>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,c=this.selectionEnd;return!(!u||!c)&&(u[1]>c[1]||u[1]===c[1]&&u[0]>c[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(d,a,u){var c=this&&this.__decorate||function(x,C,E,D){var w,M=arguments.length,T=M<3?C:D===null?D=Object.getOwnPropertyDescriptor(C,E):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,C,E,D);else for(var O=x.length-1;O>=0;O--)(w=x[O])&&(T=(M<3?w(T):M>3?w(C,E,T):w(C,E))||T);return M>3&&T&&Object.defineProperty(C,E,T),T},p=this&&this.__param||function(x,C){return function(E,D){C(E,D,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const f=u(2585),g=u(8460),b=u(844);let S=a.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,C,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new y(this._optionsService))}catch{this._measureStrategy=this.register(new v(x,C,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};a.CharSizeService=S=c([p(2,f.IOptionsService)],S);class m extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(C,E){C!==void 0&&C>0&&E!==void 0&&E>0&&(this._result.width=C,this._result.height=E)}}class v extends m{constructor(C,E,D){super(),this._document=C,this._parentElement=E,this._optionsService=D,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class y extends m{constructor(C){super(),this._optionsService=C,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const C=this._ctx.measureText("W");return this._validateAndSet(C.width,C.fontBoundingBoxAscent+C.fontBoundingBoxDescent),this._result}}},4269:function(d,a,u){var c=this&&this.__decorate||function(y,x,C,E){var D,w=arguments.length,M=w<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,x,C,E);else for(var T=y.length-1;T>=0;T--)(D=y[T])&&(M=(w<3?D(M):w>3?D(x,C,M):D(x,C))||M);return w>3&&M&&Object.defineProperty(x,C,M),M},p=this&&this.__param||function(y,x){return function(C,E){x(C,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const f=u(3734),g=u(643),b=u(511),S=u(2585);class m extends f.AttributeData{constructor(x,C,E){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=C,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=m;let v=a.CharacterJoinerService=class WE{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(x){const C={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(C),C.id}deregister(x){for(let C=0;C<this._characterJoiners.length;C++)if(this._characterJoiners[C].id===x)return this._characterJoiners.splice(C,1),!0;return!1}getJoinedCharacters(x){if(this._characterJoiners.length===0)return[];const C=this._bufferService.buffer.lines.get(x);if(!C||C.length===0)return[];const E=[],D=C.translateToString(!0);let w=0,M=0,T=0,O=C.getFg(0),L=C.getBg(0);for(let P=0;P<C.getTrimmedLength();P++)if(C.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==O||this._workCell.bg!==L){if(P-w>1){const R=this._getJoinedRanges(D,T,M,C,w);for(let I=0;I<R.length;I++)E.push(R[I])}w=P,T=M,O=this._workCell.fg,L=this._workCell.bg}M+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-w>1){const P=this._getJoinedRanges(D,T,M,C,w);for(let R=0;R<P.length;R++)E.push(P[R])}return E}_getJoinedRanges(x,C,E,D,w){const M=x.substring(C,E);let T=[];try{T=this._characterJoiners[0].handler(M)}catch(O){console.error(O)}for(let O=1;O<this._characterJoiners.length;O++)try{const L=this._characterJoiners[O].handler(M);for(let P=0;P<L.length;P++)WE._mergeRanges(T,L[P])}catch(L){console.error(L)}return this._stringRangesToCellRanges(T,D,w),T}_stringRangesToCellRanges(x,C,E){let D=0,w=!1,M=0,T=x[D];if(T){for(let O=E;O<this._bufferService.cols;O++){const L=C.getWidth(O),P=C.getString(O).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!w&&T[0]<=M&&(T[0]=O,w=!0),T[1]<=M){if(T[1]=O,T=x[++D],!T)break;T[0]<=M?(T[0]=O,w=!0):w=!1}M+=P}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(x,C){let E=!1;for(let D=0;D<x.length;D++){const w=x[D];if(E){if(C[1]<=w[0])return x[D-1][1]=C[1],x;if(C[1]<=w[1])return x[D-1][1]=Math.max(C[1],w[1]),x.splice(D,1),x;x.splice(D,1),D--}else{if(C[1]<=w[0])return x.splice(D,0,C),x;if(C[1]<=w[1])return w[0]=Math.min(C[0],w[0]),x;C[0]<w[1]&&(w[0]=Math.min(C[0],w[0]),E=!0)}}return E?x[x.length-1][1]=C[1]:x.push(C),x}};a.CharacterJoinerService=v=c([p(0,S.IBufferService)],v)},5114:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const c=u(844),p=u(8460),f=u(3656);class g extends c.Disposable{constructor(m,v,y){super(),this._textarea=m,this._window=v,this.mainDocument=y,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new b(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(m){this._window!==m&&(this._window=m,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=g;class b extends c.Disposable{constructor(m){super(),this._parentWindow=m,this._windowResizeListener=this.register(new c.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,c.toDisposable)((()=>this.clearListener())))}setWindow(m){this._parentWindow=m,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var m;this._outerListener&&((m=this._resolutionMediaMatchList)==null||m.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const c=u(844);class p extends c.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,c.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const b=this.linkProviders.indexOf(g);b!==-1&&this.linkProviders.splice(b,1)}}}}a.LinkProviderService=p},8934:function(d,a,u){var c=this&&this.__decorate||function(S,m,v,y){var x,C=arguments.length,E=C<3?m:y===null?y=Object.getOwnPropertyDescriptor(m,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(S,m,v,y);else for(var D=S.length-1;D>=0;D--)(x=S[D])&&(E=(C<3?x(E):C>3?x(m,v,E):x(m,v))||E);return C>3&&E&&Object.defineProperty(m,v,E),E},p=this&&this.__param||function(S,m){return function(v,y){m(v,y,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const f=u(4725),g=u(9806);let b=a.MouseService=class{constructor(S,m){this._renderService=S,this._charSizeService=m}getCoords(S,m,v,y,x){return(0,g.getCoords)(window,S,m,v,y,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(S,m){const v=(0,g.getCoordsRelativeToElement)(window,S,m);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};a.MouseService=b=c([p(0,f.IRenderService),p(1,f.ICharSizeService)],b)},3230:function(d,a,u){var c=this&&this.__decorate||function(x,C,E,D){var w,M=arguments.length,T=M<3?C:D===null?D=Object.getOwnPropertyDescriptor(C,E):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,C,E,D);else for(var O=x.length-1;O>=0;O--)(w=x[O])&&(T=(M<3?w(T):M>3?w(C,E,T):w(C,E))||T);return M>3&&T&&Object.defineProperty(C,E,T),T},p=this&&this.__param||function(x,C){return function(E,D){C(E,D,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const f=u(6193),g=u(4725),b=u(8460),S=u(844),m=u(7226),v=u(2585);let y=a.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,C,E,D,w,M,T,O){super(),this._rowCount=x,this._charSizeService=D,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new m.DebouncedIdleTask,this._observerDisposable=this.register(new S.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((L,P)=>this._renderRows(L,P)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(M.onResize((()=>this._fullRefresh()))),this.register(M.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(w.onDecorationRegistered((()=>this._fullRefresh()))),this.register(w.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(M.cols,M.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(M.buffer.y,M.buffer.y,!0)))),this.register(O.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,C),this.register(T.onWindowChange((L=>this._registerIntersectionObserver(L,C))))}_registerIntersectionObserver(x,C){if("IntersectionObserver"in x){const E=new x.IntersectionObserver((D=>this._handleIntersectionChange(D[D.length-1])),{threshold:0});E.observe(C),this._observerDisposable.value=(0,S.toDisposable)((()=>E.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,C,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,C,this._rowCount))}_renderRows(x,C){this._renderer.value&&(x=Math.min(x,this._rowCount-1),C=Math.min(C,this._rowCount-1),this._renderer.value.renderRows(x,C),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:C}),this._onRender.fire({start:x,end:C}),this._isNextRenderRedrawOnly=!0)}resize(x,C){this._rowCount=C,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((C=>this.refreshRows(C.start,C.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,C;this._renderer.value&&((C=(x=this._renderer.value).clearTextureAtlas)==null||C.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,C){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(x,C)})):this._renderer.value.handleResize(x,C),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,C,E){var D;this._selectionState.start=x,this._selectionState.end=C,this._selectionState.columnSelectMode=E,(D=this._renderer.value)==null||D.handleSelectionChanged(x,C,E)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};a.RenderService=y=c([p(2,v.IOptionsService),p(3,g.ICharSizeService),p(4,v.IDecorationService),p(5,v.IBufferService),p(6,g.ICoreBrowserService),p(7,g.IThemeService)],y)},9312:function(d,a,u){var c=this&&this.__decorate||function(T,O,L,P){var R,I=arguments.length,$=I<3?O:P===null?P=Object.getOwnPropertyDescriptor(O,L):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(T,O,L,P);else for(var V=T.length-1;V>=0;V--)(R=T[V])&&($=(I<3?R($):I>3?R(O,L,$):R(O,L))||$);return I>3&&$&&Object.defineProperty(O,L,$),$},p=this&&this.__param||function(T,O){return function(L,P){O(L,P,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const f=u(9806),g=u(9504),b=u(456),S=u(4725),m=u(8460),v=u(844),y=u(6114),x=u(4841),C=u(511),E=u(2585),D=" ",w=new RegExp(D,"g");let M=a.SelectionService=class extends v.Disposable{constructor(T,O,L,P,R,I,$,V,U){super(),this._element=T,this._screenElement=O,this._linkifier=L,this._bufferService=P,this._coreService=R,this._mouseService=I,this._optionsService=$,this._renderService=V,this._coreBrowserService=U,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new C.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new m.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new m.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new m.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=K=>this._handleMouseMove(K),this._mouseUpListener=K=>this._handleMouseUp(K),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((K=>this._handleTrim(K))),this.register(this._bufferService.buffers.onBufferActivate((K=>this._handleBufferActivate(K)))),this.enable(),this._model=new b.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const T=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!(!T||!O||T[0]===O[0]&&T[1]===O[1])}get selectionText(){const T=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;if(!T||!O)return"";const L=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(T[0]===O[0])return"";const R=T[0]<O[0]?T[0]:O[0],I=T[0]<O[0]?O[0]:T[0];for(let $=T[1];$<=O[1];$++){const V=L.translateBufferLineToString($,!0,R,I);P.push(V)}}else{const R=T[1]===O[1]?O[0]:void 0;P.push(L.translateBufferLineToString(T[1],!0,T[0],R));for(let I=T[1]+1;I<=O[1]-1;I++){const $=L.lines.get(I),V=L.translateBufferLineToString(I,!0);$!=null&&$.isWrapped?P[P.length-1]+=V:P.push(V)}if(T[1]!==O[1]){const I=L.lines.get(O[1]),$=L.translateBufferLineToString(O[1],!0,0,O[0]);I&&I.isWrapped?P[P.length-1]+=$:P.push($)}}return P.map((R=>R.replace(w," "))).join(y.isWindows?`\r
|
|
56
|
+
`:`
|
|
57
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),y.isLinux&&T&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(T){const O=this._getMouseBufferCoords(T),L=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(L&&P&&O)&&this._areCoordsInSelection(O,L,P)}isCellInSelection(T,O){const L=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!L||!P)&&this._areCoordsInSelection([T,O],L,P)}_areCoordsInSelection(T,O,L){return T[1]>O[1]&&T[1]<L[1]||O[1]===L[1]&&T[1]===O[1]&&T[0]>=O[0]&&T[0]<L[0]||O[1]<L[1]&&T[1]===L[1]&&T[0]<L[0]||O[1]<L[1]&&T[1]===O[1]&&T[0]>=O[0]}_selectWordAtCursor(T,O){var R,I;const L=(I=(R=this._linkifier.currentLink)==null?void 0:R.link)==null?void 0:I.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(T);return!!P&&(this._selectWordAt(P,O),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,O){this._model.clearSelection(),T=Math.max(T,0),O=Math.min(O,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,O],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const O=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(O)return O[0]--,O[1]--,O[1]+=this._bufferService.buffer.ydisp,O}_getMouseEventScrollAmount(T){let O=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return O>=0&&O<=L?0:(O>L&&(O-=L),O=Math.min(Math.max(O,-50),50),O/=50,O/Math.abs(O)+Math.round(14*O))}shouldForceSelection(T){return y.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const O=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);O&&O.length!==this._model.selectionStart[0]&&O.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const O=this._getMouseBufferCoords(T);O&&(this._activeSelectionMode=2,this._selectLineAt(O[1]))}shouldColumnSelect(T){return T.altKey&&!(y.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const O=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(T),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const P=L.lines.get(this._model.selectionEnd[1]);P&&P.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}O&&O[0]===this._model.selectionEnd[0]&&O[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const T=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const O=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&O<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const P=(0,g.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,O=this._model.finalSelectionEnd,L=!(!T||!O||T[0]===O[0]&&T[1]===O[1]);L?T&&O&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&O[0]===this._oldSelectionEnd[0]&&O[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,O,L)):this._oldHasSelection&&this._fireOnSelectionChange(T,O,L)}_fireOnSelectionChange(T,O,L){this._oldSelectionStart=T,this._oldSelectionEnd=O,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((O=>this._handleTrim(O)))}_convertViewportColToCharacterIndex(T,O){let L=O;for(let P=0;O>=P;P++){const R=T.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:R>1&&O!==P&&(L+=R-1)}return L}setSelection(T,O,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,O],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,O,L=!0,P=!0){if(T[0]>=this._bufferService.cols)return;const R=this._bufferService.buffer,I=R.lines.get(T[1]);if(!I)return;const $=R.translateBufferLineToString(T[1],!1);let V=this._convertViewportColToCharacterIndex(I,T[0]),U=V;const K=T[0]-V;let G=0,N=0,H=0,z=0;if($.charAt(V)===" "){for(;V>0&&$.charAt(V-1)===" ";)V--;for(;U<$.length&&$.charAt(U+1)===" ";)U++}else{let ie=T[0],pe=T[0];I.getWidth(ie)===0&&(G++,ie--),I.getWidth(pe)===2&&(N++,pe++);const he=I.getString(pe).length;for(he>1&&(z+=he-1,U+=he-1);ie>0&&V>0&&!this._isCharWordSeparator(I.loadCell(ie-1,this._workCell));){I.loadCell(ie-1,this._workCell);const Z=this._workCell.getChars().length;this._workCell.getWidth()===0?(G++,ie--):Z>1&&(H+=Z-1,V-=Z-1),V--,ie--}for(;pe<I.length&&U+1<$.length&&!this._isCharWordSeparator(I.loadCell(pe+1,this._workCell));){I.loadCell(pe+1,this._workCell);const Z=this._workCell.getChars().length;this._workCell.getWidth()===2?(N++,pe++):Z>1&&(z+=Z-1,U+=Z-1),U++,pe++}}U++;let q=V+K-G+H,J=Math.min(this._bufferService.cols,U-V+G+N-H-z);if(O||$.slice(V,U).trim()!==""){if(L&&q===0&&I.getCodePoint(0)!==32){const ie=R.lines.get(T[1]-1);if(ie&&I.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const pe=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(pe){const he=this._bufferService.cols-pe.start;q-=he,J+=he}}}if(P&&q+J===this._bufferService.cols&&I.getCodePoint(this._bufferService.cols-1)!==32){const ie=R.lines.get(T[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const pe=this._getWordAt([0,T[1]+1],!1,!1,!0);pe&&(J+=pe.length)}}return{start:q,length:J}}}_selectWordAt(T,O){const L=this._getWordAt(T,O);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[L.start,T[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(T){const O=this._getWordAt(T,!0);if(O){let L=T[1];for(;O.start<0;)O.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;O.start+O.length>this._bufferService.cols;)O.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?O.start:O.start+O.length,L]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const O=this._bufferService.buffer.getWrappedRangeForLine(T),L={start:{x:0,y:O.first},end:{x:this._bufferService.cols-1,y:O.last}};this._model.selectionStart=[0,O.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)(L,this._bufferService.cols)}};a.SelectionService=M=c([p(3,E.IBufferService),p(4,E.ICoreService),p(5,S.IMouseService),p(6,E.IOptionsService),p(7,S.IRenderService),p(8,S.ICoreBrowserService)],M)},4725:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const c=u(8343);a.ICharSizeService=(0,c.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),a.IMouseService=(0,c.createDecorator)("MouseService"),a.IRenderService=(0,c.createDecorator)("RenderService"),a.ISelectionService=(0,c.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,c.createDecorator)("ThemeService"),a.ILinkProviderService=(0,c.createDecorator)("LinkProviderService")},6731:function(d,a,u){var c=this&&this.__decorate||function(M,T,O,L){var P,R=arguments.length,I=R<3?T:L===null?L=Object.getOwnPropertyDescriptor(T,O):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(M,T,O,L);else for(var $=M.length-1;$>=0;$--)(P=M[$])&&(I=(R<3?P(I):R>3?P(T,O,I):P(T,O))||I);return R>3&&I&&Object.defineProperty(T,O,I),I},p=this&&this.__param||function(M,T){return function(O,L){T(O,L,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const f=u(7239),g=u(8055),b=u(8460),S=u(844),m=u(2585),v=g.css.toColor("#ffffff"),y=g.css.toColor("#000000"),x=g.css.toColor("#ffffff"),C=g.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const M=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let O=0;O<216;O++){const L=T[O/36%6|0],P=T[O/6%6|0],R=T[O%6];M.push({css:g.channels.toCss(L,P,R),rgba:g.channels.toRgba(L,P,R)})}for(let O=0;O<24;O++){const L=8+10*O;M.push({css:g.channels.toCss(L,L,L),rgba:g.channels.toRgba(L,L,L)})}return M})());let D=a.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(M){super(),this._optionsService=M,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:y,cursor:x,cursorAccent:C,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:g.color.blend(y,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:g.color.blend(y,E),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(M={}){const T=this._colors;if(T.foreground=w(M.foreground,v),T.background=w(M.background,y),T.cursor=w(M.cursor,x),T.cursorAccent=w(M.cursorAccent,C),T.selectionBackgroundTransparent=w(M.selectionBackground,E),T.selectionBackgroundOpaque=g.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=w(M.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=g.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=M.selectionForeground?w(M.selectionForeground,g.NULL_COLOR):void 0,T.selectionForeground===g.NULL_COLOR&&(T.selectionForeground=void 0),g.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=g.color.opacity(T.selectionBackgroundTransparent,.3)),g.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=g.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=a.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=w(M.black,a.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=w(M.red,a.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=w(M.green,a.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=w(M.yellow,a.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=w(M.blue,a.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=w(M.magenta,a.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=w(M.cyan,a.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=w(M.white,a.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=w(M.brightBlack,a.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=w(M.brightRed,a.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=w(M.brightGreen,a.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=w(M.brightYellow,a.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=w(M.brightBlue,a.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=w(M.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=w(M.brightCyan,a.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=w(M.brightWhite,a.DEFAULT_ANSI_COLORS[15]),M.extendedAnsi){const O=Math.min(T.ansi.length-16,M.extendedAnsi.length);for(let L=0;L<O;L++)T.ansi[L+16]=w(M.extendedAnsi[L],a.DEFAULT_ANSI_COLORS[L+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(M){this._restoreColor(M),this._onChangeColors.fire(this.colors)}_restoreColor(M){if(M!==void 0)switch(M){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[M]=this._restoreColors.ansi[M]}else for(let T=0;T<this._restoreColors.ansi.length;++T)this._colors.ansi[T]=this._restoreColors.ansi[T]}modifyColors(M){M(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function w(M,T){if(M!==void 0)try{return g.css.toColor(M)}catch{}return T}a.ThemeService=D=c([p(0,m.IOptionsService)],D)},6349:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const c=u(8460),p=u(844);class f extends p.Disposable{constructor(b){super(),this._maxLength=b,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(b){if(this._maxLength===b)return;const S=new Array(b);for(let m=0;m<Math.min(b,this.length);m++)S[m]=this._array[this._getCyclicIndex(m)];this._array=S,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let S=this._length;S<b;S++)this._array[S]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,S){this._array[this._getCyclicIndex(b)]=S}push(b){this._array[this._getCyclicIndex(this._length)]=b,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(b,S,...m){if(S){for(let v=b;v<this._length-S;v++)this._array[this._getCyclicIndex(v)]=this._array[this._getCyclicIndex(v+S)];this._length-=S,this.onDeleteEmitter.fire({index:b,amount:S})}for(let v=this._length-1;v>=b;v--)this._array[this._getCyclicIndex(v+m.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;v<m.length;v++)this._array[this._getCyclicIndex(b+v)]=m[v];if(m.length&&this.onInsertEmitter.fire({index:b,amount:m.length}),this._length+m.length>this._maxLength){const v=this._length+m.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=m.length}trimStart(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,S,m){if(!(S<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+m<0)throw new Error("Cannot shift elements in list beyond index 0");if(m>0){for(let y=S-1;y>=0;y--)this.set(b+y+m,this.get(b+y));const v=b+S+m-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v<S;v++)this.set(b+v+m,this.get(b+v))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}a.CircularList=f},1439:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(c,p=5){if(typeof c!="object")return c;const f=Array.isArray(c)?[]:{};for(const g in c)f[g]=p<=1?c[g]:c[g]&&u(c[g],p-1);return f}},8055:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,c=0,p=0,f=0;var g,b,S,m,v;function y(C){const E=C.toString(16);return E.length<2?"0"+E:E}function x(C,E){return C<E?(E+.05)/(C+.05):(C+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(C){C.toCss=function(E,D,w,M){return M!==void 0?`#${y(E)}${y(D)}${y(w)}${y(M)}`:`#${y(E)}${y(D)}${y(w)}`},C.toRgba=function(E,D,w,M=255){return(E<<24|D<<16|w<<8|M)>>>0},C.toColor=function(E,D,w,M){return{css:C.toCss(E,D,w,M),rgba:C.toRgba(E,D,w,M)}}})(g||(a.channels=g={})),(function(C){function E(D,w){return f=Math.round(255*w),[u,c,p]=v.toChannels(D.rgba),{css:g.toCss(u,c,p,f),rgba:g.toRgba(u,c,p,f)}}C.blend=function(D,w){if(f=(255&w.rgba)/255,f===1)return{css:w.css,rgba:w.rgba};const M=w.rgba>>24&255,T=w.rgba>>16&255,O=w.rgba>>8&255,L=D.rgba>>24&255,P=D.rgba>>16&255,R=D.rgba>>8&255;return u=L+Math.round((M-L)*f),c=P+Math.round((T-P)*f),p=R+Math.round((O-R)*f),{css:g.toCss(u,c,p),rgba:g.toRgba(u,c,p)}},C.isOpaque=function(D){return(255&D.rgba)==255},C.ensureContrastRatio=function(D,w,M){const T=v.ensureContrastRatio(D.rgba,w.rgba,M);if(T)return g.toColor(T>>24&255,T>>16&255,T>>8&255)},C.opaque=function(D){const w=(255|D.rgba)>>>0;return[u,c,p]=v.toChannels(w),{css:g.toCss(u,c,p),rgba:w}},C.opacity=E,C.multiplyOpacity=function(D,w){return f=255&D.rgba,E(D,f*w/255)},C.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(b||(a.color=b={})),(function(C){let E,D;try{const w=document.createElement("canvas");w.width=1,w.height=1;const M=w.getContext("2d",{willReadFrequently:!0});M&&(E=M,E.globalCompositeOperation="copy",D=E.createLinearGradient(0,0,1,1))}catch{}C.toColor=function(w){if(w.match(/#[\da-f]{3,8}/i))switch(w.length){case 4:return u=parseInt(w.slice(1,2).repeat(2),16),c=parseInt(w.slice(2,3).repeat(2),16),p=parseInt(w.slice(3,4).repeat(2),16),g.toColor(u,c,p);case 5:return u=parseInt(w.slice(1,2).repeat(2),16),c=parseInt(w.slice(2,3).repeat(2),16),p=parseInt(w.slice(3,4).repeat(2),16),f=parseInt(w.slice(4,5).repeat(2),16),g.toColor(u,c,p,f);case 7:return{css:w,rgba:(parseInt(w.slice(1),16)<<8|255)>>>0};case 9:return{css:w,rgba:parseInt(w.slice(1),16)>>>0}}const M=w.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(M)return u=parseInt(M[1]),c=parseInt(M[2]),p=parseInt(M[3]),f=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),g.toColor(u,c,p,f);if(!E||!D)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=D,E.fillStyle=w,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,c,p,f]=E.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,c,p,f),css:w}}})(S||(a.css=S={})),(function(C){function E(D,w,M){const T=D/255,O=w/255,L=M/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}C.relativeLuminance=function(D){return E(D>>16&255,D>>8&255,255&D)},C.relativeLuminance2=E})(m||(a.rgb=m={})),(function(C){function E(w,M,T){const O=w>>24&255,L=w>>16&255,P=w>>8&255;let R=M>>24&255,I=M>>16&255,$=M>>8&255,V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));for(;V<T&&(R>0||I>0||$>0);)R-=Math.max(0,Math.ceil(.1*R)),I-=Math.max(0,Math.ceil(.1*I)),$-=Math.max(0,Math.ceil(.1*$)),V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));return(R<<24|I<<16|$<<8|255)>>>0}function D(w,M,T){const O=w>>24&255,L=w>>16&255,P=w>>8&255;let R=M>>24&255,I=M>>16&255,$=M>>8&255,V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));for(;V<T&&(R<255||I<255||$<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),I=Math.min(255,I+Math.ceil(.1*(255-I))),$=Math.min(255,$+Math.ceil(.1*(255-$))),V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));return(R<<24|I<<16|$<<8|255)>>>0}C.blend=function(w,M){if(f=(255&M)/255,f===1)return M;const T=M>>24&255,O=M>>16&255,L=M>>8&255,P=w>>24&255,R=w>>16&255,I=w>>8&255;return u=P+Math.round((T-P)*f),c=R+Math.round((O-R)*f),p=I+Math.round((L-I)*f),g.toRgba(u,c,p)},C.ensureContrastRatio=function(w,M,T){const O=m.relativeLuminance(w>>8),L=m.relativeLuminance(M>>8);if(x(O,L)<T){if(L<O){const I=E(w,M,T),$=x(O,m.relativeLuminance(I>>8));if($<T){const V=D(w,M,T);return $>x(O,m.relativeLuminance(V>>8))?I:V}return I}const P=D(w,M,T),R=x(O,m.relativeLuminance(P>>8));if(R<T){const I=E(w,M,T);return R>x(O,m.relativeLuminance(I>>8))?P:I}return P}},C.reduceLuminance=E,C.increaseLuminance=D,C.toChannels=function(w){return[w>>24&255,w>>16&255,w>>8&255,255&w]}})(v||(a.rgba=v={})),a.toPaddedHex=y,a.contrastRatio=x},8969:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const c=u(844),p=u(2585),f=u(4348),g=u(7866),b=u(744),S=u(7302),m=u(6975),v=u(8460),y=u(1753),x=u(1480),C=u(7994),E=u(9282),D=u(5435),w=u(5981),M=u(2660);let T=!1;class O extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((P=>{var R;(R=this._onScrollApi)==null||R.fire(P.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(P){for(const R in P)this.optionsService.options[R]=P[R]}constructor(P){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new S.OptionsService(P)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(m.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(y.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(C.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(M.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new D.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((R=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((R=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new w.WriteBuffer(((R,I)=>this._inputHandler.parse(R,I)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,R){this._writeBuffer.write(P,R)}writeSync(P,R){this._logService.logLevel<=p.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(P,R)}input(P,R=!0){this.coreService.triggerDataEvent(P,R)}resize(P,R){isNaN(P)||isNaN(R)||(P=Math.max(P,b.MINIMUM_COLS),R=Math.max(R,b.MINIMUM_ROWS),this._bufferService.resize(P,R))}scroll(P,R=!1){this._bufferService.scroll(P,R)}scrollLines(P,R,I){this._bufferService.scrollLines(P,R,I)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const R=P-this._bufferService.buffer.ydisp;R!==0&&this.scrollLines(R)}registerEscHandler(P,R){return this._inputHandler.registerEscHandler(P,R)}registerDcsHandler(P,R){return this._inputHandler.registerDcsHandler(P,R)}registerCsiHandler(P,R){return this._inputHandler.registerCsiHandler(P,R)}registerOscHandler(P,R){return this._inputHandler.registerOscHandler(P,R)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const R=this.optionsService.rawOptions.windowsPty;R&&R.buildNumber!==void 0&&R.buildNumber!==void 0?P=R.backend==="conpty"&&R.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)((()=>{for(const R of P)R.dispose()}))}}}a.CoreTerminal=O},8460:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===u)return void this._listeners.splice(c,1)}}})),this._event}fire(u,c){const p=[];for(let f=0;f<this._listeners.length;f++)p.push(this._listeners[f]);for(let f=0;f<p.length;f++)p[f].call(void 0,u,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,c){return u((p=>c.fire(p)))},a.runAndSubscribe=function(u,c){return c(void 0),u((p=>c(p)))}},5435:function(d,a,u){var c=this&&this.__decorate||function(G,N,H,z){var q,J=arguments.length,ie=J<3?N:z===null?z=Object.getOwnPropertyDescriptor(N,H):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(G,N,H,z);else for(var pe=G.length-1;pe>=0;pe--)(q=G[pe])&&(ie=(J<3?q(ie):J>3?q(N,H,ie):q(N,H))||ie);return J>3&&ie&&Object.defineProperty(N,H,ie),ie},p=this&&this.__param||function(G,N){return function(H,z){N(H,z,G)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const f=u(2584),g=u(7116),b=u(2015),S=u(844),m=u(482),v=u(8437),y=u(8460),x=u(643),C=u(511),E=u(3734),D=u(2585),w=u(1480),M=u(6242),T=u(6351),O=u(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},P=131072;function R(G,N){if(G>24)return N.setWinLines||!1;switch(G){case 1:return!!N.restoreWin;case 2:return!!N.minimizeWin;case 3:return!!N.setWinPosition;case 4:return!!N.setWinSizePixels;case 5:return!!N.raiseWin;case 6:return!!N.lowerWin;case 7:return!!N.refreshWin;case 8:return!!N.setWinSizeChars;case 9:return!!N.maximizeWin;case 10:return!!N.fullscreenWin;case 11:return!!N.getWinState;case 13:return!!N.getWinPosition;case 14:return!!N.getWinSizePixels;case 15:return!!N.getScreenSizePixels;case 16:return!!N.getCellSizePixels;case 18:return!!N.getWinSizeChars;case 19:return!!N.getScreenSizeChars;case 20:return!!N.getIconTitle;case 21:return!!N.getWinTitle;case 22:return!!N.pushTitle;case 23:return!!N.popTitle;case 24:return!!N.setWinLines}return!1}var I;(function(G){G[G.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",G[G.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(I||(a.WindowsOptionsReportType=I={}));let $=0;class V extends S.Disposable{getAttrData(){return this._curAttrData}constructor(N,H,z,q,J,ie,pe,he,Z=new b.EscapeSequenceParser){super(),this._bufferService=N,this._charsetService=H,this._coreService=z,this._logService=q,this._optionsService=J,this._oscLinkService=ie,this._coreMouseService=pe,this._unicodeService=he,this._parser=Z,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new m.StringToUtf32,this._utf8Decoder=new m.Utf8ToUtf32,this._workCell=new C.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new y.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new y.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new y.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new y.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new y.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new y.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new y.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new y.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new y.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new y.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new y.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new y.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new y.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new U(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((W=>this._activeBuffer=W.activeBuffer))),this._parser.setCsiHandlerFallback(((W,te)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(W),params:te.toArray()})})),this._parser.setEscHandlerFallback((W=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(W)})})),this._parser.setExecuteHandlerFallback((W=>{this._logService.debug("Unknown EXECUTE code: ",{code:W})})),this._parser.setOscHandlerFallback(((W,te,Q)=>{this._logService.debug("Unknown OSC code: ",{identifier:W,action:te,data:Q})})),this._parser.setDcsHandlerFallback(((W,te,Q)=>{te==="HOOK"&&(Q=Q.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(W),action:te,payload:Q})})),this._parser.setPrintHandler(((W,te,Q)=>this.print(W,te,Q))),this._parser.registerCsiHandler({final:"@"},(W=>this.insertChars(W))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(W=>this.scrollLeft(W))),this._parser.registerCsiHandler({final:"A"},(W=>this.cursorUp(W))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(W=>this.scrollRight(W))),this._parser.registerCsiHandler({final:"B"},(W=>this.cursorDown(W))),this._parser.registerCsiHandler({final:"C"},(W=>this.cursorForward(W))),this._parser.registerCsiHandler({final:"D"},(W=>this.cursorBackward(W))),this._parser.registerCsiHandler({final:"E"},(W=>this.cursorNextLine(W))),this._parser.registerCsiHandler({final:"F"},(W=>this.cursorPrecedingLine(W))),this._parser.registerCsiHandler({final:"G"},(W=>this.cursorCharAbsolute(W))),this._parser.registerCsiHandler({final:"H"},(W=>this.cursorPosition(W))),this._parser.registerCsiHandler({final:"I"},(W=>this.cursorForwardTab(W))),this._parser.registerCsiHandler({final:"J"},(W=>this.eraseInDisplay(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(W=>this.eraseInDisplay(W,!0))),this._parser.registerCsiHandler({final:"K"},(W=>this.eraseInLine(W,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(W=>this.eraseInLine(W,!0))),this._parser.registerCsiHandler({final:"L"},(W=>this.insertLines(W))),this._parser.registerCsiHandler({final:"M"},(W=>this.deleteLines(W))),this._parser.registerCsiHandler({final:"P"},(W=>this.deleteChars(W))),this._parser.registerCsiHandler({final:"S"},(W=>this.scrollUp(W))),this._parser.registerCsiHandler({final:"T"},(W=>this.scrollDown(W))),this._parser.registerCsiHandler({final:"X"},(W=>this.eraseChars(W))),this._parser.registerCsiHandler({final:"Z"},(W=>this.cursorBackwardTab(W))),this._parser.registerCsiHandler({final:"`"},(W=>this.charPosAbsolute(W))),this._parser.registerCsiHandler({final:"a"},(W=>this.hPositionRelative(W))),this._parser.registerCsiHandler({final:"b"},(W=>this.repeatPrecedingCharacter(W))),this._parser.registerCsiHandler({final:"c"},(W=>this.sendDeviceAttributesPrimary(W))),this._parser.registerCsiHandler({prefix:">",final:"c"},(W=>this.sendDeviceAttributesSecondary(W))),this._parser.registerCsiHandler({final:"d"},(W=>this.linePosAbsolute(W))),this._parser.registerCsiHandler({final:"e"},(W=>this.vPositionRelative(W))),this._parser.registerCsiHandler({final:"f"},(W=>this.hVPosition(W))),this._parser.registerCsiHandler({final:"g"},(W=>this.tabClear(W))),this._parser.registerCsiHandler({final:"h"},(W=>this.setMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(W=>this.setModePrivate(W))),this._parser.registerCsiHandler({final:"l"},(W=>this.resetMode(W))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(W=>this.resetModePrivate(W))),this._parser.registerCsiHandler({final:"m"},(W=>this.charAttributes(W))),this._parser.registerCsiHandler({final:"n"},(W=>this.deviceStatus(W))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(W=>this.deviceStatusPrivate(W))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(W=>this.softReset(W))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(W=>this.setCursorStyle(W))),this._parser.registerCsiHandler({final:"r"},(W=>this.setScrollRegion(W))),this._parser.registerCsiHandler({final:"s"},(W=>this.saveCursor(W))),this._parser.registerCsiHandler({final:"t"},(W=>this.windowOptions(W))),this._parser.registerCsiHandler({final:"u"},(W=>this.restoreCursor(W))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(W=>this.insertColumns(W))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(W=>this.deleteColumns(W))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(W=>this.selectProtected(W))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(W=>this.requestMode(W,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(W=>this.requestMode(W,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new M.OscHandler((W=>(this.setTitle(W),this.setIconName(W),!0)))),this._parser.registerOscHandler(1,new M.OscHandler((W=>this.setIconName(W)))),this._parser.registerOscHandler(2,new M.OscHandler((W=>this.setTitle(W)))),this._parser.registerOscHandler(4,new M.OscHandler((W=>this.setOrReportIndexedColor(W)))),this._parser.registerOscHandler(8,new M.OscHandler((W=>this.setHyperlink(W)))),this._parser.registerOscHandler(10,new M.OscHandler((W=>this.setOrReportFgColor(W)))),this._parser.registerOscHandler(11,new M.OscHandler((W=>this.setOrReportBgColor(W)))),this._parser.registerOscHandler(12,new M.OscHandler((W=>this.setOrReportCursorColor(W)))),this._parser.registerOscHandler(104,new M.OscHandler((W=>this.restoreIndexedColor(W)))),this._parser.registerOscHandler(110,new M.OscHandler((W=>this.restoreFgColor(W)))),this._parser.registerOscHandler(111,new M.OscHandler((W=>this.restoreBgColor(W)))),this._parser.registerOscHandler(112,new M.OscHandler((W=>this.restoreCursorColor(W)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const W in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:W},(()=>this.selectCharset("("+W))),this._parser.registerEscHandler({intermediates:")",final:W},(()=>this.selectCharset(")"+W))),this._parser.registerEscHandler({intermediates:"*",final:W},(()=>this.selectCharset("*"+W))),this._parser.registerEscHandler({intermediates:"+",final:W},(()=>this.selectCharset("+"+W))),this._parser.registerEscHandler({intermediates:"-",final:W},(()=>this.selectCharset("-"+W))),this._parser.registerEscHandler({intermediates:".",final:W},(()=>this.selectCharset("."+W))),this._parser.registerEscHandler({intermediates:"/",final:W},(()=>this.selectCharset("/"+W)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((W=>(this._logService.error("Parsing error: ",W),W))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((W,te)=>this.requestStatusString(W,te))))}_preserveStack(N,H,z,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=N,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=z,this._parseStack.position=q}_logSlowResolvingAsync(N){this._logService.logLevel<=D.LogLevelEnum.WARN&&Promise.race([N,new Promise(((H,z)=>setTimeout((()=>z("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(N,H){let z,q=this._activeBuffer.x,J=this._activeBuffer.y,ie=0;const pe=this._parseStack.paused;if(pe){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(z),z;q=this._parseStack.cursorStartX,J=this._parseStack.cursorStartY,this._parseStack.paused=!1,N.length>P&&(ie=this._parseStack.position+P)}if(this._logService.logLevel<=D.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof N=="string"?` "${N}"`:` "${Array.prototype.map.call(N,(W=>String.fromCharCode(W))).join("")}"`),typeof N=="string"?N.split("").map((W=>W.charCodeAt(0))):N),this._parseBuffer.length<N.length&&this._parseBuffer.length<P&&(this._parseBuffer=new Uint32Array(Math.min(N.length,P))),pe||this._dirtyRowTracker.clearRange(),N.length>P)for(let W=ie;W<N.length;W+=P){const te=W+P<N.length?W+P:N.length,Q=typeof N=="string"?this._stringDecoder.decode(N.substring(W,te),this._parseBuffer):this._utf8Decoder.decode(N.subarray(W,te),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,Q))return this._preserveStack(q,J,Q,W),this._logSlowResolvingAsync(z),z}else if(!pe){const W=typeof N=="string"?this._stringDecoder.decode(N,this._parseBuffer):this._utf8Decoder.decode(N,this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,W))return this._preserveStack(q,J,W,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===q&&this._activeBuffer.y===J||this._onCursorMove.fire();const he=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Z=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Z<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Z,this._bufferService.rows-1),Math.min(he,this._bufferService.rows-1))}print(N,H,z){let q,J;const ie=this._charsetService.charset,pe=this._optionsService.rawOptions.screenReaderMode,he=this._bufferService.cols,Z=this._coreService.decPrivateModes.wraparound,W=this._coreService.modes.insertMode,te=this._curAttrData;let Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-H>0&&Q.getWidth(this._activeBuffer.x-1)===2&&Q.setCellFromCodepoint(this._activeBuffer.x-1,0,1,te);let se=this._parser.precedingJoinState;for(let re=H;re<z;++re){if(q=N[re],q<127&&ie){const Le=ie[String.fromCharCode(q)];Le&&(q=Le.charCodeAt(0))}const be=this._unicodeService.charProperties(q,se);J=w.UnicodeService.extractWidth(be);const ve=w.UnicodeService.extractShouldJoin(be),Se=ve?w.UnicodeService.extractWidth(se):0;if(se=be,pe&&this._onA11yChar.fire((0,m.stringFromCodePoint)(q)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+J-Se>he){if(Z){const Le=Q;let xe=this._activeBuffer.x-Se;for(this._activeBuffer.x=Se,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Se>0&&Q instanceof v.BufferLine&&Q.copyCellsFrom(Le,xe,0,Se,!1);xe<he;)Le.setCellFromCodepoint(xe++,0,1,te)}else if(this._activeBuffer.x=he-1,J===2)continue}if(ve&&this._activeBuffer.x){const Le=Q.getWidth(this._activeBuffer.x-1)?1:2;Q.addCodepointToCell(this._activeBuffer.x-Le,q,J);for(let xe=J-Se;--xe>=0;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}else if(W&&(Q.insertCells(this._activeBuffer.x,J-Se,this._activeBuffer.getNullCell(te)),Q.getWidth(he-1)===2&&Q.setCellFromCodepoint(he-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,te)),Q.setCellFromCodepoint(this._activeBuffer.x++,q,J,te),J>0)for(;--J;)Q.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}this._parser.precedingJoinState=se,this._activeBuffer.x<he&&z-H>0&&Q.getWidth(this._activeBuffer.x)===0&&!Q.hasContent(this._activeBuffer.x)&&Q.setCellFromCodepoint(this._activeBuffer.x,0,1,te),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(N,H){return N.final!=="t"||N.prefix||N.intermediates?this._parser.registerCsiHandler(N,H):this._parser.registerCsiHandler(N,(z=>!R(z.params[0],this._optionsService.rawOptions.windowOptions)||H(z)))}registerDcsHandler(N,H){return this._parser.registerDcsHandler(N,new T.DcsHandler(H))}registerEscHandler(N,H){return this._parser.registerEscHandler(N,H)}registerOscHandler(N,H){return this._parser.registerOscHandler(N,new M.OscHandler(H))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var N;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((N=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&N.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const N=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-N),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(N=this._bufferService.cols-1){this._activeBuffer.x=Math.min(N,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(N,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=N,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=N,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(N,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+N,this._activeBuffer.y+H)}cursorUp(N){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,N.params[0]||1)):this._moveCursor(0,-(N.params[0]||1)),!0}cursorDown(N){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,N.params[0]||1)):this._moveCursor(0,N.params[0]||1),!0}cursorForward(N){return this._moveCursor(N.params[0]||1,0),!0}cursorBackward(N){return this._moveCursor(-(N.params[0]||1),0),!0}cursorNextLine(N){return this.cursorDown(N),this._activeBuffer.x=0,!0}cursorPrecedingLine(N){return this.cursorUp(N),this._activeBuffer.x=0,!0}cursorCharAbsolute(N){return this._setCursor((N.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(N){return this._setCursor(N.length>=2?(N.params[1]||1)-1:0,(N.params[0]||1)-1),!0}charPosAbsolute(N){return this._setCursor((N.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(N){return this._moveCursor(N.params[0]||1,0),!0}linePosAbsolute(N){return this._setCursor(this._activeBuffer.x,(N.params[0]||1)-1),!0}vPositionRelative(N){return this._moveCursor(0,N.params[0]||1),!0}hVPosition(N){return this.cursorPosition(N),!0}tabClear(N){const H=N.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(N){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=N.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(N){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=N.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(N){const H=N.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(N,H,z,q=!1,J=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);ie.replaceCells(H,z,this._activeBuffer.getNullCell(this._eraseAttrData()),J),q&&(ie.isWrapped=!1)}_resetBufferLine(N,H=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+N),z.isWrapped=!1)}eraseInDisplay(N,H=!1){let z;switch(this._restrictCursor(this._bufferService.cols),N.params[0]){case 0:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);z<this._bufferService.rows;z++)this._resetBufferLine(z,H);this._dirtyRowTracker.markDirty(z);break;case 1:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,H);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine(N,H=!1){switch(this._restrictCursor(this._bufferService.cols),N.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(N){this._restrictCursor();let H=N.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y,q=this._bufferService.rows-1-this._activeBuffer.scrollBottom,J=this._bufferService.rows-1+this._activeBuffer.ybase-q+1;for(;H--;)this._activeBuffer.lines.splice(J-1,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(N){this._restrictCursor();let H=N.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y;let q;for(q=this._bufferService.rows-1-this._activeBuffer.scrollBottom,q=this._bufferService.rows-1+this._activeBuffer.ybase-q;H--;)this._activeBuffer.lines.splice(z,1),this._activeBuffer.lines.splice(q,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(N){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,N.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(N){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,N.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(N){let H=N.params[0]||1;for(;H--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(N){let H=N.params[0]||1;for(;H--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(v.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(N){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=N.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);q.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),q.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(N){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=N.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);q.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),q.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(N){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=N.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);q.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),q.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(N){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=N.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);q.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),q.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(N){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(N.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(N){const H=this._parser.precedingJoinState;if(!H)return!0;const z=N.params[0]||1,q=w.UnicodeService.extractWidth(H),J=this._activeBuffer.x-q,ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(J),pe=new Uint32Array(ie.length*z);let he=0;for(let W=0;W<ie.length;){const te=ie.codePointAt(W)||0;pe[he++]=te,W+=te>65535?2:1}let Z=he;for(let W=1;W<z;++W)pe.copyWithin(Z,0,he),Z+=he;return this.print(pe,0,Z),!0}sendDeviceAttributesPrimary(N){return N.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(N){return N.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(N.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(N){return(this._optionsService.rawOptions.termName+"").indexOf(N)===0}setMode(N){for(let H=0;H<N.length;H++)switch(N.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(N){for(let H=0;H<N.length;H++)switch(N.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(N){for(let H=0;H<N.length;H++)switch(N.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(N){for(let H=0;H<N.length;H++)switch(N.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),N.params[H]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(N,H){const z=this._coreService.decPrivateModes,{activeProtocol:q,activeEncoding:J}=this._coreMouseService,ie=this._coreService,{buffers:pe,cols:he}=this._bufferService,{active:Z,alt:W}=pe,te=this._optionsService.rawOptions,Q=ve=>ve?1:2,se=N.params[0];return re=se,be=H?se===2?4:se===4?Q(ie.modes.insertMode):se===12?3:se===20?Q(te.convertEol):0:se===1?Q(z.applicationCursorKeys):se===3?te.windowOptions.setWinLines?he===80?2:he===132?1:0:0:se===6?Q(z.origin):se===7?Q(z.wraparound):se===8?3:se===9?Q(q==="X10"):se===12?Q(te.cursorBlink):se===25?Q(!ie.isCursorHidden):se===45?Q(z.reverseWraparound):se===66?Q(z.applicationKeypad):se===67?4:se===1e3?Q(q==="VT200"):se===1002?Q(q==="DRAG"):se===1003?Q(q==="ANY"):se===1004?Q(z.sendFocus):se===1005?4:se===1006?Q(J==="SGR"):se===1015?4:se===1016?Q(J==="SGR_PIXELS"):se===1048?1:se===47||se===1047||se===1049?Q(Z===W):se===2004?Q(z.bracketedPasteMode):0,ie.triggerDataEvent(`${f.C0.ESC}[${H?"":"?"}${re};${be}$y`),!0;var re,be}_updateAttrColor(N,H,z,q,J){return H===2?(N|=50331648,N&=-16777216,N|=E.AttributeData.fromColorRGB([z,q,J])):H===5&&(N&=-50331904,N|=33554432|255&z),N}_extractColor(N,H,z){const q=[0,0,-1,0,0,0];let J=0,ie=0;do{if(q[ie+J]=N.params[H+ie],N.hasSubParams(H+ie)){const pe=N.getSubParams(H+ie);let he=0;do q[1]===5&&(J=1),q[ie+he+1+J]=pe[he];while(++he<pe.length&&he+ie+1+J<q.length);break}if(q[1]===5&&ie+J>=2||q[1]===2&&ie+J>=5)break;q[1]&&(J=1)}while(++ie+H<N.length&&ie+J<q.length);for(let pe=2;pe<q.length;++pe)q[pe]===-1&&(q[pe]=0);switch(q[0]){case 38:z.fg=this._updateAttrColor(z.fg,q[1],q[3],q[4],q[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,q[1],q[3],q[4],q[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,q[1],q[3],q[4],q[5])}return ie}_processUnderline(N,H){H.extended=H.extended.clone(),(!~N||N>5)&&(N=1),H.extended.underlineStyle=N,H.fg|=268435456,N===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(N){N.fg=v.DEFAULT_ATTR_DATA.fg,N.bg=v.DEFAULT_ATTR_DATA.bg,N.extended=N.extended.clone(),N.extended.underlineStyle=0,N.extended.underlineColor&=-67108864,N.updateExtended()}charAttributes(N){if(N.length===1&&N.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=N.length;let z;const q=this._curAttrData;for(let J=0;J<H;J++)z=N.params[J],z>=30&&z<=37?(q.fg&=-50331904,q.fg|=16777216|z-30):z>=40&&z<=47?(q.bg&=-50331904,q.bg|=16777216|z-40):z>=90&&z<=97?(q.fg&=-50331904,q.fg|=16777224|z-90):z>=100&&z<=107?(q.bg&=-50331904,q.bg|=16777224|z-100):z===0?this._processSGR0(q):z===1?q.fg|=134217728:z===3?q.bg|=67108864:z===4?(q.fg|=268435456,this._processUnderline(N.hasSubParams(J)?N.getSubParams(J)[0]:1,q)):z===5?q.fg|=536870912:z===7?q.fg|=67108864:z===8?q.fg|=1073741824:z===9?q.fg|=2147483648:z===2?q.bg|=134217728:z===21?this._processUnderline(2,q):z===22?(q.fg&=-134217729,q.bg&=-134217729):z===23?q.bg&=-67108865:z===24?(q.fg&=-268435457,this._processUnderline(0,q)):z===25?q.fg&=-536870913:z===27?q.fg&=-67108865:z===28?q.fg&=-1073741825:z===29?q.fg&=2147483647:z===39?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):z===49?(q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?J+=this._extractColor(N,J,q):z===53?q.bg|=1073741824:z===55?q.bg&=-1073741825:z===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):z===100?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z);return!0}deviceStatus(N){switch(N.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${H};${z}R`)}return!0}deviceStatusPrivate(N){if(N.params[0]===6){const H=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${H};${z}R`)}return!0}softReset(N){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(N){const H=N.params[0]||1;switch(H){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const z=H%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(N){const H=N.params[0]||1;let z;return(N.length<2||(z=N.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=z-1,this._setCursor(0,0)),!0}windowOptions(N){if(!R(N.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=N.length>1?N.params[1]:0;switch(N.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(I.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(I.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(N){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(N){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(N){return this._windowTitle=N,this._onTitleChange.fire(N),!0}setIconName(N){return this._iconName=N,!0}setOrReportIndexedColor(N){const H=[],z=N.split(";");for(;z.length>1;){const q=z.shift(),J=z.shift();if(/^\d+$/.exec(q)){const ie=parseInt(q);if(K(ie))if(J==="?")H.push({type:0,index:ie});else{const pe=(0,O.parseColor)(J);pe&&H.push({type:1,index:ie,color:pe})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(N){const H=N.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(N,H){this._getCurrentLinkId()&&this._finishHyperlink();const z=N.split(":");let q;const J=z.findIndex((ie=>ie.startsWith("id=")));return J!==-1&&(q=z[J].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(N,H){const z=N.split(";");for(let q=0;q<z.length&&!(H>=this._specialColors.length);++q,++H)if(z[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const J=(0,O.parseColor)(z[q]);J&&this._onColor.fire([{type:1,index:this._specialColors[H],color:J}])}return!0}setOrReportFgColor(N){return this._setOrReportSpecialColor(N,0)}setOrReportBgColor(N){return this._setOrReportSpecialColor(N,1)}setOrReportCursorColor(N){return this._setOrReportSpecialColor(N,2)}restoreIndexedColor(N){if(!N)return this._onColor.fire([{type:2}]),!0;const H=[],z=N.split(";");for(let q=0;q<z.length;++q)if(/^\d+$/.exec(z[q])){const J=parseInt(z[q]);K(J)&&H.push({type:2,index:J})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(N){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(N){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(N){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),!0}selectCharset(N){return N.length!==2?(this.selectDefaultCharset(),!0):(N[0]==="/"||this._charsetService.setgCharset(L[N[0]],g.CHARSETS[N[1]]||g.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const N=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,N,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(N){return this._charsetService.setgLevel(N),!0}screenAlignmentPattern(){const N=new C.CellData;N.content=4194373,N.fg=this._curAttrData.fg,N.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const z=this._activeBuffer.ybase+this._activeBuffer.y+H,q=this._activeBuffer.lines.get(z);q&&(q.fill(N),q.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(N,H){const z=this._bufferService.buffer,q=this._optionsService.rawOptions;return(J=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${J}${f.C0.ESC}\\`),!0))(N==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:N==='"p'?'P1$r61;1"p':N==="r"?`P1$r${z.scrollTop+1};${z.scrollBottom+1}r`:N==="m"?"P1$r0m":N===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(N,H){this._dirtyRowTracker.markRangeDirty(N,H)}}a.InputHandler=V;let U=class{constructor(G){this._bufferService=G,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(G){G<this.start?this.start=G:G>this.end&&(this.end=G)}markRangeDirty(G,N){G>N&&($=G,G=N,N=$),G<this.start&&(this.start=G),N>this.end&&(this.end=N)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function K(G){return 0<=G&&G<256}U=c([p(0,D.IBufferService)],U)},844:(d,a)=>{function u(c){for(const p of c)p.dispose();c.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const p=this._disposables.indexOf(c);p!==-1&&this._disposables.splice(p,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var p;this._isDisposed||c===this._value||((p=this._value)==null||p.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},a.toDisposable=function(c){return{dispose:c}},a.disposeArray=u,a.getDisposeArrayDisposable=function(c){return{dispose:()=>u(c)}}},1505:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(p,f,g){this._data[p]||(this._data[p]={}),this._data[p][f]=g}get(p,f){return this._data[p]?this._data[p][f]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(c,p,f,g,b){this._data.get(c,p)||this._data.set(c,p,new u),this._data.get(c,p).set(f,g,b)}get(c,p,f,g){var b;return(b=this._data.get(c,p))==null?void 0:b.get(f,g)}clear(){this._data.clear()}}},6114:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const u=a.isNode?"node":navigator.userAgent,c=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const p=u.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),a.isIpad=c==="iPad",a.isIphone=c==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),a.isLinux=c.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},6106:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(u=this._search(this._getKey(c)),this._array.splice(u,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;const p=this._getKey(c);if(p===void 0||(u=this._search(p),u===-1)||this._getKey(this._array[u])!==p)return!1;do if(this._array[u]===c)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===p);return!1}*getKeyIterator(c){if(this._array.length!==0&&(u=this._search(c),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===c))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===c)}forEachByKey(c,p){if(this._array.length!==0&&(u=this._search(c),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===c))do p(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===c)}values(){return[...this._array].values()}_search(c){let p=0,f=this._array.length-1;for(;f>=p;){let g=p+f>>1;const b=this._getKey(this._array[g]);if(b>c)f=g-1;else{if(!(b<c)){for(;g>0&&this._getKey(this._array[g-1])===c;)g--;return g}p=g+1}}return p}}},7226:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const c=u(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let S=0,m=0,v=b.timeRemaining(),y=0;for(;this._i<this._tasks.length;){if(S=Date.now(),this._tasks[this._i]()||this._i++,S=Math.max(1,Date.now()-S),m=Math.max(S,m),y=b.timeRemaining(),1.5*m>y)return v-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-S))}ms`),void this._start();v=y}this.clear()}}class f extends p{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const S=Date.now()+b;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}a.PriorityTaskQueue=f,a.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:f,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const c=u(643);a.updateWindowsModeWrappedState=function(p){const f=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),g=f==null?void 0:f.get(p.cols-1),b=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);b&&g&&(b.isWrapped=g[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&g[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new u;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,g=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=g}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=c},9092:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const c=u(6349),p=u(7226),f=u(3734),g=u(8437),b=u(4634),S=u(511),m=u(643),v=u(4863),y=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(x,C,E){this._hasScrollback=x,this._optionsService=C,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=y.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,m.NULL_CELL_CHAR,m.NULL_CELL_WIDTH,m.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,m.WHITESPACE_CELL_CHAR,m.WHITESPACE_CELL_WIDTH,m.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,C){return new g.BufferLine(this._bufferService.cols,this.getNullCell(x),C)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&x<this._rows}_getCorrectBufferLength(x){if(!this._hasScrollback)return x;const C=x+this._optionsService.rawOptions.scrollback;return C>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:C}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=g.DEFAULT_ATTR_DATA);let C=this._rows;for(;C--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,C){const E=this.getNullCell(g.DEFAULT_ATTR_DATA);let D=0;const w=this._getCorrectBufferLength(C);if(w>this.lines.maxLength&&(this.lines.maxLength=w),this.lines.length>0){if(this._cols<x)for(let T=0;T<this.lines.length;T++)D+=+this.lines.get(T).resize(x,E);let M=0;if(this._rows<C)for(let T=this._rows;T<C;T++)this.lines.length<C+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(x,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+M+1?(this.ybase--,M++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(x,E)));else for(let T=this._rows;T>C;T--)this.lines.length>C+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(w<this.lines.maxLength){const T=this.lines.length-w;T>0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=w}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,C-1),M&&(this.y+=M),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=C-1,this._isReflowEnabled&&(this._reflow(x,C),this._cols>x))for(let M=0;M<this.lines.length;M++)D+=+this.lines.get(M).resize(x,E);this._cols=x,this._rows=C,this._memoryCleanupQueue.clear(),D>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let C=0;for(;this._memoryCleanupPosition<this.lines.length;)if(C+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),C>100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,C){this._cols!==x&&(x>this._cols?this._reflowLarger(x,C):this._reflowSmaller(x,C))}_reflowLarger(x,C){const E=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(E.length>0){const D=(0,b.reflowLargerCreateNewLayout)(this.lines,E);(0,b.reflowLargerApplyNewLayout)(this.lines,D.layout),this._reflowLargerAdjustViewport(x,C,D.countRemoved)}}_reflowLargerAdjustViewport(x,C,E){const D=this.getNullCell(g.DEFAULT_ATTR_DATA);let w=E;for(;w-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<C&&this.lines.push(new g.BufferLine(x,D))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(x,C){const E=this.getNullCell(g.DEFAULT_ATTR_DATA),D=[];let w=0;for(let M=this.lines.length-1;M>=0;M--){let T=this.lines.get(M);if(!T||!T.isWrapped&&T.getTrimmedLength()<=x)continue;const O=[T];for(;T.isWrapped&&M>0;)T=this.lines.get(--M),O.unshift(T);const L=this.ybase+this.y;if(L>=M&&L<M+O.length)continue;const P=O[O.length-1].getTrimmedLength(),R=(0,b.reflowSmallerGetNewLineLengths)(O,this._cols,x),I=R.length-O.length;let $;$=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+I):Math.max(0,this.lines.length-this.lines.maxLength+I);const V=[];for(let z=0;z<I;z++){const q=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);V.push(q)}V.length>0&&(D.push({start:M+O.length+w,newLines:V}),w+=V.length),O.push(...V);let U=R.length-1,K=R[U];K===0&&(U--,K=R[U]);let G=O.length-I-1,N=P;for(;G>=0;){const z=Math.min(N,K);if(O[U]===void 0)break;if(O[U].copyCellsFrom(O[G],N-z,K-z,z,!0),K-=z,K===0&&(U--,K=R[U]),N-=z,N===0){G--;const q=Math.max(G,0);N=(0,b.getWrappedLineTrimmedLength)(O,q,this._cols)}}for(let z=0;z<O.length;z++)R[z]<x&&O[z].setCell(R[z],E);let H=I-$;for(;H-- >0;)this.ybase===0?this.y<C-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+w)-C&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+I,this.ybase+C-1)}if(D.length>0){const M=[],T=[];for(let U=0;U<this.lines.length;U++)T.push(this.lines.get(U));const O=this.lines.length;let L=O-1,P=0,R=D[P];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+w);let I=0;for(let U=Math.min(this.lines.maxLength-1,O+w-1);U>=0;U--)if(R&&R.start>L+I){for(let K=R.newLines.length-1;K>=0;K--)this.lines.set(U--,R.newLines[K]);U++,M.push({index:L+1,amount:R.newLines.length}),I+=R.newLines.length,R=D[++P]}else this.lines.set(U,T[L--]);let $=0;for(let U=M.length-1;U>=0;U--)M[U].index+=$,this.lines.onInsertEmitter.fire(M[U]),$+=M[U].amount;const V=Math.max(0,O+w-this.lines.maxLength);V>0&&this.lines.onTrimEmitter.fire(V)}}translateBufferLineToString(x,C,E=0,D){const w=this.lines.get(x);return w?w.translateToString(C,E,D):""}getWrappedRangeForLine(x){let C=x,E=x;for(;C>0&&this.lines.get(C).isWrapped;)C--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:C,last:E}}setupTabStops(x){for(x!=null?this.tabs[x]||(x=this.prevStop(x)):(this.tabs={},x=0);x<this._cols;x+=this._optionsService.rawOptions.tabStopWidth)this.tabs[x]=!0}prevStop(x){for(x==null&&(x=this.x);!this.tabs[--x]&&x>0;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x<this._cols;);return x>=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let C=0;C<this.markers.length;C++)this.markers[C].line===x&&(this.markers[C].dispose(),this.markers.splice(C--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let x=0;x<this.markers.length;x++)this.markers[x].dispose(),this.markers.splice(x--,1);this._isClearing=!1}addMarker(x){const C=new v.Marker(x);return this.markers.push(C),C.register(this.lines.onTrim((E=>{C.line-=E,C.line<0&&C.dispose()}))),C.register(this.lines.onInsert((E=>{C.line>=E.index&&(C.line+=E.amount)}))),C.register(this.lines.onDelete((E=>{C.line>=E.index&&C.line<E.index+E.amount&&C.dispose(),C.line>E.index&&(C.line-=E.amount)}))),C.register(C.onDispose((()=>this._removeMarker(C)))),C}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const c=u(3734),p=u(511),f=u(643),g=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let b=0;class S{constructor(v,y,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const C=y||p.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let E=0;E<v;++E)this.setCell(E,C);this.length=v}get(v){const y=this._data[3*v+0],x=2097151&y;return[this._data[3*v+1],2097152&y?this._combined[v]:x?(0,g.stringFromCodePoint)(x):"",y>>22,2097152&y?this._combined[v].charCodeAt(this._combined[v].length-1):x]}set(v,y){this._data[3*v+1]=y[f.CHAR_DATA_ATTR_INDEX],y[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=y[1],this._data[3*v+0]=2097152|v|y[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=y[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const y=this._data[3*v+0];return 2097152&y?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&y}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const y=this._data[3*v+0];return 2097152&y?this._combined[v]:2097151&y?(0,g.stringFromCodePoint)(2097151&y):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,y){return b=3*v,y.content=this._data[b+0],y.fg=this._data[b+1],y.bg=this._data[b+2],2097152&y.content&&(y.combinedData=this._combined[v]),268435456&y.bg&&(y.extended=this._extendedAttrs[v]),y}setCell(v,y){2097152&y.content&&(this._combined[v]=y.combinedData),268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=y.content,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}setCellFromCodepoint(v,y,x,C){268435456&C.bg&&(this._extendedAttrs[v]=C.extended),this._data[3*v+0]=y|x<<22,this._data[3*v+1]=C.fg,this._data[3*v+2]=C.bg}addCodepointToCell(v,y,x){let C=this._data[3*v+0];2097152&C?this._combined[v]+=(0,g.stringFromCodePoint)(y):2097151&C?(this._combined[v]=(0,g.stringFromCodePoint)(2097151&C)+(0,g.stringFromCodePoint)(y),C&=-2097152,C|=2097152):C=y|4194304,x&&(C&=-12582913,C|=x<<22),this._data[3*v+0]=C}insertCells(v,y,x){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,x),y<this.length-v){const C=new p.CellData;for(let E=this.length-v-y-1;E>=0;--E)this.setCell(v+y+E,this.loadCell(v+E,C));for(let E=0;E<y;++E)this.setCell(v+E,x)}else for(let C=v;C<this.length;++C)this.setCell(C,x);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,x)}deleteCells(v,y,x){if(v%=this.length,y<this.length-v){const C=new p.CellData;for(let E=0;E<this.length-v-y;++E)this.setCell(v+E,this.loadCell(v+y+E,C));for(let E=this.length-y;E<this.length;++E)this.setCell(E,x)}else for(let C=v;C<this.length;++C)this.setCell(C,x);v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,x),this.getWidth(v)!==0||this.hasContent(v)||this.setCellFromCodepoint(v,0,1,x)}replaceCells(v,y,x,C=!1){if(C)for(v&&this.getWidth(v-1)===2&&!this.isProtected(v-1)&&this.setCellFromCodepoint(v-1,0,1,x),y<this.length&&this.getWidth(y-1)===2&&!this.isProtected(y)&&this.setCellFromCodepoint(y,0,1,x);v<y&&v<this.length;)this.isProtected(v)||this.setCell(v,x),v++;else for(v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,x),y<this.length&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y,0,1,x);v<y&&v<this.length;)this.setCell(v++,x)}resize(v,y){if(v===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const x=3*v;if(v>this.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const C=new Uint32Array(x);C.set(this._data),this._data=C}for(let C=this.length;C<v;++C)this.setCell(C,y)}else{this._data=this._data.subarray(0,x);const C=Object.keys(this._combined);for(let D=0;D<C.length;D++){const w=parseInt(C[D],10);w>=v&&delete this._combined[w]}const E=Object.keys(this._extendedAttrs);for(let D=0;D<E.length;D++){const w=parseInt(E[D],10);w>=v&&delete this._extendedAttrs[w]}}return this.length=v,4*x*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const v=new Uint32Array(this._data.length);return v.set(this._data),this._data=v,1}return 0}fill(v,y=!1){if(y)for(let x=0;x<this.length;++x)this.isProtected(x)||this.setCell(x,v);else{this._combined={},this._extendedAttrs={};for(let x=0;x<this.length;++x)this.setCell(x,v)}}copyFrom(v){this.length!==v.length?this._data=new Uint32Array(v._data):this._data.set(v._data),this.length=v.length,this._combined={};for(const y in v._combined)this._combined[y]=v._combined[y];this._extendedAttrs={};for(const y in v._extendedAttrs)this._extendedAttrs[y]=v._extendedAttrs[y];this.isWrapped=v.isWrapped}clone(){const v=new S(0);v._data=new Uint32Array(this._data),v.length=this.length;for(const y in this._combined)v._combined[y]=this._combined[y];for(const y in this._extendedAttrs)v._extendedAttrs[y]=this._extendedAttrs[y];return v.isWrapped=this.isWrapped,v}getTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,y,x,C,E){const D=v._data;if(E)for(let M=C-1;M>=0;M--){for(let T=0;T<3;T++)this._data[3*(x+M)+T]=D[3*(y+M)+T];268435456&D[3*(y+M)+2]&&(this._extendedAttrs[x+M]=v._extendedAttrs[y+M])}else for(let M=0;M<C;M++){for(let T=0;T<3;T++)this._data[3*(x+M)+T]=D[3*(y+M)+T];268435456&D[3*(y+M)+2]&&(this._extendedAttrs[x+M]=v._extendedAttrs[y+M])}const w=Object.keys(v._combined);for(let M=0;M<w.length;M++){const T=parseInt(w[M],10);T>=y&&(this._combined[T-y+x]=v._combined[T])}}translateToString(v,y,x,C){y=y??0,x=x??this.length,v&&(x=Math.min(x,this.getTrimmedLength())),C&&(C.length=0);let E="";for(;y<x;){const D=this._data[3*y+0],w=2097151&D,M=2097152&D?this._combined[y]:w?(0,g.stringFromCodePoint)(w):f.WHITESPACE_CELL_CHAR;if(E+=M,C)for(let T=0;T<M.length;++T)C.push(y);y+=D>>22||1}return C&&C.push(y),E}}a.BufferLine=S},4841:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,c){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return c*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(d,a)=>{function u(c,p,f){if(p===c.length-1)return c[p].getTrimmedLength();const g=!c[p].hasContent(f-1)&&c[p].getWidth(f-1)===1,b=c[p+1].getWidth(0)===2;return g&&b?f-1:f}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(c,p,f,g,b){const S=[];for(let m=0;m<c.length-1;m++){let v=m,y=c.get(++v);if(!y.isWrapped)continue;const x=[c.get(m)];for(;v<c.length&&y.isWrapped;)x.push(y),y=c.get(++v);if(g>=m&&g<v){m+=x.length-1;continue}let C=0,E=u(x,C,p),D=1,w=0;for(;D<x.length;){const T=u(x,D,p),O=T-w,L=f-E,P=Math.min(O,L);x[C].copyCellsFrom(x[D],w,E,P,!1),E+=P,E===f&&(C++,E=0),w+=P,w===T&&(D++,w=0),E===0&&C!==0&&x[C-1].getWidth(f-1)===2&&(x[C].copyCellsFrom(x[C-1],f-1,E++,1,!1),x[C-1].setCell(f-1,b))}x[C].replaceCells(E,f,b);let M=0;for(let T=x.length-1;T>0&&(T>C||x[T].getTrimmedLength()===0);T--)M++;M>0&&(S.push(m+x.length-M),S.push(M)),m+=x.length-1}return S},a.reflowLargerCreateNewLayout=function(c,p){const f=[];let g=0,b=p[g],S=0;for(let m=0;m<c.length;m++)if(b===m){const v=p[++g];c.onDeleteEmitter.fire({index:m-S,amount:v}),m+=v-1,S+=v,b=p[++g]}else f.push(m);return{layout:f,countRemoved:S}},a.reflowLargerApplyNewLayout=function(c,p){const f=[];for(let g=0;g<p.length;g++)f.push(c.get(p[g]));for(let g=0;g<f.length;g++)c.set(g,f[g]);c.length=p.length},a.reflowSmallerGetNewLineLengths=function(c,p,f){const g=[],b=c.map(((y,x)=>u(c,x,p))).reduce(((y,x)=>y+x));let S=0,m=0,v=0;for(;v<b;){if(b-v<f){g.push(b-v);break}S+=f;const y=u(c,m,p);S>y&&(S-=y,m++);const x=c[m].getWidth(S-1)===2;x&&S--;const C=x?f-1:f;g.push(C),v+=C}return g},a.getWrappedLineTrimmedLength=u},5295:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const c=u(8460),p=u(844),f=u(9092);class g extends p.Disposable{constructor(S,m){super(),this._optionsService=S,this._bufferService=m,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(S,m){this._normal.resize(S,m),this._alt.resize(S,m),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}a.BufferSet=g},511:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const c=u(482),p=u(643),f=u(3734);class g extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const m=new g;return m.setFromCharData(S),m}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let m=!1;if(S[p.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(S[p.CHAR_DATA_CHAR_INDEX].length===2){const v=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const y=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=y&&y<=57343?this.content=1024*(v-55296)+y-56320+65536|S[p.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[p.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=S[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=g},643:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const c=u(8460),p=u(844);class f{get id(){return this._id}constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(b){return this._disposables.push(b),b}}a.Marker=f,f._nextId=1},7116:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(d,a)=>{var u,c,p;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
|
|
58
|
+
`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(u||(a.C0=u={})),(function(f){f.PAD="",f.HOP="",f.BPH="",f.NBH="",f.IND="",f.NEL="
",f.SSA="",f.ESA="",f.HTS="",f.HTJ="",f.VTS="",f.PLD="",f.PLU="",f.RI="",f.SS2="",f.SS3="",f.DCS="",f.PU1="",f.PU2="",f.STS="",f.CCH="",f.MW="",f.SPA="",f.EPA="",f.SOS="",f.SGCI="",f.SCI="",f.CSI="",f.ST="",f.OSC="",f.PM="",f.APC=""})(c||(a.C1=c={})),(function(f){f.ST=`${u.ESC}\\`})(p||(a.C1_ESCAPED=p={}))},7399:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const c=u(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(f,g,b,S){const m={type:0,cancel:!1,key:void 0},v=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?m.key=g?c.C0.ESC+"OA":c.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?m.key=g?c.C0.ESC+"OD":c.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?m.key=g?c.C0.ESC+"OC":c.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(m.key=g?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:m.key=f.ctrlKey?"\b":c.C0.DEL,f.altKey&&(m.key=c.C0.ESC+m.key);break;case 9:if(f.shiftKey){m.key=c.C0.ESC+"[Z";break}m.key=c.C0.HT,m.cancel=!0;break;case 13:m.key=f.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,m.cancel=!0;break;case 27:m.key=c.C0.ESC,f.altKey&&(m.key=c.C0.ESC+c.C0.ESC),m.cancel=!0;break;case 37:if(f.metaKey)break;v?(m.key=c.C0.ESC+"[1;"+(v+1)+"D",m.key===c.C0.ESC+"[1;3D"&&(m.key=c.C0.ESC+(b?"b":"[1;5D"))):m.key=g?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(f.metaKey)break;v?(m.key=c.C0.ESC+"[1;"+(v+1)+"C",m.key===c.C0.ESC+"[1;3C"&&(m.key=c.C0.ESC+(b?"f":"[1;5C"))):m.key=g?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(f.metaKey)break;v?(m.key=c.C0.ESC+"[1;"+(v+1)+"A",b||m.key!==c.C0.ESC+"[1;3A"||(m.key=c.C0.ESC+"[1;5A")):m.key=g?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(f.metaKey)break;v?(m.key=c.C0.ESC+"[1;"+(v+1)+"B",b||m.key!==c.C0.ESC+"[1;3B"||(m.key=c.C0.ESC+"[1;5B")):m.key=g?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(m.key=c.C0.ESC+"[2~");break;case 46:m.key=v?c.C0.ESC+"[3;"+(v+1)+"~":c.C0.ESC+"[3~";break;case 36:m.key=v?c.C0.ESC+"[1;"+(v+1)+"H":g?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:m.key=v?c.C0.ESC+"[1;"+(v+1)+"F":g?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:f.shiftKey?m.type=2:f.ctrlKey?m.key=c.C0.ESC+"[5;"+(v+1)+"~":m.key=c.C0.ESC+"[5~";break;case 34:f.shiftKey?m.type=3:f.ctrlKey?m.key=c.C0.ESC+"[6;"+(v+1)+"~":m.key=c.C0.ESC+"[6~";break;case 112:m.key=v?c.C0.ESC+"[1;"+(v+1)+"P":c.C0.ESC+"OP";break;case 113:m.key=v?c.C0.ESC+"[1;"+(v+1)+"Q":c.C0.ESC+"OQ";break;case 114:m.key=v?c.C0.ESC+"[1;"+(v+1)+"R":c.C0.ESC+"OR";break;case 115:m.key=v?c.C0.ESC+"[1;"+(v+1)+"S":c.C0.ESC+"OS";break;case 116:m.key=v?c.C0.ESC+"[15;"+(v+1)+"~":c.C0.ESC+"[15~";break;case 117:m.key=v?c.C0.ESC+"[17;"+(v+1)+"~":c.C0.ESC+"[17~";break;case 118:m.key=v?c.C0.ESC+"[18;"+(v+1)+"~":c.C0.ESC+"[18~";break;case 119:m.key=v?c.C0.ESC+"[19;"+(v+1)+"~":c.C0.ESC+"[19~";break;case 120:m.key=v?c.C0.ESC+"[20;"+(v+1)+"~":c.C0.ESC+"[20~";break;case 121:m.key=v?c.C0.ESC+"[21;"+(v+1)+"~":c.C0.ESC+"[21~";break;case 122:m.key=v?c.C0.ESC+"[23;"+(v+1)+"~":c.C0.ESC+"[23~";break;case 123:m.key=v?c.C0.ESC+"[24;"+(v+1)+"~":c.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(b&&!S||!f.altKey||f.metaKey)!b||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?m.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(m.key=c.C0.US),f.key==="@"&&(m.key=c.C0.NUL)):f.keyCode===65&&(m.type=1);else{const y=p[f.keyCode],x=y==null?void 0:y[f.shiftKey?1:0];if(x)m.key=c.C0.ESC+x;else if(f.keyCode>=65&&f.keyCode<=90){const C=f.ctrlKey?f.keyCode-64:f.keyCode+32;let E=String.fromCharCode(C);f.shiftKey&&(E=E.toUpperCase()),m.key=c.C0.ESC+E}else if(f.keyCode===32)m.key=c.C0.ESC+(f.ctrlKey?c.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let C=f.code.slice(3,4);f.shiftKey||(C=C.toLowerCase()),m.key=c.C0.ESC+C,m.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?m.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?m.key=c.C0.NUL:f.keyCode>=51&&f.keyCode<=55?m.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?m.key=c.C0.DEL:f.keyCode===219?m.key=c.C0.ESC:f.keyCode===220?m.key=c.C0.FS:f.keyCode===221&&(m.key=c.C0.GS)}return m}},482:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,c=0,p=u.length){let f="";for(let g=c;g<p;++g){let b=u[g];b>65535?(b-=65536,f+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):f+=String.fromCharCode(b)}return f},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,c){const p=u.length;if(!p)return 0;let f=0,g=0;if(this._interim){const b=u.charCodeAt(g++);56320<=b&&b<=57343?c[f++]=1024*(this._interim-55296)+b-56320+65536:(c[f++]=this._interim,c[f++]=b),this._interim=0}for(let b=g;b<p;++b){const S=u.charCodeAt(b);if(55296<=S&&S<=56319){if(++b>=p)return this._interim=S,f;const m=u.charCodeAt(b);56320<=m&&m<=57343?c[f++]=1024*(S-55296)+m-56320+65536:(c[f++]=S,c[f++]=m)}else S!==65279&&(c[f++]=S)}return f}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,c){const p=u.length;if(!p)return 0;let f,g,b,S,m=0,v=0,y=0;if(this.interim[0]){let E=!1,D=this.interim[0];D&=(224&D)==192?31:(240&D)==224?15:7;let w,M=0;for(;(w=63&this.interim[++M])&&M<4;)D<<=6,D|=w;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,O=T-M;for(;y<O;){if(y>=p)return 0;if(w=u[y++],(192&w)!=128){y--,E=!0;break}this.interim[M++]=w,D<<=6,D|=63&w}E||(T===2?D<128?y--:c[m++]=D:T===3?D<2048||D>=55296&&D<=57343||D===65279||(c[m++]=D):D<65536||D>1114111||(c[m++]=D)),this.interim.fill(0)}const x=p-4;let C=y;for(;C<p;){for(;!(!(C<x)||128&(f=u[C])||128&(g=u[C+1])||128&(b=u[C+2])||128&(S=u[C+3]));)c[m++]=f,c[m++]=g,c[m++]=b,c[m++]=S,C+=4;if(f=u[C++],f<128)c[m++]=f;else if((224&f)==192){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(v=(31&f)<<6|63&g,v<128){C--;continue}c[m++]=v}else if((240&f)==224){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,m;if(b=u[C++],(192&b)!=128){C--;continue}if(v=(15&f)<<12|(63&g)<<6|63&b,v<2048||v>=55296&&v<=57343||v===65279)continue;c[m++]=v}else if((248&f)==240){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,m;if(b=u[C++],(192&b)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,this.interim[2]=b,m;if(S=u[C++],(192&S)!=128){C--;continue}if(v=(7&f)<<18|(63&g)<<12|(63&b)<<6|63&S,v<65536||v>1114111)continue;c[m++]=v}}return m}}},225:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const c=u(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],f=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let g;a.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let b=0;b<p.length;++b)g.fill(0,p[b][0],p[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?g[b]:(function(S,m){let v,y=0,x=m.length-1;if(S<m[0][0]||S>m[x][1])return!1;for(;x>=y;)if(v=y+x>>1,S>m[v][1])y=v+1;else{if(!(S<m[v][0]))return!0;x=v-1}return!1})(b,f)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,S){let m=this.wcwidth(b),v=m===0&&S!==0;if(v){const y=c.UnicodeService.extractWidth(S);y===0?v=!1:y>m&&(m=y)}return c.UnicodeService.createPropertyValue(0,m,v)}}},5981:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const c=u(8460),p=u(844);class f extends p.Disposable{constructor(b){super(),this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(b,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let m;for(this._isSyncWriting=!0;m=this._writeBuffer.shift();){this._action(m);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(b,S){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(S)}_innerWrite(b=0,S=!0){const m=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],y=this._action(v,S);if(y){const C=E=>Date.now()-m>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(m,E);return void y.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(C)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-m>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=f},5941:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function p(f,g){const b=f.toString(16),S=b.length<2?"0"+b:b;switch(g){case 4:return b[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}a.parseColor=function(f){if(!f)return;let g=f.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const b=u.exec(g);if(b){const S=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/S*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/S*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/S*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),c.exec(g)&&[3,6,9,12].includes(g.length))){const b=g.length/3,S=[0,0,0];for(let m=0;m<3;++m){const v=parseInt(g.slice(b*m,b*m+b),16);S[m]=b===1?v<<4:b===2?v:b===3?v>>4:v>>8}return S}},a.toRgbString=function(f,g=16){const[b,S,m]=f;return`rgb:${p(b,g)}/${p(S,g)}/${p(m,g)}`}},5770:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const c=u(482),p=u(8742),f=u(5770),g=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(S,m){this._handlers[S]===void 0&&(this._handlers[S]=[]);const v=this._handlers[S];return v.push(m),{dispose:()=>{const y=v.indexOf(m);y!==-1&&v.splice(y,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(S,m){if(this.reset(),this._ident=S,this._active=this._handlers[S]||g,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(m);else this._handlerFb(this._ident,"HOOK",m)}put(S,m,v){if(this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].put(S,m,v);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(S,m,v))}unhook(S,m=!0){if(this._active.length){let v=!1,y=this._active.length-1,x=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,v=m,x=this._stack.fallThrough,this._stack.paused=!1),!x&&v===!1){for(;y>=0&&(v=this._active[y].unhook(S),v!==!0);y--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!1,v;y--}for(;y>=0;y--)if(v=this._active[y].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",S);this._active=g,this._ident=0}};const b=new p.Params;b.addParam(0),a.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=b,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():b,this._data="",this._hitLimit=!1}put(S,m,v){this._hitLimit||(this._data+=(0,c.utf32ToString)(S,m,v),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let m=!1;if(this._hitLimit)m=!1;else if(S&&(m=this._handler(this._data,this._params),m instanceof Promise))return m.then((v=>(this._params=b,this._data="",this._hitLimit=!1,v)));return this._params=b,this._data="",this._hitLimit=!1,m}}},2015:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const c=u(844),p=u(8742),f=u(6242),g=u(6351);class b{constructor(y){this.table=new Uint8Array(y)}setDefault(y,x){this.table.fill(y<<4|x)}add(y,x,C,E){this.table[x<<8|y]=C<<4|E}addMany(y,x,C,E){for(let D=0;D<y.length;D++)this.table[x<<8|y[D]]=C<<4|E}}a.TransitionTable=b;const S=160;a.VT500_TRANSITION_TABLE=(function(){const v=new b(4095),y=Array.apply(null,Array(256)).map(((M,T)=>T)),x=(M,T)=>y.slice(M,T),C=x(32,127),E=x(0,24);E.push(25),E.push.apply(E,x(28,32));const D=x(0,14);let w;for(w in v.setDefault(1,0),v.addMany(C,0,2,0),D)v.addMany([24,26,153,154],w,3,0),v.addMany(x(128,144),w,3,0),v.addMany(x(144,152),w,3,0),v.add(156,w,0,0),v.add(27,w,11,1),v.add(157,w,4,8),v.addMany([152,158,159],w,0,7),v.add(155,w,11,3),v.add(144,w,11,9);return v.addMany(E,0,3,0),v.addMany(E,1,3,1),v.add(127,1,0,1),v.addMany(E,8,0,8),v.addMany(E,3,3,3),v.add(127,3,0,3),v.addMany(E,4,3,4),v.add(127,4,0,4),v.addMany(E,6,3,6),v.addMany(E,5,3,5),v.add(127,5,0,5),v.addMany(E,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(C,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(x(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(C,7,0,7),v.addMany(E,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(x(64,127),3,7,0),v.addMany(x(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(x(48,60),4,8,4),v.addMany(x(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(x(32,64),6,0,6),v.add(127,6,0,6),v.addMany(x(64,127),6,0,0),v.addMany(x(32,48),3,9,5),v.addMany(x(32,48),5,9,5),v.addMany(x(48,64),5,0,6),v.addMany(x(64,127),5,7,0),v.addMany(x(32,48),4,9,5),v.addMany(x(32,48),1,9,2),v.addMany(x(32,48),2,9,2),v.addMany(x(48,127),2,10,0),v.addMany(x(48,80),1,10,0),v.addMany(x(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(x(96,127),1,10,0),v.add(80,1,11,9),v.addMany(E,9,0,9),v.add(127,9,0,9),v.addMany(x(28,32),9,0,9),v.addMany(x(32,48),9,9,12),v.addMany(x(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(E,11,0,11),v.addMany(x(32,128),11,0,11),v.addMany(x(28,32),11,0,11),v.addMany(E,10,0,10),v.add(127,10,0,10),v.addMany(x(28,32),10,0,10),v.addMany(x(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(x(32,48),10,9,12),v.addMany(E,12,0,12),v.add(127,12,0,12),v.addMany(x(28,32),12,0,12),v.addMany(x(32,48),12,9,12),v.addMany(x(48,64),12,0,11),v.addMany(x(64,127),12,12,13),v.addMany(x(64,127),10,12,13),v.addMany(x(64,127),9,12,13),v.addMany(E,13,13,13),v.addMany(C,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(S,0,2,0),v.add(S,8,5,8),v.add(S,6,0,6),v.add(S,11,0,11),v.add(S,13,13,13),v})();class m extends c.Disposable{constructor(y=a.VT500_TRANSITION_TABLE){super(),this._transitions=y,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,C,E)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,C)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(y,x=[64,126]){let C=0;if(y.prefix){if(y.prefix.length>1)throw new Error("only one byte as prefix supported");if(C=y.prefix.charCodeAt(0),C&&60>C||C>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(y.intermediates){if(y.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let D=0;D<y.intermediates.length;++D){const w=y.intermediates.charCodeAt(D);if(32>w||w>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");C<<=8,C|=w}}if(y.final.length!==1)throw new Error("final must be a single byte");const E=y.final.charCodeAt(0);if(x[0]>E||E>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return C<<=8,C|=E,C}identToString(y){const x=[];for(;y;)x.push(String.fromCharCode(255&y)),y>>=8;return x.reverse().join("")}setPrintHandler(y){this._printHandler=y}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(y,x){const C=this._identifier(y,[48,126]);this._escHandlers[C]===void 0&&(this._escHandlers[C]=[]);const E=this._escHandlers[C];return E.push(x),{dispose:()=>{const D=E.indexOf(x);D!==-1&&E.splice(D,1)}}}clearEscHandler(y){this._escHandlers[this._identifier(y,[48,126])]&&delete this._escHandlers[this._identifier(y,[48,126])]}setEscHandlerFallback(y){this._escHandlerFb=y}setExecuteHandler(y,x){this._executeHandlers[y.charCodeAt(0)]=x}clearExecuteHandler(y){this._executeHandlers[y.charCodeAt(0)]&&delete this._executeHandlers[y.charCodeAt(0)]}setExecuteHandlerFallback(y){this._executeHandlerFb=y}registerCsiHandler(y,x){const C=this._identifier(y);this._csiHandlers[C]===void 0&&(this._csiHandlers[C]=[]);const E=this._csiHandlers[C];return E.push(x),{dispose:()=>{const D=E.indexOf(x);D!==-1&&E.splice(D,1)}}}clearCsiHandler(y){this._csiHandlers[this._identifier(y)]&&delete this._csiHandlers[this._identifier(y)]}setCsiHandlerFallback(y){this._csiHandlerFb=y}registerDcsHandler(y,x){return this._dcsParser.registerHandler(this._identifier(y),x)}clearDcsHandler(y){this._dcsParser.clearHandler(this._identifier(y))}setDcsHandlerFallback(y){this._dcsParser.setHandlerFallback(y)}registerOscHandler(y,x){return this._oscParser.registerHandler(y,x)}clearOscHandler(y){this._oscParser.clearHandler(y)}setOscHandlerFallback(y){this._oscParser.setHandlerFallback(y)}setErrorHandler(y){this._errorHandler=y}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(y,x,C,E,D){this._parseStack.state=y,this._parseStack.handlers=x,this._parseStack.handlerPos=C,this._parseStack.transition=E,this._parseStack.chunkPos=D}parse(y,x,C){let E,D=0,w=0,M=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,M=this._parseStack.chunkPos+1;else{if(C===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let O=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(C===!1&&O>-1){for(;O>=0&&(E=T[O](this._params),E!==!0);O--)if(E instanceof Promise)return this._parseStack.handlerPos=O,E}this._parseStack.handlers=[];break;case 4:if(C===!1&&O>-1){for(;O>=0&&(E=T[O](),E!==!0);O--)if(E instanceof Promise)return this._parseStack.handlerPos=O,E}this._parseStack.handlers=[];break;case 6:if(D=y[this._parseStack.chunkPos],E=this._dcsParser.unhook(D!==24&&D!==26,C),E)return E;D===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(D=y[this._parseStack.chunkPos],E=this._oscParser.end(D!==24&&D!==26,C),E)return E;D===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,M=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=M;T<x;++T){switch(D=y[T],w=this._transitions.table[this.currentState<<8|(D<160?D:S)],w>>4){case 2:for(let I=T+1;;++I){if(I>=x||(D=y[I])<32||D>126&&D<S){this._printHandler(y,T,I),T=I-1;break}if(++I>=x||(D=y[I])<32||D>126&&D<S){this._printHandler(y,T,I),T=I-1;break}if(++I>=x||(D=y[I])<32||D>126&&D<S){this._printHandler(y,T,I),T=I-1;break}if(++I>=x||(D=y[I])<32||D>126&&D<S){this._printHandler(y,T,I),T=I-1;break}}break;case 3:this._executeHandlers[D]?this._executeHandlers[D]():this._executeHandlerFb(D),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:T,code:D,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const O=this._csiHandlers[this._collect<<8|D];let L=O?O.length-1:-1;for(;L>=0&&(E=O[L](this._params),E!==!0);L--)if(E instanceof Promise)return this._preserveStack(3,O,L,w,T),E;L<0&&this._csiHandlerFb(this._collect<<8|D,this._params),this.precedingJoinState=0;break;case 8:do switch(D){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(D-48)}while(++T<x&&(D=y[T])>47&&D<60);T--;break;case 9:this._collect<<=8,this._collect|=D;break;case 10:const P=this._escHandlers[this._collect<<8|D];let R=P?P.length-1:-1;for(;R>=0&&(E=P[R](),E!==!0);R--)if(E instanceof Promise)return this._preserveStack(4,P,R,w,T),E;R<0&&this._escHandlerFb(this._collect<<8|D),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|D,this._params);break;case 13:for(let I=T+1;;++I)if(I>=x||(D=y[I])===24||D===26||D===27||D>127&&D<S){this._dcsParser.put(y,T,I),T=I-1;break}break;case 14:if(E=this._dcsParser.unhook(D!==24&&D!==26),E)return this._preserveStack(6,[],0,w,T),E;D===27&&(w|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let I=T+1;;I++)if(I>=x||(D=y[I])<32||D>127&&D<S){this._oscParser.put(y,T,I),T=I-1;break}break;case 6:if(E=this._oscParser.end(D!==24&&D!==26),E)return this._preserveStack(5,[],0,w,T),E;D===27&&(w|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&w}}}a.EscapeSequenceParser=m},6242:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const c=u(5770),p=u(482),f=[];a.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,b){this._handlers[g]===void 0&&(this._handlers[g]=[]);const S=this._handlers[g];return S.push(b),{dispose:()=>{const m=S.indexOf(b);m!==-1&&S.splice(m,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,b,S){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(g,b,S);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(g,b,S))}start(){this.reset(),this._state=1}put(g,b,S){if(this._state!==3){if(this._state===1)for(;b<S;){const m=g[b++];if(m===59){this._state=2,this._start();break}if(m<48||57<m)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+m-48}this._state===2&&S-b>0&&this._put(g,b,S)}}end(g,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,m=this._active.length-1,v=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,S=b,v=this._stack.fallThrough,this._stack.paused=!1),!v&&S===!1){for(;m>=0&&(S=this._active[m].end(g),S!==!0);m--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,S;m--}for(;m>=0;m--)if(S=this._active[m].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",g);this._active=f,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,b,S){this._hitLimit||(this._data+=(0,p.utf32ToString)(g,b,S),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let b=!1;if(this._hitLimit)b=!1;else if(g&&(b=this._handler(this._data),b instanceof Promise))return b.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,b}}},8742:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class c{static fromArray(f){const g=new c;if(!f.length)return g;for(let b=Array.isArray(f[0])?1:0;b<f.length;++b){const S=f[b];if(Array.isArray(S))for(let m=0;m<S.length;++m)g.addSubParam(S[m]);else g.addParam(S)}return g}constructor(f=32,g=32){if(this.maxLength=f,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new c(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let g=0;g<this.length;++g){f.push(this.params[g]);const b=this._subParamsIdx[g]>>8,S=255&this._subParamsIdx[g];S-b>0&&f.push(Array.prototype.slice.call(this._subParams,b,S))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>u?u:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>u?u:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const g=this._subParamsIdx[f]>>8,b=255&this._subParamsIdx[f];return b-g>0?this._subParams.subarray(g,b):null}getSubParamsAll(){const f={};for(let g=0;g<this.length;++g){const b=this._subParamsIdx[g]>>8,S=255&this._subParamsIdx[g];S-b>0&&(f[g]=this._subParams.slice(b,S))}return f}addDigit(f){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,S=b[g-1];b[g-1]=~S?Math.min(10*S+f,u):f}}a.Params=c},5741:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,c){const p={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(p),c.dispose=()=>this._wrappedAddonDispose(p),c.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let c=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===u){c=p;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(c,1)}}},8771:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const c=u(3785),p=u(511);a.BufferApiView=class{constructor(f,g){this._buffer=f,this.type=g}init(f){return this._buffer=f,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(f){const g=this._buffer.lines.get(f);if(g)return new c.BufferLineApiView(g)}getNullCell(){return new p.CellData}}},3785:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const c=u(511);a.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,f){if(!(p<0||p>=this._line.length))return f?(this._line.loadCell(p,f),f):this._line.loadCell(p,new c.CellData)}translateToString(p,f,g){return this._line.translateToString(p,f,g)}}},8285:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const c=u(8771),p=u(8460),f=u(844);class g extends f.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=g},7975:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,c){return this._core.registerCsiHandler(u,(p=>c(p.toArray())))}addCsiHandler(u,c){return this.registerCsiHandler(u,c)}registerDcsHandler(u,c){return this._core.registerDcsHandler(u,((p,f)=>c(p,f.toArray())))}addDcsHandler(u,c){return this.registerDcsHandler(u,c)}registerEscHandler(u,c){return this._core.registerEscHandler(u,c)}addEscHandler(u,c){return this.registerEscHandler(u,c)}registerOscHandler(u,c){return this._core.registerOscHandler(u,c)}addOscHandler(u,c){return this.registerOscHandler(u,c)}}},7090:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(d,a,u){var c=this&&this.__decorate||function(v,y,x,C){var E,D=arguments.length,w=D<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(v,y,x,C);else for(var M=v.length-1;M>=0;M--)(E=v[M])&&(w=(D<3?E(w):D>3?E(y,x,w):E(y,x))||w);return D>3&&w&&Object.defineProperty(y,x,w),w},p=this&&this.__param||function(v,y){return function(x,C){y(x,C,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const f=u(8460),g=u(844),b=u(5295),S=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let m=a.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new b.BufferSet(v,this))}resize(v,y){this.cols=v,this.rows=y,this.buffers.resize(v,y),this._onResize.fire({cols:v,rows:y})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,y=!1){const x=this.buffer;let C;C=this._cachedBlankLine,C&&C.length===this.cols&&C.getFg(0)===v.fg&&C.getBg(0)===v.bg||(C=x.getBlankLine(v,y),this._cachedBlankLine=C),C.isWrapped=y;const E=x.ybase+x.scrollTop,D=x.ybase+x.scrollBottom;if(x.scrollTop===0){const w=x.lines.isFull;D===x.lines.length-1?w?x.lines.recycle().copyFrom(C):x.lines.push(C.clone()):x.lines.splice(D+1,0,C.clone()),w?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const w=D-E+1;x.lines.shiftElements(E+1,w-1,-1),x.lines.set(D,C.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(v,y,x){const C=this.buffer;if(v<0){if(C.ydisp===0)return;this.isUserScrolling=!0}else v+C.ydisp>=C.ybase&&(this.isUserScrolling=!1);const E=C.ydisp;C.ydisp=Math.max(Math.min(C.ydisp+v,C.ybase),0),E!==C.ydisp&&(y||this._onScroll.fire(C.ydisp))}};a.BufferService=m=c([p(0,S.IOptionsService)],m)},7994:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,c){this._charsets[u]=c,this.glevel===u&&(this.charset=c)}}},1753:function(d,a,u){var c=this&&this.__decorate||function(C,E,D,w){var M,T=arguments.length,O=T<3?E:w===null?w=Object.getOwnPropertyDescriptor(E,D):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(C,E,D,w);else for(var L=C.length-1;L>=0;L--)(M=C[L])&&(O=(T<3?M(O):T>3?M(E,D,O):M(E,D))||O);return T>3&&O&&Object.defineProperty(E,D,O),O},p=this&&this.__param||function(C,E){return function(D,w){E(D,w,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const f=u(2585),g=u(8460),b=u(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:C=>C.button!==4&&C.action===1&&(C.ctrl=!1,C.alt=!1,C.shift=!1,!0)},VT200:{events:19,restrict:C=>C.action!==32},DRAG:{events:23,restrict:C=>C.action!==32||C.button!==3},ANY:{events:31,restrict:C=>!0}};function m(C,E){let D=(C.ctrl?16:0)|(C.shift?4:0)|(C.alt?8:0);return C.button===4?(D|=64,D|=C.action):(D|=3&C.button,4&C.button&&(D|=64),8&C.button&&(D|=128),C.action===32?D|=32:C.action!==0||E||(D|=3)),D}const v=String.fromCharCode,y={DEFAULT:C=>{const E=[m(C,!1)+32,C.col+32,C.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${v(E[0])}${v(E[1])}${v(E[2])}`},SGR:C=>{const E=C.action===0&&C.button!==4?"m":"M";return`\x1B[<${m(C,!0)};${C.col};${C.row}${E}`},SGR_PIXELS:C=>{const E=C.action===0&&C.button!==4?"m":"M";return`\x1B[<${m(C,!0)};${C.x};${C.y}${E}`}};let x=a.CoreMouseService=class extends b.Disposable{constructor(C,E){super(),this._bufferService=C,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const D of Object.keys(S))this.addProtocol(D,S[D]);for(const D of Object.keys(y))this.addEncoding(D,y[D]);this.reset()}addProtocol(C,E){this._protocols[C]=E}addEncoding(C,E){this._encodings[C]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(C){if(!this._protocols[C])throw new Error(`unknown protocol "${C}"`);this._activeProtocol=C,this._onProtocolChange.fire(this._protocols[C].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(C){if(!this._encodings[C])throw new Error(`unknown encoding "${C}"`);this._activeEncoding=C}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(C){if(C.col<0||C.col>=this._bufferService.cols||C.row<0||C.row>=this._bufferService.rows||C.button===4&&C.action===32||C.button===3&&C.action!==32||C.button!==4&&(C.action===2||C.action===3)||(C.col++,C.row++,C.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,C,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(C))return!1;const E=this._encodings[this._activeEncoding](C);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=C,!0}explainEvents(C){return{down:!!(1&C),up:!!(2&C),drag:!!(4&C),move:!!(8&C),wheel:!!(16&C)}}_equalEvents(C,E,D){if(D){if(C.x!==E.x||C.y!==E.y)return!1}else if(C.col!==E.col||C.row!==E.row)return!1;return C.button===E.button&&C.action===E.action&&C.ctrl===E.ctrl&&C.alt===E.alt&&C.shift===E.shift}};a.CoreMouseService=x=c([p(0,f.IBufferService),p(1,f.ICoreService)],x)},6975:function(d,a,u){var c=this&&this.__decorate||function(x,C,E,D){var w,M=arguments.length,T=M<3?C:D===null?D=Object.getOwnPropertyDescriptor(C,E):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,C,E,D);else for(var O=x.length-1;O>=0;O--)(w=x[O])&&(T=(M<3?w(T):M>3?w(C,E,T):w(C,E))||T);return M>3&&T&&Object.defineProperty(C,E,T),T},p=this&&this.__param||function(x,C){return function(E,D){C(E,D,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const f=u(1439),g=u(8460),b=u(844),S=u(2585),m=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let y=a.CoreService=class extends b.Disposable{constructor(x,C,E){super(),this._bufferService=x,this._logService=C,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(m),this.decPrivateModes=(0,f.clone)(v)}reset(){this.modes=(0,f.clone)(m),this.decPrivateModes=(0,f.clone)(v)}triggerDataEvent(x,C=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;C&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),C&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((D=>D.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((C=>C.charCodeAt(0))))),this._onBinary.fire(x))}};a.CoreService=y=c([p(0,S.IBufferService),p(1,S.ILogService),p(2,S.IOptionsService)],y)},9074:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const c=u(8055),p=u(8460),f=u(844),g=u(6106);let b=0,S=0;class m extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const C=new v(x);if(C){const E=C.marker.onDispose((()=>C.dispose()));C.onDispose((()=>{C&&(this._decorations.delete(C)&&this._onDecorationRemoved.fire(C),E.dispose())})),this._decorations.insert(C),this._onDecorationRegistered.fire(C)}return C}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,C,E){let D=0,w=0;for(const M of this._decorations.getKeyIterator(C))D=M.options.x??0,w=D+(M.options.width??1),x>=D&&x<w&&(!E||(M.options.layer??"bottom")===E)&&(yield M)}forEachDecorationAtCell(x,C,E,D){this._decorations.forEachByKey(C,(w=>{b=w.options.x??0,S=b+(w.options.width??1),x>=b&&x<S&&(!E||(w.options.layer??"bottom")===E)&&D(w)}))}}a.DecorationService=m;class v extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=c.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=c.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(x){super(),this.options=x,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=x.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const c=u(2585),p=u(8343);class f{constructor(...b){this._entries=new Map;for(const[S,m]of b)this.set(S,m)}set(b,S){const m=this._entries.get(b);return this._entries.set(b,S),m}forEach(b){for(const[S,m]of this._entries.entries())b(S,m)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}a.ServiceCollection=f,a.InstantiationService=class{constructor(){this._services=new f,this._services.set(c.IInstantiationService,this)}setService(g,b){this._services.set(g,b)}getService(g){return this._services.get(g)}createInstance(g,...b){const S=(0,p.getServiceDependencies)(g).sort(((y,x)=>y.index-x.index)),m=[];for(const y of S){const x=this._services.get(y.id);if(!x)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${y.id}.`);m.push(x)}const v=S.length>0?S[0].index:b.length;if(b.length!==v)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${v+1} conflicts with ${b.length} static arguments`);return new g(...b,...m)}}},7866:function(d,a,u){var c=this&&this.__decorate||function(v,y,x,C){var E,D=arguments.length,w=D<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(v,y,x,C);else for(var M=v.length-1;M>=0;M--)(E=v[M])&&(w=(D<3?E(w):D>3?E(y,x,w):E(y,x))||w);return D>3&&w&&Object.defineProperty(y,x,w),w},p=this&&this.__param||function(v,y){return function(x,C){y(x,C,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const f=u(844),g=u(2585),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let S,m=a.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let y=0;y<v.length;y++)typeof v[y]=="function"&&(v[y]=v[y]())}_log(v,y,x){this._evalLazyOptionalParams(x),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+y,...x)}trace(v,...y){var x;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.trace.bind(this._optionsService.options.logger))??console.log,v,y)}debug(v,...y){var x;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.debug.bind(this._optionsService.options.logger))??console.log,v,y)}info(v,...y){var x;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.info.bind(this._optionsService.options.logger))??console.info,v,y)}warn(v,...y){var x;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.warn.bind(this._optionsService.options.logger))??console.warn,v,y)}error(v,...y){var x;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.error.bind(this._optionsService.options.logger))??console.error,v,y)}};a.LogService=m=c([p(0,g.IOptionsService)],m),a.setTraceLogger=function(v){S=v},a.traceCall=function(v,y,x){if(typeof x.value!="function")throw new Error("not supported");const C=x.value;x.value=function(...E){if(S.logLevel!==g.LogLevelEnum.TRACE)return C.apply(this,E);S.trace(`GlyphRenderer#${C.name}(${E.map((w=>JSON.stringify(w))).join(", ")})`);const D=C.apply(this,E);return S.trace(`GlyphRenderer#${C.name} return`,D),D}}},7302:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const c=u(8460),p=u(844),f=u(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class b extends p.Disposable{constructor(m){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...a.DEFAULT_OPTIONS};for(const y in m)if(y in v)try{const x=m[y];v[y]=this._sanitizeAndValidateOption(y,x)}catch(x){console.error(x)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(m,v){return this.onOptionChange((y=>{y===m&&v(this.rawOptions[m])}))}onMultipleOptionChange(m,v){return this.onOptionChange((y=>{m.indexOf(y)!==-1&&v()}))}_setupOptions(){const m=y=>{if(!(y in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${y}"`);return this.rawOptions[y]},v=(y,x)=>{if(!(y in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${y}"`);x=this._sanitizeAndValidateOption(y,x),this.rawOptions[y]!==x&&(this.rawOptions[y]=x,this._onOptionChange.fire(y))};for(const y in this.rawOptions){const x={get:m.bind(this,y),set:v.bind(this,y)};Object.defineProperty(this.options,y,x)}}_sanitizeAndValidateOption(m,v){switch(m){case"cursorStyle":if(v||(v=a.DEFAULT_OPTIONS[m]),!(function(y){return y==="block"||y==="underline"||y==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${m}`);break;case"wordSeparator":v||(v=a.DEFAULT_OPTIONS[m]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=g.includes(v)?v:a.DEFAULT_OPTIONS[m];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${m} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${m} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${m} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${m} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}a.OptionsService=b},2660:function(d,a,u){var c=this&&this.__decorate||function(b,S,m,v){var y,x=arguments.length,C=x<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,m):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(b,S,m,v);else for(var E=b.length-1;E>=0;E--)(y=b[E])&&(C=(x<3?y(C):x>3?y(S,m,C):y(S,m))||C);return x>3&&C&&Object.defineProperty(S,m,C),C},p=this&&this.__param||function(b,S){return function(m,v){S(m,v,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const f=u(2585);let g=a.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const S=this._bufferService.buffer;if(b.id===void 0){const E=S.addMarker(S.ybase+S.y),D={data:b,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(D,E))),this._dataByLinkId.set(D.id,D),D.id}const m=b,v=this._getEntryIdKey(m),y=this._entriesWithId.get(v);if(y)return this.addLineToLink(y.id,S.ybase+S.y),y.id;const x=S.addMarker(S.ybase+S.y),C={id:this._nextId++,key:this._getEntryIdKey(m),data:m,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(C,x))),this._entriesWithId.set(C.key,C),this._dataByLinkId.set(C.id,C),C.id}addLineToLink(b,S){const m=this._dataByLinkId.get(b);if(m&&m.lines.every((v=>v.line!==S))){const v=this._bufferService.buffer.addMarker(S);m.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(m,v)))}}getLinkData(b){var S;return(S=this._dataByLinkId.get(b))==null?void 0:S.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,S){const m=b.lines.indexOf(S);m!==-1&&(b.lines.splice(m,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};a.OscLinkService=g=c([p(0,f.IBufferService)],g)},8343:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",c="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(p){return p[c]||[]},a.createDecorator=function(p){if(a.serviceRegistry.has(p))return a.serviceRegistry.get(p);const f=function(g,b,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(m,v,y){v[u]===v?v[c].push({id:m,index:y}):(v[c]=[{id:m,index:y}],v[u]=v)})(f,g,S)};return f.toString=()=>p,a.serviceRegistry.set(p,f),f}},2585:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const c=u(8343);var p;a.IBufferService=(0,c.createDecorator)("BufferService"),a.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),a.ICoreService=(0,c.createDecorator)("CoreService"),a.ICharsetService=(0,c.createDecorator)("CharsetService"),a.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(p||(a.LogLevelEnum=p={})),a.ILogService=(0,c.createDecorator)("LogService"),a.IOptionsService=(0,c.createDecorator)("OptionsService"),a.IOscLinkService=(0,c.createDecorator)("OscLinkService"),a.IUnicodeService=(0,c.createDecorator)("UnicodeService"),a.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const c=u(8460),p=u(225);class f{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,S,m=!1){return(16777215&b)<<3|(3&S)<<1|(m?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;const b=new p.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let S=0,m=0;const v=b.length;for(let y=0;y<v;++y){let x=b.charCodeAt(y);if(55296<=x&&x<=56319){if(++y>=v)return S+this.wcwidth(x);const D=b.charCodeAt(y);56320<=D&&D<=57343?x=1024*(x-55296)+D-56320+65536:S+=this.wcwidth(D)}const C=this.charProperties(x,m);let E=f.extractWidth(C);f.extractShouldJoin(C)&&(E-=f.extractWidth(m)),S+=E,m=C}return S}charProperties(b,S){return this._activeProvider.charProperties(b,S)}}a.UnicodeService=f}},i={};function o(d){var a=i[d];if(a!==void 0)return a.exports;var u=i[d]={exports:{}};return r[d].call(u.exports,u,u.exports,o),u.exports}var l={};return(()=>{var d=l;Object.defineProperty(d,"__esModule",{value:!0}),d.Terminal=void 0;const a=o(9042),u=o(3236),c=o(844),p=o(5741),f=o(8285),g=o(7975),b=o(7090),S=["cols","rows"];class m extends c.Disposable{constructor(y){super(),this._core=this.register(new u.Terminal(y)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const x=E=>this._core.options[E],C=(E,D)=>{this._checkReadonlyOptions(E),this._core.options[E]=D};for(const E in this._core.options){const D={get:x.bind(this,E),set:C.bind(this,E)};Object.defineProperty(this._publicOptions,E,D)}}_checkReadonlyOptions(y){if(S.includes(y))throw new Error(`Option "${y}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new b.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const y=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:y.applicationCursorKeys,applicationKeypadMode:y.applicationKeypad,bracketedPasteMode:y.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:y.origin,reverseWraparoundMode:y.reverseWraparound,sendFocusMode:y.sendFocus,wraparoundMode:y.wraparound}}get options(){return this._publicOptions}set options(y){for(const x in y)this._publicOptions[x]=y[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(y,x=!0){this._core.input(y,x)}resize(y,x){this._verifyIntegers(y,x),this._core.resize(y,x)}open(y){this._core.open(y)}attachCustomKeyEventHandler(y){this._core.attachCustomKeyEventHandler(y)}attachCustomWheelEventHandler(y){this._core.attachCustomWheelEventHandler(y)}registerLinkProvider(y){return this._core.registerLinkProvider(y)}registerCharacterJoiner(y){return this._checkProposedApi(),this._core.registerCharacterJoiner(y)}deregisterCharacterJoiner(y){this._checkProposedApi(),this._core.deregisterCharacterJoiner(y)}registerMarker(y=0){return this._verifyIntegers(y),this._core.registerMarker(y)}registerDecoration(y){return this._checkProposedApi(),this._verifyPositiveIntegers(y.x??0,y.width??0,y.height??0),this._core.registerDecoration(y)}hasSelection(){return this._core.hasSelection()}select(y,x,C){this._verifyIntegers(y,x,C),this._core.select(y,x,C)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(y,x){this._verifyIntegers(y,x),this._core.selectLines(y,x)}dispose(){super.dispose()}scrollLines(y){this._verifyIntegers(y),this._core.scrollLines(y)}scrollPages(y){this._verifyIntegers(y),this._core.scrollPages(y)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(y){this._verifyIntegers(y),this._core.scrollToLine(y)}clear(){this._core.clear()}write(y,x){this._core.write(y,x)}writeln(y,x){this._core.write(y),this._core.write(`\r
|
|
59
|
+
`,x)}paste(y){this._core.paste(y)}refresh(y,x){this._verifyIntegers(y,x),this._core.refresh(y,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(y){this._addonManager.loadAddon(this,y)}static get strings(){return a}_verifyIntegers(...y){for(const x of y)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...y){for(const x of y)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}d.Terminal=m})(),l})()))})(gv)),gv.exports}var IL=BL(),_v={exports:{}},ex;function NL(){return ex||(ex=1,(function(e,t){(function(r,i){e.exports=i()})(self,(()=>(()=>{var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(o){this._terminal=o}dispose(){}fit(){const o=this.proposeDimensions();if(!o||!this._terminal||isNaN(o.cols)||isNaN(o.rows))return;const l=this._terminal._core;this._terminal.rows===o.rows&&this._terminal.cols===o.cols||(l._renderService.clear(),this._terminal.resize(o.cols,o.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const o=this._terminal._core,l=o._renderService.dimensions;if(l.css.cell.width===0||l.css.cell.height===0)return;const d=this._terminal.options.scrollback===0?0:o.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(a.getPropertyValue("height")),c=Math.max(0,parseInt(a.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),f=u-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),g=c-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-d;return{cols:Math.max(2,Math.floor(g/l.css.cell.width)),rows:Math.max(1,Math.floor(f/l.css.cell.height))}}}})(),r})()))})(_v)),_v.exports}var jL=NL(),yv={exports:{}},tx;function FL(){return tx||(tx=1,(function(e,t){(function(r,i){e.exports=i()})(self,(()=>(()=>{var r={965:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const c=u(374),p=u(509),f=u(855),g=u(859),b=u(381),S=11,m=S*Float32Array.BYTES_PER_ELEMENT;let v,y=0,x=0,C=0;class E extends g.Disposable{constructor(w,M,T,O){super(),this._terminal=w,this._gl=M,this._dimensions=T,this._optionsService=O,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const L=this._gl;p.TextureAtlas.maxAtlasPages===void 0&&(p.TextureAtlas.maxAtlasPages=Math.min(32,(0,c.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),p.TextureAtlas.maxTextureSize=(0,c.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,c.throwIfFalsy)((0,b.createProgram)(L,`#version 300 es
|
|
60
|
+
layout (location = 0) in vec2 a_unitquad;
|
|
61
|
+
layout (location = 1) in vec2 a_cellpos;
|
|
62
|
+
layout (location = 2) in vec2 a_offset;
|
|
63
|
+
layout (location = 3) in vec2 a_size;
|
|
64
|
+
layout (location = 4) in float a_texpage;
|
|
65
|
+
layout (location = 5) in vec2 a_texcoord;
|
|
66
|
+
layout (location = 6) in vec2 a_texsize;
|
|
67
|
+
|
|
68
|
+
uniform mat4 u_projection;
|
|
69
|
+
uniform vec2 u_resolution;
|
|
70
|
+
|
|
71
|
+
out vec2 v_texcoord;
|
|
72
|
+
flat out int v_texpage;
|
|
73
|
+
|
|
74
|
+
void main() {
|
|
75
|
+
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
76
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
77
|
+
v_texpage = int(a_texpage);
|
|
78
|
+
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
79
|
+
}`,(function(U){let K="";for(let G=1;G<U;G++)K+=` else if (v_texpage == ${G}) { outColor = texture(u_texture[${G}], v_texcoord); }`;return`#version 300 es
|
|
80
|
+
precision lowp float;
|
|
81
|
+
|
|
82
|
+
in vec2 v_texcoord;
|
|
83
|
+
flat in int v_texpage;
|
|
84
|
+
|
|
85
|
+
uniform sampler2D u_texture[${U}];
|
|
86
|
+
|
|
87
|
+
out vec4 outColor;
|
|
88
|
+
|
|
89
|
+
void main() {
|
|
90
|
+
if (v_texpage == 0) {
|
|
91
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
92
|
+
} ${K}
|
|
93
|
+
}`})(p.TextureAtlas.maxAtlasPages))),this.register((0,g.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,c.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,c.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,c.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const P=new Float32Array([0,0,1,0,0,1,1,1]),R=L.createBuffer();this.register((0,g.toDisposable)((()=>L.deleteBuffer(R)))),L.bindBuffer(L.ARRAY_BUFFER,R),L.bufferData(L.ARRAY_BUFFER,P,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const I=new Uint8Array([0,1,2,3]),$=L.createBuffer();this.register((0,g.toDisposable)((()=>L.deleteBuffer($)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,$),L.bufferData(L.ELEMENT_ARRAY_BUFFER,I,L.STATIC_DRAW),this._attributesBuffer=(0,c.throwIfFalsy)(L.createBuffer()),this.register((0,g.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,2,L.FLOAT,!1,m,0),L.vertexAttribDivisor(2,1),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,L.FLOAT,!1,m,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(3,1),L.enableVertexAttribArray(4),L.vertexAttribPointer(4,1,L.FLOAT,!1,m,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(4,1),L.enableVertexAttribArray(5),L.vertexAttribPointer(5,2,L.FLOAT,!1,m,5*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(5,1),L.enableVertexAttribArray(6),L.vertexAttribPointer(6,2,L.FLOAT,!1,m,7*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(6,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,m,9*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.useProgram(this._program);const V=new Int32Array(p.TextureAtlas.maxAtlasPages);for(let U=0;U<p.TextureAtlas.maxAtlasPages;U++)V[U]=U;L.uniform1iv(this._textureLocation,V),L.uniformMatrix4fv(this._projectionLocation,!1,b.PROJECTION_MATRIX),this._atlasTextures=[];for(let U=0;U<p.TextureAtlas.maxAtlasPages;U++){const K=new b.GLTexture((0,c.throwIfFalsy)(L.createTexture()));this.register((0,g.toDisposable)((()=>L.deleteTexture(K.texture)))),L.activeTexture(L.TEXTURE0+U),L.bindTexture(L.TEXTURE_2D,K.texture),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),L.texImage2D(L.TEXTURE_2D,0,L.RGBA,1,1,0,L.RGBA,L.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[U]=K}L.enable(L.BLEND),L.blendFunc(L.SRC_ALPHA,L.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(w,M,T,O,L,P,R,I,$){this._updateCell(this._vertices.attributes,w,M,T,O,L,P,R,I,$)}_updateCell(w,M,T,O,L,P,R,I,$,V){y=(T*this._terminal.cols+M)*S,O!==f.NULL_CELL_CODE&&O!==void 0?this._atlas&&(v=I&&I.length>1?this._atlas.getRasterizedGlyphCombinedChar(I,L,P,R,!1):this._atlas.getRasterizedGlyph(O,L,P,R,!1),x=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),L!==V&&v.offset.x>x?(C=v.offset.x-x,w[y]=-(v.offset.x-C)+this._dimensions.device.char.left,w[y+1]=-v.offset.y+this._dimensions.device.char.top,w[y+2]=(v.size.x-C)/this._dimensions.device.canvas.width,w[y+3]=v.size.y/this._dimensions.device.canvas.height,w[y+4]=v.texturePage,w[y+5]=v.texturePositionClipSpace.x+C/this._atlas.pages[v.texturePage].canvas.width,w[y+6]=v.texturePositionClipSpace.y,w[y+7]=v.sizeClipSpace.x-C/this._atlas.pages[v.texturePage].canvas.width,w[y+8]=v.sizeClipSpace.y):(w[y]=-v.offset.x+this._dimensions.device.char.left,w[y+1]=-v.offset.y+this._dimensions.device.char.top,w[y+2]=v.size.x/this._dimensions.device.canvas.width,w[y+3]=v.size.y/this._dimensions.device.canvas.height,w[y+4]=v.texturePage,w[y+5]=v.texturePositionClipSpace.x,w[y+6]=v.texturePositionClipSpace.y,w[y+7]=v.sizeClipSpace.x,w[y+8]=v.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,c.allowRescaling)(O,$,v.size.x,this._dimensions.device.cell.width)&&(w[y+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):w.fill(0,y,y+S-1-2)}clear(){const w=this._terminal,M=w.cols*w.rows*S;this._vertices.count!==M?this._vertices.attributes=new Float32Array(M):this._vertices.attributes.fill(0);let T=0;for(;T<this._vertices.attributesBuffers.length;T++)this._vertices.count!==M?this._vertices.attributesBuffers[T]=new Float32Array(M):this._vertices.attributesBuffers[T].fill(0);this._vertices.count=M,T=0;for(let O=0;O<w.rows;O++)for(let L=0;L<w.cols;L++)this._vertices.attributes[T+9]=L/w.cols,this._vertices.attributes[T+10]=O/w.rows,T+=S}handleResize(){const w=this._gl;w.useProgram(this._program),w.viewport(0,0,w.canvas.width,w.canvas.height),w.uniform2f(this._resolutionLocation,w.canvas.width,w.canvas.height),this.clear()}render(w){if(!this._atlas)return;const M=this._gl;M.useProgram(this._program),M.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const T=this._vertices.attributesBuffers[this._activeBuffer];let O=0;for(let L=0;L<w.lineLengths.length;L++){const P=L*this._terminal.cols*S,R=this._vertices.attributes.subarray(P,P+w.lineLengths[L]*S);T.set(R,O),O+=R.length}M.bindBuffer(M.ARRAY_BUFFER,this._attributesBuffer),M.bufferData(M.ARRAY_BUFFER,T.subarray(0,O),M.STREAM_DRAW);for(let L=0;L<this._atlas.pages.length;L++)this._atlas.pages[L].version!==this._atlasTextures[L].version&&this._bindAtlasPageTexture(M,this._atlas,L);M.drawElementsInstanced(M.TRIANGLE_STRIP,4,M.UNSIGNED_BYTE,0,O/S)}setAtlas(w){this._atlas=w;for(const M of this._atlasTextures)M.version=-1}_bindAtlasPageTexture(w,M,T){w.activeTexture(w.TEXTURE0+T),w.bindTexture(w.TEXTURE_2D,this._atlasTextures[T].texture),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_WRAP_S,w.CLAMP_TO_EDGE),w.texParameteri(w.TEXTURE_2D,w.TEXTURE_WRAP_T,w.CLAMP_TO_EDGE),w.texImage2D(w.TEXTURE_2D,0,w.RGBA,w.RGBA,w.UNSIGNED_BYTE,M.pages[T].canvas),w.generateMipmap(w.TEXTURE_2D),this._atlasTextures[T].version=M.pages[T].version}setDimensions(w){this._dimensions=w}}a.GlyphRenderer=E},742:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RectangleRenderer=void 0;const c=u(374),p=u(859),f=u(310),g=u(381),b=8*Float32Array.BYTES_PER_ELEMENT;class S{constructor(){this.attributes=new Float32Array(160),this.count=0}}let m=0,v=0,y=0,x=0,C=0,E=0,D=0;class w extends p.Disposable{constructor(T,O,L,P){super(),this._terminal=T,this._gl=O,this._dimensions=L,this._themeService=P,this._vertices=new S,this._verticesCursor=new S;const R=this._gl;this._program=(0,c.throwIfFalsy)((0,g.createProgram)(R,`#version 300 es
|
|
94
|
+
layout (location = 0) in vec2 a_position;
|
|
95
|
+
layout (location = 1) in vec2 a_size;
|
|
96
|
+
layout (location = 2) in vec4 a_color;
|
|
97
|
+
layout (location = 3) in vec2 a_unitquad;
|
|
98
|
+
|
|
99
|
+
uniform mat4 u_projection;
|
|
100
|
+
|
|
101
|
+
out vec4 v_color;
|
|
102
|
+
|
|
103
|
+
void main() {
|
|
104
|
+
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
105
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
106
|
+
v_color = a_color;
|
|
107
|
+
}`,`#version 300 es
|
|
108
|
+
precision lowp float;
|
|
109
|
+
|
|
110
|
+
in vec4 v_color;
|
|
111
|
+
|
|
112
|
+
out vec4 outColor;
|
|
113
|
+
|
|
114
|
+
void main() {
|
|
115
|
+
outColor = v_color;
|
|
116
|
+
}`)),this.register((0,p.toDisposable)((()=>R.deleteProgram(this._program)))),this._projectionLocation=(0,c.throwIfFalsy)(R.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=R.createVertexArray(),R.bindVertexArray(this._vertexArrayObject);const I=new Float32Array([0,0,1,0,0,1,1,1]),$=R.createBuffer();this.register((0,p.toDisposable)((()=>R.deleteBuffer($)))),R.bindBuffer(R.ARRAY_BUFFER,$),R.bufferData(R.ARRAY_BUFFER,I,R.STATIC_DRAW),R.enableVertexAttribArray(3),R.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const V=new Uint8Array([0,1,2,3]),U=R.createBuffer();this.register((0,p.toDisposable)((()=>R.deleteBuffer(U)))),R.bindBuffer(R.ELEMENT_ARRAY_BUFFER,U),R.bufferData(R.ELEMENT_ARRAY_BUFFER,V,R.STATIC_DRAW),this._attributesBuffer=(0,c.throwIfFalsy)(R.createBuffer()),this.register((0,p.toDisposable)((()=>R.deleteBuffer(this._attributesBuffer)))),R.bindBuffer(R.ARRAY_BUFFER,this._attributesBuffer),R.enableVertexAttribArray(0),R.vertexAttribPointer(0,2,R.FLOAT,!1,b,0),R.vertexAttribDivisor(0,1),R.enableVertexAttribArray(1),R.vertexAttribPointer(1,2,R.FLOAT,!1,b,2*Float32Array.BYTES_PER_ELEMENT),R.vertexAttribDivisor(1,1),R.enableVertexAttribArray(2),R.vertexAttribPointer(2,4,R.FLOAT,!1,b,4*Float32Array.BYTES_PER_ELEMENT),R.vertexAttribDivisor(2,1),this._updateCachedColors(P.colors),this.register(this._themeService.onChangeColors((K=>{this._updateCachedColors(K),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(T){const O=this._gl;O.useProgram(this._program),O.bindVertexArray(this._vertexArrayObject),O.uniformMatrix4fv(this._projectionLocation,!1,g.PROJECTION_MATRIX),O.bindBuffer(O.ARRAY_BUFFER,this._attributesBuffer),O.bufferData(O.ARRAY_BUFFER,T.attributes,O.DYNAMIC_DRAW),O.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,O.UNSIGNED_BYTE,0,T.count)}handleResize(){this._updateViewportRectangle()}setDimensions(T){this._dimensions=T}_updateCachedColors(T){this._bgFloat=this._colorToFloat32Array(T.background),this._cursorFloat=this._colorToFloat32Array(T.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(T){const O=this._terminal,L=this._vertices;let P,R,I,$,V,U,K,G,N,H,z,q=1;for(P=0;P<O.rows;P++){for(I=-1,$=0,V=0,U=!1,R=0;R<O.cols;R++)K=(P*O.cols+R)*f.RENDER_MODEL_INDICIES_PER_CELL,G=T.cells[K+f.RENDER_MODEL_BG_OFFSET],N=T.cells[K+f.RENDER_MODEL_FG_OFFSET],H=!!(67108864&N),(G!==$||N!==V&&(U||H))&&(($!==0||U&&V!==0)&&(z=8*q++,this._updateRectangle(L,z,V,$,I,R,P)),I=R,$=G,V=N,U=H);($!==0||U&&V!==0)&&(z=8*q++,this._updateRectangle(L,z,V,$,I,O.cols,P))}L.count=q}updateCursor(T){const O=this._verticesCursor,L=T.cursor;if(!L||L.style==="block")return void(O.count=0);let P,R=0;L.style!=="bar"&&L.style!=="outline"||(P=8*R++,this._addRectangleFloat(O.attributes,P,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(P=8*R++,this._addRectangleFloat(O.attributes,P,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(P=8*R++,this._addRectangleFloat(O.attributes,P,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),P=8*R++,this._addRectangleFloat(O.attributes,P,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),O.count=R}_updateRectangle(T,O,L,P,R,I,$){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:m=(16777215&L)<<8;break;default:m=this._themeService.colors.foreground.rgba}else switch(50331648&P){case 16777216:case 33554432:m=this._themeService.colors.ansi[255&P].rgba;break;case 50331648:m=(16777215&P)<<8;break;default:m=this._themeService.colors.background.rgba}T.attributes.length<O+4&&(T.attributes=(0,g.expandFloat32Array)(T.attributes,this._terminal.rows*this._terminal.cols*8)),v=R*this._dimensions.device.cell.width,y=$*this._dimensions.device.cell.height,x=(m>>24&255)/255,C=(m>>16&255)/255,E=(m>>8&255)/255,D=1,this._addRectangle(T.attributes,O,v,y,(I-R)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,x,C,E,D)}_addRectangle(T,O,L,P,R,I,$,V,U,K){T[O]=L/this._dimensions.device.canvas.width,T[O+1]=P/this._dimensions.device.canvas.height,T[O+2]=R/this._dimensions.device.canvas.width,T[O+3]=I/this._dimensions.device.canvas.height,T[O+4]=$,T[O+5]=V,T[O+6]=U,T[O+7]=K}_addRectangleFloat(T,O,L,P,R,I,$){T[O]=L/this._dimensions.device.canvas.width,T[O+1]=P/this._dimensions.device.canvas.height,T[O+2]=R/this._dimensions.device.canvas.width,T[O+3]=I/this._dimensions.device.canvas.height,T[O+4]=$[0],T[O+5]=$[1],T[O+6]=$[2],T[O+7]=$[3]}_colorToFloat32Array(T){return new Float32Array([(T.rgba>>24&255)/255,(T.rgba>>16&255)/255,(T.rgba>>8&255)/255,(255&T.rgba)/255])}}a.RectangleRenderer=w},310:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const c=u(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,c.createSelectionRenderModel)()}resize(p,f){const g=p*f*a.RENDER_MODEL_INDICIES_PER_CELL;g!==this.cells.length&&(this.cells=new Uint32Array(g),this.lineLengths=new Uint32Array(f))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const c=u(820),p=u(274),f=u(627),g=u(457),b=u(56),S=u(374),m=u(345),v=u(859),y=u(147),x=u(782),C=u(855),E=u(965),D=u(742),w=u(310),M=u(733);class T extends v.Disposable{constructor(R,I,$,V,U,K,G,N,H){super(),this._terminal=R,this._characterJoinerService=I,this._charSizeService=$,this._coreBrowserService=V,this._coreService=U,this._decorationService=K,this._optionsService=G,this._themeService=N,this._cursorBlinkStateManager=new v.MutableDisposable,this._charAtlasDisposable=this.register(new v.MutableDisposable),this._observerDisposable=this.register(new v.MutableDisposable),this._model=new w.RenderModel,this._workCell=new x.CellData,this._workCell2=new x.CellData,this._rectangleRenderer=this.register(new v.MutableDisposable),this._glyphRenderer=this.register(new v.MutableDisposable),this._onChangeTextureAtlas=this.register(new m.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new m.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new m.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new m.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new m.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new p.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new M.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,G,this._themeService)],this.dimensions=(0,S.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(G.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const z={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",z),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,c.addDisposableDomListener)(this._canvas,"webglcontextlost",(q=>{console.log("webglcontextlost event received"),q.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(q)}),3e3)}))),this.register((0,c.addDisposableDomListener)(this._canvas,"webglcontextrestored",(q=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,f.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((q,J)=>this._setCanvasDevicePixelDimensions(q,J))),this.register(this._coreBrowserService.onWindowChange((q=>{this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,q,((J,ie)=>this._setCanvasDevicePixelDimensions(J,ie)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,v.toDisposable)((()=>{var q;for(const J of this._renderLayers)J.dispose();(q=this._canvas.parentElement)==null||q.removeChild(this._canvas),(0,f.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var R;return(R=this._charAtlas)==null?void 0:R.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(R,I){var $,V,U,K;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const G of this._renderLayers)G.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,($=this._rectangleRenderer.value)==null||$.setDimensions(this.dimensions),(V=this._rectangleRenderer.value)==null||V.handleResize(),(U=this._glyphRenderer.value)==null||U.setDimensions(this.dimensions),(K=this._glyphRenderer.value)==null||K.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var R;for(const I of this._renderLayers)I.handleBlur(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.pause(),this._requestRedrawViewport()}handleFocus(){var R;for(const I of this._renderLayers)I.handleFocus(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.resume(),this._requestRedrawViewport()}handleSelectionChanged(R,I,$){for(const V of this._renderLayers)V.handleSelectionChanged(this._terminal,R,I,$);this._model.selection.update(this._core,R,I,$),this._requestRedrawViewport()}handleCursorMove(){var R;for(const I of this._renderLayers)I.handleCursorMove(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new D.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new E.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var I;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const R=(0,f.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==R&&(this._onChangeTextureAtlas.fire(R.pages[0].canvas),this._charAtlasDisposable.value=(0,v.getDisposeArrayDisposable)([(0,m.forwardEvent)(R.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,m.forwardEvent)(R.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=R,this._charAtlas.warmUp(),(I=this._glyphRenderer.value)==null||I.setAtlas(this._charAtlas)}_clearModel(R){var I;this._model.clear(),R&&((I=this._glyphRenderer.value)==null||I.clear())}clearTextureAtlas(){var R;(R=this._charAtlas)==null||R.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var R;this._clearModel(!0);for(const I of this._renderLayers)I.reset(this._terminal);(R=this._cursorBlinkStateManager.value)==null||R.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(R){return-1}deregisterCharacterJoiner(R){return!1}renderRows(R,I){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const $ of this._renderLayers)$.handleGridChanged(this._terminal,R,I);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(R,I),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new g.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(R,I){const $=this._core;let V,U,K,G,N,H,z,q,J,ie,pe,he,Z,W,te=this._workCell;R=L(R,$.rows-1,0),I=L(I,$.rows-1,0);const Q=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,se=Q-$.buffer.ydisp,re=Math.min(this._terminal.buffer.active.cursorX,$.cols-1);let be=-1;const ve=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Se=!1;for(U=R;U<=I;U++)for(K=U+$.buffer.ydisp,G=$.buffer.lines.get(K),this._model.lineLengths[U]=0,N=this._characterJoinerService.getJoinedCharacters(K),Z=0;Z<$.cols;Z++)if(V=this._cellColorResolver.result.bg,G.loadCell(Z,te),Z===0&&(V=this._cellColorResolver.result.bg),H=!1,z=Z,N.length>0&&Z===N[0][0]&&(H=!0,q=N.shift(),te=new O(te,G.translateToString(!0,q[0],q[1]),q[1]-q[0]),z=q[1]-1),J=te.getChars(),ie=te.getCode(),he=(U*$.cols+Z)*w.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(te,Z,K,this.dimensions.device.cell.width),ve&&K===Q&&(Z===re&&(this._model.cursor={x:re,y:se,width:te.getWidth(),style:this._coreBrowserService.isFocused?$.options.cursorStyle||"block":$.options.cursorInactiveStyle,cursorWidth:$.options.cursorWidth,dpr:this._devicePixelRatio},be=re+te.getWidth()-1),Z>=re&&Z<=be&&(this._coreBrowserService.isFocused&&($.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&$.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),ie!==C.NULL_CELL_CODE&&(this._model.lineLengths[U]=Z+1),(this._model.cells[he]!==ie||this._model.cells[he+w.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[he+w.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[he+w.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Se=!0,J.length>1&&(ie|=w.COMBINED_CHAR_BIT_MASK),this._model.cells[he]=ie,this._model.cells[he+w.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[he+w.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[he+w.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,pe=te.getWidth(),this._glyphRenderer.value.updateCell(Z,U,ie,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,J,pe,V),H))for(te=this._workCell,Z++;Z<z;Z++)W=(U*$.cols+Z)*w.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(Z,U,C.NULL_CELL_CODE,0,0,0,C.NULL_CELL_CHAR,0,0),this._model.cells[W]=C.NULL_CELL_CODE,this._model.cells[W+w.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[W+w.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[W+w.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Se&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(R,I){this._canvas.width===R&&this._canvas.height===I||(this._canvas.width=R,this._canvas.height=I,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const R=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:R,end:R})}}a.WebglRenderer=T;class O extends y.AttributeData{constructor(R,I,$){super(),this.content=0,this.combinedData="",this.fg=R.fg,this.bg=R.bg,this.combinedData=I,this._width=$}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(R){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(P,R,I=0){return Math.max(Math.min(P,R),I)}a.JoinedCellData=O},381:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const c=u(374);function p(f,g,b){const S=(0,c.throwIfFalsy)(f.createShader(g));if(f.shaderSource(S,b),f.compileShader(S),f.getShaderParameter(S,f.COMPILE_STATUS))return S;console.error(f.getShaderInfoLog(S)),f.deleteShader(S)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(f,g,b){const S=(0,c.throwIfFalsy)(f.createProgram());if(f.attachShader(S,(0,c.throwIfFalsy)(p(f,f.VERTEX_SHADER,g))),f.attachShader(S,(0,c.throwIfFalsy)(p(f,f.FRAGMENT_SHADER,b))),f.linkProgram(S),f.getProgramParameter(S,f.LINK_STATUS))return S;console.error(f.getProgramInfoLog(S)),f.deleteProgram(S)},a.createShader=p,a.expandFloat32Array=function(f,g){const b=Math.min(2*f.length,g),S=new Float32Array(b);for(let m=0;m<f.length;m++)S[m]=f[m];return S},a.GLTexture=class{constructor(f){this.texture=f,this.version=-1}}},592:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const c=u(627),p=u(237),f=u(374),g=u(859);class b extends g.Disposable{constructor(m,v,y,x,C,E,D,w){super(),this._container=v,this._alpha=C,this._coreBrowserService=E,this._optionsService=D,this._themeService=w,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${y}-layer`),this._canvas.style.zIndex=x.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((M=>{this._refreshCharAtlas(m,M),this.reset(m)}))),this.register((0,g.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,f.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(m){}handleFocus(m){}handleCursorMove(m){}handleGridChanged(m,v,y){}handleSelectionChanged(m,v,y,x=!1){}_setTransparency(m,v){if(v===this._alpha)return;const y=this._canvas;this._alpha=v,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,y),this._refreshCharAtlas(m,this._themeService.colors),this.handleGridChanged(m,0,m.rows-1)}_refreshCharAtlas(m,v){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,c.acquireTextureAtlas)(m,this._optionsService.rawOptions,v,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(m,v){this._deviceCellWidth=v.device.cell.width,this._deviceCellHeight=v.device.cell.height,this._deviceCharWidth=v.device.char.width,this._deviceCharHeight=v.device.char.height,this._deviceCharLeft=v.device.char.left,this._deviceCharTop=v.device.char.top,this._canvas.width=v.device.canvas.width,this._canvas.height=v.device.canvas.height,this._canvas.style.width=`${v.css.canvas.width}px`,this._canvas.style.height=`${v.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(m,this._themeService.colors)}_fillBottomLineAtCells(m,v,y=1){this._ctx.fillRect(m*this._deviceCellWidth,(v+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,y*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(m,v,y,x){this._alpha?this._ctx.clearRect(m*this._deviceCellWidth,v*this._deviceCellHeight,y*this._deviceCellWidth,x*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(m*this._deviceCellWidth,v*this._deviceCellHeight,y*this._deviceCellWidth,x*this._deviceCellHeight))}_fillCharTrueColor(m,v,y,x){this._ctx.font=this._getFont(m,!1,!1),this._ctx.textBaseline=p.TEXT_BASELINE,this._clipCell(y,x,v.getWidth()),this._ctx.fillText(v.getChars(),y*this._deviceCellWidth+this._deviceCharLeft,x*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(m,v,y){this._ctx.beginPath(),this._ctx.rect(m*this._deviceCellWidth,v*this._deviceCellHeight,y*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(m,v,y){return`${y?"italic":""} ${v?m.options.fontWeightBold:m.options.fontWeight} ${m.options.fontSize*this._coreBrowserService.dpr}px ${m.options.fontFamily}`}}a.BaseRenderLayer=b},733:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const c=u(197),p=u(237),f=u(592);class g extends f.BaseRenderLayer{constructor(S,m,v,y,x,C,E){super(v,S,"link",m,!0,x,C,E),this.register(y.onShowLinkUnderline((D=>this._handleShowLinkUnderline(D)))),this.register(y.onHideLinkUnderline((D=>this._handleHideLinkUnderline(D))))}resize(S,m){super.resize(S,m),this._state=void 0}reset(S){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const S=this._state.y2-this._state.y1-1;S>0&&this._clearCells(0,this._state.y1+1,this._state.cols,S),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(S){if(S.fg===p.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:S.fg!==void 0&&(0,c.is256Color)(S.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[S.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,S.y1===S.y2)this._fillBottomLineAtCells(S.x1,S.y1,S.x2-S.x1);else{this._fillBottomLineAtCells(S.x1,S.y1,S.cols-S.x1);for(let m=S.y1+1;m<S.y2;m++)this._fillBottomLineAtCells(0,m,S.cols);this._fillBottomLineAtCells(0,S.y2,S.x2)}this._state=S}_handleHideLinkUnderline(S){this._clearCurrentLink()}}a.LinkRenderLayer=g},820:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,c,p,f){u.addEventListener(c,p,f);let g=!1;return{dispose:()=>{g||(g=!0,u.removeEventListener(c,p,f))}}}},274:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const c=u(855),p=u(160),f=u(374);let g,b=0,S=0,m=!1,v=!1,y=!1,x=0;a.CellColorResolver=class{constructor(C,E,D,w,M,T){this._terminal=C,this._optionService=E,this._selectionRenderModel=D,this._decorationService=w,this._coreBrowserService=M,this._themeService=T,this.result={fg:0,bg:0,ext:0}}resolve(C,E,D,w){if(this.result.bg=C.bg,this.result.fg=C.fg,this.result.ext=268435456&C.bg?C.extended.ext:0,S=0,b=0,v=!1,m=!1,y=!1,g=this._themeService.colors,x=0,C.getCode()!==c.NULL_CELL_CODE&&C.extended.underlineStyle===4){const M=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));x=E*w%(2*Math.round(M))}if(this._decorationService.forEachDecorationAtCell(E,D,"bottom",(M=>{M.backgroundColorRGB&&(S=M.backgroundColorRGB.rgba>>8&16777215,v=!0),M.foregroundColorRGB&&(b=M.foregroundColorRGB.rgba>>8&16777215,m=!0)})),y=this._selectionRenderModel.isCellSelected(this._terminal,E,D),y){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:S=(16777215&this.result.fg)<<8|255;break;default:S=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:S=(16777215&this.result.bg)<<8|255}S=p.rgba.blend(S,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else S=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(v=!0,g.selectionForeground&&(b=g.selectionForeground.rgba>>8&16777215,m=!0),(0,f.treatGlyphAsBackgroundColor)(C.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}b=p.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}m=!0}}this._decorationService.forEachDecorationAtCell(E,D,"top",(M=>{M.backgroundColorRGB&&(S=M.backgroundColorRGB.rgba>>8&16777215,v=!0),M.foregroundColorRGB&&(b=M.foregroundColorRGB.rgba>>8&16777215,m=!0)})),v&&(S=y?-16777216&C.bg&-134217729|S|50331648:-16777216&C.bg|S|50331648),m&&(b=-16777216&C.fg&-67108865|b|50331648),67108864&this.result.fg&&(v&&!m&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,m=!0),!v&&m&&(S=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,v=!0)),g=void 0,this.result.bg=v?S:this.result.bg,this.result.fg=m?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=x<<29&3758096384}}},627:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const c=u(509),p=u(197),f=[];a.acquireTextureAtlas=function(g,b,S,m,v,y,x,C){const E=(0,p.generateConfig)(m,v,y,x,b,S,C);for(let M=0;M<f.length;M++){const T=f[M],O=T.ownedBy.indexOf(g);if(O>=0){if((0,p.configEquals)(T.config,E))return T.atlas;T.ownedBy.length===1?(T.atlas.dispose(),f.splice(M,1)):T.ownedBy.splice(O,1);break}}for(let M=0;M<f.length;M++){const T=f[M];if((0,p.configEquals)(T.config,E))return T.ownedBy.push(g),T.atlas}const D=g._core,w={atlas:new c.TextureAtlas(document,E,D.unicodeService),config:E,ownedBy:[g]};return f.push(w),w.atlas},a.removeTerminalFromCache=function(g){for(let b=0;b<f.length;b++){const S=f[b].ownedBy.indexOf(g);if(S!==-1){f[b].ownedBy.length===1?(f[b].atlas.dispose(),f.splice(b,1)):f[b].ownedBy.splice(S,1);break}}}},197:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const c=u(160);a.generateConfig=function(p,f,g,b,S,m,v){const y={foreground:m.foreground,background:m.background,cursor:c.NULL_COLOR,cursorAccent:c.NULL_COLOR,selectionForeground:c.NULL_COLOR,selectionBackgroundTransparent:c.NULL_COLOR,selectionBackgroundOpaque:c.NULL_COLOR,selectionInactiveBackgroundTransparent:c.NULL_COLOR,selectionInactiveBackgroundOpaque:c.NULL_COLOR,ansi:m.ansi.slice(),contrastCache:m.contrastCache,halfContrastCache:m.halfContrastCache};return{customGlyphs:S.customGlyphs,devicePixelRatio:v,letterSpacing:S.letterSpacing,lineHeight:S.lineHeight,deviceCellWidth:p,deviceCellHeight:f,deviceCharWidth:g,deviceCharHeight:b,fontFamily:S.fontFamily,fontSize:S.fontSize,fontWeight:S.fontWeight,fontWeightBold:S.fontWeightBold,allowTransparency:S.allowTransparency,drawBoldTextInBrightColors:S.drawBoldTextInBrightColors,minimumContrastRatio:S.minimumContrastRatio,colors:y}},a.configEquals=function(p,f){for(let g=0;g<p.colors.ansi.length;g++)if(p.colors.ansi[g].rgba!==f.colors.ansi[g].rgba)return!1;return p.devicePixelRatio===f.devicePixelRatio&&p.customGlyphs===f.customGlyphs&&p.lineHeight===f.lineHeight&&p.letterSpacing===f.letterSpacing&&p.fontFamily===f.fontFamily&&p.fontSize===f.fontSize&&p.fontWeight===f.fontWeight&&p.fontWeightBold===f.fontWeightBold&&p.allowTransparency===f.allowTransparency&&p.deviceCharWidth===f.deviceCharWidth&&p.deviceCharHeight===f.deviceCharHeight&&p.drawBoldTextInBrightColors===f.drawBoldTextInBrightColors&&p.minimumContrastRatio===f.minimumContrastRatio&&p.colors.foreground.rgba===f.colors.foreground.rgba&&p.colors.background.rgba===f.colors.background.rgba},a.is256Color=function(p){return(50331648&p)==16777216||(50331648&p)==33554432}},237:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const c=u(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},457:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(u,c){this._renderCallback=u,this._coreBrowserService=c,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const c=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,c>0)return void this._restartInterval(c)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const c=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(c)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const c=u(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const p={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(m,v)=>`M0,${.5-v} L1,${.5-v} M0,${.5+v} L1,${.5+v}`},"║":{1:(m,v)=>`M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"╒":{1:(m,v)=>`M.5,1 L.5,${.5-v} L1,${.5-v} M.5,${.5+v} L1,${.5+v}`},"╓":{1:(m,v)=>`M${.5-m},1 L${.5-m},.5 L1,.5 M${.5+m},.5 L${.5+m},1`},"╔":{1:(m,v)=>`M1,${.5-v} L${.5-m},${.5-v} L${.5-m},1 M1,${.5+v} L${.5+m},${.5+v} L${.5+m},1`},"╕":{1:(m,v)=>`M0,${.5-v} L.5,${.5-v} L.5,1 M0,${.5+v} L.5,${.5+v}`},"╖":{1:(m,v)=>`M${.5+m},1 L${.5+m},.5 L0,.5 M${.5-m},.5 L${.5-m},1`},"╗":{1:(m,v)=>`M0,${.5+v} L${.5-m},${.5+v} L${.5-m},1 M0,${.5-v} L${.5+m},${.5-v} L${.5+m},1`},"╘":{1:(m,v)=>`M.5,0 L.5,${.5+v} L1,${.5+v} M.5,${.5-v} L1,${.5-v}`},"╙":{1:(m,v)=>`M1,.5 L${.5-m},.5 L${.5-m},0 M${.5+m},.5 L${.5+m},0`},"╚":{1:(m,v)=>`M1,${.5-v} L${.5+m},${.5-v} L${.5+m},0 M1,${.5+v} L${.5-m},${.5+v} L${.5-m},0`},"╛":{1:(m,v)=>`M0,${.5+v} L.5,${.5+v} L.5,0 M0,${.5-v} L.5,${.5-v}`},"╜":{1:(m,v)=>`M0,.5 L${.5+m},.5 L${.5+m},0 M${.5-m},.5 L${.5-m},0`},"╝":{1:(m,v)=>`M0,${.5-v} L${.5-m},${.5-v} L${.5-m},0 M0,${.5+v} L${.5+m},${.5+v} L${.5+m},0`},"╞":{1:(m,v)=>`M.5,0 L.5,1 M.5,${.5-v} L1,${.5-v} M.5,${.5+v} L1,${.5+v}`},"╟":{1:(m,v)=>`M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1 M${.5+m},.5 L1,.5`},"╠":{1:(m,v)=>`M${.5-m},0 L${.5-m},1 M1,${.5+v} L${.5+m},${.5+v} L${.5+m},1 M1,${.5-v} L${.5+m},${.5-v} L${.5+m},0`},"╡":{1:(m,v)=>`M.5,0 L.5,1 M0,${.5-v} L.5,${.5-v} M0,${.5+v} L.5,${.5+v}`},"╢":{1:(m,v)=>`M0,.5 L${.5-m},.5 M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"╣":{1:(m,v)=>`M${.5+m},0 L${.5+m},1 M0,${.5+v} L${.5-m},${.5+v} L${.5-m},1 M0,${.5-v} L${.5-m},${.5-v} L${.5-m},0`},"╤":{1:(m,v)=>`M0,${.5-v} L1,${.5-v} M0,${.5+v} L1,${.5+v} M.5,${.5+v} L.5,1`},"╥":{1:(m,v)=>`M0,.5 L1,.5 M${.5-m},.5 L${.5-m},1 M${.5+m},.5 L${.5+m},1`},"╦":{1:(m,v)=>`M0,${.5-v} L1,${.5-v} M0,${.5+v} L${.5-m},${.5+v} L${.5-m},1 M1,${.5+v} L${.5+m},${.5+v} L${.5+m},1`},"╧":{1:(m,v)=>`M.5,0 L.5,${.5-v} M0,${.5-v} L1,${.5-v} M0,${.5+v} L1,${.5+v}`},"╨":{1:(m,v)=>`M0,.5 L1,.5 M${.5-m},.5 L${.5-m},0 M${.5+m},.5 L${.5+m},0`},"╩":{1:(m,v)=>`M0,${.5+v} L1,${.5+v} M0,${.5-v} L${.5-m},${.5-v} L${.5-m},0 M1,${.5-v} L${.5+m},${.5-v} L${.5+m},0`},"╪":{1:(m,v)=>`M.5,0 L.5,1 M0,${.5-v} L1,${.5-v} M0,${.5+v} L1,${.5+v}`},"╫":{1:(m,v)=>`M0,.5 L1,.5 M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"╬":{1:(m,v)=>`M0,${.5+v} L${.5-m},${.5+v} L${.5-m},1 M1,${.5+v} L${.5+m},${.5+v} L${.5+m},1 M0,${.5-v} L${.5-m},${.5-v} L${.5-m},0 M1,${.5-v} L${.5+m},${.5-v} L${.5+m},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(m,v)=>`M.5,1 L.5,${.5+v/.15*.5} C.5,${.5+v/.15*.5},.5,.5,1,.5`},"╮":{1:(m,v)=>`M.5,1 L.5,${.5+v/.15*.5} C.5,${.5+v/.15*.5},.5,.5,0,.5`},"╯":{1:(m,v)=>`M.5,0 L.5,${.5-v/.15*.5} C.5,${.5-v/.15*.5},.5,.5,0,.5`},"╰":{1:(m,v)=>`M.5,0 L.5,${.5-v/.15*.5} C.5,${.5-v/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(m,v,y,x,C,E,D,w){const M=a.blockElementDefinitions[v];if(M)return(function(P,R,I,$,V,U){for(let K=0;K<R.length;K++){const G=R[K],N=V/8,H=U/8;P.fillRect(I+G.x*N,$+G.y*H,G.w*N,G.h*H)}})(m,M,y,x,C,E),!0;const T=p[v];if(T)return(function(P,R,I,$,V,U){let K=f.get(R);K||(K=new Map,f.set(R,K));const G=P.fillStyle;if(typeof G!="string")throw new Error(`Unexpected fillStyle type "${G}"`);let N=K.get(G);if(!N){const H=R[0].length,z=R.length,q=P.canvas.ownerDocument.createElement("canvas");q.width=H,q.height=z;const J=(0,c.throwIfFalsy)(q.getContext("2d")),ie=new ImageData(H,z);let pe,he,Z,W;if(G.startsWith("#"))pe=parseInt(G.slice(1,3),16),he=parseInt(G.slice(3,5),16),Z=parseInt(G.slice(5,7),16),W=G.length>7&&parseInt(G.slice(7,9),16)||1;else{if(!G.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${G}" when drawing pattern glyph`);[pe,he,Z,W]=G.substring(5,G.length-1).split(",").map((te=>parseFloat(te)))}for(let te=0;te<z;te++)for(let Q=0;Q<H;Q++)ie.data[4*(te*H+Q)]=pe,ie.data[4*(te*H+Q)+1]=he,ie.data[4*(te*H+Q)+2]=Z,ie.data[4*(te*H+Q)+3]=R[te][Q]*(255*W);J.putImageData(ie,0,0),N=(0,c.throwIfFalsy)(P.createPattern(q,null)),K.set(G,N)}P.fillStyle=N,P.fillRect(I,$,V,U)})(m,T,y,x,C,E),!0;const O=a.boxDrawingDefinitions[v];if(O)return(function(P,R,I,$,V,U,K){P.strokeStyle=P.fillStyle;for(const[G,N]of Object.entries(R)){let H;P.beginPath(),P.lineWidth=K*Number.parseInt(G),H=typeof N=="function"?N(.15,.15/U*V):N;for(const z of H.split(" ")){const q=z[0],J=b[q];if(!J){console.error(`Could not find drawing instructions for "${q}"`);continue}const ie=z.substring(1).split(",");ie[0]&&ie[1]&&J(P,S(ie,V,U,I,$,!0,K))}P.stroke(),P.closePath()}})(m,O,y,x,C,E,w),!0;const L=a.powerlineDefinitions[v];return!!L&&((function(P,R,I,$,V,U,K,G){const N=new Path2D;N.rect(I,$,V,U),P.clip(N),P.beginPath();const H=K/12;P.lineWidth=G*H;for(const z of R.d.split(" ")){const q=z[0],J=b[q];if(!J){console.error(`Could not find drawing instructions for "${q}"`);continue}const ie=z.substring(1).split(",");ie[0]&&ie[1]&&J(P,S(ie,V,U,I,$,!1,G,(R.leftPadding??0)*(H/2),(R.rightPadding??0)*(H/2)))}R.type===1?(P.strokeStyle=P.fillStyle,P.stroke()):P.fill(),P.closePath()})(m,L,y,x,C,E,D,w),!0)};const f=new Map;function g(m,v,y=0){return Math.max(Math.min(m,v),y)}const b={C:(m,v)=>m.bezierCurveTo(v[0],v[1],v[2],v[3],v[4],v[5]),L:(m,v)=>m.lineTo(v[0],v[1]),M:(m,v)=>m.moveTo(v[0],v[1])};function S(m,v,y,x,C,E,D,w=0,M=0){const T=m.map((O=>parseFloat(O)||parseInt(O)));if(T.length<2)throw new Error("Too few arguments for instruction");for(let O=0;O<T.length;O+=2)T[O]*=v-w*D-M*D,E&&T[O]!==0&&(T[O]=g(Math.round(T[O]+.5)-.5,v,0)),T[O]+=x+w*D;for(let O=1;O<T.length;O+=2)T[O]*=y,E&&T[O]!==0&&(T[O]=g(Math.round(T[O]+.5)-.5,y,0)),T[O]+=C;return T}},56:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const c=u(859);a.observeDevicePixelDimensions=function(p,f,g){let b=new f.ResizeObserver((S=>{const m=S.find((x=>x.target===p));if(!m)return;if(!("devicePixelContentBoxSize"in m))return b==null||b.disconnect(),void(b=void 0);const v=m.devicePixelContentBoxSize[0].inlineSize,y=m.devicePixelContentBoxSize[0].blockSize;v>0&&y>0&&g(v,y)}));try{b.observe(p,{box:["device-pixel-content-box"]})}catch{b.disconnect(),b=void 0}return(0,c.toDisposable)((()=>b==null?void 0:b.disconnect()))}},374:(d,a)=>{function u(p){return 57508<=p&&p<=57558}function c(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=c,a.allowRescaling=function(p,f,g,b){return f===1&&g>Math.ceil(1.5*b)&&p!==void 0&&p>255&&!c(p)&&!u(p)&&!(function(S){return 57344<=S&&S<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return u(p)||(function(f){return 9472<=f&&f<=9631})(p)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(p,f,g=0){return(p-(2*Math.round(f)-g))%(2*Math.round(f))}},296:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,f,g,b=!1){if(this.selectionStart=f,this.selectionEnd=g,!f||!g||f[0]===g[0]&&f[1]===g[1])return void this.clear();const S=p.buffers.active.ydisp,m=f[1]-S,v=g[1]-S,y=Math.max(m,0),x=Math.min(v,p.rows-1);y>=p.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=m,this.viewportEndRow=v,this.viewportCappedStartRow=y,this.viewportCappedEndRow=x,this.startCol=f[0],this.endCol=g[0])}isCellSelected(p,f,g){return!!this.hasSelection&&(g-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&g>=this.viewportCappedStartRow&&f<this.endCol&&g<=this.viewportCappedEndRow:f<this.startCol&&g>=this.viewportCappedStartRow&&f>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},509:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const c=u(237),p=u(860),f=u(374),g=u(160),b=u(345),S=u(485),m=u(385),v=u(147),y=u(855),x={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let C;class E{get pages(){return this._pages}constructor(O,L,P){this._document=O,this._config=L,this._unicodeService=P,this._didWarmUp=!1,this._cacheMap=new S.FourKeyMap,this._cacheMapCombined=new S.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new v.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=M(O,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,f.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const O of this.pages)O.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const O=new m.IdleTaskQueue;for(let L=33;L<126;L++)O.enqueue((()=>{if(!this._cacheMap.get(L,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT)){const P=this._drawToCache(L,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT);this._cacheMap.set(L,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT,P)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const O of this._pages)O.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(E.maxAtlasPages&&this._pages.length>=Math.max(4,E.maxAtlasPages)){const L=this._pages.filter((K=>2*K.canvas.width<=(E.maxTextureSize||4096))).sort(((K,G)=>G.canvas.width!==K.canvas.width?G.canvas.width-K.canvas.width:G.percentageUsed-K.percentageUsed));let P=-1,R=0;for(let K=0;K<L.length;K++)if(L[K].canvas.width!==R)P=K,R=L[K].canvas.width;else if(K-P==3)break;const I=L.slice(P,P+4),$=I.map((K=>K.glyphs[0].texturePage)).sort(((K,G)=>K>G?1:-1)),V=this.pages.length-I.length,U=this._mergePages(I,V);U.version++;for(let K=$.length-1;K>=0;K--)this._deletePage($[K]);this.pages.push(U),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(U.canvas)}const O=new D(this._document,this._textureSize);return this._pages.push(O),this._activePages.push(O),this._onAddTextureAtlasCanvas.fire(O.canvas),O}_mergePages(O,L){const P=2*O[0].canvas.width,R=new D(this._document,P,O);for(const[I,$]of O.entries()){const V=I*$.canvas.width%P,U=Math.floor(I/2)*$.canvas.height;R.ctx.drawImage($.canvas,V,U);for(const G of $.glyphs)G.texturePage=L,G.sizeClipSpace.x=G.size.x/P,G.sizeClipSpace.y=G.size.y/P,G.texturePosition.x+=V,G.texturePosition.y+=U,G.texturePositionClipSpace.x=G.texturePosition.x/P,G.texturePositionClipSpace.y=G.texturePosition.y/P;this._onRemoveTextureAtlasCanvas.fire($.canvas);const K=this._activePages.indexOf($);K!==-1&&this._activePages.splice(K,1)}return R}_deletePage(O){this._pages.splice(O,1);for(let L=O;L<this._pages.length;L++){const P=this._pages[L];for(const R of P.glyphs)R.texturePage--;P.version++}}getRasterizedGlyphCombinedChar(O,L,P,R,I){return this._getFromCacheMap(this._cacheMapCombined,O,L,P,R,I)}getRasterizedGlyph(O,L,P,R,I){return this._getFromCacheMap(this._cacheMap,O,L,P,R,I)}_getFromCacheMap(O,L,P,R,I,$=!1){return C=O.get(L,P,R,I),C||(C=this._drawToCache(L,P,R,I,$),O.set(L,P,R,I,C)),C}_getColorFromAnsiIndex(O){if(O>=this._config.colors.ansi.length)throw new Error("No color found for idx "+O);return this._config.colors.ansi[O]}_getBackgroundColor(O,L,P,R){if(this._config.allowTransparency)return g.NULL_COLOR;let I;switch(O){case 16777216:case 33554432:I=this._getColorFromAnsiIndex(L);break;case 50331648:const $=v.AttributeData.toColorRGB(L);I=g.channels.toColor($[0],$[1],$[2]);break;default:I=P?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return I}_getForegroundColor(O,L,P,R,I,$,V,U,K,G){const N=this._getMinimumContrastColor(O,L,P,R,I,$,V,K,U,G);if(N)return N;let H;switch(I){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&K&&$<8&&($+=8),H=this._getColorFromAnsiIndex($);break;case 50331648:const z=v.AttributeData.toColorRGB($);H=g.channels.toColor(z[0],z[1],z[2]);break;default:H=V?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=g.color.opaque(H)),U&&(H=g.color.multiplyOpacity(H,c.DIM_OPACITY)),H}_resolveBackgroundRgba(O,L,P){switch(O){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return P?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(O,L,P,R){switch(O){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&R&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return P?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(O,L,P,R,I,$,V,U,K,G){if(this._config.minimumContrastRatio===1||G)return;const N=this._getContrastCache(K),H=N.getColor(O,R);if(H!==void 0)return H||void 0;const z=this._resolveBackgroundRgba(L,P,V),q=this._resolveForegroundRgba(I,$,V,U),J=g.rgba.ensureContrastRatio(z,q,this._config.minimumContrastRatio/(K?2:1));if(!J)return void N.setColor(O,R,null);const ie=g.channels.toColor(J>>24&255,J>>16&255,J>>8&255);return N.setColor(O,R,ie),ie}_getContrastCache(O){return O?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(O,L,P,R,I=!1){const $=typeof O=="number"?String.fromCharCode(O):O,V=Math.min(this._config.deviceCellWidth*Math.max($.length,2)+4,this._textureSize);this._tmpCanvas.width<V&&(this._tmpCanvas.width=V);const U=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<U&&(this._tmpCanvas.height=U),this._tmpCtx.save(),this._workAttributeData.fg=P,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=R,this._workAttributeData.isInvisible())return x;const K=!!this._workAttributeData.isBold(),G=!!this._workAttributeData.isInverse(),N=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),z=!!this._workAttributeData.isUnderline(),q=!!this._workAttributeData.isStrikethrough(),J=!!this._workAttributeData.isOverline();let ie=this._workAttributeData.getFgColor(),pe=this._workAttributeData.getFgColorMode(),he=this._workAttributeData.getBgColor(),Z=this._workAttributeData.getBgColorMode();if(G){const de=ie;ie=he,he=de;const Ee=pe;pe=Z,Z=Ee}const W=this._getBackgroundColor(Z,he,G,N);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const te=K?this._config.fontWeightBold:this._config.fontWeight,Q=H?"italic":"";this._tmpCtx.font=`${Q} ${te} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=c.TEXT_BASELINE;const se=$.length===1&&(0,f.isPowerlineGlyph)($.charCodeAt(0)),re=$.length===1&&(0,f.isRestrictedPowerlineGlyph)($.charCodeAt(0)),be=this._getForegroundColor(L,Z,he,P,pe,ie,G,N,K,(0,f.treatGlyphAsBackgroundColor)($.charCodeAt(0)));this._tmpCtx.fillStyle=be.css;const ve=re?0:4;let Se=!1;this._config.customGlyphs!==!1&&(Se=(0,p.tryDrawCustomChar)(this._tmpCtx,$,ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Le,xe=!se;if(Le=typeof O=="number"?this._unicodeService.wcwidth(O):this._unicodeService.getStringCellWidth(O),z){this._tmpCtx.save();const de=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ee=de%2==1?.5:0;if(this._tmpCtx.lineWidth=de,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())xe=!1,this._tmpCtx.strokeStyle=`rgb(${v.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{xe=!1;let Ue=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ue<8&&(Ue+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ue).css}this._tmpCtx.beginPath();const $e=ve,je=Math.ceil(ve+this._config.deviceCharHeight)-Ee-(I?2*de:0),qt=je+de,ct=je+2*de;let _t=this._workAttributeData.getUnderlineVariantOffset();for(let Ue=0;Ue<Le;Ue++){this._tmpCtx.save();const Pe=$e+Ue*this._config.deviceCellWidth,Oe=$e+(Ue+1)*this._config.deviceCellWidth,rr=Pe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Pe,je),this._tmpCtx.lineTo(Oe,je),this._tmpCtx.moveTo(Pe,ct),this._tmpCtx.lineTo(Oe,ct);break;case 3:const yt=de<=1?ct:Math.ceil(ve+this._config.deviceCharHeight-de/2)-Ee,Wt=de<=1?je:Math.ceil(ve+this._config.deviceCharHeight+de/2)-Ee,Rt=new Path2D;Rt.rect(Pe,je,this._config.deviceCellWidth,ct-je),this._tmpCtx.clip(Rt),this._tmpCtx.moveTo(Pe-this._config.deviceCellWidth/2,qt),this._tmpCtx.bezierCurveTo(Pe-this._config.deviceCellWidth/2,Wt,Pe,Wt,Pe,qt),this._tmpCtx.bezierCurveTo(Pe,yt,rr,yt,rr,qt),this._tmpCtx.bezierCurveTo(rr,Wt,Oe,Wt,Oe,qt),this._tmpCtx.bezierCurveTo(Oe,yt,Oe+this._config.deviceCellWidth/2,yt,Oe+this._config.deviceCellWidth/2,qt);break;case 4:const Ur=_t===0?0:_t>=de?2*de-_t:de-_t;_t>=de||Ur===0?(this._tmpCtx.setLineDash([Math.round(de),Math.round(de)]),this._tmpCtx.moveTo(Pe+Ur,je),this._tmpCtx.lineTo(Oe,je)):(this._tmpCtx.setLineDash([Math.round(de),Math.round(de)]),this._tmpCtx.moveTo(Pe,je),this._tmpCtx.lineTo(Pe+Ur,je),this._tmpCtx.moveTo(Pe+Ur+de,je),this._tmpCtx.lineTo(Oe,je)),_t=(0,f.computeNextVariantOffset)(Oe-Pe,de,_t);break;case 5:const Ki=.6,Yi=.3,Pt=Oe-Pe,yr=Math.floor(Ki*Pt),qr=Math.floor(Yi*Pt),Br=Pt-yr-qr;this._tmpCtx.setLineDash([yr,qr,Br]),this._tmpCtx.moveTo(Pe,je),this._tmpCtx.lineTo(Oe,je);break;default:this._tmpCtx.moveTo(Pe,je),this._tmpCtx.lineTo(Oe,je)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Se&&this._config.fontSize>=12&&!this._config.allowTransparency&&$!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ue=this._tmpCtx.measureText($);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ue&&Ue.actualBoundingBoxDescent>0){this._tmpCtx.save();const Pe=new Path2D;Pe.rect($e,je-Math.ceil(de/2),this._config.deviceCellWidth*Le,ct-je+Math.ceil(de/2)),this._tmpCtx.clip(Pe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=W.css,this._tmpCtx.strokeText($,ve,ve+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(J){const de=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ee=de%2==1?.5:0;this._tmpCtx.lineWidth=de,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+Ee),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*Le,ve+Ee),this._tmpCtx.stroke()}if(Se||this._tmpCtx.fillText($,ve,ve+this._config.deviceCharHeight),$==="_"&&!this._config.allowTransparency){let de=w(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),W,be,xe);if(de)for(let Ee=1;Ee<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText($,ve,ve+this._config.deviceCharHeight-Ee),de=w(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),W,be,xe),de);Ee++);}if(q){const de=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ee=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=de,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+Math.floor(this._config.deviceCharHeight/2)-Ee),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*Le,ve+Math.floor(this._config.deviceCharHeight/2)-Ee),this._tmpCtx.stroke()}this._tmpCtx.restore();const Ke=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let xt;if(xt=this._config.allowTransparency?(function(de){for(let Ee=0;Ee<de.data.length;Ee+=4)if(de.data[Ee+3]>0)return!1;return!0})(Ke):w(Ke,W,be,xe),xt)return x;const Ae=this._findGlyphBoundingBox(Ke,this._workBoundingBox,V,re,Se,ve);let Ce,we;for(;;){if(this._activePages.length===0){const de=this._createNewPage();Ce=de,we=de.currentRow,we.height=Ae.size.y;break}Ce=this._activePages[this._activePages.length-1],we=Ce.currentRow;for(const de of this._activePages)Ae.size.y<=de.currentRow.height&&(Ce=de,we=de.currentRow);for(let de=this._activePages.length-1;de>=0;de--)for(const Ee of this._activePages[de].fixedRows)Ee.height<=we.height&&Ae.size.y<=Ee.height&&(Ce=this._activePages[de],we=Ee);if(we.y+Ae.size.y>=Ce.canvas.height||we.height>Ae.size.y+2){let de=!1;if(Ce.currentRow.y+Ce.currentRow.height+Ae.size.y>=Ce.canvas.height){let Ee;for(const $e of this._activePages)if($e.currentRow.y+$e.currentRow.height+Ae.size.y<$e.canvas.height){Ee=$e;break}if(Ee)Ce=Ee;else if(E.maxAtlasPages&&this._pages.length>=E.maxAtlasPages&&we.y+Ae.size.y<=Ce.canvas.height&&we.height>=Ae.size.y&&we.x+Ae.size.x<=Ce.canvas.width)de=!0;else{const $e=this._createNewPage();Ce=$e,we=$e.currentRow,we.height=Ae.size.y,de=!0}}de||(Ce.currentRow.height>0&&Ce.fixedRows.push(Ce.currentRow),we={x:0,y:Ce.currentRow.y+Ce.currentRow.height,height:Ae.size.y},Ce.fixedRows.push(we),Ce.currentRow={x:0,y:we.y+we.height,height:0})}if(we.x+Ae.size.x<=Ce.canvas.width)break;we===Ce.currentRow?(we.x=0,we.y+=we.height,we.height=0):Ce.fixedRows.splice(Ce.fixedRows.indexOf(we),1)}return Ae.texturePage=this._pages.indexOf(Ce),Ae.texturePosition.x=we.x,Ae.texturePosition.y=we.y,Ae.texturePositionClipSpace.x=we.x/Ce.canvas.width,Ae.texturePositionClipSpace.y=we.y/Ce.canvas.height,Ae.sizeClipSpace.x/=Ce.canvas.width,Ae.sizeClipSpace.y/=Ce.canvas.height,we.height=Math.max(we.height,Ae.size.y),we.x+=Ae.size.x,Ce.ctx.putImageData(Ke,Ae.texturePosition.x-this._workBoundingBox.left,Ae.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Ae.size.x,Ae.size.y),Ce.addGlyph(Ae),Ce.version++,Ae}_findGlyphBoundingBox(O,L,P,R,I,$){L.top=0;const V=R?this._config.deviceCellHeight:this._tmpCanvas.height,U=R?this._config.deviceCellWidth:P;let K=!1;for(let G=0;G<V;G++){for(let N=0;N<U;N++){const H=G*this._tmpCanvas.width*4+4*N+3;if(O.data[H]!==0){L.top=G,K=!0;break}}if(K)break}L.left=0,K=!1;for(let G=0;G<$+U;G++){for(let N=0;N<V;N++){const H=N*this._tmpCanvas.width*4+4*G+3;if(O.data[H]!==0){L.left=G,K=!0;break}}if(K)break}L.right=U,K=!1;for(let G=$+U-1;G>=$;G--){for(let N=0;N<V;N++){const H=N*this._tmpCanvas.width*4+4*G+3;if(O.data[H]!==0){L.right=G,K=!0;break}}if(K)break}L.bottom=V,K=!1;for(let G=V-1;G>=0;G--){for(let N=0;N<U;N++){const H=G*this._tmpCanvas.width*4+4*N+3;if(O.data[H]!==0){L.bottom=G,K=!0;break}}if(K)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+$+(R||I?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+$+(R||I?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=E;class D{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(O){this._glyphs.push(O),this._usedPixels+=O.size.x*O.size.y}constructor(O,L,P){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],P)for(const R of P)this._glyphs.push(...R.glyphs),this._usedPixels+=R._usedPixels;this.canvas=M(O,L,L),this.ctx=(0,f.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function w(T,O,L,P){const R=O.rgba>>>24,I=O.rgba>>>16&255,$=O.rgba>>>8&255,V=L.rgba>>>24,U=L.rgba>>>16&255,K=L.rgba>>>8&255,G=Math.floor((Math.abs(R-V)+Math.abs(I-U)+Math.abs($-K))/12);let N=!0;for(let H=0;H<T.data.length;H+=4)T.data[H]===R&&T.data[H+1]===I&&T.data[H+2]===$||P&&Math.abs(T.data[H]-R)+Math.abs(T.data[H+1]-I)+Math.abs(T.data[H+2]-$)<G?T.data[H+3]=0:N=!1;return N}function M(T,O,L){const P=T.createElement("canvas");return P.width=O,P.height=L,P}},160:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,c=0,p=0,f=0;var g,b,S,m,v;function y(C){const E=C.toString(16);return E.length<2?"0"+E:E}function x(C,E){return C<E?(E+.05)/(C+.05):(C+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(C){C.toCss=function(E,D,w,M){return M!==void 0?`#${y(E)}${y(D)}${y(w)}${y(M)}`:`#${y(E)}${y(D)}${y(w)}`},C.toRgba=function(E,D,w,M=255){return(E<<24|D<<16|w<<8|M)>>>0},C.toColor=function(E,D,w,M){return{css:C.toCss(E,D,w,M),rgba:C.toRgba(E,D,w,M)}}})(g||(a.channels=g={})),(function(C){function E(D,w){return f=Math.round(255*w),[u,c,p]=v.toChannels(D.rgba),{css:g.toCss(u,c,p,f),rgba:g.toRgba(u,c,p,f)}}C.blend=function(D,w){if(f=(255&w.rgba)/255,f===1)return{css:w.css,rgba:w.rgba};const M=w.rgba>>24&255,T=w.rgba>>16&255,O=w.rgba>>8&255,L=D.rgba>>24&255,P=D.rgba>>16&255,R=D.rgba>>8&255;return u=L+Math.round((M-L)*f),c=P+Math.round((T-P)*f),p=R+Math.round((O-R)*f),{css:g.toCss(u,c,p),rgba:g.toRgba(u,c,p)}},C.isOpaque=function(D){return(255&D.rgba)==255},C.ensureContrastRatio=function(D,w,M){const T=v.ensureContrastRatio(D.rgba,w.rgba,M);if(T)return g.toColor(T>>24&255,T>>16&255,T>>8&255)},C.opaque=function(D){const w=(255|D.rgba)>>>0;return[u,c,p]=v.toChannels(w),{css:g.toCss(u,c,p),rgba:w}},C.opacity=E,C.multiplyOpacity=function(D,w){return f=255&D.rgba,E(D,f*w/255)},C.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(b||(a.color=b={})),(function(C){let E,D;try{const w=document.createElement("canvas");w.width=1,w.height=1;const M=w.getContext("2d",{willReadFrequently:!0});M&&(E=M,E.globalCompositeOperation="copy",D=E.createLinearGradient(0,0,1,1))}catch{}C.toColor=function(w){if(w.match(/#[\da-f]{3,8}/i))switch(w.length){case 4:return u=parseInt(w.slice(1,2).repeat(2),16),c=parseInt(w.slice(2,3).repeat(2),16),p=parseInt(w.slice(3,4).repeat(2),16),g.toColor(u,c,p);case 5:return u=parseInt(w.slice(1,2).repeat(2),16),c=parseInt(w.slice(2,3).repeat(2),16),p=parseInt(w.slice(3,4).repeat(2),16),f=parseInt(w.slice(4,5).repeat(2),16),g.toColor(u,c,p,f);case 7:return{css:w,rgba:(parseInt(w.slice(1),16)<<8|255)>>>0};case 9:return{css:w,rgba:parseInt(w.slice(1),16)>>>0}}const M=w.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(M)return u=parseInt(M[1]),c=parseInt(M[2]),p=parseInt(M[3]),f=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),g.toColor(u,c,p,f);if(!E||!D)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=D,E.fillStyle=w,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,c,p,f]=E.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,c,p,f),css:w}}})(S||(a.css=S={})),(function(C){function E(D,w,M){const T=D/255,O=w/255,L=M/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}C.relativeLuminance=function(D){return E(D>>16&255,D>>8&255,255&D)},C.relativeLuminance2=E})(m||(a.rgb=m={})),(function(C){function E(w,M,T){const O=w>>24&255,L=w>>16&255,P=w>>8&255;let R=M>>24&255,I=M>>16&255,$=M>>8&255,V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));for(;V<T&&(R>0||I>0||$>0);)R-=Math.max(0,Math.ceil(.1*R)),I-=Math.max(0,Math.ceil(.1*I)),$-=Math.max(0,Math.ceil(.1*$)),V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));return(R<<24|I<<16|$<<8|255)>>>0}function D(w,M,T){const O=w>>24&255,L=w>>16&255,P=w>>8&255;let R=M>>24&255,I=M>>16&255,$=M>>8&255,V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));for(;V<T&&(R<255||I<255||$<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),I=Math.min(255,I+Math.ceil(.1*(255-I))),$=Math.min(255,$+Math.ceil(.1*(255-$))),V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));return(R<<24|I<<16|$<<8|255)>>>0}C.blend=function(w,M){if(f=(255&M)/255,f===1)return M;const T=M>>24&255,O=M>>16&255,L=M>>8&255,P=w>>24&255,R=w>>16&255,I=w>>8&255;return u=P+Math.round((T-P)*f),c=R+Math.round((O-R)*f),p=I+Math.round((L-I)*f),g.toRgba(u,c,p)},C.ensureContrastRatio=function(w,M,T){const O=m.relativeLuminance(w>>8),L=m.relativeLuminance(M>>8);if(x(O,L)<T){if(L<O){const I=E(w,M,T),$=x(O,m.relativeLuminance(I>>8));if($<T){const V=D(w,M,T);return $>x(O,m.relativeLuminance(V>>8))?I:V}return I}const P=D(w,M,T),R=x(O,m.relativeLuminance(P>>8));if(R<T){const I=E(w,M,T);return R>x(O,m.relativeLuminance(I>>8))?P:I}return P}},C.reduceLuminance=E,C.increaseLuminance=D,C.toChannels=function(w){return[w>>24&255,w>>16&255,w>>8&255,255&w]}})(v||(a.rgba=v={})),a.toPaddedHex=y,a.contrastRatio=x},345:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===u)return void this._listeners.splice(c,1)}}})),this._event}fire(u,c){const p=[];for(let f=0;f<this._listeners.length;f++)p.push(this._listeners[f]);for(let f=0;f<p.length;f++)p[f].call(void 0,u,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,c){return u((p=>c.fire(p)))},a.runAndSubscribe=function(u,c){return c(void 0),u((p=>c(p)))}},859:(d,a)=>{function u(c){for(const p of c)p.dispose();c.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const p=this._disposables.indexOf(c);p!==-1&&this._disposables.splice(p,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var p;this._isDisposed||c===this._value||((p=this._value)==null||p.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},a.toDisposable=function(c){return{dispose:c}},a.disposeArray=u,a.getDisposeArrayDisposable=function(c){return{dispose:()=>u(c)}}},485:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(p,f,g){this._data[p]||(this._data[p]={}),this._data[p][f]=g}get(p,f){return this._data[p]?this._data[p][f]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(c,p,f,g,b){this._data.get(c,p)||this._data.set(c,p,new u),this._data.get(c,p).set(f,g,b)}get(c,p,f,g){var b;return(b=this._data.get(c,p))==null?void 0:b.get(f,g)}clear(){this._data.clear()}}},399:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const u=a.isNode?"node":navigator.userAgent,c=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const p=u.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),a.isIpad=c==="iPad",a.isIphone=c==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),a.isLinux=c.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},385:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const c=u(399);class p{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let S=0,m=0,v=b.timeRemaining(),y=0;for(;this._i<this._tasks.length;){if(S=Date.now(),this._tasks[this._i]()||this._i++,S=Math.max(1,Date.now()-S),m=Math.max(S,m),y=b.timeRemaining(),1.5*m>y)return v-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-S))}ms`),void this._start();v=y}this.clear()}}class f extends p{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const S=Date.now()+b;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}a.PriorityTaskQueue=f,a.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:f,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},147:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new u;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,g=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=g}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=c},782:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const c=u(133),p=u(855),f=u(147);class g extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const m=new g;return m.setFromCharData(S),m}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let m=!1;if(S[p.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(S[p.CHAR_DATA_CHAR_INDEX].length===2){const v=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const y=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=y&&y<=57343?this.content=1024*(v-55296)+y-56320+65536|S[p.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[p.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=S[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=g},855:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,c=0,p=u.length){let f="";for(let g=c;g<p;++g){let b=u[g];b>65535?(b-=65536,f+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):f+=String.fromCharCode(b)}return f},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,c){const p=u.length;if(!p)return 0;let f=0,g=0;if(this._interim){const b=u.charCodeAt(g++);56320<=b&&b<=57343?c[f++]=1024*(this._interim-55296)+b-56320+65536:(c[f++]=this._interim,c[f++]=b),this._interim=0}for(let b=g;b<p;++b){const S=u.charCodeAt(b);if(55296<=S&&S<=56319){if(++b>=p)return this._interim=S,f;const m=u.charCodeAt(b);56320<=m&&m<=57343?c[f++]=1024*(S-55296)+m-56320+65536:(c[f++]=S,c[f++]=m)}else S!==65279&&(c[f++]=S)}return f}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,c){const p=u.length;if(!p)return 0;let f,g,b,S,m=0,v=0,y=0;if(this.interim[0]){let E=!1,D=this.interim[0];D&=(224&D)==192?31:(240&D)==224?15:7;let w,M=0;for(;(w=63&this.interim[++M])&&M<4;)D<<=6,D|=w;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,O=T-M;for(;y<O;){if(y>=p)return 0;if(w=u[y++],(192&w)!=128){y--,E=!0;break}this.interim[M++]=w,D<<=6,D|=63&w}E||(T===2?D<128?y--:c[m++]=D:T===3?D<2048||D>=55296&&D<=57343||D===65279||(c[m++]=D):D<65536||D>1114111||(c[m++]=D)),this.interim.fill(0)}const x=p-4;let C=y;for(;C<p;){for(;!(!(C<x)||128&(f=u[C])||128&(g=u[C+1])||128&(b=u[C+2])||128&(S=u[C+3]));)c[m++]=f,c[m++]=g,c[m++]=b,c[m++]=S,C+=4;if(f=u[C++],f<128)c[m++]=f;else if((224&f)==192){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(v=(31&f)<<6|63&g,v<128){C--;continue}c[m++]=v}else if((240&f)==224){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,m;if(b=u[C++],(192&b)!=128){C--;continue}if(v=(15&f)<<12|(63&g)<<6|63&b,v<2048||v>=55296&&v<=57343||v===65279)continue;c[m++]=v}else if((248&f)==240){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,m;if(b=u[C++],(192&b)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,this.interim[2]=b,m;if(S=u[C++],(192&S)!=128){C--;continue}if(v=(7&f)<<18|(63&g)<<12|(63&b)<<6|63&S,v<65536||v>1114111)continue;c[m++]=v}}return m}}},776:function(d,a,u){var c=this&&this.__decorate||function(v,y,x,C){var E,D=arguments.length,w=D<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(v,y,x,C);else for(var M=v.length-1;M>=0;M--)(E=v[M])&&(w=(D<3?E(w):D>3?E(y,x,w):E(y,x))||w);return D>3&&w&&Object.defineProperty(y,x,w),w},p=this&&this.__param||function(v,y){return function(x,C){y(x,C,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const f=u(859),g=u(97),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let S,m=a.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let y=0;y<v.length;y++)typeof v[y]=="function"&&(v[y]=v[y]())}_log(v,y,x){this._evalLazyOptionalParams(x),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+y,...x)}trace(v,...y){var x;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.trace.bind(this._optionsService.options.logger))??console.log,v,y)}debug(v,...y){var x;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.debug.bind(this._optionsService.options.logger))??console.log,v,y)}info(v,...y){var x;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.info.bind(this._optionsService.options.logger))??console.info,v,y)}warn(v,...y){var x;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.warn.bind(this._optionsService.options.logger))??console.warn,v,y)}error(v,...y){var x;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.error.bind(this._optionsService.options.logger))??console.error,v,y)}};a.LogService=m=c([p(0,g.IOptionsService)],m),a.setTraceLogger=function(v){S=v},a.traceCall=function(v,y,x){if(typeof x.value!="function")throw new Error("not supported");const C=x.value;x.value=function(...E){if(S.logLevel!==g.LogLevelEnum.TRACE)return C.apply(this,E);S.trace(`GlyphRenderer#${C.name}(${E.map((w=>JSON.stringify(w))).join(", ")})`);const D=C.apply(this,E);return S.trace(`GlyphRenderer#${C.name} return`,D),D}}},726:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",c="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(p){return p[c]||[]},a.createDecorator=function(p){if(a.serviceRegistry.has(p))return a.serviceRegistry.get(p);const f=function(g,b,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(m,v,y){v[u]===v?v[c].push({id:m,index:y}):(v[c]=[{id:m,index:y}],v[u]=v)})(f,g,S)};return f.toString=()=>p,a.serviceRegistry.set(p,f),f}},97:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const c=u(726);var p;a.IBufferService=(0,c.createDecorator)("BufferService"),a.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),a.ICoreService=(0,c.createDecorator)("CoreService"),a.ICharsetService=(0,c.createDecorator)("CharsetService"),a.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(p||(a.LogLevelEnum=p={})),a.ILogService=(0,c.createDecorator)("LogService"),a.IOptionsService=(0,c.createDecorator)("OptionsService"),a.IOscLinkService=(0,c.createDecorator)("OscLinkService"),a.IUnicodeService=(0,c.createDecorator)("UnicodeService"),a.IDecorationService=(0,c.createDecorator)("DecorationService")}},i={};function o(d){var a=i[d];if(a!==void 0)return a.exports;var u=i[d]={exports:{}};return r[d].call(u.exports,u,u.exports,o),u.exports}var l={};return(()=>{var d=l;Object.defineProperty(d,"__esModule",{value:!0}),d.WebglAddon=void 0;const a=o(345),u=o(859),c=o(399),p=o(666),f=o(776);class g extends u.Disposable{constructor(S){if(c.isSafari&&(0,c.getSafariVersion)()<16){const m={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",m))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=S,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(S){const m=S._core;if(!S.element)return void this.register(m.onWillOpen((()=>this.activate(S))));this._terminal=S;const v=m.coreService,y=m.optionsService,x=m,C=x._renderService,E=x._characterJoinerService,D=x._charSizeService,w=x._coreBrowserService,M=x._decorationService,T=x._logService,O=x._themeService;(0,f.setTraceLogger)(T),this._renderer=this.register(new p.WebglRenderer(S,E,D,w,v,M,y,O,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),C.setRenderer(this._renderer),this.register((0,u.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(S.cols,S.rows)})))}get textureAtlas(){var S;return(S=this._renderer)==null?void 0:S.textureAtlas}clearTextureAtlas(){var S;(S=this._renderer)==null||S.clearTextureAtlas()}}d.WebglAddon=g})(),l})()))})(yv)),yv.exports}var zL=FL(),bv={exports:{}},rx;function HL(){return rx||(rx=1,(function(e,t){(function(r,i){e.exports=i()})(self,(()=>(()=>{var r={903:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const c=u(274),p=u(627),f=u(237),g=u(860),b=u(374),S=u(296),m=u(345),v=u(859),y=u(399),x=u(855);class C extends v.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var w;return(w=this._charAtlas)==null?void 0:w.pages[0].canvas}constructor(w,M,T,O,L,P,R,I,$,V){super(),this._terminal=w,this._container=M,this._alpha=L,this._themeService=P,this._bufferService=R,this._optionsService=I,this._decorationService=$,this._coreBrowserService=V,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,S.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new v.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new m.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new c.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${T}-layer`),this._canvas.style.zIndex=O.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((U=>{this._refreshCharAtlas(U),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,v.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,b.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(w,M){}handleSelectionChanged(w,M,T=!1){this._selectionModel.update(this._terminal._core,w,M,T)}_setTransparency(w){if(w===this._alpha)return;const M=this._canvas;this._alpha=w,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,M),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(w){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,p.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,w,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,m.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let M=0;M<this._charAtlas.pages.length;M++)this._bitmapGenerator[M]=new E(this._charAtlas.pages[M].canvas)}}resize(w){this._deviceCellWidth=w.device.cell.width,this._deviceCellHeight=w.device.cell.height,this._deviceCharWidth=w.device.char.width,this._deviceCharHeight=w.device.char.height,this._deviceCharLeft=w.device.char.left,this._deviceCharTop=w.device.char.top,this._canvas.width=w.device.canvas.width,this._canvas.height=w.device.canvas.height,this._canvas.style.width=`${w.css.canvas.width}px`,this._canvas.style.height=`${w.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var w;(w=this._charAtlas)==null||w.clearTexture()}_fillCells(w,M,T,O){this._ctx.fillRect(w*this._deviceCellWidth,M*this._deviceCellHeight,T*this._deviceCellWidth,O*this._deviceCellHeight)}_fillMiddleLineAtCells(w,M,T=1){const O=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(w*this._deviceCellWidth,(M+1)*this._deviceCellHeight-O-this._coreBrowserService.dpr,T*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(w,M,T=1,O=0){this._ctx.fillRect(w*this._deviceCellWidth,(M+1)*this._deviceCellHeight+O-this._coreBrowserService.dpr-1,T*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(w,M,T=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const O=this._coreBrowserService.dpr;this._ctx.lineWidth=O;for(let L=0;L<T;L++){const P=(w+L)*this._deviceCellWidth,R=(w+L+.5)*this._deviceCellWidth,I=(w+L+1)*this._deviceCellWidth,$=(M+1)*this._deviceCellHeight-O-1,V=$-O,U=$+O;this._ctx.moveTo(P,$),this._ctx.bezierCurveTo(P,V,R,V,R,$),this._ctx.bezierCurveTo(R,U,I,U,I,$)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(w,M,T=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const O=this._coreBrowserService.dpr;this._ctx.lineWidth=O,this._ctx.setLineDash([2*O,O]);const L=w*this._deviceCellWidth,P=(M+1)*this._deviceCellHeight-O-1;this._ctx.moveTo(L,P);for(let R=0;R<T;R++){const I=(w+T+R)*this._deviceCellWidth;this._ctx.lineTo(I,P)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(w,M,T=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const O=this._coreBrowserService.dpr;this._ctx.lineWidth=O,this._ctx.setLineDash([4*O,3*O]);const L=w*this._deviceCellWidth,P=(w+T)*this._deviceCellWidth,R=(M+1)*this._deviceCellHeight-O-1;this._ctx.moveTo(L,R),this._ctx.lineTo(P,R),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(w,M,T){this._ctx.fillRect(w*this._deviceCellWidth,M*this._deviceCellHeight,this._coreBrowserService.dpr*T,this._deviceCellHeight)}_strokeRectAtCell(w,M,T,O){const L=this._coreBrowserService.dpr;this._ctx.lineWidth=L,this._ctx.strokeRect(w*this._deviceCellWidth+L/2,M*this._deviceCellHeight+L/2,T*this._deviceCellWidth-L,O*this._deviceCellHeight-L)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(w,M,T,O){this._alpha?this._ctx.clearRect(w*this._deviceCellWidth,M*this._deviceCellHeight,T*this._deviceCellWidth,O*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(w*this._deviceCellWidth,M*this._deviceCellHeight,T*this._deviceCellWidth,O*this._deviceCellHeight))}_fillCharTrueColor(w,M,T){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=f.TEXT_BASELINE,this._clipRow(T);let O=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(O=(0,g.tryDrawCustomChar)(this._ctx,w.getChars(),M*this._deviceCellWidth,T*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),O||this._ctx.fillText(w.getChars(),M*this._deviceCellWidth+this._deviceCharLeft,T*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(w,M,T){var $,V,U,K;const O=w.getChars(),L=w.getCode(),P=w.getWidth();if(this._cellColorResolver.resolve(w,M,this._bufferService.buffer.ydisp+T,this._deviceCellWidth),!this._charAtlas)return;let R;if(R=O&&O.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(O,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(w.getCode()||x.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!R.size.x||!R.size.y)return;this._ctx.save(),this._clipRow(T),this._bitmapGenerator[R.texturePage]&&this._charAtlas.pages[R.texturePage].canvas!==this._bitmapGenerator[R.texturePage].canvas&&((V=($=this._bitmapGenerator[R.texturePage])==null?void 0:$.bitmap)==null||V.close(),delete this._bitmapGenerator[R.texturePage]),this._charAtlas.pages[R.texturePage].version!==((U=this._bitmapGenerator[R.texturePage])==null?void 0:U.version)&&(this._bitmapGenerator[R.texturePage]||(this._bitmapGenerator[R.texturePage]=new E(this._charAtlas.pages[R.texturePage].canvas)),this._bitmapGenerator[R.texturePage].refresh(),this._bitmapGenerator[R.texturePage].version=this._charAtlas.pages[R.texturePage].version);let I=R.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,b.allowRescaling)(L,P,R.size.x,this._deviceCellWidth)&&(I=this._deviceCellWidth-1),this._ctx.drawImage(((K=this._bitmapGenerator[R.texturePage])==null?void 0:K.bitmap)||this._charAtlas.pages[R.texturePage].canvas,R.texturePosition.x,R.texturePosition.y,R.size.x,R.size.y,M*this._deviceCellWidth+this._deviceCharLeft-R.offset.x,T*this._deviceCellHeight+this._deviceCharTop-R.offset.y,I,R.size.y),this._ctx.restore()}_clipRow(w){this._ctx.beginPath(),this._ctx.rect(0,w*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(w,M){return`${M?"italic":""} ${w?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}a.BaseRenderLayer=C;class E{get bitmap(){return this._bitmap}constructor(w){this.canvas=w,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var w;(w=this._bitmap)==null||w.close(),this._bitmap=void 0,y.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var w;this._state===0&&((w=this._bitmap)==null||w.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((M=>{this._state===2?this.refresh():this._bitmap=M,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CanvasRenderer=void 0;const c=u(627),p=u(56),f=u(374),g=u(345),b=u(859),S=u(873),m=u(43),v=u(630),y=u(744);class x extends b.Disposable{constructor(E,D,w,M,T,O,L,P,R,I,$){super(),this._terminal=E,this._screenElement=D,this._bufferService=M,this._charSizeService=T,this._optionsService=O,this._coreBrowserService=R,this._themeService=$,this._observerDisposable=this.register(new b.MutableDisposable),this._onRequestRedraw=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new g.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new g.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const V=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new y.TextRenderLayer(this._terminal,this._screenElement,0,V,this._bufferService,this._optionsService,L,I,this._coreBrowserService,$),new v.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,I,this._optionsService,$),new m.LinkRenderLayer(this._terminal,this._screenElement,2,w,this._bufferService,this._optionsService,I,this._coreBrowserService,$),new S.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,P,this._coreBrowserService,I,$)];for(const U of this._renderLayers)(0,g.forwardEvent)(U.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,f.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,p.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((U,K)=>this._setCanvasDevicePixelDimensions(U,K))),this.register(this._coreBrowserService.onWindowChange((U=>{this._observerDisposable.value=(0,p.observeDevicePixelDimensions)(this._renderLayers[0].canvas,U,((K,G)=>this._setCanvasDevicePixelDimensions(K,G)))}))),this.register((0,b.toDisposable)((()=>{for(const U of this._renderLayers)U.dispose();(0,c.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(E,D){this._updateDimensions();for(const w of this._renderLayers)w.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation((E=>E.handleBlur()))}handleFocus(){this._runOperation((E=>E.handleFocus()))}handleSelectionChanged(E,D,w=!1){this._runOperation((M=>M.handleSelectionChanged(E,D,w))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((E=>E.handleCursorMove()))}clear(){this._runOperation((E=>E.reset()))}_runOperation(E){for(const D of this._renderLayers)E(D)}renderRows(E,D){for(const w of this._renderLayers)w.handleGridChanged(E,D)}clearTextureAtlas(){for(const E of this._renderLayers)E.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const E=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*E),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*E),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/E),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/E),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(E,D){this.dimensions.device.canvas.height=D,this.dimensions.device.canvas.width=E;for(const w of this._renderLayers)w.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}a.CanvasRenderer=x},873:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorRenderLayer=void 0;const c=u(457),p=u(859),f=u(399),g=u(782),b=u(903);class S extends b.BaseRenderLayer{constructor(v,y,x,C,E,D,w,M,T,O){super(v,y,"cursor",x,!0,O,E,D,T,M),this._onRequestRedraw=C,this._coreService=w,this._cursorBlinkStateManager=this.register(new p.MutableDisposable),this._cell=new g.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(D.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(v){super.resize(v),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var v;this._clearCursor(),(v=this._cursorBlinkStateManager.value)==null||v.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var v;(v=this._cursorBlinkStateManager.value)==null||v.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var v;(v=this._cursorBlinkStateManager.value)==null||v.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new c.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var v;(v=this._cursorBlinkStateManager.value)==null||v.restartBlinkAnimation()}handleGridChanged(v,y){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(v){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const y=this._bufferService.buffer.ybase+this._bufferService.buffer.y,x=y-this._bufferService.buffer.ydisp;if(x<0||x>=this._bufferService.rows)return void this._clearCursor();const C=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(y).loadCell(C,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const E=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;return D&&D!=="none"&&this._cursorRenderers[D](C,x,this._cell),this._ctx.restore(),this._state.x=C,this._state.y=x,this._state.isFocused=!1,this._state.style=E,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===C&&this._state.y===x&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](C,x,this._cell),this._ctx.restore(),this._state.x=C,this._state.y=x,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(f.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(v,y,x){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(v,y,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(v,y,x){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(v,y,x.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(x,v,y),this._ctx.restore()}_renderUnderlineCursor(v,y,x){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(v,y),this._ctx.restore()}_renderOutlineCursor(v,y,x){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(v,y,x.getWidth(),1),this._ctx.restore()}}a.CursorRenderLayer=S},574:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GridCache=void 0,a.GridCache=class{constructor(){this.cache=[]}resize(u,c){for(let p=0;p<u;p++){this.cache.length<=p&&this.cache.push([]);for(let f=this.cache[p].length;f<c;f++)this.cache[p].push(void 0);this.cache[p].length=c}this.cache.length=u}clear(){for(let u=0;u<this.cache.length;u++)for(let c=0;c<this.cache[u].length;c++)this.cache[u][c]=void 0}}},43:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const c=u(197),p=u(237),f=u(903);class g extends f.BaseRenderLayer{constructor(S,m,v,y,x,C,E,D,w){super(S,m,"link",v,!0,w,x,C,E,D),this.register(y.onShowLinkUnderline((M=>this._handleShowLinkUnderline(M)))),this.register(y.onHideLinkUnderline((M=>this._handleHideLinkUnderline(M))))}resize(S){super.resize(S),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const S=this._state.y2-this._state.y1-1;S>0&&this._clearCells(0,this._state.y1+1,this._state.cols,S),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(S){if(S.fg===p.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:S.fg&&(0,c.is256Color)(S.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[S.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,S.y1===S.y2)this._fillBottomLineAtCells(S.x1,S.y1,S.x2-S.x1);else{this._fillBottomLineAtCells(S.x1,S.y1,S.cols-S.x1);for(let m=S.y1+1;m<S.y2;m++)this._fillBottomLineAtCells(0,m,S.cols);this._fillBottomLineAtCells(0,S.y2,S.x2)}this._state=S}_handleHideLinkUnderline(S){this._clearCurrentLink()}}a.LinkRenderLayer=g},630:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionRenderLayer=void 0;const c=u(903);class p extends c.BaseRenderLayer{constructor(g,b,S,m,v,y,x,C){super(g,b,"selection",S,!0,C,m,x,y,v),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(g){super.resize(g),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(g,b,S){super.handleSelectionChanged(g,b,S),this._redrawSelection(g,b,S)}_redrawSelection(g,b,S){if(!this._didStateChange(g,b,S,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!g||!b)return void this._clearState();const m=g[1]-this._bufferService.buffer.ydisp,v=b[1]-this._bufferService.buffer.ydisp,y=Math.max(m,0),x=Math.min(v,this._bufferService.rows-1);if(y>=this._bufferService.rows||x<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,S){const C=g[0],E=b[0]-C,D=x-y+1;this._fillCells(C,y,E,D)}else{const C=m===y?g[0]:0,E=y===v?b[0]:this._bufferService.cols;this._fillCells(C,y,E-C,1);const D=Math.max(x-y-1,0);if(this._fillCells(0,y+1,this._bufferService.cols,D),y!==x){const w=v===x?b[0]:this._bufferService.cols;this._fillCells(0,x,w,1)}}this._state.start=[g[0],g[1]],this._state.end=[b[0],b[1]],this._state.columnSelectMode=S,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(g,b,S,m){return!this._areCoordinatesEqual(g,this._state.start)||!this._areCoordinatesEqual(b,this._state.end)||S!==this._state.columnSelectMode||m!==this._state.ydisp}_areCoordinatesEqual(g,b){return!(!g||!b)&&g[0]===b[0]&&g[1]===b[1]}}a.SelectionRenderLayer=p},744:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextRenderLayer=void 0;const c=u(577),p=u(147),f=u(782),g=u(855),b=u(903),S=u(574);class m extends b.BaseRenderLayer{constructor(y,x,C,E,D,w,M,T,O,L){super(y,x,"text",C,E,L,D,w,T,O),this._characterJoinerService=M,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new f.CellData,this._state=new S.GridCache,this.register(w.onSpecificOptionChange("allowTransparency",(P=>this._setTransparency(P))))}resize(y){super.resize(y);const x=this._getFont(!1,!1);this._characterWidth===y.device.char.width&&this._characterFont===x||(this._characterWidth=y.device.char.width,this._characterFont=x,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(y,x,C){for(let E=y;E<=x;E++){const D=E+this._bufferService.buffer.ydisp,w=this._bufferService.buffer.lines.get(D),M=this._characterJoinerService.getJoinedCharacters(D);for(let T=0;T<this._bufferService.cols;T++){w.loadCell(T,this._workCell);let O=this._workCell,L=!1,P=T;if(O.getWidth()!==0){if(M.length>0&&T===M[0][0]){L=!0;const R=M.shift();O=new c.JoinedCellData(this._workCell,w.translateToString(!0,R[0],R[1]),R[1]-R[0]),P=R[1]-1}!L&&this._isOverlapping(O)&&P<w.length-1&&w.getCodePoint(P+1)===g.NULL_CELL_CODE&&(O.content&=-12582913,O.content|=8388608),C(O,T,E),T=P}}}}_drawBackground(y,x){const C=this._ctx,E=this._bufferService.cols;let D=0,w=0,M=null;C.save(),this._forEachCell(y,x,((T,O,L)=>{let P=null;T.isInverse()?P=T.isFgDefault()?this._themeService.colors.foreground.css:T.isFgRGB()?`rgb(${p.AttributeData.toColorRGB(T.getFgColor()).join(",")})`:this._themeService.colors.ansi[T.getFgColor()].css:T.isBgRGB()?P=`rgb(${p.AttributeData.toColorRGB(T.getBgColor()).join(",")})`:T.isBgPalette()&&(P=this._themeService.colors.ansi[T.getBgColor()].css);let R=!1;this._decorationService.forEachDecorationAtCell(O,this._bufferService.buffer.ydisp+L,void 0,(I=>{I.options.layer!=="top"&&R||(I.backgroundColorRGB&&(P=I.backgroundColorRGB.css),R=I.options.layer==="top")})),M===null&&(D=O,w=L),L!==w?(C.fillStyle=M||"",this._fillCells(D,w,E-D,1),D=O,w=L):M!==P&&(C.fillStyle=M||"",this._fillCells(D,w,O-D,1),D=O,w=L),M=P})),M!==null&&(C.fillStyle=M,this._fillCells(D,w,E-D,1)),C.restore()}_drawForeground(y,x){this._forEachCell(y,x,((C,E,D)=>this._drawChars(C,E,D)))}handleGridChanged(y,x){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,y,this._bufferService.cols,x-y+1),this._drawBackground(y,x),this._drawForeground(y,x))}_isOverlapping(y){if(y.getWidth()!==1||y.getCode()<256)return!1;const x=y.getChars();if(this._characterOverlapCache.hasOwnProperty(x))return this._characterOverlapCache[x];this._ctx.save(),this._ctx.font=this._characterFont;const C=Math.floor(this._ctx.measureText(x).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[x]=C,C}}a.TextRenderLayer=m},274:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const c=u(855),p=u(160),f=u(374);let g,b=0,S=0,m=!1,v=!1,y=!1,x=0;a.CellColorResolver=class{constructor(C,E,D,w,M,T){this._terminal=C,this._optionService=E,this._selectionRenderModel=D,this._decorationService=w,this._coreBrowserService=M,this._themeService=T,this.result={fg:0,bg:0,ext:0}}resolve(C,E,D,w){if(this.result.bg=C.bg,this.result.fg=C.fg,this.result.ext=268435456&C.bg?C.extended.ext:0,S=0,b=0,v=!1,m=!1,y=!1,g=this._themeService.colors,x=0,C.getCode()!==c.NULL_CELL_CODE&&C.extended.underlineStyle===4){const M=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));x=E*w%(2*Math.round(M))}if(this._decorationService.forEachDecorationAtCell(E,D,"bottom",(M=>{M.backgroundColorRGB&&(S=M.backgroundColorRGB.rgba>>8&16777215,v=!0),M.foregroundColorRGB&&(b=M.foregroundColorRGB.rgba>>8&16777215,m=!0)})),y=this._selectionRenderModel.isCellSelected(this._terminal,E,D),y){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:S=(16777215&this.result.fg)<<8|255;break;default:S=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:S=(16777215&this.result.bg)<<8|255}S=p.rgba.blend(S,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else S=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(v=!0,g.selectionForeground&&(b=g.selectionForeground.rgba>>8&16777215,m=!0),(0,f.treatGlyphAsBackgroundColor)(C.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}b=p.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}m=!0}}this._decorationService.forEachDecorationAtCell(E,D,"top",(M=>{M.backgroundColorRGB&&(S=M.backgroundColorRGB.rgba>>8&16777215,v=!0),M.foregroundColorRGB&&(b=M.foregroundColorRGB.rgba>>8&16777215,m=!0)})),v&&(S=y?-16777216&C.bg&-134217729|S|50331648:-16777216&C.bg|S|50331648),m&&(b=-16777216&C.fg&-67108865|b|50331648),67108864&this.result.fg&&(v&&!m&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,m=!0),!v&&m&&(S=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,v=!0)),g=void 0,this.result.bg=v?S:this.result.bg,this.result.fg=m?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=x<<29&3758096384}}},627:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const c=u(509),p=u(197),f=[];a.acquireTextureAtlas=function(g,b,S,m,v,y,x,C){const E=(0,p.generateConfig)(m,v,y,x,b,S,C);for(let M=0;M<f.length;M++){const T=f[M],O=T.ownedBy.indexOf(g);if(O>=0){if((0,p.configEquals)(T.config,E))return T.atlas;T.ownedBy.length===1?(T.atlas.dispose(),f.splice(M,1)):T.ownedBy.splice(O,1);break}}for(let M=0;M<f.length;M++){const T=f[M];if((0,p.configEquals)(T.config,E))return T.ownedBy.push(g),T.atlas}const D=g._core,w={atlas:new c.TextureAtlas(document,E,D.unicodeService),config:E,ownedBy:[g]};return f.push(w),w.atlas},a.removeTerminalFromCache=function(g){for(let b=0;b<f.length;b++){const S=f[b].ownedBy.indexOf(g);if(S!==-1){f[b].ownedBy.length===1?(f[b].atlas.dispose(),f.splice(b,1)):f[b].ownedBy.splice(S,1);break}}}},197:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const c=u(160);a.generateConfig=function(p,f,g,b,S,m,v){const y={foreground:m.foreground,background:m.background,cursor:c.NULL_COLOR,cursorAccent:c.NULL_COLOR,selectionForeground:c.NULL_COLOR,selectionBackgroundTransparent:c.NULL_COLOR,selectionBackgroundOpaque:c.NULL_COLOR,selectionInactiveBackgroundTransparent:c.NULL_COLOR,selectionInactiveBackgroundOpaque:c.NULL_COLOR,ansi:m.ansi.slice(),contrastCache:m.contrastCache,halfContrastCache:m.halfContrastCache};return{customGlyphs:S.customGlyphs,devicePixelRatio:v,letterSpacing:S.letterSpacing,lineHeight:S.lineHeight,deviceCellWidth:p,deviceCellHeight:f,deviceCharWidth:g,deviceCharHeight:b,fontFamily:S.fontFamily,fontSize:S.fontSize,fontWeight:S.fontWeight,fontWeightBold:S.fontWeightBold,allowTransparency:S.allowTransparency,drawBoldTextInBrightColors:S.drawBoldTextInBrightColors,minimumContrastRatio:S.minimumContrastRatio,colors:y}},a.configEquals=function(p,f){for(let g=0;g<p.colors.ansi.length;g++)if(p.colors.ansi[g].rgba!==f.colors.ansi[g].rgba)return!1;return p.devicePixelRatio===f.devicePixelRatio&&p.customGlyphs===f.customGlyphs&&p.lineHeight===f.lineHeight&&p.letterSpacing===f.letterSpacing&&p.fontFamily===f.fontFamily&&p.fontSize===f.fontSize&&p.fontWeight===f.fontWeight&&p.fontWeightBold===f.fontWeightBold&&p.allowTransparency===f.allowTransparency&&p.deviceCharWidth===f.deviceCharWidth&&p.deviceCharHeight===f.deviceCharHeight&&p.drawBoldTextInBrightColors===f.drawBoldTextInBrightColors&&p.minimumContrastRatio===f.minimumContrastRatio&&p.colors.foreground.rgba===f.colors.foreground.rgba&&p.colors.background.rgba===f.colors.background.rgba},a.is256Color=function(p){return(50331648&p)==16777216||(50331648&p)==33554432}},237:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const c=u(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},457:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(u,c){this._renderCallback=u,this._coreBrowserService=c,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const c=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,c>0)return void this._restartInterval(c)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const c=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(c)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const c=u(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const p={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(m,v)=>`M0,${.5-v} L1,${.5-v} M0,${.5+v} L1,${.5+v}`},"║":{1:(m,v)=>`M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"╒":{1:(m,v)=>`M.5,1 L.5,${.5-v} L1,${.5-v} M.5,${.5+v} L1,${.5+v}`},"╓":{1:(m,v)=>`M${.5-m},1 L${.5-m},.5 L1,.5 M${.5+m},.5 L${.5+m},1`},"╔":{1:(m,v)=>`M1,${.5-v} L${.5-m},${.5-v} L${.5-m},1 M1,${.5+v} L${.5+m},${.5+v} L${.5+m},1`},"╕":{1:(m,v)=>`M0,${.5-v} L.5,${.5-v} L.5,1 M0,${.5+v} L.5,${.5+v}`},"╖":{1:(m,v)=>`M${.5+m},1 L${.5+m},.5 L0,.5 M${.5-m},.5 L${.5-m},1`},"╗":{1:(m,v)=>`M0,${.5+v} L${.5-m},${.5+v} L${.5-m},1 M0,${.5-v} L${.5+m},${.5-v} L${.5+m},1`},"╘":{1:(m,v)=>`M.5,0 L.5,${.5+v} L1,${.5+v} M.5,${.5-v} L1,${.5-v}`},"╙":{1:(m,v)=>`M1,.5 L${.5-m},.5 L${.5-m},0 M${.5+m},.5 L${.5+m},0`},"╚":{1:(m,v)=>`M1,${.5-v} L${.5+m},${.5-v} L${.5+m},0 M1,${.5+v} L${.5-m},${.5+v} L${.5-m},0`},"╛":{1:(m,v)=>`M0,${.5+v} L.5,${.5+v} L.5,0 M0,${.5-v} L.5,${.5-v}`},"╜":{1:(m,v)=>`M0,.5 L${.5+m},.5 L${.5+m},0 M${.5-m},.5 L${.5-m},0`},"╝":{1:(m,v)=>`M0,${.5-v} L${.5-m},${.5-v} L${.5-m},0 M0,${.5+v} L${.5+m},${.5+v} L${.5+m},0`},"╞":{1:(m,v)=>`M.5,0 L.5,1 M.5,${.5-v} L1,${.5-v} M.5,${.5+v} L1,${.5+v}`},"╟":{1:(m,v)=>`M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1 M${.5+m},.5 L1,.5`},"╠":{1:(m,v)=>`M${.5-m},0 L${.5-m},1 M1,${.5+v} L${.5+m},${.5+v} L${.5+m},1 M1,${.5-v} L${.5+m},${.5-v} L${.5+m},0`},"╡":{1:(m,v)=>`M.5,0 L.5,1 M0,${.5-v} L.5,${.5-v} M0,${.5+v} L.5,${.5+v}`},"╢":{1:(m,v)=>`M0,.5 L${.5-m},.5 M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"╣":{1:(m,v)=>`M${.5+m},0 L${.5+m},1 M0,${.5+v} L${.5-m},${.5+v} L${.5-m},1 M0,${.5-v} L${.5-m},${.5-v} L${.5-m},0`},"╤":{1:(m,v)=>`M0,${.5-v} L1,${.5-v} M0,${.5+v} L1,${.5+v} M.5,${.5+v} L.5,1`},"╥":{1:(m,v)=>`M0,.5 L1,.5 M${.5-m},.5 L${.5-m},1 M${.5+m},.5 L${.5+m},1`},"╦":{1:(m,v)=>`M0,${.5-v} L1,${.5-v} M0,${.5+v} L${.5-m},${.5+v} L${.5-m},1 M1,${.5+v} L${.5+m},${.5+v} L${.5+m},1`},"╧":{1:(m,v)=>`M.5,0 L.5,${.5-v} M0,${.5-v} L1,${.5-v} M0,${.5+v} L1,${.5+v}`},"╨":{1:(m,v)=>`M0,.5 L1,.5 M${.5-m},.5 L${.5-m},0 M${.5+m},.5 L${.5+m},0`},"╩":{1:(m,v)=>`M0,${.5+v} L1,${.5+v} M0,${.5-v} L${.5-m},${.5-v} L${.5-m},0 M1,${.5-v} L${.5+m},${.5-v} L${.5+m},0`},"╪":{1:(m,v)=>`M.5,0 L.5,1 M0,${.5-v} L1,${.5-v} M0,${.5+v} L1,${.5+v}`},"╫":{1:(m,v)=>`M0,.5 L1,.5 M${.5-m},0 L${.5-m},1 M${.5+m},0 L${.5+m},1`},"╬":{1:(m,v)=>`M0,${.5+v} L${.5-m},${.5+v} L${.5-m},1 M1,${.5+v} L${.5+m},${.5+v} L${.5+m},1 M0,${.5-v} L${.5-m},${.5-v} L${.5-m},0 M1,${.5-v} L${.5+m},${.5-v} L${.5+m},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(m,v)=>`M.5,1 L.5,${.5+v/.15*.5} C.5,${.5+v/.15*.5},.5,.5,1,.5`},"╮":{1:(m,v)=>`M.5,1 L.5,${.5+v/.15*.5} C.5,${.5+v/.15*.5},.5,.5,0,.5`},"╯":{1:(m,v)=>`M.5,0 L.5,${.5-v/.15*.5} C.5,${.5-v/.15*.5},.5,.5,0,.5`},"╰":{1:(m,v)=>`M.5,0 L.5,${.5-v/.15*.5} C.5,${.5-v/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(m,v,y,x,C,E,D,w){const M=a.blockElementDefinitions[v];if(M)return(function(P,R,I,$,V,U){for(let K=0;K<R.length;K++){const G=R[K],N=V/8,H=U/8;P.fillRect(I+G.x*N,$+G.y*H,G.w*N,G.h*H)}})(m,M,y,x,C,E),!0;const T=p[v];if(T)return(function(P,R,I,$,V,U){let K=f.get(R);K||(K=new Map,f.set(R,K));const G=P.fillStyle;if(typeof G!="string")throw new Error(`Unexpected fillStyle type "${G}"`);let N=K.get(G);if(!N){const H=R[0].length,z=R.length,q=P.canvas.ownerDocument.createElement("canvas");q.width=H,q.height=z;const J=(0,c.throwIfFalsy)(q.getContext("2d")),ie=new ImageData(H,z);let pe,he,Z,W;if(G.startsWith("#"))pe=parseInt(G.slice(1,3),16),he=parseInt(G.slice(3,5),16),Z=parseInt(G.slice(5,7),16),W=G.length>7&&parseInt(G.slice(7,9),16)||1;else{if(!G.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${G}" when drawing pattern glyph`);[pe,he,Z,W]=G.substring(5,G.length-1).split(",").map((te=>parseFloat(te)))}for(let te=0;te<z;te++)for(let Q=0;Q<H;Q++)ie.data[4*(te*H+Q)]=pe,ie.data[4*(te*H+Q)+1]=he,ie.data[4*(te*H+Q)+2]=Z,ie.data[4*(te*H+Q)+3]=R[te][Q]*(255*W);J.putImageData(ie,0,0),N=(0,c.throwIfFalsy)(P.createPattern(q,null)),K.set(G,N)}P.fillStyle=N,P.fillRect(I,$,V,U)})(m,T,y,x,C,E),!0;const O=a.boxDrawingDefinitions[v];if(O)return(function(P,R,I,$,V,U,K){P.strokeStyle=P.fillStyle;for(const[G,N]of Object.entries(R)){let H;P.beginPath(),P.lineWidth=K*Number.parseInt(G),H=typeof N=="function"?N(.15,.15/U*V):N;for(const z of H.split(" ")){const q=z[0],J=b[q];if(!J){console.error(`Could not find drawing instructions for "${q}"`);continue}const ie=z.substring(1).split(",");ie[0]&&ie[1]&&J(P,S(ie,V,U,I,$,!0,K))}P.stroke(),P.closePath()}})(m,O,y,x,C,E,w),!0;const L=a.powerlineDefinitions[v];return!!L&&((function(P,R,I,$,V,U,K,G){const N=new Path2D;N.rect(I,$,V,U),P.clip(N),P.beginPath();const H=K/12;P.lineWidth=G*H;for(const z of R.d.split(" ")){const q=z[0],J=b[q];if(!J){console.error(`Could not find drawing instructions for "${q}"`);continue}const ie=z.substring(1).split(",");ie[0]&&ie[1]&&J(P,S(ie,V,U,I,$,!1,G,(R.leftPadding??0)*(H/2),(R.rightPadding??0)*(H/2)))}R.type===1?(P.strokeStyle=P.fillStyle,P.stroke()):P.fill(),P.closePath()})(m,L,y,x,C,E,D,w),!0)};const f=new Map;function g(m,v,y=0){return Math.max(Math.min(m,v),y)}const b={C:(m,v)=>m.bezierCurveTo(v[0],v[1],v[2],v[3],v[4],v[5]),L:(m,v)=>m.lineTo(v[0],v[1]),M:(m,v)=>m.moveTo(v[0],v[1])};function S(m,v,y,x,C,E,D,w=0,M=0){const T=m.map((O=>parseFloat(O)||parseInt(O)));if(T.length<2)throw new Error("Too few arguments for instruction");for(let O=0;O<T.length;O+=2)T[O]*=v-w*D-M*D,E&&T[O]!==0&&(T[O]=g(Math.round(T[O]+.5)-.5,v,0)),T[O]+=x+w*D;for(let O=1;O<T.length;O+=2)T[O]*=y,E&&T[O]!==0&&(T[O]=g(Math.round(T[O]+.5)-.5,y,0)),T[O]+=C;return T}},56:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const c=u(859);a.observeDevicePixelDimensions=function(p,f,g){let b=new f.ResizeObserver((S=>{const m=S.find((x=>x.target===p));if(!m)return;if(!("devicePixelContentBoxSize"in m))return b==null||b.disconnect(),void(b=void 0);const v=m.devicePixelContentBoxSize[0].inlineSize,y=m.devicePixelContentBoxSize[0].blockSize;v>0&&y>0&&g(v,y)}));try{b.observe(p,{box:["device-pixel-content-box"]})}catch{b.disconnect(),b=void 0}return(0,c.toDisposable)((()=>b==null?void 0:b.disconnect()))}},374:(d,a)=>{function u(p){return 57508<=p&&p<=57558}function c(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=c,a.allowRescaling=function(p,f,g,b){return f===1&&g>Math.ceil(1.5*b)&&p!==void 0&&p>255&&!c(p)&&!u(p)&&!(function(S){return 57344<=S&&S<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return u(p)||(function(f){return 9472<=f&&f<=9631})(p)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(p,f,g=0){return(p-(2*Math.round(f)-g))%(2*Math.round(f))}},296:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,f,g,b=!1){if(this.selectionStart=f,this.selectionEnd=g,!f||!g||f[0]===g[0]&&f[1]===g[1])return void this.clear();const S=p.buffers.active.ydisp,m=f[1]-S,v=g[1]-S,y=Math.max(m,0),x=Math.min(v,p.rows-1);y>=p.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=m,this.viewportEndRow=v,this.viewportCappedStartRow=y,this.viewportCappedEndRow=x,this.startCol=f[0],this.endCol=g[0])}isCellSelected(p,f,g){return!!this.hasSelection&&(g-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&g>=this.viewportCappedStartRow&&f<this.endCol&&g<=this.viewportCappedEndRow:f<this.startCol&&g>=this.viewportCappedStartRow&&f>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},509:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const c=u(237),p=u(860),f=u(374),g=u(160),b=u(345),S=u(485),m=u(385),v=u(147),y=u(855),x={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let C;class E{get pages(){return this._pages}constructor(O,L,P){this._document=O,this._config=L,this._unicodeService=P,this._didWarmUp=!1,this._cacheMap=new S.FourKeyMap,this._cacheMapCombined=new S.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new v.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=M(O,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,f.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const O of this.pages)O.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const O=new m.IdleTaskQueue;for(let L=33;L<126;L++)O.enqueue((()=>{if(!this._cacheMap.get(L,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT)){const P=this._drawToCache(L,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT);this._cacheMap.set(L,y.DEFAULT_COLOR,y.DEFAULT_COLOR,y.DEFAULT_EXT,P)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const O of this._pages)O.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(E.maxAtlasPages&&this._pages.length>=Math.max(4,E.maxAtlasPages)){const L=this._pages.filter((K=>2*K.canvas.width<=(E.maxTextureSize||4096))).sort(((K,G)=>G.canvas.width!==K.canvas.width?G.canvas.width-K.canvas.width:G.percentageUsed-K.percentageUsed));let P=-1,R=0;for(let K=0;K<L.length;K++)if(L[K].canvas.width!==R)P=K,R=L[K].canvas.width;else if(K-P==3)break;const I=L.slice(P,P+4),$=I.map((K=>K.glyphs[0].texturePage)).sort(((K,G)=>K>G?1:-1)),V=this.pages.length-I.length,U=this._mergePages(I,V);U.version++;for(let K=$.length-1;K>=0;K--)this._deletePage($[K]);this.pages.push(U),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(U.canvas)}const O=new D(this._document,this._textureSize);return this._pages.push(O),this._activePages.push(O),this._onAddTextureAtlasCanvas.fire(O.canvas),O}_mergePages(O,L){const P=2*O[0].canvas.width,R=new D(this._document,P,O);for(const[I,$]of O.entries()){const V=I*$.canvas.width%P,U=Math.floor(I/2)*$.canvas.height;R.ctx.drawImage($.canvas,V,U);for(const G of $.glyphs)G.texturePage=L,G.sizeClipSpace.x=G.size.x/P,G.sizeClipSpace.y=G.size.y/P,G.texturePosition.x+=V,G.texturePosition.y+=U,G.texturePositionClipSpace.x=G.texturePosition.x/P,G.texturePositionClipSpace.y=G.texturePosition.y/P;this._onRemoveTextureAtlasCanvas.fire($.canvas);const K=this._activePages.indexOf($);K!==-1&&this._activePages.splice(K,1)}return R}_deletePage(O){this._pages.splice(O,1);for(let L=O;L<this._pages.length;L++){const P=this._pages[L];for(const R of P.glyphs)R.texturePage--;P.version++}}getRasterizedGlyphCombinedChar(O,L,P,R,I){return this._getFromCacheMap(this._cacheMapCombined,O,L,P,R,I)}getRasterizedGlyph(O,L,P,R,I){return this._getFromCacheMap(this._cacheMap,O,L,P,R,I)}_getFromCacheMap(O,L,P,R,I,$=!1){return C=O.get(L,P,R,I),C||(C=this._drawToCache(L,P,R,I,$),O.set(L,P,R,I,C)),C}_getColorFromAnsiIndex(O){if(O>=this._config.colors.ansi.length)throw new Error("No color found for idx "+O);return this._config.colors.ansi[O]}_getBackgroundColor(O,L,P,R){if(this._config.allowTransparency)return g.NULL_COLOR;let I;switch(O){case 16777216:case 33554432:I=this._getColorFromAnsiIndex(L);break;case 50331648:const $=v.AttributeData.toColorRGB(L);I=g.channels.toColor($[0],$[1],$[2]);break;default:I=P?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return I}_getForegroundColor(O,L,P,R,I,$,V,U,K,G){const N=this._getMinimumContrastColor(O,L,P,R,I,$,V,K,U,G);if(N)return N;let H;switch(I){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&K&&$<8&&($+=8),H=this._getColorFromAnsiIndex($);break;case 50331648:const z=v.AttributeData.toColorRGB($);H=g.channels.toColor(z[0],z[1],z[2]);break;default:H=V?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=g.color.opaque(H)),U&&(H=g.color.multiplyOpacity(H,c.DIM_OPACITY)),H}_resolveBackgroundRgba(O,L,P){switch(O){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return P?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(O,L,P,R){switch(O){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&R&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return P?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(O,L,P,R,I,$,V,U,K,G){if(this._config.minimumContrastRatio===1||G)return;const N=this._getContrastCache(K),H=N.getColor(O,R);if(H!==void 0)return H||void 0;const z=this._resolveBackgroundRgba(L,P,V),q=this._resolveForegroundRgba(I,$,V,U),J=g.rgba.ensureContrastRatio(z,q,this._config.minimumContrastRatio/(K?2:1));if(!J)return void N.setColor(O,R,null);const ie=g.channels.toColor(J>>24&255,J>>16&255,J>>8&255);return N.setColor(O,R,ie),ie}_getContrastCache(O){return O?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(O,L,P,R,I=!1){const $=typeof O=="number"?String.fromCharCode(O):O,V=Math.min(this._config.deviceCellWidth*Math.max($.length,2)+4,this._textureSize);this._tmpCanvas.width<V&&(this._tmpCanvas.width=V);const U=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<U&&(this._tmpCanvas.height=U),this._tmpCtx.save(),this._workAttributeData.fg=P,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=R,this._workAttributeData.isInvisible())return x;const K=!!this._workAttributeData.isBold(),G=!!this._workAttributeData.isInverse(),N=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),z=!!this._workAttributeData.isUnderline(),q=!!this._workAttributeData.isStrikethrough(),J=!!this._workAttributeData.isOverline();let ie=this._workAttributeData.getFgColor(),pe=this._workAttributeData.getFgColorMode(),he=this._workAttributeData.getBgColor(),Z=this._workAttributeData.getBgColorMode();if(G){const de=ie;ie=he,he=de;const Ee=pe;pe=Z,Z=Ee}const W=this._getBackgroundColor(Z,he,G,N);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const te=K?this._config.fontWeightBold:this._config.fontWeight,Q=H?"italic":"";this._tmpCtx.font=`${Q} ${te} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=c.TEXT_BASELINE;const se=$.length===1&&(0,f.isPowerlineGlyph)($.charCodeAt(0)),re=$.length===1&&(0,f.isRestrictedPowerlineGlyph)($.charCodeAt(0)),be=this._getForegroundColor(L,Z,he,P,pe,ie,G,N,K,(0,f.treatGlyphAsBackgroundColor)($.charCodeAt(0)));this._tmpCtx.fillStyle=be.css;const ve=re?0:4;let Se=!1;this._config.customGlyphs!==!1&&(Se=(0,p.tryDrawCustomChar)(this._tmpCtx,$,ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Le,xe=!se;if(Le=typeof O=="number"?this._unicodeService.wcwidth(O):this._unicodeService.getStringCellWidth(O),z){this._tmpCtx.save();const de=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ee=de%2==1?.5:0;if(this._tmpCtx.lineWidth=de,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())xe=!1,this._tmpCtx.strokeStyle=`rgb(${v.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{xe=!1;let Ue=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ue<8&&(Ue+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ue).css}this._tmpCtx.beginPath();const $e=ve,je=Math.ceil(ve+this._config.deviceCharHeight)-Ee-(I?2*de:0),qt=je+de,ct=je+2*de;let _t=this._workAttributeData.getUnderlineVariantOffset();for(let Ue=0;Ue<Le;Ue++){this._tmpCtx.save();const Pe=$e+Ue*this._config.deviceCellWidth,Oe=$e+(Ue+1)*this._config.deviceCellWidth,rr=Pe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Pe,je),this._tmpCtx.lineTo(Oe,je),this._tmpCtx.moveTo(Pe,ct),this._tmpCtx.lineTo(Oe,ct);break;case 3:const yt=de<=1?ct:Math.ceil(ve+this._config.deviceCharHeight-de/2)-Ee,Wt=de<=1?je:Math.ceil(ve+this._config.deviceCharHeight+de/2)-Ee,Rt=new Path2D;Rt.rect(Pe,je,this._config.deviceCellWidth,ct-je),this._tmpCtx.clip(Rt),this._tmpCtx.moveTo(Pe-this._config.deviceCellWidth/2,qt),this._tmpCtx.bezierCurveTo(Pe-this._config.deviceCellWidth/2,Wt,Pe,Wt,Pe,qt),this._tmpCtx.bezierCurveTo(Pe,yt,rr,yt,rr,qt),this._tmpCtx.bezierCurveTo(rr,Wt,Oe,Wt,Oe,qt),this._tmpCtx.bezierCurveTo(Oe,yt,Oe+this._config.deviceCellWidth/2,yt,Oe+this._config.deviceCellWidth/2,qt);break;case 4:const Ur=_t===0?0:_t>=de?2*de-_t:de-_t;_t>=de||Ur===0?(this._tmpCtx.setLineDash([Math.round(de),Math.round(de)]),this._tmpCtx.moveTo(Pe+Ur,je),this._tmpCtx.lineTo(Oe,je)):(this._tmpCtx.setLineDash([Math.round(de),Math.round(de)]),this._tmpCtx.moveTo(Pe,je),this._tmpCtx.lineTo(Pe+Ur,je),this._tmpCtx.moveTo(Pe+Ur+de,je),this._tmpCtx.lineTo(Oe,je)),_t=(0,f.computeNextVariantOffset)(Oe-Pe,de,_t);break;case 5:const Ki=.6,Yi=.3,Pt=Oe-Pe,yr=Math.floor(Ki*Pt),qr=Math.floor(Yi*Pt),Br=Pt-yr-qr;this._tmpCtx.setLineDash([yr,qr,Br]),this._tmpCtx.moveTo(Pe,je),this._tmpCtx.lineTo(Oe,je);break;default:this._tmpCtx.moveTo(Pe,je),this._tmpCtx.lineTo(Oe,je)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Se&&this._config.fontSize>=12&&!this._config.allowTransparency&&$!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ue=this._tmpCtx.measureText($);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ue&&Ue.actualBoundingBoxDescent>0){this._tmpCtx.save();const Pe=new Path2D;Pe.rect($e,je-Math.ceil(de/2),this._config.deviceCellWidth*Le,ct-je+Math.ceil(de/2)),this._tmpCtx.clip(Pe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=W.css,this._tmpCtx.strokeText($,ve,ve+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(J){const de=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ee=de%2==1?.5:0;this._tmpCtx.lineWidth=de,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+Ee),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*Le,ve+Ee),this._tmpCtx.stroke()}if(Se||this._tmpCtx.fillText($,ve,ve+this._config.deviceCharHeight),$==="_"&&!this._config.allowTransparency){let de=w(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),W,be,xe);if(de)for(let Ee=1;Ee<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=W.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText($,ve,ve+this._config.deviceCharHeight-Ee),de=w(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),W,be,xe),de);Ee++);}if(q){const de=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ee=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=de,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+Math.floor(this._config.deviceCharHeight/2)-Ee),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*Le,ve+Math.floor(this._config.deviceCharHeight/2)-Ee),this._tmpCtx.stroke()}this._tmpCtx.restore();const Ke=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let xt;if(xt=this._config.allowTransparency?(function(de){for(let Ee=0;Ee<de.data.length;Ee+=4)if(de.data[Ee+3]>0)return!1;return!0})(Ke):w(Ke,W,be,xe),xt)return x;const Ae=this._findGlyphBoundingBox(Ke,this._workBoundingBox,V,re,Se,ve);let Ce,we;for(;;){if(this._activePages.length===0){const de=this._createNewPage();Ce=de,we=de.currentRow,we.height=Ae.size.y;break}Ce=this._activePages[this._activePages.length-1],we=Ce.currentRow;for(const de of this._activePages)Ae.size.y<=de.currentRow.height&&(Ce=de,we=de.currentRow);for(let de=this._activePages.length-1;de>=0;de--)for(const Ee of this._activePages[de].fixedRows)Ee.height<=we.height&&Ae.size.y<=Ee.height&&(Ce=this._activePages[de],we=Ee);if(we.y+Ae.size.y>=Ce.canvas.height||we.height>Ae.size.y+2){let de=!1;if(Ce.currentRow.y+Ce.currentRow.height+Ae.size.y>=Ce.canvas.height){let Ee;for(const $e of this._activePages)if($e.currentRow.y+$e.currentRow.height+Ae.size.y<$e.canvas.height){Ee=$e;break}if(Ee)Ce=Ee;else if(E.maxAtlasPages&&this._pages.length>=E.maxAtlasPages&&we.y+Ae.size.y<=Ce.canvas.height&&we.height>=Ae.size.y&&we.x+Ae.size.x<=Ce.canvas.width)de=!0;else{const $e=this._createNewPage();Ce=$e,we=$e.currentRow,we.height=Ae.size.y,de=!0}}de||(Ce.currentRow.height>0&&Ce.fixedRows.push(Ce.currentRow),we={x:0,y:Ce.currentRow.y+Ce.currentRow.height,height:Ae.size.y},Ce.fixedRows.push(we),Ce.currentRow={x:0,y:we.y+we.height,height:0})}if(we.x+Ae.size.x<=Ce.canvas.width)break;we===Ce.currentRow?(we.x=0,we.y+=we.height,we.height=0):Ce.fixedRows.splice(Ce.fixedRows.indexOf(we),1)}return Ae.texturePage=this._pages.indexOf(Ce),Ae.texturePosition.x=we.x,Ae.texturePosition.y=we.y,Ae.texturePositionClipSpace.x=we.x/Ce.canvas.width,Ae.texturePositionClipSpace.y=we.y/Ce.canvas.height,Ae.sizeClipSpace.x/=Ce.canvas.width,Ae.sizeClipSpace.y/=Ce.canvas.height,we.height=Math.max(we.height,Ae.size.y),we.x+=Ae.size.x,Ce.ctx.putImageData(Ke,Ae.texturePosition.x-this._workBoundingBox.left,Ae.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Ae.size.x,Ae.size.y),Ce.addGlyph(Ae),Ce.version++,Ae}_findGlyphBoundingBox(O,L,P,R,I,$){L.top=0;const V=R?this._config.deviceCellHeight:this._tmpCanvas.height,U=R?this._config.deviceCellWidth:P;let K=!1;for(let G=0;G<V;G++){for(let N=0;N<U;N++){const H=G*this._tmpCanvas.width*4+4*N+3;if(O.data[H]!==0){L.top=G,K=!0;break}}if(K)break}L.left=0,K=!1;for(let G=0;G<$+U;G++){for(let N=0;N<V;N++){const H=N*this._tmpCanvas.width*4+4*G+3;if(O.data[H]!==0){L.left=G,K=!0;break}}if(K)break}L.right=U,K=!1;for(let G=$+U-1;G>=$;G--){for(let N=0;N<V;N++){const H=N*this._tmpCanvas.width*4+4*G+3;if(O.data[H]!==0){L.right=G,K=!0;break}}if(K)break}L.bottom=V,K=!1;for(let G=V-1;G>=0;G--){for(let N=0;N<U;N++){const H=G*this._tmpCanvas.width*4+4*N+3;if(O.data[H]!==0){L.bottom=G,K=!0;break}}if(K)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+$+(R||I?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+$+(R||I?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=E;class D{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(O){this._glyphs.push(O),this._usedPixels+=O.size.x*O.size.y}constructor(O,L,P){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],P)for(const R of P)this._glyphs.push(...R.glyphs),this._usedPixels+=R._usedPixels;this.canvas=M(O,L,L),this.ctx=(0,f.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function w(T,O,L,P){const R=O.rgba>>>24,I=O.rgba>>>16&255,$=O.rgba>>>8&255,V=L.rgba>>>24,U=L.rgba>>>16&255,K=L.rgba>>>8&255,G=Math.floor((Math.abs(R-V)+Math.abs(I-U)+Math.abs($-K))/12);let N=!0;for(let H=0;H<T.data.length;H+=4)T.data[H]===R&&T.data[H+1]===I&&T.data[H+2]===$||P&&Math.abs(T.data[H]-R)+Math.abs(T.data[H+1]-I)+Math.abs(T.data[H+2]-$)<G?T.data[H+3]=0:N=!1;return N}function M(T,O,L){const P=T.createElement("canvas");return P.width=O,P.height=L,P}},577:function(d,a,u){var c=this&&this.__decorate||function(y,x,C,E){var D,w=arguments.length,M=w<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,C):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,x,C,E);else for(var T=y.length-1;T>=0;T--)(D=y[T])&&(M=(w<3?D(M):w>3?D(x,C,M):D(x,C))||M);return w>3&&M&&Object.defineProperty(x,C,M),M},p=this&&this.__param||function(y,x){return function(C,E){x(C,E,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const f=u(147),g=u(855),b=u(782),S=u(97);class m extends f.AttributeData{constructor(x,C,E){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=C,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=m;let v=a.CharacterJoinerService=class GE{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(x){const C={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(C),C.id}deregister(x){for(let C=0;C<this._characterJoiners.length;C++)if(this._characterJoiners[C].id===x)return this._characterJoiners.splice(C,1),!0;return!1}getJoinedCharacters(x){if(this._characterJoiners.length===0)return[];const C=this._bufferService.buffer.lines.get(x);if(!C||C.length===0)return[];const E=[],D=C.translateToString(!0);let w=0,M=0,T=0,O=C.getFg(0),L=C.getBg(0);for(let P=0;P<C.getTrimmedLength();P++)if(C.loadCell(P,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==O||this._workCell.bg!==L){if(P-w>1){const R=this._getJoinedRanges(D,T,M,C,w);for(let I=0;I<R.length;I++)E.push(R[I])}w=P,T=M,O=this._workCell.fg,L=this._workCell.bg}M+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-w>1){const P=this._getJoinedRanges(D,T,M,C,w);for(let R=0;R<P.length;R++)E.push(P[R])}return E}_getJoinedRanges(x,C,E,D,w){const M=x.substring(C,E);let T=[];try{T=this._characterJoiners[0].handler(M)}catch(O){console.error(O)}for(let O=1;O<this._characterJoiners.length;O++)try{const L=this._characterJoiners[O].handler(M);for(let P=0;P<L.length;P++)GE._mergeRanges(T,L[P])}catch(L){console.error(L)}return this._stringRangesToCellRanges(T,D,w),T}_stringRangesToCellRanges(x,C,E){let D=0,w=!1,M=0,T=x[D];if(T){for(let O=E;O<this._bufferService.cols;O++){const L=C.getWidth(O),P=C.getString(O).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!w&&T[0]<=M&&(T[0]=O,w=!0),T[1]<=M){if(T[1]=O,T=x[++D],!T)break;T[0]<=M?(T[0]=O,w=!0):w=!1}M+=P}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(x,C){let E=!1;for(let D=0;D<x.length;D++){const w=x[D];if(E){if(C[1]<=w[0])return x[D-1][1]=C[1],x;if(C[1]<=w[1])return x[D-1][1]=Math.max(C[1],w[1]),x.splice(D,1),x;x.splice(D,1),D--}else{if(C[1]<=w[0])return x.splice(D,0,C),x;if(C[1]<=w[1])return w[0]=Math.min(C[0],w[0]),x;C[0]<w[1]&&(w[0]=Math.min(C[0],w[0]),E=!0)}}return E?x[x.length-1][1]=C[1]:x.push(C),x}};a.CharacterJoinerService=v=c([p(0,S.IBufferService)],v)},160:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,c=0,p=0,f=0;var g,b,S,m,v;function y(C){const E=C.toString(16);return E.length<2?"0"+E:E}function x(C,E){return C<E?(E+.05)/(C+.05):(C+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(C){C.toCss=function(E,D,w,M){return M!==void 0?`#${y(E)}${y(D)}${y(w)}${y(M)}`:`#${y(E)}${y(D)}${y(w)}`},C.toRgba=function(E,D,w,M=255){return(E<<24|D<<16|w<<8|M)>>>0},C.toColor=function(E,D,w,M){return{css:C.toCss(E,D,w,M),rgba:C.toRgba(E,D,w,M)}}})(g||(a.channels=g={})),(function(C){function E(D,w){return f=Math.round(255*w),[u,c,p]=v.toChannels(D.rgba),{css:g.toCss(u,c,p,f),rgba:g.toRgba(u,c,p,f)}}C.blend=function(D,w){if(f=(255&w.rgba)/255,f===1)return{css:w.css,rgba:w.rgba};const M=w.rgba>>24&255,T=w.rgba>>16&255,O=w.rgba>>8&255,L=D.rgba>>24&255,P=D.rgba>>16&255,R=D.rgba>>8&255;return u=L+Math.round((M-L)*f),c=P+Math.round((T-P)*f),p=R+Math.round((O-R)*f),{css:g.toCss(u,c,p),rgba:g.toRgba(u,c,p)}},C.isOpaque=function(D){return(255&D.rgba)==255},C.ensureContrastRatio=function(D,w,M){const T=v.ensureContrastRatio(D.rgba,w.rgba,M);if(T)return g.toColor(T>>24&255,T>>16&255,T>>8&255)},C.opaque=function(D){const w=(255|D.rgba)>>>0;return[u,c,p]=v.toChannels(w),{css:g.toCss(u,c,p),rgba:w}},C.opacity=E,C.multiplyOpacity=function(D,w){return f=255&D.rgba,E(D,f*w/255)},C.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(b||(a.color=b={})),(function(C){let E,D;try{const w=document.createElement("canvas");w.width=1,w.height=1;const M=w.getContext("2d",{willReadFrequently:!0});M&&(E=M,E.globalCompositeOperation="copy",D=E.createLinearGradient(0,0,1,1))}catch{}C.toColor=function(w){if(w.match(/#[\da-f]{3,8}/i))switch(w.length){case 4:return u=parseInt(w.slice(1,2).repeat(2),16),c=parseInt(w.slice(2,3).repeat(2),16),p=parseInt(w.slice(3,4).repeat(2),16),g.toColor(u,c,p);case 5:return u=parseInt(w.slice(1,2).repeat(2),16),c=parseInt(w.slice(2,3).repeat(2),16),p=parseInt(w.slice(3,4).repeat(2),16),f=parseInt(w.slice(4,5).repeat(2),16),g.toColor(u,c,p,f);case 7:return{css:w,rgba:(parseInt(w.slice(1),16)<<8|255)>>>0};case 9:return{css:w,rgba:parseInt(w.slice(1),16)>>>0}}const M=w.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(M)return u=parseInt(M[1]),c=parseInt(M[2]),p=parseInt(M[3]),f=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),g.toColor(u,c,p,f);if(!E||!D)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=D,E.fillStyle=w,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,c,p,f]=E.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,c,p,f),css:w}}})(S||(a.css=S={})),(function(C){function E(D,w,M){const T=D/255,O=w/255,L=M/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}C.relativeLuminance=function(D){return E(D>>16&255,D>>8&255,255&D)},C.relativeLuminance2=E})(m||(a.rgb=m={})),(function(C){function E(w,M,T){const O=w>>24&255,L=w>>16&255,P=w>>8&255;let R=M>>24&255,I=M>>16&255,$=M>>8&255,V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));for(;V<T&&(R>0||I>0||$>0);)R-=Math.max(0,Math.ceil(.1*R)),I-=Math.max(0,Math.ceil(.1*I)),$-=Math.max(0,Math.ceil(.1*$)),V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));return(R<<24|I<<16|$<<8|255)>>>0}function D(w,M,T){const O=w>>24&255,L=w>>16&255,P=w>>8&255;let R=M>>24&255,I=M>>16&255,$=M>>8&255,V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));for(;V<T&&(R<255||I<255||$<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),I=Math.min(255,I+Math.ceil(.1*(255-I))),$=Math.min(255,$+Math.ceil(.1*(255-$))),V=x(m.relativeLuminance2(R,I,$),m.relativeLuminance2(O,L,P));return(R<<24|I<<16|$<<8|255)>>>0}C.blend=function(w,M){if(f=(255&M)/255,f===1)return M;const T=M>>24&255,O=M>>16&255,L=M>>8&255,P=w>>24&255,R=w>>16&255,I=w>>8&255;return u=P+Math.round((T-P)*f),c=R+Math.round((O-R)*f),p=I+Math.round((L-I)*f),g.toRgba(u,c,p)},C.ensureContrastRatio=function(w,M,T){const O=m.relativeLuminance(w>>8),L=m.relativeLuminance(M>>8);if(x(O,L)<T){if(L<O){const I=E(w,M,T),$=x(O,m.relativeLuminance(I>>8));if($<T){const V=D(w,M,T);return $>x(O,m.relativeLuminance(V>>8))?I:V}return I}const P=D(w,M,T),R=x(O,m.relativeLuminance(P>>8));if(R<T){const I=E(w,M,T);return R>x(O,m.relativeLuminance(I>>8))?P:I}return P}},C.reduceLuminance=E,C.increaseLuminance=D,C.toChannels=function(w){return[w>>24&255,w>>16&255,w>>8&255,255&w]}})(v||(a.rgba=v={})),a.toPaddedHex=y,a.contrastRatio=x},345:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let c=0;c<this._listeners.length;c++)if(this._listeners[c]===u)return void this._listeners.splice(c,1)}}})),this._event}fire(u,c){const p=[];for(let f=0;f<this._listeners.length;f++)p.push(this._listeners[f]);for(let f=0;f<p.length;f++)p[f].call(void 0,u,c)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,c){return u((p=>c.fire(p)))},a.runAndSubscribe=function(u,c){return c(void 0),u((p=>c(p)))}},859:(d,a)=>{function u(c){for(const p of c)p.dispose();c.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){const p=this._disposables.indexOf(c);p!==-1&&this._disposables.splice(p,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){var p;this._isDisposed||c===this._value||((p=this._value)==null||p.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){var c;this._isDisposed=!0,(c=this._value)==null||c.dispose(),this._value=void 0}},a.toDisposable=function(c){return{dispose:c}},a.disposeArray=u,a.getDisposeArrayDisposable=function(c){return{dispose:()=>u(c)}}},485:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(p,f,g){this._data[p]||(this._data[p]={}),this._data[p][f]=g}get(p,f){return this._data[p]?this._data[p][f]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(c,p,f,g,b){this._data.get(c,p)||this._data.set(c,p,new u),this._data.get(c,p).set(f,g,b)}get(c,p,f,g){var b;return(b=this._data.get(c,p))==null?void 0:b.get(f,g)}clear(){this._data.clear()}}},399:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const u=a.isNode?"node":navigator.userAgent,c=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const p=u.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),a.isIpad=c==="iPad",a.isIphone=c==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),a.isLinux=c.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},385:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const c=u(399);class p{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let S=0,m=0,v=b.timeRemaining(),y=0;for(;this._i<this._tasks.length;){if(S=Date.now(),this._tasks[this._i]()||this._i++,S=Math.max(1,Date.now()-S),m=Math.max(S,m),y=b.timeRemaining(),1.5*m>y)return v-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-S))}ms`),void this._start();v=y}this.clear()}}class f extends p{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const S=Date.now()+b;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}a.PriorityTaskQueue=f,a.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:f,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},147:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new u;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,g=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=g}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=c},782:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const c=u(133),p=u(855),f=u(147);class g extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const m=new g;return m.setFromCharData(S),m}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let m=!1;if(S[p.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(S[p.CHAR_DATA_CHAR_INDEX].length===2){const v=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const y=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=y&&y<=57343?this.content=1024*(v-55296)+y-56320+65536|S[p.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[p.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=S[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=g},855:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,c=0,p=u.length){let f="";for(let g=c;g<p;++g){let b=u[g];b>65535?(b-=65536,f+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):f+=String.fromCharCode(b)}return f},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,c){const p=u.length;if(!p)return 0;let f=0,g=0;if(this._interim){const b=u.charCodeAt(g++);56320<=b&&b<=57343?c[f++]=1024*(this._interim-55296)+b-56320+65536:(c[f++]=this._interim,c[f++]=b),this._interim=0}for(let b=g;b<p;++b){const S=u.charCodeAt(b);if(55296<=S&&S<=56319){if(++b>=p)return this._interim=S,f;const m=u.charCodeAt(b);56320<=m&&m<=57343?c[f++]=1024*(S-55296)+m-56320+65536:(c[f++]=S,c[f++]=m)}else S!==65279&&(c[f++]=S)}return f}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,c){const p=u.length;if(!p)return 0;let f,g,b,S,m=0,v=0,y=0;if(this.interim[0]){let E=!1,D=this.interim[0];D&=(224&D)==192?31:(240&D)==224?15:7;let w,M=0;for(;(w=63&this.interim[++M])&&M<4;)D<<=6,D|=w;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,O=T-M;for(;y<O;){if(y>=p)return 0;if(w=u[y++],(192&w)!=128){y--,E=!0;break}this.interim[M++]=w,D<<=6,D|=63&w}E||(T===2?D<128?y--:c[m++]=D:T===3?D<2048||D>=55296&&D<=57343||D===65279||(c[m++]=D):D<65536||D>1114111||(c[m++]=D)),this.interim.fill(0)}const x=p-4;let C=y;for(;C<p;){for(;!(!(C<x)||128&(f=u[C])||128&(g=u[C+1])||128&(b=u[C+2])||128&(S=u[C+3]));)c[m++]=f,c[m++]=g,c[m++]=b,c[m++]=S,C+=4;if(f=u[C++],f<128)c[m++]=f;else if((224&f)==192){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(v=(31&f)<<6|63&g,v<128){C--;continue}c[m++]=v}else if((240&f)==224){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,m;if(b=u[C++],(192&b)!=128){C--;continue}if(v=(15&f)<<12|(63&g)<<6|63&b,v<2048||v>=55296&&v<=57343||v===65279)continue;c[m++]=v}else if((248&f)==240){if(C>=p)return this.interim[0]=f,m;if(g=u[C++],(192&g)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,m;if(b=u[C++],(192&b)!=128){C--;continue}if(C>=p)return this.interim[0]=f,this.interim[1]=g,this.interim[2]=b,m;if(S=u[C++],(192&S)!=128){C--;continue}if(v=(7&f)<<18|(63&g)<<12|(63&b)<<6|63&S,v<65536||v>1114111)continue;c[m++]=v}}return m}}},776:function(d,a,u){var c=this&&this.__decorate||function(v,y,x,C){var E,D=arguments.length,w=D<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(v,y,x,C);else for(var M=v.length-1;M>=0;M--)(E=v[M])&&(w=(D<3?E(w):D>3?E(y,x,w):E(y,x))||w);return D>3&&w&&Object.defineProperty(y,x,w),w},p=this&&this.__param||function(v,y){return function(x,C){y(x,C,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const f=u(859),g=u(97),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let S,m=a.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let y=0;y<v.length;y++)typeof v[y]=="function"&&(v[y]=v[y]())}_log(v,y,x){this._evalLazyOptionalParams(x),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+y,...x)}trace(v,...y){var x;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.trace.bind(this._optionsService.options.logger))??console.log,v,y)}debug(v,...y){var x;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.debug.bind(this._optionsService.options.logger))??console.log,v,y)}info(v,...y){var x;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.info.bind(this._optionsService.options.logger))??console.info,v,y)}warn(v,...y){var x;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.warn.bind(this._optionsService.options.logger))??console.warn,v,y)}error(v,...y){var x;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((x=this._optionsService.options.logger)==null?void 0:x.error.bind(this._optionsService.options.logger))??console.error,v,y)}};a.LogService=m=c([p(0,g.IOptionsService)],m),a.setTraceLogger=function(v){S=v},a.traceCall=function(v,y,x){if(typeof x.value!="function")throw new Error("not supported");const C=x.value;x.value=function(...E){if(S.logLevel!==g.LogLevelEnum.TRACE)return C.apply(this,E);S.trace(`GlyphRenderer#${C.name}(${E.map((w=>JSON.stringify(w))).join(", ")})`);const D=C.apply(this,E);return S.trace(`GlyphRenderer#${C.name} return`,D),D}}},726:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",c="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(p){return p[c]||[]},a.createDecorator=function(p){if(a.serviceRegistry.has(p))return a.serviceRegistry.get(p);const f=function(g,b,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(m,v,y){v[u]===v?v[c].push({id:m,index:y}):(v[c]=[{id:m,index:y}],v[u]=v)})(f,g,S)};return f.toString=()=>p,a.serviceRegistry.set(p,f),f}},97:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const c=u(726);var p;a.IBufferService=(0,c.createDecorator)("BufferService"),a.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),a.ICoreService=(0,c.createDecorator)("CoreService"),a.ICharsetService=(0,c.createDecorator)("CharsetService"),a.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(p||(a.LogLevelEnum=p={})),a.ILogService=(0,c.createDecorator)("LogService"),a.IOptionsService=(0,c.createDecorator)("OptionsService"),a.IOscLinkService=(0,c.createDecorator)("OscLinkService"),a.IUnicodeService=(0,c.createDecorator)("UnicodeService"),a.IDecorationService=(0,c.createDecorator)("DecorationService")}},i={};function o(d){var a=i[d];if(a!==void 0)return a.exports;var u=i[d]={exports:{}};return r[d].call(u.exports,u,u.exports,o),u.exports}var l={};return(()=>{var d=l;Object.defineProperty(d,"__esModule",{value:!0}),d.CanvasAddon=void 0;const a=o(345),u=o(859),c=o(776),p=o(949);class f extends u.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var b;return(b=this._renderer)==null?void 0:b.textureAtlas}activate(b){const S=b._core;if(!b.element)return void this.register(S.onWillOpen((()=>this.activate(b))));this._terminal=b;const m=S.coreService,v=S.optionsService,y=S.screenElement,x=S.linkifier,C=S,E=C._bufferService,D=C._renderService,w=C._characterJoinerService,M=C._charSizeService,T=C._coreBrowserService,O=C._decorationService,L=C._logService,P=C._themeService;(0,c.setTraceLogger)(L),this._renderer=new p.CanvasRenderer(b,y,x,E,M,v,w,m,T,O,P),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),D.setRenderer(this._renderer),D.handleResize(E.cols,E.rows),this.register((0,u.toDisposable)((()=>{var R;D.setRenderer(this._terminal._core._createRenderer()),D.handleResize(b.cols,b.rows),(R=this._renderer)==null||R.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var b;(b=this._renderer)==null||b.clearTextureAtlas()}}d.CanvasAddon=f})(),l})()))})(bv)),bv.exports}var $L=HL();/**
|
|
117
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
118
|
+
* @license MIT
|
|
119
|
+
*
|
|
120
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
121
|
+
* @license MIT
|
|
122
|
+
*
|
|
123
|
+
* Originally forked from (with the author's permission):
|
|
124
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
125
|
+
* http://bellard.org/jslinux/
|
|
126
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
127
|
+
*/var UL=class{constructor(e,t,r,i={}){this._terminal=e,this._regex=t,this._handler=r,this._options=i}provideLinks(e,t){let r=WL.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(r))}_addCallbacks(e){return e.map(t=>(t.leave=this._options.leave,t.hover=(r,i)=>{if(this._options.hover){let{range:o}=t;this._options.hover(r,i,o)}},t))}};function qL(e){try{let t=new URL(e),r=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(r.toLocaleLowerCase())}catch{return!1}}var WL=class sf{static computeLink(t,r,i,o){let l=new RegExp(r.source,(r.flags||"")+"g"),[d,a]=sf._getWindowedLineStrings(t-1,i),u=d.join(""),c,p=[];for(;c=l.exec(u);){let f=c[0];if(!qL(f))continue;let[g,b]=sf._mapStrIdx(i,a,0,c.index),[S,m]=sf._mapStrIdx(i,g,b,f.length);if(g===-1||b===-1||S===-1||m===-1)continue;let v={start:{x:b+1,y:g+1},end:{x:m,y:S+1}};p.push({range:v,text:f,activate:o})}return p}static _getWindowedLineStrings(t,r){let i,o=t,l=t,d=0,a="",u=[];if(i=r.buffer.active.getLine(t)){let c=i.translateToString(!0);if(i.isWrapped&&c[0]!==" "){for(d=0;(i=r.buffer.active.getLine(--o))&&d<2048&&(a=i.translateToString(!0),d+=a.length,u.push(a),!(!i.isWrapped||a.indexOf(" ")!==-1)););u.reverse()}for(u.push(c),d=0;(i=r.buffer.active.getLine(++l))&&i.isWrapped&&d<2048&&(a=i.translateToString(!0),d+=a.length,u.push(a),a.indexOf(" ")===-1););}return[u,o]}static _mapStrIdx(t,r,i,o){let l=t.buffer.active,d=l.getNullCell(),a=i;for(;o;){let u=l.getLine(r);if(!u)return[-1,-1];for(let c=a;c<u.length;++c){u.getCell(c,d);let p=d.getChars();if(d.getWidth()&&(o-=p.length||1,c===u.length-1&&p==="")){let f=l.getLine(r+1);f&&f.isWrapped&&(f.getCell(0,d),d.getWidth()===2&&(o+=1))}if(o<0)return[r,c]}r++,a=0}return[r,a]}},GL=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function KL(e,t){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}var YL=class{constructor(e=KL,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,r=t.urlRegex||GL;this._linkProvider=this._terminal.registerLinkProvider(new UL(this._terminal,r,this._handler,t))}dispose(){var e;(e=this._linkProvider)==null||e.dispose()}};const df=new RegExp("(?<![a-zA-Z]:\\/\\/)(?:^|[\\s\"'`(\\[{])([./]?[\\w./-]+\\.[a-zA-Z]{1,10})(?::(\\d+)(?::(\\d+))?|\\((\\d+),(\\d+)\\))?","g");function KE(e){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(e)||/^https?:\/\//i.test(e)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(e))}const VL=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC");class XL{constructor(t,r,i,o){this.terminal=t,this.onFileOpen=r,this.terminalId=i,this.decorationManager=o}provideLinks(t,r){const i=this.terminal.buffer.active.getLine(t-1);if(!i){r(void 0);return}const o=i.translateToString(),l=new RegExp(df.source,df.flags),d=[];let a;for(;(a=l.exec(o))!==null;){const u=a[1];if(!u||!KE(u))continue;const c=a[2]?parseInt(a[2],10):a[4]?parseInt(a[4],10):void 0,p=a[3]?parseInt(a[3],10):a[5]?parseInt(a[5],10):void 0,f=a[0],g=f.indexOf(u),b=a.index+g,S=a.index+f.length,m=b,v=t-1;d.push({range:{start:{x:b+1,y:t},end:{x:S,y:t}},text:f.substring(g),decorations:{pointerCursor:!0,underline:!0},activate:(y,x)=>{(VL?!y.metaKey:!y.ctrlKey)||this.onFileOpen(u,c,p,this.terminalId)},hover:()=>{var y;(y=this.decorationManager)==null||y.highlightAt(v,m)},leave:()=>{var y;(y=this.decorationManager)==null||y.unhighlightAll()}})}r(d.length>0?d:void 0)}}class ZL{constructor(t){zt(this,"disposables",[]);zt(this,"entries",[]);zt(this,"lastScannedLine",-1);this.terminal=t,this.disposables.push(t.onWriteParsed(()=>this.scanNewLines()))}highlightAt(t,r){for(const i of this.entries)i.marker.line===t&&i.x===r&&i.element&&i.element.classList.add("file-path-decoration-hover")}unhighlightAll(){var t;for(const r of this.entries)(t=r.element)==null||t.classList.remove("file-path-decoration-hover")}scanNewLines(){const t=this.terminal.buffer.active,r=t.baseY+t.cursorY;for(let i=this.lastScannedLine+1;i<=r;i++)this.decorateLine(i);this.lastScannedLine=r}decorateLine(t){const r=this.terminal.buffer.active,i=r.getLine(t);if(!i)return;const o=i.translateToString(),l=new RegExp(df.source,df.flags);let d;for(;(d=l.exec(o))!==null;){const a=d[1];if(!a||!KE(a))continue;const u=d[0],c=u.indexOf(a),p=d.index+c,f=u.length-c,g=r.baseY+r.cursorY,b=t-g,S=this.terminal.registerMarker(b);if(!S||S.line===-1)continue;const m={marker:S,x:p},v=this.terminal.registerDecoration({marker:S,x:p,width:f});v&&(v.onRender(y=>{y.classList.add("file-path-decoration"),m.element=y}),this.disposables.push(v)),this.entries.push(m),this.disposables.push(S)}}dispose(){for(const t of this.disposables)t.dispose();this.disposables=[],this.entries=[],this.lastScannedLine=-1}}const QL=1;function ix(e,t){if(!e||e.readyState!==WebSocket.OPEN)return;const r=new TextEncoder().encode(t),i=new Uint8Array(1+r.length);i[0]=QL,i.set(r,1),e.send(i.buffer)}function JL({wsRef:e,modifierRef:t}){const[r,i]=j.useState(null);j.useEffect(()=>(t.current.clearCallback=()=>i(null),()=>{t.current.clearCallback=null}),[t]);const o=j.useCallback(u=>{u.preventDefault(),ix(e.current,"\x1B")},[e]),l=j.useCallback(u=>{u.preventDefault(),ix(e.current," ")},[e]),d=j.useCallback(u=>{u.preventDefault();const c=r==="ctrl"?null:"ctrl";i(c),t.current.ctrl=c==="ctrl",t.current.cmd=!1},[r,t]),a=j.useCallback(u=>{u.preventDefault();const c=r==="cmd"?null:"cmd";i(c),t.current.cmd=c==="cmd",t.current.ctrl=!1},[r,t]);return B.jsxs("div",{className:"virtual-keyboard",role:"toolbar","aria-label":"Virtual modifier keys",children:[B.jsx("button",{className:"virtual-key",onPointerDown:o,tabIndex:-1,children:"Esc"}),B.jsx("button",{className:"virtual-key",onPointerDown:l,tabIndex:-1,children:"Tab"}),B.jsx("button",{className:`virtual-key virtual-key-modifier${r==="ctrl"?" virtual-key-active":""}`,onPointerDown:d,tabIndex:-1,"aria-pressed":r==="ctrl",children:"Ctrl"}),B.jsx("button",{className:`virtual-key virtual-key-modifier${r==="cmd"?" virtual-key-active":""}`,onPointerDown:a,tabIndex:-1,"aria-pressed":r==="cmd",children:"Cmd"})]})}class e8{constructor(t){zt(this,"term");zt(this,"fitAddon");zt(this,"getContainer");zt(this,"debug");zt(this,"_phase","initial-load");zt(this,"_viewportY",0);zt(this,"_baseY",0);zt(this,"_wasAtBottom",!0);zt(this,"_fitSuppressed",!1);zt(this,"_isProgrammaticScroll",!1);zt(this,"scrollDisposable");this.term=t.term,this.fitAddon=t.fitAddon,this.getContainer=t.getContainer,this.debug=t.debug??!1,this.scrollDisposable=this.term.onScroll(()=>this.handleScroll())}get phase(){return this._phase}get state(){return{phase:this._phase,viewportY:this._viewportY,baseY:this._baseY,wasAtBottom:this._wasAtBottom,fitSuppressed:this._fitSuppressed,isProgrammaticScroll:this._isProgrammaticScroll}}beginReplay(){if(this._phase!=="initial-load"){console.warn("[ScrollController] beginReplay called in phase:",this._phase);return}this._phase="buffer-replay",this._fitSuppressed=!0,this.log("phase","initial-load → buffer-replay")}endReplay(){if(this._phase!=="buffer-replay"){console.warn("[ScrollController] endReplay called in phase:",this._phase);return}this._fitSuppressed=!1,this._phase="interactive",this._wasAtBottom=!0,this.log("phase","buffer-replay → interactive"),this.programmaticScroll(()=>this.term.scrollToBottom()),this.safeFit()}enterInteractive(){if(this._phase!=="initial-load"){console.warn("[ScrollController] enterInteractive called in phase:",this._phase);return}this._phase="interactive",this.log("phase","initial-load → interactive")}reset(){this._phase="initial-load",this._viewportY=0,this._baseY=0,this._wasAtBottom=!0,this._fitSuppressed=!1,this._isProgrammaticScroll=!1,this.log("reset","back to initial-load")}suppressFit(){this._fitSuppressed=!0,this.log("fit","suppressed")}unsuppressFit(){this._fitSuppressed=!1,this.log("fit","unsuppressed")}safeFit(){var o,l;if(this._fitSuppressed){this.log("safeFit","skipped (fit suppressed)");return}if(!this.isContainerVisible()){this.log("safeFit","skipped (container not visible)");return}if(this._phase==="initial-load"){this.fitAddon.fit(),this.log("safeFit","fit (initial-load, no scroll preservation)");return}if(!(this._baseY>0||(((l=(o=this.term.buffer)==null?void 0:o.active)==null?void 0:l.baseY)??0)>0)){this.fitAddon.fit(),this.log("safeFit","fit (no scrollback)");return}const r=this._wasAtBottom,i=this._viewportY;this.fitAddon.fit(),r?(this.programmaticScroll(()=>this.term.scrollToBottom()),this.log("safeFit","fit + scrollToBottom (was at bottom)")):i>0?(this.programmaticScroll(()=>this.term.scrollToLine(i)),this.log("safeFit",`fit + scrollToLine(${i})`)):(console.warn("[ScrollController] restoreY=0 with scrollback — defaulting to bottom"),this.programmaticScroll(()=>this.term.scrollToBottom()))}scrollToBottom(){this.programmaticScroll(()=>this.term.scrollToBottom()),this._wasAtBottom=!0,this.log("scrollToBottom","explicit")}isContainerVisible(){const t=this.getContainer();if(!t)return!1;const r=t.getBoundingClientRect();return r.width>0&&r.height>0}dispose(){this.scrollDisposable.dispose(),this.log("dispose","cleaned up")}handleScroll(){var i,o,l,d,a,u,c,p;if(this._isProgrammaticScroll){const f=((o=(i=this.term.buffer)==null?void 0:i.active)==null?void 0:o.baseY)??0,g=((d=(l=this.term.buffer)==null?void 0:l.active)==null?void 0:d.viewportY)??0;this._baseY=f,this._viewportY=g,this._wasAtBottom=!f||g>=f,this.log("onScroll",`programmatic update: viewportY=${g} baseY=${f}`);return}if(this._phase!=="interactive"){this.log("onScroll",`ignored (phase: ${this._phase})`);return}if(!this.isContainerVisible()){this.log("onScroll","ignored (container not visible)");return}const t=((u=(a=this.term.buffer)==null?void 0:a.active)==null?void 0:u.baseY)??0,r=((p=(c=this.term.buffer)==null?void 0:c.active)==null?void 0:p.viewportY)??0;this._baseY=t,this._viewportY=r,this._wasAtBottom=!t||r>=t-2,this.log("onScroll",`viewportY=${r} baseY=${t} wasAtBottom=${this._wasAtBottom}`)}programmaticScroll(t){this._isProgrammaticScroll=!0;try{t()}finally{this._isProgrammaticScroll=!1}}log(t,r){this.debug&&console.debug(`[ScrollController] ${t}: ${r}`)}}class t8{constructor(){zt(this,"pending","")}write(t){t=this.pending+t,this.pending="";const r=t.lastIndexOf("\x1B");if(r===-1)return t;const i=t.substring(r);return r8(i)?t:(this.pending=i,t.substring(0,r))}flush(){const t=this.pending;return this.pending="",t}get hasPending(){return this.pending.length>0}}function r8(e){if(e.length<2)return!1;const t=e.charCodeAt(1);if(t===91){for(let r=2;r<e.length;r++){const i=e.charCodeAt(r);if(i>=64&&i<=126)return!0;if(!(i>=32&&i<=63))return!0}return!1}if(t===93){for(let r=2;r<e.length;r++)if(e.charCodeAt(r)===7||e.charCodeAt(r)===27&&r+1<e.length&&e.charCodeAt(r+1)===92)return!0;return!1}if(t===80||t===95||t===94||t===88){for(let r=2;r<e.length;r++)if(e.charCodeAt(r)===27&&r+1<e.length&&e.charCodeAt(r+1)===92)return!0;return!1}return t>=32&&t<=126,!0}const i8=1e3,n8=3e4,s8=6;function a8(e,t={}){const{floor:r}=t;if(r&&e>=r.afterAttempts)return r.delayMs;const i=t.baseMs??i8,o=t.capMs??n8,l=t.jitterMs??0,d=t.random??Math.random,a=Math.max(0,e),u=l>0?Math.floor(d()*l):0;return Math.min(i*2**a+u,o)}class o8{constructor(t={}){zt(this,"opts");zt(this,"maxAttempts");zt(this,"_attempt",0);zt(this,"_status","idle");this.opts=t,this.maxAttempts=t.maxAttempts??s8}get status(){return this._status}get attempt(){return this._attempt}start(){this._status="connecting"}recordSuccess(){this._attempt=0,this._status="connected"}recordFailure(){return this._attempt>=this.maxAttempts?(this._status="giving-up","give-up"):(this._attempt++,this._status="connecting","retry")}nextDelayMs(){return a8(this._attempt-1,this.opts)}reset(){this._attempt=0,this._status="connecting"}stop(){this._status="idle"}}const l8=4404;function u8(e){return typeof e=="string"?nx(e)?"permanent":"transient":e.code===l8||typeof e.code=="number"&&e.code>=400&&e.code<500||typeof e.message=="string"&&nx(e.message)?"permanent":"transient"}const c8=/Unexpected server response: 4\d\d/;function nx(e){return c8.test(e)}function h8({fitRef:e,wsRef:t,xtermRef:r,connStatus:i,toolbarExtra:o,onReconnect:l}){const d=u=>{u.preventDefault(),l()},a=u=>{var c;u.preventDefault(),(c=r.current)==null||c.scrollToBottom()};return B.jsxs("div",{className:"terminal-controls",children:[B.jsx("button",{className:"terminal-control-btn",onPointerDown:d,tabIndex:-1,"aria-label":"Refresh terminal",children:B.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("path",{d:"M13.5 2.5v4h-4"}),B.jsx("path",{d:"M2.5 8a5.5 5.5 0 0 1 9.35-3.5L13.5 6.5"}),B.jsx("path",{d:"M2.5 13.5v-4h4"}),B.jsx("path",{d:"M13.5 8a5.5 5.5 0 0 1-9.35 3.5L2.5 9.5"})]})}),B.jsx("button",{className:"terminal-control-btn",onPointerDown:a,tabIndex:-1,"aria-label":"Scroll to bottom",children:B.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("path",{d:"M8 3v8"}),B.jsx("path",{d:"M4 8l4 4 4-4"}),B.jsx("line",{x1:"4",y1:"13",x2:"12",y2:"13"})]})}),B.jsx("span",{className:`terminal-control-btn terminal-status-icon terminal-status-${i}`,role:"status",title:i==="connected"?"Connected":i==="reconnecting"?"Reconnecting…":"Disconnected","aria-label":i==="connected"?"Connected":i==="reconnecting"?"Reconnecting":"Disconnected",children:B.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:B.jsx("circle",{cx:"8",cy:"8",r:"4",fill:"currentColor"})})}),o&&B.jsxs(B.Fragment,{children:[B.jsx("span",{className:"toolbar-divider"}),o]})]})}const YE=0,VE=1,f8=4e3,XE=["image/png","image/jpeg","image/gif","image/webp","image/bmp"];async function d8(e){var r;if(!((r=navigator.clipboard)!=null&&r.read))return!1;let t=!1;try{const i=await navigator.clipboard.read();for(const o of i){const l=o.types.find(d=>XE.includes(d));if(l){t=!0;const d=await o.getType(l);e.write(`\r
|
|
128
|
+
\x1B[90m[Uploading image...]\x1B[0m`);const{path:a}=await NE(d);return e.write("\r\x1B[2K"),e.paste(a),!0}}}catch{if(t)return e.write(`\r\x1B[2K\x1B[31m[Image upload failed]\x1B[0m\r
|
|
129
|
+
`),!0}return!1}async function p8(e){var t;if(!await d8(e))try{const r=await((t=navigator.clipboard)==null?void 0:t.readText());r&&e.paste(r)}catch{}}function v8(e,t){var i;const r=(i=e.clipboardData)==null?void 0:i.items;if(r){for(const o of Array.from(r))if(XE.includes(o.type)){const l=o.getAsFile();if(!l)continue;e.preventDefault(),t.write(`\r
|
|
130
|
+
\x1B[90m[Uploading image...]\x1B[0m`),NE(l).then(({path:d})=>{t.write("\r\x1B[2K"),t.paste(d)}).catch(()=>{t.write(`\r\x1B[2K\x1B[31m[Image upload failed]\x1B[0m\r
|
|
131
|
+
`)});return}}}function Sv({wsPath:e,onFileOpen:t,persistent:r,toolbarExtra:i,onPermanentClose:o}){const l=j.useRef(null),d=j.useRef(null),a=j.useRef(null),u=j.useRef(null),c=j.useRef({ctrl:!1,cmd:!1,clearCallback:null}),p=zE(`(max-width: ${PE}px)`),[f,g]=j.useState("connected"),b=j.useRef(null);return j.useEffect(()=>{var te,Q;if(!l.current)return;const S=new IL.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,scrollback:5e4,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0,linkHandler:{activate:(se,re)=>{window.open(re,"_blank","noopener")}}});d.current=S;const m=new jL.FitAddon;u.current=m,S.loadAddon(m),S.open(l.current);const v=()=>{try{S.loadAddon(new $L.CanvasAddon)}catch{}};try{const se=new zL.WebglAddon;se.onContextLoss(()=>{var Se,Le,xe,Ke;const re=((Le=(Se=S.buffer)==null?void 0:Se.active)==null?void 0:Le.viewportY)??0,be=((Ke=(xe=S.buffer)==null?void 0:xe.active)==null?void 0:Ke.baseY)??0,ve=!be||re>=be;se.dispose(),v(),ve?S.scrollToBottom():re>0&&S.scrollToLine(re)}),S.loadAddon(se)}catch{v()}const y=new YL((se,re)=>{se.preventDefault(),window.open(re,"_blank")});S.loadAddon(y);const x=e.split("/").pop();let C=null,E=null;if(t){E=new ZL(S);const se=new XL(S,(re,be,ve,Se)=>{t(re,be,ve,Se)},x,E);C=S.registerLinkProvider(se)}const D=navigator.platform.toUpperCase().includes("MAC");S.attachCustomKeyEventHandler(se=>{if(se.type!=="keydown")return!0;if(se.key==="Enter"&&se.shiftKey)return se.preventDefault(),S.paste(`\\
|
|
132
|
+
`),!1;if(!(D?se.metaKey:se.ctrlKey&&se.shiftKey))return!0;if(se.key==="c"||se.key==="C"){const be=S.getSelection();return be?(se.preventDefault(),navigator.clipboard.writeText(be).catch(()=>{}),!1):!0}return se.key==="v"||se.key==="V"?(se.preventDefault(),p8(S),!1):!0});const w=se=>v8(se,S);l.current.addEventListener("paste",w);try{const se=S._core,re=se==null?void 0:se._inputHandler;if(re&&typeof re.eraseInDisplay=="function"){const be=re.eraseInDisplay.bind(re);re.eraseInDisplay=(ve,Se)=>ve.params[0]===3?!0:be(ve,Se)}}catch{}const M=new e8({term:S,fitAddon:m,debug:!1,getContainer:()=>l.current});let T=null;const O=()=>{T&&clearTimeout(T),T=setTimeout(()=>{T=null,M.safeFit()},150)};M.safeFit();const L=setTimeout(O,300),R=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${e}`,I={lastSeq:0,timer:null,disposed:!1,initialPhase:!0,initialBuffer:"",flushTimer:null,skipReplay:!1,recoveryTimer:null},$=6,V=new o8({maxAttempts:$}),U=se=>(se=se.replace(/\x1b\[[\?>][\d;]*c/g,""),se=se.replace(/\[[\?>][\d;]*c/g,""),se),K=new t8,G=se=>{const re=se!==void 0?`${R}?resume=${se}`:R,be=nL(m_()),ve=be?new WebSocket(re,be):new WebSocket(re);ve.binaryType="arraybuffer",a.current=ve,I.initialPhase=!0,I.initialBuffer="",I.flushTimer&&(clearTimeout(I.flushTimer),I.flushTimer=null),K.flush(),M.reset();const Se=()=>{I.initialPhase=!1,I.flushTimer=null;const Le=()=>{var xe;((xe=a.current)==null?void 0:xe.readyState)===WebSocket.OPEN&&Ih(a.current,"resize",{cols:S.cols,rows:S.rows})};if(I.initialBuffer){const xe=U(I.initialBuffer);I.initialBuffer="",xe?(M.beginReplay(),S.write(xe,()=>{M.endReplay(),Le()})):(M.enterInteractive(),O(),Le())}else M.enterInteractive(),O(),Le()};ve.onopen=()=>{V.recordSuccess(),g("connected"),Ih(ve,"resize",{cols:S.cols,rows:S.rows})},ve.onmessage=Le=>{var Ae;const xe=new Uint8Array(Le.data);if(xe.length===0)return;const Ke=xe[0],xt=xe.subarray(1);if(Ke===VE){const Ce=new TextDecoder().decode(xt);if(I.initialPhase)I.initialBuffer+=Ce,I.flushTimer||(I.flushTimer=setTimeout(Se,500));else{const we=K.write(Ce);if(we){const de=U(we);de&&S.write(de)}}}else if(Ke===YE)try{const Ce=JSON.parse(new TextDecoder().decode(xt));Ce.type==="seq"&&typeof((Ae=Ce.payload)==null?void 0:Ae.seq)=="number"&&(I.lastSeq=Ce.payload.seq)}catch{}},ve.onclose=Le=>{if(I.disposed)return;if(u8({code:Le.code})==="permanent"){g("reconnecting"),o==null||o(),I.recoveryTimer||(I.recoveryTimer=setTimeout(()=>{I.recoveryTimer=null,!I.disposed&&(g("disconnected"),S.write(`\r
|
|
133
|
+
\x1B[31m[Codev: This terminal session no longer exists. Press the refresh button to reconnect.]\x1B[0m\r
|
|
134
|
+
`))},f8));return}if(V.recordFailure()==="give-up"){g("disconnected");return}g("reconnecting");const xe=V.nextDelayMs();I.timer=setTimeout(()=>{I.disposed||G(I.lastSeq||void 0)},xe)},ve.onerror=()=>{}},N=((Q=(te=window.matchMedia)==null?void 0:te.call(window,"(pointer: coarse)"))==null?void 0:Q.matches)??!1,H=S.textarea;let z=!1,q=0,J="",ie=0;const pe=()=>{z=!0},he=()=>{z=!1,q=Date.now()};H&&(H.addEventListener("compositionstart",pe),H.addEventListener("compositionend",he)),S.onData(se=>{var Le,xe,Ke,xt,Ae,Ce;const re=a.current;if(!re||re.readyState!==WebSocket.OPEN)return;const be=Date.now();if((z||be-q<150||N)&&se===J&&be-ie<150)return;if(J=se,ie=be,I.initialPhase){const we=se.replace(/\x1b\[[\?>][\d;]*c/g,"").replace(/\x1b\[\d+;\d+R/g,"").replace(/\x1b\[\?[\d;]*\$y/g,"");if(!we)return;se=we}const Se=c.current;if((Se.ctrl||Se.cmd)&&se.length===1){const we=se.charCodeAt(0);if(Se.ctrl)we>=97&&we<=122?se=String.fromCharCode(we-96):we>=65&&we<=90&&(se=String.fromCharCode(we-64)),Se.ctrl=!1,Se.cmd=!1,(Le=Se.clearCallback)==null||Le.call(Se);else if(Se.cmd){const de=se.toLowerCase();if(de==="v"){(xe=navigator.clipboard)==null||xe.readText().then(Ee=>{Ee&&S.paste(Ee)}).catch(()=>{}),Se.ctrl=!1,Se.cmd=!1,(Ke=Se.clearCallback)==null||Ke.call(Se);return}if(de==="c"){const Ee=S.getSelection();Ee&&((xt=navigator.clipboard)==null||xt.writeText(Ee).catch(()=>{})),Se.ctrl=!1,Se.cmd=!1,(Ae=Se.clearCallback)==null||Ae.call(Se);return}Se.ctrl=!1,Se.cmd=!1,(Ce=Se.clearCallback)==null||Ce.call(Se)}}m8(re,se)}),S.onResize(({cols:se,rows:re})=>{const be=a.current;(be==null?void 0:be.readyState)===WebSocket.OPEN&&Ih(be,"resize",{cols:se,rows:re})}),b.current=()=>{const se=a.current;if((se==null?void 0:se.readyState)===WebSocket.OPEN){u.current&&u.current.fit(),Ih(se,"resize",{cols:S.cols,rows:S.rows});return}I.disposed||(I.timer&&(clearTimeout(I.timer),I.timer=null),V.reset(),G(I.lastSeq||void 0))},G();const Z=new ResizeObserver(()=>O());Z.observe(l.current);const W=()=>{document.hidden||O()};return document.addEventListener("visibilitychange",W),()=>{var se,re;I.disposed=!0,I.timer&&clearTimeout(I.timer),I.flushTimer&&clearTimeout(I.flushTimer),I.recoveryTimer&&clearTimeout(I.recoveryTimer),clearTimeout(L),T&&clearTimeout(T),H&&(H.removeEventListener("compositionstart",pe),H.removeEventListener("compositionend",he)),M.dispose(),E==null||E.dispose(),C==null||C.dispose(),(se=l.current)==null||se.removeEventListener("paste",w),Z.disconnect(),document.removeEventListener("visibilitychange",W),(re=a.current)==null||re.close(),S.dispose(),d.current=null,a.current=null,u.current=null}},[e]),B.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[r===!1&&B.jsx("div",{style:{backgroundColor:"#3a2a00",color:"#ffcc00",padding:"4px 12px",fontSize:"12px",flexShrink:0},children:"Session persistence unavailable — this terminal will not survive a restart"}),B.jsx("div",{ref:l,className:"terminal-container",style:{width:"100%",flex:1,minHeight:0,overflow:"hidden",backgroundColor:"#1a1a1a"}}),B.jsx(h8,{fitRef:u,wsRef:a,xtermRef:d,connStatus:f,toolbarExtra:i,onReconnect:()=>{var S;return(S=b.current)==null?void 0:S.call(b)}}),p&&B.jsx(JL,{wsRef:a,modifierRef:c})]})}function m8(e,t){const r=new TextEncoder().encode(t),i=new Uint8Array(1+r.length);i[0]=VE,i.set(r,1),e.send(i.buffer)}function Ih(e,t,r){const i=JSON.stringify({type:t,payload:r}),o=new TextEncoder().encode(i),l=new Uint8Array(1+o.length);l[0]=YE,l.set(o,1),e.send(l.buffer)}const g8=300*1e3;function ZE(e,t=Date.now()){return e.blocked||e.phase==="complete"||e.phase==="verified"||!e.lastDataAt?!1:t-new Date(e.lastDataAt).getTime()>g8}function _8(e){if(e.blocked)return`Blocked: ${e.blocked}`;if(ZE(e))return"Waiting on input";if(e.mode==="soft")return"running";if(!e.phase)return"starting";const t=e.planPhases;if(t.length===0)return e.phase;const r=t.findIndex(i=>i.id===e.phase);return r===-1?e.phase:`${e.phase} (${r+1}/${t.length})`}function xv(e){if(e<0)return"-";const t=Math.floor(e/6e4);if(t<60)return`${t}m`;const r=Math.floor(t/60),i=t%60;return r<24?`${r}h ${i}m`:`${Math.floor(r/24)}d ${r%24}h`}function y8(e,t){if(!e)return"-";const r=Date.now()-new Date(e).getTime();if(r<0)return"-";const i=Math.max(0,r-t);return t===0?xv(r):`${xv(r)} wc / ${xv(i)} ag`}function b8({builder:e,onOpen:t,architectCount:r=0}){const i=e.issueId?`#${e.issueId}`:e.id,o=e.issueTitle||e.id,l=e.blocked!==null&&e.blocked!=="",d=!l&&ZE(e),a=Math.min(100,Math.max(0,Math.round(e.progress??0))),u=r>1&&!!e.spawnedByArchitect,c=l?" builder-row--blocked":d?" builder-row--waiting":"",p=l?" progress-fill--blocked":d?" progress-fill--waiting":"";return B.jsxs("tr",{className:`builder-row${c}`,children:[B.jsxs("td",{className:"builder-col-id",children:[i,u&&B.jsxs("span",{className:"builder-attribution",title:`spawned by ${e.spawnedByArchitect}`,children:[" · ",e.spawnedByArchitect]})]}),B.jsx("td",{className:"builder-col-title",children:o}),B.jsx("td",{className:"builder-col-state",children:B.jsx("span",{className:l||d?"builder-state-blocked":"builder-state-active",children:_8(e)})}),B.jsxs("td",{className:"builder-col-progress",children:[B.jsx("div",{className:"progress-bar",children:B.jsx("div",{className:`progress-fill${p}`,style:{width:`${a}%`}})}),B.jsxs("span",{className:"progress-pct",children:[a,"%"]})]}),B.jsx("td",{className:"builder-col-elapsed",children:y8(e.startedAt,e.idleMs??0)}),B.jsx("td",{className:"builder-col-actions",children:t&&B.jsx("button",{className:"builder-row-open",onClick:()=>t(e),children:"Open"})})]})}function S8(e){switch(e){case"spec review":return"attention-kind--spec";case"plan review":return"attention-kind--plan";case"dev review":return"attention-kind--dev";case"PR review":return"attention-kind--pr";case"verify review":return"attention-kind--verify";case"experiment review":case"maintenance review":case"scope review":case"research review":return"attention-kind--other";default:return"attention-kind--other"}}function x8(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${Math.max(1,r)}m`;const i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}function C8(e,t){const r=[],i=new Map,o=new Set,l=new Set;for(const d of t)d.issueId&&(l.add(d.issueId),d.prReady&&(o.add(d.issueId),d.blockedSince&&i.set(d.issueId,d.blockedSince)));for(const d of e){const a=d.linkedIssue!==null&&l.has(d.linkedIssue),u=d.linkedIssue!==null&&o.has(d.linkedIssue),c=u&&d.linkedIssue!==null?i.get(d.linkedIssue):void 0,p=!a&&d.reviewStatus==="REVIEW_REQUIRED";if(!u&&!p)continue;const f=u?c??d.createdAt:d.createdAt;r.push({key:`pr-${d.id}`,issueOrPR:`#${d.id}`,title:d.title,kind:"PR review",kindClass:"attention-kind--pr",waitingSince:f,url:d.url})}for(const d of t){if(d.prReady||!d.blocked||!d.blockedSince)continue;const a=d.issueId?`#${d.issueId}`:d.id;r.push({key:`gate-${d.id}`,issueOrPR:a,title:d.issueTitle||d.id,kind:d.blocked,kindClass:S8(d.blocked),waitingSince:d.blockedSince})}return r.sort((d,a)=>new Date(d.waitingSince).getTime()-new Date(a.waitingSince).getTime()),r}function w8({prs:e,builders:t}){const r=C8(e,t);return r.length===0?B.jsx("p",{className:"work-empty",children:"Nothing needs attention"}):B.jsx("div",{className:"attention-rows",children:r.map(i=>{const o=B.jsxs(B.Fragment,{children:[B.jsx("span",{className:"attention-row-id",children:i.issueOrPR}),B.jsx("span",{className:"attention-row-title",children:i.title}),B.jsx("span",{className:`attention-row-kind ${i.kindClass}`,children:i.kind}),B.jsx("span",{className:"attention-row-age",children:x8(i.waitingSince)})]});return i.url?B.jsx("a",{className:"attention-row",href:i.url,target:"_blank",rel:"noopener noreferrer",children:o},i.key):B.jsx("div",{className:"attention-row",children:o},i.key)})})}function E8(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${Math.max(1,r)}m`;const i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}const A8={high:"priority-dot--high",medium:"priority-dot--med",low:"priority-dot--low"},D8={bug:"type-tag--bug",project:"type-tag--project",spike:"type-tag--spike"};function Cv({label:e,filePath:t,onRefresh:r}){return B.jsx("button",{className:"backlog-artifact-link",onClick:async i=>{i.preventDefault(),i.stopPropagation(),await ud(t),r==null||r()},children:e})}function T8({items:e,onRefresh:t}){const r=e.filter(i=>!i.hasBuilder);return r.length===0?B.jsx("p",{className:"work-empty",children:"No open issues"}):B.jsx("div",{className:"backlog-rows",children:r.map(i=>B.jsxs("div",{className:"backlog-row",children:[B.jsxs("a",{className:"backlog-row-main",href:i.url,target:"_blank",rel:"noopener noreferrer",children:[B.jsx("span",{className:`backlog-priority-dot ${A8[i.priority]??"priority-dot--low"}`}),B.jsxs("span",{className:"backlog-row-number",children:["#",i.id]}),B.jsx("span",{className:`backlog-type-tag ${D8[i.type]??""}`,children:i.type}),B.jsx("span",{className:"backlog-row-title",children:i.title}),i.author&&B.jsxs("span",{className:"backlog-row-author",children:["r: @",i.author]}),B.jsxs("span",{className:"backlog-row-assignees",children:["a: ",i.assignees&&i.assignees.length>0?i.assignees.map(o=>`@${o}`).join(", "):"none"]}),B.jsx("span",{className:"backlog-row-age",children:E8(i.createdAt)})]}),(i.specPath||i.planPath||i.reviewPath)&&B.jsxs("span",{className:"backlog-artifacts",children:[i.specPath&&B.jsx(Cv,{label:"spec",filePath:i.specPath,onRefresh:t}),i.planPath&&B.jsx(Cv,{label:"plan",filePath:i.planPath,onRefresh:t}),i.reviewPath&&B.jsx(Cv,{label:"review",filePath:i.reviewPath,onRefresh:t})]})]},i.id))})}function M8(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${Math.max(1,r)}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}const k8={bug:"type-tag--bug",project:"type-tag--project",spike:"type-tag--spike"};function wv({label:e,filePath:t,onRefresh:r}){return B.jsx("button",{className:"backlog-artifact-link",onClick:async i=>{i.preventDefault(),i.stopPropagation(),await ud(t),r==null||r()},children:e})}function O8({items:e,onRefresh:t}){return e.length===0?null:B.jsx("div",{className:"recently-closed-rows",children:e.map(r=>{const i=r.prUrl||r.specPath||r.planPath||r.reviewPath;return B.jsxs("div",{className:"recently-closed-row",children:[B.jsxs("a",{className:"recently-closed-row-main",href:r.url,target:"_blank",rel:"noopener noreferrer",children:[B.jsx("span",{className:"recently-closed-check",children:"✓"}),B.jsxs("span",{className:"backlog-row-number",children:["#",r.id]}),B.jsx("span",{className:`backlog-type-tag ${k8[r.type]??""}`,children:r.type}),B.jsx("span",{className:"backlog-row-title",children:r.title}),B.jsx("span",{className:"backlog-row-age",children:M8(r.closedAt)})]}),i&&B.jsxs("span",{className:"backlog-artifacts",children:[r.specPath&&B.jsx(wv,{label:"spec",filePath:r.specPath,onRefresh:t}),r.planPath&&B.jsx(wv,{label:"plan",filePath:r.planPath,onRefresh:t}),r.reviewPath&&B.jsx(wv,{label:"review",filePath:r.reviewPath,onRefresh:t}),r.prUrl&&B.jsx("a",{className:"backlog-artifact-link",href:r.prUrl,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),children:"PR"})]})]},r.id)})})}function L8(e,t){const r=e.replace(/^\//,"");return t.staged.some(i=>r.endsWith(i)||i.endsWith(r))?{indicator:"A",className:"git-staged"}:t.modified.some(i=>r.endsWith(i)||i.endsWith(r))?{indicator:"M",className:"git-modified"}:t.untracked.some(i=>r.endsWith(i)||i.endsWith(r))?{indicator:"?",className:"git-untracked"}:null}function QE({entry:e,expanded:t,gitStatus:r,onToggle:i,onOpen:o,depth:l=0}){var c;const d=e.type==="directory",a=t.has(e.path),u=d?null:L8(e.path,r);return B.jsxs(B.Fragment,{children:[B.jsxs("div",{className:`file-node ${d?"directory":"file"}`,style:{paddingLeft:`${l*16+8}px`},onClick:()=>d?i(e.path):o(e.path),role:"treeitem","aria-expanded":d?a:void 0,tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d?i(e.path):o(e.path))},children:[B.jsx("span",{className:"file-icon",children:d?a?"📂":"📁":"📄"}),B.jsx("span",{className:"file-name",children:e.name}),u&&B.jsx("span",{className:`git-indicator ${u.className}`,children:u.indicator})]}),d&&a&&((c=e.children)==null?void 0:c.map(p=>B.jsx(QE,{entry:p,expanded:t,gitStatus:r,onToggle:i,onOpen:o,depth:l+1},p.path)))]})}function JE(e,t=[]){for(const r of e)r.type==="file"&&t.push(r),r.children&&JE(r.children,t);return t}function R8({onRefresh:e}){const[t,r]=j.useState([]),[i,o]=j.useState(new Set),[l,d]=j.useState(null),[a,u]=j.useState(!1),[c,p]=j.useState({modified:[],staged:[],untracked:[]}),[f,g]=j.useState([]),[b,S]=j.useState(""),[m,v]=j.useState(!1),y=j.useRef(null),x=j.useCallback(async()=>{try{const R=await gL();r(R),d(null),u(!0)}catch(R){d(R.message)}},[]),C=j.useCallback(async()=>{try{const R=await yL();p(R)}catch(R){console.error("Failed to load git status:",R)}},[]),E=j.useCallback(async()=>{try{const R=await bL();g(R)}catch(R){console.error("Failed to load recent files:",R)}},[]);j.useEffect(()=>{a||(x(),C(),E())},[a,x,C,E]),j.useEffect(()=>{const R=setInterval(()=>{x(),C()},5e3);return()=>clearInterval(R)},[x,C]);const D=R=>{o(I=>{const $=new Set(I);return $.has(R)?$.delete(R):$.add(R),$})},w=async R=>{try{await ud(R),e(),E()}catch(I){console.error("Failed to open file:",I)}},M=j.useMemo(()=>JE(t),[t]),T=j.useMemo(()=>{if(!b.trim())return[];const R=b.toLowerCase();return M.filter(I=>I.name.toLowerCase().includes(R)||I.path.toLowerCase().includes(R)).slice(0,10)},[M,b]),O=R=>{S(R.target.value),v(!0)},L=R=>{R.key==="Escape"?(v(!1),S("")):R.key==="Enter"&&T.length>0&&(w(T[0].path),S(""),v(!1))},P=R=>{w(R),S(""),v(!1)};return l?B.jsxs("div",{className:"file-tree-error",children:["Error: ",l]}):a?B.jsxs("div",{className:"file-tree-container",children:[B.jsxs("div",{className:"file-search",children:[B.jsx("input",{ref:y,type:"text",className:"file-search-input",placeholder:"Search files...",value:b,onChange:O,onKeyDown:L,onFocus:()=>v(!0),onBlur:()=>setTimeout(()=>v(!1),200)}),m&&T.length>0&&B.jsx("div",{className:"file-search-suggestions",children:T.map(R=>B.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>P(R.path),children:[B.jsx("span",{className:"suggestion-name",children:R.name}),B.jsx("span",{className:"suggestion-path",children:R.path})]},R.path))})]}),f.length>0&&B.jsxs("div",{className:"file-tree-section",children:[B.jsx("div",{className:"file-tree-section-header",children:"Recent"}),f.map(R=>B.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>w(R.path),role:"treeitem",tabIndex:0,onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),w(R.path))},children:[B.jsx("span",{className:"file-icon",children:"🕐"}),B.jsx("span",{className:"file-name",children:R.name}),B.jsx("span",{className:"file-path-hint",children:R.relativePath})]},R.id))]}),B.jsxs("div",{className:"file-tree-section",children:[B.jsx("div",{className:"file-tree-section-header",children:"Files"}),B.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:t.map(R=>B.jsx(QE,{entry:R,expanded:i,gitStatus:c,onToggle:D,onOpen:w},R.path))})]})]}):B.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function P8(e){const t=Math.floor(e/6e4);if(t<1)return"<1m";if(t<60)return`${t}m`;const r=Math.floor(t/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}function B8(e){const t=e.split("/").filter(Boolean);return t.length<=1?e:t.slice(-2).join("/")}const I8=3e4;function N8({utils:e,annotations:t,onSelectTab:r}){if(e.length===0&&t.length===0)return null;const i=Date.now();return B.jsxs("section",{className:"work-section",children:[B.jsx("h3",{className:"work-section-title",children:"Open Files & Shells"}),B.jsxs("div",{className:"ofs-rows",children:[e.length>0&&B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"ofs-subgroup-label",children:"Shells"}),e.map(o=>{const l=!o.lastDataAt||i-o.lastDataAt>I8,d=o.lastDataAt?P8(i-o.lastDataAt):"";return B.jsxs("div",{className:"ofs-row",onClick:()=>r(o.id),children:[B.jsx("span",{className:`ofs-dot ${l?"ofs-dot--idle":"ofs-dot--running"}`}),B.jsx("span",{className:"ofs-name",children:o.name||`Shell ${o.id}`}),l&&d&&B.jsx("span",{className:"ofs-idle",children:d})]},o.id)})]}),t.length>0&&B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"ofs-subgroup-label",children:"Files"}),t.map(o=>{const l=o.file.split("/").pop()??o.file;return B.jsxs("div",{className:"ofs-row",onClick:()=>r(o.id),title:o.file,children:[B.jsx("span",{className:"ofs-file-icon",children:"📄"}),B.jsx("span",{className:"ofs-name",children:l}),B.jsx("span",{className:"ofs-path",children:B8(o.file)})]},o.id)})]})]})]})}const Ro=['Use `afx spawn --task "description"` for quick one-off tasks that don\'t need a spec',"Run `afx status` to see all active builders and their current phase",'Use `afx send architect "message"` to notify the architect when you need guidance',"Run `afx cleanup --project 0042` after merging a PR to clean up the worktree","Use `afx spawn --soft -p 42` for flexible, protocol-guided work without strict porch orchestration","Run `afx workspace start` to launch the architect dashboard","Use `afx spawn 42 --resume` to resume an existing builder worktree instead of recreating it","Use `afx open file.ts` to open a file in the dashboard annotation viewer","Run `afx tower start` to start the Tower server — there is no `restart` command, use stop then start","Check `.codev/config.json` at your project root to customize builder and architect commands","Run `porch pending` to see all gates waiting for your approval across all projects","Use `porch status 42` to see detailed phase status for a specific project","Run `porch next 42` to get the next tasks for a project","Use `porch done 42` to signal that the current phase work is complete","Gates like `spec-approval` and `plan-approval` require explicit human approval before advancing","Porch tracks state in `codev/projects/<id>/status.yaml` — never edit this file directly","Use `porch approve 42 spec-approval` to approve a gate (human only)","Porch drives SPIR, TICK, and BUGFIX protocols via a state machine with automatic consultations","Use `consult -m gemini --type integration` for integration reviews with Gemini","Run `consult -m gemini --protocol spir --type spec` to get a Gemini review of your specification","Use `consult -m codex --protocol spir --type spec` for a focused specification review","Run `consult -m claude --protocol spir --type plan` to get feedback on your implementation plan","The `consult` CLI supports three models: `gemini`, `codex`, and `claude`",'Use `consult -m gemini --prompt "your question"` to ask Gemini a general question with codebase context','Say "cmap the PR" to run all three consultations in parallel in the background','Consultations are enabled by default in SPIR — say "without consultation" to skip them',"Commit specs and plans to `main` before spawning — builders branch from HEAD","Always add files explicitly with `git add file1 file2` — never use `git add .` or `git add -A`","Use SPIR for new features, TICK for amendments to existing specs, and BUGFIX for issue fixes","Each SPIR feature produces exactly three documents: spec, plan, and review","Specs define WHAT to build, plans define HOW — keep them as separate documents","Add YAML frontmatter with `approved` and `validated` fields to skip phases in porch","Run `codev doctor` to check that your environment is set up correctly","Use `--merge` (not squash) when merging PRs — individual commits document the development process","The TICK protocol modifies spec and plan in-place and creates a new review file","BUGFIX protocol uses GitHub Issues as source of truth — no spec/plan artifacts needed",'Run `tokei -e "node_modules" -e ".git" -e "dist" .` to measure codebase size',"Use `codev adopt` to set up Codev in an existing project","Click a builder card in the Work view to jump to its terminal tab","The file panel in Work view lets you browse project files without leaving the dashboard","Use the Refresh button to update builder status, PRs, and backlog data","The dashboard shows active builders, pending PRs, and backlog items in one view","Click the file panel toggle arrow to expand or collapse the file browser","The dashboard supports both desktop split-pane and mobile single-pane layouts","Tab indicators show builder status at a glance — active, waiting, or implementing","Use the `+ Shell` button to quickly open a new shell terminal tab","The SPIR protocol has four phases: Specify, Plan, Implement (IDE loop), and Review","Each implementation phase follows the IDE cycle: Implement, Defend (test), Evaluate","The EXPERIMENT protocol is for testing new approaches — use it for proof-of-concept work","The MAINTAIN protocol handles code hygiene and documentation sync","Run 3-way consultations at each SPIR checkpoint for spec, plan, and implementation reviews"];function j8(e){const t=new Date(e.getFullYear(),0,0);return Math.floor((e.getTime()-t.getTime())/864e5)}function eA(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return`tip-dismissed-${t}-${r}-${i}`}function F8(){try{return localStorage.getItem(eA(new Date))==="1"}catch{return!1}}function z8(){try{localStorage.setItem(eA(new Date),"1")}catch{}}function H8(e){return e.split("`").map((r,i)=>i%2===1?B.jsx("code",{children:r},i):B.jsx("span",{children:r},i))}function $8(){const e=j8(new Date)%Ro.length,[t,r]=j.useState(e),[i,o]=j.useState(F8);if(i||Ro.length===0)return null;const l=()=>{r((t-1+Ro.length)%Ro.length)},d=()=>{r((t+1)%Ro.length)},a=()=>{z8(),o(!0)};return B.jsxs("div",{className:"tip-banner",children:[B.jsx("button",{className:"tip-banner-nav",onClick:l,"aria-label":"Previous tip",children:"‹"}),B.jsx("span",{className:"tip-banner-label",children:"Tip:"}),B.jsx("span",{className:"tip-banner-text",children:H8(Ro[t])}),B.jsx("button",{className:"tip-banner-nav",onClick:d,"aria-label":"Next tip",children:"›"}),B.jsx("button",{className:"tip-banner-dismiss",onClick:a,"aria-label":"Dismiss tip",children:"×"})]})}function U8({state:e,onRefresh:t,onSelectTab:r}){var f,g,b;const{data:i,error:o,refresh:l}=HE(),[d,a]=j.useState(!1),u=j.useCallback(async()=>{try{await vL(),t()}catch(S){console.error("Failed to create shell:",S)}},[t]),c=j.useCallback(S=>{var v;const m=(v=e==null?void 0:e.builders)==null?void 0:v.find(y=>{var x,C,E,D;return S.issueId?((x=y.name)==null?void 0:x.includes(S.issueId))||((C=y.id)==null?void 0:C.includes(S.issueId)):((E=y.id)==null?void 0:E.includes(S.id))||((D=y.name)==null?void 0:D.includes(S.id))});m&&(r==null||r(m.id))},[e==null?void 0:e.builders,r]);if(!e)return B.jsx("div",{className:"work-view",children:B.jsx("p",{className:"work-loading",children:"Loading..."})});const p=((f=e.architects)==null?void 0:f.length)??0;return B.jsxs("div",{className:`work-view ${d?"file-panel-open":""}`,children:[B.jsxs("div",{className:"work-content",children:[B.jsxs("div",{className:"work-header",children:[B.jsx("h2",{className:"work-title",children:"Work"}),B.jsxs("div",{className:"work-actions",children:[B.jsx("button",{className:"work-btn",onClick:u,children:"+ Shell"}),B.jsx("button",{className:"work-btn work-btn-secondary",onClick:l,children:"Refresh"})]})]}),o&&B.jsxs("div",{className:"work-error",children:["Failed to load overview: ",o]}),B.jsx($8,{}),B.jsxs("section",{className:"work-section",children:[B.jsx("h3",{className:"work-section-title",children:"Builders"}),i!=null&&i.builders&&i.builders.length>0?B.jsxs("table",{className:"builder-table",children:[B.jsx("thead",{children:B.jsxs("tr",{children:[B.jsx("th",{children:"Issue"}),B.jsx("th",{children:"Title"}),B.jsx("th",{children:"State"}),B.jsx("th",{children:"Progress"}),B.jsx("th",{children:"Elapsed"}),B.jsx("th",{})]})}),B.jsx("tbody",{children:i.builders.map(S=>B.jsx(b8,{builder:S,onOpen:c,architectCount:p},S.id))})]}):B.jsx("p",{className:"work-empty",children:"No active builders"})]}),B.jsx(N8,{utils:(e==null?void 0:e.utils)??[],annotations:(e==null?void 0:e.annotations)??[],onSelectTab:S=>r==null?void 0:r(S)}),(i==null?void 0:i.forgeStatus)==="rate-limited"&&B.jsxs("p",{className:"work-unavailable",children:["Forge rate limited — PRs, backlog and recently closed may be stale until"," ",i.forgeResetAt?new Date(i.forgeResetAt).toLocaleTimeString():"the budget resets"]}),B.jsxs("section",{className:"work-section",children:[B.jsx("h3",{className:"work-section-title",children:"Needs Attention"}),(g=i==null?void 0:i.errors)!=null&&g.prs?B.jsx("p",{className:"work-unavailable",children:i.errors.prs}):B.jsx(w8,{prs:(i==null?void 0:i.pendingPRs)??[],builders:(i==null?void 0:i.builders)??[]})]}),B.jsxs("section",{className:"work-section",children:[B.jsx("h3",{className:"work-section-title",children:"Backlog"}),(b=i==null?void 0:i.errors)!=null&&b.issues?B.jsx("p",{className:"work-unavailable",children:i.errors.issues}):B.jsx(T8,{items:(i==null?void 0:i.backlog)??[],onRefresh:t})]}),(i==null?void 0:i.recentlyClosed)&&i.recentlyClosed.length>0&&B.jsxs("section",{className:"work-section",children:[B.jsx("h3",{className:"work-section-title",children:"Recently Closed"}),B.jsx(O8,{items:i.recentlyClosed,onRefresh:t})]})]}),B.jsxs("div",{className:`work-file-panel ${d?"expanded":"collapsed"}`,children:[B.jsxs("div",{className:"work-file-panel-header",children:[B.jsx("span",{className:"work-file-panel-toggle",onClick:()=>a(!d),children:d?"▼":"▲"}),B.jsx("span",{className:"work-file-panel-label",onClick:()=>a(!d),children:"Files"}),!d&&B.jsx("input",{className:"work-file-panel-search",type:"text",placeholder:"Search files...",onFocus:()=>a(!0)})]}),d&&B.jsx("div",{className:"work-file-panel-content",children:B.jsx(R8,{onRefresh:t})})]})]})}function q8(e,t,r="held"){const i=e??r;return t?`${i}:${t}`:i}function tA(e){const t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;const r=Math.floor(t/60);if(r<60)return`${r}m`;const i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}function W8(e,t){return tA(t-e)}function vg(e,t){return e!=null&&e>t}function sx({message:e,now:t}){const r=vg(e.notBefore,t),i=`${e.fromAgent??"?"} → ${e.toAgent}`,o=r?`→${tA(e.notBefore-t)}`:W8(e.createdAt,t),l=r?"scheduled":q8(e.reason,e.detail);return B.jsxs("li",{className:`held-row${e.escalated?" held-row--attention":""}`,"data-testid":"held-row",children:[B.jsx("span",{className:"held-row-addresses",children:i}),B.jsxs("span",{className:"held-row-meta",children:[o," · ",l,e.escalated&&!r?"!":""]})]})}function G8({count:e,escalated:t,loadMessages:r}){const[i,o]=j.useState(!1),[l,d]=j.useState({kind:"loading"}),[a,u]=j.useState(!1),c=j.useRef(null),p=j.useRef(null),f=j.useId(),g=j.useRef(0),b=j.useRef(r);j.useEffect(()=>{b.current=r},[r]);const S=j.useCallback(()=>{const D=++g.current;u(!0),d(w=>w.kind==="ready"?w:{kind:"loading"}),b.current().then(w=>{g.current===D&&(u(!1),d({kind:"ready",messages:w}))},w=>{g.current===D&&(u(!1),d({kind:"error",message:w instanceof Error?w.message:String(w)}))})},[]);if(j.useEffect(()=>{i&&S()},[i,e,S]),j.useEffect(()=>{if(!i)return;const D=M=>{var T;M.key==="Escape"&&(o(!1),(T=c.current)==null||T.focus())},w=M=>{var T;(T=p.current)!=null&&T.contains(M.target)||o(!1)};return document.addEventListener("keydown",D),document.addEventListener("mousedown",w),()=>{document.removeEventListener("keydown",D),document.removeEventListener("mousedown",w)}},[i]),e<=0&&!i)return null;const m=`${e} held`,v=t?`${e} held message${e===1?"":"s"} — at least one past the escalation age. Click to list them.`:`${e} held message${e===1?"":"s"} awaiting a clear prompt. Click to list them.`,y=Date.now(),x=l.kind==="ready"?l.messages:[],C=x.filter(D=>!vg(D.notBefore,y)),E=x.filter(D=>vg(D.notBefore,y));return B.jsxs("div",{className:"held-badge-wrapper",ref:p,children:[B.jsxs("button",{type:"button",ref:c,className:`held-badge${t?" held-badge--attention":""}`,"data-testid":"held-badge",title:v,"aria-expanded":i,"aria-controls":f,onClick:()=>o(D=>!D),children:[B.jsx("span",{className:`held-dot${t?" held-dot--attention":""}`}),m]}),i&&B.jsxs("div",{className:"held-popover",id:f,"data-testid":"held-popover","aria-live":"polite","aria-busy":a,children:[l.kind==="loading"&&B.jsx("p",{className:"held-popover-note",children:"Loading…"}),l.kind==="error"&&B.jsxs("p",{className:"held-popover-note held-popover-note--error","data-testid":"held-error",children:["Could not load held messages: ",l.message]}),l.kind==="ready"&&C.length===0&&B.jsx("p",{className:"held-popover-note","data-testid":"held-empty",children:e<=0&&x.length>0?"No held messages — the rows below are scheduled.":e<=0?"Held mail cleared.":"No held messages."}),C.length>0&&B.jsxs("section",{className:"held-group",children:[B.jsxs("h2",{className:"held-group-title",children:["Held (",C.length,")"]}),B.jsx("ul",{className:"held-list","data-testid":"held-group-held",children:C.map(D=>B.jsx(sx,{message:D,now:y},D.id))})]}),E.length>0&&B.jsxs("section",{className:"held-group held-group--scheduled",children:[B.jsxs("h2",{className:"held-group-title",children:["Scheduled (",E.length,")"]}),B.jsx("p",{className:"held-group-note",children:"Waiting for their due time — not counted above."}),B.jsx("ul",{className:"held-list","data-testid":"held-group-scheduled",children:E.map(D=>B.jsx(sx,{message:D,now:y},D.id))})]}),B.jsxs("p",{className:"held-popover-foot",children:["Ids and dismissal: ",B.jsx("code",{children:"afx inbox"})]})]})]})}function K8({tabs:e,activeTabId:t,onSelectTab:r,onRefresh:i,children:o}){return B.jsxs("div",{className:"mobile-layout",children:[B.jsx(qE,{tabs:e,activeTabId:t,onSelectTab:r,onRefresh:i}),B.jsx("div",{className:"mobile-content",children:o})]})}function Y8({tabId:e,initialLine:t}){let i=`${BE()}api/annotate/${e}/`;return t&&(i+=`?line=${t}`),B.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:B.jsx("iframe",{src:i,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function V8(e){return e==="24h"?"1":e==="7d"?"7":e==="30d"?"30":"all"}function X8(e){const[t,r]=j.useState(null),[i,o]=j.useState(null),[l,d]=j.useState(!1),[a,u]=j.useState("7d"),c=j.useCallback(async(f,g=!1)=>{d(!0),o(null);try{const b=await lL(V8(f),g);r(b)}catch(b){o(b instanceof Error?b.message:"Failed to fetch analytics")}finally{d(!1)}},[]);j.useEffect(()=>{e&&c(a)},[a,e,c]);const p=j.useCallback(()=>{c(a,!0)},[c,a]);return{data:t,error:i,loading:l,range:a,setRange:u,refresh:p}}function rA(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=rA(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function Dt(){for(var e,t,r=0,i="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=rA(e))&&(i&&(i+=" "),i+=t);return i}var Z8=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function __(e){if(typeof e!="string")return!1;var t=Z8;return t.includes(e)}var Q8=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],J8=new Set(Q8);function iA(e){return typeof e!="string"?!1:J8.has(e)}function nA(e){return typeof e=="string"&&e.startsWith("data-")}function $s(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(iA(r)||nA(r))&&(t[r]=e[r]);return t}function y_(e){if(e==null)return null;if(j.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return $s(t)}return typeof e=="object"&&!Array.isArray(e)?$s(e):null}function ki(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(iA(r)||nA(r)||__(r))&&(t[r]=e[r]);return t}var eR=["children","width","height","viewBox","className","style","title","desc"];function mg(){return mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},mg.apply(null,arguments)}function tR(e,t){if(e==null)return{};var r,i,o=rR(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function rR(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var sA=j.forwardRef((e,t)=>{var{children:r,width:i,height:o,viewBox:l,className:d,style:a,title:u,desc:c}=e,p=tR(e,eR),f=l||{width:i,height:o,x:0,y:0},g=Dt("recharts-surface",d);return j.createElement("svg",mg({},ki(p),{className:g,width:i,height:o,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),j.createElement("title",null,u),j.createElement("desc",null,c),r)}),iR=["children","className"];function gg(){return gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},gg.apply(null,arguments)}function nR(e,t){if(e==null)return{};var r,i,o=sR(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function sR(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var pn=j.forwardRef((e,t)=>{var{children:r,className:i}=e,o=nR(e,iR),l=Dt("recharts-layer",i);return j.createElement("g",gg({className:l},ki(o),{ref:t}),r)}),aA=LE(),aR=j.createContext(null);function bt(e){return function(){return e}}const oA=Math.cos,pf=Math.sin,qi=Math.sqrt,vf=Math.PI,cd=2*vf,_g=Math.PI,yg=2*_g,Ca=1e-6,oR=yg-Ca;function lA(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function lR(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return lA;const r=10**t;return function(i){this._+=i[0];for(let o=1,l=i.length;o<l;++o)this._+=Math.round(arguments[o]*r)/r+i[o]}}class uR{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?lA:lR(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,o){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+o}`}bezierCurveTo(t,r,i,o,l,d){this._append`C${+t},${+r},${+i},${+o},${this._x1=+l},${this._y1=+d}`}arcTo(t,r,i,o,l){if(t=+t,r=+r,i=+i,o=+o,l=+l,l<0)throw new Error(`negative radius: ${l}`);let d=this._x1,a=this._y1,u=i-t,c=o-r,p=d-t,f=a-r,g=p*p+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(g>Ca)if(!(Math.abs(f*u-c*p)>Ca)||!l)this._append`L${this._x1=t},${this._y1=r}`;else{let b=i-d,S=o-a,m=u*u+c*c,v=b*b+S*S,y=Math.sqrt(m),x=Math.sqrt(g),C=l*Math.tan((_g-Math.acos((m+g-v)/(2*y*x)))/2),E=C/x,D=C/y;Math.abs(E-1)>Ca&&this._append`L${t+E*p},${r+E*f}`,this._append`A${l},${l},0,0,${+(f*b>p*S)},${this._x1=t+D*u},${this._y1=r+D*c}`}}arc(t,r,i,o,l,d){if(t=+t,r=+r,i=+i,d=!!d,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(o),u=i*Math.sin(o),c=t+a,p=r+u,f=1^d,g=d?o-l:l-o;this._x1===null?this._append`M${c},${p}`:(Math.abs(this._x1-c)>Ca||Math.abs(this._y1-p)>Ca)&&this._append`L${c},${p}`,i&&(g<0&&(g=g%yg+yg),g>oR?this._append`A${i},${i},0,1,${f},${t-a},${r-u}A${i},${i},0,1,${f},${this._x1=c},${this._y1=p}`:g>Ca&&this._append`A${i},${i},0,${+(g>=_g)},${f},${this._x1=t+i*Math.cos(l)},${this._y1=r+i*Math.sin(l)}`)}rect(t,r,i,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}}function b_(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new uR(t)}function S_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function uA(e){this._context=e}uA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function hd(e){return new uA(e)}function cA(e){return e[0]}function hA(e){return e[1]}function fA(e,t){var r=bt(!0),i=null,o=hd,l=null,d=b_(a);e=typeof e=="function"?e:e===void 0?cA:bt(e),t=typeof t=="function"?t:t===void 0?hA:bt(t);function a(u){var c,p=(u=S_(u)).length,f,g=!1,b;for(i==null&&(l=o(b=d())),c=0;c<=p;++c)!(c<p&&r(f=u[c],c,u))===g&&((g=!g)?l.lineStart():l.lineEnd()),g&&l.point(+e(f,c,u),+t(f,c,u));if(b)return l=null,b+""||null}return a.x=function(u){return arguments.length?(e=typeof u=="function"?u:bt(+u),a):e},a.y=function(u){return arguments.length?(t=typeof u=="function"?u:bt(+u),a):t},a.defined=function(u){return arguments.length?(r=typeof u=="function"?u:bt(!!u),a):r},a.curve=function(u){return arguments.length?(o=u,i!=null&&(l=o(i)),a):o},a.context=function(u){return arguments.length?(u==null?i=l=null:l=o(i=u),a):i},a}function Nh(e,t,r){var i=null,o=bt(!0),l=null,d=hd,a=null,u=b_(c);e=typeof e=="function"?e:e===void 0?cA:bt(+e),t=typeof t=="function"?t:bt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?hA:bt(+r);function c(f){var g,b,S,m=(f=S_(f)).length,v,y=!1,x,C=new Array(m),E=new Array(m);for(l==null&&(a=d(x=u())),g=0;g<=m;++g){if(!(g<m&&o(v=f[g],g,f))===y)if(y=!y)b=g,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),S=g-1;S>=b;--S)a.point(C[S],E[S]);a.lineEnd(),a.areaEnd()}y&&(C[g]=+e(v,g,f),E[g]=+t(v,g,f),a.point(i?+i(v,g,f):C[g],r?+r(v,g,f):E[g]))}if(x)return a=null,x+""||null}function p(){return fA().defined(o).curve(d).context(l)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:bt(+f),i=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:bt(+f),c):e},c.x1=function(f){return arguments.length?(i=f==null?null:typeof f=="function"?f:bt(+f),c):i},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:bt(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:bt(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:bt(+f),c):r},c.lineX0=c.lineY0=function(){return p().x(e).y(t)},c.lineY1=function(){return p().x(e).y(r)},c.lineX1=function(){return p().x(i).y(t)},c.defined=function(f){return arguments.length?(o=typeof f=="function"?f:bt(!!f),c):o},c.curve=function(f){return arguments.length?(d=f,l!=null&&(a=d(l)),c):d},c.context=function(f){return arguments.length?(f==null?l=a=null:a=d(l=f),c):l},c}class dA{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function cR(e){return new dA(e,!0)}function hR(e){return new dA(e,!1)}const x_={draw(e,t){const r=qi(t/vf);e.moveTo(r,0),e.arc(0,0,r,0,cd)}},fR={draw(e,t){const r=qi(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},pA=qi(1/3),dR=pA*2,pR={draw(e,t){const r=qi(t/dR),i=r*pA;e.moveTo(0,-r),e.lineTo(i,0),e.lineTo(0,r),e.lineTo(-i,0),e.closePath()}},vR={draw(e,t){const r=qi(t),i=-r/2;e.rect(i,i,r,r)}},mR=.8908130915292852,vA=pf(vf/10)/pf(7*vf/10),gR=pf(cd/10)*vA,_R=-oA(cd/10)*vA,yR={draw(e,t){const r=qi(t*mR),i=gR*r,o=_R*r;e.moveTo(0,-r),e.lineTo(i,o);for(let l=1;l<5;++l){const d=cd*l/5,a=oA(d),u=pf(d);e.lineTo(u*r,-a*r),e.lineTo(a*i-u*o,u*i+a*o)}e.closePath()}},Ev=qi(3),bR={draw(e,t){const r=-qi(t/(Ev*3));e.moveTo(0,r*2),e.lineTo(-Ev*r,-r),e.lineTo(Ev*r,-r),e.closePath()}},Ei=-.5,Ai=qi(3)/2,bg=1/qi(12),SR=(bg/2+1)*3,xR={draw(e,t){const r=qi(t/SR),i=r/2,o=r*bg,l=i,d=r*bg+r,a=-l,u=d;e.moveTo(i,o),e.lineTo(l,d),e.lineTo(a,u),e.lineTo(Ei*i-Ai*o,Ai*i+Ei*o),e.lineTo(Ei*l-Ai*d,Ai*l+Ei*d),e.lineTo(Ei*a-Ai*u,Ai*a+Ei*u),e.lineTo(Ei*i+Ai*o,Ei*o-Ai*i),e.lineTo(Ei*l+Ai*d,Ei*d-Ai*l),e.lineTo(Ei*a+Ai*u,Ei*u-Ai*a),e.closePath()}};function CR(e,t){let r=null,i=b_(o);e=typeof e=="function"?e:bt(e||x_),t=typeof t=="function"?t:bt(t===void 0?64:+t);function o(){let l;if(r||(r=l=i()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),l)return r=null,l+""||null}return o.type=function(l){return arguments.length?(e=typeof l=="function"?l:bt(l),o):e},o.size=function(l){return arguments.length?(t=typeof l=="function"?l:bt(+l),o):t},o.context=function(l){return arguments.length?(r=l??null,o):r},o}function mf(){}function gf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function mA(e){this._context=e}mA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wR(e){return new mA(e)}function gA(e){this._context=e}gA.prototype={areaStart:mf,areaEnd:mf,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:gf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ER(e){return new gA(e)}function _A(e){this._context=e}_A.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:gf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function AR(e){return new _A(e)}function yA(e){this._context=e}yA.prototype={areaStart:mf,areaEnd:mf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function DR(e){return new yA(e)}function ax(e){return e<0?-1:1}function ox(e,t,r){var i=e._x1-e._x0,o=t-e._x1,l=(e._y1-e._y0)/(i||o<0&&-0),d=(r-e._y1)/(o||i<0&&-0),a=(l*o+d*i)/(i+o);return(ax(l)+ax(d))*Math.min(Math.abs(l),Math.abs(d),.5*Math.abs(a))||0}function lx(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Av(e,t,r){var i=e._x0,o=e._y0,l=e._x1,d=e._y1,a=(l-i)/3;e._context.bezierCurveTo(i+a,o+a*t,l-a,d-a*r,l,d)}function _f(e){this._context=e}_f.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Av(this,this._t0,lx(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Av(this,lx(this,r=ox(this,e,t)),r);break;default:Av(this,this._t0,r=ox(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function bA(e){this._context=new SA(e)}(bA.prototype=Object.create(_f.prototype)).point=function(e,t){_f.prototype.point.call(this,t,e)};function SA(e){this._context=e}SA.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,o,l){this._context.bezierCurveTo(t,e,i,r,l,o)}};function TR(e){return new _f(e)}function MR(e){return new bA(e)}function xA(e){this._context=e}xA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=ux(e),o=ux(t),l=0,d=1;d<r;++l,++d)this._context.bezierCurveTo(i[0][l],o[0][l],i[1][l],o[1][l],e[d],t[d]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ux(e){var t,r=e.length-1,i,o=new Array(r),l=new Array(r),d=new Array(r);for(o[0]=0,l[0]=2,d[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,l[t]=4,d[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,l[r-1]=7,d[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=o[t]/l[t-1],l[t]-=i,d[t]-=i*d[t-1];for(o[r-1]=d[r-1]/l[r-1],t=r-2;t>=0;--t)o[t]=(d[t]-o[t+1])/l[t];for(l[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)l[t]=2*e[t+1]-o[t+1];return[o,l]}function kR(e){return new xA(e)}function fd(e,t){this._context=e,this._t=t}fd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function OR(e){return new fd(e,.5)}function LR(e){return new fd(e,0)}function RR(e){return new fd(e,1)}function Pa(e,t){if((d=e.length)>1)for(var r=1,i,o,l=e[t[0]],d,a=l.length;r<d;++r)for(o=l,l=e[t[r]],i=0;i<a;++i)l[i][1]+=l[i][0]=isNaN(o[i][1])?o[i][0]:o[i][1]}function Sg(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function PR(e,t){return e[t]}function BR(e){const t=[];return t.key=e,t}function IR(){var e=bt([]),t=Sg,r=Pa,i=PR;function o(l){var d=Array.from(e.apply(this,arguments),BR),a,u=d.length,c=-1,p;for(const f of l)for(a=0,++c;a<u;++a)(d[a][c]=[0,+i(f,d[a].key,c,l)]).data=f;for(a=0,p=S_(t(d));a<u;++a)d[p[a]].index=a;return r(d,p),d}return o.keys=function(l){return arguments.length?(e=typeof l=="function"?l:bt(Array.from(l)),o):e},o.value=function(l){return arguments.length?(i=typeof l=="function"?l:bt(+l),o):i},o.order=function(l){return arguments.length?(t=l==null?Sg:typeof l=="function"?l:bt(Array.from(l)),o):t},o.offset=function(l){return arguments.length?(r=l??Pa,o):r},o}function NR(e,t){if((i=e.length)>0){for(var r,i,o=0,l=e[0].length,d;o<l;++o){for(d=r=0;r<i;++r)d+=e[r][o][1]||0;if(d)for(r=0;r<i;++r)e[r][o][1]/=d}Pa(e,t)}}function jR(e,t){if((o=e.length)>0){for(var r=0,i=e[t[0]],o,l=i.length;r<l;++r){for(var d=0,a=0;d<o;++d)a+=e[d][r][1]||0;i[r][1]+=i[r][0]=-a/2}Pa(e,t)}}function FR(e,t){if(!(!((d=e.length)>0)||!((l=(o=e[t[0]]).length)>0))){for(var r=0,i=1,o,l,d;i<l;++i){for(var a=0,u=0,c=0;a<d;++a){for(var p=e[t[a]],f=p[i][1]||0,g=p[i-1][1]||0,b=(f-g)/2,S=0;S<a;++S){var m=e[t[S]],v=m[i][1]||0,y=m[i-1][1]||0;b+=v-y}u+=f,c+=b*f}o[i-1][1]+=o[i-1][0]=r,u&&(r-=c/u)}o[i-1][1]+=o[i-1][0]=r,Pa(e,t)}}var Dv={},Tv={},cx;function zR(){return cx||(cx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Tv)),Tv}var Mv={},hx;function CA(){return hx||(hx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Mv)),Mv}var kv={},fx;function C_(){return fx||(fx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var i;return typeof r=="string"||typeof r=="symbol"?r:Object.is((i=r==null?void 0:r.valueOf)==null?void 0:i.call(r),-0)?"-0":String(r)}e.toKey=t})(kv)),kv}var Ov={},Lv={},dx;function HR(){return dx||(dx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const i=String(r);return i==="0"&&Object.is(Number(r),-0)?"-0":i}e.toString=t})(Lv)),Lv}var px;function w_(){return px||(px=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HR(),r=C_();function i(o){if(Array.isArray(o))return o.map(r.toKey);if(typeof o=="symbol")return[o];o=t.toString(o);const l=[],d=o.length;if(d===0)return l;let a=0,u="",c="",p=!1;for(o.charCodeAt(0)===46&&(l.push(""),a++);a<d;){const f=o[a];c?f==="\\"&&a+1<d?(a++,u+=o[a]):f===c?c="":u+=f:p?f==='"'||f==="'"?c=f:f==="]"?(p=!1,l.push(u),u=""):u+=f:f==="["?(p=!0,u&&(l.push(u),u="")):f==="."?u&&(l.push(u),u=""):u+=f,a++}return u&&l.push(u),l}e.toPath=i})(Ov)),Ov}var vx;function E_(){return vx||(vx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zR(),r=CA(),i=C_(),o=w_();function l(a,u,c){if(a==null)return c;switch(typeof u){case"string":{if(t.isUnsafeProperty(u))return c;const p=a[u];return p===void 0?r.isDeepKey(u)?l(a,o.toPath(u),c):c:p}case"number":case"symbol":{typeof u=="number"&&(u=i.toKey(u));const p=a[u];return p===void 0?c:p}default:{if(Array.isArray(u))return d(a,u,c);if(Object.is(u==null?void 0:u.valueOf(),-0)?u="-0":u=String(u),t.isUnsafeProperty(u))return c;const p=a[u];return p===void 0?c:p}}}function d(a,u,c){if(u.length===0)return c;let p=a;for(let f=0;f<u.length;f++){if(p==null||t.isUnsafeProperty(u[f]))return c;p=p[u[f]]}return p===void 0?c:p}e.get=l})(Dv)),Dv}var Rv,mx;function $R(){return mx||(mx=1,Rv=E_().get),Rv}var UR=$R();const el=Gs(UR);var qR=4;function js(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qR,r=10**t,i=Math.round(e*r)/r;return Object.is(i,-0)?0:i}function Ut(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return e.reduce((o,l,d)=>{var a=r[d-1];return typeof a=="string"?o+a+l:a!==void 0?o+js(a)+l:o+l},"")}var ui=e=>e===0?0:e>0?1:-1,vn=e=>typeof e=="number"&&e!=+e,Ba=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ie=e=>(typeof e=="number"||e instanceof Number)&&!vn(e),mn=e=>Ie(e)||typeof e=="string",WR=0,Nu=e=>{var t=++WR;return"".concat(e||"").concat(t)},$i=function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ie(t)&&typeof t!="string")return i;var l;if(Ba(t)){if(r==null)return i;var d=t.indexOf("%");l=r*parseFloat(t.slice(0,d))/100}else l=+t;return vn(l)&&(l=i),o&&r!=null&&l>r&&(l=r),l},wA=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},i=0;i<t;i++)if(!r[String(e[i])])r[String(e[i])]=!0;else return!0;return!1};function Dr(e,t,r){return Ie(e)&&Ie(t)?js(e+r*(t-e)):t}function GR(e,t,r){if(!(!e||!e.length))return e.find(i=>i&&(typeof t=="function"?t(i):el(i,t))===r)}var or=e=>e===null||typeof e>"u",nc=e=>or(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function on(e){return e!=null}function pl(){}var KR=["type","size","sizeType"];function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},xg.apply(null,arguments)}function gx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function _x(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gx(Object(r),!0).forEach(function(i){YR(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gx(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function YR(e,t,r){return(t=VR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VR(e){var t=XR(e,"string");return typeof t=="symbol"?t:t+""}function XR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZR(e,t){if(e==null)return{};var r,i,o=QR(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function QR(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var EA={symbolCircle:x_,symbolCross:fR,symbolDiamond:pR,symbolSquare:vR,symbolStar:yR,symbolTriangle:bR,symbolWye:xR},JR=Math.PI/180,e7=e=>{var t="symbol".concat(nc(e));return EA[t]||x_},t7=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*JR;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.tan(i)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},r7=(e,t)=>{EA["symbol".concat(nc(e))]=t},AA=e=>{var{type:t="circle",size:r=64,sizeType:i="area"}=e,o=ZR(e,KR),l=_x(_x({},o),{},{type:t,size:r,sizeType:i}),d="circle";typeof t=="string"&&(d=t);var a=()=>{var g=e7(d),b=CR().type(g).size(t7(r,i,d)),S=b();if(S!==null)return S},{className:u,cx:c,cy:p}=l,f=ki(l);return Ie(c)&&Ie(p)&&Ie(r)?j.createElement("path",xg({},f,{className:Dt("recharts-symbols",u),transform:"translate(".concat(c,", ").concat(p,")"),d:a()})):null};AA.registerSymbol=r7;var DA=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,i7=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(j.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var i={};return Object.keys(r).forEach(o=>{__(o)&&typeof r[o]=="function"&&(i[o]=(l=>r[o](r,l)))}),i},n7=(e,t,r)=>i=>(e(t,r,i),null),A_=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var i=null;return Object.keys(e).forEach(o=>{var l=e[o];__(o)&&typeof l=="function"&&(i||(i={}),i[o]=n7(l,t,r))}),i};function yx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function s7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yx(Object(r),!0).forEach(function(i){a7(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yx(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function a7(e,t,r){return(t=o7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o7(e){var t=l7(e,"string");return typeof t=="symbol"?t:t+""}function l7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pi(e,t){var r=s7({},e),i=t,o=Object.keys(t),l=o.reduce((d,a)=>(d[a]===void 0&&i[a]!==void 0&&(d[a]=i[a]),d),r);return l}var Pv={},Bv={},bx;function u7(){return bx||(bx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i){const o=new Map;for(let l=0;l<r.length;l++){const d=r[l],a=i(d,l,r);o.has(a)||o.set(a,d)}return Array.from(o.values())}e.uniqBy=t})(Bv)),Bv}var Iv={},Sx;function c7(){return Sx||(Sx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i){return function(...o){return r.apply(this,o.slice(0,i))}}e.ary=t})(Iv)),Iv}var Nv={},xx;function TA(){return xx||(xx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Nv)),Nv}var jv={},Fv={},zv={},Cx;function h7(){return Cx||(Cx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(zv)),zv}var wx;function MA(){return wx||(wx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h7();function r(i){return i!=null&&typeof i!="function"&&t.isLength(i.length)}e.isArrayLike=r})(Fv)),Fv}var Hv={},Ex;function f7(){return Ex||(Ex=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Hv)),Hv}var Ax;function d7(){return Ax||(Ax=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MA(),r=f7();function i(o){return r.isObjectLike(o)&&t.isArrayLike(o)}e.isArrayLikeObject=i})(jv)),jv}var $v={},Uv={},Dx;function p7(){return Dx||(Dx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E_();function r(i){return function(o){return t.get(o,i)}}e.property=r})(Uv)),Uv}var qv={},Wv={},Gv={},Kv={},Tx;function kA(){return Tx||(Tx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Kv)),Kv}var Yv={},Mx;function OA(){return Mx||(Mx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(Yv)),Yv}var Vv={},kx;function LA(){return kx||(kx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i){return r===i||Number.isNaN(r)&&Number.isNaN(i)}e.isEqualsSameValueZero=t})(Vv)),Vv}var Ox;function v7(){return Ox||(Ox=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kA(),r=OA(),i=LA();function o(p,f,g){return typeof g!="function"?o(p,f,()=>{}):l(p,f,function b(S,m,v,y,x,C){const E=g(S,m,v,y,x,C);return E!==void 0?!!E:l(S,m,b,C)},new Map)}function l(p,f,g,b){if(f===p)return!0;switch(typeof f){case"object":return d(p,f,g,b);case"function":return Object.keys(f).length>0?l(p,{...f},g,b):i.isEqualsSameValueZero(p,f);default:return t.isObject(p)?typeof f=="string"?f==="":!0:i.isEqualsSameValueZero(p,f)}}function d(p,f,g,b){if(f==null)return!0;if(Array.isArray(f))return u(p,f,g,b);if(f instanceof Map)return a(p,f,g,b);if(f instanceof Set)return c(p,f,g,b);const S=Object.keys(f);if(p==null||r.isPrimitive(p))return S.length===0;if(S.length===0)return!0;if(b!=null&&b.has(f))return b.get(f)===p;b==null||b.set(f,p);try{for(let m=0;m<S.length;m++){const v=S[m];if(!r.isPrimitive(p)&&!(v in p)||f[v]===void 0&&p[v]!==void 0||f[v]===null&&p[v]!==null||!g(p[v],f[v],v,p,f,b))return!1}return!0}finally{b==null||b.delete(f)}}function a(p,f,g,b){if(f.size===0)return!0;if(!(p instanceof Map))return!1;for(const[S,m]of f.entries()){const v=p.get(S);if(g(v,m,S,p,f,b)===!1)return!1}return!0}function u(p,f,g,b){if(f.length===0)return!0;if(!Array.isArray(p))return!1;const S=new Set;for(let m=0;m<f.length;m++){const v=f[m];let y=!1;for(let x=0;x<p.length;x++){if(S.has(x))continue;const C=p[x];let E=!1;if(g(C,v,m,p,f,b)&&(E=!0),E){S.add(x),y=!0;break}}if(!y)return!1}return!0}function c(p,f,g,b){return f.size===0?!0:p instanceof Set?u([...p],[...f],g,b):!1}e.isMatchWith=o,e.isSetMatch=c})(Gv)),Gv}var Lx;function RA(){return Lx||(Lx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=v7();function r(i,o){return t.isMatchWith(i,o,()=>{})}e.isMatch=r})(Wv)),Wv}var Xv={},Zv={},Qv={},Rx;function m7(){return Rx||(Rx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(i=>Object.prototype.propertyIsEnumerable.call(r,i))}e.getSymbols=t})(Qv)),Qv}var Jv={},Px;function D_(){return Px||(Px=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Jv)),Jv}var em={},Bx;function PA(){return Bx||(Bx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",i="[object Number]",o="[object Boolean]",l="[object Arguments]",d="[object Symbol]",a="[object Date]",u="[object Map]",c="[object Set]",p="[object Array]",f="[object Function]",g="[object ArrayBuffer]",b="[object Object]",S="[object Error]",m="[object DataView]",v="[object Uint8Array]",y="[object Uint8ClampedArray]",x="[object Uint16Array]",C="[object Uint32Array]",E="[object BigUint64Array]",D="[object Int8Array]",w="[object Int16Array]",M="[object Int32Array]",T="[object BigInt64Array]",O="[object Float32Array]",L="[object Float64Array]";e.argumentsTag=l,e.arrayBufferTag=g,e.arrayTag=p,e.bigInt64ArrayTag=T,e.bigUint64ArrayTag=E,e.booleanTag=o,e.dataViewTag=m,e.dateTag=a,e.errorTag=S,e.float32ArrayTag=O,e.float64ArrayTag=L,e.functionTag=f,e.int16ArrayTag=w,e.int32ArrayTag=M,e.int8ArrayTag=D,e.mapTag=u,e.numberTag=i,e.objectTag=b,e.regexpTag=t,e.setTag=c,e.stringTag=r,e.symbolTag=d,e.uint16ArrayTag=x,e.uint32ArrayTag=C,e.uint8ArrayTag=v,e.uint8ClampedArrayTag=y})(em)),em}var tm={},Ix;function g7(){return Ix||(Ix=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(tm)),tm}var Nx;function BA(){return Nx||(Nx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m7(),r=D_(),i=PA(),o=OA(),l=g7();function d(p,f){return a(p,void 0,p,new Map,f)}function a(p,f,g,b=new Map,S=void 0){const m=S==null?void 0:S(p,f,g,b);if(m!==void 0)return m;if(o.isPrimitive(p))return p;if(b.has(p))return b.get(p);if(Array.isArray(p)){const v=new Array(p.length);b.set(p,v);for(let y=0;y<p.length;y++)v[y]=a(p[y],y,g,b,S);return Object.hasOwn(p,"index")&&(v.index=p.index),Object.hasOwn(p,"input")&&(v.input=p.input),v}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const v=new RegExp(p.source,p.flags);return v.lastIndex=p.lastIndex,v}if(p instanceof Map){const v=new Map;b.set(p,v);for(const[y,x]of p)v.set(y,a(x,y,g,b,S));return v}if(p instanceof Set){const v=new Set;b.set(p,v);for(const y of p)v.add(a(y,void 0,g,b,S));return v}if(typeof Buffer<"u"&&Buffer.isBuffer(p))return p.subarray();if(l.isTypedArray(p)){const v=new(Object.getPrototypeOf(p)).constructor(p.length);b.set(p,v);for(let y=0;y<p.length;y++)v[y]=a(p[y],y,g,b,S);return v}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const v=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return b.set(p,v),u(v,p,g,b,S),v}if(typeof File<"u"&&p instanceof File){const v=new File([p],p.name,{type:p.type});return b.set(p,v),u(v,p,g,b,S),v}if(typeof Blob<"u"&&p instanceof Blob){const v=new Blob([p],{type:p.type});return b.set(p,v),u(v,p,g,b,S),v}if(p instanceof Error){const v=structuredClone(p);return b.set(p,v),v.message=p.message,v.name=p.name,v.stack=p.stack,v.cause=p.cause,v.constructor=p.constructor,u(v,p,g,b,S),v}if(p instanceof Boolean){const v=new Boolean(p.valueOf());return b.set(p,v),u(v,p,g,b,S),v}if(p instanceof Number){const v=new Number(p.valueOf());return b.set(p,v),u(v,p,g,b,S),v}if(p instanceof String){const v=new String(p.valueOf());return b.set(p,v),u(v,p,g,b,S),v}if(typeof p=="object"&&c(p)){const v=Object.create(Object.getPrototypeOf(p));return b.set(p,v),u(v,p,g,b,S),v}return p}function u(p,f,g=p,b,S){const m=[...Object.keys(f),...t.getSymbols(f)];for(let v=0;v<m.length;v++){const y=m[v],x=Object.getOwnPropertyDescriptor(p,y);(x==null||x.writable)&&(p[y]=a(f[y],y,g,b,S))}}function c(p){switch(r.getTag(p)){case i.argumentsTag:case i.arrayTag:case i.arrayBufferTag:case i.dataViewTag:case i.booleanTag:case i.dateTag:case i.float32ArrayTag:case i.float64ArrayTag:case i.int8ArrayTag:case i.int16ArrayTag:case i.int32ArrayTag:case i.mapTag:case i.numberTag:case i.objectTag:case i.regexpTag:case i.setTag:case i.stringTag:case i.symbolTag:case i.uint8ArrayTag:case i.uint8ClampedArrayTag:case i.uint16ArrayTag:case i.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=d,e.cloneDeepWithImpl=a,e.copyProperties=u})(Zv)),Zv}var jx;function _7(){return jx||(jx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BA();function r(i){return t.cloneDeepWithImpl(i,void 0,i,new Map,void 0)}e.cloneDeep=r})(Xv)),Xv}var Fx;function y7(){return Fx||(Fx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RA(),r=_7();function i(o){return o=r.cloneDeep(o),l=>t.isMatch(l,o)}e.matches=i})(qv)),qv}var rm={},im={},nm={},zx;function b7(){return zx||(zx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BA(),r=D_(),i=PA();function o(l,d){return t.cloneDeepWith(l,(a,u,c,p)=>{const f=d==null?void 0:d(a,u,c,p);if(f!==void 0)return f;if(typeof l=="object"){if(r.getTag(l)===i.objectTag&&typeof l.constructor!="function"){const g={};return p.set(l,g),t.copyProperties(g,l,c,p),g}switch(Object.prototype.toString.call(l)){case i.numberTag:case i.stringTag:case i.booleanTag:{const g=new l.constructor(l==null?void 0:l.valueOf());return t.copyProperties(g,l),g}case i.argumentsTag:{const g={};return t.copyProperties(g,l),g.length=l.length,g[Symbol.iterator]=l[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=o})(nm)),nm}var Hx;function S7(){return Hx||(Hx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=b7();function r(i){return t.cloneDeepWith(i)}e.cloneDeep=r})(im)),im}var sm={},am={},$x;function IA(){return $x||($x=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(i,o=Number.MAX_SAFE_INTEGER){switch(typeof i){case"number":return Number.isInteger(i)&&i>=0&&i<o;case"symbol":return!1;case"string":return t.test(i)}}e.isIndex=r})(am)),am}var om={},Ux;function x7(){return Ux||(Ux=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=D_();function r(i){return i!==null&&typeof i=="object"&&t.getTag(i)==="[object Arguments]"}e.isArguments=r})(om)),om}var qx;function C7(){return qx||(qx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CA(),r=IA(),i=x7(),o=w_();function l(d,a){let u;if(Array.isArray(a)?u=a:typeof a=="string"&&t.isDeepKey(a)&&(d==null?void 0:d[a])==null?u=o.toPath(a):u=[a],u.length===0)return!1;let c=d;for(let p=0;p<u.length;p++){const f=u[p];if((c==null||!Object.hasOwn(c,f))&&!((Array.isArray(c)||i.isArguments(c))&&r.isIndex(f)&&f<c.length))return!1;c=c[f]}return!0}e.has=l})(sm)),sm}var Wx;function w7(){return Wx||(Wx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RA(),r=C_(),i=S7(),o=E_(),l=C7();function d(a,u){switch(typeof a){case"object":{Object.is(a==null?void 0:a.valueOf(),-0)&&(a="-0");break}case"number":{a=r.toKey(a);break}}return u=i.cloneDeep(u),function(c){const p=o.get(c,a);return p===void 0?l.has(c,a):u===void 0?p===void 0:t.isMatch(p,u)}}e.matchesProperty=d})(rm)),rm}var Gx;function E7(){return Gx||(Gx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TA(),r=p7(),i=y7(),o=w7();function l(d){if(d==null)return t.identity;switch(typeof d){case"function":return d;case"object":return Array.isArray(d)&&d.length===2?o.matchesProperty(d[0],d[1]):i.matches(d);case"string":case"symbol":case"number":return r.property(d)}}e.iteratee=l})($v)),$v}var Kx;function A7(){return Kx||(Kx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u7(),r=c7(),i=TA(),o=d7(),l=E7();function d(a,u=i.identity){return o.isArrayLikeObject(a)?t.uniqBy(Array.from(a),r.ary(l.iteratee(u),1)):[]}e.uniqBy=d})(Pv)),Pv}var lm,Yx;function D7(){return Yx||(Yx=1,lm=A7().uniqBy),lm}var T7=D7();const Vx=Gs(T7);function M7(e,t,r){return t===!0?Vx(e,r):typeof t=="function"?Vx(e,t):e}var um={exports:{}},cm={},hm={exports:{}},fm={};/**
|
|
135
|
+
* @license React
|
|
136
|
+
* use-sync-external-store-shim.production.js
|
|
137
|
+
*
|
|
138
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the MIT license found in the
|
|
141
|
+
* LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/var Xx;function k7(){if(Xx)return fm;Xx=1;var e=dl();function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var r=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,l=e.useLayoutEffect,d=e.useDebugValue;function a(f,g){var b=g(),S=i({inst:{value:b,getSnapshot:g}}),m=S[0].inst,v=S[1];return l(function(){m.value=b,m.getSnapshot=g,u(m)&&v({inst:m})},[f,b,g]),o(function(){return u(m)&&v({inst:m}),f(function(){u(m)&&v({inst:m})})},[f]),d(b),b}function u(f){var g=f.getSnapshot;f=f.value;try{var b=g();return!r(f,b)}catch{return!0}}function c(f,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return fm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,fm}var Zx;function O7(){return Zx||(Zx=1,hm.exports=k7()),hm.exports}/**
|
|
143
|
+
* @license React
|
|
144
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
145
|
+
*
|
|
146
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the MIT license found in the
|
|
149
|
+
* LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/var Qx;function L7(){if(Qx)return cm;Qx=1;var e=dl(),t=O7();function r(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var i=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,l=e.useRef,d=e.useEffect,a=e.useMemo,u=e.useDebugValue;return cm.useSyncExternalStoreWithSelector=function(c,p,f,g,b){var S=l(null);if(S.current===null){var m={hasValue:!1,value:null};S.current=m}else m=S.current;S=a(function(){function y(w){if(!x){if(x=!0,C=w,w=g(w),b!==void 0&&m.hasValue){var M=m.value;if(b(M,w))return E=M}return E=w}if(M=E,i(C,w))return M;var T=g(w);return b!==void 0&&b(M,T)?(C=w,M):(C=w,E=T)}var x=!1,C,E,D=f===void 0?null:f;return[function(){return y(p())},D===null?void 0:function(){return y(D())}]},[p,f,g,b]);var v=o(c,S[0],S[1]);return d(function(){m.hasValue=!0,m.value=v},[v]),u(v),v},cm}var Jx;function R7(){return Jx||(Jx=1,um.exports=L7()),um.exports}var P7=R7(),T_=j.createContext(null),B7=e=>e,Bt=()=>{var e=j.useContext(T_);return e?e.store.dispatch:B7},af=()=>{},I7=()=>af,N7=(e,t)=>e===t;function Ne(e){var t=j.useContext(T_),r=j.useMemo(()=>t?i=>{if(i!=null)return e(i)}:af,[t,e]);return P7.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:I7,t?t.store.getState:af,t?t.store.getState:af,r,N7)}function j7(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function F7(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function z7(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${r}]`)}}var eC=e=>Array.isArray(e)?e:[e];function H7(e){const t=Array.isArray(e[0])?e[0]:e;return z7(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $7(e,t){const r=[],{length:i}=e;for(let o=0;o<i;o++)r.push(e[o].apply(null,t));return r}var U7=class{constructor(e){this.value=e}deref(){return this.value}},q7=typeof WeakRef<"u"?WeakRef:U7,W7=0,tC=1;function jh(){return{s:W7,v:void 0,o:null,p:null}}function NA(e,t={}){let r=jh();const{resultEqualityCheck:i}=t;let o,l=0;function d(){var f;let a=r;const{length:u}=arguments;for(let g=0,b=u;g<b;g++){const S=arguments[g];if(typeof S=="function"||typeof S=="object"&&S!==null){let m=a.o;m===null&&(a.o=m=new WeakMap);const v=m.get(S);v===void 0?(a=jh(),m.set(S,a)):a=v}else{let m=a.p;m===null&&(a.p=m=new Map);const v=m.get(S);v===void 0?(a=jh(),m.set(S,a)):a=v}}const c=a;let p;if(a.s===tC)p=a.v;else if(p=e.apply(null,arguments),l++,i){const g=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;g!=null&&i(g,p)&&(p=g,l!==0&&l--),o=typeof p=="object"&&p!==null||typeof p=="function"?new q7(p):p}return c.s=tC,c.v=p,p}return d.clearCache=()=>{r=jh(),d.resetResultsCount()},d.resultsCount=()=>l,d.resetResultsCount=()=>{l=0},d}function G7(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...o)=>{let l=0,d=0,a,u={},c=o.pop();typeof c=="object"&&(u=c,c=o.pop()),j7(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const p={...r,...u},{memoize:f,memoizeOptions:g=[],argsMemoize:b=NA,argsMemoizeOptions:S=[]}=p,m=eC(g),v=eC(S),y=H7(o),x=f(function(){return l++,c.apply(null,arguments)},...m),C=b(function(){d++;const D=$7(y,arguments);return a=x.apply(null,D),a},...v);return Object.assign(C,{resultFunc:c,memoizedResultFunc:x,dependencies:y,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>a,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:f,argsMemoize:b})};return Object.assign(i,{withTypes:()=>i}),i}var ue=G7(NA),K7=Object.assign((e,t=ue)=>{F7(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),i=r.map(l=>e[l]);return t(i,(...l)=>l.reduce((d,a,u)=>(d[r[u]]=a,d),{}))},{withTypes:()=>K7}),dm={},pm={},vm={},rC;function Y7(){return rC||(rC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(i){return typeof i=="symbol"?1:i===null?2:i===void 0?3:i!==i?4:0}const r=(i,o,l)=>{if(i!==o){const d=t(i),a=t(o);if(d===a&&d===0){if(i<o)return l==="desc"?1:-1;if(i>o)return l==="desc"?-1:1}return l==="desc"?a-d:d-a}return 0};e.compareValues=r})(vm)),vm}var mm={},gm={},iC;function jA(){return iC||(iC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(gm)),gm}var nC;function V7(){return nC||(nC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jA(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function o(l,d){return Array.isArray(l)?!1:typeof l=="number"||typeof l=="boolean"||l==null||t.isSymbol(l)?!0:typeof l=="string"&&(i.test(l)||!r.test(l))||d!=null&&Object.hasOwn(d,l)}e.isKey=o})(mm)),mm}var sC;function X7(){return sC||(sC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y7(),r=V7(),i=w_();function o(l,d,a,u){if(l==null)return[];a=u?void 0:a,Array.isArray(l)||(l=Object.values(l)),Array.isArray(d)||(d=d==null?[null]:[d]),d.length===0&&(d=[null]),Array.isArray(a)||(a=a==null?[]:[a]),a=a.map(b=>String(b));const c=(b,S)=>{let m=b;for(let v=0;v<S.length&&m!=null;++v)m=m[S[v]];return m},p=(b,S)=>S==null||b==null?S:typeof b=="object"&&"key"in b?Object.hasOwn(S,b.key)?S[b.key]:c(S,b.path):typeof b=="function"?b(S):Array.isArray(b)?c(S,b):typeof S=="object"?S[b]:S,f=d.map(b=>(Array.isArray(b)&&b.length===1&&(b=b[0]),b==null||typeof b=="function"||Array.isArray(b)||r.isKey(b)?b:{key:b,path:i.toPath(b)}));return l.map(b=>({original:b,criteria:f.map(S=>p(S,b))})).slice().sort((b,S)=>{for(let m=0;m<f.length;m++){const v=t.compareValues(b.criteria[m],S.criteria[m],a[m]);if(v!==0)return v}return 0}).map(b=>b.original)}e.orderBy=o})(pm)),pm}var _m={},aC;function Z7(){return aC||(aC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i=1){const o=[],l=Math.floor(i),d=(a,u)=>{for(let c=0;c<a.length;c++){const p=a[c];Array.isArray(p)&&u<l?d(p,u+1):o.push(p)}};return d(r,0),o}e.flatten=t})(_m)),_m}var ym={},oC;function FA(){return oC||(oC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IA(),r=MA(),i=kA(),o=LA();function l(d,a,u){return i.isObject(u)&&(typeof a=="number"&&r.isArrayLike(u)&&t.isIndex(a)&&a<u.length||typeof a=="string"&&a in u)?o.isEqualsSameValueZero(u[a],d):!1}e.isIterateeCall=l})(ym)),ym}var lC;function Q7(){return lC||(lC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=X7(),r=Z7(),i=FA();function o(l,...d){const a=d.length;return a>1&&i.isIterateeCall(l,d[0],d[1])?d=[]:a>2&&i.isIterateeCall(d[0],d[1],d[2])&&(d=[d[0]]),t.orderBy(l,r.flatten(d),["asc"])}e.sortBy=o})(dm)),dm}var bm,uC;function J7(){return uC||(uC=1,bm=Q7().sortBy),bm}var eP=J7();const dd=Gs(eP);var zA=e=>e.legend.settings,tP=e=>e.legend.size,rP=e=>e.legend.payload;ue([rP,zA],(e,t)=>{var{itemSorter:r}=t,i=e.flat(1);return r?dd(i,r):i});var Fh=1;function iP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=j.useState({height:0,left:0,top:0,width:0}),i=j.useCallback(o=>{if(o!=null){var l=o.getBoundingClientRect(),d={height:l.height,left:l.left,top:l.top,width:l.width};(Math.abs(d.height-t.height)>Fh||Math.abs(d.left-t.left)>Fh||Math.abs(d.top-t.top)>Fh||Math.abs(d.width-t.width)>Fh)&&r({height:d.height,left:d.left,top:d.top,width:d.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,i]}function Er(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var nP=typeof Symbol=="function"&&Symbol.observable||"@@observable",cC=nP,Sm=()=>Math.random().toString(36).substring(7).split("").join("."),sP={INIT:`@@redux/INIT${Sm()}`,REPLACE:`@@redux/REPLACE${Sm()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Sm()}`},yf=sP;function M_(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function HA(e,t,r){if(typeof e!="function")throw new Error(Er(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Er(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Er(1));return r(HA)(e,t)}let i=e,o=t,l=new Map,d=l,a=0,u=!1;function c(){d===l&&(d=new Map,l.forEach((v,y)=>{d.set(y,v)}))}function p(){if(u)throw new Error(Er(3));return o}function f(v){if(typeof v!="function")throw new Error(Er(4));if(u)throw new Error(Er(5));let y=!0;c();const x=a++;return d.set(x,v),function(){if(y){if(u)throw new Error(Er(6));y=!1,c(),d.delete(x),l=null}}}function g(v){if(!M_(v))throw new Error(Er(7));if(typeof v.type>"u")throw new Error(Er(8));if(typeof v.type!="string")throw new Error(Er(17));if(u)throw new Error(Er(9));try{u=!0,o=i(o,v)}finally{u=!1}return(l=d).forEach(x=>{x()}),v}function b(v){if(typeof v!="function")throw new Error(Er(10));i=v,g({type:yf.REPLACE})}function S(){const v=f;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Er(11));function x(){const E=y;E.next&&E.next(p())}return x(),{unsubscribe:v(x)}},[cC](){return this}}}return g({type:yf.INIT}),{dispatch:g,subscribe:f,getState:p,replaceReducer:b,[cC]:S}}function aP(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:yf.INIT})>"u")throw new Error(Er(12));if(typeof r(void 0,{type:yf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Er(13))})}function $A(e){const t=Object.keys(e),r={};for(let l=0;l<t.length;l++){const d=t[l];typeof e[d]=="function"&&(r[d]=e[d])}const i=Object.keys(r);let o;try{aP(r)}catch(l){o=l}return function(d={},a){if(o)throw o;let u=!1;const c={};for(let p=0;p<i.length;p++){const f=i[p],g=r[f],b=d[f],S=g(b,a);if(typeof S>"u")throw a&&a.type,new Error(Er(14));c[f]=S,u=u||S!==b}return u=u||i.length!==Object.keys(d).length,u?c:d}}function bf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function oP(...e){return t=>(r,i)=>{const o=t(r,i);let l=()=>{throw new Error(Er(15))};const d={getState:o.getState,dispatch:(u,...c)=>l(u,...c)},a=e.map(u=>u(d));return l=bf(...a)(o.dispatch),{...o,dispatch:l}}}function UA(e){return M_(e)&&"type"in e&&typeof e.type=="string"}var qA=Symbol.for("immer-nothing"),hC=Symbol.for("immer-draftable"),zr=Symbol.for("immer-state");function Fi(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ci=Object,tl=ci.getPrototypeOf,Sf="constructor",pd="prototype",Cg="configurable",xf="enumerable",of="writable",ju="value",es=e=>!!e&&!!e[zr];function Ui(e){var t;return e?WA(e)||md(e)||!!e[hC]||!!((t=e[Sf])!=null&&t[hC])||gd(e)||_d(e):!1}var lP=ci[pd][Sf].toString(),fC=new WeakMap;function WA(e){if(!e||!k_(e))return!1;const t=tl(e);if(t===null||t===ci[pd])return!0;const r=ci.hasOwnProperty.call(t,Sf)&&t[Sf];if(r===Object)return!0;if(!qo(r))return!1;let i=fC.get(r);return i===void 0&&(i=Function.toString.call(r),fC.set(r,i)),i===lP}function vd(e,t,r=!0){sc(e)===0?(r?Reflect.ownKeys(e):ci.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((i,o)=>t(o,i,e))}function sc(e){const t=e[zr];return t?t.type_:md(e)?1:gd(e)?2:_d(e)?3:0}var dC=(e,t,r=sc(e))=>r===2?e.has(t):ci[pd].hasOwnProperty.call(e,t),wg=(e,t,r=sc(e))=>r===2?e.get(t):e[t],Cf=(e,t,r,i=sc(e))=>{i===2?e.set(t,r):i===3?e.add(r):e[t]=r};function uP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var md=Array.isArray,gd=e=>e instanceof Map,_d=e=>e instanceof Set,k_=e=>typeof e=="object",qo=e=>typeof e=="function",xm=e=>typeof e=="boolean";function cP(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Kn=e=>e.copy_||e.base_,O_=e=>e.modified_?e.copy_:e.base_;function Eg(e,t){if(gd(e))return new Map(e);if(_d(e))return new Set(e);if(md(e))return Array[pd].slice.call(e);const r=WA(e);if(t===!0||t==="class_only"&&!r){const i=ci.getOwnPropertyDescriptors(e);delete i[zr];let o=Reflect.ownKeys(i);for(let l=0;l<o.length;l++){const d=o[l],a=i[d];a[of]===!1&&(a[of]=!0,a[Cg]=!0),(a.get||a.set)&&(i[d]={[Cg]:!0,[of]:!0,[xf]:a[xf],[ju]:e[d]})}return ci.create(tl(e),i)}else{const i=tl(e);if(i!==null&&r)return{...e};const o=ci.create(i);return ci.assign(o,e)}}function L_(e,t=!1){return yd(e)||es(e)||!Ui(e)||(sc(e)>1&&ci.defineProperties(e,{set:zh,add:zh,clear:zh,delete:zh}),ci.freeze(e),t&&vd(e,(r,i)=>{L_(i,!0)},!1)),e}function hP(){Fi(2)}var zh={[ju]:hP};function yd(e){return e===null||!k_(e)?!0:ci.isFrozen(e)}var wf="MapSet",Ag="Patches",pC="ArrayMethods",GA={};function Ia(e){const t=GA[e];return t||Fi(0,e),t}var vC=e=>!!GA[e],Fu,KA=()=>Fu,fP=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:vC(wf)?Ia(wf):void 0,arrayMethodsPlugin_:vC(pC)?Ia(pC):void 0});function mC(e,t){t&&(e.patchPlugin_=Ia(Ag),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Dg(e){Tg(e),e.drafts_.forEach(dP),e.drafts_=null}function Tg(e){e===Fu&&(Fu=e.parent_)}var gC=e=>Fu=fP(Fu,e);function dP(e){const t=e[zr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _C(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[zr].modified_&&(Dg(t),Fi(4)),Ui(e)&&(e=yC(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[zr].base_,e,t)}else e=yC(t,r);return pP(t,e,!0),Dg(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qA?e:void 0}function yC(e,t){if(yd(t))return t;const r=t[zr];if(!r)return Ef(t,e.handledSet_,e);if(!bd(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(e);XA(r,e)}return r.copy_}function pP(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&L_(t,r)}function YA(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var bd=(e,t)=>e.scope_===t,vP=[];function VA(e,t,r,i){const o=Kn(e),l=e.type_;if(i!==void 0&&wg(o,i,l)===t){Cf(o,i,r,l);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;vd(o,(u,c)=>{if(es(c)){const p=a.get(c)||[];p.push(u),a.set(c,p)}})}const d=e.draftLocations_.get(t)??vP;for(const a of d)Cf(o,a,r,l)}function mP(e,t,r){e.callbacks_.push(function(o){var a;const l=t;if(!l||!bd(l,o))return;(a=o.mapSetPlugin_)==null||a.fixSetContents(l);const d=O_(l);VA(e,l.draft_??l,d,r),XA(l,o)})}function XA(e,t){var i;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((i=e.assigned_)==null?void 0:i.size)??0)>0)){const{patchPlugin_:o}=t;if(o){const l=o.getPath(e);l&&o.generatePatches_(e,l,t)}YA(e)}}function gP(e,t,r){const{scope_:i}=e;if(es(r)){const o=r[zr];bd(o,i)&&o.callbacks_.push(function(){lf(e);const d=O_(o);VA(e,r,d,t)})}else Ui(r)&&e.callbacks_.push(function(){const l=Kn(e);e.type_===3?l.has(r)&&Ef(r,i.handledSet_,i):wg(l,t,e.type_)===r&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ef(wg(e.copy_,t,e.type_),i.handledSet_,i)})}function Ef(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||es(e)||t.has(e)||!Ui(e)||yd(e)||(t.add(e),vd(e,(i,o)=>{if(es(o)){const l=o[zr];if(bd(l,r)){const d=O_(l);Cf(e,i,d,e.type_),YA(l)}}else Ui(o)&&Ef(o,t,r)})),e}function _P(e,t){const r=md(e),i={type_:r?1:0,scope_:t?t.scope_:KA(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=i,l=Af;r&&(o=[i],l=zu);const{revoke:d,proxy:a}=Proxy.revocable(o,l);return i.draft_=a,i.revoke_=d,[a,i]}var Af={get(e,t){if(t===zr)return e;let r=e.scope_.arrayMethodsPlugin_;const i=e.type_===1&&typeof t=="string";if(i&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=Kn(e);if(!dC(o,t,e.type_))return yP(e,o,t);const l=o[t];if(e.finalized_||!Ui(l)||i&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&cP(t))return l;if(l===Cm(e.base_,t)){lf(e);const d=e.type_===1?+t:t,a=kg(e.scope_,l,e,d);return e.copy_[d]=a}return l},has(e,t){return t in Kn(e)},ownKeys(e){return Reflect.ownKeys(Kn(e))},set(e,t,r){const i=ZA(Kn(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){const o=Cm(Kn(e),t),l=o==null?void 0:o[zr];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(uP(r,o)&&(r!==void 0||dC(e.base_,t,e.type_)))return!0;lf(e),Mg(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),gP(e,t,r)),!0},deleteProperty(e,t){return lf(e),Cm(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Mg(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Kn(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{[of]:!0,[Cg]:e.type_!==1||t!=="length",[xf]:i[xf],[ju]:r[t]}},defineProperty(){Fi(11)},getPrototypeOf(e){return tl(e.base_)},setPrototypeOf(){Fi(12)}},zu={};for(let e in Af){let t=Af[e];zu[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}zu.deleteProperty=function(e,t){return zu.set.call(this,e,t,void 0)};zu.set=function(e,t,r){return Af.set.call(this,e[0],t,r,e[0])};function Cm(e,t){const r=e[zr];return(r?Kn(r):e)[t]}function yP(e,t,r){var o;const i=ZA(t,r);return i?ju in i?i[ju]:(o=i.get)==null?void 0:o.call(e.draft_):void 0}function ZA(e,t){if(!(t in e))return;let r=tl(e);for(;r;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=tl(r)}}function Mg(e){e.modified_||(e.modified_=!0,e.parent_&&Mg(e.parent_))}function lf(e){e.copy_||(e.assigned_=new Map,e.copy_=Eg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var bP=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,i,o)=>{if(qo(r)&&!qo(i)){const d=i;i=r;const a=this;return function(c=d,...p){return a.produce(c,f=>i.call(this,f,...p))}}qo(i)||Fi(6),o!==void 0&&!qo(o)&&Fi(7);let l;if(Ui(r)){const d=gC(this),a=kg(d,r,void 0);let u=!0;try{l=i(a),u=!1}finally{u?Dg(d):Tg(d)}return mC(d,o),_C(l,d)}else if(!r||!k_(r)){if(l=i(r),l===void 0&&(l=r),l===qA&&(l=void 0),this.autoFreeze_&&L_(l,!0),o){const d=[],a=[];Ia(Ag).generateReplacementPatches_(r,l,{patches_:d,inversePatches_:a}),o(d,a)}return l}else Fi(1,r)},this.produceWithPatches=(r,i)=>{if(qo(r))return(a,...u)=>this.produceWithPatches(a,c=>r(c,...u));let o,l;return[this.produce(r,i,(a,u)=>{o=a,l=u}),o,l]},xm(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),xm(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),xm(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Ui(t)||Fi(8),es(t)&&(t=Ti(t));const r=gC(this),i=kg(r,t,void 0);return i[zr].isManual_=!0,Tg(r),i}finishDraft(t,r){const i=t&&t[zr];(!i||!i.isManual_)&&Fi(9);const{scope_:o}=i;return mC(o,r),_C(void 0,o)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let i;for(i=r.length-1;i>=0;i--){const l=r[i];if(l.path.length===0&&l.op==="replace"){t=l.value;break}}i>-1&&(r=r.slice(i+1));const o=Ia(Ag).applyPatches_;return es(t)?o(t,r):this.produce(t,l=>o(l,r))}};function kg(e,t,r,i){const[o,l]=gd(t)?Ia(wf).proxyMap_(t,r):_d(t)?Ia(wf).proxySet_(t,r):_P(t,r);return((r==null?void 0:r.scope_)??KA()).drafts_.push(o),l.callbacks_=(r==null?void 0:r.callbacks_)??[],l.key_=i,r&&i!==void 0?mP(r,l,i):l.callbacks_.push(function(u){var p;(p=u.mapSetPlugin_)==null||p.fixSetContents(l);const{patchPlugin_:c}=u;l.modified_&&c&&c.generatePatches_(l,[],u)}),o}function Ti(e){return es(e)||Fi(10,e),QA(e)}function QA(e){if(!Ui(e)||yd(e))return e;const t=e[zr];let r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Eg(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=Eg(e,!0);return vd(r,(o,l)=>{Cf(r,o,QA(l))},i),t&&(t.finalized_=!1),r}var SP=new bP,JA=SP.produce;function e6(e){return({dispatch:r,getState:i})=>o=>l=>typeof l=="function"?l(r,i,e):o(l)}var xP=e6(),CP=e6,wP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?bf:bf.apply(null,arguments)};function fi(e,t){function r(...i){if(t){let o=t(...i);if(!o)throw new Error(hi(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>UA(i)&&i.type===e,r}var t6=class Ou extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ou.prototype)}static get[Symbol.species](){return Ou}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ou(...t[0].concat(this)):new Ou(...t.concat(this))}};function bC(e){return Ui(e)?JA(e,()=>{}):e}function Hh(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function EP(e){return typeof e=="boolean"}var AP=()=>function(t){const{thunk:r=!0,immutableCheck:i=!0,serializableCheck:o=!0,actionCreatorCheck:l=!0}=t??{};let d=new t6;return r&&(EP(r)?d.push(xP):d.push(CP(r.extraArgument))),d},r6="RTK_autoBatch",Et=()=>e=>({payload:e,meta:{[r6]:!0}}),SC=e=>t=>{setTimeout(t,e)},i6=(e={type:"raf"})=>t=>(...r)=>{const i=t(...r);let o=!0,l=!1,d=!1;const a=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:SC(10):e.type==="callback"?e.queueNotification:SC(e.timeout),c=()=>{d=!1,l&&(l=!1,a.forEach(p=>p()))};return Object.assign({},i,{subscribe(p){const f=()=>o&&p(),g=i.subscribe(f);return a.add(p),()=>{g(),a.delete(p)}},dispatch(p){var f;try{return o=!((f=p==null?void 0:p.meta)!=null&&f[r6]),l=!o,l&&(d||(d=!0,u(c))),i.dispatch(p)}finally{o=!0}}})},DP=e=>function(r){const{autoBatch:i=!0}=r??{};let o=new t6(e);return i&&o.push(i6(typeof i=="object"?i:void 0)),o};function TP(e){const t=AP(),{reducer:r=void 0,middleware:i,devTools:o=!0,preloadedState:l=void 0,enhancers:d=void 0}=e||{};let a;if(typeof r=="function")a=r;else if(M_(r))a=$A(r);else throw new Error(hi(1));let u;typeof i=="function"?u=i(t):u=t();let c=bf;o&&(c=wP({trace:!1,...typeof o=="object"&&o}));const p=oP(...u),f=DP(p);let g=typeof d=="function"?d(f):f();const b=c(...g);return HA(a,l,b)}function n6(e){const t={},r=[];let i;const o={addCase(l,d){const a=typeof l=="string"?l:l.type;if(!a)throw new Error(hi(28));if(a in t)throw new Error(hi(29));return t[a]=d,o},addAsyncThunk(l,d){return d.pending&&(t[l.pending.type]=d.pending),d.rejected&&(t[l.rejected.type]=d.rejected),d.fulfilled&&(t[l.fulfilled.type]=d.fulfilled),d.settled&&r.push({matcher:l.settled,reducer:d.settled}),o},addMatcher(l,d){return r.push({matcher:l,reducer:d}),o},addDefaultCase(l){return i=l,o}};return e(o),[t,r,i]}function MP(e){return typeof e=="function"}function kP(e,t){let[r,i,o]=n6(t),l;if(MP(e))l=()=>bC(e());else{const a=bC(e);l=()=>a}function d(a=l(),u){let c=[r[u.type],...i.filter(({matcher:p})=>p(u)).map(({reducer:p})=>p)];return c.filter(p=>!!p).length===0&&(c=[o]),c.reduce((p,f)=>{if(f)if(es(p)){const b=f(p,u);return b===void 0?p:b}else{if(Ui(p))return JA(p,g=>f(g,u));{const g=f(p,u);if(g===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return p},a)}return d.getInitialState=l,d}var OP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",LP=(e=21)=>{let t="",r=e;for(;r--;)t+=OP[Math.random()*64|0];return t},RP=Symbol.for("rtk-slice-createasyncthunk");function PP(e,t){return`${e}/${t}`}function BP({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[RP];return function(o){const{name:l,reducerPath:d=l}=o;if(!l)throw new Error(hi(11));const a=(typeof o.reducers=="function"?o.reducers(NP()):o.reducers)||{},u=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,D){const w=typeof E=="string"?E:E.type;if(!w)throw new Error(hi(12));if(w in c.sliceCaseReducersByType)throw new Error(hi(13));return c.sliceCaseReducersByType[w]=D,p},addMatcher(E,D){return c.sliceMatchers.push({matcher:E,reducer:D}),p},exposeAction(E,D){return c.actionCreators[E]=D,p},exposeCaseReducer(E,D){return c.sliceCaseReducersByName[E]=D,p}};u.forEach(E=>{const D=a[E],w={reducerName:E,type:PP(l,E),createNotation:typeof o.reducers=="function"};FP(D)?HP(w,D,p,t):jP(w,D,p)});function f(){const[E={},D=[],w=void 0]=typeof o.extraReducers=="function"?n6(o.extraReducers):[o.extraReducers],M={...E,...c.sliceCaseReducersByType};return kP(o.initialState,T=>{for(let O in M)T.addCase(O,M[O]);for(let O of c.sliceMatchers)T.addMatcher(O.matcher,O.reducer);for(let O of D)T.addMatcher(O.matcher,O.reducer);w&&T.addDefaultCase(w)})}const g=E=>E,b=new Map,S=new WeakMap;let m;function v(E,D){return m||(m=f()),m(E,D)}function y(){return m||(m=f()),m.getInitialState()}function x(E,D=!1){function w(T){let O=T[E];return typeof O>"u"&&D&&(O=Hh(S,w,y)),O}function M(T=g){const O=Hh(b,D,()=>new WeakMap);return Hh(O,T,()=>{const L={};for(const[P,R]of Object.entries(o.selectors??{}))L[P]=IP(R,T,()=>Hh(S,T,y),D);return L})}return{reducerPath:E,getSelectors:M,get selectors(){return M(w)},selectSlice:w}}const C={name:l,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...x(d),injectInto(E,{reducerPath:D,...w}={}){const M=D??d;return E.inject({reducerPath:M,reducer:v},w),{...C,...x(M,!0)}}};return C}}function IP(e,t,r,i){function o(l,...d){let a=t(l);return typeof a>"u"&&i&&(a=r()),e(a,...d)}return o.unwrapped=e,o}var Pr=BP();function NP(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function jP({type:e,reducerName:t,createNotation:r},i,o){let l,d;if("reducer"in i){if(r&&!zP(i))throw new Error(hi(17));l=i.reducer,d=i.prepare}else l=i;o.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,d?fi(e,d):fi(e))}function FP(e){return e._reducerDefinitionType==="asyncThunk"}function zP(e){return e._reducerDefinitionType==="reducerWithPrepare"}function HP({type:e,reducerName:t},r,i,o){if(!o)throw new Error(hi(18));const{payloadCreator:l,fulfilled:d,pending:a,rejected:u,settled:c,options:p}=r,f=o(e,l,p);i.exposeAction(t,f),d&&i.addCase(f.fulfilled,d),a&&i.addCase(f.pending,a),u&&i.addCase(f.rejected,u),c&&i.addMatcher(f.settled,c),i.exposeCaseReducer(t,{fulfilled:d||$h,pending:a||$h,rejected:u||$h,settled:c||$h})}function $h(){}var $P="task",s6="listener",a6="completed",R_="cancelled",UP=`task-${R_}`,qP=`task-${a6}`,Og=`${s6}-${R_}`,WP=`${s6}-${a6}`,Sd=class{constructor(e){zt(this,"name","TaskAbortError");zt(this,"message");this.code=e,this.message=`${$P} ${R_} (reason: ${e})`}},P_=(e,t)=>{if(typeof e!="function")throw new TypeError(hi(32))},Df=()=>{},o6=(e,t=Df)=>(e.catch(t),e),l6=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ka=e=>{if(e.aborted)throw new Sd(e.reason)};function u6(e,t){let r=Df;return new Promise((i,o)=>{const l=()=>o(new Sd(e.reason));if(e.aborted){l();return}r=l6(e,l),t.finally(()=>r()).then(i,o)}).finally(()=>{r=Df})}var GP=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Sd?"cancelled":"rejected",error:r}}finally{t==null||t()}},Tf=e=>t=>o6(u6(e,t).then(r=>(ka(e),r))),c6=e=>{const t=Tf(e);return r=>t(new Promise(i=>setTimeout(i,r)))},{assign:Xo}=Object,xC={},xd="listenerMiddleware",KP=(e,t)=>{const r=i=>l6(e,()=>i.abort(e.reason));return(i,o)=>{P_(i);const l=new AbortController;r(l);const d=GP(async()=>{ka(e),ka(l.signal);const a=await i({pause:Tf(l.signal),delay:c6(l.signal),signal:l.signal});return ka(l.signal),a},()=>l.abort(qP));return o!=null&&o.autoJoin&&t.push(d.catch(Df)),{result:Tf(e)(d),cancel(){l.abort(UP)}}}},YP=(e,t)=>{const r=async(i,o)=>{ka(t);let l=()=>{};const a=[new Promise((u,c)=>{let p=e({predicate:i,effect:(f,g)=>{g.unsubscribe(),u([f,g.getState(),g.getOriginalState()])}});l=()=>{p(),c()}})];o!=null&&a.push(new Promise(u=>setTimeout(u,o,null)));try{const u=await u6(t,Promise.race(a));return ka(t),u}finally{l()}};return(i,o)=>o6(r(i,o))},h6=e=>{let{type:t,actionCreator:r,matcher:i,predicate:o,effect:l}=e;if(t)o=fi(t).match;else if(r)t=r.type,o=r.match;else if(i)o=i;else if(!o)throw new Error(hi(21));return P_(l),{predicate:o,type:t,effect:l}},f6=Xo(e=>{const{type:t,predicate:r,effect:i}=h6(e);return{id:LP(),effect:i,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(hi(22))}}},{withTypes:()=>f6}),CC=(e,t)=>{const{type:r,effect:i,predicate:o}=h6(t);return Array.from(e.values()).find(l=>(typeof r=="string"?l.type===r:l.predicate===o)&&l.effect===i)},Lg=e=>{e.pending.forEach(t=>{t.abort(Og)})},VP=(e,t)=>()=>{for(const r of t.keys())Lg(r);e.clear()},wC=(e,t,r)=>{try{e(t,r)}catch(i){setTimeout(()=>{throw i},0)}},d6=Xo(fi(`${xd}/add`),{withTypes:()=>d6}),XP=fi(`${xd}/removeAll`),p6=Xo(fi(`${xd}/remove`),{withTypes:()=>p6}),ZP=(...e)=>{console.error(`${xd}/error`,...e)},ac=(e={})=>{const t=new Map,r=new Map,i=b=>{const S=r.get(b)??0;r.set(b,S+1)},o=b=>{const S=r.get(b)??1;S===1?r.delete(b):r.set(b,S-1)},{extra:l,onError:d=ZP}=e;P_(d);const a=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),S=>{b.unsubscribe(),S!=null&&S.cancelActive&&Lg(b)}),u=b=>{const S=CC(t,b)??f6(b);return a(S)};Xo(u,{withTypes:()=>u});const c=b=>{const S=CC(t,b);return S&&(S.unsubscribe(),b.cancelActive&&Lg(S)),!!S};Xo(c,{withTypes:()=>c});const p=async(b,S,m,v)=>{const y=new AbortController,x=YP(u,y.signal),C=[];try{b.pending.add(y),i(b),await Promise.resolve(b.effect(S,Xo({},m,{getOriginalState:v,condition:(E,D)=>x(E,D).then(Boolean),take:x,delay:c6(y.signal),pause:Tf(y.signal),extra:l,signal:y.signal,fork:KP(y.signal,C),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((E,D,w)=>{E!==y&&(E.abort(Og),w.delete(E))})},cancel:()=>{y.abort(Og),b.pending.delete(y)},throwIfCancelled:()=>{ka(y.signal)}})))}catch(E){E instanceof Sd||wC(d,E,{raisedBy:"effect"})}finally{await Promise.all(C),y.abort(WP),o(b),b.pending.delete(y)}},f=VP(t,r);return{middleware:b=>S=>m=>{if(!UA(m))return S(m);if(d6.match(m))return u(m.payload);if(XP.match(m)){f();return}if(p6.match(m))return c(m.payload);let v=b.getState();const y=()=>{if(v===xC)throw new Error(hi(23));return v};let x;try{if(x=S(m),t.size>0){const C=b.getState(),E=Array.from(t.values());for(const D of E){let w=!1;try{w=D.predicate(m,C,v)}catch(M){w=!1,wC(d,M,{raisedBy:"predicate"})}w&&p(D,m,b,y)}}}finally{v=xC}return x},startListening:u,stopListening:c,clearListeners:f}};function hi(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var QP={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},v6=Pr({name:"chartLayout",initialState:QP,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,i,o,l;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(i=t.payload.right)!==null&&i!==void 0?i:0,e.margin.bottom=(o=t.payload.bottom)!==null&&o!==void 0?o:0,e.margin.left=(l=t.payload.left)!==null&&l!==void 0?l:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:JP,setLayout:eB,setChartSize:tB,setScale:rB}=v6.actions,iB=v6.reducer;function m6(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function at(e){return Number.isFinite(e)}function Us(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function EC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Go(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EC(Object(r),!0).forEach(function(i){nB(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function nB(e,t,r){return(t=sB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sB(e){var t=aB(e,"string");return typeof t=="symbol"?t:t+""}function aB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pr(e,t,r){return or(e)||or(t)?r:mn(t)?el(e,t,r):typeof t=="function"?t(e):r}var oB=(e,t,r)=>{if(t&&r){var{width:i,height:o}=r,{align:l,verticalAlign:d,layout:a}=t;if((a==="vertical"||a==="horizontal"&&d==="middle")&&l!=="center"&&Ie(e[l]))return Go(Go({},e),{},{[l]:e[l]+(i||0)});if((a==="horizontal"||a==="vertical"&&l==="center")&&d!=="middle"&&Ie(e[d]))return Go(Go({},e),{},{[d]:e[d]+(o||0)})}return e},Ks=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",lB=(e,t)=>{if(!t||t.length!==2||!Ie(t[0])||!Ie(t[1]))return e;var r=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!Ie(e[0])||e[0]<r)&&(o[0]=r),(!Ie(e[1])||e[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},uB=e=>{var t,r=e.length;if(!(r<=0)){var i=(t=e[0])===null||t===void 0?void 0:t.length;if(!(i==null||i<=0))for(var o=0;o<i;++o)for(var l=0,d=0,a=0;a<r;++a){var u=e[a],c=u==null?void 0:u[o];if(c!=null){var p=c[1],f=c[0],g=vn(p)?f:p;g>=0?(c[0]=l,l+=g,c[1]=l):(c[0]=d,d+=g,c[1]=d)}}}},cB=e=>{var t,r=e.length;if(!(r<=0)){var i=(t=e[0])===null||t===void 0?void 0:t.length;if(!(i==null||i<=0))for(var o=0;o<i;++o)for(var l=0,d=0;d<r;++d){var a=e[d],u=a==null?void 0:a[o];if(u!=null){var c=vn(u[1])?u[0]:u[1];c>=0?(u[0]=l,l+=c,u[1]=l):(u[0]=0,u[1]=0)}}}},hB={sign:uB,expand:NR,none:Pa,silhouette:jR,wiggle:FR,positive:cB},fB=(e,t,r)=>{var i,o=(i=hB[r])!==null&&i!==void 0?i:Pa,l=IR().keys(t).value((a,u)=>Number(pr(a,u,0))).order(Sg).offset(o),d=l(e);return d.forEach((a,u)=>{a.forEach((c,p)=>{var f=pr(e[p],t[u],0);Array.isArray(f)&&f.length===2&&Ie(f[0])&&Ie(f[1])&&(c[0]=f[0],c[1]=f[1])})}),d};function dB(e){return e==null?void 0:String(e)}var AC=e=>{var{axis:t,ticks:r,offset:i,bandSize:o,entry:l,index:d}=e;if(t.type==="category")return r[d]?r[d].coordinate+i:null;var a=pr(l,t.dataKey,t.scale.domain()[d]);if(or(a))return null;var u=t.scale.map(a);return Ie(u)?u-o/2+i:null},pB=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},vB=e=>{var t=e.flat(2).filter(Ie);return[Math.min(...t),Math.max(...t)]},mB=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],gB=(e,t,r)=>{if(e!=null)return mB(Object.keys(e).reduce((i,o)=>{var l=e[o];if(!l)return i;var{stackedData:d}=l,a=d.reduce((u,c)=>{var p=m6(c,t,r),f=vB(p);return!at(f[0])||!at(f[1])?u:[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(a[0],i[0]),Math.max(a[1],i[1])]},[1/0,-1/0]))},DC=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,TC=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Mf=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!r||i>0)return i}if(e&&t&&t.length>=2){for(var o=dd(t,p=>p.coordinate),l=1/0,d=1,a=o.length;d<a;d++){var u=o[d],c=o[d-1];l=Math.min(((u==null?void 0:u.coordinate)||0)-((c==null?void 0:c.coordinate)||0),l)}return l===1/0?0:l}return r?void 0:0};function MC(e){var{tooltipEntrySettings:t,dataKey:r,payload:i,value:o,name:l}=e;return Go(Go({},t),{},{dataKey:r,payload:i,value:o,name:l})}function g6(e,t){if(e)return String(e);if(typeof t=="string")return t}var _B=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},yB=(e,t)=>t==="centric"?e.angle:e.radius,ns=e=>e.layout.width,ss=e=>e.layout.height,bB=e=>e.layout.scale,_6=e=>e.layout.margin,Cd=ue(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),wd=ue(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),SB="data-recharts-item-index",xB="data-recharts-item-id",oc=60;function kC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Uh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kC(Object(r),!0).forEach(function(i){CB(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function CB(e,t,r){return(t=wB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wB(e){var t=EB(e,"string");return typeof t=="symbol"?t:t+""}function EB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AB=e=>e.brush.height;function DB(e){var t=wd(e);return t.reduce((r,i)=>{if(i.orientation==="left"&&!i.mirror&&!i.hide){var o=typeof i.width=="number"?i.width:oc;return r+o}return r},0)}function TB(e){var t=wd(e);return t.reduce((r,i)=>{if(i.orientation==="right"&&!i.mirror&&!i.hide){var o=typeof i.width=="number"?i.width:oc;return r+o}return r},0)}function MB(e){var t=Cd(e);return t.reduce((r,i)=>i.orientation==="top"&&!i.mirror&&!i.hide?r+i.height:r,0)}function kB(e){var t=Cd(e);return t.reduce((r,i)=>i.orientation==="bottom"&&!i.mirror&&!i.hide?r+i.height:r,0)}var vr=ue([ns,ss,_6,AB,DB,TB,MB,kB,zA,tP],(e,t,r,i,o,l,d,a,u,c)=>{var p={left:(r.left||0)+o,right:(r.right||0)+l},f={top:(r.top||0)+d,bottom:(r.bottom||0)+a},g=Uh(Uh({},f),p),b=g.bottom;g.bottom+=i,g=oB(g,u,c);var S=e-g.left-g.right,m=t-g.top-g.bottom;return Uh(Uh({brushBottom:b},g),{},{width:Math.max(S,0),height:Math.max(m,0)})}),OB=ue(vr,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),B_=ue(ns,ss,(e,t)=>({x:0,y:0,width:e,height:t})),LB=j.createContext(null),vi=()=>j.useContext(LB)!=null,Ed=e=>e.brush,Ad=ue([Ed,vr,_6],(e,t,r)=>({height:e.height,x:Ie(e.x)?e.x:t.left,y:Ie(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:Ie(e.width)?e.width:t.width})),wm={},Em={},Am={},OC;function RB(){return OC||(OC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,i,{signal:o,edges:l}={}){let d,a=null;const u=l!=null&&l.includes("leading"),c=l==null||l.includes("trailing"),p=()=>{a!==null&&(r.apply(d,a),d=void 0,a=null)},f=()=>{c&&p(),m()};let g=null;const b=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,f()},i)},S=()=>{g!==null&&(clearTimeout(g),g=null)},m=()=>{S(),d=void 0,a=null},v=()=>{p()},y=function(...x){if(o!=null&&o.aborted)return;d=this,a=x;const C=g==null;b(),u&&C&&p()};return y.schedule=b,y.cancel=m,y.flush=v,o==null||o.addEventListener("abort",m,{once:!0}),y}e.debounce=t})(Am)),Am}var LC;function PB(){return LC||(LC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RB();function r(i,o=0,l={}){typeof l!="object"&&(l={});const{leading:d=!1,trailing:a=!0,maxWait:u}=l,c=Array(2);d&&(c[0]="leading"),a&&(c[1]="trailing");let p,f=null;const g=t.debounce(function(...m){p=i.apply(this,m),f=null},o,{edges:c}),b=function(...m){return u!=null&&(f===null&&(f=Date.now()),Date.now()-f>=u)?(p=i.apply(this,m),f=Date.now(),g.cancel(),g.schedule(),p):(g.apply(this,m),p)},S=()=>(g.flush(),p);return b.cancel=g.cancel,b.flush=S,b}e.debounce=r})(Em)),Em}var RC;function BB(){return RC||(RC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PB();function r(i,o=0,l={}){const{leading:d=!0,trailing:a=!0}=l;return t.debounce(i,o,{leading:d,maxWait:o,trailing:a})}e.throttle=r})(wm)),wm}var Dm,PC;function IB(){return PC||(PC=1,Dm=BB().throttle),Dm}var NB=IB();const jB=Gs(NB);var BC=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),l=2;l<i;l++)o[l-2]=arguments[l];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=0;console.warn(r.replace(/%s/g,()=>o[d++]))}},ln={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},y6=(e,t,r)=>{var{width:i=ln.width,height:o=ln.height,aspect:l,maxHeight:d}=r,a=Ba(i)?e:Number(i),u=Ba(o)?t:Number(o);return l&&l>0&&(a?u=a/l:u&&(a=u*l),d&&u!=null&&u>d&&(u=d)),{calculatedWidth:a,calculatedHeight:u}},FB={width:0,height:0,overflow:"visible"},zB={width:0,overflowX:"visible"},HB={height:0,overflowY:"visible"},$B={},UB=e=>{var{width:t,height:r}=e,i=Ba(t),o=Ba(r);return i&&o?FB:i?zB:o?HB:$B};function qB(e){var{width:t,height:r,aspect:i}=e,o=t,l=r;return o===void 0&&l===void 0?(o=ln.width,l=ln.height):o===void 0?o=i&&i>0?void 0:ln.width:l===void 0&&(l=i&&i>0?void 0:ln.height),{width:o,height:l}}function Rg(){return Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Rg.apply(null,arguments)}function IC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function NC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IC(Object(r),!0).forEach(function(i){WB(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function WB(e,t,r){return(t=GB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GB(e){var t=KB(e,"string");return typeof t=="symbol"?t:t+""}function KB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var b6=j.createContext(ln.initialDimension);function YB(e){return Us(e.width)&&Us(e.height)}function S6(e){var{children:t,width:r,height:i}=e,o=j.useMemo(()=>({width:r,height:i}),[r,i]);return YB(o)?j.createElement(b6.Provider,{value:o},t):null}var I_=()=>j.useContext(b6),VB=j.forwardRef((e,t)=>{var{aspect:r,initialDimension:i=ln.initialDimension,width:o,height:l,minWidth:d=ln.minWidth,minHeight:a,maxHeight:u,children:c,debounce:p=ln.debounce,id:f,className:g,onResize:b,style:S={}}=e,m=j.useRef(null),v=j.useRef();v.current=b,j.useImperativeHandle(t,()=>m.current);var[y,x]=j.useState({containerWidth:i.width,containerHeight:i.height}),C=j.useCallback((T,O)=>{x(L=>{var P=Math.round(T),R=Math.round(O);return L.containerWidth===P&&L.containerHeight===R?L:{containerWidth:P,containerHeight:R}})},[]);j.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return pl;var T=R=>{var I,$=R[0];if($!=null){var{width:V,height:U}=$.contentRect;C(V,U),(I=v.current)===null||I===void 0||I.call(v,V,U)}};p>0&&(T=jB(T,p,{trailing:!0,leading:!1}));var O=new ResizeObserver(T),{width:L,height:P}=m.current.getBoundingClientRect();return C(L,P),O.observe(m.current),()=>{O.disconnect()}},[C,p]);var{containerWidth:E,containerHeight:D}=y;BC(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:w,calculatedHeight:M}=y6(E,D,{width:o,height:l,aspect:r,maxHeight:u});return BC(w!=null&&w>0||M!=null&&M>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
151
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
152
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
153
|
+
height and width.`,w,M,o,l,d,a,r),j.createElement("div",{id:f?"".concat(f):void 0,className:Dt("recharts-responsive-container",g),style:NC(NC({},S),{},{width:o,height:l,minWidth:d,minHeight:a,maxHeight:u}),ref:m},j.createElement("div",{style:UB({width:o,height:l})},j.createElement(S6,{width:w,height:M},c)))}),XB=j.forwardRef((e,t)=>{var r=I_();if(Us(r.width)&&Us(r.height))return e.children;var{width:i,height:o}=qB({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:l,calculatedHeight:d}=y6(void 0,void 0,{width:i,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return Ie(l)&&Ie(d)?j.createElement(S6,{width:l,height:d},e.children):j.createElement(VB,Rg({},e,{width:i,height:o,ref:t}))});function N_(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Dd=()=>{var e,t=vi(),r=Ne(OB),i=Ne(Ad),o=(e=Ne(Ed))===null||e===void 0?void 0:e.padding;return!t||!i||!o?r:{width:i.width-o.left-o.right,height:i.height-o.top-o.bottom,x:o.left,y:o.top}},ZB={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},QB=()=>{var e;return(e=Ne(vr))!==null&&e!==void 0?e:ZB},JB=()=>Ne(ns),e9=()=>Ne(ss),gt=e=>e.layout.layoutType,vl=()=>Ne(gt),x6=()=>{var e=vl();if(e==="horizontal"||e==="vertical")return e},C6=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},t9=()=>{var e=vl();return e!==void 0},lc=e=>{var t=Bt(),r=vi(),{width:i,height:o}=e,l=I_(),d=i,a=o;return l&&(d=l.width>0?l.width:i,a=l.height>0?l.height:o),j.useEffect(()=>{!r&&Us(d)&&Us(a)&&t(tB({width:d,height:a}))},[t,r,d,a]),null},w6=Symbol.for("immer-nothing"),jC=Symbol.for("immer-draftable"),di=Symbol.for("immer-state");function zi(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hu=Object.getPrototypeOf;function rl(e){return!!e&&!!e[di]}function Na(e){var t;return e?E6(e)||Array.isArray(e)||!!e[jC]||!!((t=e.constructor)!=null&&t[jC])||uc(e)||Md(e):!1}var r9=Object.prototype.constructor.toString(),FC=new WeakMap;function E6(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let i=FC.get(r);return i===void 0&&(i=Function.toString.call(r),FC.set(r,i)),i===r9}function kf(e,t,r=!0){Td(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((i,o)=>t(o,i,e))}function Td(e){const t=e[di];return t?t.type_:Array.isArray(e)?1:uc(e)?2:Md(e)?3:0}function Pg(e,t){return Td(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A6(e,t,r){const i=Td(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function i9(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function uc(e){return e instanceof Map}function Md(e){return e instanceof Set}function wa(e){return e.copy_||e.base_}function Bg(e,t){if(uc(e))return new Map(e);if(Md(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=E6(e);if(t===!0||t==="class_only"&&!r){const i=Object.getOwnPropertyDescriptors(e);delete i[di];let o=Reflect.ownKeys(i);for(let l=0;l<o.length;l++){const d=o[l],a=i[d];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(i[d]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[d]})}return Object.create(Hu(e),i)}else{const i=Hu(e);if(i!==null&&r)return{...e};const o=Object.create(i);return Object.assign(o,e)}}function j_(e,t=!1){return kd(e)||rl(e)||!Na(e)||(Td(e)>1&&Object.defineProperties(e,{set:qh,add:qh,clear:qh,delete:qh}),Object.freeze(e),t&&Object.values(e).forEach(r=>j_(r,!0))),e}function n9(){zi(2)}var qh={value:n9};function kd(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var s9={};function ja(e){const t=s9[e];return t||zi(0,e),t}var $u;function D6(){return $u}function a9(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function zC(e,t){t&&(ja("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ig(e){Ng(e),e.drafts_.forEach(o9),e.drafts_=null}function Ng(e){e===$u&&($u=e.parent_)}function HC(e){return $u=a9($u,e)}function o9(e){const t=e[di];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function $C(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[di].modified_&&(Ig(t),zi(4)),Na(e)&&(e=Of(t,e),t.parent_||Lf(t,e)),t.patches_&&ja("Patches").generateReplacementPatches_(r[di].base_,e,t.patches_,t.inversePatches_)):e=Of(t,r,[]),Ig(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==w6?e:void 0}function Of(e,t,r){if(kd(t))return t;const i=e.immer_.shouldUseStrictIteration(),o=t[di];if(!o)return kf(t,(l,d)=>UC(e,o,t,l,d,r),i),t;if(o.scope_!==e)return t;if(!o.modified_)return Lf(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const l=o.copy_;let d=l,a=!1;o.type_===3&&(d=new Set(l),l.clear(),a=!0),kf(d,(u,c)=>UC(e,o,l,u,c,r,a),i),Lf(e,l,!1),r&&e.patches_&&ja("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function UC(e,t,r,i,o,l,d){if(o==null||typeof o!="object"&&!d)return;const a=kd(o);if(!(a&&!d)){if(rl(o)){const u=l&&t&&t.type_!==3&&!Pg(t.assigned_,i)?l.concat(i):void 0,c=Of(e,o,u);if(A6(r,i,c),rl(c))e.canAutoFreeze_=!1;else return}else d&&r.add(o);if(Na(o)&&!a){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[i]===o&&a)return;Of(e,o),(!t||!t.scope_.parent_)&&typeof i!="symbol"&&(uc(r)?r.has(i):Object.prototype.propertyIsEnumerable.call(r,i))&&Lf(e,o)}}}function Lf(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&j_(t,r)}function l9(e,t){const r=Array.isArray(e),i={type_:r?1:0,scope_:t?t.scope_:D6(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=i,l=F_;r&&(o=[i],l=Uu);const{revoke:d,proxy:a}=Proxy.revocable(o,l);return i.draft_=a,i.revoke_=d,a}var F_={get(e,t){if(t===di)return e;const r=wa(e);if(!Pg(r,t))return u9(e,r,t);const i=r[t];return e.finalized_||!Na(i)?i:i===Tm(e.base_,t)?(Mm(e),e.copy_[t]=Fg(i,e)):i},has(e,t){return t in wa(e)},ownKeys(e){return Reflect.ownKeys(wa(e))},set(e,t,r){const i=T6(wa(e),t);if(i!=null&&i.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){const o=Tm(wa(e),t),l=o==null?void 0:o[di];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(i9(r,o)&&(r!==void 0||Pg(e.base_,t)))return!0;Mm(e),jg(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Tm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Mm(e),jg(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=wa(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty(){zi(11)},getPrototypeOf(e){return Hu(e.base_)},setPrototypeOf(){zi(12)}},Uu={};kf(F_,(e,t)=>{Uu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Uu.deleteProperty=function(e,t){return Uu.set.call(this,e,t,void 0)};Uu.set=function(e,t,r){return F_.set.call(this,e[0],t,r,e[0])};function Tm(e,t){const r=e[di];return(r?wa(r):e)[t]}function u9(e,t,r){var o;const i=T6(t,r);return i?"value"in i?i.value:(o=i.get)==null?void 0:o.call(e.draft_):void 0}function T6(e,t){if(!(t in e))return;let r=Hu(e);for(;r;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Hu(r)}}function jg(e){e.modified_||(e.modified_=!0,e.parent_&&jg(e.parent_))}function Mm(e){e.copy_||(e.copy_=Bg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var c9=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,i)=>{if(typeof t=="function"&&typeof r!="function"){const l=r;r=t;const d=this;return function(u=l,...c){return d.produce(u,p=>r.call(this,p,...c))}}typeof r!="function"&&zi(6),i!==void 0&&typeof i!="function"&&zi(7);let o;if(Na(t)){const l=HC(this),d=Fg(t,void 0);let a=!0;try{o=r(d),a=!1}finally{a?Ig(l):Ng(l)}return zC(l,i),$C(o,l)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===w6&&(o=void 0),this.autoFreeze_&&j_(o,!0),i){const l=[],d=[];ja("Patches").generateReplacementPatches_(t,o,l,d),i(l,d)}return o}else zi(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(d,...a)=>this.produceWithPatches(d,u=>t(u,...a));let i,o;return[this.produce(t,r,(d,a)=>{i=d,o=a}),i,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Na(e)||zi(8),rl(e)&&(e=h9(e));const t=HC(this),r=Fg(e,void 0);return r[di].isManual_=!0,Ng(t),r}finishDraft(e,t){const r=e&&e[di];(!r||!r.isManual_)&&zi(9);const{scope_:i}=r;return zC(i,t),$C(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const i=ja("Patches").applyPatches_;return rl(e)?i(e,t):this.produce(e,o=>i(o,t))}};function Fg(e,t){const r=uc(e)?ja("MapSet").proxyMap_(e,t):Md(e)?ja("MapSet").proxySet_(e,t):l9(e,t);return(t?t.scope_:D6()).drafts_.push(r),r}function h9(e){return rl(e)||zi(10,e),M6(e)}function M6(e){if(!Na(e)||kd(e))return e;const t=e[di];let r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Bg(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=Bg(e,!0);return kf(r,(o,l)=>{A6(r,o,M6(l))},i),t&&(t.finalized_=!1),r}var f9=new c9;f9.produce;var d9={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},k6=Pr({name:"legend",initialState:d9,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Et()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:i}=t.payload,o=Ti(e).payload.indexOf(r);o>-1&&(e.payload[o]=i)},prepare:Et()},removeLegendPayload:{reducer(e,t){var r=Ti(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Et()}}}),{setLegendSize:rJ,setLegendSettings:iJ,addLegendPayload:p9,replaceLegendPayload:v9,removeLegendPayload:m9}=k6.actions,g9=k6.reducer,km={exports:{}},Om={};/**
|
|
154
|
+
* @license React
|
|
155
|
+
* use-sync-external-store-with-selector.production.js
|
|
156
|
+
*
|
|
157
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the MIT license found in the
|
|
160
|
+
* LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/var qC;function _9(){if(qC)return Om;qC=1;var e=dl();function t(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:t,i=e.useSyncExternalStore,o=e.useRef,l=e.useEffect,d=e.useMemo,a=e.useDebugValue;return Om.useSyncExternalStoreWithSelector=function(u,c,p,f,g){var b=o(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=d(function(){function v(D){if(!y){if(y=!0,x=D,D=f(D),g!==void 0&&S.hasValue){var w=S.value;if(g(w,D))return C=w}return C=D}if(w=C,r(x,D))return w;var M=f(D);return g!==void 0&&g(w,M)?(x=D,w):(x=D,C=M)}var y=!1,x,C,E=p===void 0?null:p;return[function(){return v(c())},E===null?void 0:function(){return v(E())}]},[c,p,f,g]);var m=i(u,b[0],b[1]);return l(function(){S.hasValue=!0,S.value=m},[m]),a(m),m},Om}var WC;function y9(){return WC||(WC=1,km.exports=_9()),km.exports}y9();function b9(e){e()}function S9(){let e=null,t=null;return{clear(){e=null,t=null},notify(){b9(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let i=e;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!i||e===null||(i=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var GC={notify(){},get:()=>[]};function x9(e,t){let r,i=GC,o=0,l=!1;function d(m){p();const v=i.subscribe(m);let y=!1;return()=>{y||(y=!0,v(),f())}}function a(){i.notify()}function u(){S.onStateChange&&S.onStateChange()}function c(){return l}function p(){o++,r||(r=e.subscribe(u),i=S9())}function f(){o--,r&&o===0&&(r(),r=void 0,i.clear(),i=GC)}function g(){l||(l=!0,p())}function b(){l&&(l=!1,f())}const S={addNestedSub:d,notifyNestedSubs:a,handleChangeWrapper:u,isSubscribed:c,trySubscribe:g,tryUnsubscribe:b,getListeners:()=>i};return S}var C9=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",w9=C9(),E9=()=>typeof navigator<"u"&&navigator.product==="ReactNative",A9=E9(),D9=()=>w9||A9?j.useLayoutEffect:j.useEffect,T9=D9();function KC(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function M9(e,t){if(KC(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!KC(e[r[o]],t[r[o]]))return!1;return!0}var Lm=Symbol.for("react-redux-context"),Rm=typeof globalThis<"u"?globalThis:{};function k9(){if(!j.createContext)return{};const e=Rm[Lm]??(Rm[Lm]=new Map);let t=e.get(j.createContext);return t||(t=j.createContext(null),e.set(j.createContext,t)),t}var O9=k9();function L9(e){const{children:t,context:r,serverState:i,store:o}=e,l=j.useMemo(()=>{const u=x9(o);return{store:o,subscription:u,getServerState:i?()=>i:void 0}},[o,i]),d=j.useMemo(()=>o.getState(),[o]);T9(()=>{const{subscription:u}=l;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),d!==o.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[l,d]);const a=r||O9;return j.createElement(a.Provider,{value:l},t)}var R9=L9,P9=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function B9(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Od(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var i of r)if(P9.has(i)){if(e[i]==null&&t[i]==null)continue;if(!M9(e[i],t[i]))return!1}else if(!B9(e[i],t[i]))return!1;return!0}function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},zg.apply(null,arguments)}function YC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function yu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YC(Object(r),!0).forEach(function(i){I9(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function I9(e,t,r){return(t=N9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N9(e){var t=j9(e,"string");return typeof t=="symbol"?t:t+""}function j9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F9(e){return Array.isArray(e)&&mn(e[0])&&mn(e[1])?e.join(" ~ "):e}var Po={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function z9(e,t){return t==null?e:dd(e,t)}var H9=e=>{var{separator:t=Po.separator,contentStyle:r,itemStyle:i,labelStyle:o=Po.labelStyle,payload:l,formatter:d,itemSorter:a,wrapperClassName:u,labelClassName:c,label:p,labelFormatter:f,accessibilityLayer:g=Po.accessibilityLayer}=e,b=()=>{if(l&&l.length){var D={padding:0,margin:0},w=z9(l,a),M=w.map((T,O)=>{if(!T||T.type==="none")return null;var L=T.formatter||d||F9,{value:P,name:R}=T,I=P,$=R;if(L){var V=L(P,R,T,O,l);if(Array.isArray(V))[I,$]=V;else if(V!=null)I=V;else return null}var U=yu(yu({},Po.itemStyle),{},{color:T.color||Po.itemStyle.color},i);return j.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(O),style:U},mn($)?j.createElement("span",{className:"recharts-tooltip-item-name"},$):null,mn($)?j.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,j.createElement("span",{className:"recharts-tooltip-item-value"},I),j.createElement("span",{className:"recharts-tooltip-item-unit"},T.unit||""))});return j.createElement("ul",{className:"recharts-tooltip-item-list",style:D},M)}return null},S=yu(yu({},Po.contentStyle),r),m=yu({margin:0},o),v=!or(p),y=v?p:"",x=Dt("recharts-default-tooltip",u),C=Dt("recharts-tooltip-label",c);v&&f&&l!==void 0&&l!==null&&(y=f(p,l));var E=g?{role:"status","aria-live":"assertive"}:{};return j.createElement("div",zg({className:x,style:S},E),j.createElement("p",{className:C,style:m},j.isValidElement(y)?y:"".concat(y)),b())},bu="recharts-tooltip-wrapper",$9={visibility:"hidden"};function U9(e){var{coordinate:t,translateX:r,translateY:i}=e;return Dt(bu,{["".concat(bu,"-right")]:Ie(r)&&t&&Ie(t.x)&&r>=t.x,["".concat(bu,"-left")]:Ie(r)&&t&&Ie(t.x)&&r<t.x,["".concat(bu,"-bottom")]:Ie(i)&&t&&Ie(t.y)&&i>=t.y,["".concat(bu,"-top")]:Ie(i)&&t&&Ie(t.y)&&i<t.y})}function VC(e){var{allowEscapeViewBox:t,coordinate:r,key:i,offset:o,position:l,reverseDirection:d,tooltipDimension:a,viewBox:u,viewBoxDimension:c}=e;if(l&&Ie(l[i]))return l[i];var p=r[i]-a-(o>0?o:0),f=r[i]+o;if(t[i])return d[i]?p:f;var g=u[i];if(g==null)return 0;if(d[i]){var b=p,S=g;return b<S?Math.max(f,g):Math.max(p,g)}if(c==null)return 0;var m=f+a,v=g+c;return m>v?Math.max(p,g):Math.max(f,g)}function q9(e){var{translateX:t,translateY:r,useTranslate3d:i}=e;return{transform:i?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function W9(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:i,offsetLeft:o,position:l,reverseDirection:d,tooltipBox:a,useTranslate3d:u,viewBox:c}=e,p,f,g;return a.height>0&&a.width>0&&r?(f=VC({allowEscapeViewBox:t,coordinate:r,key:"x",offset:o,position:l,reverseDirection:d,tooltipDimension:a.width,viewBox:c,viewBoxDimension:c.width}),g=VC({allowEscapeViewBox:t,coordinate:r,key:"y",offset:i,position:l,reverseDirection:d,tooltipDimension:a.height,viewBox:c,viewBoxDimension:c.height}),p=q9({translateX:f,translateY:g,useTranslate3d:u})):p=$9,{cssProperties:p,cssClasses:U9({translateX:f,translateY:g,coordinate:r})}}var G9=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),cc={isSsr:G9()};function O6(){var[e,t]=j.useState(()=>cc.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return j.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),i=()=>{t(r.matches)};return r.addEventListener("change",i),()=>{r.removeEventListener("change",i)}}},[]),e}function XC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Bo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XC(Object(r),!0).forEach(function(i){K9(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function K9(e,t,r){return(t=Y9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y9(e){var t=V9(e,"string");return typeof t=="symbol"?t:t+""}function V9(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X9(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function Z9(e){var t,r,i,o,l,d,a=O6(),[u,c]=j.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));j.useEffect(()=>{var S=m=>{if(m.key==="Escape"){var v,y,x,C;c({dismissed:!0,dismissedAtCoordinate:{x:(v=(y=e.coordinate)===null||y===void 0?void 0:y.x)!==null&&v!==void 0?v:0,y:(x=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&x!==void 0?x:0}})}};return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),u.dismissed&&(((i=(o=e.coordinate)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i:0)!==u.dismissedAtCoordinate.x||((l=(d=e.coordinate)===null||d===void 0?void 0:d.y)!==null&&l!==void 0?l:0)!==u.dismissedAtCoordinate.y)&&c(Bo(Bo({},u),{},{dismissed:!1}));var{cssClasses:p,cssProperties:f}=W9({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),g=e.hasPortalFromProps?{}:Bo(Bo({transition:X9({prefersReducedMotion:a,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=Bo(Bo({},g),{},{visibility:!u.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return j.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:p,style:b,ref:e.innerRef},e.children)}var Q9=j.memo(Z9),L6=()=>{var e;return(e=Ne(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Hg.apply(null,arguments)}function ZC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function QC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZC(Object(r),!0).forEach(function(i){J9(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZC(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function J9(e,t,r){return(t=eI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eI(e){var t=tI(e,"string");return typeof t=="symbol"?t:t+""}function tI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JC={curveBasisClosed:ER,curveBasisOpen:AR,curveBasis:wR,curveBumpX:cR,curveBumpY:hR,curveLinearClosed:DR,curveLinear:hd,curveMonotoneX:TR,curveMonotoneY:MR,curveNatural:kR,curveStep:OR,curveStepAfter:RR,curveStepBefore:LR},Rf=e=>at(e.x)&&at(e.y),e5=e=>e.base!=null&&Rf(e.base)&&Rf(e),Su=e=>e.x,xu=e=>e.y,rI=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(nc(e));if((r==="curveMonotone"||r==="curveBump")&&t){var i=JC["".concat(r).concat(t==="vertical"?"Y":"X")];if(i)return i}return JC[r]||hd},t5={connectNulls:!1,type:"linear"},iI=e=>{var{type:t=t5.type,points:r=[],baseLine:i,layout:o,connectNulls:l=t5.connectNulls}=e,d=rI(t,o),a=l?r.filter(Rf):r;if(Array.isArray(i)){var u,c=r.map((S,m)=>QC(QC({},S),{},{base:i[m]}));o==="vertical"?u=Nh().y(xu).x1(Su).x0(S=>S.base.x):u=Nh().x(Su).y1(xu).y0(S=>S.base.y);var p=u.defined(e5).curve(d),f=l?c.filter(e5):c;return p(f)}var g;o==="vertical"&&Ie(i)?g=Nh().y(xu).x1(Su).x0(i):Ie(i)?g=Nh().x(Su).y1(xu).y0(i):g=fA().x(Su).y(xu);var b=g.defined(Rf).curve(d);return b(a)},R6=e=>{var{className:t,points:r,path:i,pathRef:o}=e,l=vl();if((!r||!r.length)&&!i)return null;var d={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||l,connectNulls:e.connectNulls},a=r&&r.length?iI(d):i;return j.createElement("path",Hg({},$s(e),i7(e),{className:Dt("recharts-curve",t),d:a===null?void 0:a,ref:o}))},nI=["x","y","top","left","width","height","className"];function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},$g.apply(null,arguments)}function r5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function sI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(r),!0).forEach(function(i){aI(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function aI(e,t,r){return(t=oI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oI(e){var t=lI(e,"string");return typeof t=="symbol"?t:t+""}function lI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uI(e,t){if(e==null)return{};var r,i,o=cI(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function cI(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var hI=(e,t,r,i,o,l)=>"M".concat(e,",").concat(o,"v").concat(i,"M").concat(l,",").concat(t,"h").concat(r),fI=e=>{var{x:t=0,y:r=0,top:i=0,left:o=0,width:l=0,height:d=0,className:a}=e,u=uI(e,nI),c=sI({x:t,y:r,top:i,left:o,width:l,height:d},u);return!Ie(t)||!Ie(r)||!Ie(l)||!Ie(d)||!Ie(i)||!Ie(o)?null:j.createElement("path",$g({},ki(c),{className:Dt("recharts-cross",a),d:hI(t,r,l,d,i,o)}))};function dI(e,t,r,i){var o=i/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-o,width:e==="horizontal"?i:r.width-1,height:e==="horizontal"?r.height-1:i}}function i5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function n5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i5(Object(r),!0).forEach(function(i){pI(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function pI(e,t,r){return(t=vI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vI(e){var t=mI(e,"string");return typeof t=="symbol"?t:t+""}function mI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gI=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),P6=(e,t,r)=>e.map(i=>"".concat(gI(i)," ").concat(t,"ms ").concat(r)).join(","),_I=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,i)=>r.filter(o=>i.includes(o))),qu=(e,t)=>Object.keys(t).reduce((r,i)=>n5(n5({},r),{},{[i]:e(i,t[i])}),{});function s5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s5(Object(r),!0).forEach(function(i){yI(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function yI(e,t,r){return(t=bI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bI(e){var t=SI(e,"string");return typeof t=="symbol"?t:t+""}function SI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pf=(e,t,r)=>e+(t-e)*r,Ug=e=>{var{from:t,to:r}=e;return t!==r},B6=(e,t,r)=>{var i=qu((o,l)=>{if(Ug(l)){var[d,a]=e(l.from,l.to,l.velocity);return ar(ar({},l),{},{from:d,velocity:a})}return l},t);return r<1?qu((o,l)=>Ug(l)&&i[o]!=null?ar(ar({},l),{},{velocity:Pf(l.velocity,i[o].velocity,r),from:Pf(l.from,i[o].from,r)}):l,t):B6(e,i,r-1)};function xI(e,t,r,i,o,l){var d,a=i.reduce((g,b)=>ar(ar({},g),{},{[b]:{from:e[b],velocity:0,to:t[b]}}),{}),u=()=>qu((g,b)=>b.from,a),c=()=>!Object.values(a).filter(Ug).length,p=null,f=g=>{d||(d=g);var b=g-d,S=b/r.dt;a=B6(r,a,S),o(ar(ar(ar({},e),t),u())),d=g,c()||(p=l.setTimeout(f))};return()=>(p=l.setTimeout(f),()=>{var g;(g=p)===null||g===void 0||g()})}function CI(e,t,r,i,o,l,d){var a=null,u=o.reduce((f,g)=>{var b=e[g],S=t[g];return b==null||S==null?f:ar(ar({},f),{},{[g]:[b,S]})},{}),c,p=f=>{c||(c=f);var g=(f-c)/i,b=qu((m,v)=>Pf(...v,r(g)),u);if(l(ar(ar(ar({},e),t),b)),g<1)a=d.setTimeout(p);else{var S=qu((m,v)=>Pf(...v,r(1)),u);l(ar(ar(ar({},e),t),S))}};return()=>(a=d.setTimeout(p),()=>{var f;(f=a)===null||f===void 0||f()})}const wI=(e,t,r,i,o,l)=>{var d=_I(e,t);return r==null?()=>(o(ar(ar({},e),t)),()=>{}):r.isStepper===!0?xI(e,t,r,d,o,l):CI(e,t,r,i,d,o,l)};var Bf=1e-4,I6=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],N6=(e,t)=>e.map((r,i)=>r*t**i).reduce((r,i)=>r+i),a5=(e,t)=>r=>{var i=I6(e,t);return N6(i,r)},EI=(e,t)=>r=>{var i=I6(e,t),o=[...i.map((l,d)=>l*d).slice(1),0];return N6(o,r)},AI=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var i=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(i==null||i.length!==4)return null;var o=i.map(l=>parseFloat(l));return[o[0],o[1],o[2],o[3]]},DI=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var o=AI(r[0]);if(o)return o}}return r.length===4?r:[0,0,1,1]},TI=(e,t,r,i)=>{var o=a5(e,r),l=a5(t,i),d=EI(e,r),a=c=>c>1?1:c<0?0:c,u=c=>{for(var p=c>1?1:c,f=p,g=0;g<8;++g){var b=o(f)-p,S=d(f);if(Math.abs(b-p)<Bf||S<Bf)return l(f);f=a(f-b/S)}return l(f)};return u.isStepper=!1,u},o5=function(){return TI(...DI(...arguments))},MI=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:i=8,dt:o=17}=t,l=(d,a,u)=>{var c=-(d-a)*r,p=u*i,f=u+(c-p)*o/1e3,g=u*o/1e3+d;return Math.abs(g-a)<Bf&&Math.abs(f)<Bf?[a,0]:[g,f]};return l.isStepper=!0,l.dt=o,l},kI=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return o5(e);case"spring":return MI();default:if(e.split("(")[0]==="cubic-bezier")return o5(e)}return typeof e=="function"?e:null};function OI(e){var t,r=()=>null,i=!1,o=null,l=d=>{if(!i){if(Array.isArray(d)){if(!d.length)return;var a=d,[u,...c]=a;if(typeof u=="number"){o=e.setTimeout(l.bind(null,c),u);return}l(u),o=e.setTimeout(l.bind(null,c));return}typeof d=="string"&&(t=d,r(t)),typeof d=="object"&&(t=d,r(t)),typeof d=="function"&&d()}};return{stop:()=>{i=!0},start:d=>{i=!1,o&&(o(),o=null),l(d)},subscribe:d=>(r=d,()=>{r=()=>null}),getTimeoutController:()=>e}}class LI{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=performance.now(),o=null,l=d=>{d-i>=r?t(d):typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(l))};return o=requestAnimationFrame(l),()=>{o!=null&&cancelAnimationFrame(o)}}}function RI(){return OI(new LI)}var PI=j.createContext(RI);function BI(e,t){var r=j.useContext(PI);return j.useMemo(()=>t??r(e),[e,t,r])}var II={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},l5={t:0},Pm={t:1};function z_(e){var t=Pi(e,II),{isActive:r,canBegin:i,duration:o,easing:l,begin:d,onAnimationEnd:a,onAnimationStart:u,children:c}=t,p=O6(),f=r==="auto"?!cc.isSsr&&!p:r,g=BI(t.animationId,t.animationManager),[b,S]=j.useState(f?l5:Pm),m=j.useRef(null);return j.useEffect(()=>{f||S(Pm)},[f]),j.useEffect(()=>{if(!f||!i)return pl;var v=wI(l5,Pm,kI(l),o,S,g.getTimeoutController()),y=()=>{m.current=v()};return g.start([u,d,y,o,a]),()=>{g.stop(),m.current&&m.current(),a()}},[f,i,o,l,d,u,a,g]),c(b.t)}function H_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=j.useRef(Nu(t)),i=j.useRef(e);return i.current!==e&&(r.current=Nu(t),i.current=e),r.current}var NI=["radius"],jI=["radius"],u5,c5,h5,f5,d5,p5,v5,m5,g5,_5;function y5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function b5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y5(Object(r),!0).forEach(function(i){FI(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function FI(e,t,r){return(t=zI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zI(e){var t=HI(e,"string");return typeof t=="symbol"?t:t+""}function HI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function If(){return If=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},If.apply(null,arguments)}function S5(e,t){if(e==null)return{};var r,i,o=$I(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function $I(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function tn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var x5=(e,t,r,i,o)=>{var l=js(r),d=js(i),a=Math.min(Math.abs(l)/2,Math.abs(d)/2),u=d>=0?1:-1,c=l>=0?1:-1,p=d>=0&&l>=0||d<0&&l<0?1:0,f;if(a>0&&Array.isArray(o)){for(var g=[0,0,0,0],b=0,S=4;b<S;b++){var m,v=(m=o[b])!==null&&m!==void 0?m:0;g[b]=v>a?a:v}f=Ut(u5||(u5=tn(["M",",",""])),e,t+u*g[0]),g[0]>0&&(f+=Ut(c5||(c5=tn(["A ",",",",0,0,",",",",",""])),g[0],g[0],p,e+c*g[0],t)),f+=Ut(h5||(h5=tn(["L ",",",""])),e+r-c*g[1],t),g[1]>0&&(f+=Ut(f5||(f5=tn(["A ",",",",0,0,",`,
|
|
162
|
+
`,",",""])),g[1],g[1],p,e+r,t+u*g[1])),f+=Ut(d5||(d5=tn(["L ",",",""])),e+r,t+i-u*g[2]),g[2]>0&&(f+=Ut(p5||(p5=tn(["A ",",",",0,0,",`,
|
|
163
|
+
`,",",""])),g[2],g[2],p,e+r-c*g[2],t+i)),f+=Ut(v5||(v5=tn(["L ",",",""])),e+c*g[3],t+i),g[3]>0&&(f+=Ut(m5||(m5=tn(["A ",",",",0,0,",`,
|
|
164
|
+
`,",",""])),g[3],g[3],p,e,t+i-u*g[3])),f+="Z"}else if(a>0&&o===+o&&o>0){var y=Math.min(a,o);f=Ut(g5||(g5=tn(["M ",",",`
|
|
165
|
+
A `,",",",0,0,",",",",",`
|
|
166
|
+
L `,",",`
|
|
167
|
+
A `,",",",0,0,",",",",",`
|
|
168
|
+
L `,",",`
|
|
169
|
+
A `,",",",0,0,",",",",",`
|
|
170
|
+
L `,",",`
|
|
171
|
+
A `,",",",0,0,",",",","," Z"])),e,t+u*y,y,y,p,e+c*y,t,e+r-c*y,t,y,y,p,e+r,t+u*y,e+r,t+i-u*y,y,y,p,e+r-c*y,t+i,e+c*y,t+i,y,y,p,e,t+i-u*y)}else f=Ut(_5||(_5=tn(["M ",","," h "," v "," h "," Z"])),e,t,r,i,-r);return f},C5={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},j6=e=>{var t=Pi(e,C5),r=j.useRef(null),[i,o]=j.useState(-1);j.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&o(K)}catch{}},[]);var{x:l,y:d,width:a,height:u,radius:c,className:p}=t,{animationEasing:f,animationDuration:g,animationBegin:b,isAnimationActive:S,isUpdateAnimationActive:m}=t,v=j.useRef(a),y=j.useRef(u),x=j.useRef(l),C=j.useRef(d),E=j.useMemo(()=>({x:l,y:d,width:a,height:u,radius:c}),[l,d,a,u,c]),D=H_(E,"rectangle-");if(l!==+l||d!==+d||a!==+a||u!==+u||a===0||u===0)return null;var w=Dt("recharts-rectangle",p);if(!m){var M=ki(t),{radius:T}=M,O=S5(M,NI);return j.createElement("path",If({},O,{x:js(l),y:js(d),width:js(a),height:js(u),radius:typeof c=="number"?c:void 0,className:w,d:x5(l,d,a,u,c)}))}var L=v.current,P=y.current,R=x.current,I=C.current,$="0px ".concat(i===-1?1:i,"px"),V="".concat(i,"px ").concat(i,"px"),U=P6(["strokeDasharray"],g,typeof f=="string"?f:C5.animationEasing);return j.createElement(z_,{animationId:D,key:D,canBegin:i>0,duration:g,easing:f,isActive:m,begin:b},K=>{var G=Dr(L,a,K),N=Dr(P,u,K),H=Dr(R,l,K),z=Dr(I,d,K);r.current&&(v.current=G,y.current=N,x.current=H,C.current=z);var q;S?K>0?q={transition:U,strokeDasharray:V}:q={strokeDasharray:$}:q={strokeDasharray:V};var J=ki(t),{radius:ie}=J,pe=S5(J,jI);return j.createElement("path",If({},pe,{radius:typeof c=="number"?c:void 0,className:w,d:x5(H,z,G,N,c),ref:r,style:b5(b5({},q),t.style)}))})};function w5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function E5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w5(Object(r),!0).forEach(function(i){UI(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function UI(e,t,r){return(t=qI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qI(e){var t=WI(e,"string");return typeof t=="symbol"?t:t+""}function WI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nf=Math.PI/180,GI=e=>e*180/Math.PI,Tr=(e,t,r,i)=>({x:e+Math.cos(-Nf*i)*r,y:t+Math.sin(-Nf*i)*r}),KI=function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(i.left||0)-(i.right||0)),Math.abs(r-(i.top||0)-(i.bottom||0)))/2},YI=(e,t)=>{var{x:r,y:i}=e,{x:o,y:l}=t;return Math.sqrt((r-o)**2+(i-l)**2)},VI=(e,t)=>{var{x:r,y:i}=e,{cx:o,cy:l}=t,d=YI({x:r,y:i},{x:o,y:l});if(d<=0)return{radius:d,angle:0};var a=(r-o)/d,u=Math.acos(a);return i>l&&(u=2*Math.PI-u),{radius:d,angle:GI(u),angleInRadian:u}},XI=e=>{var{startAngle:t,endAngle:r}=e,i=Math.floor(t/360),o=Math.floor(r/360),l=Math.min(i,o);return{startAngle:t-l*360,endAngle:r-l*360}},ZI=(e,t)=>{var{startAngle:r,endAngle:i}=t,o=Math.floor(r/360),l=Math.floor(i/360),d=Math.min(o,l);return e+d*360},QI=(e,t)=>{var{relativeX:r,relativeY:i}=e,{radius:o,angle:l}=VI({x:r,y:i},t),{innerRadius:d,outerRadius:a}=t;if(o<d||o>a||o===0)return null;var{startAngle:u,endAngle:c}=XI(t),p=l,f;if(u<=c){for(;p>c;)p-=360;for(;p<u;)p+=360;f=p>=u&&p<=c}else{for(;p>u;)p-=360;for(;p<c;)p+=360;f=p>=c&&p<=u}return f?E5(E5({},t),{},{radius:o,angle:ZI(p,t)}):null};function F6(e){var{cx:t,cy:r,radius:i,startAngle:o,endAngle:l}=e,d=Tr(t,r,i,o),a=Tr(t,r,i,l);return{points:[d,a],cx:t,cy:r,radius:i,startAngle:o,endAngle:l}}var A5,D5,T5,M5,k5,O5,L5;function qg(){return qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},qg.apply(null,arguments)}function Aa(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var JI=(e,t)=>{var r=ui(t-e),i=Math.min(Math.abs(t-e),359.999);return r*i},Wh=e=>{var{cx:t,cy:r,radius:i,angle:o,sign:l,isExternal:d,cornerRadius:a,cornerIsExternal:u}=e,c=a*(d?1:-1)+i,p=Math.asin(a/c)/Nf,f=u?o:o+l*p,g=Tr(t,r,c,f),b=Tr(t,r,i,f),S=u?o-l*p:o,m=Tr(t,r,c*Math.cos(p*Nf),S);return{center:g,circleTangency:b,lineTangency:m,theta:p}},z6=e=>{var{cx:t,cy:r,innerRadius:i,outerRadius:o,startAngle:l,endAngle:d}=e,a=JI(l,d),u=l+a,c=Tr(t,r,o,l),p=Tr(t,r,o,u),f=Ut(A5||(A5=Aa(["M ",",",`
|
|
172
|
+
A `,",",`,0,
|
|
173
|
+
`,",",`,
|
|
174
|
+
`,",",`
|
|
175
|
+
`])),c.x,c.y,o,o,+(Math.abs(a)>180),+(l>u),p.x,p.y);if(i>0){var g=Tr(t,r,i,l),b=Tr(t,r,i,u);f+=Ut(D5||(D5=Aa(["L ",",",`
|
|
176
|
+
A `,",",`,0,
|
|
177
|
+
`,",",`,
|
|
178
|
+
`,","," Z"])),b.x,b.y,i,i,+(Math.abs(a)>180),+(l<=u),g.x,g.y)}else f+=Ut(T5||(T5=Aa(["L ",","," Z"])),t,r);return f},eN=e=>{var{cx:t,cy:r,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:d,cornerIsExternal:a,startAngle:u,endAngle:c}=e,p=ui(c-u),{circleTangency:f,lineTangency:g,theta:b}=Wh({cx:t,cy:r,radius:o,angle:u,sign:p,cornerRadius:l,cornerIsExternal:a}),{circleTangency:S,lineTangency:m,theta:v}=Wh({cx:t,cy:r,radius:o,angle:c,sign:-p,cornerRadius:l,cornerIsExternal:a}),y=a?Math.abs(u-c):Math.abs(u-c)-b-v;if(y<0)return d?Ut(M5||(M5=Aa(["M ",",",`
|
|
179
|
+
a`,",",",0,0,1,",`,0
|
|
180
|
+
a`,",",",0,0,1,",`,0
|
|
181
|
+
`])),g.x,g.y,l,l,l*2,l,l,-l*2):z6({cx:t,cy:r,innerRadius:i,outerRadius:o,startAngle:u,endAngle:c});var x=Ut(k5||(k5=Aa(["M ",",",`
|
|
182
|
+
A`,",",",0,0,",",",",",`
|
|
183
|
+
A`,",",",0,",",",",",",",`
|
|
184
|
+
A`,",",",0,0,",",",",",`
|
|
185
|
+
`])),g.x,g.y,l,l,+(p<0),f.x,f.y,o,o,+(y>180),+(p<0),S.x,S.y,l,l,+(p<0),m.x,m.y);if(i>0){var{circleTangency:C,lineTangency:E,theta:D}=Wh({cx:t,cy:r,radius:i,angle:u,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:a}),{circleTangency:w,lineTangency:M,theta:T}=Wh({cx:t,cy:r,radius:i,angle:c,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:a}),O=a?Math.abs(u-c):Math.abs(u-c)-D-T;if(O<0&&l===0)return"".concat(x,"L").concat(t,",").concat(r,"Z");x+=Ut(O5||(O5=Aa(["L",",",`
|
|
186
|
+
A`,",",",0,0,",",",",",`
|
|
187
|
+
A`,",",",0,",",",",",",",`
|
|
188
|
+
A`,",",",0,0,",",",",","Z"])),M.x,M.y,l,l,+(p<0),w.x,w.y,i,i,+(O>180),+(p>0),C.x,C.y,l,l,+(p<0),E.x,E.y)}else x+=Ut(L5||(L5=Aa(["L",",","Z"])),t,r);return x},tN={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},H6=e=>{var t=Pi(e,tN),{cx:r,cy:i,innerRadius:o,outerRadius:l,cornerRadius:d,forceCornerRadius:a,cornerIsExternal:u,startAngle:c,endAngle:p,className:f}=t;if(l<o||c===p)return null;var g=Dt("recharts-sector",f),b=l-o,S=$i(d,b,0,!0),m;return S>0&&Math.abs(c-p)<360?m=eN({cx:r,cy:i,innerRadius:o,outerRadius:l,cornerRadius:Math.min(S,b/2),forceCornerRadius:a,cornerIsExternal:u,startAngle:c,endAngle:p}):m=z6({cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:c,endAngle:p}),j.createElement("path",qg({},ki(t),{className:g,d:m}))};function rN(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(DA(t)){if(e==="centric"){var{cx:i,cy:o,innerRadius:l,outerRadius:d,angle:a}=t,u=Tr(i,o,l,a),c=Tr(i,o,d,a);return[{x:u.x,y:u.y},{x:c.x,y:c.y}]}return F6(t)}}var Bm={},Im={},Nm={},R5;function iN(){return R5||(R5=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jA();function r(i){return t.isSymbol(i)?NaN:Number(i)}e.toNumber=r})(Nm)),Nm}var P5;function nN(){return P5||(P5=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iN();function r(i){return i?(i=t.toNumber(i),i===1/0||i===-1/0?(i<0?-1:1)*Number.MAX_VALUE:i===i?i:0):i===0?i:0}e.toFinite=r})(Im)),Im}var B5;function sN(){return B5||(B5=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=FA(),r=nN();function i(o,l,d){d&&typeof d!="number"&&t.isIterateeCall(o,l,d)&&(l=d=void 0),o=r.toFinite(o),l===void 0?(l=o,o=0):l=r.toFinite(l),d=d===void 0?o<l?1:-1:r.toFinite(d);const a=Math.max(Math.ceil((l-o)/(d||1)),0),u=new Array(a);for(let c=0;c<a;c++)u[c]=o,o+=d;return u}e.range=i})(Bm)),Bm}var jm,I5;function aN(){return I5||(I5=1,jm=sN().range),jm}var oN=aN();const $6=Gs(oN);var Wi=e=>e.chartData,$_=ue([Wi],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ld=(e,t,r,i)=>i?$_(e):Wi(e),lN=(e,t,r)=>r?$_(e):Wi(e),uN=ue([Ld],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:i}=e;return t!=null?t.slice(r,i+1):[]});ue([$_],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:i}=e;return t!=null?t.slice(r,i+1):[]});var cN=ue([Wi],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:i}=e;return t!=null?t.slice(r,i+1):[]});function fn(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(at(t)&&at(r))return!0}return!1}function N5(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function U6(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,i]=e,o,l;if(at(r))o=r;else if(typeof r=="function")return;if(at(i))l=i;else if(typeof i=="function")return;var d=[o,l];if(fn(d))return d}}function hN(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var i=e(t,r);if(fn(i))return N5(i,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[o,l]=e,d,a;if(o==="auto")t!=null&&(d=Math.min(...t));else if(Ie(o))d=o;else if(typeof o=="function")try{t!=null&&(d=o(t==null?void 0:t[0]))}catch{}else if(typeof o=="string"&&DC.test(o)){var u=DC.exec(o);if(u==null||u[1]==null||t==null)d=void 0;else{var c=+u[1];d=t[0]-c}}else d=t==null?void 0:t[0];if(l==="auto")t!=null&&(a=Math.max(...t));else if(Ie(l))a=l;else if(typeof l=="function")try{t!=null&&(a=l(t==null?void 0:t[1]))}catch{}else if(typeof l=="string"&&TC.test(l)){var p=TC.exec(l);if(p==null||p[1]==null||t==null)a=void 0;else{var f=+p[1];a=t[1]+f}}else a=t==null?void 0:t[1];var g=[d,a];if(fn(g))return t==null?g:N5(g,t,r)}}}var ml=1e9,fN={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},q_,Lt=!0,Oi="[DecimalError] ",Oa=Oi+"Invalid argument: ",U_=Oi+"Exponent out of range: ",gl=Math.floor,Ea=Math.pow,dN=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,li,fr=1e7,At=7,q6=9007199254740991,jf=gl(q6/At),Me={};Me.absoluteValue=Me.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Me.comparedTo=Me.cmp=function(e){var t,r,i,o,l=this;if(e=new l.constructor(e),l.s!==e.s)return l.s||-e.s;if(l.e!==e.e)return l.e>e.e^l.s<0?1:-1;for(i=l.d.length,o=e.d.length,t=0,r=i<o?i:o;t<r;++t)if(l.d[t]!==e.d[t])return l.d[t]>e.d[t]^l.s<0?1:-1;return i===o?0:i>o^l.s<0?1:-1};Me.decimalPlaces=Me.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*At;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Me.dividedBy=Me.div=function(e){return Jn(this,new this.constructor(e))};Me.dividedToIntegerBy=Me.idiv=function(e){var t=this,r=t.constructor;return mt(Jn(t,new r(e),0,1),r.precision)};Me.equals=Me.eq=function(e){return!this.cmp(e)};Me.exponent=function(){return er(this)};Me.greaterThan=Me.gt=function(e){return this.cmp(e)>0};Me.greaterThanOrEqualTo=Me.gte=function(e){return this.cmp(e)>=0};Me.isInteger=Me.isint=function(){return this.e>this.d.length-2};Me.isNegative=Me.isneg=function(){return this.s<0};Me.isPositive=Me.ispos=function(){return this.s>0};Me.isZero=function(){return this.s===0};Me.lessThan=Me.lt=function(e){return this.cmp(e)<0};Me.lessThanOrEqualTo=Me.lte=function(e){return this.cmp(e)<1};Me.logarithm=Me.log=function(e){var t,r=this,i=r.constructor,o=i.precision,l=o+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(li))throw Error(Oi+"NaN");if(r.s<1)throw Error(Oi+(r.s?"NaN":"-Infinity"));return r.eq(li)?new i(0):(Lt=!1,t=Jn(Wu(r,l),Wu(e,l),l),Lt=!0,mt(t,o))};Me.minus=Me.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?K6(t,e):W6(t,(e.s=-e.s,e))};Me.modulo=Me.mod=function(e){var t,r=this,i=r.constructor,o=i.precision;if(e=new i(e),!e.s)throw Error(Oi+"NaN");return r.s?(Lt=!1,t=Jn(r,e,0,1).times(e),Lt=!0,r.minus(t)):mt(new i(r),o)};Me.naturalExponential=Me.exp=function(){return G6(this)};Me.naturalLogarithm=Me.ln=function(){return Wu(this)};Me.negated=Me.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Me.plus=Me.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?W6(t,e):K6(t,(e.s=-e.s,e))};Me.precision=Me.sd=function(e){var t,r,i,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Oa+e);if(t=er(o)+1,i=o.d.length-1,r=i*At+1,i=o.d[i],i){for(;i%10==0;i/=10)r--;for(i=o.d[0];i>=10;i/=10)r++}return e&&t>r?t:r};Me.squareRoot=Me.sqrt=function(){var e,t,r,i,o,l,d,a=this,u=a.constructor;if(a.s<1){if(!a.s)return new u(0);throw Error(Oi+"NaN")}for(e=er(a),Lt=!1,o=Math.sqrt(+a),o==0||o==1/0?(t=un(a.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=gl((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),i=new u(t)):i=new u(o.toString()),r=u.precision,o=d=r+3;;)if(l=i,i=l.plus(Jn(a,l,d+2)).times(.5),un(l.d).slice(0,d)===(t=un(i.d)).slice(0,d)){if(t=t.slice(d-3,d+1),o==d&&t=="4999"){if(mt(l,r+1,0),l.times(l).eq(a)){i=l;break}}else if(t!="9999")break;d+=4}return Lt=!0,mt(i,r)};Me.times=Me.mul=function(e){var t,r,i,o,l,d,a,u,c,p=this,f=p.constructor,g=p.d,b=(e=new f(e)).d;if(!p.s||!e.s)return new f(0);for(e.s*=p.s,r=p.e+e.e,u=g.length,c=b.length,u<c&&(l=g,g=b,b=l,d=u,u=c,c=d),l=[],d=u+c,i=d;i--;)l.push(0);for(i=c;--i>=0;){for(t=0,o=u+i;o>i;)a=l[o]+b[i]*g[o-i-1]+t,l[o--]=a%fr|0,t=a/fr|0;l[o]=(l[o]+t)%fr|0}for(;!l[--d];)l.pop();return t?++r:l.shift(),e.d=l,e.e=r,Lt?mt(e,f.precision):e};Me.toDecimalPlaces=Me.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(gn(e,0,ml),t===void 0?t=i.rounding:gn(t,0,8),mt(r,e+er(r)+1,t))};Me.toExponential=function(e,t){var r,i=this,o=i.constructor;return e===void 0?r=Fa(i,!0):(gn(e,0,ml),t===void 0?t=o.rounding:gn(t,0,8),i=mt(new o(i),e+1,t),r=Fa(i,!0,e+1)),r};Me.toFixed=function(e,t){var r,i,o=this,l=o.constructor;return e===void 0?Fa(o):(gn(e,0,ml),t===void 0?t=l.rounding:gn(t,0,8),i=mt(new l(o),e+er(o)+1,t),r=Fa(i.abs(),!1,e+er(i)+1),o.isneg()&&!o.isZero()?"-"+r:r)};Me.toInteger=Me.toint=function(){var e=this,t=e.constructor;return mt(new t(e),er(e)+1,t.rounding)};Me.toNumber=function(){return+this};Me.toPower=Me.pow=function(e){var t,r,i,o,l,d,a=this,u=a.constructor,c=12,p=+(e=new u(e));if(!e.s)return new u(li);if(a=new u(a),!a.s){if(e.s<1)throw Error(Oi+"Infinity");return a}if(a.eq(li))return a;if(i=u.precision,e.eq(li))return mt(a,i);if(t=e.e,r=e.d.length-1,d=t>=r,l=a.s,d){if((r=p<0?-p:p)<=q6){for(o=new u(li),t=Math.ceil(i/At+4),Lt=!1;r%2&&(o=o.times(a),F5(o.d,t)),r=gl(r/2),r!==0;)a=a.times(a),F5(a.d,t);return Lt=!0,e.s<0?new u(li).div(o):mt(o,i)}}else if(l<0)throw Error(Oi+"NaN");return l=l<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,Lt=!1,o=e.times(Wu(a,i+c)),Lt=!0,o=G6(o),o.s=l,o};Me.toPrecision=function(e,t){var r,i,o=this,l=o.constructor;return e===void 0?(r=er(o),i=Fa(o,r<=l.toExpNeg||r>=l.toExpPos)):(gn(e,1,ml),t===void 0?t=l.rounding:gn(t,0,8),o=mt(new l(o),e,t),r=er(o),i=Fa(o,e<=r||r<=l.toExpNeg,e)),i};Me.toSignificantDigits=Me.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(gn(e,1,ml),t===void 0?t=i.rounding:gn(t,0,8)),mt(new i(r),e,t)};Me.toString=Me.valueOf=Me.val=Me.toJSON=Me[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=er(e),r=e.constructor;return Fa(e,t<=r.toExpNeg||t>=r.toExpPos)};function W6(e,t){var r,i,o,l,d,a,u,c,p=e.constructor,f=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),Lt?mt(t,f):t;if(u=e.d,c=t.d,d=e.e,o=t.e,u=u.slice(),l=d-o,l){for(l<0?(i=u,l=-l,a=c.length):(i=c,o=d,a=u.length),d=Math.ceil(f/At),a=d>a?d+1:a+1,l>a&&(l=a,i.length=1),i.reverse();l--;)i.push(0);i.reverse()}for(a=u.length,l=c.length,a-l<0&&(l=a,i=c,c=u,u=i),r=0;l;)r=(u[--l]=u[l]+c[l]+r)/fr|0,u[l]%=fr;for(r&&(u.unshift(r),++o),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=o,Lt?mt(t,f):t}function gn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Oa+e)}function un(e){var t,r,i,o=e.length-1,l="",d=e[0];if(o>0){for(l+=d,t=1;t<o;t++)i=e[t]+"",r=At-i.length,r&&(l+=Ps(r)),l+=i;d=e[t],i=d+"",r=At-i.length,r&&(l+=Ps(r))}else if(d===0)return"0";for(;d%10===0;)d/=10;return l+d}var Jn=(function(){function e(i,o){var l,d=0,a=i.length;for(i=i.slice();a--;)l=i[a]*o+d,i[a]=l%fr|0,d=l/fr|0;return d&&i.unshift(d),i}function t(i,o,l,d){var a,u;if(l!=d)u=l>d?1:-1;else for(a=u=0;a<l;a++)if(i[a]!=o[a]){u=i[a]>o[a]?1:-1;break}return u}function r(i,o,l){for(var d=0;l--;)i[l]-=d,d=i[l]<o[l]?1:0,i[l]=d*fr+i[l]-o[l];for(;!i[0]&&i.length>1;)i.shift()}return function(i,o,l,d){var a,u,c,p,f,g,b,S,m,v,y,x,C,E,D,w,M,T,O=i.constructor,L=i.s==o.s?1:-1,P=i.d,R=o.d;if(!i.s)return new O(i);if(!o.s)throw Error(Oi+"Division by zero");for(u=i.e-o.e,M=R.length,D=P.length,b=new O(L),S=b.d=[],c=0;R[c]==(P[c]||0);)++c;if(R[c]>(P[c]||0)&&--u,l==null?x=l=O.precision:d?x=l+(er(i)-er(o))+1:x=l,x<0)return new O(0);if(x=x/At+2|0,c=0,M==1)for(p=0,R=R[0],x++;(c<D||p)&&x--;c++)C=p*fr+(P[c]||0),S[c]=C/R|0,p=C%R|0;else{for(p=fr/(R[0]+1)|0,p>1&&(R=e(R,p),P=e(P,p),M=R.length,D=P.length),E=M,m=P.slice(0,M),v=m.length;v<M;)m[v++]=0;T=R.slice(),T.unshift(0),w=R[0],R[1]>=fr/2&&++w;do p=0,a=t(R,m,M,v),a<0?(y=m[0],M!=v&&(y=y*fr+(m[1]||0)),p=y/w|0,p>1?(p>=fr&&(p=fr-1),f=e(R,p),g=f.length,v=m.length,a=t(f,m,g,v),a==1&&(p--,r(f,M<g?T:R,g))):(p==0&&(a=p=1),f=R.slice()),g=f.length,g<v&&f.unshift(0),r(m,f,v),a==-1&&(v=m.length,a=t(R,m,M,v),a<1&&(p++,r(m,M<v?T:R,v))),v=m.length):a===0&&(p++,m=[0]),S[c++]=p,a&&m[0]?m[v++]=P[E]||0:(m=[P[E]],v=1);while((E++<D||m[0]!==void 0)&&x--)}return S[0]||S.shift(),b.e=u,mt(b,d?l+er(b)+1:l)}})();function G6(e,t){var r,i,o,l,d,a,u=0,c=0,p=e.constructor,f=p.precision;if(er(e)>16)throw Error(U_+er(e));if(!e.s)return new p(li);for(Lt=!1,a=f,d=new p(.03125);e.abs().gte(.1);)e=e.times(d),c+=5;for(i=Math.log(Ea(2,c))/Math.LN10*2+5|0,a+=i,r=o=l=new p(li),p.precision=a;;){if(o=mt(o.times(e),a),r=r.times(++u),d=l.plus(Jn(o,r,a)),un(d.d).slice(0,a)===un(l.d).slice(0,a)){for(;c--;)l=mt(l.times(l),a);return p.precision=f,t==null?(Lt=!0,mt(l,f)):l}l=d}}function er(e){for(var t=e.e*At,r=e.d[0];r>=10;r/=10)t++;return t}function Fm(e,t,r){if(t>e.LN10.sd())throw Lt=!0,r&&(e.precision=r),Error(Oi+"LN10 precision limit exceeded");return mt(new e(e.LN10),t)}function Ps(e){for(var t="";e--;)t+="0";return t}function Wu(e,t){var r,i,o,l,d,a,u,c,p,f=1,g=10,b=e,S=b.d,m=b.constructor,v=m.precision;if(b.s<1)throw Error(Oi+(b.s?"NaN":"-Infinity"));if(b.eq(li))return new m(0);if(t==null?(Lt=!1,c=v):c=t,b.eq(10))return t==null&&(Lt=!0),Fm(m,c);if(c+=g,m.precision=c,r=un(S),i=r.charAt(0),l=er(b),Math.abs(l)<15e14){for(;i<7&&i!=1||i==1&&r.charAt(1)>3;)b=b.times(e),r=un(b.d),i=r.charAt(0),f++;l=er(b),i>1?(b=new m("0."+r),l++):b=new m(i+"."+r.slice(1))}else return u=Fm(m,c+2,v).times(l+""),b=Wu(new m(i+"."+r.slice(1)),c-g).plus(u),m.precision=v,t==null?(Lt=!0,mt(b,v)):b;for(a=d=b=Jn(b.minus(li),b.plus(li),c),p=mt(b.times(b),c),o=3;;){if(d=mt(d.times(p),c),u=a.plus(Jn(d,new m(o),c)),un(u.d).slice(0,c)===un(a.d).slice(0,c))return a=a.times(2),l!==0&&(a=a.plus(Fm(m,c+2,v).times(l+""))),a=Jn(a,new m(f),c),m.precision=v,t==null?(Lt=!0,mt(a,v)):a;a=u,o+=2}}function j5(e,t){var r,i,o;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(r<0&&(r=i),r+=+t.slice(i+1),t=t.substring(0,i)):r<0&&(r=t.length),i=0;t.charCodeAt(i)===48;)++i;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(i,o),t){if(o-=i,r=r-i-1,e.e=gl(r/At),e.d=[],i=(r+1)%At,r<0&&(i+=At),i<o){for(i&&e.d.push(+t.slice(0,i)),o-=At;i<o;)e.d.push(+t.slice(i,i+=At));t=t.slice(i),i=At-t.length}else i-=o;for(;i--;)t+="0";if(e.d.push(+t),Lt&&(e.e>jf||e.e<-jf))throw Error(U_+r)}else e.s=0,e.e=0,e.d=[0];return e}function mt(e,t,r){var i,o,l,d,a,u,c,p,f=e.d;for(d=1,l=f[0];l>=10;l/=10)d++;if(i=t-d,i<0)i+=At,o=t,c=f[p=0];else{if(p=Math.ceil((i+1)/At),l=f.length,p>=l)return e;for(c=l=f[p],d=1;l>=10;l/=10)d++;i%=At,o=i-At+d}if(r!==void 0&&(l=Ea(10,d-o-1),a=c/l%10|0,u=t<0||f[p+1]!==void 0||c%l,u=r<4?(a||u)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||u||r==6&&(i>0?o>0?c/Ea(10,d-o):0:f[p-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return u?(l=er(e),f.length=1,t=t-l-1,f[0]=Ea(10,(At-t%At)%At),e.e=gl(-t/At)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(i==0?(f.length=p,l=1,p--):(f.length=p+1,l=Ea(10,At-i),f[p]=o>0?(c/Ea(10,d-o)%Ea(10,o)|0)*l:0),u)for(;;)if(p==0){(f[0]+=l)==fr&&(f[0]=1,++e.e);break}else{if(f[p]+=l,f[p]!=fr)break;f[p--]=0,l=1}for(i=f.length;f[--i]===0;)f.pop();if(Lt&&(e.e>jf||e.e<-jf))throw Error(U_+er(e));return e}function K6(e,t){var r,i,o,l,d,a,u,c,p,f,g=e.constructor,b=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Lt?mt(t,b):t;if(u=e.d,f=t.d,i=t.e,c=e.e,u=u.slice(),d=c-i,d){for(p=d<0,p?(r=u,d=-d,a=f.length):(r=f,i=c,a=u.length),o=Math.max(Math.ceil(b/At),a)+2,d>o&&(d=o,r.length=1),r.reverse(),o=d;o--;)r.push(0);r.reverse()}else{for(o=u.length,a=f.length,p=o<a,p&&(a=o),o=0;o<a;o++)if(u[o]!=f[o]){p=u[o]<f[o];break}d=0}for(p&&(r=u,u=f,f=r,t.s=-t.s),a=u.length,o=f.length-a;o>0;--o)u[a++]=0;for(o=f.length;o>d;){if(u[--o]<f[o]){for(l=o;l&&u[--l]===0;)u[l]=fr-1;--u[l],u[o]+=fr}u[o]-=f[o]}for(;u[--a]===0;)u.pop();for(;u[0]===0;u.shift())--i;return u[0]?(t.d=u,t.e=i,Lt?mt(t,b):t):new g(0)}function Fa(e,t,r){var i,o=er(e),l=un(e.d),d=l.length;return t?(r&&(i=r-d)>0?l=l.charAt(0)+"."+l.slice(1)+Ps(i):d>1&&(l=l.charAt(0)+"."+l.slice(1)),l=l+(o<0?"e":"e+")+o):o<0?(l="0."+Ps(-o-1)+l,r&&(i=r-d)>0&&(l+=Ps(i))):o>=d?(l+=Ps(o+1-d),r&&(i=r-o-1)>0&&(l=l+"."+Ps(i))):((i=o+1)<d&&(l=l.slice(0,i)+"."+l.slice(i)),r&&(i=r-d)>0&&(o+1===d&&(l+="."),l+=Ps(i))),e.s<0?"-"+l:l}function F5(e,t){if(e.length>t)return e.length=t,!0}function Y6(e){var t,r,i;function o(l){var d=this;if(!(d instanceof o))return new o(l);if(d.constructor=o,l instanceof o){d.s=l.s,d.e=l.e,d.d=(l=l.d)?l.slice():l;return}if(typeof l=="number"){if(l*0!==0)throw Error(Oa+l);if(l>0)d.s=1;else if(l<0)l=-l,d.s=-1;else{d.s=0,d.e=0,d.d=[0];return}if(l===~~l&&l<1e7){d.e=0,d.d=[l];return}return j5(d,l.toString())}else if(typeof l!="string")throw Error(Oa+l);if(l.charCodeAt(0)===45?(l=l.slice(1),d.s=-1):d.s=1,dN.test(l))j5(d,l);else throw Error(Oa+l)}if(o.prototype=Me,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=Y6,o.config=o.set=pN,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<i.length;)e.hasOwnProperty(r=i[t++])||(e[r]=this[r]);return o.config(e),o}function pN(e){if(!e||typeof e!="object")throw Error(Oi+"Object expected");var t,r,i,o=["precision",1,ml,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if((i=e[r=o[t]])!==void 0)if(gl(i)===i&&i>=o[t+1]&&i<=o[t+2])this[r]=i;else throw Error(Oa+r+": "+i);if((i=e[r="LN10"])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(Oa+r+": "+i);return this}var q_=Y6(fN);li=new q_(1);const Je=q_;function V6(e){var t;return e===0?t=1:t=Math.floor(new Je(e).abs().log(10).toNumber())+1,t}function X6(e,t,r){for(var i=new Je(e),o=0,l=[];i.lt(t)&&o<1e5;)l.push(i.toNumber()),i=i.add(r),o++;return l}var Z6=e=>{var[t,r]=e,[i,o]=[t,r];return t>r&&([i,o]=[r,t]),[i,o]},W_=(e,t,r)=>{if(e.lte(0))return new Je(0);var i=V6(e.toNumber()),o=new Je(10).pow(i),l=e.div(o),d=i!==1?.05:.1,a=new Je(Math.ceil(l.div(d).toNumber())).add(r).mul(d),u=a.mul(o);return t?new Je(u.toNumber()):new Je(Math.ceil(u.toNumber()))},Q6=(e,t,r)=>{var i;if(e.lte(0))return new Je(0);var o=[1,2,2.5,5],l=e.toNumber(),d=Math.floor(new Je(l).abs().log(10).toNumber()),a=new Je(10).pow(d),u=e.div(a).toNumber(),c=o.findIndex(b=>b>=u-1e-10);if(c===-1&&(a=a.mul(10),c=0),c+=r,c>=o.length){var p=Math.floor(c/o.length);c%=o.length,a=a.mul(new Je(10).pow(p))}var f=(i=o[c])!==null&&i!==void 0?i:1,g=new Je(f).mul(a);return t?g:new Je(Math.ceil(g.toNumber()))},vN=(e,t,r)=>{var i=new Je(1),o=new Je(e);if(!o.isint()&&r){var l=Math.abs(e);l<1?(i=new Je(10).pow(V6(e)-1),o=new Je(Math.floor(o.div(i).toNumber())).mul(i)):l>1&&(o=new Je(Math.floor(e)))}else e===0?o=new Je(Math.floor((t-1)/2)):r||(o=new Je(Math.floor(e)));for(var d=Math.floor((t-1)/2),a=[],u=0;u<t;u++)a.push(o.add(new Je(u-d).mul(i)).toNumber());return a},J6=function(t,r,i,o){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:W_;if(!Number.isFinite((r-t)/(i-1)))return{step:new Je(0),tickMin:new Je(0),tickMax:new Je(0)};var a=d(new Je(r).sub(t).div(i-1),o,l),u;t<=0&&r>=0?u=new Je(0):(u=new Je(t).add(r).div(2),u=u.sub(new Je(u).mod(a)));var c=Math.ceil(u.sub(t).div(a).toNumber()),p=Math.ceil(new Je(r).sub(u).div(a).toNumber()),f=c+p+1;return f>i?J6(t,r,i,o,l+1,d):(f<i&&(p=r>0?p+(i-f):p,c=r>0?c:c+(i-f)),{step:a,tickMin:u.sub(new Je(c).mul(a)),tickMax:u.add(new Je(p).mul(a))})},z5=function(t){var[r,i]=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",a=Math.max(o,2),[u,c]=Z6([r,i]);if(u===-1/0||c===1/0){var p=c===1/0?[u,...Array(o-1).fill(1/0)]:[...Array(o-1).fill(-1/0),c];return r>i?p.reverse():p}if(u===c)return vN(u,o,l);var f=d==="snap125"?Q6:W_,{step:g,tickMin:b,tickMax:S}=J6(u,c,a,l,0,f),m=X6(b,S.add(new Je(.1).mul(g)),g);return r>i?m.reverse():m},H5=function(t,r){var[i,o]=t,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[a,u]=Z6([i,o]);if(a===-1/0||u===1/0)return[i,o];if(a===u)return[a];var c=d==="snap125"?Q6:W_,p=Math.max(r,2),f=c(new Je(u).sub(a).div(p-1),l,0),g=[...X6(new Je(a),new Je(u),f),u];return l===!1&&(g=g.map(b=>Math.round(b))),i>o?g.reverse():g},e4=e=>e.rootProps.maxBarSize,mN=e=>e.rootProps.barGap,t4=e=>e.rootProps.barCategoryGap,gN=e=>e.rootProps.barSize,Rd=e=>e.rootProps.stackOffset,r4=e=>e.rootProps.reverseStackOrder,G_=e=>e.options.chartName,K_=e=>e.rootProps.syncId,i4=e=>e.rootProps.syncMethod,Y_=e=>e.options.eventEmitter,Zr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},ga={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},rn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Pd=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Bd(e,t,r){if(r!=="auto")return r;if(e!=null)return Ks(e,t)?"category":"number"}function $5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ff(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$5(Object(r),!0).forEach(function(i){_N(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$5(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function _N(e,t,r){return(t=yN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yN(e){var t=bN(e,"string");return typeof t=="symbol"?t:t+""}function bN(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U5={allowDataOverflow:ga.allowDataOverflow,allowDecimals:ga.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:ga.angleAxisId,includeHidden:!1,name:void 0,reversed:ga.reversed,scale:ga.scale,tick:ga.tick,tickCount:void 0,ticks:void 0,type:ga.type,unit:void 0,niceTicks:"auto"},q5={allowDataOverflow:rn.allowDataOverflow,allowDecimals:rn.allowDecimals,allowDuplicatedCategory:rn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:rn.radiusAxisId,includeHidden:rn.includeHidden,name:void 0,reversed:rn.reversed,scale:rn.scale,tick:rn.tick,tickCount:rn.tickCount,ticks:void 0,type:rn.type,unit:void 0,niceTicks:"auto"},SN=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},V_=ue([SN,C6],(e,t)=>{var r;if(e!=null)return e;var i=(r=Bd(t,"angleAxis",U5.type))!==null&&r!==void 0?r:"category";return Ff(Ff({},U5),{},{type:i})}),xN=(e,t)=>e.polarAxis.radiusAxis[t],X_=ue([xN,C6],(e,t)=>{var r;if(e!=null)return e;var i=(r=Bd(t,"radiusAxis",q5.type))!==null&&r!==void 0?r:"category";return Ff(Ff({},q5),{},{type:i})}),Id=e=>e.polarOptions,Z_=ue([ns,ss,vr],KI),n4=ue([Id,Z_],(e,t)=>{if(e!=null)return $i(e.innerRadius,t,0)}),s4=ue([Id,Z_],(e,t)=>{if(e!=null)return $i(e.outerRadius,t,t*.8)}),CN=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},a4=ue([Id],CN);ue([V_,a4],Pd);var o4=ue([Z_,n4,s4],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});ue([X_,o4],Pd);var l4=ue([gt,Id,n4,s4,ns,ss],(e,t,r,i,o,l)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||i==null)){var{cx:d,cy:a,startAngle:u,endAngle:c}=t;return{cx:$i(d,o,o/2),cy:$i(a,l,l/2),innerRadius:r,outerRadius:i,startAngle:u,endAngle:c,clockWise:!1}}}),mr=(e,t)=>t,Nd=(e,t,r)=>r;function Q_(e){return e==null?void 0:e.id}function u4(e,t,r){var{chartData:i=[]}=t,{allowDuplicatedCategory:o,dataKey:l}=r,d=new Map;return e.forEach(a=>{var u,c=(u=a.data)!==null&&u!==void 0?u:i;if(!(c==null||c.length===0)){var p=Q_(a);c.forEach((f,g)=>{var b=l==null||o?g:String(pr(f,l,null)),S=pr(f,a.dataKey,0),m;d.has(b)?m=d.get(b):m={},Object.assign(m,{[p]:S}),d.set(b,m)})}}),Array.from(d.values())}function jd(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Fd=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function zd(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function wN(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var gr=e=>{var t=gt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},_l=e=>e.tooltip.settings.axisId;function J_(e){if(e!=null){var t=e.ticks,r=e.bandwidth,i=e.range(),o=[Math.min(...i),Math.max(...i)];return{domain:()=>e.domain(),range:(function(l){function d(){return l.apply(this,arguments)}return d.toString=function(){return l.toString()},d})(()=>o),rangeMin:()=>o[0],rangeMax:()=>o[1],isInRange(l){var d=o[0],a=o[1];return d<=a?l>=d&&l<=a:l>=a&&l<=d},bandwidth:r?()=>r.call(e):void 0,ticks:t?l=>t.call(e,l):void 0,map:(l,d)=>{var a=e(l);if(a!=null){if(e.bandwidth&&d!==null&&d!==void 0&&d.position){var u=e.bandwidth();switch(d.position){case"middle":a+=u/2;break;case"end":a+=u;break}}return a}}}}}var EN=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!fn(t)){for(var r,i,o=0;o<t.length;o++){var l=t[o];at(l)&&((r===void 0||l<r)&&(r=l),(i===void 0||l>i)&&(i=l))}return r!==void 0&&i!==void 0?[r,i]:void 0}return t}default:return t}};function zs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function AN(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function e1(e){let t,r,i;e.length!==2?(t=zs,r=(a,u)=>zs(e(a),u),i=(a,u)=>e(a)-u):(t=e===zs||e===AN?e:DN,r=e,i=e);function o(a,u,c=0,p=a.length){if(c<p){if(t(u,u)!==0)return p;do{const f=c+p>>>1;r(a[f],u)<0?c=f+1:p=f}while(c<p)}return c}function l(a,u,c=0,p=a.length){if(c<p){if(t(u,u)!==0)return p;do{const f=c+p>>>1;r(a[f],u)<=0?c=f+1:p=f}while(c<p)}return c}function d(a,u,c=0,p=a.length){const f=o(a,u,c,p-1);return f>c&&i(a[f-1],u)>-i(a[f],u)?f-1:f}return{left:o,center:d,right:l}}function DN(){return 0}function c4(e){return e===null?NaN:+e}function*TN(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const MN=e1(zs),hc=MN.right;e1(c4).center;class W5 extends Map{constructor(t,r=LN){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,o]of t)this.set(i,o)}get(t){return super.get(G5(this,t))}has(t){return super.has(G5(this,t))}set(t,r){return super.set(kN(this,t),r)}delete(t){return super.delete(ON(this,t))}}function G5({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function kN({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function ON({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function LN(e){return e!==null&&typeof e=="object"?e.valueOf():e}function RN(e=zs){if(e===zs)return h4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const i=e(t,r);return i||i===0?i:(e(r,r)===0)-(e(t,t)===0)}}function h4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const PN=Math.sqrt(50),BN=Math.sqrt(10),IN=Math.sqrt(2);function zf(e,t,r){const i=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(i)),l=i/Math.pow(10,o),d=l>=PN?10:l>=BN?5:l>=IN?2:1;let a,u,c;return o<0?(c=Math.pow(10,-o)/d,a=Math.round(e*c),u=Math.round(t*c),a/c<e&&++a,u/c>t&&--u,c=-c):(c=Math.pow(10,o)*d,a=Math.round(e/c),u=Math.round(t/c),a*c<e&&++a,u*c>t&&--u),u<a&&.5<=r&&r<2?zf(e,t,r*2):[a,u,c]}function Wg(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[o,l,d]=i?zf(t,e,r):zf(e,t,r);if(!(l>=o))return[];const a=l-o+1,u=new Array(a);if(i)if(d<0)for(let c=0;c<a;++c)u[c]=(l-c)/-d;else for(let c=0;c<a;++c)u[c]=(l-c)*d;else if(d<0)for(let c=0;c<a;++c)u[c]=(o+c)/-d;else for(let c=0;c<a;++c)u[c]=(o+c)*d;return u}function Gg(e,t,r){return t=+t,e=+e,r=+r,zf(e,t,r)[2]}function Kg(e,t,r){t=+t,e=+e,r=+r;const i=t<e,o=i?Gg(t,e,r):Gg(e,t,r);return(i?-1:1)*(o<0?1/-o:o)}function K5(e,t){let r;for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);return r}function Y5(e,t){let r;for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);return r}function f4(e,t,r=0,i=1/0,o){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(e.length-1,i)),!(r<=t&&t<=i))return e;for(o=o===void 0?h4:RN(o);i>r;){if(i-r>600){const u=i-r+1,c=t-r+1,p=Math.log(u),f=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*f*(u-f)/u)*(c-u/2<0?-1:1),b=Math.max(r,Math.floor(t-c*f/u+g)),S=Math.min(i,Math.floor(t+(u-c)*f/u+g));f4(e,t,b,S,o)}const l=e[t];let d=r,a=i;for(Cu(e,r,t),o(e[i],l)>0&&Cu(e,r,i);d<a;){for(Cu(e,d,a),++d,--a;o(e[d],l)<0;)++d;for(;o(e[a],l)>0;)--a}o(e[r],l)===0?Cu(e,r,a):(++a,Cu(e,a,i)),a<=t&&(r=a+1),t<=a&&(i=a-1)}return e}function Cu(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function NN(e,t,r){if(e=Float64Array.from(TN(e)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return Y5(e);if(t>=1)return K5(e);var i,o=(i-1)*t,l=Math.floor(o),d=K5(f4(e,l).subarray(0,l+1)),a=Y5(e.subarray(l+1));return d+(a-d)*(o-l)}}function jN(e,t,r=c4){if(!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return+r(e[0],0,e);if(t>=1)return+r(e[i-1],i-1,e);var i,o=(i-1)*t,l=Math.floor(o),d=+r(e[l],l,e),a=+r(e[l+1],l+1,e);return d+(a-d)*(o-l)}}function FN(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var i=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,l=new Array(o);++i<o;)l[i]=e+i*r;return l}function Bi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function as(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Yg=Symbol("implicit");function t1(){var e=new W5,t=[],r=[],i=Yg;function o(l){let d=e.get(l);if(d===void 0){if(i!==Yg)return i;e.set(l,d=t.push(l)-1)}return r[d%r.length]}return o.domain=function(l){if(!arguments.length)return t.slice();t=[],e=new W5;for(const d of l)e.has(d)||e.set(d,t.push(d)-1);return o},o.range=function(l){return arguments.length?(r=Array.from(l),o):r.slice()},o.unknown=function(l){return arguments.length?(i=l,o):i},o.copy=function(){return t1(t,r).unknown(i)},Bi.apply(o,arguments),o}function r1(){var e=t1().unknown(void 0),t=e.domain,r=e.range,i=0,o=1,l,d,a=!1,u=0,c=0,p=.5;delete e.unknown;function f(){var g=t().length,b=o<i,S=b?o:i,m=b?i:o;l=(m-S)/Math.max(1,g-u+c*2),a&&(l=Math.floor(l)),S+=(m-S-l*(g-u))*p,d=l*(1-u),a&&(S=Math.round(S),d=Math.round(d));var v=FN(g).map(function(y){return S+l*y});return r(b?v.reverse():v)}return e.domain=function(g){return arguments.length?(t(g),f()):t()},e.range=function(g){return arguments.length?([i,o]=g,i=+i,o=+o,f()):[i,o]},e.rangeRound=function(g){return[i,o]=g,i=+i,o=+o,a=!0,f()},e.bandwidth=function(){return d},e.step=function(){return l},e.round=function(g){return arguments.length?(a=!!g,f()):a},e.padding=function(g){return arguments.length?(u=Math.min(1,c=+g),f()):u},e.paddingInner=function(g){return arguments.length?(u=Math.min(1,g),f()):u},e.paddingOuter=function(g){return arguments.length?(c=+g,f()):c},e.align=function(g){return arguments.length?(p=Math.max(0,Math.min(1,g)),f()):p},e.copy=function(){return r1(t(),[i,o]).round(a).paddingInner(u).paddingOuter(c).align(p)},Bi.apply(f(),arguments)}function d4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return d4(t())},e}function zN(){return d4(r1.apply(null,arguments).paddingInner(1))}function i1(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function p4(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function fc(){}var Gu=.7,Hf=1/Gu,Zo="\\s*([+-]?\\d+)\\s*",Ku="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",HN=/^#([0-9a-f]{3,8})$/,$N=new RegExp(`^rgb\\(${Zo},${Zo},${Zo}\\)$`),UN=new RegExp(`^rgb\\(${dn},${dn},${dn}\\)$`),qN=new RegExp(`^rgba\\(${Zo},${Zo},${Zo},${Ku}\\)$`),WN=new RegExp(`^rgba\\(${dn},${dn},${dn},${Ku}\\)$`),GN=new RegExp(`^hsl\\(${Ku},${dn},${dn}\\)$`),KN=new RegExp(`^hsla\\(${Ku},${dn},${dn},${Ku}\\)$`),V5={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};i1(fc,Yu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:X5,formatHex:X5,formatHex8:YN,formatHsl:VN,formatRgb:Z5,toString:Z5});function X5(){return this.rgb().formatHex()}function YN(){return this.rgb().formatHex8()}function VN(){return v4(this).formatHsl()}function Z5(){return this.rgb().formatRgb()}function Yu(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=HN.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Q5(t):r===3?new Qr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Gh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Gh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$N.exec(e))?new Qr(t[1],t[2],t[3],1):(t=UN.exec(e))?new Qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=qN.exec(e))?Gh(t[1],t[2],t[3],t[4]):(t=WN.exec(e))?Gh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=GN.exec(e))?tw(t[1],t[2]/100,t[3]/100,1):(t=KN.exec(e))?tw(t[1],t[2]/100,t[3]/100,t[4]):V5.hasOwnProperty(e)?Q5(V5[e]):e==="transparent"?new Qr(NaN,NaN,NaN,0):null}function Q5(e){return new Qr(e>>16&255,e>>8&255,e&255,1)}function Gh(e,t,r,i){return i<=0&&(e=t=r=NaN),new Qr(e,t,r,i)}function XN(e){return e instanceof fc||(e=Yu(e)),e?(e=e.rgb(),new Qr(e.r,e.g,e.b,e.opacity)):new Qr}function Vg(e,t,r,i){return arguments.length===1?XN(e):new Qr(e,t,r,i??1)}function Qr(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}i1(Qr,Vg,p4(fc,{brighter(e){return e=e==null?Hf:Math.pow(Hf,e),new Qr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gu:Math.pow(Gu,e),new Qr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Qr(La(this.r),La(this.g),La(this.b),$f(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:J5,formatHex:J5,formatHex8:ZN,formatRgb:ew,toString:ew}));function J5(){return`#${Da(this.r)}${Da(this.g)}${Da(this.b)}`}function ZN(){return`#${Da(this.r)}${Da(this.g)}${Da(this.b)}${Da((isNaN(this.opacity)?1:this.opacity)*255)}`}function ew(){const e=$f(this.opacity);return`${e===1?"rgb(":"rgba("}${La(this.r)}, ${La(this.g)}, ${La(this.b)}${e===1?")":`, ${e})`}`}function $f(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function La(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Da(e){return e=La(e),(e<16?"0":"")+e.toString(16)}function tw(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Hi(e,t,r,i)}function v4(e){if(e instanceof Hi)return new Hi(e.h,e.s,e.l,e.opacity);if(e instanceof fc||(e=Yu(e)),!e)return new Hi;if(e instanceof Hi)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,o=Math.min(t,r,i),l=Math.max(t,r,i),d=NaN,a=l-o,u=(l+o)/2;return a?(t===l?d=(r-i)/a+(r<i)*6:r===l?d=(i-t)/a+2:d=(t-r)/a+4,a/=u<.5?l+o:2-l-o,d*=60):a=u>0&&u<1?0:d,new Hi(d,a,u,e.opacity)}function QN(e,t,r,i){return arguments.length===1?v4(e):new Hi(e,t,r,i??1)}function Hi(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}i1(Hi,QN,p4(fc,{brighter(e){return e=e==null?Hf:Math.pow(Hf,e),new Hi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gu:Math.pow(Gu,e),new Hi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,o=2*r-i;return new Qr(zm(e>=240?e-240:e+120,o,i),zm(e,o,i),zm(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new Hi(rw(this.h),Kh(this.s),Kh(this.l),$f(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$f(this.opacity);return`${e===1?"hsl(":"hsla("}${rw(this.h)}, ${Kh(this.s)*100}%, ${Kh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function rw(e){return e=(e||0)%360,e<0?e+360:e}function Kh(e){return Math.max(0,Math.min(1,e||0))}function zm(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const n1=e=>()=>e;function JN(e,t){return function(r){return e+r*t}}function ej(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function tj(e){return(e=+e)==1?m4:function(t,r){return r-t?ej(t,r,e):n1(isNaN(t)?r:t)}}function m4(e,t){var r=t-e;return r?JN(e,r):n1(isNaN(e)?t:e)}const iw=(function e(t){var r=tj(t);function i(o,l){var d=r((o=Vg(o)).r,(l=Vg(l)).r),a=r(o.g,l.g),u=r(o.b,l.b),c=m4(o.opacity,l.opacity);return function(p){return o.r=d(p),o.g=a(p),o.b=u(p),o.opacity=c(p),o+""}}return i.gamma=e,i})(1);function rj(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),o;return function(l){for(o=0;o<r;++o)i[o]=e[o]*(1-l)+t[o]*l;return i}}function ij(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function nj(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),l=new Array(r),d;for(d=0;d<i;++d)o[d]=yl(e[d],t[d]);for(;d<r;++d)l[d]=t[d];return function(a){for(d=0;d<i;++d)l[d]=o[d](a);return l}}function sj(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function Uf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function aj(e,t){var r={},i={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=yl(e[o],t[o]):i[o]=t[o];return function(l){for(o in r)i[o]=r[o](l);return i}}var Xg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hm=new RegExp(Xg.source,"g");function oj(e){return function(){return e}}function lj(e){return function(t){return e(t)+""}}function uj(e,t){var r=Xg.lastIndex=Hm.lastIndex=0,i,o,l,d=-1,a=[],u=[];for(e=e+"",t=t+"";(i=Xg.exec(e))&&(o=Hm.exec(t));)(l=o.index)>r&&(l=t.slice(r,l),a[d]?a[d]+=l:a[++d]=l),(i=i[0])===(o=o[0])?a[d]?a[d]+=o:a[++d]=o:(a[++d]=null,u.push({i:d,x:Uf(i,o)})),r=Hm.lastIndex;return r<t.length&&(l=t.slice(r),a[d]?a[d]+=l:a[++d]=l),a.length<2?u[0]?lj(u[0].x):oj(t):(t=u.length,function(c){for(var p=0,f;p<t;++p)a[(f=u[p]).i]=f.x(c);return a.join("")})}function yl(e,t){var r=typeof t,i;return t==null||r==="boolean"?n1(t):(r==="number"?Uf:r==="string"?(i=Yu(t))?(t=i,iw):uj:t instanceof Yu?iw:t instanceof Date?sj:ij(t)?rj:Array.isArray(t)?nj:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?aj:Uf)(e,t)}function s1(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function cj(e,t){t===void 0&&(t=e,e=yl);for(var r=0,i=t.length-1,o=t[0],l=new Array(i<0?0:i);r<i;)l[r]=e(o,o=t[++r]);return function(d){var a=Math.max(0,Math.min(i-1,Math.floor(d*=i)));return l[a](d-a)}}function hj(e){return function(){return e}}function qf(e){return+e}var nw=[0,1];function Fr(e){return e}function Zg(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:hj(isNaN(t)?NaN:.5)}function fj(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function dj(e,t,r){var i=e[0],o=e[1],l=t[0],d=t[1];return o<i?(i=Zg(o,i),l=r(d,l)):(i=Zg(i,o),l=r(l,d)),function(a){return l(i(a))}}function pj(e,t,r){var i=Math.min(e.length,t.length)-1,o=new Array(i),l=new Array(i),d=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++d<i;)o[d]=Zg(e[d],e[d+1]),l[d]=r(t[d],t[d+1]);return function(a){var u=hc(e,a,1,i)-1;return l[u](o[u](a))}}function dc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Hd(){var e=nw,t=nw,r=yl,i,o,l,d=Fr,a,u,c;function p(){var g=Math.min(e.length,t.length);return d!==Fr&&(d=fj(e[0],e[g-1])),a=g>2?pj:dj,u=c=null,f}function f(g){return g==null||isNaN(g=+g)?l:(u||(u=a(e.map(i),t,r)))(i(d(g)))}return f.invert=function(g){return d(o((c||(c=a(t,e.map(i),Uf)))(g)))},f.domain=function(g){return arguments.length?(e=Array.from(g,qf),p()):e.slice()},f.range=function(g){return arguments.length?(t=Array.from(g),p()):t.slice()},f.rangeRound=function(g){return t=Array.from(g),r=s1,p()},f.clamp=function(g){return arguments.length?(d=g?!0:Fr,p()):d!==Fr},f.interpolate=function(g){return arguments.length?(r=g,p()):r},f.unknown=function(g){return arguments.length?(l=g,f):l},function(g,b){return i=g,o=b,p()}}function a1(){return Hd()(Fr,Fr)}function vj(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Wf(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function il(e){return e=Wf(Math.abs(e)),e?e[1]:NaN}function mj(e,t){return function(r,i){for(var o=r.length,l=[],d=0,a=e[0],u=0;o>0&&a>0&&(u+a+1>i&&(a=Math.max(1,i-u)),l.push(r.substring(o-=a,o+a)),!((u+=a+1)>i));)a=e[d=(d+1)%e.length];return l.reverse().join(t)}}function gj(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var _j=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vu(e){if(!(t=_j.exec(e)))throw new Error("invalid format: "+e);var t;return new o1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Vu.prototype=o1.prototype;function o1(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}o1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function yj(e){e:for(var t=e.length,r=1,i=-1,o;r<t;++r)switch(e[r]){case".":i=o=r;break;case"0":i===0&&(i=r),o=r;break;default:if(!+e[r])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(o+1):e}var Gf;function bj(e,t){var r=Wf(e,t);if(!r)return Gf=void 0,e.toPrecision(t);var i=r[0],o=r[1],l=o-(Gf=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,d=i.length;return l===d?i:l>d?i+new Array(l-d+1).join("0"):l>0?i.slice(0,l)+"."+i.slice(l):"0."+new Array(1-l).join("0")+Wf(e,Math.max(0,t+l-1))[0]}function sw(e,t){var r=Wf(e,t);if(!r)return e+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const aw={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:vj,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>sw(e*100,t),r:sw,s:bj,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ow(e){return e}var lw=Array.prototype.map,uw=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Sj(e){var t=e.grouping===void 0||e.thousands===void 0?ow:mj(lw.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",l=e.numerals===void 0?ow:gj(lw.call(e.numerals,String)),d=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function c(f,g){f=Vu(f);var b=f.fill,S=f.align,m=f.sign,v=f.symbol,y=f.zero,x=f.width,C=f.comma,E=f.precision,D=f.trim,w=f.type;w==="n"?(C=!0,w="g"):aw[w]||(E===void 0&&(E=12),D=!0,w="g"),(y||b==="0"&&S==="=")&&(y=!0,b="0",S="=");var M=(g&&g.prefix!==void 0?g.prefix:"")+(v==="$"?r:v==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),T=(v==="$"?i:/[%p]/.test(w)?d:"")+(g&&g.suffix!==void 0?g.suffix:""),O=aw[w],L=/[defgprs%]/.test(w);E=E===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function P(R){var I=M,$=T,V,U,K;if(w==="c")$=O(R)+$,R="";else{R=+R;var G=R<0||1/R<0;if(R=isNaN(R)?u:O(Math.abs(R),E),D&&(R=yj(R)),G&&+R==0&&m!=="+"&&(G=!1),I=(G?m==="("?m:a:m==="-"||m==="("?"":m)+I,$=(w==="s"&&!isNaN(R)&&Gf!==void 0?uw[8+Gf/3]:"")+$+(G&&m==="("?")":""),L){for(V=-1,U=R.length;++V<U;)if(K=R.charCodeAt(V),48>K||K>57){$=(K===46?o+R.slice(V+1):R.slice(V))+$,R=R.slice(0,V);break}}}C&&!y&&(R=t(R,1/0));var N=I.length+R.length+$.length,H=N<x?new Array(x-N+1).join(b):"";switch(C&&y&&(R=t(H+R,H.length?x-$.length:1/0),H=""),S){case"<":R=I+R+$+H;break;case"=":R=I+H+R+$;break;case"^":R=H.slice(0,N=H.length>>1)+I+R+$+H.slice(N);break;default:R=H+I+R+$;break}return l(R)}return P.toString=function(){return f+""},P}function p(f,g){var b=Math.max(-8,Math.min(8,Math.floor(il(g)/3)))*3,S=Math.pow(10,-b),m=c((f=Vu(f),f.type="f",f),{suffix:uw[8+b/3]});return function(v){return m(S*v)}}return{format:c,formatPrefix:p}}var Yh,l1,g4;xj({thousands:",",grouping:[3],currency:["$",""]});function xj(e){return Yh=Sj(e),l1=Yh.format,g4=Yh.formatPrefix,Yh}function Cj(e){return Math.max(0,-il(Math.abs(e)))}function wj(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(il(t)/3)))*3-il(Math.abs(e)))}function Ej(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,il(t)-il(e))+1}function _4(e,t,r,i){var o=Kg(e,t,r),l;switch(i=Vu(i??",f"),i.type){case"s":{var d=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(l=wj(o,d))&&(i.precision=l),g4(i,d)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(l=Ej(o,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=l-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(l=Cj(o))&&(i.precision=l-(i.type==="%")*2);break}}return l1(i)}function Ys(e){var t=e.domain;return e.ticks=function(r){var i=t();return Wg(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var o=t();return _4(o[0],o[o.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),o=0,l=i.length-1,d=i[o],a=i[l],u,c,p=10;for(a<d&&(c=d,d=a,a=c,c=o,o=l,l=c);p-- >0;){if(c=Gg(d,a,r),c===u)return i[o]=d,i[l]=a,t(i);if(c>0)d=Math.floor(d/c)*c,a=Math.ceil(a/c)*c;else if(c<0)d=Math.ceil(d*c)/c,a=Math.floor(a*c)/c;else break;u=c}return e},e}function y4(){var e=a1();return e.copy=function(){return dc(e,y4())},Bi.apply(e,arguments),Ys(e)}function b4(e){var t;function r(i){return i==null||isNaN(i=+i)?t:i}return r.invert=r,r.domain=r.range=function(i){return arguments.length?(e=Array.from(i,qf),r):e.slice()},r.unknown=function(i){return arguments.length?(t=i,r):t},r.copy=function(){return b4(e).unknown(t)},e=arguments.length?Array.from(e,qf):[0,1],Ys(r)}function S4(e,t){e=e.slice();var r=0,i=e.length-1,o=e[r],l=e[i],d;return l<o&&(d=r,r=i,i=d,d=o,o=l,l=d),e[r]=t.floor(o),e[i]=t.ceil(l),e}function cw(e){return Math.log(e)}function hw(e){return Math.exp(e)}function Aj(e){return-Math.log(-e)}function Dj(e){return-Math.exp(-e)}function Tj(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Mj(e){return e===10?Tj:e===Math.E?Math.exp:t=>Math.pow(e,t)}function kj(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function fw(e){return(t,r)=>-e(-t,r)}function u1(e){const t=e(cw,hw),r=t.domain;let i=10,o,l;function d(){return o=kj(i),l=Mj(i),r()[0]<0?(o=fw(o),l=fw(l),e(Aj,Dj)):e(cw,hw),t}return t.base=function(a){return arguments.length?(i=+a,d()):i},t.domain=function(a){return arguments.length?(r(a),d()):r()},t.ticks=a=>{const u=r();let c=u[0],p=u[u.length-1];const f=p<c;f&&([c,p]=[p,c]);let g=o(c),b=o(p),S,m;const v=a==null?10:+a;let y=[];if(!(i%1)&&b-g<v){if(g=Math.floor(g),b=Math.ceil(b),c>0){for(;g<=b;++g)for(S=1;S<i;++S)if(m=g<0?S/l(-g):S*l(g),!(m<c)){if(m>p)break;y.push(m)}}else for(;g<=b;++g)for(S=i-1;S>=1;--S)if(m=g>0?S/l(-g):S*l(g),!(m<c)){if(m>p)break;y.push(m)}y.length*2<v&&(y=Wg(c,p,v))}else y=Wg(g,b,Math.min(b-g,v)).map(l);return f?y.reverse():y},t.tickFormat=(a,u)=>{if(a==null&&(a=10),u==null&&(u=i===10?"s":","),typeof u!="function"&&(!(i%1)&&(u=Vu(u)).precision==null&&(u.trim=!0),u=l1(u)),a===1/0)return u;const c=Math.max(1,i*a/t.ticks().length);return p=>{let f=p/l(Math.round(o(p)));return f*i<i-.5&&(f*=i),f<=c?u(p):""}},t.nice=()=>r(S4(r(),{floor:a=>l(Math.floor(o(a))),ceil:a=>l(Math.ceil(o(a)))})),t}function x4(){const e=u1(Hd()).domain([1,10]);return e.copy=()=>dc(e,x4()).base(e.base()),Bi.apply(e,arguments),e}function dw(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function pw(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function c1(e){var t=1,r=e(dw(t),pw(t));return r.constant=function(i){return arguments.length?e(dw(t=+i),pw(t)):t},Ys(r)}function C4(){var e=c1(Hd());return e.copy=function(){return dc(e,C4()).constant(e.constant())},Bi.apply(e,arguments)}function vw(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Oj(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Lj(e){return e<0?-e*e:e*e}function h1(e){var t=e(Fr,Fr),r=1;function i(){return r===1?e(Fr,Fr):r===.5?e(Oj,Lj):e(vw(r),vw(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,i()):r},Ys(t)}function f1(){var e=h1(Hd());return e.copy=function(){return dc(e,f1()).exponent(e.exponent())},Bi.apply(e,arguments),e}function Rj(){return f1.apply(null,arguments).exponent(.5)}function mw(e){return Math.sign(e)*e*e}function Pj(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function w4(){var e=a1(),t=[0,1],r=!1,i;function o(l){var d=Pj(e(l));return isNaN(d)?i:r?Math.round(d):d}return o.invert=function(l){return e.invert(mw(l))},o.domain=function(l){return arguments.length?(e.domain(l),o):e.domain()},o.range=function(l){return arguments.length?(e.range((t=Array.from(l,qf)).map(mw)),o):t.slice()},o.rangeRound=function(l){return o.range(l).round(!0)},o.round=function(l){return arguments.length?(r=!!l,o):r},o.clamp=function(l){return arguments.length?(e.clamp(l),o):e.clamp()},o.unknown=function(l){return arguments.length?(i=l,o):i},o.copy=function(){return w4(e.domain(),t).round(r).clamp(e.clamp()).unknown(i)},Bi.apply(o,arguments),Ys(o)}function E4(){var e=[],t=[],r=[],i;function o(){var d=0,a=Math.max(1,t.length);for(r=new Array(a-1);++d<a;)r[d-1]=jN(e,d/a);return l}function l(d){return d==null||isNaN(d=+d)?i:t[hc(r,d)]}return l.invertExtent=function(d){var a=t.indexOf(d);return a<0?[NaN,NaN]:[a>0?r[a-1]:e[0],a<r.length?r[a]:e[e.length-1]]},l.domain=function(d){if(!arguments.length)return e.slice();e=[];for(let a of d)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(zs),o()},l.range=function(d){return arguments.length?(t=Array.from(d),o()):t.slice()},l.unknown=function(d){return arguments.length?(i=d,l):i},l.quantiles=function(){return r.slice()},l.copy=function(){return E4().domain(e).range(t).unknown(i)},Bi.apply(l,arguments)}function A4(){var e=0,t=1,r=1,i=[.5],o=[0,1],l;function d(u){return u!=null&&u<=u?o[hc(i,u,0,r)]:l}function a(){var u=-1;for(i=new Array(r);++u<r;)i[u]=((u+1)*t-(u-r)*e)/(r+1);return d}return d.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,a()):[e,t]},d.range=function(u){return arguments.length?(r=(o=Array.from(u)).length-1,a()):o.slice()},d.invertExtent=function(u){var c=o.indexOf(u);return c<0?[NaN,NaN]:c<1?[e,i[0]]:c>=r?[i[r-1],t]:[i[c-1],i[c]]},d.unknown=function(u){return arguments.length&&(l=u),d},d.thresholds=function(){return i.slice()},d.copy=function(){return A4().domain([e,t]).range(o).unknown(l)},Bi.apply(Ys(d),arguments)}function D4(){var e=[.5],t=[0,1],r,i=1;function o(l){return l!=null&&l<=l?t[hc(e,l,0,i)]:r}return o.domain=function(l){return arguments.length?(e=Array.from(l),i=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(l){return arguments.length?(t=Array.from(l),i=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(l){var d=t.indexOf(l);return[e[d-1],e[d]]},o.unknown=function(l){return arguments.length?(r=l,o):r},o.copy=function(){return D4().domain(e).range(t).unknown(r)},Bi.apply(o,arguments)}const $m=new Date,Um=new Date;function lr(e,t,r,i){function o(l){return e(l=arguments.length===0?new Date:new Date(+l)),l}return o.floor=l=>(e(l=new Date(+l)),l),o.ceil=l=>(e(l=new Date(l-1)),t(l,1),e(l),l),o.round=l=>{const d=o(l),a=o.ceil(l);return l-d<a-l?d:a},o.offset=(l,d)=>(t(l=new Date(+l),d==null?1:Math.floor(d)),l),o.range=(l,d,a)=>{const u=[];if(l=o.ceil(l),a=a==null?1:Math.floor(a),!(l<d)||!(a>0))return u;let c;do u.push(c=new Date(+l)),t(l,a),e(l);while(c<l&&l<d);return u},o.filter=l=>lr(d=>{if(d>=d)for(;e(d),!l(d);)d.setTime(d-1)},(d,a)=>{if(d>=d)if(a<0)for(;++a<=0;)for(;t(d,-1),!l(d););else for(;--a>=0;)for(;t(d,1),!l(d););}),r&&(o.count=(l,d)=>($m.setTime(+l),Um.setTime(+d),e($m),e(Um),Math.floor(r($m,Um))),o.every=l=>(l=Math.floor(l),!isFinite(l)||!(l>0)?null:l>1?o.filter(i?d=>i(d)%l===0:d=>o.count(0,d)%l===0):o)),o}const Kf=lr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Kf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?lr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Kf);Kf.range;const Zn=1e3,Mi=Zn*60,Qn=Mi*60,ts=Qn*24,d1=ts*7,gw=ts*30,qm=ts*365,Ta=lr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Zn)},(e,t)=>(t-e)/Zn,e=>e.getUTCSeconds());Ta.range;const p1=lr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zn)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getMinutes());p1.range;const v1=lr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getUTCMinutes());v1.range;const m1=lr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zn-e.getMinutes()*Mi)},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getHours());m1.range;const g1=lr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qn)},(e,t)=>(t-e)/Qn,e=>e.getUTCHours());g1.range;const pc=lr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Mi)/ts,e=>e.getDate()-1);pc.range;const $d=lr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ts,e=>e.getUTCDate()-1);$d.range;const T4=lr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ts,e=>Math.floor(e/ts));T4.range;function $a(e){return lr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Mi)/d1)}const Ud=$a(0),Yf=$a(1),Bj=$a(2),Ij=$a(3),nl=$a(4),Nj=$a(5),jj=$a(6);Ud.range;Yf.range;Bj.range;Ij.range;nl.range;Nj.range;jj.range;function Ua(e){return lr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/d1)}const qd=Ua(0),Vf=Ua(1),Fj=Ua(2),zj=Ua(3),sl=Ua(4),Hj=Ua(5),$j=Ua(6);qd.range;Vf.range;Fj.range;zj.range;sl.range;Hj.range;$j.range;const _1=lr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());_1.range;const y1=lr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());y1.range;const rs=lr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());rs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:lr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});rs.range;const is=lr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());is.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:lr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});is.range;function M4(e,t,r,i,o,l){const d=[[Ta,1,Zn],[Ta,5,5*Zn],[Ta,15,15*Zn],[Ta,30,30*Zn],[l,1,Mi],[l,5,5*Mi],[l,15,15*Mi],[l,30,30*Mi],[o,1,Qn],[o,3,3*Qn],[o,6,6*Qn],[o,12,12*Qn],[i,1,ts],[i,2,2*ts],[r,1,d1],[t,1,gw],[t,3,3*gw],[e,1,qm]];function a(c,p,f){const g=p<c;g&&([c,p]=[p,c]);const b=f&&typeof f.range=="function"?f:u(c,p,f),S=b?b.range(c,+p+1):[];return g?S.reverse():S}function u(c,p,f){const g=Math.abs(p-c)/f,b=e1(([,,v])=>v).right(d,g);if(b===d.length)return e.every(Kg(c/qm,p/qm,f));if(b===0)return Kf.every(Math.max(Kg(c,p,f),1));const[S,m]=d[g/d[b-1][2]<d[b][2]/g?b-1:b];return S.every(m)}return[a,u]}const[Uj,qj]=M4(is,y1,qd,T4,g1,v1),[Wj,Gj]=M4(rs,_1,Ud,pc,m1,p1);function Wm(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Gm(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function wu(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Kj(e){var t=e.dateTime,r=e.date,i=e.time,o=e.periods,l=e.days,d=e.shortDays,a=e.months,u=e.shortMonths,c=Eu(o),p=Au(o),f=Eu(l),g=Au(l),b=Eu(d),S=Au(d),m=Eu(a),v=Au(a),y=Eu(u),x=Au(u),C={a:K,A:G,b:N,B:H,c:null,d:Cw,e:Cw,f:mF,g:AF,G:TF,H:dF,I:pF,j:vF,L:k4,m:gF,M:_F,p:z,q,Q:Aw,s:Dw,S:yF,u:bF,U:SF,V:xF,w:CF,W:wF,x:null,X:null,y:EF,Y:DF,Z:MF,"%":Ew},E={a:J,A:ie,b:pe,B:he,c:null,d:ww,e:ww,f:RF,g:UF,G:WF,H:kF,I:OF,j:LF,L:L4,m:PF,M:BF,p:Z,q:W,Q:Aw,s:Dw,S:IF,u:NF,U:jF,V:FF,w:zF,W:HF,x:null,X:null,y:$F,Y:qF,Z:GF,"%":Ew},D={a:L,A:P,b:R,B:I,c:$,d:Sw,e:Sw,f:uF,g:bw,G:yw,H:xw,I:xw,j:sF,L:lF,m:nF,M:aF,p:O,q:iF,Q:hF,s:fF,S:oF,u:Qj,U:Jj,V:eF,w:Zj,W:tF,x:V,X:U,y:bw,Y:yw,Z:rF,"%":cF};C.x=w(r,C),C.X=w(i,C),C.c=w(t,C),E.x=w(r,E),E.X=w(i,E),E.c=w(t,E);function w(te,Q){return function(se){var re=[],be=-1,ve=0,Se=te.length,Le,xe,Ke;for(se instanceof Date||(se=new Date(+se));++be<Se;)te.charCodeAt(be)===37&&(re.push(te.slice(ve,be)),(xe=_w[Le=te.charAt(++be)])!=null?Le=te.charAt(++be):xe=Le==="e"?" ":"0",(Ke=Q[Le])&&(Le=Ke(se,xe)),re.push(Le),ve=be+1);return re.push(te.slice(ve,be)),re.join("")}}function M(te,Q){return function(se){var re=wu(1900,void 0,1),be=T(re,te,se+="",0),ve,Se;if(be!=se.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(Q&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(ve=Gm(wu(re.y,0,1)),Se=ve.getUTCDay(),ve=Se>4||Se===0?Vf.ceil(ve):Vf(ve),ve=$d.offset(ve,(re.V-1)*7),re.y=ve.getUTCFullYear(),re.m=ve.getUTCMonth(),re.d=ve.getUTCDate()+(re.w+6)%7):(ve=Wm(wu(re.y,0,1)),Se=ve.getDay(),ve=Se>4||Se===0?Yf.ceil(ve):Yf(ve),ve=pc.offset(ve,(re.V-1)*7),re.y=ve.getFullYear(),re.m=ve.getMonth(),re.d=ve.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Se="Z"in re?Gm(wu(re.y,0,1)).getUTCDay():Wm(wu(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Se+5)%7:re.w+re.U*7-(Se+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,Gm(re)):Wm(re)}}function T(te,Q,se,re){for(var be=0,ve=Q.length,Se=se.length,Le,xe;be<ve;){if(re>=Se)return-1;if(Le=Q.charCodeAt(be++),Le===37){if(Le=Q.charAt(be++),xe=D[Le in _w?Q.charAt(be++):Le],!xe||(re=xe(te,se,re))<0)return-1}else if(Le!=se.charCodeAt(re++))return-1}return re}function O(te,Q,se){var re=c.exec(Q.slice(se));return re?(te.p=p.get(re[0].toLowerCase()),se+re[0].length):-1}function L(te,Q,se){var re=b.exec(Q.slice(se));return re?(te.w=S.get(re[0].toLowerCase()),se+re[0].length):-1}function P(te,Q,se){var re=f.exec(Q.slice(se));return re?(te.w=g.get(re[0].toLowerCase()),se+re[0].length):-1}function R(te,Q,se){var re=y.exec(Q.slice(se));return re?(te.m=x.get(re[0].toLowerCase()),se+re[0].length):-1}function I(te,Q,se){var re=m.exec(Q.slice(se));return re?(te.m=v.get(re[0].toLowerCase()),se+re[0].length):-1}function $(te,Q,se){return T(te,t,Q,se)}function V(te,Q,se){return T(te,r,Q,se)}function U(te,Q,se){return T(te,i,Q,se)}function K(te){return d[te.getDay()]}function G(te){return l[te.getDay()]}function N(te){return u[te.getMonth()]}function H(te){return a[te.getMonth()]}function z(te){return o[+(te.getHours()>=12)]}function q(te){return 1+~~(te.getMonth()/3)}function J(te){return d[te.getUTCDay()]}function ie(te){return l[te.getUTCDay()]}function pe(te){return u[te.getUTCMonth()]}function he(te){return a[te.getUTCMonth()]}function Z(te){return o[+(te.getUTCHours()>=12)]}function W(te){return 1+~~(te.getUTCMonth()/3)}return{format:function(te){var Q=w(te+="",C);return Q.toString=function(){return te},Q},parse:function(te){var Q=M(te+="",!1);return Q.toString=function(){return te},Q},utcFormat:function(te){var Q=w(te+="",E);return Q.toString=function(){return te},Q},utcParse:function(te){var Q=M(te+="",!0);return Q.toString=function(){return te},Q}}}var _w={"-":"",_:" ",0:"0"},_r=/^\s*\d+/,Yj=/^%/,Vj=/[\\^$*+?|[\]().{}]/g;function nt(e,t,r){var i=e<0?"-":"",o=(i?-e:e)+"",l=o.length;return i+(l<r?new Array(r-l+1).join(t)+o:o)}function Xj(e){return e.replace(Vj,"\\$&")}function Eu(e){return new RegExp("^(?:"+e.map(Xj).join("|")+")","i")}function Au(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Zj(e,t,r){var i=_r.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function Qj(e,t,r){var i=_r.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function Jj(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function eF(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function tF(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function yw(e,t,r){var i=_r.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function bw(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function rF(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function iF(e,t,r){var i=_r.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function nF(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function Sw(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function sF(e,t,r){var i=_r.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function xw(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function aF(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function oF(e,t,r){var i=_r.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function lF(e,t,r){var i=_r.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function uF(e,t,r){var i=_r.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function cF(e,t,r){var i=Yj.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function hF(e,t,r){var i=_r.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function fF(e,t,r){var i=_r.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function Cw(e,t){return nt(e.getDate(),t,2)}function dF(e,t){return nt(e.getHours(),t,2)}function pF(e,t){return nt(e.getHours()%12||12,t,2)}function vF(e,t){return nt(1+pc.count(rs(e),e),t,3)}function k4(e,t){return nt(e.getMilliseconds(),t,3)}function mF(e,t){return k4(e,t)+"000"}function gF(e,t){return nt(e.getMonth()+1,t,2)}function _F(e,t){return nt(e.getMinutes(),t,2)}function yF(e,t){return nt(e.getSeconds(),t,2)}function bF(e){var t=e.getDay();return t===0?7:t}function SF(e,t){return nt(Ud.count(rs(e)-1,e),t,2)}function O4(e){var t=e.getDay();return t>=4||t===0?nl(e):nl.ceil(e)}function xF(e,t){return e=O4(e),nt(nl.count(rs(e),e)+(rs(e).getDay()===4),t,2)}function CF(e){return e.getDay()}function wF(e,t){return nt(Yf.count(rs(e)-1,e),t,2)}function EF(e,t){return nt(e.getFullYear()%100,t,2)}function AF(e,t){return e=O4(e),nt(e.getFullYear()%100,t,2)}function DF(e,t){return nt(e.getFullYear()%1e4,t,4)}function TF(e,t){var r=e.getDay();return e=r>=4||r===0?nl(e):nl.ceil(e),nt(e.getFullYear()%1e4,t,4)}function MF(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+nt(t/60|0,"0",2)+nt(t%60,"0",2)}function ww(e,t){return nt(e.getUTCDate(),t,2)}function kF(e,t){return nt(e.getUTCHours(),t,2)}function OF(e,t){return nt(e.getUTCHours()%12||12,t,2)}function LF(e,t){return nt(1+$d.count(is(e),e),t,3)}function L4(e,t){return nt(e.getUTCMilliseconds(),t,3)}function RF(e,t){return L4(e,t)+"000"}function PF(e,t){return nt(e.getUTCMonth()+1,t,2)}function BF(e,t){return nt(e.getUTCMinutes(),t,2)}function IF(e,t){return nt(e.getUTCSeconds(),t,2)}function NF(e){var t=e.getUTCDay();return t===0?7:t}function jF(e,t){return nt(qd.count(is(e)-1,e),t,2)}function R4(e){var t=e.getUTCDay();return t>=4||t===0?sl(e):sl.ceil(e)}function FF(e,t){return e=R4(e),nt(sl.count(is(e),e)+(is(e).getUTCDay()===4),t,2)}function zF(e){return e.getUTCDay()}function HF(e,t){return nt(Vf.count(is(e)-1,e),t,2)}function $F(e,t){return nt(e.getUTCFullYear()%100,t,2)}function UF(e,t){return e=R4(e),nt(e.getUTCFullYear()%100,t,2)}function qF(e,t){return nt(e.getUTCFullYear()%1e4,t,4)}function WF(e,t){var r=e.getUTCDay();return e=r>=4||r===0?sl(e):sl.ceil(e),nt(e.getUTCFullYear()%1e4,t,4)}function GF(){return"+0000"}function Ew(){return"%"}function Aw(e){return+e}function Dw(e){return Math.floor(+e/1e3)}var Io,P4,B4;KF({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function KF(e){return Io=Kj(e),P4=Io.format,Io.parse,B4=Io.utcFormat,Io.utcParse,Io}function YF(e){return new Date(e)}function VF(e){return e instanceof Date?+e:+new Date(+e)}function b1(e,t,r,i,o,l,d,a,u,c){var p=a1(),f=p.invert,g=p.domain,b=c(".%L"),S=c(":%S"),m=c("%I:%M"),v=c("%I %p"),y=c("%a %d"),x=c("%b %d"),C=c("%B"),E=c("%Y");function D(w){return(u(w)<w?b:a(w)<w?S:d(w)<w?m:l(w)<w?v:i(w)<w?o(w)<w?y:x:r(w)<w?C:E)(w)}return p.invert=function(w){return new Date(f(w))},p.domain=function(w){return arguments.length?g(Array.from(w,VF)):g().map(YF)},p.ticks=function(w){var M=g();return e(M[0],M[M.length-1],w??10)},p.tickFormat=function(w,M){return M==null?D:c(M)},p.nice=function(w){var M=g();return(!w||typeof w.range!="function")&&(w=t(M[0],M[M.length-1],w??10)),w?g(S4(M,w)):p},p.copy=function(){return dc(p,b1(e,t,r,i,o,l,d,a,u,c))},p}function XF(){return Bi.apply(b1(Wj,Gj,rs,_1,Ud,pc,m1,p1,Ta,P4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ZF(){return Bi.apply(b1(Uj,qj,is,y1,qd,$d,g1,v1,Ta,B4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Wd(){var e=0,t=1,r,i,o,l,d=Fr,a=!1,u;function c(f){return f==null||isNaN(f=+f)?u:d(o===0?.5:(f=(l(f)-r)*o,a?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,r=l(e=+e),i=l(t=+t),o=r===i?0:1/(i-r),c):[e,t]},c.clamp=function(f){return arguments.length?(a=!!f,c):a},c.interpolator=function(f){return arguments.length?(d=f,c):d};function p(f){return function(g){var b,S;return arguments.length?([b,S]=g,d=f(b,S),c):[d(0),d(1)]}}return c.range=p(yl),c.rangeRound=p(s1),c.unknown=function(f){return arguments.length?(u=f,c):u},function(f){return l=f,r=f(e),i=f(t),o=r===i?0:1/(i-r),c}}function Vs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function I4(){var e=Ys(Wd()(Fr));return e.copy=function(){return Vs(e,I4())},as.apply(e,arguments)}function N4(){var e=u1(Wd()).domain([1,10]);return e.copy=function(){return Vs(e,N4()).base(e.base())},as.apply(e,arguments)}function j4(){var e=c1(Wd());return e.copy=function(){return Vs(e,j4()).constant(e.constant())},as.apply(e,arguments)}function S1(){var e=h1(Wd());return e.copy=function(){return Vs(e,S1()).exponent(e.exponent())},as.apply(e,arguments)}function QF(){return S1.apply(null,arguments).exponent(.5)}function F4(){var e=[],t=Fr;function r(i){if(i!=null&&!isNaN(i=+i))return t((hc(e,i,1)-1)/(e.length-1))}return r.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let o of i)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(zs),r},r.interpolator=function(i){return arguments.length?(t=i,r):t},r.range=function(){return e.map((i,o)=>t(o/(e.length-1)))},r.quantiles=function(i){return Array.from({length:i+1},(o,l)=>NN(e,l/i))},r.copy=function(){return F4(t).domain(e)},as.apply(r,arguments)}function Gd(){var e=0,t=.5,r=1,i=1,o,l,d,a,u,c=Fr,p,f=!1,g;function b(m){return isNaN(m=+m)?g:(m=.5+((m=+p(m))-l)*(i*m<i*l?a:u),c(f?Math.max(0,Math.min(1,m)):m))}b.domain=function(m){return arguments.length?([e,t,r]=m,o=p(e=+e),l=p(t=+t),d=p(r=+r),a=o===l?0:.5/(l-o),u=l===d?0:.5/(d-l),i=l<o?-1:1,b):[e,t,r]},b.clamp=function(m){return arguments.length?(f=!!m,b):f},b.interpolator=function(m){return arguments.length?(c=m,b):c};function S(m){return function(v){var y,x,C;return arguments.length?([y,x,C]=v,c=cj(m,[y,x,C]),b):[c(0),c(.5),c(1)]}}return b.range=S(yl),b.rangeRound=S(s1),b.unknown=function(m){return arguments.length?(g=m,b):g},function(m){return p=m,o=m(e),l=m(t),d=m(r),a=o===l?0:.5/(l-o),u=l===d?0:.5/(d-l),i=l<o?-1:1,b}}function z4(){var e=Ys(Gd()(Fr));return e.copy=function(){return Vs(e,z4())},as.apply(e,arguments)}function H4(){var e=u1(Gd()).domain([.1,1,10]);return e.copy=function(){return Vs(e,H4()).base(e.base())},as.apply(e,arguments)}function $4(){var e=c1(Gd());return e.copy=function(){return Vs(e,$4()).constant(e.constant())},as.apply(e,arguments)}function x1(){var e=h1(Gd());return e.copy=function(){return Vs(e,x1()).exponent(e.exponent())},as.apply(e,arguments)}function JF(){return x1.apply(null,arguments).exponent(.5)}const U4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:r1,scaleDiverging:z4,scaleDivergingLog:H4,scaleDivergingPow:x1,scaleDivergingSqrt:JF,scaleDivergingSymlog:$4,scaleIdentity:b4,scaleImplicit:Yg,scaleLinear:y4,scaleLog:x4,scaleOrdinal:t1,scalePoint:zN,scalePow:f1,scaleQuantile:E4,scaleQuantize:A4,scaleRadial:w4,scaleSequential:I4,scaleSequentialLog:N4,scaleSequentialPow:S1,scaleSequentialQuantile:F4,scaleSequentialSqrt:QF,scaleSequentialSymlog:j4,scaleSqrt:Rj,scaleSymlog:C4,scaleThreshold:D4,scaleTime:XF,scaleUtc:ZF,tickFormat:_4},Symbol.toStringTag,{value:"Module"}));function ez(e){var t=U4;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(nc(e));if(r in t&&typeof t[r]=="function")return t[r]()}function Tw(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var i=ez(e);if(i!=null)return i.domain(t).range(r),i}}function C1(e,t,r,i){if(!(r==null||i==null))return typeof e.scale=="function"?Tw(e.scale,r,i):Tw(t,r,i)}function tz(e){return"scale".concat(nc(e))}function rz(e){return tz(e)in U4}var q4=(e,t,r)=>{if(e!=null){var{scale:i,type:o}=e;if(i==="auto")return o==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":o==="category"?"band":"linear";if(typeof i=="string")return rz(i)?i:"point"}};function iz(e,t){for(var r=0,i=e.length,o=e[0]<e[e.length-1];r<i;){var l=Math.floor((r+i)/2);(o?e[l]<t:e[l]>t)?r=l+1:i=l}return r}function W4(e,t){if(e){var r=t??e.domain(),i=r.map(l=>{var d;return(d=e(l))!==null&&d!==void 0?d:0}),o=e.range();if(!(r.length===0||o.length<2))return l=>{var d,a,u=iz(i,l);if(u<=0)return r[0];if(u>=r.length)return r[r.length-1];var c=(d=i[u-1])!==null&&d!==void 0?d:0,p=(a=i[u])!==null&&a!==void 0?a:0;return Math.abs(l-c)<=Math.abs(l-p)?r[u-1]:r[u]}}}function nz(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):W4(e,void 0)}function Mw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Xf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(r),!0).forEach(function(i){sz(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function sz(e,t,r){return(t=az(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function az(e){var t=oz(e,"string");return typeof t=="symbol"?t:t+""}function oz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qg=[0,"auto"],nr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},G4=(e,t)=>e.cartesianAxis.xAxis[t],os=(e,t)=>{var r=G4(e,t);return r??nr},sr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Qg,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:oc},K4=(e,t)=>e.cartesianAxis.yAxis[t],ls=(e,t)=>{var r=K4(e,t);return r??sr},lz={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},w1=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??lz},$r=(e,t,r)=>{switch(t){case"xAxis":return os(e,r);case"yAxis":return ls(e,r);case"zAxis":return w1(e,r);case"angleAxis":return V_(e,r);case"radiusAxis":return X_(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},uz=(e,t,r)=>{switch(t){case"xAxis":return os(e,r);case"yAxis":return ls(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},vc=(e,t,r)=>{switch(t){case"xAxis":return os(e,r);case"yAxis":return ls(e,r);case"angleAxis":return V_(e,r);case"radiusAxis":return X_(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Y4=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function V4(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var E1=e=>e.graphicalItems.cartesianItems,cz=ue([mr,Nd],V4),X4=(e,t,r)=>e.filter(r).filter(i=>(t==null?void 0:t.includeHidden)===!0?!0:!i.hide),bl=ue([E1,$r,cz],X4,{memoizeOptions:{resultEqualityCheck:zd}}),Z4=ue([bl],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(jd)),Q4=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),hz=ue([bl],Q4),J4=e=>e.map(t=>t.data).filter(Boolean).flat(1),fz=ue([bl],e=>e.some(t=>!t.data)),eD=ue([bl],J4,{memoizeOptions:{resultEqualityCheck:zd}}),tD=(e,t)=>{var{chartData:r=[],dataStartIndex:i,dataEndIndex:o}=t;return e.length>0?e:r.slice(i,o+1)},A1=ue([eD,Ld],tD),dz=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(i=>({value:pr(i,t.dataKey)})):r.length>0?r.map(i=>i.dataKey).flatMap(i=>e.map(o=>({value:pr(o,i)}))):e.map(i=>({value:i})),rD=(e,t,r,i,o,l)=>{var{chartData:d=[],dataStartIndex:a,dataEndIndex:u}=i,c=dz(e,t,r);if(o&&(t==null?void 0:t.dataKey)!=null&&l.length>0){var p=d.slice(a,u+1),f=p.map(g=>({value:pr(g,t.dataKey)})).filter(g=>g.value!=null);return[...f,...c]}return c},mc=ue([A1,$r,bl,Ld,fz,eD],rD);function Qo(e){if(mn(e)||e instanceof Date){var t=Number(e);if(at(t))return t}}function kw(e){if(Array.isArray(e)){var t=[Qo(e[0]),Qo(e[1])];return fn(t)?t:void 0}var r=Qo(e);if(r!=null)return[r,r]}function _n(e){return e.map(Qo).filter(on)}function pz(e,t){var r=Qo(e),i=Qo(t);return r==null&&i==null?0:r==null?-1:i==null?1:r-i}var vz=ue([mc],e=>e==null?void 0:e.map(t=>t.value).sort(pz));function iD(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function mz(e,t,r){if(!r)return[];if(!r.length)return[];var i;if(typeof t=="number"&&!vn(t))i=t;else if(Array.isArray(t)){var o=_n(t);o.length>0&&(i=Math.max(...o))}return i==null?[]:_n(r.flatMap(l=>{var d=pr(e,l.dataKey),a,u;if(Array.isArray(d)?[a,u]=d:a=u=d,!(!at(a)||!at(u)))return[i-a,i+u]}))}var ur=e=>{var t=gr(e),r=_l(e);return vc(e,t,r)},al=ue([ur],e=>e==null?void 0:e.dataKey),gz=ue([Z4,Ld,ur],u4),nD=(e,t,r,i)=>{var o={},l=t.reduce((d,a)=>{if(a.stackId==null)return d;var u=d[a.stackId];return u==null&&(u=[]),u.push(a),d[a.stackId]=u,d},o);return Object.fromEntries(Object.entries(l).map(d=>{var[a,u]=d,c=i?[...u].reverse():u,p=c.map(Q_);return[a,{stackedData:fB(e,p,r),graphicalItems:c}]}))},Jg=ue([gz,Z4,Rd,r4],nD),sD=(e,t,r,i)=>{var{dataStartIndex:o,dataEndIndex:l}=t;if(i==null&&r!=="zAxis"){var d=gB(e,o,l);if(!(d!=null&&d[0]===0&&d[1]===0))return d}},_z=ue([$r],e=>e.allowDataOverflow),D1=e=>{var t;if(e==null||!("domain"in e))return Qg;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=_n(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Qg},aD=ue([$r],D1),oD=ue([aD,_z],U6),yz=ue([Jg,Wi,mr,oD],sD,{memoizeOptions:{resultEqualityCheck:Fd}}),T1=e=>e.errorBars,bz=(e,t,r)=>e.flatMap(i=>t[i.id]).filter(Boolean).filter(i=>iD(r,i)),Zf=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=r.filter(Boolean);if(o.length!==0){var l=o.flat(),d=Math.min(...l),a=Math.max(...l);return[d,a]}},lD=function(t,r,i,o,l){var d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],a,u;if(i.length>0&&i.forEach(c=>{var p,f=c.data!=null?[...c.data]:d,g=(p=o[c.id])===null||p===void 0?void 0:p.filter(b=>iD(l,b));f.forEach(b=>{var S,m=pr(b,(S=r.dataKey)!==null&&S!==void 0?S:c.dataKey),v=mz(b,m,g);if(v.length>=2){var y=Math.min(...v),x=Math.max(...v);(a==null||y<a)&&(a=y),(u==null||x>u)&&(u=x)}var C=kw(m);C!=null&&(a=a==null?C[0]:Math.min(a,C[0]),u=u==null?C[1]:Math.max(u,C[1]))})}),(r==null?void 0:r.dataKey)!=null&&i.length===0&&t.forEach(c=>{var p=kw(pr(c,r.dataKey));p!=null&&(a=a==null?p[0]:Math.min(a,p[0]),u=u==null?p[1]:Math.max(u,p[1]))}),at(a)&&at(u))return[a,u]},Sz=ue([A1,$r,hz,T1,mr,uN],lD,{memoizeOptions:{resultEqualityCheck:Fd}});function xz(e){var{value:t}=e;if(mn(t)||t instanceof Date)return t}var Cz=(e,t,r)=>{var i=e.map(xz).filter(o=>o!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&wA(i))?$6(0,e.length):t.allowDuplicatedCategory?i:Array.from(new Set(i))},uD=e=>e.referenceElements.dots,Sl=(e,t,r)=>e.filter(i=>i.ifOverflow==="extendDomain").filter(i=>t==="xAxis"?i.xAxisId===r:i.yAxisId===r),wz=ue([uD,mr,Nd],Sl),cD=e=>e.referenceElements.areas,Ez=ue([cD,mr,Nd],Sl),hD=e=>e.referenceElements.lines,Az=ue([hD,mr,Nd],Sl),fD=(e,t)=>{if(e!=null){var r=_n(e.map(i=>t==="xAxis"?i.x:i.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Dz=ue(wz,mr,fD),dD=(e,t)=>{if(e!=null){var r=_n(e.flatMap(i=>[t==="xAxis"?i.x1:i.y1,t==="xAxis"?i.x2:i.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Tz=ue([Ez,mr],dD);function Mz(e){var t;if(e.x!=null)return _n([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(i=>i.x);return r==null||r.length===0?[]:_n(r)}function kz(e){var t;if(e.y!=null)return _n([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(i=>i.y);return r==null||r.length===0?[]:_n(r)}var pD=(e,t)=>{if(e!=null){var r=e.flatMap(i=>t==="xAxis"?Mz(i):kz(i));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},Oz=ue([Az,mr],pD),Lz=ue(Dz,Oz,Tz,(e,t,r)=>Zf(e,r,t)),vD=(e,t,r,i,o,l,d,a)=>{if(r!=null)return r;var u=d==="vertical"&&a==="xAxis"||d==="horizontal"&&a==="yAxis",c=u?Zf(i,l,o):Zf(l,o);return hN(t,c,e.allowDataOverflow)},Rz=ue([$r,aD,oD,yz,Sz,Lz,gt,mr],vD,{memoizeOptions:{resultEqualityCheck:Fd}}),Pz=[0,1],mD=(e,t,r,i,o,l,d)=>{if(!((e==null||r==null||r.length===0)&&d===void 0)){var{dataKey:a,type:u}=e,c=Ks(t,l);if(c&&a==null){var p;return $6(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return u==="category"?Cz(i,e,c):o==="expand"&&!c?Pz:d}},M1=ue([$r,gt,A1,mc,Rd,mr,Rz],mD),xl=ue([$r,Y4,G_],q4),gD=(e,t,r)=>{var{niceTicks:i}=t;if(i!=="none"){var o=D1(t),l=Array.isArray(o)&&(o[0]==="auto"||o[1]==="auto");if((i==="snap125"||i==="adaptive")&&t!=null&&t.tickCount&&fn(e)){if(l)return z5(e,t.tickCount,t.allowDecimals,i);if(t.type==="number")return H5(e,t.tickCount,t.allowDecimals,i)}if(i==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(l&&fn(e))return z5(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&fn(e))return H5(e,t.tickCount,t.allowDecimals,"adaptive")}}},k1=ue([M1,vc,xl],gD),_D=(e,t,r,i)=>{if(i!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&fn(t)&&Array.isArray(r)&&r.length>0){var o,l,d=t[0],a=(o=r[0])!==null&&o!==void 0?o:0,u=t[1],c=(l=r[r.length-1])!==null&&l!==void 0?l:0;return[Math.min(d,a),Math.max(u,c)]}return t},Bz=ue([$r,M1,k1,mr],_D),Iz=ue(mc,$r,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,i=Array.from(_n(e.map(f=>f.value))).sort((f,g)=>f-g),o=i[0],l=i[i.length-1];if(o==null||l==null)return 1/0;var d=l-o;if(d===0)return 1/0;for(var a=0;a<i.length-1;a++){var u=i[a],c=i[a+1];if(!(u==null||c==null)){var p=c-u;r=Math.min(r,p)}}return r/d}}),yD=ue(Iz,gt,t4,vr,(e,t,r,i,o)=>o,(e,t,r,i,o)=>{if(!at(e))return 0;var l=t==="vertical"?i.height:i.width;if(o==="gap")return e*l/2;if(o==="no-gap"){var d=$i(r,e*l),a=e*l/2;return a-d-(a-d)/l*d}return 0}),Nz=(e,t,r)=>{var i=os(e,t);return i==null||typeof i.padding!="string"?0:yD(e,"xAxis",t,r,i.padding)},jz=(e,t,r)=>{var i=ls(e,t);return i==null||typeof i.padding!="string"?0:yD(e,"yAxis",t,r,i.padding)},Fz=ue(os,Nz,(e,t)=>{var r,i;if(e==null)return{left:0,right:0};var{padding:o}=e;return typeof o=="string"?{left:t,right:t}:{left:((r=o.left)!==null&&r!==void 0?r:0)+t,right:((i=o.right)!==null&&i!==void 0?i:0)+t}}),zz=ue(ls,jz,(e,t)=>{var r,i;if(e==null)return{top:0,bottom:0};var{padding:o}=e;return typeof o=="string"?{top:t,bottom:t}:{top:((r=o.top)!==null&&r!==void 0?r:0)+t,bottom:((i=o.bottom)!==null&&i!==void 0?i:0)+t}}),Hz=ue([vr,Fz,Ad,Ed,(e,t,r)=>r],(e,t,r,i,o)=>{var{padding:l}=i;return o?[l.left,r.width-l.right]:[e.left+t.left,e.left+e.width-t.right]}),$z=ue([vr,gt,zz,Ad,Ed,(e,t,r)=>r],(e,t,r,i,o,l)=>{var{padding:d}=o;return l?[i.height-d.bottom,d.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),gc=(e,t,r,i)=>{var o;switch(t){case"xAxis":return Hz(e,r,i);case"yAxis":return $z(e,r,i);case"zAxis":return(o=w1(e,r))===null||o===void 0?void 0:o.range;case"angleAxis":return a4(e);case"radiusAxis":return o4(e,r);default:return}},bD=ue([$r,gc],Pd),Uz=ue([xl,Bz],EN),O1=ue([$r,xl,Uz,bD],C1),SD=(e,t,r,i)=>{if(!(r==null||r.dataKey==null)){var{type:o,scale:l}=r,d=Ks(e,i);if(d&&(o==="number"||l!=="auto"))return t.map(a=>a.value)}},L1=ue([gt,mc,vc,mr],SD),Kd=ue([O1],J_);ue([O1],nz);ue([O1,vz],W4);ue([bl,T1,mr],bz);function xD(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Yd=(e,t)=>t,Vd=(e,t,r)=>r,qz=ue(Cd,Yd,Vd,(e,t,r)=>e.filter(i=>i.orientation===t).filter(i=>i.mirror===r).sort(xD)),Wz=ue(wd,Yd,Vd,(e,t,r)=>e.filter(i=>i.orientation===t).filter(i=>i.mirror===r).sort(xD)),CD=(e,t)=>({width:e.width,height:t.height}),Gz=(e,t)=>{var r=typeof t.width=="number"?t.width:oc;return{width:r,height:e.height}},wD=ue(vr,os,CD),Kz=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},Yz=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},Vz=ue(ss,vr,qz,Yd,Vd,(e,t,r,i,o)=>{var l={},d;return r.forEach(a=>{var u=CD(t,a);d==null&&(d=Kz(t,i,e));var c=i==="top"&&!o||i==="bottom"&&o;l[a.id]=d-Number(c)*u.height,d+=(c?-1:1)*u.height}),l}),Xz=ue(ns,vr,Wz,Yd,Vd,(e,t,r,i,o)=>{var l={},d;return r.forEach(a=>{var u=Gz(t,a);d==null&&(d=Yz(t,i,e));var c=i==="left"&&!o||i==="right"&&o;l[a.id]=d-Number(c)*u.width,d+=(c?-1:1)*u.width}),l}),Zz=(e,t)=>{var r=os(e,t);if(r!=null)return Vz(e,r.orientation,r.mirror)},Qz=ue([vr,os,Zz,(e,t)=>t],(e,t,r,i)=>{if(t!=null){var o=r==null?void 0:r[i];return o==null?{x:e.left,y:0}:{x:e.left,y:o}}}),Jz=(e,t)=>{var r=ls(e,t);if(r!=null)return Xz(e,r.orientation,r.mirror)},eH=ue([vr,ls,Jz,(e,t)=>t],(e,t,r,i)=>{if(t!=null){var o=r==null?void 0:r[i];return o==null?{x:0,y:e.top}:{x:o,y:e.top}}}),ED=ue(vr,ls,(e,t)=>{var r=typeof t.width=="number"?t.width:oc;return{width:r,height:e.height}}),Ow=(e,t,r)=>{switch(t){case"xAxis":return wD(e,r).width;case"yAxis":return ED(e,r).height;default:return}},AD=(e,t,r,i)=>{if(r!=null){var{allowDuplicatedCategory:o,type:l,dataKey:d}=r,a=Ks(e,i),u=t.map(p=>p.value),c=u.filter(p=>p!=null);if(d&&a&&l==="category"&&o&&wA(c))return u}},R1=ue([gt,mc,$r,mr],AD);ue([gt,uz,xl,Kd,R1,L1,gc,k1,mr],(e,t,r,i,o,l,d,a,u)=>{if(t!=null){var c=Ks(e,u);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:u,categoricalDomain:l,duplicateDomain:o,isCategorical:c,niceTicks:a,range:d,realScaleType:r,scale:i}}});var tH=(e,t,r,i,o,l,d,a,u)=>{if(!(t==null||i==null)){var c=Ks(e,u),{type:p,ticks:f,tickCount:g}=t,b=r==="scaleBand"&&typeof i.bandwidth=="function"?i.bandwidth()/2:2,S=p==="category"&&i.bandwidth?i.bandwidth()/b:0;S=u==="angleAxis"&&l!=null&&l.length>=2?ui(l[0]-l[1])*2*S:S;var m=f||o;return m?m.map((v,y)=>{var x=d?d.indexOf(v):v,C=i.map(x);return at(C)?{index:y,coordinate:C+S,value:v,offset:S}:null}).filter(on):c&&a?a.map((v,y)=>{var x=i.map(v);return at(x)?{coordinate:x+S,value:v,index:y,offset:S}:null}).filter(on):i.ticks?i.ticks(g).map((v,y)=>{var x=i.map(v);return at(x)?{coordinate:x+S,value:v,index:y,offset:S}:null}).filter(on):i.domain().map((v,y)=>{var x=i.map(v);return at(x)?{coordinate:x+S,value:d?d[v]:v,index:y,offset:S}:null}).filter(on)}},DD=ue([gt,vc,xl,Kd,k1,gc,R1,L1,mr],tH),rH=(e,t,r,i,o,l,d)=>{if(!(t==null||r==null||i==null||i[0]===i[1])){var a=Ks(e,d),{tickCount:u}=t,c=0;return c=d==="angleAxis"&&(i==null?void 0:i.length)>=2?ui(i[0]-i[1])*2*c:c,a&&l?l.map((p,f)=>{var g=r.map(p);return at(g)?{coordinate:g+c,value:p,index:f,offset:c}:null}).filter(on):r.ticks?r.ticks(u).map((p,f)=>{var g=r.map(p);return at(g)?{coordinate:g+c,value:p,index:f,offset:c}:null}).filter(on):r.domain().map((p,f)=>{var g=r.map(p);return at(g)?{coordinate:g+c,value:o?o[p]:p,index:f,offset:c}:null}).filter(on)}},ol=ue([gt,vc,Kd,gc,R1,L1,mr],rH),ll=ue($r,Kd,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})}),iH=ue([$r,xl,M1,bD],C1),nH=ue([iH],J_);ue((e,t,r)=>w1(e,r),nH,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})});var sH=ue([gt,Cd,wd],(e,t,r)=>{switch(e){case"horizontal":return t.some(i=>i.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(i=>i.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),aH=(e,t,r)=>{var i;return(i=e.renderedTicks[t])===null||i===void 0?void 0:i[r]};ue([aH],e=>{if(!(!e||e.length===0))return t=>{var r,i=1/0,o=e[0];for(var l of e){var d=Math.abs(l.coordinate-t);d<i&&(i=d,o=l)}return(r=o)===null||r===void 0?void 0:r.value}});var TD=e=>e.options.defaultTooltipEventType,MD=e=>e.options.validateTooltipEventTypes;function kD(e,t,r){if(e==null)return t;var i=e?"axis":"item";return r==null?t:r.includes(i)?i:t}function _c(e,t){var r=TD(e),i=MD(e);return kD(t,r,i)}function oH(e){return Ne(t=>_c(t,e))}var OD=(e,t)=>{var r,i=Number(t);if(!(vn(i)||t==null))return i>=0?e==null||(r=e[i])===null||r===void 0?void 0:r.value:void 0},lH=e=>e.tooltip.settings,Ns={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},uH={itemInteraction:{click:Ns,hover:Ns},axisInteraction:{click:Ns,hover:Ns},keyboardInteraction:Ns,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},LD=Pr({name:"tooltip",initialState:uH,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Et()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:i}=t.payload,o=Ti(e).tooltipItemPayloads.indexOf(r);o>-1&&(e.tooltipItemPayloads[o]=i)},prepare:Et()},removeTooltipEntrySettings:{reducer(e,t){var r=Ti(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Et()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:cH,replaceTooltipEntrySettings:hH,removeTooltipEntrySettings:fH,setTooltipSettingsState:dH,setActiveMouseOverItemIndex:RD,mouseLeaveItem:pH,mouseLeaveChart:PD,setActiveClickItemIndex:vH,setMouseOverAxisIndex:BD,setMouseClickAxisIndex:mH,setSyncInteraction:Lu,setKeyboardInteraction:Qf}=LD.actions,gH=LD.reducer;function Lw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Vh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lw(Object(r),!0).forEach(function(i){_H(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function _H(e,t,r){return(t=yH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yH(e){var t=bH(e,"string");return typeof t=="symbol"?t:t+""}function bH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SH(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function xH(e){return e.index!=null}var ID=(e,t,r,i)=>{if(t==null)return Ns;var o=SH(e,t,r);if(o==null)return Ns;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var l=e.settings.active===!0;if(xH(o)){if(l)return Vh(Vh({},o),{},{active:!0})}else if(i!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:i,graphicalItemId:void 0};return Vh(Vh({},Ns),{},{coordinate:o.coordinate})};function CH(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function wH(e,t){var r=CH(e),i=t[0],o=t[1];if(r===void 0)return!1;var l=Math.min(i,o),d=Math.max(i,o);return r>=l&&r<=d}function EH(e,t,r){if(r==null||t==null)return!0;var i=pr(e,t);return i==null||!fn(r)?!0:wH(i,r)}var Bu=(e,t,r,i)=>{var o=e==null?void 0:e.index;if(o==null)return null;var l=Number(o);if(!at(l))return o;var d=0,a=1/0;t.length>0&&(a=t.length-1);var u=Math.max(d,Math.min(l,a)),c=t[u];return c==null||EH(c,r,i)?String(u):null},ND=(e,t,r,i,o,l,d)=>{if(l!=null){var a=d[0],u=a==null?void 0:a.getPosition(l);if(u!=null)return u;var c=o==null?void 0:o[Number(l)];if(c)switch(r){case"horizontal":return{x:c.coordinate,y:(i.top+t)/2};default:return{x:(i.left+e)/2,y:c.coordinate}}}},jD=(e,t,r,i)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var o;if(r==="hover"?o=e.itemInteraction.hover.graphicalItemId:o=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&o==null)return e.tooltipItemPayloads;if(o==null&&(i!=null||e.keyboardInteraction.active)){var l=e.tooltipItemPayloads[0];return l!=null?[l]:[]}return e.tooltipItemPayloads.filter(d=>{var a;return((a=d.settings)===null||a===void 0?void 0:a.graphicalItemId)===o})},FD=e=>e.options.tooltipPayloadSearcher,Cl=e=>e.tooltip;function Rw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Pw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rw(Object(r),!0).forEach(function(i){AH(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function AH(e,t,r){return(t=DH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DH(e){var t=TH(e,"string");return typeof t=="symbol"?t:t+""}function TH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MH(e){if(typeof e=="string"||typeof e=="number")return e}function kH(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function OH(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function Bw(e){if(typeof e=="string")return e}function LH(e){if(!(e==null||typeof e!="object")){var t="name"in e?MH(e.name):void 0,r="unit"in e?kH(e.unit):void 0,i="dataKey"in e?OH(e.dataKey):void 0,o="payload"in e?e.payload:void 0,l="color"in e?Bw(e.color):void 0,d="fill"in e?Bw(e.fill):void 0;return{name:t,unit:r,dataKey:i,payload:o,color:l,fill:d}}}function RH(e,t){return e??t}var zD=(e,t,r,i,o,l,d)=>{if(!(t==null||l==null)){var{chartData:a,computedData:u,dataStartIndex:c,dataEndIndex:p}=r,f=[];return e.reduce((g,b)=>{var S,{dataDefinedOnItem:m,settings:v}=b,y=RH(m,a),x=Array.isArray(y)?m6(y,c,p):y,C=(S=v==null?void 0:v.dataKey)!==null&&S!==void 0?S:i,E=v==null?void 0:v.nameKey,D;if(i&&Array.isArray(x)&&!Array.isArray(x[0])&&d==="axis"?D=GR(x,i,o):D=l(x,t,u,E),Array.isArray(D))D.forEach(M=>{var T,O,L=LH(M),P=L==null?void 0:L.name,R=L==null?void 0:L.dataKey,I=L==null?void 0:L.payload,$=Pw(Pw({},v),{},{name:P,unit:L==null?void 0:L.unit,color:(T=L==null?void 0:L.color)!==null&&T!==void 0?T:v==null?void 0:v.color,fill:(O=L==null?void 0:L.fill)!==null&&O!==void 0?O:v==null?void 0:v.fill});g.push(MC({tooltipEntrySettings:$,dataKey:R,payload:I,value:pr(I,R),name:P==null?void 0:String(P)}))});else{var w;g.push(MC({tooltipEntrySettings:v,dataKey:C,payload:D,value:pr(D,C),name:(w=pr(D,E))!==null&&w!==void 0?w:v==null?void 0:v.name}))}return g},f)}},P1=ue([ur,Y4,G_],q4),PH=ue([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),BH=ue([gr,_l],V4),qa=ue([PH,ur,BH],X4,{memoizeOptions:{resultEqualityCheck:zd}}),IH=ue([qa],e=>e.filter(jd)),HD=ue([qa],J4,{memoizeOptions:{resultEqualityCheck:zd}}),NH=ue([qa],e=>e.some(t=>!t.data)),za=ue([HD,Wi],tD),jH=ue([IH,Wi,ur],u4),B1=ue([za,ur,qa,Wi,NH,HD],rD),$D=ue([ur],D1),FH=ue([ur],e=>e.allowDataOverflow),UD=ue([$D,FH],U6),zH=ue([qa],e=>e.filter(jd)),HH=ue([jH,zH,Rd,r4],nD),$H=ue([HH,Wi,gr,UD],sD),UH=ue([qa],Q4),qH=ue([za,ur,UH,T1,gr,cN],lD,{memoizeOptions:{resultEqualityCheck:Fd}}),WH=ue([uD,gr,_l],Sl),GH=ue([WH,gr],fD),KH=ue([cD,gr,_l],Sl),YH=ue([KH,gr],dD),VH=ue([hD,gr,_l],Sl),XH=ue([VH,gr],pD),ZH=ue([GH,XH,YH],Zf),QH=ue([ur,$D,UD,$H,qH,ZH,gt,gr],vD),ul=ue([ur,gt,za,B1,Rd,gr,QH],mD),JH=ue([ul,ur,P1],gD),e$=ue([ur,ul,JH,gr],_D),qD=e=>{var t=gr(e),r=_l(e),i=!1;return gc(e,t,r,i)},WD=ue([ur,qD],Pd),t$=ue([ur,P1,e$,WD],C1),GD=ue([t$],J_),r$=ue([gt,B1,ur,gr],AD),i$=ue([gt,B1,ur,gr],SD),n$=(e,t,r,i,o,l,d,a)=>{if(t){var{type:u}=t,c=Ks(e,a);if(i){var p=r==="scaleBand"&&i.bandwidth?i.bandwidth()/2:2,f=u==="category"&&i.bandwidth?i.bandwidth()/p:0;return f=a==="angleAxis"&&o!=null&&(o==null?void 0:o.length)>=2?ui(o[0]-o[1])*2*f:f,c&&d?d.map((g,b)=>{var S=i.map(g);return at(S)?{coordinate:S+f,value:g,index:b,offset:f}:null}).filter(on):i.domain().map((g,b)=>{var S=i.map(g);return at(S)?{coordinate:S+f,value:l?l[g]:g,index:b,offset:f}:null}).filter(on)}}},us=ue([gt,ur,P1,GD,qD,r$,i$,gr],n$),I1=ue([TD,MD,lH],(e,t,r)=>kD(r.shared,e,t)),KD=e=>e.tooltip.settings.trigger,N1=e=>e.tooltip.settings.defaultIndex,yc=ue([Cl,I1,KD,N1],ID),cl=ue([yc,za,al,ul],Bu),YD=ue([us,cl],OD),VD=ue([yc],e=>{if(e)return e.dataKey}),s$=ue([yc],e=>{if(e)return e.graphicalItemId}),XD=ue([Cl,I1,KD,N1],jD),a$=ue([ns,ss,gt,vr,us,N1,XD],ND),o$=ue([yc,a$],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),l$=ue([yc],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),u$=ue([XD,cl,Wi,al,YD,FD,I1],zD);ue([u$],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function Iw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Nw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Iw(Object(r),!0).forEach(function(i){c$(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function c$(e,t,r){return(t=h$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h$(e){var t=f$(e,"string");return typeof t=="symbol"?t:t+""}function f$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var d$=()=>Ne(ur),p$=()=>{var e=d$(),t=Ne(us),r=Ne(GD);return Mf(!e||!r?void 0:Nw(Nw({},e),{},{scale:r}),t)};function jw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function No(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jw(Object(r),!0).forEach(function(i){v$(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function v$(e,t,r){return(t=m$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m$(e){var t=g$(e,"string");return typeof t=="symbol"?t:t+""}function g$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _$=(e,t,r,i)=>{var o=t.find(l=>l&&l.index===r);if(o){if(e==="horizontal")return{x:o.coordinate,y:i.relativeY};if(e==="vertical")return{x:i.relativeX,y:o.coordinate}}return{x:0,y:0}},y$=(e,t,r,i)=>{var o=t.find(c=>c&&c.index===r);if(o){if(e==="centric"){var l=o.coordinate,{radius:d}=i;return No(No(No({},i),Tr(i.cx,i.cy,d,l)),{},{angle:l,radius:d})}var a=o.coordinate,{angle:u}=i;return No(No(No({},i),Tr(i.cx,i.cy,a,u)),{},{angle:u,radius:a})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function b$(e,t){var{relativeX:r,relativeY:i}=e;return r>=t.left&&r<=t.left+t.width&&i>=t.top&&i<=t.top+t.height}var ZD=(e,t,r,i,o)=>{var l,d=(l=t==null?void 0:t.length)!==null&&l!==void 0?l:0;if(d<=1||e==null)return 0;if(i==="angleAxis"&&o!=null&&Math.abs(Math.abs(o[1]-o[0])-360)<=1e-6)for(var a=0;a<d;a++){var u,c,p,f,g,b=a>0?(u=r[a-1])===null||u===void 0?void 0:u.coordinate:(c=r[d-1])===null||c===void 0?void 0:c.coordinate,S=(p=r[a])===null||p===void 0?void 0:p.coordinate,m=a>=d-1?(f=r[0])===null||f===void 0?void 0:f.coordinate:(g=r[a+1])===null||g===void 0?void 0:g.coordinate,v=void 0;if(!(b==null||S==null||m==null))if(ui(S-b)!==ui(m-S)){var y=[];if(ui(m-S)===ui(o[1]-o[0])){v=m;var x=S+o[1]-o[0];y[0]=Math.min(x,(x+b)/2),y[1]=Math.max(x,(x+b)/2)}else{v=b;var C=m+o[1]-o[0];y[0]=Math.min(S,(C+S)/2),y[1]=Math.max(S,(C+S)/2)}var E=[Math.min(S,(v+S)/2),Math.max(S,(v+S)/2)];if(e>E[0]&&e<=E[1]||e>=y[0]&&e<=y[1]){var D;return(D=r[a])===null||D===void 0?void 0:D.index}}else{var w=Math.min(b,m),M=Math.max(b,m);if(e>(w+S)/2&&e<=(M+S)/2){var T;return(T=r[a])===null||T===void 0?void 0:T.index}}}else if(t)for(var O=0;O<d;O++){var L=t[O];if(L!=null){var P=t[O+1],R=t[O-1];if(O===0&&P!=null&&e<=(L.coordinate+P.coordinate)/2||O===d-1&&R!=null&&e>(L.coordinate+R.coordinate)/2||O>0&&O<d-1&&R!=null&&P!=null&&e>(L.coordinate+R.coordinate)/2&&e<=(L.coordinate+P.coordinate)/2)return L.index}}return-1},S$=()=>Ne(G_),j1=(e,t)=>t,QD=(e,t,r)=>r,F1=(e,t,r,i)=>i,x$=ue(us,e=>dd(e,t=>t.coordinate)),z1=ue([Cl,j1,QD,F1],ID),H1=ue([z1,za,al,ul],Bu),C$=(e,t,r)=>{if(t!=null){var i=Cl(e);return t==="axis"?r==="hover"?i.axisInteraction.hover.dataKey:i.axisInteraction.click.dataKey:r==="hover"?i.itemInteraction.hover.dataKey:i.itemInteraction.click.dataKey}},JD=ue([Cl,j1,QD,F1],jD),Jf=ue([ns,ss,gt,vr,us,F1,JD],ND),w$=ue([z1,Jf],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),eT=ue([us,H1],OD),E$=ue([JD,H1,Wi,al,eT,FD,j1],zD),A$=ue([z1,H1],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),D$=(e,t,r,i,o,l,d)=>{if(!(!e||!r||!i||!o)&&b$(e,d)){var a=_B(e,t),u=ZD(a,l,o,r,i),c=_$(t,o,u,e);return{activeIndex:String(u),activeCoordinate:c}}},T$=(e,t,r,i,o,l,d)=>{if(!(!e||!i||!o||!l||!r)){var a=QI(e,r);if(a){var u=yB(a,t),c=ZD(u,d,l,i,o),p=y$(t,l,c,a);return{activeIndex:String(c),activeCoordinate:p}}}},M$=(e,t,r,i,o,l,d,a)=>{if(!(!e||!t||!i||!o||!l))return t==="horizontal"||t==="vertical"?D$(e,t,i,o,l,d,a):T$(e,t,r,i,o,l,d)},k$=ue(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var i=e[t];if(i!=null)return r?i.panoramaElement:i.element}}),O$=ue(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(i=>parseInt(i,10)).concat(Object.values(Zr)),r=Array.from(new Set(t));return r.sort((i,o)=>i-o)},{memoizeOptions:{resultEqualityCheck:wN}});function Fw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function zw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fw(Object(r),!0).forEach(function(i){L$(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function L$(e,t,r){return(t=R$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R$(e){var t=P$(e,"string");return typeof t=="symbol"?t:t+""}function P$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var B$={},I$={zIndexMap:Object.values(Zr).reduce((e,t)=>zw(zw({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),B$)},N$=new Set(Object.values(Zr));function j$(e){return N$.has(e)}var tT=Pr({name:"zIndex",initialState:I$,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Et()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!j$(r)&&delete e.zIndexMap[r])},prepare:Et()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:i,isPanorama:o}=t.payload;e.zIndexMap[r]?o?e.zIndexMap[r].panoramaElement=i:e.zIndexMap[r].element=i:e.zIndexMap[r]={consumers:0,element:o?void 0:i,panoramaElement:o?i:void 0}},prepare:Et()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:Et()}}}),{registerZIndexPortal:F$,unregisterZIndexPortal:Km,registerZIndexPortalElement:z$,unregisterZIndexPortalElement:H$}=tT.actions,$$=tT.reducer;function Xs(e){var{zIndex:t,children:r}=e,i=t9(),o=i&&t!==void 0&&t!==0,l=vi(),d=j.useRef(void 0),a=j.useRef(new Set),u=Bt(),c=Ne(f=>k$(f,t,l));if(j.useLayoutEffect(()=>{if(!o){var f=a.current;f.forEach(b=>{u(Km({zIndex:b}))}),f.clear(),d.current=void 0;return}if(a.current.has(t)||(u(F$({zIndex:t})),a.current.add(t)),c){d.current=c;var g=a.current;g.forEach(b=>{b!==t&&(u(Km({zIndex:b})),g.delete(b))})}},[u,t,o,c]),j.useLayoutEffect(()=>{var f=a.current;return()=>{f.forEach(g=>{u(Km({zIndex:g}))}),f.clear()}},[u]),!o)return r;var p=c??d.current;return p?aA.createPortal(r,p):null}function e_(){return e_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},e_.apply(null,arguments)}function Hw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Xh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(r),!0).forEach(function(i){U$(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function U$(e,t,r){return(t=q$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q$(e){var t=W$(e,"string");return typeof t=="symbol"?t:t+""}function W$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G$(e){var{cursor:t,cursorComp:r,cursorProps:i}=e;return j.isValidElement(t)?j.cloneElement(t,i):j.createElement(r,i)}function K$(e){var t,{coordinate:r,payload:i,index:o,offset:l,tooltipAxisBandSize:d,layout:a,cursor:u,tooltipEventType:c,chartName:p}=e,f=r,g=i,b=o;if(!u||!f||p!=="ScatterChart"&&c!=="axis")return null;var S,m,v;if(p==="ScatterChart")S=f,m=fI,v=Zr.cursorLine;else if(p==="BarChart")S=dI(a,f,l,d),m=j6,v=Zr.cursorRectangle;else if(a==="radial"&&DA(f)){var{cx:y,cy:x,radius:C,startAngle:E,endAngle:D}=F6(f);S={cx:y,cy:x,startAngle:E,endAngle:D,innerRadius:C,outerRadius:C},m=H6,v=Zr.cursorLine}else S={points:rN(a,f,l)},m=R6,v=Zr.cursorLine;var w=typeof u=="object"&&"className"in u?u.className:void 0,M=Xh(Xh(Xh(Xh({stroke:"#ccc",pointerEvents:"none"},l),S),y_(u)),{},{payload:g,payloadIndex:b,className:Dt("recharts-tooltip-cursor",w)});return j.createElement(Xs,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:v},j.createElement(G$,{cursor:u,cursorComp:m,cursorProps:M}))}function Y$(e){var t=p$(),r=QB(),i=vl(),o=S$();return t==null||r==null||i==null||o==null?null:j.createElement(K$,e_({},e,{offset:r,layout:i,tooltipAxisBandSize:t,chartName:o}))}var rT=j.createContext(null),V$=()=>j.useContext(rT),Ym={exports:{}},$w;function X$(){return $w||($w=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function o(u,c,p){this.fn=u,this.context=c,this.once=p||!1}function l(u,c,p,f,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var b=new o(p,f||u,g),S=r?r+c:c;return u._events[S]?u._events[S].fn?u._events[S]=[u._events[S],b]:u._events[S].push(b):(u._events[S]=b,u._eventsCount++),u}function d(u,c){--u._eventsCount===0?u._events=new i:delete u._events[c]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],p,f;if(this._eventsCount===0)return c;for(f in p=this._events)t.call(p,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},a.prototype.listeners=function(c){var p=r?r+c:c,f=this._events[p];if(!f)return[];if(f.fn)return[f.fn];for(var g=0,b=f.length,S=new Array(b);g<b;g++)S[g]=f[g].fn;return S},a.prototype.listenerCount=function(c){var p=r?r+c:c,f=this._events[p];return f?f.fn?1:f.length:0},a.prototype.emit=function(c,p,f,g,b,S){var m=r?r+c:c;if(!this._events[m])return!1;var v=this._events[m],y=arguments.length,x,C;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,p),!0;case 3:return v.fn.call(v.context,p,f),!0;case 4:return v.fn.call(v.context,p,f,g),!0;case 5:return v.fn.call(v.context,p,f,g,b),!0;case 6:return v.fn.call(v.context,p,f,g,b,S),!0}for(C=1,x=new Array(y-1);C<y;C++)x[C-1]=arguments[C];v.fn.apply(v.context,x)}else{var E=v.length,D;for(C=0;C<E;C++)switch(v[C].once&&this.removeListener(c,v[C].fn,void 0,!0),y){case 1:v[C].fn.call(v[C].context);break;case 2:v[C].fn.call(v[C].context,p);break;case 3:v[C].fn.call(v[C].context,p,f);break;case 4:v[C].fn.call(v[C].context,p,f,g);break;default:if(!x)for(D=1,x=new Array(y-1);D<y;D++)x[D-1]=arguments[D];v[C].fn.apply(v[C].context,x)}}return!0},a.prototype.on=function(c,p,f){return l(this,c,p,f,!1)},a.prototype.once=function(c,p,f){return l(this,c,p,f,!0)},a.prototype.removeListener=function(c,p,f,g){var b=r?r+c:c;if(!this._events[b])return this;if(!p)return d(this,b),this;var S=this._events[b];if(S.fn)S.fn===p&&(!g||S.once)&&(!f||S.context===f)&&d(this,b);else{for(var m=0,v=[],y=S.length;m<y;m++)(S[m].fn!==p||g&&!S[m].once||f&&S[m].context!==f)&&v.push(S[m]);v.length?this._events[b]=v.length===1?v[0]:v:d(this,b)}return this},a.prototype.removeAllListeners=function(c){var p;return c?(p=r?r+c:c,this._events[p]&&d(this,p)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a})(Ym)),Ym.exports}var Z$=X$();const Q$=Gs(Z$);var Xu=new Q$,t_="recharts.syncEvent.tooltip",Uw="recharts.syncEvent.brush",J$=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!vn(r))return e[r]}},eU={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},iT=Pr({name:"options",initialState:eU,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),tU=iT.reducer,{createEventEmitter:rU}=iT.actions;function iU(e){return e.tooltip.syncInteraction}var nU={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},nT=Pr({name:"chartData",initialState:nU,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:i}=t.payload;r!=null&&(e.dataStartIndex=r),i!=null&&(e.dataEndIndex=i)}}}),{setChartData:qw,setDataStartEndIndexes:sU,setComputedData:nJ}=nT.actions,aU=nT.reducer,oU=["x","y"];function Ww(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ww(Object(r),!0).forEach(function(i){lU(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ww(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function lU(e,t,r){return(t=uU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uU(e){var t=cU(e,"string");return typeof t=="symbol"?t:t+""}function cU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hU(e,t){if(e==null)return{};var r,i,o=fU(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function fU(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function dU(){var e=Ne(K_),t=Ne(Y_),r=Bt(),i=Ne(i4),o=Ne(us),l=vl(),d=Dd(),a=Ne(u=>u.rootProps.className);j.useEffect(()=>{if(e==null)return pl;var u=(c,p,f)=>{if(t!==f&&e===c){if(p.payload.active===!1){r(Lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(i==="index"){var g;if(d&&p!==null&&p!==void 0&&(g=p.payload)!==null&&g!==void 0&&g.coordinate&&p.payload.sourceViewBox){var b=p.payload.coordinate,{x:S,y:m}=b,v=hU(b,oU),{x:y,y:x,width:C,height:E}=p.payload.sourceViewBox,D=jo(jo({},v),{},{x:d.x+(C?(S-y)/C:0)*d.width,y:d.y+(E?(m-x)/E:0)*d.height});r(jo(jo({},p),{},{payload:jo(jo({},p.payload),{},{coordinate:D})}))}else r(p);return}if(o!=null){var w;if(typeof i=="function"){var M={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},T=i(o,M);w=o[T]}else i==="value"&&(w=o.find(U=>String(U.value)===p.payload.label));var{coordinate:O}=p.payload;if(O==null||d==null){r(Lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(w==null){r(Lu({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:L,y:P}=O,R=Math.min(L,d.x+d.width),I=Math.min(P,d.y+d.height),$={x:l==="horizontal"?w.coordinate:R,y:l==="horizontal"?I:w.coordinate},V=Lu({active:p.payload.active,coordinate:$,dataKey:p.payload.dataKey,index:String(w.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(V)}}};return Xu.on(t_,u),()=>{Xu.off(t_,u)}},[a,r,t,e,i,o,l,d])}function pU(){var e=Ne(K_),t=Ne(Y_),r=Bt();j.useEffect(()=>{if(e==null)return pl;var i=(o,l,d)=>{t!==d&&e===o&&r(sU(l))};return Xu.on(Uw,i),()=>{Xu.off(Uw,i)}},[r,t,e])}function vU(){var e=Bt();j.useEffect(()=>{e(rU())},[e]),dU(),pU()}function mU(e,t,r,i,o,l){var d=Ne(S=>C$(S,e,t)),a=Ne(s$),u=Ne(Y_),c=Ne(K_),p=Ne(i4),f=Ne(iU),g=(f==null?void 0:f.sourceViewBox)!=null,b=Dd();j.useEffect(()=>{if(!g&&c!=null&&u!=null){var S=Lu({active:l,coordinate:r,dataKey:d,index:o,label:typeof i=="number"?String(i):i,sourceViewBox:b,graphicalItemId:a});Xu.emit(t_,c,S,u)}},[g,r,d,a,o,i,u,c,p,l,b])}function Gw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Kw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gw(Object(r),!0).forEach(function(i){gU(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function gU(e,t,r){return(t=_U(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _U(e){var t=yU(e,"string");return typeof t=="symbol"?t:t+""}function yU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bU(e){return e.dataKey}function SU(e,t){return j.isValidElement(e)?j.cloneElement(e,t):typeof e=="function"?j.createElement(e,t):j.createElement(H9,t)}var Yw=[],xU={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function CU(e){var t,r,i=Pi(e,xU),{active:o,allowEscapeViewBox:l,animationDuration:d,animationEasing:a,content:u,filterNull:c,isAnimationActive:p,offset:f,payloadUniqBy:g,position:b,reverseDirection:S,useTranslate3d:m,wrapperStyle:v,cursor:y,shared:x,trigger:C,defaultIndex:E,portal:D,axisId:w}=i,M=Bt(),T=typeof E=="number"?String(E):E;j.useEffect(()=>{M(dH({shared:x,trigger:C,axisId:w,active:o,defaultIndex:T}))},[M,x,C,w,o,T]);var O=Dd(),L=L6(),P=oH(x),{activeIndex:R,isActive:I}=(t=Ne(W=>A$(W,P,C,T)))!==null&&t!==void 0?t:{},$=Ne(W=>E$(W,P,C,T)),V=Ne(W=>eT(W,P,C,T)),U=Ne(W=>w$(W,P,C,T)),K=$,G=V$(),N=(r=o??I)!==null&&r!==void 0?r:!1,[H,z]=iP([K,N]),q=P==="axis"?V:void 0;mU(P,C,U,q,R,N);var J=D??G;if(J==null||O==null||P==null)return null;var ie=K??Yw;N||(ie=Yw),c&&ie.length&&(ie=M7(ie.filter(W=>W.value!=null&&(W.hide!==!0||i.includeHidden)),g,bU));var pe=ie.length>0,he=Kw(Kw({},i),{},{payload:ie,label:q,active:N,activeIndex:R,coordinate:U,accessibilityLayer:L}),Z=j.createElement(Q9,{allowEscapeViewBox:l,animationDuration:d,animationEasing:a,isAnimationActive:p,active:N,coordinate:U,hasPayload:pe,offset:f,position:b,reverseDirection:S,useTranslate3d:m,viewBox:O,wrapperStyle:v,lastBoundingBox:H,innerRef:z,hasPortalFromProps:!!D},SU(u,he));return j.createElement(j.Fragment,null,aA.createPortal(Z,J),N&&j.createElement(Y$,{cursor:y,tooltipEventType:P,coordinate:U,payload:ie,index:R}))}var $1=e=>null;$1.displayName="Cell";function wU(e,t,r){return(t=EU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EU(e){var t=AU(e,"string");return typeof t=="symbol"?t:t+""}function AU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class DU{constructor(t){wU(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var i=this.cache.keys().next().value;i!=null&&this.cache.delete(i)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function Vw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function TU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vw(Object(r),!0).forEach(function(i){MU(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vw(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function MU(e,t,r){return(t=kU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kU(e){var t=OU(e,"string");return typeof t=="symbol"?t:t+""}function OU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LU={cacheSize:2e3,enableCache:!0},sT=TU({},LU),Xw=new DU(sT.cacheSize),RU={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Zw="recharts_measurement_span";function PU(e,t){var r=t.fontSize||"",i=t.fontFamily||"",o=t.fontWeight||"",l=t.fontStyle||"",d=t.letterSpacing||"",a=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(l,"|").concat(d,"|").concat(a)}var Qw=(e,t)=>{try{var r=document.getElementById(Zw);r||(r=document.createElement("span"),r.setAttribute("id",Zw),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,RU,t),r.textContent="".concat(e);var i=r.getBoundingClientRect();return{width:i.width,height:i.height}}catch{return{width:0,height:0}}},Iu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||cc.isSsr)return{width:0,height:0};if(!sT.enableCache)return Qw(t,r);var i=PU(t,r),o=Xw.get(i);if(o)return o;var l=Qw(t,r);return Xw.set(i,l),l},aT;function BU(e,t,r){return(t=IU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IU(e){var t=NU(e,"string");return typeof t=="symbol"?t:t+""}function NU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jw=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,e3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,jU=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,FU=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,zU={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},HU=["cm","mm","pt","pc","in","Q","px"];function $U(e){return HU.includes(e)}var Ko="NaN";function UU(e,t){return e*zU[t]}class Ar{static parse(t){var r,[,i,o]=(r=FU.exec(t))!==null&&r!==void 0?r:[];return i==null?Ar.NaN:new Ar(parseFloat(i),o??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,vn(t)&&(this.unit=""),r!==""&&!jU.test(r)&&(this.num=NaN,this.unit=""),$U(r)&&(this.num=UU(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Ar(NaN,""):new Ar(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Ar(NaN,""):new Ar(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ar(NaN,""):new Ar(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ar(NaN,""):new Ar(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return vn(this.num)}}aT=Ar;BU(Ar,"NaN",new aT(NaN,""));function oT(e){if(e==null||e.includes(Ko))return Ko;for(var t=e;t.includes("*")||t.includes("/");){var r,[,i,o,l]=(r=Jw.exec(t))!==null&&r!==void 0?r:[],d=Ar.parse(i??""),a=Ar.parse(l??""),u=o==="*"?d.multiply(a):d.divide(a);if(u.isNaN())return Ko;t=t.replace(Jw,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,p,f,g]=(c=e3.exec(t))!==null&&c!==void 0?c:[],b=Ar.parse(p??""),S=Ar.parse(g??""),m=f==="+"?b.add(S):b.subtract(S);if(m.isNaN())return Ko;t=t.replace(e3,m.toString())}return t}var t3=/\(([^()]*)\)/;function qU(e){for(var t=e,r;(r=t3.exec(t))!=null;){var[,i]=r;t=t.replace(t3,oT(i))}return t}function WU(e){var t=e.replace(/\s+/g,"");return t=qU(t),t=oT(t),t}function GU(e){try{return WU(e)}catch{return Ko}}function Vm(e){var t=GU(e.slice(5,-1));return t===Ko?"":t}var KU=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],YU=["dx","dy","angle","className","breakAll"];function r_(){return r_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},r_.apply(null,arguments)}function r3(e,t){if(e==null)return{};var r,i,o=VU(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function VU(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var lT=/[ \f\n\r\t\v\u2028\u2029]+/,uT=e=>{var{children:t,breakAll:r,style:i}=e;try{var o=[];or(t)||(r?o=t.toString().split(""):o=t.toString().split(lT));var l=o.map(a=>({word:a,width:Iu(a,i).width})),d=r?0:Iu(" ",i).width;return{wordsWithComputedWidth:l,spaceWidth:d}}catch{return null}};function cT(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function XU(e){return or(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var hT=(e,t,r,i)=>e.reduce((o,l)=>{var{word:d,width:a}=l,u=o[o.length-1];if(u&&a!=null&&(t==null||i||u.width+a+r<Number(t)))u.words.push(d),u.width+=a+r;else{var c={words:[d],width:a};o.push(c)}return o},[]),fT=e=>e.reduce((t,r)=>t.width>r.width?t:r),ZU="…",i3=(e,t,r,i,o,l,d,a)=>{var u=e.slice(0,t),c=uT({breakAll:r,style:i,children:u+ZU});if(!c)return[!1,[]];var p=hT(c.wordsWithComputedWidth,l,d,a),f=p.length>o||fT(p).width>Number(l);return[f,p]},QU=(e,t,r,i,o)=>{var{maxLines:l,children:d,style:a,breakAll:u}=e,c=Ie(l),p=String(d),f=hT(t,i,r,o);if(!c||o)return f;var g=f.length>l||fT(f).width>Number(i);if(!g)return f;for(var b=0,S=p.length-1,m=0,v;b<=S&&m<=p.length-1;){var y=Math.floor((b+S)/2),x=y-1,[C,E]=i3(p,x,u,a,l,i,r,o),[D]=i3(p,y,u,a,l,i,r,o);if(!C&&!D&&(b=y+1),C&&D&&(S=y-1),!C&&D){v=E;break}m++}return v||f},n3=e=>{var t=or(e)?[]:e.toString().split(lT);return[{words:t,width:void 0}]},JU=e=>{var{width:t,scaleToFit:r,children:i,style:o,breakAll:l,maxLines:d}=e;if((t||r)&&!cc.isSsr){var a,u,c=uT({breakAll:l,children:i,style:o});if(c){var{wordsWithComputedWidth:p,spaceWidth:f}=c;a=p,u=f}else return n3(i);return QU({breakAll:l,children:i,maxLines:d,style:o},a,u,t,!!r)}return n3(i)},dT="#808080",eq={angle:0,breakAll:!1,capHeight:"0.71em",fill:dT,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},U1=j.forwardRef((e,t)=>{var r=Pi(e,eq),{x:i,y:o,lineHeight:l,capHeight:d,fill:a,scaleToFit:u,textAnchor:c,verticalAnchor:p}=r,f=r3(r,KU),g=j.useMemo(()=>JU({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:u,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,u,f.style,f.width]),{dx:b,dy:S,angle:m,className:v,breakAll:y}=f,x=r3(f,YU);if(!mn(i)||!mn(o)||g.length===0)return null;var C=Number(i)+(Ie(b)?b:0),E=Number(o)+(Ie(S)?S:0);if(!at(C)||!at(E))return null;var D;switch(p){case"start":D=Vm("calc(".concat(d,")"));break;case"middle":D=Vm("calc(".concat((g.length-1)/2," * -").concat(l," + (").concat(d," / 2))"));break;default:D=Vm("calc(".concat(g.length-1," * -").concat(l,")"));break}var w=[],M=g[0];if(u&&M!=null){var T=M.width,{width:O}=f;w.push("scale(".concat(Ie(O)&&Ie(T)?O/T:1,")"))}return m&&w.push("rotate(".concat(m,", ").concat(C,", ").concat(E,")")),w.length&&(x.transform=w.join(" ")),j.createElement("text",r_({},ki(x),{ref:t,x:C,y:E,className:Dt("recharts-text",v),textAnchor:c,fill:a.includes("url")?dT:a}),g.map((L,P)=>{var R=L.words.join(y?"":" ");return j.createElement("tspan",{x:C,dy:P===0?D:l,key:"".concat(R,"-").concat(P)},R)}))});U1.displayName="Text";function s3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function nn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s3(Object(r),!0).forEach(function(i){tq(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function tq(e,t,r){return(t=rq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rq(e){var t=iq(e,"string");return typeof t=="symbol"?t:t+""}function iq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nq=e=>{var{viewBox:t,position:r,offset:i=0,parentViewBox:o}=e,{x:l,y:d,height:a,upperWidth:u,lowerWidth:c}=N_(t),p=l,f=l+(u-c)/2,g=(p+f)/2,b=(u+c)/2,S=p+u/2,m=a>=0?1:-1,v=m*i,y=m>0?"end":"start",x=m>0?"start":"end",C=u>=0?1:-1,E=C*i,D=C>0?"end":"start",w=C>0?"start":"end",M=o;if(r==="top"){var T={x:p+u/2,y:d-v,horizontalAnchor:"middle",verticalAnchor:y};return M&&(T.height=Math.max(d-M.y,0),T.width=u),T}if(r==="bottom"){var O={x:f+c/2,y:d+a+v,horizontalAnchor:"middle",verticalAnchor:x};return M&&(O.height=Math.max(M.y+M.height-(d+a),0),O.width=c),O}if(r==="left"){var L={x:g-E,y:d+a/2,horizontalAnchor:D,verticalAnchor:"middle"};return M&&(L.width=Math.max(L.x-M.x,0),L.height=a),L}if(r==="right"){var P={x:g+b+E,y:d+a/2,horizontalAnchor:w,verticalAnchor:"middle"};return M&&(P.width=Math.max(M.x+M.width-P.x,0),P.height=a),P}var R=M?{width:b,height:a}:{};return r==="insideLeft"?nn({x:g+E,y:d+a/2,horizontalAnchor:w,verticalAnchor:"middle"},R):r==="insideRight"?nn({x:g+b-E,y:d+a/2,horizontalAnchor:D,verticalAnchor:"middle"},R):r==="insideTop"?nn({x:p+u/2,y:d+v,horizontalAnchor:"middle",verticalAnchor:x},R):r==="insideBottom"?nn({x:f+c/2,y:d+a-v,horizontalAnchor:"middle",verticalAnchor:y},R):r==="insideTopLeft"?nn({x:p+E,y:d+v,horizontalAnchor:w,verticalAnchor:x},R):r==="insideTopRight"?nn({x:p+u-E,y:d+v,horizontalAnchor:D,verticalAnchor:x},R):r==="insideBottomLeft"?nn({x:f+E,y:d+a-v,horizontalAnchor:w,verticalAnchor:y},R):r==="insideBottomRight"?nn({x:f+c-E,y:d+a-v,horizontalAnchor:D,verticalAnchor:y},R):r&&typeof r=="object"&&(Ie(r.x)||Ba(r.x))&&(Ie(r.y)||Ba(r.y))?nn({x:l+$i(r.x,b),y:d+$i(r.y,a),horizontalAnchor:"end",verticalAnchor:"end"},R):nn({x:S,y:d+a/2,horizontalAnchor:"middle",verticalAnchor:"middle"},R)},sq=["labelRef"],aq=["content"];function a3(e,t){if(e==null)return{};var r,i,o=oq(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function oq(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function o3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o3(Object(r),!0).forEach(function(i){lq(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function lq(e,t,r){return(t=uq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uq(e){var t=cq(e,"string");return typeof t=="symbol"?t:t+""}function cq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Yn.apply(null,arguments)}var pT=j.createContext(null),hq=e=>{var{x:t,y:r,upperWidth:i,lowerWidth:o,width:l,height:d,children:a}=e,u=j.useMemo(()=>({x:t,y:r,upperWidth:i,lowerWidth:o,width:l,height:d}),[t,r,i,o,l,d]);return j.createElement(pT.Provider,{value:u},a)},vT=()=>{var e=j.useContext(pT),t=Dd();return e||(t?N_(t):void 0)},fq=j.createContext(null),dq=()=>{var e=j.useContext(fq),t=Ne(l4);return e||t},pq=e=>{var{value:t,formatter:r}=e,i=or(e.children)?t:e.children;return typeof r=="function"?r(i):i},q1=e=>e!=null&&typeof e=="function",vq=(e,t)=>{var r=ui(t-e),i=Math.min(Math.abs(t-e),360);return r*i},mq=(e,t,r,i,o)=>{var{offset:l,className:d}=e,{cx:a,cy:u,innerRadius:c,outerRadius:p,startAngle:f,endAngle:g,clockWise:b}=o,S=(c+p)/2,m=vq(f,g),v=m>=0?1:-1,y,x;switch(t){case"insideStart":y=f+v*l,x=b;break;case"insideEnd":y=g-v*l,x=!b;break;case"end":y=g+v*l,x=b;break;default:throw new Error("Unsupported position ".concat(t))}x=m<=0?x:!x;var C=Tr(a,u,S,y),E=Tr(a,u,S,y+(x?1:-1)*359),D="M".concat(C.x,",").concat(C.y,`
|
|
189
|
+
A`).concat(S,",").concat(S,",0,1,").concat(x?0:1,`,
|
|
190
|
+
`).concat(E.x,",").concat(E.y),w=or(e.id)?Nu("recharts-radial-line-"):e.id;return j.createElement("text",Yn({},i,{dominantBaseline:"central",className:Dt("recharts-radial-bar-label",d)}),j.createElement("defs",null,j.createElement("path",{id:w,d:D})),j.createElement("textPath",{xlinkHref:"#".concat(w)},r))},gq=(e,t,r)=>{var{cx:i,cy:o,innerRadius:l,outerRadius:d,startAngle:a,endAngle:u}=e,c=(a+u)/2;if(r==="outside"){var{x:p,y:f}=Tr(i,o,d+t,c);return{x:p,y:f,textAnchor:p>=i?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:i,y:o,textAnchor:"middle",verticalAnchor:"end"};var g=(l+d)/2,{x:b,y:S}=Tr(i,o,g,c);return{x:b,y:S,textAnchor:"middle",verticalAnchor:"middle"}},uf=e=>e!=null&&"cx"in e&&Ie(e.cx),_q={angle:0,offset:5,zIndex:Zr.label,position:"middle",textBreakAll:!1};function yq(e){if(!uf(e))return e;var{cx:t,cy:r,outerRadius:i}=e,o=i*2;return{x:t-i,y:r-i,width:o,upperWidth:o,lowerWidth:o,height:o}}function Bs(e){var t=Pi(e,_q),{viewBox:r,parentViewBox:i,position:o,value:l,children:d,content:a,className:u="",textBreakAll:c,labelRef:p}=t,f=dq(),g=vT(),b=o==="center"?g:f??g,S,m,v;r==null?S=b:uf(r)?S=r:S=N_(r);var y=yq(S);if(!S||or(l)&&or(d)&&!j.isValidElement(a)&&typeof a!="function")return null;var x=Ru(Ru({},t),{},{viewBox:S});if(j.isValidElement(a)){var{labelRef:C}=x,E=a3(x,sq);return j.cloneElement(a,E)}if(typeof a=="function"){var{content:D}=x,w=a3(x,aq);if(m=j.createElement(a,w),j.isValidElement(m))return m}else m=pq(t);var M=ki(t);if(uf(S)){if(o==="insideStart"||o==="insideEnd"||o==="end")return mq(t,o,m,M,S);v=gq(S,t.offset,t.position)}else{if(!y)return null;var T=nq({viewBox:y,position:o,offset:t.offset,parentViewBox:uf(i)?void 0:i});v=Ru(Ru({x:T.x,y:T.y,textAnchor:T.horizontalAnchor,verticalAnchor:T.verticalAnchor},T.width!==void 0?{width:T.width}:{}),T.height!==void 0?{height:T.height}:{})}return j.createElement(Xs,{zIndex:t.zIndex},j.createElement(U1,Yn({ref:p,className:Dt("recharts-label",u)},M,v,{textAnchor:cT(M.textAnchor)?M.textAnchor:v.textAnchor,breakAll:c}),m))}Bs.displayName="Label";var bq=(e,t,r)=>{if(!e)return null;var i={viewBox:t,labelRef:r};return e===!0?j.createElement(Bs,Yn({key:"label-implicit"},i)):mn(e)?j.createElement(Bs,Yn({key:"label-implicit",value:e},i)):j.isValidElement(e)?e.type===Bs?j.cloneElement(e,Ru({key:"label-implicit"},i)):j.createElement(Bs,Yn({key:"label-implicit",content:e},i)):q1(e)?j.createElement(Bs,Yn({key:"label-implicit",content:e},i)):e&&typeof e=="object"?j.createElement(Bs,Yn({},e,{key:"label-implicit"},i)):null};function Sq(e){var{label:t,labelRef:r}=e,i=vT();return bq(t,i,r)||null}var xq=["valueAccessor"],Cq=["dataKey","clockWise","id","textBreakAll","zIndex"];function ed(){return ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},ed.apply(null,arguments)}function l3(e,t){if(e==null)return{};var r,i,o=wq(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function wq(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var Eq=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(XU(t))return t},mT=j.createContext(void 0),Aq=mT.Provider,gT=j.createContext(void 0);gT.Provider;function Dq(){return j.useContext(mT)}function Tq(){return j.useContext(gT)}function cf(e){var{valueAccessor:t=Eq}=e,r=l3(e,xq),{dataKey:i,clockWise:o,id:l,textBreakAll:d,zIndex:a}=r,u=l3(r,Cq),c=Dq(),p=Tq(),f=c||p;return!f||!f.length?null:j.createElement(Xs,{zIndex:a??Zr.label},j.createElement(pn,{className:"recharts-label-list"},f.map((g,b)=>{var S,m=or(i)?t(g,b):pr(g.payload,i),v=or(l)?{}:{id:"".concat(l,"-").concat(b)};return j.createElement(Bs,ed({key:"label-".concat(b)},ki(g),u,v,{fill:(S=r.fill)!==null&&S!==void 0?S:g.fill,parentViewBox:g.parentViewBox,value:m,textBreakAll:d,viewBox:g.viewBox,index:b,zIndex:0}))})))}cf.displayName="LabelList";function Mq(e){var{label:t}=e;return t?t===!0?j.createElement(cf,{key:"labelList-implicit"}):j.isValidElement(t)||q1(t)?j.createElement(cf,{key:"labelList-implicit",content:t}):typeof t=="object"?j.createElement(cf,ed({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var kq={radiusAxis:{},angleAxis:{}},_T=Pr({name:"polarAxis",initialState:kq,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:sJ,removeRadiusAxis:aJ,addAngleAxis:oJ,removeAngleAxis:lJ}=_T.actions,Oq=_T.reducer;function Lq(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var Xm={exports:{}},pt={};/**
|
|
191
|
+
* @license React
|
|
192
|
+
* react-is.production.js
|
|
193
|
+
*
|
|
194
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the MIT license found in the
|
|
197
|
+
* LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/var u3;function Rq(){if(u3)return pt;u3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),d=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function S(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case e:switch(m=m.type,m){case r:case o:case i:case u:case c:case g:return m;default:switch(m=m&&m.$$typeof,m){case d:case a:case f:case p:return m;case l:return m;default:return v}}case t:return v}}}return pt.ContextConsumer=l,pt.ContextProvider=d,pt.Element=e,pt.ForwardRef=a,pt.Fragment=r,pt.Lazy=f,pt.Memo=p,pt.Portal=t,pt.Profiler=o,pt.StrictMode=i,pt.Suspense=u,pt.SuspenseList=c,pt.isContextConsumer=function(m){return S(m)===l},pt.isContextProvider=function(m){return S(m)===d},pt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},pt.isForwardRef=function(m){return S(m)===a},pt.isFragment=function(m){return S(m)===r},pt.isLazy=function(m){return S(m)===f},pt.isMemo=function(m){return S(m)===p},pt.isPortal=function(m){return S(m)===t},pt.isProfiler=function(m){return S(m)===o},pt.isStrictMode=function(m){return S(m)===i},pt.isSuspense=function(m){return S(m)===u},pt.isSuspenseList=function(m){return S(m)===c},pt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===o||m===i||m===u||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===p||m.$$typeof===d||m.$$typeof===l||m.$$typeof===a||m.$$typeof===b||m.getModuleId!==void 0)},pt.typeOf=S,pt}var c3;function Pq(){return c3||(c3=1,Xm.exports=Rq()),Xm.exports}var Bq=Pq(),h3=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",f3=null,Zm=null,yT=e=>{if(e===f3&&Array.isArray(Zm))return Zm;var t=[];return j.Children.forEach(e,r=>{or(r)||(Bq.isFragment(r)?t=t.concat(yT(r.props.children)):t.push(r))}),Zm=t,f3=e,t};function Iq(e,t){var r=[],i=[];return Array.isArray(t)?i=t.map(o=>h3(o)):i=[h3(t)],yT(e).forEach(o=>{var l=el(o,"type.displayName")||el(o,"type.name");l&&i.indexOf(l)!==-1&&r.push(o)}),r}var Qm={},d3;function Nq(){return d3||(d3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var o;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const l=r[Symbol.toStringTag];return l==null||!((o=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&o.writable)?!1:r.toString()===`[object ${l}]`}let i=r;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(r)===i}e.isPlainObject=t})(Qm)),Qm}var Jm,p3;function jq(){return p3||(p3=1,Jm=Nq().isPlainObject),Jm}var Fq=jq();const zq=Gs(Fq);var v3,m3,g3,_3,y3;function b3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function S3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b3(Object(r),!0).forEach(function(i){Hq(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Hq(e,t,r){return(t=$q(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $q(e){var t=Uq(e,"string");return typeof t=="symbol"?t:t+""}function Uq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function td(){return td=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},td.apply(null,arguments)}function Du(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var x3=(e,t,r,i,o)=>{var l=r-i,d;return d=Ut(v3||(v3=Du(["M ",",",""])),e,t),d+=Ut(m3||(m3=Du(["L ",",",""])),e+r,t),d+=Ut(g3||(g3=Du(["L ",",",""])),e+r-l/2,t+o),d+=Ut(_3||(_3=Du(["L ",",",""])),e+r-l/2-i,t+o),d+=Ut(y3||(y3=Du(["L ",","," Z"])),e,t),d},qq={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Wq=e=>{var t=Pi(e,qq),{x:r,y:i,upperWidth:o,lowerWidth:l,height:d,className:a}=t,{animationEasing:u,animationDuration:c,animationBegin:p,isUpdateAnimationActive:f}=t,g=j.useRef(null),[b,S]=j.useState(-1),m=j.useRef(o),v=j.useRef(l),y=j.useRef(d),x=j.useRef(r),C=j.useRef(i),E=H_(e,"trapezoid-");if(j.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var $=g.current.getTotalLength();$&&S($)}catch{}},[]),r!==+r||i!==+i||o!==+o||l!==+l||d!==+d||o===0&&l===0||d===0)return null;var D=Dt("recharts-trapezoid",a);if(!f)return j.createElement("g",null,j.createElement("path",td({},ki(t),{className:D,d:x3(r,i,o,l,d)})));var w=m.current,M=v.current,T=y.current,O=x.current,L=C.current,P="0px ".concat(b===-1?1:b,"px"),R="".concat(b,"px ").concat(b,"px"),I=P6(["strokeDasharray"],c,u);return j.createElement(z_,{animationId:E,key:E,canBegin:b>0,duration:c,easing:u,isActive:f,begin:p},$=>{var V=Dr(w,o,$),U=Dr(M,l,$),K=Dr(T,d,$),G=Dr(O,r,$),N=Dr(L,i,$);g.current&&(m.current=V,v.current=U,y.current=K,x.current=G,C.current=N);var H=$>0?{transition:I,strokeDasharray:R}:{strokeDasharray:P};return j.createElement("path",td({},ki(t),{className:D,d:x3(G,N,V,U,K),ref:g,style:S3(S3({},H),t.style)}))})},Gq=["option","shapeType","activeClassName","inActiveClassName"];function Kq(e,t){if(e==null)return{};var r,i,o=Yq(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Yq(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function C3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function rd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C3(Object(r),!0).forEach(function(i){Vq(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Vq(e,t,r){return(t=Xq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xq(e){var t=Zq(e,"string");return typeof t=="symbol"?t:t+""}function Zq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qq(e,t){return rd(rd({},t),e)}function Jq(e,t){return e==="symbols"}function w3(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return j.createElement(j6,r);case"trapezoid":return j.createElement(Wq,r);case"sector":return j.createElement(H6,r);case"symbols":if(Jq(t))return j.createElement(AA,r);break;case"curve":return j.createElement(R6,r);default:return null}}function eW(e){return j.isValidElement(e)?e.props:e}function tW(e){var{option:t,shapeType:r,activeClassName:i="recharts-active-shape",inActiveClassName:o="recharts-shape"}=e,l=Kq(e,Gq),d;if(j.isValidElement(t))d=j.cloneElement(t,rd(rd({},l),eW(t)));else if(typeof t=="function")d=t(l,l.index);else if(zq(t)&&typeof t!="boolean"){var a=Qq(t,l);d=j.createElement(w3,{shapeType:r,elementProps:a})}else{var u=l;d=j.createElement(w3,{shapeType:r,elementProps:u})}return l.isActive?j.createElement(pn,{className:i},d):j.createElement(pn,{className:o},d)}var bT=(e,t,r)=>{var i=Bt();return(o,l)=>d=>{e==null||e(o,l,d),i(RD({activeIndex:String(l),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}},ST=e=>{var t=Bt();return(r,i)=>o=>{e==null||e(r,i,o),t(pH())}},xT=(e,t,r)=>{var i=Bt();return(o,l)=>d=>{e==null||e(o,l,d),i(vH({activeIndex:String(l),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:r}))}};function rW(e){var{tooltipEntrySettings:t}=e,r=Bt(),i=vi(),o=j.useRef(null);return j.useLayoutEffect(()=>{i||(o.current===null?r(cH(t)):o.current!==t&&r(hH({prev:o.current,next:t})),o.current=t)},[t,r,i]),j.useLayoutEffect(()=>()=>{o.current&&(r(fH(o.current)),o.current=null)},[r]),null}function iW(e){var{legendPayload:t}=e,r=Bt(),i=vi(),o=j.useRef(null);return j.useLayoutEffect(()=>{i||(o.current===null?r(p9(t)):o.current!==t&&r(v9({prev:o.current,next:t})),o.current=t)},[r,i,t]),j.useLayoutEffect(()=>()=>{o.current&&(r(m9(o.current)),o.current=null)},[r]),null}var eg,nW=()=>{var[e]=j.useState(()=>Nu("uid-"));return e},sW=(eg=VO.useId)!==null&&eg!==void 0?eg:nW;function aW(e,t){var r=sW();return t||(e?"".concat(e,"-").concat(r):r)}var oW=j.createContext(void 0),lW=e=>{var{id:t,type:r,children:i}=e,o=aW("recharts-".concat(r),t);return j.createElement(oW.Provider,{value:o},i(o))},uW={cartesianItems:[],polarItems:[]},CT=Pr({name:"graphicalItems",initialState:uW,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Et()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:i}=t.payload,o=Ti(e).cartesianItems.indexOf(r);o>-1&&(e.cartesianItems[o]=i)},prepare:Et()},removeCartesianGraphicalItem:{reducer(e,t){var r=Ti(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Et()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Et()},removePolarGraphicalItem:{reducer(e,t){var r=Ti(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Et()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:i}=t.payload,o=Ti(e).polarItems.indexOf(r);o>-1&&(e.polarItems[o]=i)},prepare:Et()}}}),{addCartesianGraphicalItem:cW,replaceCartesianGraphicalItem:hW,removeCartesianGraphicalItem:fW,addPolarGraphicalItem:uJ,removePolarGraphicalItem:cJ,replacePolarGraphicalItem:hJ}=CT.actions,dW=CT.reducer,pW=e=>{var t=Bt(),r=j.useRef(null);return j.useLayoutEffect(()=>{r.current===null?t(cW(e)):r.current!==e&&t(hW({prev:r.current,next:e})),r.current=e},[t,e]),j.useLayoutEffect(()=>()=>{r.current&&(t(fW(r.current)),r.current=null)},[t]),null},vW=j.memo(pW);function E3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function A3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E3(Object(r),!0).forEach(function(i){mW(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function mW(e,t,r){return(t=gW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gW(e){var t=_W(e,"string");return typeof t=="symbol"?t:t+""}function _W(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wT=0,yW={xAxis:{},yAxis:{},zAxis:{}},ET=Pr({name:"cartesianAxis",initialState:yW,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Et()},replaceXAxis:{reducer(e,t){var{prev:r,next:i}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.xAxis[r.id],e.xAxis[i.id]=i)},prepare:Et()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Et()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Et()},replaceYAxis:{reducer(e,t){var{prev:r,next:i}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.yAxis[r.id],e.yAxis[i.id]=i)},prepare:Et()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Et()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Et()},replaceZAxis:{reducer(e,t){var{prev:r,next:i}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.zAxis[r.id],e.zAxis[i.id]=i)},prepare:Et()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Et()},updateYAxisWidth(e,t){var{id:r,width:i}=t.payload,o=e.yAxis[r];if(o){var l,d=o.widthHistory||[];if(d.length===3&&d[0]===d[2]&&i===d[1]&&i!==o.width&&Math.abs(i-((l=d[0])!==null&&l!==void 0?l:0))<=1)return;var a=[...d,i].slice(-3);e.yAxis[r]=A3(A3({},o),{},{width:i,widthHistory:a})}}}}),{addXAxis:bW,replaceXAxis:SW,removeXAxis:xW,addYAxis:CW,replaceYAxis:wW,removeYAxis:EW,addZAxis:fJ,replaceZAxis:dJ,removeZAxis:pJ,updateYAxisWidth:AW}=ET.actions,DW=ET.reducer,TW=ue([vr],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),MW=ue([TW,ns,ss],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),AT=()=>Ne(MW),D3=(e,t,r)=>{var i=r??e;if(!or(i))return $i(i,t,0)},kW=(e,t,r)=>{var i={},o=e.filter(jd),l=e.filter(c=>c.stackId==null),d=o.reduce((c,p)=>{var f=c[p.stackId];return f==null&&(f=[]),f.push(p),c[p.stackId]=f,c},i),a=Object.entries(d).map(c=>{var p,[f,g]=c,b=g.map(m=>m.dataKey),S=D3(t,r,(p=g[0])===null||p===void 0?void 0:p.barSize);return{stackId:f,dataKeys:b,barSize:S}}),u=l.map(c=>{var p=[c.dataKey].filter(g=>g!=null),f=D3(t,r,c.barSize);return{stackId:void 0,dataKeys:p,barSize:f}});return[...a,...u]};function T3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Zh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T3(Object(r),!0).forEach(function(i){OW(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function OW(e,t,r){return(t=LW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LW(e){var t=RW(e,"string");return typeof t=="symbol"?t:t+""}function RW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PW(e,t,r,i,o){var l,d=i.length;if(!(d<1)){var a=$i(e,r,0,!0),u,c=[];if(at((l=i[0])===null||l===void 0?void 0:l.barSize)){var p=!1,f=r/d,g=i.reduce((x,C)=>x+(C.barSize||0),0);g+=(d-1)*a,g>=r&&(g-=(d-1)*a,a=0),g>=r&&f>0&&(p=!0,f*=.9,g=d*f);var b=(r-g)/2>>0,S={offset:b-a,size:0};u=i.reduce((x,C)=>{var E,D={stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:S.offset+S.size+a,size:p?f:(E=C.barSize)!==null&&E!==void 0?E:0}},w=[...x,D];return S=D.position,w},c)}else{var m=$i(t,r,0,!0);r-2*m-(d-1)*a<=0&&(a=0);var v=(r-2*m-(d-1)*a)/d;v>1&&(v>>=0);var y=at(o)?Math.min(v,o):v;u=i.reduce((x,C,E)=>[...x,{stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:m+(v+a)*E+(v-y)/2,size:y}}],c)}return u}}var BW=(e,t,r,i,o,l,d)=>{var a=or(d)?t:d,u=PW(r,i,o!==l?o:l,e,a);return o!==l&&u!=null&&(u=u.map(c=>Zh(Zh({},c),{},{position:Zh(Zh({},c.position),{},{offset:c.position.offset-o/2})}))),u},IW=(e,t)=>{var r=Q_(t);if(!(!e||r==null||t==null)){var{stackId:i}=t;if(i!=null){var o=e[i];if(o){var{stackedData:l}=o;if(l)return l.find(d=>d.key===r)}}}},NW=(e,t)=>{if(!(e==null||t==null)){var r=e.find(i=>i.stackId===t.stackId&&t.dataKey!=null&&i.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function jW(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&at(e.zIndex)?e.zIndex:t}var FW=e=>{var{chartData:t}=e,r=Bt(),i=vi();return j.useEffect(()=>i?()=>{}:(r(qw(t)),()=>{r(qw(void 0))}),[t,r,i]),null},M3={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},DT=Pr({name:"brush",initialState:M3,reducers:{setBrushSettings(e,t){return t.payload==null?M3:t.payload}}}),{setBrushSettings:vJ}=DT.actions,zW=DT.reducer;function HW(e){return(e%180+180)%180}var $W=function(t){var{width:r,height:i}=t,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=HW(o),d=l*Math.PI/180,a=Math.atan(i/r),u=d>a&&d<Math.PI-a?i/Math.sin(d):r/Math.cos(d);return Math.abs(u)},UW={dots:[],areas:[],lines:[]},TT=Pr({name:"referenceElements",initialState:UW,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Ti(e).dots.findIndex(i=>i===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Ti(e).areas.findIndex(i=>i===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Ti(e).lines.findIndex(i=>i===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:mJ,removeDot:gJ,addArea:_J,removeArea:yJ,addLine:bJ,removeLine:SJ}=TT.actions,qW=TT.reducer,WW=j.createContext(void 0),GW=e=>{var{children:t}=e,[r]=j.useState("".concat(Nu("recharts"),"-clip")),i=AT();if(i==null)return null;var{x:o,y:l,width:d,height:a}=i;return j.createElement(WW.Provider,{value:r},j.createElement("defs",null,j.createElement("clipPath",{id:r},j.createElement("rect",{x:o,y:l,height:a,width:d}))),t)};function MT(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],i=0;i<e.length;i+=t){var o=e[i];o!==void 0&&r.push(o)}return r}function KW(e,t,r){var i={width:e.width+t.width,height:e.height+t.height};return $W(i,r)}function YW(e,t,r){var i=r==="width",{x:o,y:l,width:d,height:a}=e;return t===1?{start:i?o:l,end:i?o+d:l+a}:{start:i?o+d:l+a,end:i?o:l}}function Zu(e,t,r,i,o){if(e*t<e*i||e*t>e*o)return!1;var l=r();return e*(t-e*l/2-i)>=0&&e*(t+e*l/2-o)<=0}function VW(e,t){return MT(e,t+1)}function XW(e,t,r,i,o){for(var l=(i||[]).slice(),{start:d,end:a}=t,u=0,c=1,p=d,f=function(){var S=i==null?void 0:i[u];if(S===void 0)return{v:MT(i,c)};var m=u,v,y=()=>(v===void 0&&(v=r(S,m)),v),x=S.coordinate,C=u===0||Zu(e,x,y,p,a);C||(u=0,p=d,c+=1),C&&(p=x+e*(y()/2+o),u+=c)},g;c<=l.length;)if(g=f(),g)return g.v;return[]}function ZW(e,t,r,i,o){var l=(i||[]).slice(),d=l.length;if(d===0)return[];for(var{start:a,end:u}=t,c=1;c<=d;c++){for(var p=(d-1)%c,f=a,g=!0,b=function(){var E=i[m];if(E==null)return 0;var D=m,w,M=()=>(w===void 0&&(w=r(E,D)),w),T=E.coordinate,O=m===p||Zu(e,T,M,f,u);if(!O)return g=!1,1;O&&(f=T+e*(M()/2+o))},S,m=p;m<d&&(S=b(),!(S!==0&&S===1));m+=c);if(g){for(var v=[],y=p;y<d;y+=c){var x=i[y];x!=null&&v.push(x)}return v}}return[]}function k3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k3(Object(r),!0).forEach(function(i){QW(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function QW(e,t,r){return(t=JW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JW(e){var t=eG(e,"string");return typeof t=="symbol"?t:t+""}function eG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tG(e,t,r,i,o){for(var l=(i||[]).slice(),d=l.length,{start:a}=t,{end:u}=t,c=function(g){var b=l[g];if(b==null)return 1;var S=b,m,v=()=>(m===void 0&&(m=r(b,g)),m);if(g===d-1){var y=e*(S.coordinate+e*v()/2-u);l[g]=S=Or(Or({},S),{},{tickCoord:y>0?S.coordinate-y*e:S.coordinate})}else l[g]=S=Or(Or({},S),{},{tickCoord:S.coordinate});if(S.tickCoord!=null){var x=Zu(e,S.tickCoord,v,a,u);x&&(u=S.tickCoord-e*(v()/2+o),l[g]=Or(Or({},S),{},{isShow:!0}))}},p=d-1;p>=0;p--)c(p);return l}function rG(e,t,r,i,o,l){var d=(i||[]).slice(),a=d.length,{start:u,end:c}=t;if(l){var p=i[a-1];if(p!=null){var f=r(p,a-1),g=e*(p.coordinate+e*f/2-c);if(d[a-1]=p=Or(Or({},p),{},{tickCoord:g>0?p.coordinate-g*e:p.coordinate}),p.tickCoord!=null){var b=Zu(e,p.tickCoord,()=>f,u,c);b&&(c=p.tickCoord-e*(f/2+o),d[a-1]=Or(Or({},p),{},{isShow:!0}))}}}for(var S=l?a-1:a,m=function(x){var C=d[x];if(C==null)return 1;var E=C,D,w=()=>(D===void 0&&(D=r(C,x)),D);if(x===0){var M=e*(E.coordinate-e*w()/2-u);d[x]=E=Or(Or({},E),{},{tickCoord:M<0?E.coordinate-M*e:E.coordinate})}else d[x]=E=Or(Or({},E),{},{tickCoord:E.coordinate});if(E.tickCoord!=null){var T=Zu(e,E.tickCoord,w,u,c);T&&(u=E.tickCoord+e*(w()/2+o),d[x]=Or(Or({},E),{},{isShow:!0}))}},v=0;v<S;v++)m(v);return d}function iG(e,t,r){var{tick:i,ticks:o,viewBox:l,minTickGap:d,orientation:a,interval:u,tickFormatter:c,unit:p,angle:f}=e;if(!o||!o.length||!i)return[];if(Ie(u)||cc.isSsr){var g;return(g=VW(o,Ie(u)?u:0))!==null&&g!==void 0?g:[]}var b=[],S=a==="top"||a==="bottom"?"width":"height",m=p&&S==="width"?Iu(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=(D,w)=>{var M=typeof c=="function"?c(D.value,w):D.value;return S==="width"?KW(Iu(M,{fontSize:t,letterSpacing:r}),m,f):Iu(M,{fontSize:t,letterSpacing:r})[S]},y=o[0],x=o[1],C=o.length>=2&&y!=null&&x!=null?ui(x.coordinate-y.coordinate):1,E=YW(l,C,S);return u==="equidistantPreserveStart"?XW(C,E,v,o,d):u==="equidistantPreserveEnd"?ZW(C,E,v,o,d):(u==="preserveStart"||u==="preserveStartEnd"?b=rG(C,E,v,o,d,u==="preserveStartEnd"):b=tG(C,E,v,o,d),b.filter(D=>D.isShow))}var nG=e=>{var{ticks:t,label:r,labelGapWithTick:i=5,tickSize:o=0,tickMargin:l=0}=e,d=0;if(t){Array.from(t).forEach(p=>{if(p){var f=p.getBoundingClientRect();f.width>d&&(d=f.width)}});var a=r?r.getBoundingClientRect().width:0,u=o+l,c=d+u+a+(r?i:0);return Math.round(c)}return 0},sG={xAxis:{},yAxis:{}},kT=Pr({name:"renderedTicks",initialState:sG,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:i,ticks:o}=t.payload;e[r][i]=o},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:i}=t.payload;delete e[r][i]}}}),{setRenderedTicks:aG,removeRenderedTicks:oG}=kT.actions,lG=kT.reducer,uG=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function cG(e,t){if(e==null)return{};var r,i,o=hG(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hG(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Ha.apply(null,arguments)}function O3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O3(Object(r),!0).forEach(function(i){fG(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function fG(e,t,r){return(t=dG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dG(e){var t=pG(e,"string");return typeof t=="symbol"?t:t+""}function pG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ra={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Zr.axis};function vG(e){var{x:t,y:r,width:i,height:o,orientation:l,mirror:d,axisLine:a,otherSvgProps:u}=e;if(!a)return null;var c=$t($t($t({},u),$s(a)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!d||l==="bottom"&&d);c=$t($t({},c),{},{x1:t,y1:r+p*o,x2:t+i,y2:r+p*o})}else{var f=+(l==="left"&&!d||l==="right"&&d);c=$t($t({},c),{},{x1:t+f*i,y1:r,x2:t+f*i,y2:r+o})}return j.createElement("line",Ha({},c,{className:Dt("recharts-cartesian-axis-line",el(a,"className"))}))}function mG(e,t,r,i,o,l,d,a,u){var c,p,f,g,b,S,m=a?-1:1,v=e.tickSize||d,y=Ie(e.tickCoord)?e.tickCoord:e.coordinate;switch(l){case"top":c=p=e.coordinate,g=r+ +!a*o,f=g-m*v,S=f-m*u,b=y;break;case"left":f=g=e.coordinate,p=t+ +!a*i,c=p-m*v,b=c-m*u,S=y;break;case"right":f=g=e.coordinate,p=t+ +a*i,c=p+m*v,b=c+m*u,S=y;break;default:c=p=e.coordinate,g=r+ +a*o,f=g+m*v,S=f+m*u,b=y;break}return{line:{x1:c,y1:f,x2:p,y2:g},tick:{x:b,y:S}}}function gG(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function _G(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function yG(e){var{option:t,tickProps:r,value:i}=e,o,l=Dt(r.className,"recharts-cartesian-axis-tick-value");if(j.isValidElement(t))o=j.cloneElement(t,$t($t({},r),{},{className:l}));else if(typeof t=="function")o=t($t($t({},r),{},{className:l}));else{var d="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(d=Dt(d,Lq(t))),o=j.createElement(U1,Ha({},r,{className:d}),i)}return o}function bG(e){var{ticks:t,axisType:r,axisId:i}=e,o=Bt();return j.useEffect(()=>{if(i==null||r==null)return pl;var l=t.map(d=>({value:d.value,coordinate:d.coordinate,offset:d.offset,index:d.index}));return o(aG({ticks:l,axisId:i,axisType:r})),()=>{o(oG({axisId:i,axisType:r}))}},[o,t,i,r]),null}var SG=j.forwardRef((e,t)=>{var{ticks:r=[],tick:i,tickLine:o,stroke:l,tickFormatter:d,unit:a,padding:u,tickTextProps:c,orientation:p,mirror:f,x:g,y:b,width:S,height:m,tickSize:v,tickMargin:y,fontSize:x,letterSpacing:C,getTicksConfig:E,events:D,axisType:w,axisId:M}=e,T=iG($t($t({},E),{},{ticks:r}),x,C),O=$s(E),L=y_(i),P=cT(O.textAnchor)?O.textAnchor:gG(p,f),R=_G(p,f),I={};typeof o=="object"&&(I=o);var $=$t($t({},O),{},{fill:"none"},I),V=T.map(G=>$t({entry:G},mG(G,g,b,S,m,p,v,f,y))),U=V.map(G=>{var{entry:N,line:H}=G;return j.createElement(pn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(N.value,"-").concat(N.coordinate,"-").concat(N.tickCoord)},o&&j.createElement("line",Ha({},$,H,{className:Dt("recharts-cartesian-axis-tick-line",el(o,"className"))})))}),K=V.map((G,N)=>{var H,z,{entry:q,tick:J}=G,ie=$t($t($t($t({verticalAnchor:R},O),{},{textAnchor:P,stroke:"none",fill:l},J),{},{index:N,payload:q,visibleTicksCount:T.length,tickFormatter:d,padding:u},c),{},{angle:(H=(z=c==null?void 0:c.angle)!==null&&z!==void 0?z:O.angle)!==null&&H!==void 0?H:0}),pe=$t($t({},ie),L);return j.createElement(pn,Ha({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(q.value,"-").concat(q.coordinate,"-").concat(q.tickCoord)},A_(D,q,N)),i&&j.createElement(yG,{option:i,tickProps:pe,value:"".concat(typeof d=="function"?d(q.value,N):q.value).concat(a||"")}))});return j.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(w,"-ticks")},j.createElement(bG,{ticks:T,axisId:M,axisType:w}),K.length>0&&j.createElement(Xs,{zIndex:Zr.label},j.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(w,"-tick-labels"),ref:t},K)),U.length>0&&j.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(w,"-tick-lines")},U))}),xG=j.forwardRef((e,t)=>{var{axisLine:r,width:i,height:o,className:l,hide:d,ticks:a,axisType:u,axisId:c}=e,p=cG(e,uG),[f,g]=j.useState(""),[b,S]=j.useState(""),m=j.useRef(null);j.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var y;return nG({ticks:m.current,label:(y=e.labelRef)===null||y===void 0?void 0:y.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var v=j.useCallback(y=>{if(y){var x=y.getElementsByClassName("recharts-cartesian-axis-tick-value");m.current=x;var C=x[0];if(C){var E=window.getComputedStyle(C),D=E.fontSize,w=E.letterSpacing;(D!==f||w!==b)&&(g(D),S(w))}}},[f,b]);return d||i!=null&&i<=0||o!=null&&o<=0?null:j.createElement(Xs,{zIndex:e.zIndex},j.createElement(pn,{className:Dt("recharts-cartesian-axis",l)},j.createElement(vG,{x:e.x,y:e.y,width:i,height:o,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:$s(e)}),j.createElement(SG,{ref:v,axisType:u,events:p,fontSize:f,getTicksConfig:e,height:e.height,letterSpacing:b,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:a,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:c}),j.createElement(hq,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},j.createElement(Sq,{label:e.label,labelRef:e.labelRef}),e.children)))}),W1=j.forwardRef((e,t)=>{var r=Pi(e,Ra);return j.createElement(xG,Ha({},r,{ref:t}))});W1.displayName="CartesianAxis";var CG={},OT=Pr({name:"errorBars",initialState:CG,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:i}=t.payload;e[r]||(e[r]=[]),e[r].push(i)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:i,next:o}=t.payload;e[r]&&(e[r]=e[r].map(l=>l.dataKey===i.dataKey&&l.direction===i.direction?o:l))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:i}=t.payload;e[r]&&(e[r]=e[r].filter(o=>o.dataKey!==i.dataKey||o.direction!==i.direction))}}}),{addErrorBar:xJ,replaceErrorBar:CJ,removeErrorBar:wJ}=OT.actions,wG=OT.reducer,EG=["children"];function AG(e,t){if(e==null)return{};var r,i,o=DG(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function DG(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var TG={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},MG=j.createContext(TG);function kG(e){var{children:t}=e,r=AG(e,EG);return j.createElement(MG.Provider,{value:r},t)}function LT(e,t){var r,i,o=Ne(c=>os(c,e)),l=Ne(c=>ls(c,t)),d=(r=o==null?void 0:o.allowDataOverflow)!==null&&r!==void 0?r:nr.allowDataOverflow,a=(i=l==null?void 0:l.allowDataOverflow)!==null&&i!==void 0?i:sr.allowDataOverflow,u=d||a;return{needClip:u,needClipX:d,needClipY:a}}function OG(e){var{xAxisId:t,yAxisId:r,clipPathId:i}=e,o=AT(),{needClipX:l,needClipY:d,needClip:a}=LT(t,r);if(!a||!o)return null;var{x:u,y:c,width:p,height:f}=o;return j.createElement("clipPath",{id:"clipPath-".concat(i)},j.createElement("rect",{x:l?u:u-p/2,y:d?c:c-f/2,width:l?p:p*2,height:d?f:f*2}))}function Wa(e,t){var r,i;return(r=(i=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||i===void 0?void 0:i.xAxisId)!==null&&r!==void 0?r:wT}function Ga(e,t){var r,i;return(r=(i=e.graphicalItems.cartesianItems.find(o=>o.id===t))===null||i===void 0?void 0:i.yAxisId)!==null&&r!==void 0?r:wT}var LG="Invariant failed";function RG(e,t){throw new Error(LG)}function i_(){return i_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},i_.apply(null,arguments)}function G1(e){return j.createElement(tW,i_({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var PG=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(i,o)=>{if(Ie(t))return t;var l=Ie(i)||or(i);return l?t(i,o):(l||RG(),r)}},BG=(e,t,r)=>r,IG=(e,t)=>t,bc=ue([E1,IG],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),NG=ue([bc],e=>e==null?void 0:e.maxBarSize),jG=(e,t,r,i)=>i,FG=ue([gt,E1,Wa,Ga,BG],(e,t,r,i,o)=>t.filter(l=>e==="horizontal"?l.xAxisId===r:l.yAxisId===i).filter(l=>l.isPanorama===o).filter(l=>l.hide===!1).filter(l=>l.type==="bar")),zG=(e,t,r)=>{var i=gt(e),o=Wa(e,t),l=Ga(e,t);if(!(o==null||l==null))return i==="horizontal"?Jg(e,"yAxis",l,r):Jg(e,"xAxis",o,r)},HG=(e,t)=>{var r=gt(e),i=Wa(e,t),o=Ga(e,t);if(!(i==null||o==null))return r==="horizontal"?Ow(e,"xAxis",i):Ow(e,"yAxis",o)},$G=ue([FG,gN,HG],kW),UG=(e,t,r)=>{var i,o,l=bc(e,t);if(l==null)return 0;var d=Wa(e,t),a=Ga(e,t);if(d==null||a==null)return 0;var u=gt(e),c=e4(e),{maxBarSize:p}=l,f=or(p)?c:p,g,b;return u==="horizontal"?(g=ll(e,"xAxis",d,r),b=ol(e,"xAxis",d,r)):(g=ll(e,"yAxis",a,r),b=ol(e,"yAxis",a,r)),(i=(o=Mf(g,b,!0))!==null&&o!==void 0?o:f)!==null&&i!==void 0?i:0},RT=(e,t,r)=>{var i=gt(e),o=Wa(e,t),l=Ga(e,t);if(!(o==null||l==null)){var d,a;return i==="horizontal"?(d=ll(e,"xAxis",o,r),a=ol(e,"xAxis",o,r)):(d=ll(e,"yAxis",l,r),a=ol(e,"yAxis",l,r)),Mf(d,a)}},qG=ue([$G,e4,mN,t4,UG,RT,NG],BW),WG=(e,t,r)=>{var i=Wa(e,t);if(i!=null)return ll(e,"xAxis",i,r)},GG=(e,t,r)=>{var i=Ga(e,t);if(i!=null)return ll(e,"yAxis",i,r)},KG=(e,t,r)=>{var i=Wa(e,t);if(i!=null)return ol(e,"xAxis",i,r)},YG=(e,t,r)=>{var i=Ga(e,t);if(i!=null)return ol(e,"yAxis",i,r)},VG=ue([qG,bc],NW),XG=ue([zG,bc],IW),ZG=ue([vr,B_,WG,GG,KG,YG,VG,gt,lN,RT,XG,bc,jG],(e,t,r,i,o,l,d,a,u,c,p,f,g)=>{var{chartData:b,dataStartIndex:S,dataEndIndex:m}=u;if(!(f==null||d==null||t==null||a!=="horizontal"&&a!=="vertical"||r==null||i==null||o==null||l==null||c==null)){var{data:v}=f,y;if(v!=null&&v.length>0?y=v:y=b==null?void 0:b.slice(S,m+1),y!=null)return EK({layout:a,barSettings:f,pos:d,parentViewBox:t,bandSize:c,xAxis:r,yAxis:i,xAxisTicks:o,yAxisTicks:l,stackedData:p,displayedData:y,offset:e,cells:g,dataStartIndex:S})}}),QG=["index"];function n_(){return n_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},n_.apply(null,arguments)}function JG(e,t){if(e==null)return{};var r,i,o=eK(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function eK(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var PT=j.createContext(void 0),tK=e=>{var t=j.useContext(PT);if(t!=null)return t.stackId;if(e!=null)return dB(e)},rK=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),iK=e=>{var t=j.useContext(PT);if(t!=null){var{stackId:r}=t;return"url(#".concat(rK(r,e),")")}},BT=e=>{var{index:t}=e,r=JG(e,QG),i=iK(t);return j.createElement(pn,n_({className:"recharts-bar-stack-layer",clipPath:i},r))},nK=["onMouseEnter","onMouseLeave","onClick"],sK=["value","background","tooltipPosition"],aK=["id"],oK=["onMouseEnter","onClick","onMouseLeave"];function qs(){return qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},qs.apply(null,arguments)}function L3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L3(Object(r),!0).forEach(function(i){lK(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function lK(e,t,r){return(t=uK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uK(e){var t=cK(e,"string");return typeof t=="symbol"?t:t+""}function cK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function id(e,t){if(e==null)return{};var r,i,o=hK(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hK(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var fK=e=>{var{dataKey:t,name:r,fill:i,legendType:o,hide:l}=e;return[{inactive:l,dataKey:t,type:o,color:i,value:g6(r,t),payload:e}]},dK=j.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:i,fill:o,name:l,hide:d,unit:a,tooltipType:u,id:c}=e,p={dataDefinedOnItem:void 0,getPosition:pl,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:g6(l,t),hide:d,type:u,color:o,unit:a,graphicalItemId:c}};return j.createElement(rW,{tooltipEntrySettings:p})});function pK(e){var t=Ne(cl),{data:r,dataKey:i,background:o,allOtherBarProps:l}=e,{onMouseEnter:d,onMouseLeave:a,onClick:u}=l,c=id(l,nK),p=bT(d,i,l.id),f=ST(a),g=xT(u,i,l.id);if(!o||r==null)return null;var b=y_(o);return j.createElement(Xs,{zIndex:jW(o,Zr.barBackground)},r.map((S,m)=>{var{value:v,background:y,tooltipPosition:x}=S,C=id(S,sK);if(!y)return null;var E=p(S,m),D=f(S,m),w=g(S,m),M=jr(jr(jr(jr(jr({option:o,isActive:String(m)===t},C),{},{fill:"#eee"},y),b),A_(c,S,m)),{},{onMouseEnter:E,onMouseLeave:D,onClick:w,dataKey:i,index:m,className:"recharts-bar-background-rectangle"});return j.createElement(G1,qs({key:"background-bar-".concat(m)},M))}))}function vK(e){var{showLabels:t,children:r,rects:i}=e,o=i==null?void 0:i.map(l=>{var d={x:l.x,y:l.y,width:l.width,lowerWidth:l.width,upperWidth:l.width,height:l.height};return jr(jr({},d),{},{value:l.value,payload:l.payload,parentViewBox:l.parentViewBox,viewBox:d,fill:l.fill})});return j.createElement(Aq,{value:t?o:void 0},r)}function mK(e){var{shape:t,activeBar:r,baseProps:i,entry:o,index:l,dataKey:d}=e,a=Ne(cl),u=Ne(VD),c=r&&String(o.originalDataIndex)===a&&(u==null||d===u),[p,f]=j.useState(!1),[g,b]=j.useState(!1);j.useEffect(()=>{var C;return c?(f(!0),C=requestAnimationFrame(()=>{b(!0)})):b(!1),()=>{cancelAnimationFrame(C)}},[c]);var S=j.useCallback(()=>{c||f(!1)},[c]),m=c&&g,v=c||p,y;c?r===!0?y=t:y=r:y=t;var x=j.createElement(G1,qs({},i,{name:String(i.name)},o,{isActive:m,option:y,index:l,dataKey:d,onTransitionEnd:S}));return v?j.createElement(Xs,{zIndex:Zr.activeBar},j.createElement(BT,{index:o.originalDataIndex},x)):x}function gK(e){var{shape:t,baseProps:r,entry:i,index:o,dataKey:l}=e;return j.createElement(G1,qs({},r,{name:String(r.name)},i,{isActive:!1,option:t,index:o,dataKey:l}))}function _K(e){var t,{data:r,props:i}=e,o=(t=$s(i))!==null&&t!==void 0?t:{},{id:l}=o,d=id(o,aK),{shape:a,dataKey:u,activeBar:c}=i,{onMouseEnter:p,onClick:f,onMouseLeave:g}=i,b=id(i,oK),S=bT(p,u,l),m=ST(g),v=xT(f,u,l);return r?j.createElement(j.Fragment,null,r.map((y,x)=>j.createElement(BT,qs({index:y.originalDataIndex,key:"rectangle-".concat(y==null?void 0:y.x,"-").concat(y==null?void 0:y.y,"-").concat(y==null?void 0:y.value,"-").concat(x),className:"recharts-bar-rectangle"},A_(b,y,x),{onMouseEnter:S(y,x),onMouseLeave:m(y,x),onClick:v(y,x)}),c?j.createElement(mK,{shape:a,activeBar:c,baseProps:d,entry:y,index:x,dataKey:u}):j.createElement(gK,{shape:a,baseProps:d,entry:y,index:x,dataKey:u})))):null}function yK(e){var{props:t,previousRectanglesRef:r}=e,{data:i,layout:o,isAnimationActive:l,animationBegin:d,animationDuration:a,animationEasing:u,onAnimationEnd:c,onAnimationStart:p}=t,f=r.current,g=H_(t,"recharts-bar-"),[b,S]=j.useState(!1),m=!b,v=j.useCallback(()=>{typeof c=="function"&&c(),S(!1)},[c]),y=j.useCallback(()=>{typeof p=="function"&&p(),S(!0)},[p]);return j.createElement(vK,{showLabels:m,rects:i},j.createElement(z_,{animationId:g,begin:d,duration:a,isActive:l,easing:u,onAnimationEnd:v,onAnimationStart:y,key:g},x=>{var C=x===1?i:i==null?void 0:i.map((E,D)=>{var w=f&&f[D];if(w)return jr(jr({},E),{},{x:Dr(w.x,E.x,x),y:Dr(w.y,E.y,x),width:Dr(w.width,E.width,x),height:Dr(w.height,E.height,x)});if(o==="horizontal"){var M=Dr(0,E.height,x),T=Dr(E.stackedBarStart,E.y,x);return jr(jr({},E),{},{y:T,height:M})}var O=Dr(0,E.width,x),L=Dr(E.stackedBarStart,E.x,x);return jr(jr({},E),{},{width:O,x:L})});return x>0&&(r.current=C??null),C==null?null:j.createElement(pn,null,j.createElement(_K,{props:t,data:C}))}),j.createElement(Mq,{label:t.label}),t.children)}function bK(e){var t=j.useRef(null);return j.createElement(yK,{previousRectanglesRef:t,props:e})}var IT=0,SK=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:pr(e,t)}};class xK extends j.PureComponent{render(){var{hide:t,data:r,dataKey:i,className:o,xAxisId:l,yAxisId:d,needClip:a,background:u,id:c}=this.props;if(t||r==null)return null;var p=Dt("recharts-bar",o),f=c;return j.createElement(pn,{className:p,id:c},a&&j.createElement("defs",null,j.createElement(OG,{clipPathId:f,xAxisId:l,yAxisId:d})),j.createElement(pn,{className:"recharts-bar-rectangles",clipPath:a?"url(#clipPath-".concat(f,")"):void 0},j.createElement(pK,{data:r,dataKey:i,background:u,allOtherBarProps:this.props}),j.createElement(bK,this.props)))}}var CK={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:IT,xAxisId:0,yAxisId:0,zIndex:Zr.bar};function wK(e){var{xAxisId:t,yAxisId:r,hide:i,legendType:o,minPointSize:l,activeBar:d,animationBegin:a,animationDuration:u,animationEasing:c,isAnimationActive:p}=e,{needClip:f}=LT(t,r),g=vl(),b=vi(),S=Iq(e.children,$1),m=Ne(x=>ZG(x,e.id,b,S));if(g!=="vertical"&&g!=="horizontal")return null;var v,y=m==null?void 0:m[0];return y==null||y.height==null||y.width==null?v=0:v=g==="vertical"?y.height/2:y.width/2,j.createElement(kG,{xAxisId:t,yAxisId:r,data:m,dataPointFormatter:SK,errorBarOffset:v},j.createElement(xK,qs({},e,{layout:g,needClip:f,data:m,xAxisId:t,yAxisId:r,hide:i,legendType:o,minPointSize:l,activeBar:d,animationBegin:a,animationDuration:u,animationEasing:c,isAnimationActive:p})))}function EK(e){var{layout:t,barSettings:{dataKey:r,minPointSize:i,hasCustomShape:o},pos:l,bandSize:d,xAxis:a,yAxis:u,xAxisTicks:c,yAxisTicks:p,stackedData:f,displayedData:g,offset:b,cells:S,parentViewBox:m,dataStartIndex:v}=e,y=t==="horizontal"?u:a,x=f?y.scale.domain():null,C=pB({numericAxis:y}),E=y.scale.map(C);return g.map((D,w)=>{var M,T,O,L,P,R;if(f){var I=f[w+v];if(I==null)return null;M=lB(I,x)}else M=pr(D,r),Array.isArray(M)||(M=[C,M]);var $=PG(i,IT)(M[1],w);if(t==="horizontal"){var V,U=u.scale.map(M[0]),K=u.scale.map(M[1]);if(U==null||K==null)return null;T=AC({axis:a,ticks:c,bandSize:d,offset:l.offset,entry:D,index:w}),O=(V=K??U)!==null&&V!==void 0?V:void 0,L=l.size;var G=U-K;if(P=vn(G)?0:G,R={x:T,y:b.top,width:L,height:b.height},Math.abs($)>0&&Math.abs(P)<Math.abs($)){var N=ui(P||$)*(Math.abs($)-Math.abs(P));O-=N,P+=N}}else{var H=a.scale.map(M[0]),z=a.scale.map(M[1]);if(H==null||z==null)return null;if(T=H,O=AC({axis:u,ticks:p,bandSize:d,offset:l.offset,entry:D,index:w}),L=z-H,P=l.size,R={x:b.left,y:O,width:b.width,height:P},Math.abs($)>0&&Math.abs(L)<Math.abs($)){var q=ui(L||$)*(Math.abs($)-Math.abs(L));L+=q}}if(T==null||O==null||L==null||P==null||!o&&(L===0||P===0))return null;var J=jr(jr({},D),{},{stackedBarStart:E,x:T,y:O,width:L,height:P,value:f?M:M[1],payload:D,background:R,tooltipPosition:{x:T+L/2,y:O+P/2},parentViewBox:m,originalDataIndex:w},S&&S[w]&&S[w].props);return J}).filter(Boolean)}function AK(e){var t=Pi(e,CK),r=tK(t.stackId),i=vi();return j.createElement(lW,{id:t.id,type:"bar"},o=>j.createElement(j.Fragment,null,j.createElement(iW,{legendPayload:fK(t)}),j.createElement(dK,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:o}),j.createElement(vW,{type:"bar",id:o,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:i,hasCustomShape:t.shape!=null}),j.createElement(Xs,{zIndex:t.zIndex},j.createElement(wK,qs({},t,{id:o})))))}var NT=j.memo(AK,Od);NT.displayName="Bar";var DK=["domain","range"],TK=["domain","range"];function R3(e,t){if(e==null)return{};var r,i,o=MK(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function MK(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function P3(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function jT(e,t){if(e===t)return!0;var{domain:r,range:i}=e,o=R3(e,DK),{domain:l,range:d}=t,a=R3(t,TK);return!P3(r,l)||!P3(i,d)?!1:Od(o,a)}var kK=["type"],OK=["dangerouslySetInnerHTML","ticks","scale"],LK=["id","scale"];function s_(){return s_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},s_.apply(null,arguments)}function B3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function I3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?B3(Object(r),!0).forEach(function(i){RK(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function RK(e,t,r){return(t=PK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PK(e){var t=BK(e,"string");return typeof t=="symbol"?t:t+""}function BK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a_(e,t){if(e==null)return{};var r,i,o=IK(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function IK(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function NK(e){var t=Bt(),r=j.useRef(null),i=x6(),{type:o}=e,l=a_(e,kK),d=Bd(i,"xAxis",o),a=j.useMemo(()=>{if(d!=null)return I3(I3({},l),{},{type:d})},[l,d]);return j.useLayoutEffect(()=>{a!=null&&(r.current===null?t(bW(a)):r.current!==a&&t(SW({prev:r.current,next:a})),r.current=a)},[a,t]),j.useLayoutEffect(()=>()=>{r.current&&(t(xW(r.current)),r.current=null)},[t]),null}var jK=e=>{var{xAxisId:t,className:r}=e,i=Ne(B_),o=vi(),l="xAxis",d=Ne(y=>DD(y,l,t,o)),a=Ne(y=>wD(y,t)),u=Ne(y=>Qz(y,t)),c=Ne(y=>G4(y,t));if(a==null||u==null||c==null)return null;var{dangerouslySetInnerHTML:p,ticks:f,scale:g}=e,b=a_(e,OK),{id:S,scale:m}=c,v=a_(c,LK);return j.createElement(W1,s_({},b,v,{x:u.x,y:u.y,width:a.width,height:a.height,className:Dt("recharts-".concat(l," ").concat(l),r),viewBox:i,ticks:d,axisType:l,axisId:t}))},FK={allowDataOverflow:nr.allowDataOverflow,allowDecimals:nr.allowDecimals,allowDuplicatedCategory:nr.allowDuplicatedCategory,angle:nr.angle,axisLine:Ra.axisLine,height:nr.height,hide:!1,includeHidden:nr.includeHidden,interval:nr.interval,label:!1,minTickGap:nr.minTickGap,mirror:nr.mirror,orientation:nr.orientation,padding:nr.padding,reversed:nr.reversed,scale:nr.scale,tick:nr.tick,tickCount:nr.tickCount,tickLine:Ra.tickLine,tickSize:Ra.tickSize,type:nr.type,niceTicks:nr.niceTicks,xAxisId:0},zK=e=>{var t=Pi(e,FK);return j.createElement(j.Fragment,null,j.createElement(NK,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),j.createElement(jK,t))},FT=j.memo(zK,jT);FT.displayName="XAxis";var HK=["type"],$K=["dangerouslySetInnerHTML","ticks","scale"],UK=["id","scale"];function o_(){return o_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},o_.apply(null,arguments)}function N3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function j3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N3(Object(r),!0).forEach(function(i){qK(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function qK(e,t,r){return(t=WK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WK(e){var t=GK(e,"string");return typeof t=="symbol"?t:t+""}function GK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l_(e,t){if(e==null)return{};var r,i,o=KK(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function KK(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function YK(e){var t=Bt(),r=j.useRef(null),i=x6(),{type:o}=e,l=l_(e,HK),d=Bd(i,"yAxis",o),a=j.useMemo(()=>{if(d!=null)return j3(j3({},l),{},{type:d})},[d,l]);return j.useLayoutEffect(()=>{a!=null&&(r.current===null?t(CW(a)):r.current!==a&&t(wW({prev:r.current,next:a})),r.current=a)},[a,t]),j.useLayoutEffect(()=>()=>{r.current&&(t(EW(r.current)),r.current=null)},[t]),null}function VK(e){var{yAxisId:t,className:r,width:i,label:o}=e,l=j.useRef(null),d=j.useRef(null),a=Ne(B_),u=vi(),c=Bt(),p="yAxis",f=Ne(w=>ED(w,t)),g=Ne(w=>eH(w,t)),b=Ne(w=>DD(w,p,t,u)),S=Ne(w=>K4(w,t));if(j.useLayoutEffect(()=>{if(!(i!=="auto"||!f||q1(o)||j.isValidElement(o)||S==null)){var w=l.current;if(w){var M=w.getCalculatedWidth();Math.round(f.width)!==Math.round(M)&&c(AW({id:t,width:M}))}}},[b,f,c,o,t,i,S]),f==null||g==null||S==null)return null;var{dangerouslySetInnerHTML:m,ticks:v,scale:y}=e,x=l_(e,$K),{id:C,scale:E}=S,D=l_(S,UK);return j.createElement(W1,o_({},x,D,{ref:l,labelRef:d,x:g.x,y:g.y,tickTextProps:i==="auto"?{width:void 0}:{width:i},width:f.width,height:f.height,className:Dt("recharts-".concat(p," ").concat(p),r),viewBox:a,ticks:b,axisType:p,axisId:t}))}var XK={allowDataOverflow:sr.allowDataOverflow,allowDecimals:sr.allowDecimals,allowDuplicatedCategory:sr.allowDuplicatedCategory,angle:sr.angle,axisLine:Ra.axisLine,hide:!1,includeHidden:sr.includeHidden,interval:sr.interval,label:!1,minTickGap:sr.minTickGap,mirror:sr.mirror,orientation:sr.orientation,padding:sr.padding,reversed:sr.reversed,scale:sr.scale,tick:sr.tick,tickCount:sr.tickCount,tickLine:Ra.tickLine,tickSize:Ra.tickSize,type:sr.type,niceTicks:sr.niceTicks,width:sr.width,yAxisId:0},ZK=e=>{var t=Pi(e,XK);return j.createElement(j.Fragment,null,j.createElement(YK,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),j.createElement(VK,t))},zT=j.memo(ZK,jT);zT.displayName="YAxis";var QK=(e,t)=>t,K1=ue([QK,gt,l4,gr,WD,us,x$,vr],M$);function JK(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Y1(e){var t=e.currentTarget.getBoundingClientRect(),r,i;if(JK(e)){var o=e.currentTarget.getBBox();r=o.width>0?t.width/o.width:1,i=o.height>0?t.height/o.height:1}else{var l=e.currentTarget;r=l.offsetWidth>0?t.width/l.offsetWidth:1,i=l.offsetHeight>0?t.height/l.offsetHeight:1}var d=(a,u)=>({relativeX:Math.round((a-t.left)/r),relativeY:Math.round((u-t.top)/i)});return"touches"in e?Array.from(e.touches).map(a=>d(a.clientX,a.clientY)):d(e.clientX,e.clientY)}var HT=fi("mouseClick"),$T=ac();$T.startListening({actionCreator:HT,effect:(e,t)=>{var r=e.payload,i=K1(t.getState(),Y1(r));(i==null?void 0:i.activeIndex)!=null&&t.dispatch(mH({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}});var u_=fi("mouseMove"),UT=ac(),Fo=null,_a=null,tg=null;UT.startListening({actionCreator:u_,effect:(e,t)=>{var r=e.payload,i=t.getState(),{throttleDelay:o,throttledEvents:l}=i.eventSettings,d=l==="all"||(l==null?void 0:l.includes("mousemove"));Fo!==null&&(cancelAnimationFrame(Fo),Fo=null),_a!==null&&(typeof o!="number"||!d)&&(clearTimeout(_a),_a=null),tg=Y1(r);var a=()=>{var u=t.getState(),c=_c(u,u.tooltip.settings.shared);if(!tg){Fo=null,_a=null;return}if(c==="axis"){var p=K1(u,tg);(p==null?void 0:p.activeIndex)!=null?t.dispatch(BD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(PD())}Fo=null,_a=null};if(!d){a();return}o==="raf"?Fo=requestAnimationFrame(a):typeof o=="number"&&_a===null&&(_a=setTimeout(a,o))}});function eY(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var F3={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},qT=Pr({name:"rootProps",initialState:F3,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:F3.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),tY=qT.reducer,{updateOptions:rY}=qT.actions,iY=null,nY={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},WT=Pr({name:"polarOptions",initialState:iY,reducers:nY}),{updatePolarOptions:EJ}=WT.actions,sY=WT.reducer,GT=fi("keyDown"),KT=fi("focus"),YT=fi("blur"),Xd=ac(),zo=null,ya=null,Qh=null;Xd.startListening({actionCreator:GT,effect:(e,t)=>{Qh=e.payload,zo!==null&&(cancelAnimationFrame(zo),zo=null);var r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,l=o==="all"||o.includes("keydown");ya!==null&&(typeof i!="number"||!l)&&(clearTimeout(ya),ya=null);var d=()=>{try{var a=t.getState(),u=a.rootProps.accessibilityLayer!==!1;if(!u)return;var{keyboardInteraction:c}=a.tooltip,p=Qh;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var f=Bu(c,za(a),al(a),ul(a)),g=f==null?-1:Number(f),b=!Number.isFinite(g)||g<0,S=us(a),m=za(a),v=_c(a,a.tooltip.settings.shared);if(p==="Enter"){if(b)return;var y=Jf(a,v,"hover",String(c.index));t.dispatch(Qf({active:!c.active,activeIndex:c.index,activeCoordinate:y}));return}var x=sH(a),C=x==="left-to-right"?1:-1,E=p==="ArrowRight"?1:-1,D;if(b){var w=al(a),M=ul(a),T=E*C,O=$=>({active:!1,index:String($),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(D=-1,T>0){for(var L=0;L<m.length;L++)if(Bu(O(L),m,w,M)!=null){D=L;break}}else for(var P=m.length-1;P>=0;P--)if(Bu(O(P),m,w,M)!=null){D=P;break}if(D<0)return}else{D=g+E*C;var R=(S==null?void 0:S.length)||m.length;if(R===0||D>=R||D<0)return}var I=Jf(a,v,"hover",String(D));t.dispatch(Qf({active:!0,activeIndex:D.toString(),activeCoordinate:I}))}finally{zo=null,ya=null}};if(!l){d();return}i==="raf"?zo=requestAnimationFrame(d):typeof i=="number"&&ya===null&&(d(),Qh=null,ya=setTimeout(()=>{Qh?d():(ya=null,zo=null)},i))}});Xd.startListening({actionCreator:KT,effect:(e,t)=>{var r=t.getState(),i=r.rootProps.accessibilityLayer!==!1;if(i){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var l="0",d=_c(r,r.tooltip.settings.shared),a=Jf(r,d,"hover",String(l));t.dispatch(Qf({active:!0,activeIndex:l,activeCoordinate:a}))}}}});Xd.startListening({actionCreator:YT,effect:(e,t)=>{var r=t.getState(),i=r.rootProps.accessibilityLayer!==!1;if(i){var{keyboardInteraction:o}=r.tooltip;o.active&&t.dispatch(Qf({active:!1,activeIndex:o.index,activeCoordinate:o.coordinate}))}}});function VT(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,i)=>{if(i==="currentTarget")return t;var o=Reflect.get(r,i);return typeof o=="function"?o.bind(r):o}})}var Di=fi("externalEvent"),XT=ac(),Jh=new Map,Tu=new Map,rg=new Map;XT.startListening({actionCreator:Di,effect:(e,t)=>{var{handler:r,reactEvent:i}=e.payload;if(r!=null){var o=i.type,l=VT(i);rg.set(o,{handler:r,reactEvent:l});var d=Jh.get(o);d!==void 0&&(cancelAnimationFrame(d),Jh.delete(o));var a=t.getState(),{throttleDelay:u,throttledEvents:c}=a.eventSettings,p=c,f=p==="all"||(p==null?void 0:p.includes(o)),g=Tu.get(o);g!==void 0&&(typeof u!="number"||!f)&&(clearTimeout(g),Tu.delete(o));var b=()=>{var v=rg.get(o);try{if(!v)return;var{handler:y,reactEvent:x}=v,C=t.getState(),E={activeCoordinate:o$(C),activeDataKey:VD(C),activeIndex:cl(C),activeLabel:YD(C),activeTooltipIndex:cl(C),isTooltipActive:l$(C)};y&&y(E,x)}finally{Jh.delete(o),Tu.delete(o),rg.delete(o)}};if(!f){b();return}if(u==="raf"){var S=requestAnimationFrame(b);Jh.set(o,S)}else if(typeof u=="number"){if(!Tu.has(o)){b();var m=setTimeout(b,u);Tu.set(o,m)}}else b()}}});var aY=ue([Cl],e=>e.tooltipItemPayloads),oY=ue([aY,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var i=e.find(l=>l.settings.graphicalItemId===r);if(i!=null){var{getPosition:o}=i;if(o!=null)return o(t)}}}),ZT=fi("touchMove"),QT=ac(),ba=null,Rs=null,z3=null,Mu=null;QT.startListening({actionCreator:ZT,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Mu=VT(r);var i=t.getState(),{throttleDelay:o,throttledEvents:l}=i.eventSettings,d=l==="all"||l.includes("touchmove");ba!==null&&(cancelAnimationFrame(ba),ba=null),Rs!==null&&(typeof o!="number"||!d)&&(clearTimeout(Rs),Rs=null),z3=Array.from(r.touches).map(u=>Y1({clientX:u.clientX,clientY:u.clientY,currentTarget:r.currentTarget}));var a=()=>{if(Mu!=null){var u=t.getState(),c=_c(u,u.tooltip.settings.shared);if(c==="axis"){var p,f=(p=z3)===null||p===void 0?void 0:p[0];if(f==null){ba=null,Rs=null;return}var g=K1(u,f);(g==null?void 0:g.activeIndex)!=null&&t.dispatch(BD({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(c==="item"){var b,S=Mu.touches[0];if(document.elementFromPoint==null||S==null)return;var m=document.elementFromPoint(S.clientX,S.clientY);if(!m||!m.getAttribute)return;var v=m.getAttribute(SB),y=(b=m.getAttribute(xB))!==null&&b!==void 0?b:void 0,x=qa(u).find(D=>D.id===y);if(v==null||x==null||y==null)return;var{dataKey:C}=x,E=oY(u,v,y);t.dispatch(RD({activeDataKey:C,activeIndex:v,activeCoordinate:E,activeGraphicalItemId:y}))}ba=null,Rs=null}};if(!d){a();return}o==="raf"?ba=requestAnimationFrame(a):typeof o=="number"&&Rs===null&&(a(),Mu=null,Rs=setTimeout(()=>{Mu?a():(Rs=null,ba=null)},o))}}});var JT={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},eM=Pr({name:"eventSettings",initialState:JT,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:lY}=eM.actions,uY=eM.reducer,cY=$A({brush:zW,cartesianAxis:DW,chartData:aU,errorBars:wG,eventSettings:uY,graphicalItems:dW,layout:iB,legend:g9,options:tU,polarAxis:Oq,polarOptions:sY,referenceElements:qW,renderedTicks:lG,rootProps:tY,tooltip:gH,zIndex:$$}),hY=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return TP({reducer:cY,preloadedState:t,middleware:i=>{var o;return i({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((o="es6")!==null&&o!==void 0?o:"")}).concat([$T.middleware,UT.middleware,Xd.middleware,XT.middleware,QT.middleware])},enhancers:i=>{var o=i;return typeof i=="function"&&(o=i()),o.concat(i6({type:"raf"}))},devTools:{serialize:{replacer:eY},name:"recharts-".concat(r)}})};function fY(e){var{preloadedState:t,children:r,reduxStoreName:i}=e,o=vi(),l=j.useRef(null);if(o)return r;l.current==null&&(l.current=hY(t,i));var d=T_;return j.createElement(R9,{context:d,store:l.current},r)}function dY(e){var{layout:t,margin:r}=e,i=Bt(),o=vi();return j.useEffect(()=>{o||(i(eB(t)),i(JP(r)))},[i,o,t,r]),null}var pY=j.memo(dY,Od);function vY(e){var t=Bt();return j.useEffect(()=>{t(rY(e))},[t,e]),null}var mY=e=>{var t=Bt();return j.useEffect(()=>{t(lY(e))},[t,e]),null},gY=j.memo(mY,Od);function H3(e){var{zIndex:t,isPanorama:r}=e,i=j.useRef(null),o=Bt();return j.useLayoutEffect(()=>(i.current&&o(z$({zIndex:t,element:i.current,isPanorama:r})),()=>{o(H$({zIndex:t,isPanorama:r}))}),[o,t,r]),j.createElement("g",{tabIndex:-1,ref:i,className:"recharts-zIndex-layer_".concat(t)})}function $3(e){var{children:t,isPanorama:r}=e,i=Ne(O$);if(!i||i.length===0)return t;var o=i.filter(d=>d<0),l=i.filter(d=>d>0);return j.createElement(j.Fragment,null,o.map(d=>j.createElement(H3,{key:d,zIndex:d,isPanorama:r})),t,l.map(d=>j.createElement(H3,{key:d,zIndex:d,isPanorama:r})))}var _Y=["children"];function yY(e,t){if(e==null)return{};var r,i,o=bY(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function bY(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function nd(){return nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},nd.apply(null,arguments)}var SY={width:"100%",height:"100%",display:"block"},xY=j.forwardRef((e,t)=>{var r=JB(),i=e9(),o=L6();if(!Us(r)||!Us(i))return null;var{children:l,otherAttributes:d,title:a,desc:u}=e,c,p;return d!=null&&(typeof d.tabIndex=="number"?c=d.tabIndex:c=o?0:void 0,typeof d.role=="string"?p=d.role:p=o?"application":void 0),j.createElement(sA,nd({},d,{title:a,desc:u,role:p,tabIndex:c,width:r,height:i,style:SY,ref:t}),l)}),CY=e=>{var{children:t}=e,r=Ne(Ad);if(!r)return null;var{width:i,height:o,y:l,x:d}=r;return j.createElement(sA,{width:i,height:o,x:d,y:l},t)},U3=j.forwardRef((e,t)=>{var{children:r}=e,i=yY(e,_Y),o=vi();return o?j.createElement(CY,null,j.createElement($3,{isPanorama:!0},r)):j.createElement(xY,nd({ref:t},i),j.createElement($3,{isPanorama:!1},r))});function wY(){var e=Bt(),[t,r]=j.useState(null),i=Ne(bB);return j.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),l=o.width/t.offsetWidth;at(l)&&l!==i&&e(rB(l))}},[t,e,i]),r}function q3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function EY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?q3(Object(r),!0).forEach(function(i){AY(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function AY(e,t,r){return(t=DY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DY(e){var t=TY(e,"string");return typeof t=="symbol"?t:t+""}function TY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Hs.apply(null,arguments)}var MY=()=>(vU(),null);function sd(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var kY=j.forwardRef((e,t)=>{var r,i,o=j.useRef(null),[l,d]=j.useState({containerWidth:sd((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:sd((i=e.style)===null||i===void 0?void 0:i.height)}),a=j.useCallback((c,p)=>{d(f=>{var g=Math.round(c),b=Math.round(p);return f.containerWidth===g&&f.containerHeight===b?f:{containerWidth:g,containerHeight:b}})},[]),u=j.useCallback(c=>{if(typeof t=="function"&&t(c),o.current!=null&&(o.current.disconnect(),o.current=null),c!=null&&typeof ResizeObserver<"u"){var{width:p,height:f}=c.getBoundingClientRect();a(p,f);var g=S=>{var m=S[0];if(m!=null){var{width:v,height:y}=m.contentRect;a(v,y)}},b=new ResizeObserver(g);b.observe(c),o.current=b}},[t,a]);return j.useEffect(()=>()=>{var c=o.current;c!=null&&c.disconnect()},[a]),j.createElement(j.Fragment,null,j.createElement(lc,{width:l.containerWidth,height:l.containerHeight}),j.createElement("div",Hs({ref:u},e)))}),OY=j.forwardRef((e,t)=>{var{width:r,height:i}=e,[o,l]=j.useState({containerWidth:sd(r),containerHeight:sd(i)}),d=j.useCallback((u,c)=>{l(p=>{var f=Math.round(u),g=Math.round(c);return p.containerWidth===f&&p.containerHeight===g?p:{containerWidth:f,containerHeight:g}})},[]),a=j.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null){var{width:c,height:p}=u.getBoundingClientRect();d(c,p)}},[t,d]);return j.createElement(j.Fragment,null,j.createElement(lc,{width:o.containerWidth,height:o.containerHeight}),j.createElement("div",Hs({ref:a},e)))}),LY=j.forwardRef((e,t)=>{var{width:r,height:i}=e;return j.createElement(j.Fragment,null,j.createElement(lc,{width:r,height:i}),j.createElement("div",Hs({ref:t},e)))}),RY=j.forwardRef((e,t)=>{var{width:r,height:i}=e;return typeof r=="string"||typeof i=="string"?j.createElement(OY,Hs({},e,{ref:t})):typeof r=="number"&&typeof i=="number"?j.createElement(LY,Hs({},e,{width:r,height:i,ref:t})):j.createElement(j.Fragment,null,j.createElement(lc,{width:r,height:i}),j.createElement("div",Hs({ref:t},e)))});function PY(e){return e?kY:RY}var BY=j.forwardRef((e,t)=>{var{children:r,className:i,height:o,onClick:l,onContextMenu:d,onDoubleClick:a,onMouseDown:u,onMouseEnter:c,onMouseLeave:p,onMouseMove:f,onMouseUp:g,onTouchEnd:b,onTouchMove:S,onTouchStart:m,style:v,width:y,responsive:x,dispatchTouchEvents:C=!0}=e,E=j.useRef(null),D=Bt(),[w,M]=j.useState(null),[T,O]=j.useState(null),L=wY(),P=I_(),R=(P==null?void 0:P.width)>0?P.width:y,I=(P==null?void 0:P.height)>0?P.height:o,$=j.useCallback(Q=>{L(Q),typeof t=="function"&&t(Q),M(Q),O(Q),Q!=null&&(E.current=Q)},[L,t,M,O]),V=j.useCallback(Q=>{D(HT(Q)),D(Di({handler:l,reactEvent:Q}))},[D,l]),U=j.useCallback(Q=>{D(u_(Q)),D(Di({handler:c,reactEvent:Q}))},[D,c]),K=j.useCallback(Q=>{D(PD()),D(Di({handler:p,reactEvent:Q}))},[D,p]),G=j.useCallback(Q=>{D(u_(Q)),D(Di({handler:f,reactEvent:Q}))},[D,f]),N=j.useCallback(()=>{D(KT())},[D]),H=j.useCallback(()=>{D(YT())},[D]),z=j.useCallback(Q=>{D(GT(Q.key))},[D]),q=j.useCallback(Q=>{D(Di({handler:d,reactEvent:Q}))},[D,d]),J=j.useCallback(Q=>{D(Di({handler:a,reactEvent:Q}))},[D,a]),ie=j.useCallback(Q=>{D(Di({handler:u,reactEvent:Q}))},[D,u]),pe=j.useCallback(Q=>{D(Di({handler:g,reactEvent:Q}))},[D,g]),he=j.useCallback(Q=>{D(Di({handler:m,reactEvent:Q}))},[D,m]),Z=j.useCallback(Q=>{C&&D(ZT(Q)),D(Di({handler:S,reactEvent:Q}))},[D,C,S]),W=j.useCallback(Q=>{D(Di({handler:b,reactEvent:Q}))},[D,b]),te=PY(x);return j.createElement(rT.Provider,{value:w},j.createElement(aR.Provider,{value:T},j.createElement(te,{width:R??(v==null?void 0:v.width),height:I??(v==null?void 0:v.height),className:Dt("recharts-wrapper",i),style:EY({position:"relative",cursor:"default",width:R,height:I},v),onClick:V,onContextMenu:q,onDoubleClick:J,onFocus:N,onBlur:H,onKeyDown:z,onMouseDown:ie,onMouseEnter:U,onMouseLeave:K,onMouseMove:G,onMouseUp:pe,onTouchEnd:W,onTouchMove:Z,onTouchStart:he,ref:$},j.createElement(MY,null),r)))}),IY=["width","height","responsive","children","className","style","compact","title","desc"];function NY(e,t){if(e==null)return{};var r,i,o=jY(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function jY(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var FY=j.forwardRef((e,t)=>{var{width:r,height:i,responsive:o,children:l,className:d,style:a,compact:u,title:c,desc:p}=e,f=NY(e,IY),g=$s(f);return u?j.createElement(j.Fragment,null,j.createElement(lc,{width:r,height:i}),j.createElement(U3,{otherAttributes:g,title:c,desc:p},l)):j.createElement(BY,{className:d,style:a,width:r,height:i,responsive:o??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},j.createElement(U3,{otherAttributes:g,title:c,desc:p,ref:t},j.createElement(GW,null,l)))});function c_(){return c_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},c_.apply(null,arguments)}function W3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function zY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?W3(Object(r),!0).forEach(function(i){HY(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W3(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function HY(e,t,r){return(t=$Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $Y(e){var t=UY(e,"string");return typeof t=="symbol"?t:t+""}function UY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qY={top:5,right:5,bottom:5,left:5},WY=zY({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:qY,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},JT),GY=j.forwardRef(function(t,r){var i,o=Pi(t.categoricalChartProps,WY),{chartName:l,defaultTooltipEventType:d,validateTooltipEventTypes:a,tooltipPayloadSearcher:u,categoricalChartProps:c}=t,p={chartName:l,defaultTooltipEventType:d,validateTooltipEventTypes:a,tooltipPayloadSearcher:u,eventEmitter:void 0};return j.createElement(fY,{preloadedState:{options:p},reduxStoreName:(i=c.id)!==null&&i!==void 0?i:l},j.createElement(FW,{chartData:c.data}),j.createElement(pY,{layout:o.layout,margin:o.margin}),j.createElement(gY,{throttleDelay:o.throttleDelay,throttledEvents:o.throttledEvents}),j.createElement(vY,{baseValue:o.baseValue,accessibilityLayer:o.accessibilityLayer,barCategoryGap:o.barCategoryGap,maxBarSize:o.maxBarSize,stackOffset:o.stackOffset,barGap:o.barGap,barSize:o.barSize,syncId:o.syncId,syncMethod:o.syncMethod,className:o.className,reverseStackOrder:o.reverseStackOrder}),j.createElement(FY,c_({},o,{ref:r})))}),KY=["axis","item"],YY=j.forwardRef((e,t)=>j.createElement(GY,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:KY,tooltipPayloadSearcher:J$,categoricalChartProps:e,ref:t}));const G3=["#6366f1","#8b5cf6","#a78bfa","#c4b5fd","#ddd6fe","#818cf8","#4f46e5","#7c3aed","#5b21b6","#3730a3"];function ad(e,t=1,r=""){return e===null?"—":`${Number(e.toFixed(t))}${r}`}function K3(e){return e===null?"—":`$${e.toFixed(2)}`}function Y3(e){return e===null?"—":`${e.toFixed(1)}%`}function tM({title:e,error:t,defaultOpen:r=!0,children:i}){const[o,l]=j.useState(r);return B.jsxs("section",{className:"analytics-section",children:[B.jsxs("h3",{className:"analytics-section-title",onClick:()=>l(!o),style:{cursor:"pointer",userSelect:"none"},children:[B.jsx("span",{className:"analytics-collapse-icon",children:o?"▾":"▸"}),e]}),t&&B.jsx("div",{className:"analytics-error",children:t}),o&&i]})}function h_({children:e}){return B.jsx("div",{className:"analytics-metric-grid",children:e})}function Vn({label:e,value:t}){return B.jsxs("div",{className:"analytics-metric",children:[B.jsx("span",{className:"analytics-metric-value",children:t}),B.jsx("span",{className:"analytics-metric-label",children:e})]})}function hf({data:e,dataKey:t,nameKey:r,color:i,formatter:o}){if(e.length===0)return null;const l=Math.max(120,e.length*28+30);return B.jsx(XB,{width:"100%",height:l,children:B.jsxs(YY,{data:e,layout:"vertical",margin:{top:4,right:40,bottom:4,left:0},children:[B.jsx(FT,{type:"number",hide:!0}),B.jsx(zT,{type:"category",dataKey:r,width:80,tick:{fontSize:10,fill:"var(--text-secondary)"}}),B.jsx(CU,{formatter:o?(d=>typeof d=="number"?o(d):""):void 0,contentStyle:{background:"var(--bg-primary)",border:"1px solid var(--border-color)",fontSize:11,borderRadius:4},labelStyle:{color:"var(--text-primary)"},itemStyle:{color:"var(--text-secondary)"}}),B.jsx(NT,{dataKey:t,radius:[0,3,3,0],children:e.map((d,a)=>B.jsx($1,{fill:i??G3[a%G3.length]},a))})]})})}function V3(e){return e===null?"—":e<1?`${Math.round(e*60)}m`:`${Number(e.toFixed(1))}h`}function VY({activity:e,errors:t}){const r=Object.entries(e.projectsByProtocol).map(([i,o])=>({name:i.toUpperCase(),count:o.count,avgWallClock:o.avgWallClockHours,avgAgentTime:o.avgAgentTimeHours})).sort((i,o)=>o.count-i.count);return B.jsxs(tM,{title:"Activity",error:t==null?void 0:t.github,children:[r.length>0&&B.jsxs("div",{className:"analytics-sub-section",children:[B.jsx("h4",{className:"analytics-sub-title",children:"Projects by Protocol"}),B.jsx(h_,{children:r.map(i=>B.jsx(Vn,{label:i.name,value:`${i.count} (wall ${V3(i.avgWallClock)}${i.avgAgentTime!=null?`, agent ${V3(i.avgAgentTime)}`:""})`},i.name))}),B.jsx(hf,{data:r,dataKey:"count",nameKey:"name"})]}),B.jsxs(h_,{children:[B.jsx(Vn,{label:"PRs Merged",value:String(e.prsMerged)}),B.jsx(Vn,{label:"Issues Closed",value:String(e.issuesClosed)}),B.jsx(Vn,{label:"Median Time to Merge",value:ad(e.medianTimeToMergeHours,1,"h")}),B.jsx(Vn,{label:"Median Time to Close Bugs",value:ad(e.medianTimeToCloseBugsHours,1,"h")})]})]})}function XY({consultation:e,errors:t}){const r=e.byModel.map(l=>({name:l.model,count:l.count,cost:l.totalCost??0,latency:l.avgLatency,success:l.successRate})),i=Object.entries(e.byReviewType).map(([l,d])=>({name:l,value:d})),o=Object.entries(e.byProtocol).map(([l,d])=>({name:l,value:d}));return B.jsxs(tM,{title:"Consultation",error:t==null?void 0:t.consultation,children:[B.jsxs(h_,{children:[B.jsx(Vn,{label:"Total Consultations",value:String(e.totalCount)}),B.jsx(Vn,{label:"Total Cost",value:K3(e.totalCostUsd)}),B.jsx(Vn,{label:"Avg Latency",value:ad(e.avgLatencySeconds,1,"s")}),B.jsx(Vn,{label:"Success Rate",value:Y3(e.successRate)})]}),r.length>0&&B.jsxs("div",{className:"analytics-sub-section",children:[B.jsx("h4",{className:"analytics-sub-title",children:"Cost by Model"}),B.jsx(hf,{data:r,dataKey:"cost",nameKey:"name",formatter:l=>`$${l.toFixed(2)}`})]}),r.length>0&&B.jsxs("div",{className:"analytics-sub-section",children:[B.jsx("h4",{className:"analytics-sub-title",children:"Per Model"}),B.jsxs("table",{className:"analytics-table",children:[B.jsx("thead",{children:B.jsxs("tr",{children:[B.jsx("th",{children:"Model"}),B.jsx("th",{children:"Count"}),B.jsx("th",{children:"Cost"}),B.jsx("th",{children:"Latency"}),B.jsx("th",{children:"Success"})]})}),B.jsx("tbody",{children:e.byModel.map(l=>B.jsxs("tr",{children:[B.jsx("td",{children:l.model}),B.jsx("td",{children:l.count}),B.jsx("td",{children:K3(l.totalCost)}),B.jsx("td",{children:ad(l.avgLatency,1,"s")}),B.jsx("td",{children:Y3(l.successRate)})]},l.model))})]})]}),(i.length>0||o.length>0)&&B.jsxs("div",{className:"analytics-charts-row",children:[i.length>0&&B.jsxs("div",{className:"analytics-sub-section analytics-chart-half",children:[B.jsx("h4",{className:"analytics-sub-title",children:"By Review Type"}),B.jsx(hf,{data:i,dataKey:"value",nameKey:"name"})]}),o.length>0&&B.jsxs("div",{className:"analytics-sub-section analytics-chart-half",children:[B.jsx("h4",{className:"analytics-sub-title",children:"By Protocol"}),B.jsx(hf,{data:o,dataKey:"value",nameKey:"name"})]})]})]})}function ZY({isActive:e}){const{data:t,error:r,loading:i,range:o,setRange:l,refresh:d}=X8(e),a=["24h","7d","30d","all"];return B.jsx("div",{className:"analytics-view",children:B.jsxs("div",{className:"analytics-content",children:[B.jsxs("div",{className:"analytics-header",children:[B.jsx("h2",{className:"analytics-title",children:"Analytics"}),B.jsxs("div",{className:"analytics-actions",children:[B.jsx("div",{className:"analytics-range-selector",children:a.map(u=>B.jsx("button",{className:`analytics-range-btn ${o===u?"active":""}`,onClick:()=>l(u),children:u==="all"?"All":u},u))}),B.jsx("button",{className:"work-btn work-btn-secondary",onClick:d,disabled:i,children:i?"Loading...":"Refresh"})]})]}),r&&!t&&B.jsx("div",{className:"analytics-error",children:r}),i&&!t&&B.jsx("div",{className:"analytics-loading",children:"Loading analytics..."}),t&&B.jsxs(B.Fragment,{children:[B.jsx(VY,{activity:t.activity,errors:t.errors}),B.jsx(XY,{consultation:t.consultation,errors:t.errors})]})]})})}function QY(e){const[t,r]=j.useState(null),[i,o]=j.useState(null),[l,d]=j.useState(!1),a=j.useCallback(async()=>{d(!0),o(null);try{const c=await uL();r(c)}catch(c){o(c instanceof Error?c.message:"Failed to fetch team data")}finally{d(!1)}},[]);j.useEffect(()=>{e&&a()},[e,a]);const u=j.useCallback(()=>{a()},[a]);return{data:t,error:i,loading:l,refresh:u}}function JY(e){if(!e)return"";const t=Date.now()-new Date(e).getTime();if(!isFinite(t)||t<0)return"";const r=Math.floor(t/(1e3*60*60));return r<1?"<1h waiting":r<24?`${r}h waiting`:`${Math.floor(r/24)}d waiting`}function eV({entries:e}){return e.length===0?null:B.jsxs("div",{className:"team-member-section team-review-blocking",children:[B.jsx("span",{className:"team-section-label",children:"Review blocking"}),B.jsx("ul",{className:"team-review-blocking-list",children:e.map((t,r)=>B.jsxs("li",{className:"team-review-blocking-item",children:[B.jsxs("span",{className:"team-review-blocking-sentence",children:[t.direction==="authored"?B.jsxs(B.Fragment,{children:["You're waiting for ",B.jsx("strong",{children:t.otherName})," to review"," "]}):B.jsxs(B.Fragment,{children:[B.jsx("strong",{children:t.otherName})," is waiting for you to review"," "]}),B.jsxs("a",{className:"team-item-link team-review-blocking-link",href:t.pr.url,target:"_blank",rel:"noopener noreferrer",children:["#",t.pr.number," ",t.pr.title]})]}),B.jsx("span",{className:"team-review-blocking-age",children:JY(t.pr.createdAt)})]},`${t.direction}-${t.pr.number}-${t.otherGithub}-${r}`))})]})}function tV({member:e}){const t=e.github_data,r=(t==null?void 0:t.recentActivity.mergedPRs.length)??0,i=(t==null?void 0:t.recentActivity.closedIssues.length)??0;return B.jsxs("div",{className:"team-member-card",children:[B.jsxs("div",{className:"team-member-header",children:[B.jsx("span",{className:"team-member-name",children:e.name}),B.jsx("span",{className:"team-member-role",children:e.role})]}),B.jsxs("a",{className:"team-member-github",href:`https://github.com/${e.github}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.github]}),t&&B.jsxs(B.Fragment,{children:[B.jsxs("div",{className:"team-member-section",children:[B.jsx("span",{className:"team-section-label",children:"Working on"}),t.assignedIssues.length>0?B.jsx("div",{className:"team-item-list",children:t.assignedIssues.map(o=>B.jsxs("a",{className:"team-item-link",href:o.url,target:"_blank",rel:"noopener noreferrer",children:["#",o.number," ",o.title]},o.number))}):B.jsx("span",{className:"team-item-empty",children:"No assigned issues"})]}),B.jsxs("div",{className:"team-member-section",children:[B.jsx("span",{className:"team-section-label",children:"Open PRs"}),t.openPRs.length>0?B.jsx("div",{className:"team-item-list",children:t.openPRs.map(o=>B.jsxs("a",{className:"team-item-link",href:o.url,target:"_blank",rel:"noopener noreferrer",children:["#",o.number," ",o.title]},o.number))}):B.jsx("span",{className:"team-item-empty",children:"No open PRs"})]}),B.jsx(eV,{entries:t.reviewBlocking??[]})]}),(r>0||i>0)&&B.jsxs("div",{className:"team-member-activity",children:[r>0&&B.jsxs("span",{children:[r," merged"]}),i>0&&B.jsxs("span",{children:[i," closed"]}),B.jsx("span",{className:"team-activity-label",children:"last 7d"})]})]})}function rV({message:e}){return B.jsxs("div",{className:"team-message",children:[B.jsxs("div",{className:"team-message-header",children:[B.jsx("span",{className:"team-message-author",children:e.author}),B.jsx("span",{className:"team-message-time",children:e.timestamp})]}),B.jsx("div",{className:"team-message-body",children:e.body})]})}function iV(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/(1e3*60*60));return r<1?"just now":r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function nV(e){const t=[];for(const r of e){const i=r.github_data;if(i){for(const o of i.recentActivity.mergedPRs)t.push({type:"merged",number:o.number,title:o.title,url:o.url,timestamp:o.mergedAt,author:r.github});for(const o of i.recentActivity.closedIssues)t.push({type:"closed",number:o.number,title:o.title,url:o.url,timestamp:o.closedAt,author:r.github})}}return t.sort((r,i)=>new Date(i.timestamp).getTime()-new Date(r.timestamp).getTime()),t}function sV({members:e}){const t=nV(e);return t.length===0?B.jsx("div",{className:"team-no-messages",children:"No recent activity"}):B.jsx("div",{className:"team-activity-feed",children:t.map((r,i)=>B.jsxs("a",{className:"team-activity-entry",href:r.url,target:"_blank",rel:"noopener noreferrer",children:[B.jsx("span",{className:"team-activity-date",children:iV(r.timestamp)}),B.jsxs("span",{className:"team-activity-author",children:["@",r.author]}),B.jsx("span",{className:"team-activity-action",children:r.type}),B.jsxs("span",{className:"team-activity-ref",children:["#",r.number]}),B.jsx("span",{className:"team-activity-title",children:r.title})]},`${r.type}-${r.number}-${i}`))})}function aV({isActive:e}){const{data:t,error:r,loading:i,refresh:o}=QY(e);if(i&&!t)return B.jsx("div",{className:"team-view",children:B.jsx("div",{className:"team-loading",children:"Loading team data..."})});if(r&&!t)return B.jsx("div",{className:"team-view",children:B.jsx("div",{className:"team-error",children:r})});if(!t||!t.enabled)return null;const l=t.members??[],a=[...t.messages??[]].reverse();return B.jsx("div",{className:"team-view",children:B.jsxs("div",{className:"team-content",children:[B.jsxs("div",{className:"team-header",children:[B.jsx("h2",{className:"team-title",children:"Team"}),B.jsx("button",{className:"team-refresh-btn",onClick:o,disabled:i,children:i?"Refreshing...":"Refresh"})]}),t.githubError&&B.jsx("div",{className:"team-error",children:t.githubError}),B.jsxs("div",{className:"team-section",children:[B.jsxs("h3",{className:"team-section-title",children:["Members (",l.length,")"]}),B.jsx("div",{className:"team-member-grid",children:l.map(u=>B.jsx(tV,{member:u},u.github))})]}),B.jsxs("div",{className:"team-section",children:[B.jsx("h3",{className:"team-section-title",children:"Messages"}),a.length===0?B.jsx("div",{className:"team-no-messages",children:"No messages yet"}):B.jsx("div",{className:"team-messages",children:a.map((u,c)=>B.jsx(rV,{message:u},c))})]}),B.jsxs("div",{className:"team-section",children:[B.jsx("h3",{className:"team-section-title",children:"Recent Activity"}),B.jsx(sV,{members:l})]})]})})}const X3={};function oV(e){let t=X3[e];if(t)return t;t=X3[e]=[];for(let r=0;r<128;r++){const i=String.fromCharCode(r);t.push(i)}for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function hl(e,t){typeof t!="string"&&(t=hl.defaultChars);const r=oV(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let o="";for(let l=0,d=i.length;l<d;l+=3){const a=parseInt(i.slice(l+1,l+3),16);if(a<128){o+=r[a];continue}if((a&224)===192&&l+3<d){const u=parseInt(i.slice(l+4,l+6),16);if((u&192)===128){const c=a<<6&1984|u&63;c<128?o+="��":o+=String.fromCharCode(c),l+=3;continue}}if((a&240)===224&&l+6<d){const u=parseInt(i.slice(l+4,l+6),16),c=parseInt(i.slice(l+7,l+9),16);if((u&192)===128&&(c&192)===128){const p=a<<12&61440|u<<6&4032|c&63;p<2048||p>=55296&&p<=57343?o+="���":o+=String.fromCharCode(p),l+=6;continue}}if((a&248)===240&&l+9<d){const u=parseInt(i.slice(l+4,l+6),16),c=parseInt(i.slice(l+7,l+9),16),p=parseInt(i.slice(l+10,l+12),16);if((u&192)===128&&(c&192)===128&&(p&192)===128){let f=a<<18&1835008|u<<12&258048|c<<6&4032|p&63;f<65536||f>1114111?o+="����":(f-=65536,o+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),l+=9;continue}}o+="�"}return o})}hl.defaultChars=";/?:@&=+$,#";hl.componentChars="";const Z3={};function lV(e){let t=Z3[e];if(t)return t;t=Z3[e]=[];for(let r=0;r<128;r++){const i=String.fromCharCode(r);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}function Sc(e,t,r){typeof t!="string"&&(r=t,t=Sc.defaultChars),typeof r>"u"&&(r=!0);const i=lV(t);let o="";for(let l=0,d=e.length;l<d;l++){const a=e.charCodeAt(l);if(r&&a===37&&l+2<d&&/^[0-9a-f]{2}$/i.test(e.slice(l+1,l+3))){o+=e.slice(l,l+3),l+=2;continue}if(a<128){o+=i[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&l+1<d){const u=e.charCodeAt(l+1);if(u>=56320&&u<=57343){o+=encodeURIComponent(e[l]+e[l+1]),l++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[l])}return o}Sc.defaultChars=";/?:@&=+$,-_.!~*'()#";Sc.componentChars="-_.!~*'()";function V1(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function od(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const uV=/^([a-z0-9.+-]+:)/i,cV=/:[0-9]*$/,hV=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,fV=["<",">",'"',"`"," ","\r",`
|
|
199
|
+
`," "],dV=["{","}","|","\\","^","`"].concat(fV),pV=["'"].concat(dV),Q3=["%","/","?",";","#"].concat(pV),J3=["/","?","#"],vV=255,eE=/^[+a-z0-9A-Z_-]{0,63}$/,mV=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,tE={javascript:!0,"javascript:":!0},rE={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function X1(e,t){if(e&&e instanceof od)return e;const r=new od;return r.parse(e,t),r}od.prototype.parse=function(e,t){let r,i,o,l=e;if(l=l.trim(),!t&&e.split("#").length===1){const c=hV.exec(l);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let d=uV.exec(l);if(d&&(d=d[0],r=d.toLowerCase(),this.protocol=d,l=l.substr(d.length)),(t||d||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=l.substr(0,2)==="//",o&&!(d&&tE[d])&&(l=l.substr(2),this.slashes=!0)),!tE[d]&&(o||d&&!rE[d])){let c=-1;for(let S=0;S<J3.length;S++)i=l.indexOf(J3[S]),i!==-1&&(c===-1||i<c)&&(c=i);let p,f;c===-1?f=l.lastIndexOf("@"):f=l.lastIndexOf("@",c),f!==-1&&(p=l.slice(0,f),l=l.slice(f+1),this.auth=p),c=-1;for(let S=0;S<Q3.length;S++)i=l.indexOf(Q3[S]),i!==-1&&(c===-1||i<c)&&(c=i);c===-1&&(c=l.length),l[c-1]===":"&&c--;const g=l.slice(0,c);l=l.slice(c),this.parseHost(g),this.hostname=this.hostname||"";const b=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!b){const S=this.hostname.split(/\./);for(let m=0,v=S.length;m<v;m++){const y=S[m];if(y&&!y.match(eE)){let x="";for(let C=0,E=y.length;C<E;C++)y.charCodeAt(C)>127?x+="x":x+=y[C];if(!x.match(eE)){const C=S.slice(0,m),E=S.slice(m+1),D=y.match(mV);D&&(C.push(D[1]),E.unshift(D[2])),E.length&&(l=E.join(".")+l),this.hostname=C.join(".");break}}}}this.hostname.length>vV&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=l.indexOf("#");a!==-1&&(this.hash=l.substr(a),l=l.slice(0,a));const u=l.indexOf("?");return u!==-1&&(this.search=l.substr(u),l=l.slice(0,u)),l&&(this.pathname=l),rE[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};od.prototype.parseHost=function(e){let t=cV.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const gV=Object.freeze(Object.defineProperty({__proto__:null,decode:hl,encode:Sc,format:V1,parse:X1},Symbol.toStringTag,{value:"Module"})),rM=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,iM=/[\0-\x1F\x7F-\x9F]/,_V=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Z1=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,nM=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,sM=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,yV=Object.freeze(Object.defineProperty({__proto__:null,Any:rM,Cc:iM,Cf:_V,P:Z1,S:nM,Z:sM},Symbol.toStringTag,{value:"Module"})),bV=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),SV=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ig;const xV=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),CV=(ig=String.fromCodePoint)!==null&&ig!==void 0?ig:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function wV(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=xV.get(e))!==null&&t!==void 0?t:e}var dr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(dr||(dr={}));const EV=32;var Fs;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fs||(Fs={}));function f_(e){return e>=dr.ZERO&&e<=dr.NINE}function AV(e){return e>=dr.UPPER_A&&e<=dr.UPPER_F||e>=dr.LOWER_A&&e<=dr.LOWER_F}function DV(e){return e>=dr.UPPER_A&&e<=dr.UPPER_Z||e>=dr.LOWER_A&&e<=dr.LOWER_Z||f_(e)}function TV(e){return e===dr.EQUALS||DV(e)}var hr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(hr||(hr={}));var Xn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Xn||(Xn={}));class MV{constructor(t,r,i){this.decodeTree=t,this.emitCodePoint=r,this.errors=i,this.state=hr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xn.Strict}startEntity(t){this.decodeMode=t,this.state=hr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case hr.EntityStart:return t.charCodeAt(r)===dr.NUM?(this.state=hr.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=hr.NamedEntity,this.stateNamedEntity(t,r));case hr.NumericStart:return this.stateNumericStart(t,r);case hr.NumericDecimal:return this.stateNumericDecimal(t,r);case hr.NumericHex:return this.stateNumericHex(t,r);case hr.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|EV)===dr.LOWER_X?(this.state=hr.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=hr.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,i,o){if(r!==i){const l=i-r;this.result=this.result*Math.pow(o,l)+parseInt(t.substr(r,l),o),this.consumed+=l}}stateNumericHex(t,r){const i=r;for(;r<t.length;){const o=t.charCodeAt(r);if(f_(o)||AV(o))r+=1;else return this.addToNumericResult(t,i,r,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,i,r,16),-1}stateNumericDecimal(t,r){const i=r;for(;r<t.length;){const o=t.charCodeAt(r);if(f_(o))r+=1;else return this.addToNumericResult(t,i,r,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,i,r,10),-1}emitNumericEntity(t,r){var i;if(this.consumed<=r)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===dr.SEMI)this.consumed+=1;else if(this.decodeMode===Xn.Strict)return 0;return this.emitCodePoint(wV(this.result),this.consumed),this.errors&&(t!==dr.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:i}=this;let o=i[this.treeIndex],l=(o&Fs.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const d=t.charCodeAt(r);if(this.treeIndex=kV(i,o,this.treeIndex+Math.max(1,l),d),this.treeIndex<0)return this.result===0||this.decodeMode===Xn.Attribute&&(l===0||TV(d))?0:this.emitNotTerminatedNamedEntity();if(o=i[this.treeIndex],l=(o&Fs.VALUE_LENGTH)>>14,l!==0){if(d===dr.SEMI)return this.emitNamedEntityData(this.treeIndex,l,this.consumed+this.excess);this.decodeMode!==Xn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:i}=this,o=(i[r]&Fs.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,i){const{decodeTree:o}=this;return this.emitCodePoint(r===1?o[t]&~Fs.VALUE_LENGTH:o[t+1],i),r===3&&this.emitCodePoint(o[t+2],i),i}end(){var t;switch(this.state){case hr.NamedEntity:return this.result!==0&&(this.decodeMode!==Xn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case hr.NumericDecimal:return this.emitNumericEntity(0,2);case hr.NumericHex:return this.emitNumericEntity(0,3);case hr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case hr.EntityStart:return 0}}}function aM(e){let t="";const r=new MV(e,i=>t+=CV(i));return function(o,l){let d=0,a=0;for(;(a=o.indexOf("&",a))>=0;){t+=o.slice(d,a),r.startEntity(l);const c=r.write(o,a+1);if(c<0){d=a+r.end();break}d=a+c,a=c===0?d+1:d}const u=t+o.slice(d);return t="",u}}function kV(e,t,r,i){const o=(t&Fs.BRANCH_LENGTH)>>7,l=t&Fs.JUMP_TABLE;if(o===0)return l!==0&&i===l?r:-1;if(l){const u=i-l;return u<0||u>=o?-1:e[r+u]-1}let d=r,a=d+o-1;for(;d<=a;){const u=d+a>>>1,c=e[u];if(c<i)d=u+1;else if(c>i)a=u-1;else return e[u+o]}return-1}const oM=aM(bV);aM(SV);function OV(e,t=Xn.Legacy){return oM(e,t)}function LV(e){return oM(e,Xn.Strict)}function RV(e){return Object.prototype.toString.call(e)}function Q1(e){return RV(e)==="[object String]"}const PV=Object.prototype.hasOwnProperty;function BV(e,t){return PV.call(e,t)}function Zd(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(i){e[i]=r[i]})}}),e}function lM(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function J1(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Qu(e){if(e>65535){e-=65536;const t=55296+(e>>10),r=56320+(e&1023);return String.fromCharCode(t,r)}return String.fromCharCode(e)}const uM=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,IV=/&([a-z#][a-z0-9]{1,31});/gi,NV=new RegExp(uM.source+"|"+IV.source,"gi"),jV=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function FV(e,t){if(t.charCodeAt(0)===35&&jV.test(t)){const i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return J1(i)?Qu(i):e}const r=OV(e);return r!==e?r:e}function zV(e){return e.indexOf("\\")<0?e:e.replace(uM,"$1")}function fl(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(NV,function(t,r,i){return r||FV(t,i)})}const HV=/[&<>"]/,$V=/[&<>"]/g,UV={"&":"&","<":"<",">":">",'"':"""};function qV(e){return UV[e]}function Ws(e){return HV.test(e)?e.replace($V,qV):e}const WV=/[.?*+^$[\]\\(){}|-]/g;function GV(e){return e.replace(WV,"\\$&")}function St(e){switch(e){case 9:case 32:return!0}return!1}function Ju(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function cM(e){return Z1.test(e)||nM.test(e)}function ec(e){return cM(Qu(e))}function tc(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Qd(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function iE(e){return e===32||e===9||e===10||e===13}function Jd(e){let t=0;for(;t<e.length&&iE(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&iE(e.charCodeAt(r));r--);return e.slice(t,r+1)}const KV={mdurl:gV,ucmicro:yV},YV=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:lM,asciiTrim:Jd,assign:Zd,escapeHtml:Ws,escapeRE:GV,fromCodePoint:Qu,has:BV,isMdAsciiPunct:tc,isPunctChar:cM,isPunctCharCode:ec,isSpace:St,isString:Q1,isValidEntityCode:J1,isWhiteSpace:Ju,lib:KV,normalizeReference:Qd,unescapeAll:fl,unescapeMd:zV},Symbol.toStringTag,{value:"Module"}));function VV(e,t,r){let i,o,l,d;const a=e.posMax,u=e.pos;for(e.pos=t+1,i=1;e.pos<a;){if(l=e.src.charCodeAt(e.pos),l===93&&(i--,i===0)){o=!0;break}if(d=e.pos,e.md.inline.skipToken(e),l===91){if(d===e.pos-1)i++;else if(r)return e.pos=u,-1}}let c=-1;return o&&(c=e.pos),e.pos=u,c}function XV(e,t,r){let i,o=t;const l={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<r;){if(i=e.charCodeAt(o),i===10||i===60)return l;if(i===62)return l.pos=o+1,l.str=fl(e.slice(t+1,o)),l.ok=!0,l;if(i===92&&o+1<r){o+=2;continue}o++}return l}let d=0;for(;o<r&&(i=e.charCodeAt(o),!(i===32||i<32||i===127));){if(i===92&&o+1<r){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(i===40&&(d++,d>32))return l;if(i===41){if(d===0)break;d--}o++}return t===o||d!==0||(l.str=fl(e.slice(t,o)),l.pos=o,l.ok=!0),l}function ZV(e,t,r,i){let o,l=t;const d={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)d.str=i.str,d.marker=i.marker;else{if(l>=r)return d;let a=e.charCodeAt(l);if(a!==34&&a!==39&&a!==40)return d;t++,l++,a===40&&(a=41),d.marker=a}for(;l<r;){if(o=e.charCodeAt(l),o===d.marker)return d.pos=l+1,d.str+=fl(e.slice(t,l)),d.ok=!0,d;if(o===40&&d.marker===41)return d;o===92&&l+1<r&&l++,l++}return d.can_continue=!0,d.str+=fl(e.slice(t,l)),d}const QV=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:XV,parseLinkLabel:VV,parseLinkTitle:ZV},Symbol.toStringTag,{value:"Module"})),yn={};yn.code_inline=function(e,t,r,i,o){const l=e[t];return"<code"+o.renderAttrs(l)+">"+Ws(l.content)+"</code>"};yn.code_block=function(e,t,r,i,o){const l=e[t];return"<pre"+o.renderAttrs(l)+"><code>"+Ws(e[t].content)+`</code></pre>
|
|
200
|
+
`};yn.fence=function(e,t,r,i,o){const l=e[t],d=l.info?fl(l.info).trim():"";let a="",u="";if(d){const p=d.split(/(\s+)/g);a=p[0],u=p.slice(2).join("")}let c;if(r.highlight?c=r.highlight(l.content,a,u)||Ws(l.content):c=Ws(l.content),c.indexOf("<pre")===0)return c+`
|
|
201
|
+
`;if(d){const p=l.attrIndex("class"),f=l.attrs?l.attrs.slice():[];p<0?f.push(["class",r.langPrefix+a]):(f[p]=f[p].slice(),f[p][1]+=" "+r.langPrefix+a);const g={attrs:f};return`<pre><code${o.renderAttrs(g)}>${c}</code></pre>
|
|
202
|
+
`}return`<pre><code${o.renderAttrs(l)}>${c}</code></pre>
|
|
203
|
+
`};yn.image=function(e,t,r,i,o){const l=e[t];return l.attrs[l.attrIndex("alt")][1]=o.renderInlineAsText(l.children,r,i),o.renderToken(e,t,r)};yn.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
204
|
+
`:`<br>
|
|
205
|
+
`};yn.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
206
|
+
`:`<br>
|
|
207
|
+
`:`
|
|
208
|
+
`};yn.text=function(e,t){return Ws(e[t].content)};yn.html_block=function(e,t){return e[t].content};yn.html_inline=function(e,t){return e[t].content};function wl(){this.rules=Zd({},yn)}wl.prototype.renderAttrs=function(t){let r,i,o;if(!t.attrs)return"";for(o="",r=0,i=t.attrs.length;r<i;r++)o+=" "+Ws(t.attrs[r][0])+'="'+Ws(t.attrs[r][1])+'"';return o};wl.prototype.renderToken=function(t,r,i){const o=t[r];let l="";if(o.hidden)return"";o.block&&o.nesting!==-1&&r&&t[r-1].hidden&&(l+=`
|
|
209
|
+
`),l+=(o.nesting===-1?"</":"<")+o.tag,l+=this.renderAttrs(o),o.nesting===0&&i.xhtmlOut&&(l+=" /");let d=!1;if(o.block&&(d=!0,o.nesting===1&&r+1<t.length)){const a=t[r+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===o.tag)&&(d=!1)}return l+=d?`>
|
|
210
|
+
`:">",l};wl.prototype.renderInline=function(e,t,r){let i="";const o=this.rules;for(let l=0,d=e.length;l<d;l++){const a=e[l].type;typeof o[a]<"u"?i+=o[a](e,l,t,r,this):i+=this.renderToken(e,l,t)}return i};wl.prototype.renderInlineAsText=function(e,t,r){let i="";for(let o=0,l=e.length;o<l;o++)switch(e[o].type){case"text":i+=e[o].content;break;case"image":i+=this.renderInlineAsText(e[o].children,t,r);break;case"html_inline":case"html_block":i+=e[o].content;break;case"softbreak":case"hardbreak":i+=`
|
|
211
|
+
`;break}return i};wl.prototype.render=function(e,t,r){let i="";const o=this.rules;for(let l=0,d=e.length;l<d;l++){const a=e[l].type;a==="inline"?i+=this.renderInline(e[l].children,t,r):typeof o[a]<"u"?i+=o[a](e,l,t,r,this):i+=this.renderToken(e,l,t,r)}return i};function Jr(){this.__rules__=[],this.__cache__=null}Jr.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Jr.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(i){t.indexOf(i)<0&&t.push(i)})}),e.__cache__={},t.forEach(function(r){e.__cache__[r]=[],e.__rules__.forEach(function(i){i.enabled&&(r&&i.alt.indexOf(r)<0||e.__cache__[r].push(i.fn))})})};Jr.prototype.at=function(e,t,r){const i=this.__find__(e),o=r||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=t,this.__rules__[i].alt=o.alt||[],this.__cache__=null};Jr.prototype.before=function(e,t,r,i){const o=this.__find__(e),l=i||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:r,alt:l.alt||[]}),this.__cache__=null};Jr.prototype.after=function(e,t,r,i){const o=this.__find__(e),l=i||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:r,alt:l.alt||[]}),this.__cache__=null};Jr.prototype.push=function(e,t,r){const i=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:i.alt||[]}),this.__cache__=null};Jr.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(i){const o=this.__find__(i);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!0,r.push(i)},this),this.__cache__=null,r};Jr.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};Jr.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(i){const o=this.__find__(i);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!1,r.push(i)},this),this.__cache__=null,r};Jr.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Gi(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Gi.prototype.attrIndex=function(t){if(!this.attrs)return-1;const r=this.attrs;for(let i=0,o=r.length;i<o;i++)if(r[i][0]===t)return i;return-1};Gi.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Gi.prototype.attrSet=function(t,r){const i=this.attrIndex(t),o=[t,r];i<0?this.attrPush(o):this.attrs[i]=o};Gi.prototype.attrGet=function(t){const r=this.attrIndex(t);let i=null;return r>=0&&(i=this.attrs[r][1]),i};Gi.prototype.attrJoin=function(t,r){const i=this.attrIndex(t);i<0?this.attrPush([t,r]):this.attrs[i][1]=this.attrs[i][1]+" "+r};function hM(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}hM.prototype.Token=Gi;const JV=/\r\n?|\n/g,eX=/\0/g;function tX(e){let t;t=e.src.replace(JV,`
|
|
212
|
+
`),t=t.replace(eX,"�"),e.src=t}function rX(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function iX(e){const t=e.tokens;for(let r=0,i=t.length;r<i;r++){const o=t[r];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function nX(e){return/^<a[>\s]/i.test(e)}function sX(e){return/^<\/a\s*>/i.test(e)}function aX(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,i=t.length;r<i;r++){if(t[r].type!=="inline"||!e.md.linkify.pretest(t[r].content))continue;let o=t[r].children,l=0;for(let d=o.length-1;d>=0;d--){const a=o[d];if(a.type==="link_close"){for(d--;o[d].level!==a.level&&o[d].type!=="link_open";)d--;continue}if(a.type==="html_inline"&&(nX(a.content)&&l>0&&l--,sX(a.content)&&l++),!(l>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const u=a.content;let c=e.md.linkify.match(u);const p=[];let f=a.level,g=0;c.length>0&&c[0].index===0&&d>0&&o[d-1].type==="text_special"&&(c=c.slice(1));for(let b=0;b<c.length;b++){const S=c[b].url,m=e.md.normalizeLink(S);if(!e.md.validateLink(m))continue;let v=c[b].text;c[b].schema?c[b].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,"");const y=c[b].index;if(y>g){const D=new e.Token("text","",0);D.content=u.slice(g,y),D.level=f,p.push(D)}const x=new e.Token("link_open","a",1);x.attrs=[["href",m]],x.level=f++,x.markup="linkify",x.info="auto",p.push(x);const C=new e.Token("text","",0);C.content=v,C.level=f,p.push(C);const E=new e.Token("link_close","a",-1);E.level=--f,E.markup="linkify",E.info="auto",p.push(E),g=c[b].lastIndex}if(g<u.length){const b=new e.Token("text","",0);b.content=u.slice(g),b.level=f,p.push(b)}t[r].children=o=lM(o,d,p)}}}}const fM=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,oX=/\((c|tm|r)\)/i,lX=/\((c|tm|r)\)/ig,uX={c:"©",r:"®",tm:"™"};function cX(e,t){return uX[t.toLowerCase()]}function hX(e){let t=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i.type==="text"&&!t&&(i.content=i.content.replace(lX,cX)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function fX(e){let t=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i.type==="text"&&!t&&fM.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function dX(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(oX.test(e.tokens[t].content)&&hX(e.tokens[t].children),fM.test(e.tokens[t].content)&&fX(e.tokens[t].children))}const pX=/['"]/,nE=/['"]/g,sE="’";function ef(e,t,r,i){e[t]||(e[t]=[]),e[t].push({pos:r,ch:i})}function vX(e,t){let r="",i=0;t.sort((o,l)=>o.pos-l.pos);for(let o=0;o<t.length;o++){const l=t[o];r+=e.slice(i,l.pos)+l.ch,i=l.pos+1}return r+e.slice(i)}function mX(e,t){let r;const i=[],o={};for(let l=0;l<e.length;l++){const d=e[l],a=e[l].level;for(r=i.length-1;r>=0&&!(i[r].level<=a);r--);if(i.length=r+1,d.type!=="text")continue;const u=d.content;let c=0;const p=u.length;e:for(;c<p;){nE.lastIndex=c;const f=nE.exec(u);if(!f)break;let g=!0,b=!0;c=f.index+1;const S=f[0]==="'";let m=32;if(f.index-1>=0)m=u.charCodeAt(f.index-1);else for(r=l-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){m=e[r].content.charCodeAt(e[r].content.length-1);break}let v=32;if(c<p)v=u.charCodeAt(c);else for(r=l+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){v=e[r].content.charCodeAt(0);break}const y=tc(m)||ec(m),x=tc(v)||ec(v),C=Ju(m),E=Ju(v);if(E?g=!1:x&&(C||y||(g=!1)),C?b=!1:y&&(E||x||(b=!1)),v===34&&f[0]==='"'&&m>=48&&m<=57&&(b=g=!1),g&&b&&(g=y,b=x),!g&&!b){S&&ef(o,l,f.index,sE);continue}if(b)for(r=i.length-1;r>=0;r--){let D=i[r];if(i[r].level<a)break;if(D.single===S&&i[r].level===a){D=i[r];let w,M;S?(w=t.md.options.quotes[2],M=t.md.options.quotes[3]):(w=t.md.options.quotes[0],M=t.md.options.quotes[1]),ef(o,l,f.index,M),ef(o,D.token,D.pos,w),i.length=r;continue e}}g?i.push({token:l,pos:f.index,single:S,level:a}):b&&S&&ef(o,l,f.index,sE)}}Object.keys(o).forEach(function(l){e[l].content=vX(e[l].content,o[l])})}function gX(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!pX.test(e.tokens[t].content)||mX(e.tokens[t].children,e)}function _X(e){let t,r;const i=e.tokens,o=i.length;for(let l=0;l<o;l++){if(i[l].type!=="inline")continue;const d=i[l].children,a=d.length;for(t=0;t<a;t++)d[t].type==="text_special"&&(d[t].type="text");for(t=r=0;t<a;t++)d[t].type==="text"&&t+1<a&&d[t+1].type==="text"?d[t+1].content=d[t].content+d[t+1].content:(t!==r&&(d[r]=d[t]),r++);t!==r&&(d.length=r)}}const ng=[["normalize",tX],["block",rX],["inline",iX],["linkify",aX],["replacements",dX],["smartquotes",gX],["text_join",_X]];function ey(){this.ruler=new Jr;for(let e=0;e<ng.length;e++)this.ruler.push(ng[e][0],ng[e][1])}ey.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,i=t.length;r<i;r++)t[r](e)};ey.prototype.State=hM;function bn(e,t,r,i){this.src=e,this.md=t,this.env=r,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let l=0,d=0,a=0,u=0,c=o.length,p=!1;d<c;d++){const f=o.charCodeAt(d);if(!p)if(St(f)){a++,f===9?u+=4-u%4:u++;continue}else p=!0;(f===10||d===c-1)&&(f!==10&&d++,this.bMarks.push(l),this.eMarks.push(d),this.tShift.push(a),this.sCount.push(u),this.bsCount.push(0),p=!1,a=0,u=0,l=d+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}bn.prototype.push=function(e,t,r){const i=new Gi(e,t,r);return i.block=!0,r<0&&this.level--,i.level=this.level,r>0&&this.level++,this.tokens.push(i),i};bn.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};bn.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};bn.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const i=this.src.charCodeAt(t);if(!St(i))break}return t};bn.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!St(this.src.charCodeAt(--t)))return t+1;return t};bn.prototype.skipChars=function(t,r){for(let i=this.src.length;t<i&&this.src.charCodeAt(t)===r;t++);return t};bn.prototype.skipCharsBack=function(t,r,i){if(t<=i)return t;for(;t>i;)if(r!==this.src.charCodeAt(--t))return t+1;return t};bn.prototype.getLines=function(t,r,i,o){if(t>=r)return"";const l=new Array(r-t);for(let d=0,a=t;a<r;a++,d++){let u=0;const c=this.bMarks[a];let p=c,f;for(a+1<r||o?f=this.eMarks[a]+1:f=this.eMarks[a];p<f&&u<i;){const g=this.src.charCodeAt(p);if(St(g))g===9?u+=4-(u+this.bsCount[a])%4:u++;else if(p-c<this.tShift[a])u++;else break;p++}u>i?l[d]=new Array(u-i+1).join(" ")+this.src.slice(p,f):l[d]=this.src.slice(p,f)}return l.join("")};bn.prototype.Token=Gi;const yX=65536;function sg(e,t){const r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(r,i)}function aE(e){const t=[],r=e.length;let i=0,o=e.charCodeAt(i),l=!1,d=0,a="";for(;i<r;)o===124&&(l?(a+=e.substring(d,i-1),d=i):(t.push(a+e.substring(d,i)),a="",d=i+1)),l=o===92,i++,o=e.charCodeAt(i);return t.push(a+e.substring(d)),t}function bX(e,t,r,i){if(t+2>r)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let l=e.bMarks[o]+e.tShift[o];if(l>=e.eMarks[o])return!1;const d=e.src.charCodeAt(l++);if(d!==124&&d!==45&&d!==58||l>=e.eMarks[o])return!1;const a=e.src.charCodeAt(l++);if(a!==124&&a!==45&&a!==58&&!St(a)||d===45&&St(a))return!1;for(;l<e.eMarks[o];){const E=e.src.charCodeAt(l);if(E!==124&&E!==45&&E!==58&&!St(E))return!1;l++}let u=sg(e,t+1),c=u.split("|");const p=[];for(let E=0;E<c.length;E++){const D=c[E].trim();if(!D){if(E===0||E===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(D))return!1;D.charCodeAt(D.length-1)===58?p.push(D.charCodeAt(0)===58?"center":"right"):D.charCodeAt(0)===58?p.push("left"):p.push("")}if(u=sg(e,t).trim(),u.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=aE(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const f=c.length;if(f===0||f!==p.length)return!1;if(i)return!0;const g=e.parentType;e.parentType="table";const b=e.md.block.ruler.getRules("blockquote"),S=e.push("table_open","table",1),m=[t,0];S.map=m;const v=e.push("thead_open","thead",1);v.map=[t,t+1];const y=e.push("tr_open","tr",1);y.map=[t,t+1];for(let E=0;E<c.length;E++){const D=e.push("th_open","th",1);p[E]&&(D.attrs=[["style","text-align:"+p[E]]]);const w=e.push("inline","",0);w.content=c[E].trim(),w.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let x,C=0;for(o=t+2;o<r&&!(e.sCount[o]<e.blkIndent);o++){let E=!1;for(let w=0,M=b.length;w<M;w++)if(b[w](e,o,r,!0)){E=!0;break}if(E||(u=sg(e,o).trim(),!u)||e.sCount[o]-e.blkIndent>=4||(c=aE(u),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),C+=f-c.length,C>yX))break;if(o===t+2){const w=e.push("tbody_open","tbody",1);w.map=x=[t+2,0]}const D=e.push("tr_open","tr",1);D.map=[o,o+1];for(let w=0;w<f;w++){const M=e.push("td_open","td",1);p[w]&&(M.attrs=[["style","text-align:"+p[w]]]);const T=e.push("inline","",0);T.content=c[w]?c[w].trim():"",T.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return x&&(e.push("tbody_close","tbody",-1),x[1]=o),e.push("table_close","table",-1),m[1]=o,e.parentType=g,e.line=o,!0}function SX(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,o=i;for(;i<r;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,o=i;continue}break}e.line=o;const l=e.push("code_block","code",0);return l.content=e.getLines(t,o,4+e.blkIndent,!1)+`
|
|
213
|
+
`,l.map=[t,e.line],!0}function xX(e,t,r,i){let o=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>l)return!1;const d=e.src.charCodeAt(o);if(d!==126&&d!==96)return!1;let a=o;o=e.skipChars(o,d);let u=o-a;if(u<3)return!1;const c=e.src.slice(a,o),p=e.src.slice(o,l);if(d===96&&p.indexOf(String.fromCharCode(d))>=0)return!1;if(i)return!0;let f=t,g=!1;for(;f++,!(f>=r||(o=a=e.bMarks[f]+e.tShift[f],l=e.eMarks[f],o<l&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(o)===d&&!(e.sCount[f]-e.blkIndent>=4)&&(o=e.skipChars(o,d),!(o-a<u)&&(o=e.skipSpaces(o),!(o<l)))){g=!0;break}u=e.sCount[t],e.line=f+(g?1:0);const b=e.push("fence","code",0);return b.info=p,b.content=e.getLines(t+1,f,u,!0),b.markup=c,b.map=[t,e.line],!0}function CX(e,t,r,i){let o=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];const d=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(i)return!0;const a=[],u=[],c=[],p=[],f=e.md.block.ruler.getRules("blockquote"),g=e.parentType;e.parentType="blockquote";let b=!1,S;for(S=t;S<r;S++){const C=e.sCount[S]<e.blkIndent;if(o=e.bMarks[S]+e.tShift[S],l=e.eMarks[S],o>=l)break;if(e.src.charCodeAt(o++)===62&&!C){let D=e.sCount[S]+1,w,M;e.src.charCodeAt(o)===32?(o++,D++,M=!1,w=!0):e.src.charCodeAt(o)===9?(w=!0,(e.bsCount[S]+D)%4===3?(o++,D++,M=!1):M=!0):w=!1;let T=D;for(a.push(e.bMarks[S]),e.bMarks[S]=o;o<l;){const O=e.src.charCodeAt(o);if(St(O))O===9?T+=4-(T+e.bsCount[S]+(M?1:0))%4:T++;else break;o++}b=o>=l,u.push(e.bsCount[S]),e.bsCount[S]=e.sCount[S]+1+(w?1:0),c.push(e.sCount[S]),e.sCount[S]=T-D,p.push(e.tShift[S]),e.tShift[S]=o-e.bMarks[S];continue}if(b)break;let E=!1;for(let D=0,w=f.length;D<w;D++)if(f[D](e,S,r,!0)){E=!0;break}if(E){e.lineMax=S,e.blkIndent!==0&&(a.push(e.bMarks[S]),u.push(e.bsCount[S]),p.push(e.tShift[S]),c.push(e.sCount[S]),e.sCount[S]-=e.blkIndent);break}a.push(e.bMarks[S]),u.push(e.bsCount[S]),p.push(e.tShift[S]),c.push(e.sCount[S]),e.sCount[S]=-1}const m=e.blkIndent;e.blkIndent=0;const v=e.push("blockquote_open","blockquote",1);v.markup=">";const y=[t,0];v.map=y,e.md.block.tokenize(e,t,S);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=d,e.parentType=g,y[1]=e.line;for(let C=0;C<p.length;C++)e.bMarks[C+t]=a[C],e.tShift[C+t]=p[C],e.sCount[C+t]=c[C],e.bsCount[C+t]=u[C];return e.blkIndent=m,!0}function wX(e,t,r,i){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let l=e.bMarks[t]+e.tShift[t];const d=e.src.charCodeAt(l++);if(d!==42&&d!==45&&d!==95)return!1;let a=1;for(;l<o;){const c=e.src.charCodeAt(l++);if(c!==d&&!St(c))return!1;c===d&&a++}if(a<3)return!1;if(i)return!0;e.line=t+1;const u=e.push("hr","hr",0);return u.map=[t,e.line],u.markup=Array(a+1).join(String.fromCharCode(d)),!0}function oE(e,t){const r=e.eMarks[t];let i=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(i++);if(o!==42&&o!==45&&o!==43)return-1;if(i<r){const l=e.src.charCodeAt(i);if(!St(l))return-1}return i}function lE(e,t){const r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];let o=r;if(o+1>=i)return-1;let l=e.src.charCodeAt(o++);if(l<48||l>57)return-1;for(;;){if(o>=i)return-1;if(l=e.src.charCodeAt(o++),l>=48&&l<=57){if(o-r>=10)return-1;continue}if(l===41||l===46)break;return-1}return o<i&&(l=e.src.charCodeAt(o),!St(l))?-1:o}function EX(e,t){const r=e.level+2;for(let i=t+2,o=e.tokens.length-2;i<o;i++)e.tokens[i].level===r&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function AX(e,t,r,i){let o,l,d,a,u=t,c=!0;if(e.sCount[u]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let p=!1;i&&e.parentType==="paragraph"&&e.sCount[u]>=e.blkIndent&&(p=!0);let f,g,b;if((b=lE(e,u))>=0){if(f=!0,d=e.bMarks[u]+e.tShift[u],g=Number(e.src.slice(d,b-1)),p&&g!==1)return!1}else if((b=oE(e,u))>=0)f=!1;else return!1;if(p&&e.skipSpaces(b)>=e.eMarks[u])return!1;if(i)return!0;const S=e.src.charCodeAt(b-1),m=e.tokens.length;f?(a=e.push("ordered_list_open","ol",1),g!==1&&(a.attrs=[["start",g]])):a=e.push("bullet_list_open","ul",1);const v=[u,0];a.map=v,a.markup=String.fromCharCode(S);let y=!1;const x=e.md.block.ruler.getRules("list"),C=e.parentType;for(e.parentType="list";u<r;){l=b,o=e.eMarks[u];const E=e.sCount[u]+b-(e.bMarks[u]+e.tShift[u]);let D=E;for(;l<o;){const V=e.src.charCodeAt(l);if(V===9)D+=4-(D+e.bsCount[u])%4;else if(V===32)D++;else break;l++}const w=l;let M;w>=o?M=1:M=D-E,M>4&&(M=1);const T=E+M;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(S);const O=[u,0];a.map=O,f&&(a.info=e.src.slice(d,b-1));const L=e.tight,P=e.tShift[u],R=e.sCount[u],I=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=T,e.tight=!0,e.tShift[u]=w-e.bMarks[u],e.sCount[u]=D,w>=o&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,u,r,!0),(!e.tight||y)&&(c=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=I,e.tShift[u]=P,e.sCount[u]=R,e.tight=L,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(S),u=e.line,O[1]=u,u>=r||e.sCount[u]<e.blkIndent||e.sCount[u]-e.blkIndent>=4)break;let $=!1;for(let V=0,U=x.length;V<U;V++)if(x[V](e,u,r,!0)){$=!0;break}if($)break;if(f){if(b=lE(e,u),b<0)break;d=e.bMarks[u]+e.tShift[u]}else if(b=oE(e,u),b<0)break;if(S!==e.src.charCodeAt(b-1))break}return f?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(S),v[1]=u,e.line=u,e.parentType=C,c&&EX(e,m),!0}function DX(e,t,r,i){let o=e.bMarks[t]+e.tShift[t],l=e.eMarks[t],d=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function a(x){const C=e.lineMax;if(x>=C||e.isEmpty(x))return null;let E=!1;if(e.sCount[x]-e.blkIndent>3&&(E=!0),e.sCount[x]<0&&(E=!0),!E){const M=e.md.block.ruler.getRules("reference"),T=e.parentType;e.parentType="reference";let O=!1;for(let L=0,P=M.length;L<P;L++)if(M[L](e,x,C,!0)){O=!0;break}if(e.parentType=T,O)return null}const D=e.bMarks[x]+e.tShift[x],w=e.eMarks[x];return e.src.slice(D,w+1)}let u=e.src.slice(o,l+1);l=u.length;let c=-1;for(o=1;o<l;o++){const x=u.charCodeAt(o);if(x===91)return!1;if(x===93){c=o;break}else if(x===10){const C=a(d);C!==null&&(u+=C,l=u.length,d++)}else if(x===92&&(o++,o<l&&u.charCodeAt(o)===10)){const C=a(d);C!==null&&(u+=C,l=u.length,d++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(o=c+2;o<l;o++){const x=u.charCodeAt(o);if(x===10){const C=a(d);C!==null&&(u+=C,l=u.length,d++)}else if(!St(x))break}const p=e.md.helpers.parseLinkDestination(u,o,l);if(!p.ok)return!1;const f=e.md.normalizeLink(p.str);if(!e.md.validateLink(f))return!1;o=p.pos;const g=o,b=d,S=o;for(;o<l;o++){const x=u.charCodeAt(o);if(x===10){const C=a(d);C!==null&&(u+=C,l=u.length,d++)}else if(!St(x))break}let m=e.md.helpers.parseLinkTitle(u,o,l);for(;m.can_continue;){const x=a(d);if(x===null)break;u+=x,o=l,l=u.length,d++,m=e.md.helpers.parseLinkTitle(u,o,l,m)}let v;for(o<l&&S!==o&&m.ok?(v=m.str,o=m.pos):(v="",o=g,d=b);o<l;){const x=u.charCodeAt(o);if(!St(x))break;o++}if(o<l&&u.charCodeAt(o)!==10&&v)for(v="",o=g,d=b;o<l;){const x=u.charCodeAt(o);if(!St(x))break;o++}if(o<l&&u.charCodeAt(o)!==10)return!1;const y=Qd(u.slice(1,c));return y?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:v,href:f}),e.line=d),!0):!1}const TX=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],MX="[a-zA-Z_:][a-zA-Z0-9:._-]*",kX="[^\"'=<>`\\x00-\\x20]+",OX="'[^']*'",LX='"[^"]*"',RX="(?:"+kX+"|"+OX+"|"+LX+")",PX="(?:\\s+"+MX+"(?:\\s*=\\s*"+RX+")?)",dM="<[A-Za-z][A-Za-z0-9\\-]*"+PX+"*\\s*\\/?>",pM="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",BX="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",IX="<[?][\\s\\S]*?[?]>",NX="<![A-Za-z][^>]*>",jX="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",FX=new RegExp("^(?:"+dM+"|"+pM+"|"+BX+"|"+IX+"|"+NX+"|"+jX+")"),zX=new RegExp("^(?:"+dM+"|"+pM+")"),Sa=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+TX.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(zX.source+"\\s*$"),/^$/,!1]];function HX(e,t,r,i){let o=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let d=e.src.slice(o,l),a=0;for(;a<Sa.length&&!Sa[a][0].test(d);a++);if(a===Sa.length)return!1;if(i)return Sa[a][2];let u=t+1;const c=Sa[a][1].test("");if(!Sa[a][1].test(d)){for(;u<r&&!(e.sCount[u]<e.blkIndent&&(c||!e.isEmpty(u)));u++)if(o=e.bMarks[u]+e.tShift[u],l=e.eMarks[u],d=e.src.slice(o,l),Sa[a][1].test(d)){d.length!==0&&u++;break}}e.line=u;const p=e.push("html_block","",0);return p.map=[t,u],p.content=e.getLines(t,u,e.blkIndent,!0),!0}function $X(e,t,r,i){let o=e.bMarks[t]+e.tShift[t],l=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let d=e.src.charCodeAt(o);if(d!==35||o>=l)return!1;let a=1;for(d=e.src.charCodeAt(++o);d===35&&o<l&&a<=6;)a++,d=e.src.charCodeAt(++o);if(a>6||o<l&&!St(d))return!1;if(i)return!0;l=e.skipSpacesBack(l,o);const u=e.skipCharsBack(l,35,o);u>o&&St(e.src.charCodeAt(u-1))&&(l=u),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const p=e.push("inline","",0);p.content=Jd(e.src.slice(o,l)),p.map=[t,e.line],p.children=[];const f=e.push("heading_close","h"+String(a),-1);return f.markup="########".slice(0,a),!0}function UX(e,t,r){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let l=0,d,a=t+1;for(;a<r&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let b=e.bMarks[a]+e.tShift[a];const S=e.eMarks[a];if(b<S&&(d=e.src.charCodeAt(b),(d===45||d===61)&&(b=e.skipChars(b,d),b=e.skipSpaces(b),b>=S))){l=d===61?1:2;break}}if(e.sCount[a]<0)continue;let g=!1;for(let b=0,S=i.length;b<S;b++)if(i[b](e,a,r,!0)){g=!0;break}if(g)break}if(!l)return e.parentType=o,!1;const u=Jd(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const c=e.push("heading_open","h"+String(l),1);c.markup=String.fromCharCode(d),c.map=[t,e.line];const p=e.push("inline","",0);p.content=u,p.map=[t,e.line-1],p.children=[];const f=e.push("heading_close","h"+String(l),-1);return f.markup=String.fromCharCode(d),e.parentType=o,!0}function qX(e,t,r){const i=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let l=t+1;for(e.parentType="paragraph";l<r&&!e.isEmpty(l);l++){if(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)continue;let c=!1;for(let p=0,f=i.length;p<f;p++)if(i[p](e,l,r,!0)){c=!0;break}if(c)break}const d=Jd(e.getLines(t,l,e.blkIndent,!1));e.line=l;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const u=e.push("inline","",0);return u.content=d,u.map=[t,e.line],u.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const tf=[["table",bX,["paragraph","reference"]],["code",SX],["fence",xX,["paragraph","reference","blockquote","list"]],["blockquote",CX,["paragraph","reference","blockquote","list"]],["hr",wX,["paragraph","reference","blockquote","list"]],["list",AX,["paragraph","reference","blockquote"]],["reference",DX],["html_block",HX,["paragraph","reference","blockquote"]],["heading",$X,["paragraph","reference","blockquote"]],["lheading",UX],["paragraph",qX]];function e0(){this.ruler=new Jr;for(let e=0;e<tf.length;e++)this.ruler.push(tf[e][0],tf[e][1],{alt:(tf[e][2]||[]).slice()})}e0.prototype.tokenize=function(e,t,r){const i=this.ruler.getRules(""),o=i.length,l=e.md.options.maxNesting;let d=t,a=!1;for(;d<r&&(e.line=d=e.skipEmptyLines(d),!(d>=r||e.sCount[d]<e.blkIndent));){if(e.level>=l){e.line=r;break}const u=e.line;let c=!1;for(let p=0;p<o;p++)if(c=i[p](e,d,r,!1),c){if(u>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),d=e.line,d<r&&e.isEmpty(d)&&(a=!0,d++,e.line=d)}};e0.prototype.parse=function(e,t,r,i){if(!e)return;const o=new this.State(e,t,r,i);this.tokenize(o,o.line,o.lineMax)};e0.prototype.State=bn;function xc(e,t,r,i){this.src=e,this.env=r,this.md=t,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}xc.prototype.pushPending=function(){const e=new Gi("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};xc.prototype.push=function(e,t,r){this.pending&&this.pushPending();const i=new Gi(e,t,r);let o=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i};xc.prototype.scanDelims=function(e,t){const r=this.posMax,i=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const v=this.src.charCodeAt(e-2);o=(v&64512)===55296?65536+(v-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let l=e;for(;l<r&&this.src.charCodeAt(l)===i;)l++;const d=l-e;let a=l<r?this.src.charCodeAt(l):32;if((a&64512)===55296){const v=this.src.charCodeAt(l+1);a=(v&64512)===56320?65536+(a-55296<<10)+(v-56320):65533}else(a&64512)===56320&&(a=65533);const u=tc(o)||ec(o),c=tc(a)||ec(a),p=Ju(o),f=Ju(a),g=!f&&(!c||p||u),b=!p&&(!u||f||c);return{can_open:g&&(t||!b||u),can_close:b&&(t||!g||c),length:d}};xc.prototype.Token=Gi;function WX(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function GX(e,t){let r=e.pos;for(;r<e.posMax&&!WX(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const KX=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function YX(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,i=e.posMax;if(r+3>i||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const o=e.pending.match(KX);if(!o)return!1;const l=o[1],d=e.md.linkify.matchAtStart(e.src.slice(r-l.length));if(!d)return!1;let a=d.url;if(a.length<=l.length)return!1;let u=a.length;for(;u>0&&a.charCodeAt(u-1)===42;)u--;u!==a.length&&(a=a.slice(0,u));const c=e.md.normalizeLink(a);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-l.length);const p=e.push("link_open","a",1);p.attrs=[["href",c]],p.markup="linkify",p.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(a);const g=e.push("link_close","a",-1);g.markup="linkify",g.info="auto"}return e.pos+=a.length-l.length,!0}function VX(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const i=e.pending.length-1,o=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let l=i-1;for(;l>=1&&e.pending.charCodeAt(l-1)===32;)l--;e.pending=e.pending.slice(0,l),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<o&&St(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const ty=[];for(let e=0;e<256;e++)ty.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ty[e.charCodeAt(0)]=1});function XX(e,t){let r=e.pos;const i=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=i))return!1;let o=e.src.charCodeAt(r);if(o===10){for(t||e.push("hardbreak","br",0),r++;r<i&&(o=e.src.charCodeAt(r),!!St(o));)r++;return e.pos=r,!0}let l=e.src[r];if(o>=55296&&o<=56319&&r+1<i){const a=e.src.charCodeAt(r+1);a>=56320&&a<=57343&&(l+=e.src[r+1],r++)}const d="\\"+l;if(!t){const a=e.push("text_special","",0);o<256&&ty[o]!==0?a.content=l:a.content=d,a.markup=d,a.info="escape"}return e.pos=r+1,!0}function ZX(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const o=r;r++;const l=e.posMax;for(;r<l&&e.src.charCodeAt(r)===96;)r++;const d=e.src.slice(o,r),a=d.length;if(e.backticksScanned&&(e.backticks[a]||0)<=o)return t||(e.pending+=d),e.pos+=a,!0;let u=r,c;for(;(c=e.src.indexOf("`",u))!==-1;){for(u=c+1;u<l&&e.src.charCodeAt(u)===96;)u++;const p=u-c;if(p===a){if(!t){const f=e.push("code_inline","code",0);f.markup=d,f.content=e.src.slice(r,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=u,!0}e.backticks[p]=c}return e.backticksScanned=!0,t||(e.pending+=d),e.pos+=a,!0}function QX(e,t){const r=e.pos,i=e.src.charCodeAt(r);if(t||i!==126)return!1;const o=e.scanDelims(e.pos,!0);let l=o.length;const d=String.fromCharCode(i);if(l<2)return!1;let a;l%2&&(a=e.push("text","",0),a.content=d,l--);for(let u=0;u<l;u+=2)a=e.push("text","",0),a.content=d+d,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function uE(e,t){let r;const i=[],o=t.length;for(let l=0;l<o;l++){const d=t[l];if(d.marker!==126||d.end===-1)continue;const a=t[d.end];r=e.tokens[d.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[a.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){const l=i.pop();let d=l+1;for(;d<e.tokens.length&&e.tokens[d].type==="s_close";)d++;d--,l!==d&&(r=e.tokens[d],e.tokens[d]=e.tokens[l],e.tokens[l]=r)}}function JX(e){const t=e.tokens_meta,r=e.tokens_meta.length;uE(e,e.delimiters);for(let i=0;i<r;i++)t[i]&&t[i].delimiters&&uE(e,t[i].delimiters)}const vM={tokenize:QX,postProcess:JX};function eZ(e,t){const r=e.pos,i=e.src.charCodeAt(r);if(t||i!==95&&i!==42)return!1;const o=e.scanDelims(e.pos,i===42);for(let l=0;l<o.length;l++){const d=e.push("text","",0);d.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function cE(e,t){const r=t.length;for(let i=r-1;i>=0;i--){const o=t[i];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const l=t[o.end],d=i>0&&t[i-1].end===o.end+1&&t[i-1].marker===o.marker&&t[i-1].token===o.token-1&&t[o.end+1].token===l.token+1,a=String.fromCharCode(o.marker),u=e.tokens[o.token];u.type=d?"strong_open":"em_open",u.tag=d?"strong":"em",u.nesting=1,u.markup=d?a+a:a,u.content="";const c=e.tokens[l.token];c.type=d?"strong_close":"em_close",c.tag=d?"strong":"em",c.nesting=-1,c.markup=d?a+a:a,c.content="",d&&(e.tokens[t[i-1].token].content="",e.tokens[t[o.end+1].token].content="",i--)}}function tZ(e){const t=e.tokens_meta,r=e.tokens_meta.length;cE(e,e.delimiters);for(let i=0;i<r;i++)t[i]&&t[i].delimiters&&cE(e,t[i].delimiters)}const mM={tokenize:eZ,postProcess:tZ};function rZ(e,t){let r,i,o,l,d="",a="",u=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const p=e.pos,f=e.posMax,g=e.pos+1,b=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(b<0)return!1;let S=b+1;if(S<f&&e.src.charCodeAt(S)===40){for(c=!1,S++;S<f&&(r=e.src.charCodeAt(S),!(!St(r)&&r!==10));S++);if(S>=f)return!1;if(u=S,o=e.md.helpers.parseLinkDestination(e.src,S,e.posMax),o.ok){for(d=e.md.normalizeLink(o.str),e.md.validateLink(d)?S=o.pos:d="",u=S;S<f&&(r=e.src.charCodeAt(S),!(!St(r)&&r!==10));S++);if(o=e.md.helpers.parseLinkTitle(e.src,S,e.posMax),S<f&&u!==S&&o.ok)for(a=o.str,S=o.pos;S<f&&(r=e.src.charCodeAt(S),!(!St(r)&&r!==10));S++);}(S>=f||e.src.charCodeAt(S)!==41)&&(c=!0),S++}if(c){if(typeof e.env.references>"u")return!1;if(S<f&&e.src.charCodeAt(S)===91?(u=S+1,S=e.md.helpers.parseLinkLabel(e,S),S>=0?i=e.src.slice(u,S++):S=b+1):S=b+1,i||(i=e.src.slice(g,b)),l=e.env.references[Qd(i)],!l)return e.pos=p,!1;d=l.href,a=l.title}if(!t){e.pos=g,e.posMax=b;const m=e.push("link_open","a",1),v=[["href",d]];m.attrs=v,a&&v.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=S,e.posMax=f,!0}function iZ(e,t){let r,i,o,l,d,a,u,c,p="";const f=e.pos,g=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const b=e.pos+2,S=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(S<0)return!1;if(l=S+1,l<g&&e.src.charCodeAt(l)===40){for(l++;l<g&&(r=e.src.charCodeAt(l),!(!St(r)&&r!==10));l++);if(l>=g)return!1;for(c=l,a=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),a.ok&&(p=e.md.normalizeLink(a.str),e.md.validateLink(p)?l=a.pos:p=""),c=l;l<g&&(r=e.src.charCodeAt(l),!(!St(r)&&r!==10));l++);if(a=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<g&&c!==l&&a.ok)for(u=a.str,l=a.pos;l<g&&(r=e.src.charCodeAt(l),!(!St(r)&&r!==10));l++);else u="";if(l>=g||e.src.charCodeAt(l)!==41)return e.pos=f,!1;l++}else{if(typeof e.env.references>"u")return!1;if(l<g&&e.src.charCodeAt(l)===91?(c=l+1,l=e.md.helpers.parseLinkLabel(e,l),l>=0?o=e.src.slice(c,l++):l=S+1):l=S+1,o||(o=e.src.slice(b,S)),d=e.env.references[Qd(o)],!d)return e.pos=f,!1;p=d.href,u=d.title}if(!t){i=e.src.slice(b,S);const m=[];e.md.inline.parse(i,e.md,e.env,m);const v=e.push("image","img",0),y=[["src",p],["alt",""]];v.attrs=y,v.children=m,v.content=i,u&&y.push(["title",u])}return e.pos=l,e.posMax=g,!0}const nZ=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,sZ=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function aZ(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const i=e.pos,o=e.posMax;for(;;){if(++r>=o)return!1;const d=e.src.charCodeAt(r);if(d===60)return!1;if(d===62)break}const l=e.src.slice(i+1,r);if(sZ.test(l)){const d=e.md.normalizeLink(l);if(!e.md.validateLink(d))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",d]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(l);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=l.length+2,!0}if(nZ.test(l)){const d=e.md.normalizeLink("mailto:"+l);if(!e.md.validateLink(d))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",d]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(l);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=l.length+2,!0}return!1}function oZ(e){return/^<a[>\s]/i.test(e)}function lZ(e){return/^<\/a\s*>/i.test(e)}function uZ(e){const t=e|32;return t>=97&&t<=122}function cZ(e,t){if(!e.md.options.html)return!1;const r=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=r)return!1;const o=e.src.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!uZ(o))return!1;const l=e.src.slice(i).match(FX);if(!l)return!1;if(!t){const d=e.push("html_inline","",0);d.content=l[0],oZ(d.content)&&e.linkLevel++,lZ(d.content)&&e.linkLevel--}return e.pos+=l[0].length,!0}const hZ=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,fZ=/^&([a-z][a-z0-9]{1,31});/i;function dZ(e,t){const r=e.pos,i=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=i)return!1;if(e.src.charCodeAt(r+1)===35){const l=e.src.slice(r).match(hZ);if(l){if(!t){const d=l[1][0].toLowerCase()==="x"?parseInt(l[1].slice(1),16):parseInt(l[1],10),a=e.push("text_special","",0);a.content=J1(d)?Qu(d):Qu(65533),a.markup=l[0],a.info="entity"}return e.pos+=l[0].length,!0}}else{const l=e.src.slice(r).match(fZ);if(l){const d=LV(l[0]);if(d!==l[0]){if(!t){const a=e.push("text_special","",0);a.content=d,a.markup=l[0],a.info="entity"}return e.pos+=l[0].length,!0}}}return!1}function hE(e){const t={},r=e.length;if(!r)return;let i=0,o=-2;const l=[];for(let d=0;d<r;d++){const a=e[d];if(l.push(0),(e[i].marker!==a.marker||o!==a.token-1)&&(i=d),o=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const u=t[a.marker][(a.open?3:0)+a.length%3];let c=i-l[i]-1,p=c;for(;c>u;c-=l[c]+1){const f=e[c];if(f.marker===a.marker&&f.open&&f.end<0){let g=!1;if((f.close||a.open)&&(f.length+a.length)%3===0&&(f.length%3!==0||a.length%3!==0)&&(g=!0),!g){const b=c>0&&!e[c-1].open?l[c-1]+1:0;l[d]=d-c+b,l[c]=b,a.open=!1,f.end=d,f.close=!1,p=-1,o=-2;break}}}p!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=p)}}function pZ(e){const t=e.tokens_meta,r=e.tokens_meta.length;hE(e.delimiters);for(let i=0;i<r;i++)t[i]&&t[i].delimiters&&hE(t[i].delimiters)}function vZ(e){let t,r,i=0;const o=e.tokens,l=e.tokens.length;for(t=r=0;t<l;t++)o[t].nesting<0&&i--,o[t].level=i,o[t].nesting>0&&i++,o[t].type==="text"&&t+1<l&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==r&&(o[r]=o[t]),r++);t!==r&&(o.length=r)}const ag=[["text",GX],["linkify",YX],["newline",VX],["escape",XX],["backticks",ZX],["strikethrough",vM.tokenize],["emphasis",mM.tokenize],["link",rZ],["image",iZ],["autolink",aZ],["html_inline",cZ],["entity",dZ]],og=[["balance_pairs",pZ],["strikethrough",vM.postProcess],["emphasis",mM.postProcess],["fragments_join",vZ]];function Cc(){this.ruler=new Jr;for(let e=0;e<ag.length;e++)this.ruler.push(ag[e][0],ag[e][1]);this.ruler2=new Jr;for(let e=0;e<og.length;e++)this.ruler2.push(og[e][0],og[e][1])}Cc.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),i=r.length,o=e.md.options.maxNesting,l=e.cache;if(typeof l[t]<"u"){e.pos=l[t];return}let d=!1;if(e.level<o){for(let a=0;a<i;a++)if(e.level++,d=r[a](e,!0),e.level--,d){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;d||e.pos++,l[t]=e.pos};Cc.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,i=e.posMax,o=e.md.options.maxNesting;for(;e.pos<i;){const l=e.pos;let d=!1;if(e.level<o){for(let a=0;a<r;a++)if(d=t[a](e,!1),d){if(l>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(d){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Cc.prototype.parse=function(e,t,r,i){const o=new this.State(e,t,r,i);this.tokenize(o);const l=this.ruler2.getRules(""),d=l.length;for(let a=0;a<d;a++)l[a](o)};Cc.prototype.State=xc;function mZ(e){const t={};e=e||{},t.src_Any=rM.source,t.src_Cc=iM.source,t.src_Z=sM.source,t.src_P=Z1.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const r="[><|]";return t.src_pseudo_letter="(?:(?!"+r+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+r+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function d_(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(i){e[i]=r[i]})}),e}function t0(e){return Object.prototype.toString.call(e)}function gZ(e){return t0(e)==="[object String]"}function _Z(e){return t0(e)==="[object Object]"}function yZ(e){return t0(e)==="[object RegExp]"}function fE(e){return t0(e)==="[object Function]"}function bZ(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const gM={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function SZ(e){return Object.keys(e||{}).reduce(function(t,r){return t||gM.hasOwnProperty(r)},!1)}const xZ={"http:":{validate:function(e,t,r){const i=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(i)?i.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){const i=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(i)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:i.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){const i=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(i)?i.match(r.re.mailto)[0].length:0}}},CZ="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",wZ="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function EZ(e){return function(t,r){const i=t.slice(r);return e.test(i)?i.match(e)[0].length:0}}function dE(){return function(e,t){t.normalize(e)}}function ld(e){const t=e.re=mZ(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(CZ),r.push(t.src_xn),t.src_tlds=r.join("|");function i(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(i(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(i(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(i(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function l(a,u){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+u)}Object.keys(e.__schemas__).forEach(function(a){const u=e.__schemas__[a];if(u===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,_Z(u)){yZ(u.validate)?c.validate=EZ(u.validate):fE(u.validate)?c.validate=u.validate:l(a,u),fE(u.normalize)?c.normalize=u.normalize:u.normalize?l(a,u):c.normalize=dE();return}if(gZ(u)){o.push(a);return}l(a,u)}),o.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:dE()};const d=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(bZ).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+d+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+d+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function _M(e,t,r,i){const o=e.slice(r,i);this.schema=t.toLowerCase(),this.index=r,this.lastIndex=i,this.raw=o,this.text=o,this.url=o}function pi(e,t){if(!(this instanceof pi))return new pi(e,t);t||SZ(e)&&(t=e,e={}),this.__opts__=d_({},gM,t),this.__schemas__=d_({},xZ,e),this.__compiled__={},this.__tlds__=wZ,this.__tlds_replaced__=!1,this.re={},ld(this)}pi.prototype.add=function(t,r){return this.__schemas__[t]=r,ld(this),this};pi.prototype.set=function(t){return this.__opts__=d_(this.__opts__,t),this};pi.prototype.test=function(t){if(!t.length)return!1;let r,i;if(this.re.schema_test.test(t)){for(i=this.re.schema_search,i.lastIndex=0;(r=i.exec(t))!==null;)if(this.testSchemaAt(t,r[2],i.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};pi.prototype.pretest=function(t){return this.re.pretest.test(t)};pi.prototype.testSchemaAt=function(t,r,i){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,i,this):0};pi.prototype.match=function(t){const r=[],i=[],o=[],l=[];let d,a,u;function c(g,b){return g?b?g.index!==b.index?g.index<b.index?g:b:g.lastIndex>=b.lastIndex?g:b:g:b}if(!t.length)return null;if(this.re.schema_test.test(t))for(u=this.re.schema_search,u.lastIndex=0;(d=u.exec(t))!==null;)a=this.testSchemaAt(t,d[2],u.lastIndex),a&&i.push({schema:d[2],index:d.index+d[1].length,lastIndex:d.index+d[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(u=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,u.lastIndex=0;(d=u.exec(t))!==null;)o.push({schema:"",index:d.index+d[1].length,lastIndex:d.index+d[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(u=this.re.email_fuzzy_global,u.lastIndex=0;(d=u.exec(t))!==null;)l.push({schema:"mailto:",index:d.index+d[1].length,lastIndex:d.index+d[0].length});const p=[0,0,0];let f=0;for(;;){const g=[i[p[0]],l[p[1]],o[p[2]]],b=c(c(g[0],g[1]),g[2]);if(!b)break;if(b===g[0]?p[0]++:b===g[1]?p[1]++:p[2]++,b.index<f)continue;const S=new _M(t,b.schema,b.index,b.lastIndex);this.__compiled__[S.schema].normalize(S,this),r.push(S),f=b.lastIndex}return r.length?r:null};pi.prototype.matchAtStart=function(t){if(!t.length)return null;const r=this.re.schema_at_start.exec(t);if(!r)return null;const i=this.testSchemaAt(t,r[2],r[0].length);if(!i)return null;const o=new _M(t,r[2],r.index+r[1].length,r.index+r[0].length+i);return this.__compiled__[o.schema].normalize(o,this),o};pi.prototype.tlds=function(t,r){return t=Array.isArray(t)?t:[t],r?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(i,o,l){return i!==l[o-1]}).reverse(),ld(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ld(this),this)};pi.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};pi.prototype.onCompile=function(){};const Jo=2147483647,cn=36,ry=1,rc=26,AZ=38,DZ=700,yM=72,bM=128,SM="-",TZ=/^xn--/,MZ=/[^\0-\x7F]/,kZ=/[\x2E\u3002\uFF0E\uFF61]/g,OZ={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},lg=cn-ry,hn=Math.floor,ug=String.fromCharCode;function Is(e){throw new RangeError(OZ[e])}function LZ(e,t){const r=[];let i=e.length;for(;i--;)r[i]=t(e[i]);return r}function xM(e,t){const r=e.split("@");let i="";r.length>1&&(i=r[0]+"@",e=r[1]),e=e.replace(kZ,".");const o=e.split("."),l=LZ(o,t).join(".");return i+l}function CM(e){const t=[];let r=0;const i=e.length;for(;r<i;){const o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<i){const l=e.charCodeAt(r++);(l&64512)==56320?t.push(((o&1023)<<10)+(l&1023)+65536):(t.push(o),r--)}else t.push(o)}return t}const RZ=e=>String.fromCodePoint(...e),PZ=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:cn},pE=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},wM=function(e,t,r){let i=0;for(e=r?hn(e/DZ):e>>1,e+=hn(e/t);e>lg*rc>>1;i+=cn)e=hn(e/lg);return hn(i+(lg+1)*e/(e+AZ))},EM=function(e){const t=[],r=e.length;let i=0,o=bM,l=yM,d=e.lastIndexOf(SM);d<0&&(d=0);for(let a=0;a<d;++a)e.charCodeAt(a)>=128&&Is("not-basic"),t.push(e.charCodeAt(a));for(let a=d>0?d+1:0;a<r;){const u=i;for(let p=1,f=cn;;f+=cn){a>=r&&Is("invalid-input");const g=PZ(e.charCodeAt(a++));g>=cn&&Is("invalid-input"),g>hn((Jo-i)/p)&&Is("overflow"),i+=g*p;const b=f<=l?ry:f>=l+rc?rc:f-l;if(g<b)break;const S=cn-b;p>hn(Jo/S)&&Is("overflow"),p*=S}const c=t.length+1;l=wM(i-u,c,u==0),hn(i/c)>Jo-o&&Is("overflow"),o+=hn(i/c),i%=c,t.splice(i++,0,o)}return String.fromCodePoint(...t)},AM=function(e){const t=[];e=CM(e);const r=e.length;let i=bM,o=0,l=yM;for(const u of e)u<128&&t.push(ug(u));const d=t.length;let a=d;for(d&&t.push(SM);a<r;){let u=Jo;for(const p of e)p>=i&&p<u&&(u=p);const c=a+1;u-i>hn((Jo-o)/c)&&Is("overflow"),o+=(u-i)*c,i=u;for(const p of e)if(p<i&&++o>Jo&&Is("overflow"),p===i){let f=o;for(let g=cn;;g+=cn){const b=g<=l?ry:g>=l+rc?rc:g-l;if(f<b)break;const S=f-b,m=cn-b;t.push(ug(pE(b+S%m,0))),f=hn(S/m)}t.push(ug(pE(f,0))),l=wM(o,c,a===d),o=0,++a}++o,++i}return t.join("")},BZ=function(e){return xM(e,function(t){return TZ.test(t)?EM(t.slice(4).toLowerCase()):t})},IZ=function(e){return xM(e,function(t){return MZ.test(t)?"xn--"+AM(t):t})},DM={version:"2.3.1",ucs2:{decode:CM,encode:RZ},decode:EM,encode:AM,toASCII:IZ,toUnicode:BZ},NZ={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},jZ={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},FZ={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},zZ={default:NZ,zero:jZ,commonmark:FZ},HZ=/^(vbscript|javascript|file|data):/,$Z=/^data:image\/(gif|png|jpeg|webp);/;function UZ(e){const t=e.trim().toLowerCase();return HZ.test(t)?$Z.test(t):!0}const TM=["http:","https:","mailto:"];function qZ(e){const t=X1(e,!0);if(t.hostname&&(!t.protocol||TM.indexOf(t.protocol)>=0))try{t.hostname=DM.toASCII(t.hostname)}catch{}return Sc(V1(t))}function WZ(e){const t=X1(e,!0);if(t.hostname&&(!t.protocol||TM.indexOf(t.protocol)>=0))try{t.hostname=DM.toUnicode(t.hostname)}catch{}return hl(V1(t),hl.defaultChars+"%")}function Li(e,t){if(!(this instanceof Li))return new Li(e,t);t||Q1(e)||(t=e||{},e="default"),this.inline=new Cc,this.block=new e0,this.core=new ey,this.renderer=new wl,this.linkify=new pi,this.validateLink=UZ,this.normalizeLink=qZ,this.normalizeLinkText=WZ,this.utils=YV,this.helpers=Zd({},QV),this.options={},this.configure(e),t&&this.set(t)}Li.prototype.set=function(e){return Zd(this.options,e),this};Li.prototype.configure=function(e){const t=this;if(Q1(e)){const r=e;if(e=zZ[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this};Li.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(function(o){return r.indexOf(o)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this};Li.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(function(o){return r.indexOf(o)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this};Li.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Li.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens};Li.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Li.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};Li.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function vE(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function GZ(e){if(Array.isArray(e))return e}function KZ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,l,d,a=[],u=!0,c=!1;try{if(l=(r=r.call(e)).next,t!==0)for(;!(u=(i=l.call(r)).done)&&(a.push(i.value),a.length!==t);u=!0);}catch(p){c=!0,o=p}finally{try{if(!u&&r.return!=null&&(d=r.return(),Object(d)!==d))return}finally{if(c)throw o}}return a}}function YZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
214
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VZ(e,t){return GZ(e)||KZ(e,t)||XZ(e,t)||YZ()}function XZ(e,t){if(e){if(typeof e=="string")return vE(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vE(e,t):void 0}}const MM=Object.entries,mE=Object.setPrototypeOf,ZZ=Object.isFrozen,QZ=Object.getPrototypeOf,JZ=Object.getOwnPropertyDescriptor;let Hr=Object.freeze,Ri=Object.seal,Wo=Object.create,kM=typeof Reflect<"u"&&Reflect,p_=kM.apply,v_=kM.construct;Hr||(Hr=function(t){return t});Ri||(Ri=function(t){return t});p_||(p_=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),l=2;l<i;l++)o[l-2]=arguments[l];return t.apply(r,o)});v_||(v_=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const xa=tr(Array.prototype.forEach),eQ=tr(Array.prototype.lastIndexOf),gE=tr(Array.prototype.pop),Ho=tr(Array.prototype.push),tQ=tr(Array.prototype.splice),Nr=Array.isArray,Pu=tr(String.prototype.toLowerCase),cg=tr(String.prototype.toString),_E=tr(String.prototype.match),$o=tr(String.prototype.replace),yE=tr(String.prototype.indexOf),rQ=tr(String.prototype.trim),iQ=tr(Number.prototype.toString),nQ=tr(Boolean.prototype.toString),bE=typeof BigInt>"u"?null:tr(BigInt.prototype.toString),SE=typeof Symbol>"u"?null:tr(Symbol.prototype.toString),Ht=tr(Object.prototype.hasOwnProperty),ku=tr(Object.prototype.toString),wr=tr(RegExp.prototype.test),Uo=sQ(TypeError);function tr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return p_(e,t,i)}}function sQ(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return v_(e,r)}}function Ge(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pu;if(mE&&mE(e,null),!Nr(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const l=r(o);l!==o&&(ZZ(t)||(t[i]=l),o=l)}e[o]=!0}return e}function aQ(e){for(let t=0;t<e.length;t++)Ht(e,t)||(e[t]=null);return e}function kr(e){const t=Wo(null);for(const i of MM(e)){var r=VZ(i,2);const o=r[0],l=r[1];Ht(e,o)&&(Nr(l)?t[o]=aQ(l):l&&typeof l=="object"&&l.constructor===Object?t[o]=kr(l):t[o]=l)}return t}function oQ(e){switch(typeof e){case"string":return e;case"number":return iQ(e);case"boolean":return nQ(e);case"bigint":return bE?bE(e):"0";case"symbol":return SE?SE(e):"Symbol()";case"undefined":return ku(e);case"function":case"object":{if(e===null)return ku(e);const t=e,r=an(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:ku(i)}return ku(e)}default:return ku(e)}}function an(e,t){for(;e!==null;){const i=JZ(e,t);if(i){if(i.get)return tr(i.get);if(typeof i.value=="function")return tr(i.value)}e=QZ(e)}function r(){return null}return r}function lQ(e){try{return wr(e,""),!0}catch{return!1}}const xE=Hr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hg=Hr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fg=Hr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),uQ=Hr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dg=Hr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),cQ=Hr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),CE=Hr(["#text"]),wE=Hr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),pg=Hr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),EE=Hr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),rf=Hr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hQ=Ri(/{{[\w\W]*|^[\w\W]*}}/g),fQ=Ri(/<%[\w\W]*|^[\w\W]*%>/g),dQ=Ri(/\${[\w\W]*/g),pQ=Ri(/^data-[\-\w.\u00B7-\uFFFF]+$/),vQ=Ri(/^aria-[\-\w]+$/),AE=Ri(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mQ=Ri(/^(?:\w+script|data):/i),gQ=Ri(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_Q=Ri(/^html$/i),yQ=Ri(/^[a-z][.\w]*(-[.\w]+)+$/i),sn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bQ=function(){return typeof window>"u"?null:window},SQ=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const l="dompurify"+(i?"#"+i:"");try{return t.createPolicy(l,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},DE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function OM(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bQ();const t=Te=>OM(Te);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==sn.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,d=e.Node,a=e.Element,u=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const p=e.DOMParser,f=e.trustedTypes,g=a.prototype,b=an(g,"cloneNode"),S=an(g,"remove"),m=an(g,"nextSibling"),v=an(g,"childNodes"),y=an(g,"parentNode"),x=an(g,"shadowRoot"),C=an(g,"attributes"),E=d&&d.prototype?an(d.prototype,"nodeType"):null,D=d&&d.prototype?an(d.prototype,"nodeName"):null;if(typeof l=="function"){const Te=r.createElement("template");Te.content&&Te.content.ownerDocument&&(r=Te.content.ownerDocument)}let w,M="",T=0;const O=function(X){if(T>0)throw Uo('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');T++;try{return w.createHTML(X)}finally{T--}},L=r,P=L.implementation,R=L.createNodeIterator,I=L.createDocumentFragment,$=L.getElementsByTagName,V=i.importNode;let U=DE();t.isSupported=typeof MM=="function"&&typeof y=="function"&&P&&P.createHTMLDocument!==void 0;const K=hQ,G=fQ,N=dQ,H=pQ,z=vQ,q=mQ,J=gQ,ie=yQ;let pe=AE,he=null;const Z=Ge({},[...xE,...hg,...fg,...dg,...CE]);let W=null;const te=Ge({},[...wE,...pg,...EE,...rf]);let Q=Object.seal(Wo(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,re=null;const be=Object.seal(Wo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ve=!0,Se=!0,Le=!1,xe=!0,Ke=!1,xt=!0,Ae=!1,Ce=!1,we=!1,de=!1,Ee=!1,$e=!1,je=!0,qt=!1;const ct="user-content-";let _t=!0,Ue=!1,Pe={},Oe=null;const rr=Ge({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let yt=null;const Wt=Ge({},["audio","video","img","source","image","track"]);let Rt=null;const Ur=Ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ki="http://www.w3.org/1998/Math/MathML",Yi="http://www.w3.org/2000/svg",Pt="http://www.w3.org/1999/xhtml";let yr=Pt,qr=!1,Br=null;const Ka=Ge({},[Ki,Yi,Pt],cg);let Sn=Ge({},["mi","mo","mn","ms","mtext"]),El=Ge({},["annotation-xml"]);const wc=Ge({},["title","style","font","a","script"]);let xn=null;const Zs=["application/xhtml+xml","text/html"],r0="text/html";let Tt=null,Cn=null;const Ec=r.createElement("form"),Ya=function(X){return X instanceof RegExp||X instanceof Function},Qs=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Cn&&Cn===X)return;(!X||typeof X!="object")&&(X={}),X=kr(X),xn=Zs.indexOf(X.PARSER_MEDIA_TYPE)===-1?r0:X.PARSER_MEDIA_TYPE,Tt=xn==="application/xhtml+xml"?cg:Pu,he=Ht(X,"ALLOWED_TAGS")&&Nr(X.ALLOWED_TAGS)?Ge({},X.ALLOWED_TAGS,Tt):Z,W=Ht(X,"ALLOWED_ATTR")&&Nr(X.ALLOWED_ATTR)?Ge({},X.ALLOWED_ATTR,Tt):te,Br=Ht(X,"ALLOWED_NAMESPACES")&&Nr(X.ALLOWED_NAMESPACES)?Ge({},X.ALLOWED_NAMESPACES,cg):Ka,Rt=Ht(X,"ADD_URI_SAFE_ATTR")&&Nr(X.ADD_URI_SAFE_ATTR)?Ge(kr(Ur),X.ADD_URI_SAFE_ATTR,Tt):Ur,yt=Ht(X,"ADD_DATA_URI_TAGS")&&Nr(X.ADD_DATA_URI_TAGS)?Ge(kr(Wt),X.ADD_DATA_URI_TAGS,Tt):Wt,Oe=Ht(X,"FORBID_CONTENTS")&&Nr(X.FORBID_CONTENTS)?Ge({},X.FORBID_CONTENTS,Tt):rr,se=Ht(X,"FORBID_TAGS")&&Nr(X.FORBID_TAGS)?Ge({},X.FORBID_TAGS,Tt):kr({}),re=Ht(X,"FORBID_ATTR")&&Nr(X.FORBID_ATTR)?Ge({},X.FORBID_ATTR,Tt):kr({}),Pe=Ht(X,"USE_PROFILES")?X.USE_PROFILES&&typeof X.USE_PROFILES=="object"?kr(X.USE_PROFILES):X.USE_PROFILES:!1,ve=X.ALLOW_ARIA_ATTR!==!1,Se=X.ALLOW_DATA_ATTR!==!1,Le=X.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=X.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=X.SAFE_FOR_TEMPLATES||!1,xt=X.SAFE_FOR_XML!==!1,Ae=X.WHOLE_DOCUMENT||!1,de=X.RETURN_DOM||!1,Ee=X.RETURN_DOM_FRAGMENT||!1,$e=X.RETURN_TRUSTED_TYPE||!1,we=X.FORCE_BODY||!1,je=X.SANITIZE_DOM!==!1,qt=X.SANITIZE_NAMED_PROPS||!1,_t=X.KEEP_CONTENT!==!1,Ue=X.IN_PLACE||!1,pe=lQ(X.ALLOWED_URI_REGEXP)?X.ALLOWED_URI_REGEXP:AE,yr=typeof X.NAMESPACE=="string"?X.NAMESPACE:Pt,Sn=Ht(X,"MATHML_TEXT_INTEGRATION_POINTS")&&X.MATHML_TEXT_INTEGRATION_POINTS&&typeof X.MATHML_TEXT_INTEGRATION_POINTS=="object"?kr(X.MATHML_TEXT_INTEGRATION_POINTS):Ge({},["mi","mo","mn","ms","mtext"]),El=Ht(X,"HTML_INTEGRATION_POINTS")&&X.HTML_INTEGRATION_POINTS&&typeof X.HTML_INTEGRATION_POINTS=="object"?kr(X.HTML_INTEGRATION_POINTS):Ge({},["annotation-xml"]);const ge=Ht(X,"CUSTOM_ELEMENT_HANDLING")&&X.CUSTOM_ELEMENT_HANDLING&&typeof X.CUSTOM_ELEMENT_HANDLING=="object"?kr(X.CUSTOM_ELEMENT_HANDLING):Wo(null);if(Q=Wo(null),Ht(ge,"tagNameCheck")&&Ya(ge.tagNameCheck)&&(Q.tagNameCheck=ge.tagNameCheck),Ht(ge,"attributeNameCheck")&&Ya(ge.attributeNameCheck)&&(Q.attributeNameCheck=ge.attributeNameCheck),Ht(ge,"allowCustomizedBuiltInElements")&&typeof ge.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=ge.allowCustomizedBuiltInElements),Ke&&(Se=!1),Ee&&(de=!0),Pe&&(he=Ge({},CE),W=Wo(null),Pe.html===!0&&(Ge(he,xE),Ge(W,wE)),Pe.svg===!0&&(Ge(he,hg),Ge(W,pg),Ge(W,rf)),Pe.svgFilters===!0&&(Ge(he,fg),Ge(W,pg),Ge(W,rf)),Pe.mathMl===!0&&(Ge(he,dg),Ge(W,EE),Ge(W,rf))),be.tagCheck=null,be.attributeCheck=null,Ht(X,"ADD_TAGS")&&(typeof X.ADD_TAGS=="function"?be.tagCheck=X.ADD_TAGS:Nr(X.ADD_TAGS)&&(he===Z&&(he=kr(he)),Ge(he,X.ADD_TAGS,Tt))),Ht(X,"ADD_ATTR")&&(typeof X.ADD_ATTR=="function"?be.attributeCheck=X.ADD_ATTR:Nr(X.ADD_ATTR)&&(W===te&&(W=kr(W)),Ge(W,X.ADD_ATTR,Tt))),Ht(X,"ADD_URI_SAFE_ATTR")&&Nr(X.ADD_URI_SAFE_ATTR)&&Ge(Rt,X.ADD_URI_SAFE_ATTR,Tt),Ht(X,"FORBID_CONTENTS")&&Nr(X.FORBID_CONTENTS)&&(Oe===rr&&(Oe=kr(Oe)),Ge(Oe,X.FORBID_CONTENTS,Tt)),Ht(X,"ADD_FORBID_CONTENTS")&&Nr(X.ADD_FORBID_CONTENTS)&&(Oe===rr&&(Oe=kr(Oe)),Ge(Oe,X.ADD_FORBID_CONTENTS,Tt)),_t&&(he["#text"]=!0),Ae&&Ge(he,["html","head","body"]),he.table&&(Ge(he,["tbody"]),delete se.tbody),X.TRUSTED_TYPES_POLICY){if(typeof X.TRUSTED_TYPES_POLICY.createHTML!="function")throw Uo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof X.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Uo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const De=w;w=X.TRUSTED_TYPES_POLICY;try{M=O("")}catch(et){throw w=De,et}}else w===void 0&&X.TRUSTED_TYPES_POLICY!==null&&(w=SQ(f,o)),w&&typeof M=="string"&&(M=O(""));(U.uponSanitizeElement.length>0||U.uponSanitizeAttribute.length>0)&&he===Z&&(he=kr(he)),U.uponSanitizeAttribute.length>0&&W===te&&(W=kr(W)),Hr&&Hr(X),Cn=X},Al=Ge({},[...hg,...fg,...uQ]),Dl=Ge({},[...dg,...cQ]),Vi=function(X){let ge=y(X);(!ge||!ge.tagName)&&(ge={namespaceURI:yr,tagName:"template"});const De=Pu(X.tagName),et=Pu(ge.tagName);return Br[X.namespaceURI]?X.namespaceURI===Yi?ge.namespaceURI===Pt?De==="svg":ge.namespaceURI===Ki?De==="svg"&&(et==="annotation-xml"||Sn[et]):!!Al[De]:X.namespaceURI===Ki?ge.namespaceURI===Pt?De==="math":ge.namespaceURI===Yi?De==="math"&&El[et]:!!Dl[De]:X.namespaceURI===Pt?ge.namespaceURI===Yi&&!El[et]||ge.namespaceURI===Ki&&!Sn[et]?!1:!Dl[De]&&(wc[De]||!Al[De]):!!(xn==="application/xhtml+xml"&&Br[X.namespaceURI]):!1},ot=function(X){Ho(t.removed,{element:X});try{y(X).removeChild(X)}catch{S(X)}},It=function(X,ge){try{Ho(t.removed,{attribute:ge.getAttributeNode(X),from:ge})}catch{Ho(t.removed,{attribute:null,from:ge})}if(ge.removeAttribute(X),X==="is")if(de||Ee)try{ot(ge)}catch{}else try{ge.setAttribute(X,"")}catch{}},wn=function(X){let ge=null,De=null;if(we)X="<remove></remove>"+X;else{const tt=_E(X,/^[\r\n\t ]+/);De=tt&&tt[0]}xn==="application/xhtml+xml"&&yr===Pt&&(X='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+X+"</body></html>");const et=w?O(X):X;if(yr===Pt)try{ge=new p().parseFromString(et,xn)}catch{}if(!ge||!ge.documentElement){ge=P.createDocument(yr,"template",null);try{ge.documentElement.innerHTML=qr?M:et}catch{}}const qe=ge.body||ge.documentElement;return X&&De&&qe.insertBefore(r.createTextNode(De),qe.childNodes[0]||null),yr===Pt?$.call(ge,Ae?"html":"body")[0]:Ae?ge.documentElement:qe},Va=function(X){return R.call(X.ownerDocument||X,X,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Tl=function(X){var ge,De;X.normalize();const et=R.call(X.ownerDocument||X,X,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let qe=et.nextNode();for(;qe;){let Mt=qe.data;xa([K,G,N],Nt=>{Mt=$o(Mt,Nt," ")}),qe.data=Mt,qe=et.nextNode()}const tt=(ge=(De=X.querySelectorAll)===null||De===void 0?void 0:De.call(X,"template"))!==null&&ge!==void 0?ge:[];xa(Array.from(tt),Mt=>{En(Mt.content)&&Tl(Mt.content)})},Xa=function(X){const ge=D?D(X):null;return typeof ge!="string"||Tt(ge)!=="form"?!1:typeof X.nodeName!="string"||typeof X.textContent!="string"||typeof X.removeChild!="function"||X.attributes!==C(X)||typeof X.removeAttribute!="function"||typeof X.setAttribute!="function"||typeof X.namespaceURI!="string"||typeof X.insertBefore!="function"||typeof X.hasChildNodes!="function"||X.nodeType!==E(X)||X.childNodes!==v(X)},En=function(X){if(!E||typeof X!="object"||X===null)return!1;try{return E(X)===sn.documentFragment}catch{return!1}},Xi=function(X){if(!E||typeof X!="object"||X===null)return!1;try{return typeof E(X)=="number"}catch{return!1}};function ei(Te,X,ge){xa(Te,De=>{De.call(t,X,ge,Cn)})}const An=function(X){let ge=null;if(ei(U.beforeSanitizeElements,X,null),Xa(X))return ot(X),!0;const De=Tt(D?D(X):X.nodeName);if(ei(U.uponSanitizeElement,X,{tagName:De,allowedTags:he}),xt&&X.hasChildNodes()&&!Xi(X.firstElementChild)&&wr(/<[/\w!]/g,X.innerHTML)&&wr(/<[/\w!]/g,X.textContent)||xt&&X.namespaceURI===Pt&&De==="style"&&Xi(X.firstElementChild)||X.nodeType===sn.progressingInstruction||xt&&X.nodeType===sn.comment&&wr(/<[/\w]/g,X.data))return ot(X),!0;if(se[De]||!(be.tagCheck instanceof Function&&be.tagCheck(De))&&!he[De]){if(!se[De]&&Tn(De)&&(Q.tagNameCheck instanceof RegExp&&wr(Q.tagNameCheck,De)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(De)))return!1;if(_t&&!Oe[De]){const qe=y(X),tt=v(X);if(tt&&qe){const Mt=tt.length;for(let Nt=Mt-1;Nt>=0;--Nt){const kt=b(tt[Nt],!0);qe.insertBefore(kt,m(X))}}}return ot(X),!0}return(E?E(X):X.nodeType)===sn.element&&!Vi(X)||(De==="noscript"||De==="noembed"||De==="noframes")&&wr(/<\/no(script|embed|frames)/i,X.innerHTML)?(ot(X),!0):(Ke&&X.nodeType===sn.text&&(ge=X.textContent,xa([K,G,N],qe=>{ge=$o(ge,qe," ")}),X.textContent!==ge&&(Ho(t.removed,{element:X.cloneNode()}),X.textContent=ge)),ei(U.afterSanitizeElements,X,null),!1)},Dn=function(X,ge,De){if(re[ge]||je&&(ge==="id"||ge==="name")&&(De in r||De in Ec))return!1;const et=W[ge]||be.attributeCheck instanceof Function&&be.attributeCheck(ge,X);if(!(Se&&!re[ge]&&wr(H,ge))){if(!(ve&&wr(z,ge))){if(!et||re[ge]){if(!(Tn(X)&&(Q.tagNameCheck instanceof RegExp&&wr(Q.tagNameCheck,X)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(X))&&(Q.attributeNameCheck instanceof RegExp&&wr(Q.attributeNameCheck,ge)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(ge,X))||ge==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&wr(Q.tagNameCheck,De)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(De))))return!1}else if(!Rt[ge]){if(!wr(pe,$o(De,J,""))){if(!((ge==="src"||ge==="xlink:href"||ge==="href")&&X!=="script"&&yE(De,"data:")===0&&yt[X])){if(!(Le&&!wr(q,$o(De,J,"")))){if(De)return!1}}}}}}return!0},Js=Ge({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Tn=function(X){return!Js[Pu(X)]&&wr(ie,X)},Gt=function(X){ei(U.beforeSanitizeAttributes,X,null);const ge=X.attributes;if(!ge||Xa(X))return;const De={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let et=ge.length;for(;et--;){const qe=ge[et],tt=qe.name,Mt=qe.namespaceURI,Nt=qe.value,kt=Tt(tt),Za=Nt;let Vt=tt==="value"?Za:rQ(Za);if(De.attrName=kt,De.attrValue=Vt,De.keepAttr=!0,De.forceKeepAttr=void 0,ei(U.uponSanitizeAttribute,X,De),Vt=De.attrValue,qt&&(kt==="id"||kt==="name")&&yE(Vt,ct)!==0&&(It(tt,X),Vt=ct+Vt),xt&&wr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Vt)){It(tt,X);continue}if(kt==="attributename"&&_E(Vt,"href")){It(tt,X);continue}if(De.forceKeepAttr)continue;if(!De.keepAttr){It(tt,X);continue}if(!xe&&wr(/\/>/i,Vt)){It(tt,X);continue}Ke&&xa([K,G,N],Ml=>{Vt=$o(Vt,Ml," ")});const Qa=Tt(X.nodeName);if(!Dn(Qa,kt,Vt)){It(tt,X);continue}if(w&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Mt)switch(f.getAttributeType(Qa,kt)){case"TrustedHTML":{Vt=O(Vt);break}case"TrustedScriptURL":{Vt=w.createScriptURL(Vt);break}}if(Vt!==Za)try{Mt?X.setAttributeNS(Mt,tt,Vt):X.setAttribute(tt,Vt),Xa(X)?ot(X):gE(t.removed)}catch{It(tt,X)}}ei(U.afterSanitizeAttributes,X,null)},ea=function(X){let ge=null;const De=Va(X);for(ei(U.beforeSanitizeShadowDOM,X,null);ge=De.nextNode();)if(ei(U.uponSanitizeShadowNode,ge,null),An(ge),Gt(ge),En(ge.content)&&ea(ge.content),(E?E(ge):ge.nodeType)===sn.element){const qe=x?x(ge):ge.shadowRoot;En(qe)&&(Mn(qe),ea(qe))}ei(U.afterSanitizeShadowDOM,X,null)},Mn=function(X){const ge=E?E(X):X.nodeType;if(ge===sn.element){const qe=x?x(X):X.shadowRoot;En(qe)&&(Mn(qe),ea(qe))}const De=v?v(X):X.childNodes;if(!De)return;const et=[];xa(De,qe=>{Ho(et,qe)});for(const qe of et)Mn(qe);if(ge===sn.element){const qe=D?D(X):null;if(typeof qe=="string"&&Tt(qe)==="template"){const tt=X.content;En(tt)&&Mn(tt)}}};return t.sanitize=function(Te){let X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ge=null,De=null,et=null,qe=null;if(qr=!Te,qr&&(Te="<!-->"),typeof Te!="string"&&!Xi(Te)&&(Te=oQ(Te),typeof Te!="string"))throw Uo("dirty is not a string, aborting");if(!t.isSupported)return Te;if(Ce||Qs(X),t.removed=[],typeof Te=="string"&&(Ue=!1),Ue){const Nt=D?D(Te):Te.nodeName;if(typeof Nt=="string"){const kt=Tt(Nt);if(!he[kt]||se[kt])throw Uo("root node is forbidden and cannot be sanitized in-place")}if(Xa(Te))throw Uo("root node is clobbered and cannot be sanitized in-place");Mn(Te)}else if(Xi(Te))ge=wn("<!---->"),De=ge.ownerDocument.importNode(Te,!0),De.nodeType===sn.element&&De.nodeName==="BODY"||De.nodeName==="HTML"?ge=De:ge.appendChild(De),Mn(De);else{if(!de&&!Ke&&!Ae&&Te.indexOf("<")===-1)return w&&$e?O(Te):Te;if(ge=wn(Te),!ge)return de?null:$e?M:""}ge&&we&&ot(ge.firstChild);const tt=Va(Ue?Te:ge);for(;et=tt.nextNode();)An(et),Gt(et),En(et.content)&&ea(et.content);if(Ue)return Ke&&Tl(Te),Te;if(de){if(Ke&&Tl(ge),Ee)for(qe=I.call(ge.ownerDocument);ge.firstChild;)qe.appendChild(ge.firstChild);else qe=ge;return(W.shadowroot||W.shadowrootmode)&&(qe=V.call(i,qe,!0)),qe}let Mt=Ae?ge.outerHTML:ge.innerHTML;return Ae&&he["!doctype"]&&ge.ownerDocument&&ge.ownerDocument.doctype&&ge.ownerDocument.doctype.name&&wr(_Q,ge.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+ge.ownerDocument.doctype.name+`>
|
|
215
|
+
`+Mt),Ke&&xa([K,G,N],Nt=>{Mt=$o(Mt,Nt," ")}),w&&$e?O(Mt):Mt},t.setConfig=function(){let Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qs(Te),Ce=!0},t.clearConfig=function(){Cn=null,Ce=!1},t.isValidAttribute=function(Te,X,ge){Cn||Qs({});const De=Tt(Te),et=Tt(X);return Dn(De,et,ge)},t.addHook=function(Te,X){typeof X=="function"&&Ho(U[Te],X)},t.removeHook=function(Te,X){if(X!==void 0){const ge=eQ(U[Te],X);return ge===-1?void 0:tQ(U[Te],ge,1)[0]}return gE(U[Te])},t.removeHooks=function(Te){U[Te]=[]},t.removeAllHooks=function(){U=DE()},t}var xQ=OM();const ic=new Li({html:!0,linkify:!0}),LM=new Set(["bullet_list_open","ordered_list_open","blockquote_open"]);function CQ(e){return LM.has(e)?!1:e.endsWith("_open")||e==="fence"||e==="code_block"}function wQ(e){return/^\s*<!--.*?-->\s*$/.test(e)}const EQ=/^\s*(```+|~~~+)/;function AQ(e){const t=e.split(`
|
|
216
|
+
`),r=[],i=[];let o=null;for(let l=0;l<t.length;l++){const d=t[l],a=EQ.exec(d);if(a){const u=a[1][0];o===null?o=u:u===o&&(o=null)}else if(o===null&&wQ(d))continue;r.push(d),i.push(l)}return{text:r.join(`
|
|
217
|
+
`),lineMap:i}}ic.core.ruler.push("codev_data_line",e=>{const t=e.env&&e.env.lineMap;for(const r of e.tokens)if(r.map)if(CQ(r.type)){const i=r.map[0],o=t?t[i]??i:i;r.attrSet("data-line",String(o)),r.attrSet("tabindex","0")}else LM.has(r.type)&&r.attrSet("data-row","");return!0});var OE;const TE=(OE=ic.renderer.rules.fence)==null?void 0:OE.bind(ic.renderer.rules);ic.renderer.rules.fence=(e,t,r,i,o)=>{const l=e[t],d=l.attrGet("data-line");l.attrs&&(l.attrs=l.attrs.filter(([u])=>u!=="data-line"));let a;return TE?a=TE(e,t,r,i,o):a=o.renderToken(e,t,r),d!==null&&a.startsWith("<pre")&&(a=`<pre data-line="${d}" tabindex="0"${a.slice(4)}`),a};function DQ(e){const{text:t,lineMap:r}=AQ(e),i=ic.render(t,{lineMap:r});return xQ.sanitize(i)}j.forwardRef(function({line:t,onSubmit:r,onCancel:i,initialText:o},l){const d=o!==void 0,[a,u]=j.useState(o??""),c=j.useRef(null);j.useEffect(()=>{const b=c.current;if(!b)return;b.focus();const S=b.value.length;b.setSelectionRange(S,S)},[]);const p=b=>{const S=a.trim();S&&r(S,b)};j.useImperativeHandle(l,()=>({submit:()=>p(!0)}));const f=b=>{b.key==="Enter"&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),p(!0)):b.key==="Escape"&&(b.preventDefault(),i(!0))},g=a.trim().length===0;return B.jsxs("div",{className:"codev-canvas-comment-composer",children:[B.jsx("textarea",{ref:c,className:"codev-canvas-comment-composer-input","aria-label":`${d?"Edit":"Add"} comment on line ${t+1}`,placeholder:"Add a review comment… (⌘/Ctrl+Enter to submit, Esc to cancel)",rows:3,value:a,onChange:b=>u(b.target.value),onKeyDown:f}),B.jsxs("div",{className:"codev-canvas-comment-composer-actions",children:[B.jsx("button",{type:"button",className:"codev-canvas-comment-composer-cancel",onClick:b=>i(b.detail===0),children:"Cancel"}),B.jsx("button",{type:"button",className:"codev-canvas-comment-composer-submit",onClick:b=>p(b.detail===0),disabled:g,children:d?"Save":"Comment"})]})]})});function TQ({source:e}){return B.jsx("div",{className:"codev-artifact-canvas-rendered",dangerouslySetInnerHTML:{__html:j.useMemo(()=>DQ(e),[e])}})}const MQ=2e3;function kQ(e){return e.status==="ready"?e.document:e.status==="error"?e.lastDocument:null}function ME(e,t){switch(t.kind){case"document":return e.status==="ready"&&e.document.version===t.document.version?e:{status:"ready",document:t.document};case"not-found":return e.status==="not-found"&&e.message===t.message?e:{status:"not-found",message:t.message};case"error":{const r=kQ(e);return e.status==="error"&&e.message===t.message&&e.lastDocument===r?e:{status:"error",message:t.message,lastDocument:r}}}}function kE(){return document.visibilityState==="visible"}function OQ(e){const[t,r]=j.useState({status:"loading"}),[i,o]=j.useState(kE),l=j.useRef(0),d=j.useRef(!1);j.useEffect(()=>{const c=()=>o(kE());return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[]);const a=j.useCallback(async()=>{if(d.current)return;d.current=!0;const c=++l.current;try{const p=await cL();c===l.current&&r(f=>ME(f,p))}finally{d.current=!1}},[]);j.useEffect(()=>{if(!e||!i)return;a();const c=setInterval(()=>{a()},MQ);return()=>clearInterval(c)},[e,i,a]);const u=j.useCallback(c=>{l.current++,r(p=>ME(p,{kind:"document",document:c}))},[]);return{state:t,applyDocument:u}}const LQ={drafts:new Map,held:[],submitting:new Set,nextHeldKey:0},RQ={"file-missing":()=>B.jsx(B.Fragment,{children:"The decisions file is gone, so this draft was not sent."}),gone:e=>B.jsxs(B.Fragment,{children:[e," is no longer under ",B.jsx("code",{children:"## Open"})," (main may have moved it to ",B.jsx("code",{children:"## Ruled"}),"), so this draft was not sent."]}),duplicate:e=>B.jsxs(B.Fragment,{children:["Another open item now has the id ",e,", so the tab cannot write to either, and this draft was not sent."]}),ruled:e=>B.jsxs(B.Fragment,{children:["Text has been written under ",e," since you started this draft, so the tab no longer writes to it, and this draft was not sent."]}),"not-writable":e=>B.jsxs(B.Fragment,{children:["The tab can no longer write a ruling for ",e,", so this draft was not sent."]})},PQ={"open-missing":B.jsxs(B.Fragment,{children:["This file has no ",B.jsx("code",{children:"## Open"})," section, so there is nothing to rule on."]}),"open-multiple":B.jsxs(B.Fragment,{children:["This file has more than one ",B.jsx("code",{children:"## Open"})," section. Every item is read-only until there is one."]}),"ruled-multiple":B.jsxs(B.Fragment,{children:["This file has more than one ",B.jsx("code",{children:"## Ruled"})," section; only the first is read."]})},BQ={"id-missing":B.jsx(B.Fragment,{children:"This heading has no id, so the tab cannot write a ruling for it."}),"duplicate-id":B.jsx(B.Fragment,{children:"Another open item has the same id. Items that share an id are read-only until the ids differ."}),"your-word-missing":B.jsxs(B.Fragment,{children:["This item has no ",B.jsx("code",{children:"**Your word:**"})," line, so the tab cannot write a ruling for it."]}),"your-word-multiple":B.jsxs(B.Fragment,{children:["This item has more than one ",B.jsx("code",{children:"**Your word:**"})," line, so the tab cannot write a ruling for it."]})},IQ={"unrecognized-format":"the date or time is not in a recognized format","unknown-zone":"the time zone is not one the tab recognizes","nonexistent-time":"that time does not exist on that date in that zone (the clocks skipped it)","ambiguous-time":"that time happens twice on that date in that zone (the clocks went back)"},NQ={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"},RM=/^https?:\/\//i;function jQ(e){var i;if(!(e.target instanceof Element))return;const t=e.target.closest("a");if(!t)return;e.preventDefault();const r=((i=t.getAttribute("href"))==null?void 0:i.trim())??"";RM.test(r)&&window.open(r,"_blank","noopener")}function iy({source:e}){const t=j.useRef(null);return j.useLayoutEffect(()=>{var r,i;for(const o of((r=t.current)==null?void 0:r.querySelectorAll("a"))??[]){const l=((i=o.getAttribute("href"))==null?void 0:i.trim())??"";RM.test(l)?(o.target="_blank",o.rel="noopener noreferrer"):o.removeAttribute("href")}},[e]),B.jsx("div",{ref:t,children:B.jsx(TQ,{source:e})})}function PM(e){return[e.word,e.comment.trim()].filter(Boolean).join(`
|
|
218
|
+
|
|
219
|
+
`)}function nf(e,t,r,i){const o=new Map(e.drafts);r?o.set(t,r):o.delete(t);const l=new Set(e.submitting);return i?l.add(t):l.delete(t),{...e,drafts:o,submitting:l}}function FQ(e,t){if(!e)return"file-missing";const r=e.items.filter(o=>o.id===t);if(r.length===0)return"gone";if(r.length>1)return"duplicate";const[i]=r;return i.writable?i:i.currentRuling?"ruled":"not-writable"}function zQ(e,t,r){if(!t&&!r)return e;let i=null;const o=[...e.held];let l=e.nextHeldKey;for(const[d,a]of e.drafts){if(e.submitting.has(d))continue;const u=FQ(t,d);if(typeof u=="string"){i??(i=new Map(e.drafts)),i.delete(d);const f=PM(a);f&&o.push({key:l++,id:d,question:a.question,text:f,reason:u});continue}const{word:c,...p}=a;c!==void 0&&!u.options.some(f=>f.word===c)&&(i??(i=new Map(e.drafts)),i.set(d,{...p,droppedWord:c}))}return i?{...e,drafts:i,held:o,nextHeldKey:l}:e}function HQ(e){const t=new Map;return e.map(r=>{const i=t.get(r.id)??0;return t.set(r.id,i+1),`${r.id}#${i}`})}function $Q({stamp:e}){return e.instant?B.jsx("time",{className:"decisions-stamp",dateTime:e.instant,title:e.raw,children:new Date(e.instant).toLocaleString(void 0,NQ)}):B.jsxs("span",{className:"decisions-stamp decisions-stamp-unconverted",children:[e.raw,B.jsxs("span",{className:"decisions-stamp-flag",children:["Not converted",e.unconvertedReason&&`: ${IQ[e.unconvertedReason]}`]})]})}function UQ({entries:e}){return B.jsx("ol",{className:"decisions-thread","aria-label":"Questions and answers",children:e.map((t,r)=>B.jsxs("li",{className:`decisions-thread-entry decisions-thread-${t.kind}`,children:[B.jsxs("div",{className:"decisions-thread-label",children:[B.jsx("span",{className:"decisions-thread-who",children:t.kind==="asked"?"You asked":`${t.name}'s answer`}),B.jsx("span",{className:"decisions-thread-time",children:t.time})]}),B.jsx(iy,{source:t.markdown}),t.kind==="asked"&&!t.answered&&B.jsx("div",{className:"decisions-thread-awaiting",children:"Awaiting an answer"})]},r))})}function BM({option:e}){return B.jsxs(B.Fragment,{children:[B.jsxs("span",{className:"decisions-option-term",children:[B.jsx("code",{className:"decisions-option-word",children:e.word}),e.description&&":"]}),e.description&&B.jsxs(B.Fragment,{children:[" ",B.jsx("span",{className:"decisions-option-desc",children:e.description})]}),e.recommended&&B.jsxs(B.Fragment,{children:[" ",B.jsx("span",{className:"decisions-badge",children:"Recommended"})]})]})}function qQ({options:e}){return B.jsxs("div",{className:"decisions-options",children:[B.jsx("div",{className:"decisions-section-label",children:"Your word"}),B.jsx("ul",{className:"decisions-option-list","aria-label":"Options",children:e.map((t,r)=>B.jsx("li",{className:"decisions-option",children:B.jsx(BM,{option:t})},`${t.word}#${r}`))})]})}function WQ({item:e,draft:t,submitting:r,onEdit:i,onSubmit:o}){const l=j.useId(),d=j.useId(),a=t==null?void 0:t.word,u=(t==null?void 0:t.comment)??"",c=!r&&t!==void 0&&PM(t)!=="",p=f=>{f.preventDefault(),c&&t&&o(e,t)};return B.jsxs("form",{className:"decisions-form",onSubmit:p,children:[e.options.length>0&&B.jsxs("fieldset",{className:"decisions-options",disabled:r,children:[B.jsx("legend",{className:"decisions-section-label",children:"Your word"}),e.options.map((f,g)=>B.jsxs("label",{className:"decisions-option decisions-choice",children:[B.jsx("input",{type:"radio",name:l,value:f.word,checked:a===f.word,onChange:()=>i(e,{word:f.word})})," ",B.jsx(BM,{option:f})]},`${f.word}#${g}`)),a!==void 0&&B.jsx("button",{type:"button",className:"decisions-link-btn",onClick:()=>i(e,{word:void 0}),children:"Clear choice"})]}),(t==null?void 0:t.droppedWord)&&B.jsxs("div",{className:"decisions-notice",role:"status",children:["The option ",B.jsx("code",{children:t.droppedWord})," you chose is no longer offered, so your choice was cleared.",u.trim()&&" Your comment is kept."]}),B.jsx("label",{htmlFor:d,className:"decisions-section-label decisions-comment-label",children:"Comment or question"}),B.jsx("textarea",{id:d,className:"decisions-comment",rows:3,value:u,readOnly:r,placeholder:"Anything to add to your word, or instead of one; or a question to have answered before you rule.",onChange:f=>i(e,{comment:f.target.value})}),(t==null?void 0:t.refusal)&&B.jsx("div",{className:"decisions-error",role:"alert",children:t.refusal}),B.jsx("div",{className:"decisions-form-actions",children:B.jsx("button",{type:"submit",className:"decisions-submit-btn",disabled:!c,children:r?"Submitting…":"Submit"})})]})}function GQ({held:e,domId:t,onDiscard:r}){return B.jsx("section",{className:"decisions-held","aria-label":"Held drafts",children:e.map(i=>B.jsxs("article",{id:t(i.key),className:"decisions-card decisions-held-card","aria-label":`Held draft for ${i.id}`,children:[B.jsxs("div",{className:"decisions-card-meta",children:[B.jsx("span",{className:"decisions-item-id",children:i.id}),B.jsx("span",{className:"decisions-held-tag",children:"Held draft"})]}),i.question&&B.jsx("div",{className:"decisions-held-question",children:i.question}),B.jsx("div",{className:"decisions-notice",role:"note",children:RQ[i.reason](i.id)}),B.jsx("pre",{className:"decisions-ruling-text decisions-held-text",children:i.text}),B.jsx("div",{className:"decisions-form-actions",children:B.jsx("button",{type:"button",className:"decisions-discard-btn",onClick:()=>r(i.key),children:"Discard"})})]},i.key))})}function KQ({text:e}){return B.jsxs("div",{className:"decisions-ruling",children:[B.jsx("div",{className:"decisions-section-label",children:"Written under this item"}),B.jsx("pre",{className:"decisions-ruling-text",children:e}),B.jsx("p",{className:"decisions-ruling-note",children:"You have written under this item, and main will act on it. To change it, tell main or edit the file by hand."})]})}function YQ({item:e,ruling:t,handlers:r}){const i=j.useId(),o=j.useId(),l=t.held.filter(d=>d.id===e.id).at(-1);return B.jsxs("article",{className:"decisions-card","aria-labelledby":e.question?i:o,children:[B.jsxs("div",{className:"decisions-card-meta",children:[B.jsx("span",{id:o,className:"decisions-item-id",children:e.id||"(no id)"}),e.stamp&&B.jsx($Q,{stamp:e.stamp})]}),e.question&&B.jsx("h3",{id:i,className:"decisions-card-question",children:e.question}),e.problems.map(d=>B.jsx("div",{className:"decisions-notice",role:"note",children:BQ[d]},d)),e.bodyMarkdown&&B.jsx("div",{className:"decisions-card-body",children:B.jsx(iy,{source:e.bodyMarkdown})}),e.qa.length>0&&B.jsx(UQ,{entries:e.qa}),e.writable?B.jsx(WQ,{item:e,draft:t.drafts.get(e.id),submitting:t.submitting.has(e.id),onEdit:r.onEdit,onSubmit:r.onSubmit}):e.options.length>0&&B.jsx(qQ,{options:e.options}),e.currentRuling&&B.jsx(KQ,{text:e.currentRuling}),l&&B.jsxs("div",{className:"decisions-notice decisions-held-pointer",role:"note",children:["An unsent draft for this item is held at the top of the tab."," ",B.jsx("button",{type:"button",className:"decisions-link-btn",onClick:()=>r.onShowHeld(l.key),children:"Show it"})]})]})}function VQ({doc:e,ruling:t,handlers:r}){const i=HQ(e.items);return B.jsxs(B.Fragment,{children:[e.problems.map(o=>B.jsx("div",{className:"decisions-notice",role:"status",children:PQ[o]},o)),e.items.length>0?B.jsx("div",{className:"decisions-cards",children:e.items.map((o,l)=>B.jsx(YQ,{item:o,ruling:t,handlers:r},i[l]))}):!e.problems.includes("open-missing")&&B.jsx("div",{className:"decisions-empty",children:"No open decisions."}),B.jsxs("details",{className:"decisions-ruled",children:[B.jsx("summary",{children:"Ruled"}),e.ruledMarkdown?B.jsx(iy,{source:e.ruledMarkdown}):B.jsxs("div",{className:"decisions-ruled-empty",children:["Nothing under ",B.jsx("code",{children:"## Ruled"})," yet."]})]})]})}function XQ({isActive:e}){const{state:t,applyDocument:r}=OQ(e),i=t.status==="ready"?t.document:t.status==="error"?t.lastDocument:null,[o,l]=j.useState(LQ),d=zQ(o,i,t.status==="not-found");d!==o&&l(d);const a=j.useCallback((S,m)=>{l(v=>{const y={...v.drafts.get(S.id)??{comment:""},...m,question:S.question};return"word"in m&&delete y.droppedWord,nf(v,S.id,y,!1)})},[]),u=j.useCallback(async(S,m)=>{l(y=>nf(y,S.id,{...m,refusal:void 0},!0));let v;try{v=await hL({id:S.id,fingerprint:S.fingerprint,word:m.word,comment:m.comment.trim()||void 0})}catch(y){v={kind:"error",message:`The ruling could not be sent: ${y instanceof Error?y.message:String(y)}`}}v.kind==="document"?(r(v.document),l(y=>nf(y,S.id,null,!1))):l(y=>nf(y,S.id,{...m,refusal:v.message},!1))},[r]),c=j.useCallback(S=>{l(m=>({...m,held:m.held.filter(v=>v.key!==S)}))},[]),p=j.useId(),f=j.useCallback(S=>`${p}held-${S}`,[p]),g=j.useCallback(S=>{var m;(m=document.getElementById(f(S)))==null||m.scrollIntoView({block:"start",behavior:"smooth"})},[f]),b={onEdit:a,onSubmit:u,onShowHeld:g};return B.jsx("div",{className:"decisions-view",onClick:jQ,children:B.jsxs("div",{className:"decisions-content",children:[B.jsxs("div",{className:"decisions-header",children:[B.jsx("h2",{className:"decisions-title",children:"Decisions"}),i&&B.jsxs("span",{className:"decisions-count",children:[i.items.length," open"]})]}),i&&B.jsx("div",{className:"decisions-path",children:B.jsx("code",{children:i.path})}),t.status==="loading"&&B.jsx("div",{className:"decisions-loading",children:"Loading decisions…"}),t.status==="not-found"&&B.jsx("div",{className:"decisions-notice",role:"status",children:t.message}),t.status==="error"&&B.jsxs("div",{className:"decisions-error",role:"alert",children:[t.message,t.lastDocument&&" Showing the last version read."]}),d.held.length>0&&B.jsx(GQ,{held:d.held,domId:f,onDiscard:c}),i&&B.jsx(VQ,{doc:i,ruling:d,handlers:b})]})})}function ZQ(e,t){const r=e==null?void 0:e.trim(),i=t==null?void 0:t.trim();return r&&i&&r.toLowerCase()!==i.toLowerCase()?`${i} on ${r} overview`:i?`${i} overview`:"overview"}function QQ(){const{state:e,refresh:t}=wL(),{data:r}=HE(),{tabs:i,activeTab:o,activeTabId:l,selectTab:d}=TL(e),a=zE(`(max-width: ${PE}px)`),[u,c]=j.useState(null),[p,f]=j.useState(()=>kL()),[g,b]=j.useState(null),[S,m]=j.useState(!1),[v,y]=j.useState(null);j.useEffect(()=>{(o==null?void 0:o.type)==="architect"&&o.architectName&&f(o.architectName)},[o==null?void 0:o.id,o==null?void 0:o.type,o==null?void 0:o.architectName]);const[x,C]=j.useState(new Set),E=j.useRef(new Map),D=j.useCallback(async(G,N,H,z)=>{try{const q=await ud(G,N,z);N&&N>0&&E.current.set(q.id,N),t()}catch(q){console.error("Failed to open file:",q)}},[t]),w=ZQ(e==null?void 0:e.hostname,e==null?void 0:e.workspaceName);j.useEffect(()=>{document.title=w},[w]);const[M]=j.useState(()=>new URLSearchParams(window.location.search).get("fullscreen")==="1");j.useEffect(()=>{if(!o)return;(o.type==="architect"||o.type==="builder"||o.type==="shell")&&C(N=>{if(N.has(o.id))return N;const H=new Set(N);return H.add(o.id),H})},[o==null?void 0:o.id,o==null?void 0:o.type]);const T=G=>{const N=mv(G);return N?B.jsx(Sv,{wsPath:N,onFileOpen:D,persistent:G.persistent,onPermanentClose:t}):B.jsx("div",{className:"no-terminal",children:"No terminal session"})},O=G=>{if(!G.annotationId||!e)return B.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!e.annotations.find(z=>z.id===G.annotationId))return B.jsx("div",{className:"no-terminal",children:"Annotation not found"});const H=E.current.get(G.annotationId);return H!==void 0&&E.current.delete(G.annotationId),B.jsx(Y8,{tabId:G.annotationId,initialLine:H??G.initialLine})},L=j.useCallback((G,N,H)=>G.map(z=>{const q=mv(z),J=N===z.id;return B.jsx("div",{className:"terminal-tab-pane",style:{display:J?void 0:"none"},children:q?B.jsx(Sv,{wsPath:q,onFileOpen:D,persistent:z.persistent,toolbarExtra:J?H:void 0,onPermanentClose:t}):B.jsx("div",{className:"no-terminal",children:"No terminal session"})},z.id)}),[D,t]),P=G=>{const N=i.filter(H=>G.includes(H.type)&&x.has(H.id));return B.jsxs(B.Fragment,{children:[L(N,l),B.jsx("div",{style:{display:(o==null?void 0:o.type)==="work"?void 0:"none",height:"100%"},children:B.jsx(U8,{state:e,onRefresh:t,onSelectTab:d})}),B.jsx("div",{style:{display:(o==null?void 0:o.type)==="analytics"?void 0:"none",height:"100%"},children:B.jsx(ZY,{isActive:(o==null?void 0:o.type)==="analytics"})}),(e==null?void 0:e.teamEnabled)&&B.jsx("div",{style:{display:(o==null?void 0:o.type)==="team"?void 0:"none",height:"100%"},children:B.jsx(aV,{isActive:(o==null?void 0:o.type)==="team"})}),i.some(H=>H.type==="decisions")&&B.jsx("div",{style:{display:(o==null?void 0:o.type)==="decisions"?void 0:"none",height:"100%"},children:B.jsx(XQ,{isActive:(o==null?void 0:o.type)==="decisions"})}),(o==null?void 0:o.type)==="file"&&O(o)]})};if(M)return o&&(o.type==="architect"||o.type==="builder"||o.type==="shell")?B.jsx("div",{className:"fullscreen-terminal",children:T(o)}):B.jsx("div",{className:"fullscreen-terminal"});if(a)return B.jsx("div",{className:"mobile-wrapper",children:B.jsx(K8,{tabs:i,activeTabId:l,onSelectTab:d,onRefresh:t,children:P(["architect","builder","shell"])})});const R=i.filter(G=>G.type==="architect"),I=R[0],$=()=>{c(u==="right"?null:"left")},V=()=>{c(u==="left"?null:"right")},U=B.jsxs(B.Fragment,{children:[u!=="left"&&B.jsx("button",{className:"terminal-control-btn",onPointerDown:G=>G.preventDefault(),onClick:$,title:u==="right"?"Restore split layout":"Collapse architect panel","aria-label":u==="right"?"Restore split layout":"Collapse architect panel",children:B.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("line",{x1:"3",y1:"2",x2:"3",y2:"14"}),B.jsx("path",{d:"M12 5l-4 3 4 3"})]})}),u!=="right"&&B.jsx("button",{className:"terminal-control-btn",onPointerDown:G=>G.preventDefault(),onClick:V,title:"Collapse work panel","aria-label":"Collapse work panel",children:B.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[B.jsx("line",{x1:"13",y1:"2",x2:"13",y2:"14"}),B.jsx("path",{d:"M4 5l4 3-4 3"})]})})]});let K;if(R.length===0)K=B.jsx("div",{className:"no-architect",children:"No architect terminal"});else if(R.length===1){const G=mv(I);K=G?B.jsx(Sv,{wsPath:G,onFileOpen:D,persistent:I.persistent,toolbarExtra:U,onPermanentClose:t}):B.jsx("div",{className:"no-architect",children:"No architect terminal"})}else{const G=R.find(H=>H.architectName===p)??R[0],N=(G==null?void 0:G.id)??"";K=B.jsxs("div",{className:"architect-pane",children:[B.jsx(PL,{tabs:R,activeTabId:N,onSelectTab:H=>{const z=R.find(q=>q.id===H);z!=null&&z.architectName&&(f(z.architectName),OL(z.architectName))},onRequestRemove:H=>{b(H),y(null)}}),B.jsx("div",{className:"architect-pane-body",children:L(R,N,U)})]})}return B.jsxs("div",{className:"app",children:[B.jsxs("header",{className:"app-header",children:[B.jsx("h1",{className:"app-title",children:w}),B.jsxs("div",{className:"header-controls",children:[B.jsx(G8,{count:(r==null?void 0:r.heldCount)??0,escalated:(r==null?void 0:r.mailboxEscalated)??!1,loadMessages:dL}),(e==null?void 0:e.version)&&B.jsxs("span",{className:"header-version",children:["v",e.version]})]})]}),B.jsx("div",{className:"app-body",children:B.jsx(LL,{left:K,right:B.jsxs("div",{className:"right-panel",children:[B.jsx(qE,{tabs:i.filter(G=>G.type!=="architect"),activeTabId:l,onSelectTab:d,onRefresh:t}),B.jsx("div",{className:"tab-content",role:"tabpanel",children:P(["builder","shell"])})]}),collapsedPane:u,onExpandLeft:()=>c(null),onExpandRight:()=>c(null)})}),g&&B.jsx(JQ,{name:g,inFlightBuilders:((e==null?void 0:e.builders)??[]).filter(G=>G.spawnedByArchitect===g),submitting:S,error:v,onCancel:()=>{S||(b(null),y(null))},onConfirm:async()=>{if(!S){m(!0),y(null);try{const G=await oL(g);G.success?(b(null),t()):y(G.error??"Failed to remove architect.")}catch(G){y(G instanceof Error?G.message:String(G))}finally{m(!1)}}}})]})}function JQ({name:e,inFlightBuilders:t,submitting:r,error:i,onCancel:o,onConfirm:l}){return B.jsx("div",{className:"remove-architect-modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"remove-arch-title",children:B.jsxs("div",{className:"remove-architect-modal",children:[B.jsxs("h2",{id:"remove-arch-title",children:["Remove architect ",B.jsx("code",{children:e}),"?"]}),t.length>0?B.jsxs("p",{children:[B.jsxs("strong",{children:[t.length," in-flight builder",t.length===1?"":"s"]})," ","spawned by ",B.jsx("code",{children:e}),":"," ",t.map(d=>d.name||d.id).filter(Boolean).join(", "),"."," ","They’ll continue running and fall back to ",B.jsx("code",{children:"main"})," for routing."]}):B.jsx("p",{children:"This architect has no in-flight builders."}),i&&B.jsx("p",{className:"remove-architect-error",role:"alert",children:i}),B.jsxs("div",{className:"remove-architect-modal-actions",children:[B.jsx("button",{type:"button",onClick:o,disabled:r,children:"Cancel"}),B.jsx("button",{type:"button",onClick:l,disabled:r,className:"primary",children:r?"Removing…":"Remove"})]})]})})}tL.createRoot(document.getElementById("root")).render(B.jsx(j.StrictMode,{children:B.jsx(QQ,{})}));
|
|
220
|
+
//# sourceMappingURL=index-BuflRUi6.js.map
|