@cursor/july 0.1.104 → 0.1.107
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/dist/bin/agent-serve.js +1 -8
- package/dist/channels/bitbucket/types.d.ts +2 -4
- package/dist/channels/bitbucket/types.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +1 -0
- package/dist/channels/deployments/types.d.ts +7 -8
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/types.d.ts +2 -4
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/types.d.ts +2 -5
- package/dist/channels/gitlab/types.d.ts.map +1 -1
- package/dist/channels/origin/types.d.ts +2 -3
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +3 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +1 -1
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +48 -11
- package/dist/channels/slack/types.d.ts +4 -3
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +3 -3
- package/dist/docs/ab.html +6 -6
- package/dist/docs/assets/{app.DbMWUyGb.js → app.CtuckIiL.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DXXZxiMv.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DcNeTh9o.js → VPLocalSearchBox.Bkkhnu8K.js} +2 -2
- package/dist/docs/assets/chunks/{theme.DMjhY3gl.js → theme.DhpIe0Pa.js} +2 -2
- package/dist/docs/assets/guides_grokbot-agents.md.DVqdhBKb.js +9 -0
- package/dist/docs/assets/guides_grokbot-agents.md.DVqdhBKb.lean.js +1 -0
- package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.js → guides_opentelemetry.md.SCRMskno.js} +3 -3
- package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.lean.js → guides_opentelemetry.md.SCRMskno.lean.js} +1 -1
- package/dist/docs/assets/index.md.BW_6tOgR.js +5 -0
- package/dist/docs/assets/index.md.BW_6tOgR.lean.js +1 -0
- package/dist/docs/assets/{reference_channels.md.DBGcaB7m.js → reference_channels.md.D-qTqwcq.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.DBGcaB7m.lean.js → reference_channels.md.D-qTqwcq.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.CJNc_xYK.js → reference_cli.md.Dm67hd2D.js} +3 -2
- package/dist/docs/assets/{reference_extensions.md.DykHW3qL.js → reference_extensions.md.CGmMLblt.js} +1 -1
- package/dist/docs/assets/{skills_otel.md.CqhobH3B.js → skills_otel.md.B5Ddv1xH.js} +1 -1
- package/dist/docs/assets/{style.BRuM8477.css → style.DCD_zyg3.css} +1 -1
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +3 -0
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +1 -0
- package/dist/docs/building-with-agents.html +6 -6
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +6 -6
- package/dist/docs/evals.html +6 -6
- package/dist/docs/guides/agent-to-agent.html +6 -6
- package/dist/docs/guides/cloud-agents.html +6 -6
- package/dist/docs/guides/convert-automation.html +6 -6
- package/dist/docs/guides/github.html +6 -6
- package/dist/docs/guides/grokbot-agents.html +35 -0
- package/dist/docs/guides/grokbot-agents.md +88 -0
- package/dist/docs/guides/human-in-the-loop.html +6 -6
- package/dist/docs/guides/mcp-oauth.html +6 -6
- package/dist/docs/guides/opentelemetry.html +8 -8
- package/dist/docs/guides/opentelemetry.md +3 -4
- package/dist/docs/guides/slack.html +6 -6
- package/dist/docs/guides/webhooks.html +6 -6
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +6 -6
- package/dist/docs/index.html +8 -8
- package/dist/docs/index.md +6 -1
- package/dist/docs/llms-full.txt +178 -30
- package/dist/docs/llms.txt +2 -0
- package/dist/docs/quickstart.html +6 -6
- package/dist/docs/reference/agent-config.html +6 -6
- package/dist/docs/reference/artifacts.html +6 -6
- package/dist/docs/reference/channels.html +7 -7
- package/dist/docs/reference/channels.md +11 -19
- package/dist/docs/reference/cli.html +10 -9
- package/dist/docs/reference/cli.md +7 -3
- package/dist/docs/reference/connections.html +6 -6
- package/dist/docs/reference/extensions.html +7 -7
- package/dist/docs/reference/extensions.md +2 -0
- package/dist/docs/reference/hooks.html +6 -6
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/instructions.html +6 -6
- package/dist/docs/reference/playground.html +5 -5
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/prompt.html +6 -6
- package/dist/docs/reference/result.html +6 -6
- package/dist/docs/reference/schedules.html +6 -6
- package/dist/docs/reference/sessions.html +5 -5
- package/dist/docs/reference/skills.html +6 -6
- package/dist/docs/reference/subagents.html +6 -6
- package/dist/docs/reference/tools.html +6 -6
- package/dist/docs/scaffolding-agents.html +5 -5
- package/dist/docs/skills/ab.html +6 -6
- package/dist/docs/skills/create-agent.html +6 -6
- package/dist/docs/skills/debug.html +5 -5
- package/dist/docs/skills/evals.html +6 -6
- package/dist/docs/skills/framework-map.html +5 -5
- package/dist/docs/skills/github.html +6 -6
- package/dist/docs/skills/hillclimb.html +6 -6
- package/dist/docs/skills/index.html +5 -5
- package/dist/docs/skills/mcp-auth.html +6 -6
- package/dist/docs/skills/otel.html +8 -8
- package/dist/docs/skills/otel.md +3 -3
- package/dist/docs/skills/setup-slack.html +6 -6
- package/dist/docs/storage.html +6 -6
- package/dist/docs/templates/agentic-owners.html +6 -6
- package/dist/docs/templates/agents-md.html +6 -6
- package/dist/docs/templates/code-wiki.html +6 -6
- package/dist/docs/templates/demo.html +6 -6
- package/dist/docs/templates/grokbot-agents.html +29 -0
- package/dist/docs/templates/grokbot-agents.md +48 -0
- package/dist/docs/templates/pr-autofixer.html +6 -6
- package/dist/docs/templates/security-help.html +6 -6
- package/dist/docs/templates/security-reviewer.html +6 -6
- package/dist/docs/templates/triage.html +6 -6
- package/dist/docs/troubleshooting.html +5 -5
- package/dist/files.d.ts +7 -2
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +7 -2
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +23 -11
- package/dist/internal/cursor/backend-client.d.ts +25 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +57 -2
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +1 -0
- package/dist/internal/deploy-client.d.ts +8 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +14 -0
- package/dist/internal/deploy-manifest.d.ts +3 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +15 -12
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +1 -0
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +7 -3
- package/dist/internal/discovery/modules.d.ts +1 -1
- package/dist/internal/discovery/modules.d.ts.map +1 -1
- package/dist/internal/discovery/modules.js +1 -0
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +3 -0
- package/dist/internal/discovery/reminders.d.ts +7 -0
- package/dist/internal/discovery/reminders.d.ts.map +1 -0
- package/dist/internal/discovery/reminders.js +65 -0
- package/dist/internal/discovery/subagent.js +1 -0
- package/dist/internal/distribution.d.ts +5 -0
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +17 -0
- package/dist/internal/framework-file-storage.d.ts +3 -1
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +3 -1
- package/dist/internal/framework-storage-selection.d.ts +14 -3
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +36 -6
- package/dist/internal/guest-network.d.ts.map +1 -1
- package/dist/internal/guest-network.js +2 -0
- package/dist/internal/hosted-delivery-protocol.d.ts +48 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +60 -0
- package/dist/internal/hosted-delivery.d.ts +17 -0
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +112 -19
- package/dist/internal/hosted-managed-automation.d.ts.map +1 -1
- package/dist/internal/hosted-managed-automation.js +27 -2
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +4 -1
- package/dist/internal/local-control-plane.d.ts +18 -2
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +199 -17
- package/dist/internal/reminder-control-plane-protocol.d.ts +187 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -0
- package/dist/internal/reminder-control-plane-protocol.js +244 -0
- package/dist/internal/reminder-runner.d.ts +48 -6
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +336 -48
- package/dist/internal/reminder-schedule.d.ts +5 -2
- package/dist/internal/reminder-schedule.d.ts.map +1 -1
- package/dist/internal/reminder-schedule.js +8 -6
- package/dist/internal/reminder-store.d.ts +24 -7
- package/dist/internal/reminder-store.d.ts.map +1 -1
- package/dist/internal/reminder-store.js +6 -5
- package/dist/internal/request-error-status.d.ts +2 -0
- package/dist/internal/request-error-status.d.ts.map +1 -1
- package/dist/internal/request-error-status.js +22 -3
- package/dist/internal/scm/pr-url.d.ts +40 -0
- package/dist/internal/scm/pr-url.d.ts.map +1 -1
- package/dist/internal/scm/pr-url.js +93 -14
- package/dist/internal/sdk-runner.d.ts +12 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +18 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +78 -30
- package/dist/internal/session-engine.d.ts +12 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +137 -52
- package/dist/internal/store-mirror.d.ts +2 -2
- package/dist/internal/store-mirror.js +2 -2
- package/dist/internal/tenant-slack/relay.d.ts +2 -0
- package/dist/internal/tenant-slack/relay.d.ts.map +1 -1
- package/dist/internal/tenant-slack/relay.js +18 -8
- package/dist/internal/workspace-sync.d.ts +31 -6
- package/dist/internal/workspace-sync.d.ts.map +1 -1
- package/dist/internal/workspace-sync.js +67 -12
- package/dist/internal/workspace.d.ts +9 -0
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +16 -0
- package/dist/playground/assets/index-Bq2HpEQB.js +67 -0
- package/dist/playground/assets/index-CZKKNlmb.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/reminders.d.ts +24 -5
- package/dist/reminders.d.ts.map +1 -1
- package/dist/reminders.js +28 -5
- package/dist/types.d.ts +98 -28
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +6 -1
- package/docs/guides/grokbot-agents.md +93 -0
- package/docs/guides/opentelemetry.md +3 -4
- package/docs/reference/channels.md +11 -19
- package/docs/reference/cli.md +7 -3
- package/docs/reference/extensions.md +2 -0
- package/docs/templates/grokbot-agents.md +53 -0
- package/package.json +12 -3
- package/skills/otel/SKILL.md +3 -3
- package/src/bin/agent-serve.ts +1 -9
- package/src/channels/bitbucket/types.ts +2 -4
- package/src/channels/deployments/deployments-channel.ts +1 -0
- package/src/channels/deployments/types.ts +7 -8
- package/src/channels/github/types.ts +2 -4
- package/src/channels/gitlab/types.ts +2 -5
- package/src/channels/origin/types.ts +2 -3
- package/src/channels/slack/defaults.ts +3 -0
- package/src/channels/slack/dispatch.ts +1 -0
- package/src/channels/slack/live-delivery.ts +53 -12
- package/src/channels/slack/types.ts +4 -3
- package/src/files.ts +9 -2
- package/src/index.ts +6 -3
- package/src/internal/cli-deploy.ts +30 -12
- package/src/internal/cursor/backend-client.ts +90 -2
- package/src/internal/cursor-agent-template.ts +1 -0
- package/src/internal/deploy-client.ts +16 -0
- package/src/internal/deploy-manifest.ts +16 -11
- package/src/internal/discovery/agent.ts +1 -0
- package/src/internal/discovery/info.ts +6 -0
- package/src/internal/discovery/modules.ts +2 -4
- package/src/internal/discovery/project.ts +3 -0
- package/src/internal/discovery/reminders.ts +65 -0
- package/src/internal/discovery/subagent.ts +1 -0
- package/src/internal/distribution.ts +20 -0
- package/src/internal/framework-file-storage.ts +3 -1
- package/src/internal/framework-storage-selection.ts +43 -6
- package/src/internal/guest-network.ts +3 -0
- package/src/internal/hosted-delivery-protocol.ts +96 -0
- package/src/internal/hosted-delivery.ts +207 -28
- package/src/internal/hosted-managed-automation.ts +49 -5
- package/src/internal/init-project.ts +4 -1
- package/src/internal/local-control-plane.ts +281 -22
- package/src/internal/reminder-control-plane-protocol.ts +499 -0
- package/src/internal/reminder-runner.ts +421 -48
- package/src/internal/reminder-schedule.ts +11 -6
- package/src/internal/reminder-store.ts +27 -7
- package/src/internal/request-error-status.ts +27 -3
- package/src/internal/scm/pr-url.ts +167 -20
- package/src/internal/sdk-runner.ts +19 -0
- package/src/internal/server.ts +85 -16
- package/src/internal/session-engine.ts +173 -56
- package/src/internal/store-mirror.ts +2 -2
- package/src/internal/tenant-slack/relay.ts +28 -4
- package/src/internal/workspace-sync.ts +84 -12
- package/src/internal/workspace.ts +20 -0
- package/src/reminders.ts +35 -4
- package/src/types.ts +104 -28
- package/templates/grokbot-agents/README.md +26 -0
- package/templates/grokbot-agents/agent/agent.ts +6 -0
- package/templates/grokbot-agents/agent/extensions/grokbot.ts +5 -0
- package/templates/grokbot-agents/agent/instructions.md +7 -0
- package/templates/grokbot-agents/evals/evals.config.ts +5 -0
- package/templates/grokbot-agents/evals/grokbot-agents.eval.ts +18 -0
- package/templates/grokbot-agents/init.json +18 -0
- package/templates/grokbot-agents/package.json +17 -0
- package/templates/grokbot-agents/tsconfig.json +12 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.Bqsulb9K.js +0 -1
- package/dist/docs/assets/index.md.D75GWhPl.js +0 -5
- package/dist/docs/assets/index.md.D75GWhPl.lean.js +0 -1
- package/dist/playground/assets/index-8YiozU89.js +0 -67
- package/dist/playground/assets/index-MbMxXg-y.css +0 -1
- /package/dist/docs/assets/{reference_cli.md.CJNc_xYK.lean.js → reference_cli.md.Dm67hd2D.lean.js} +0 -0
- /package/dist/docs/assets/{reference_extensions.md.DykHW3qL.lean.js → reference_extensions.md.CGmMLblt.lean.js} +0 -0
- /package/dist/docs/assets/{skills_otel.md.CqhobH3B.lean.js → skills_otel.md.B5Ddv1xH.lean.js} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
function az(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function Bc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lz(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var s=!1;try{s=this instanceof r}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Jg={exports:{}},Mu={};var n1;function uz(){if(n1)return Mu;n1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:a}}return Mu.Fragment=t,Mu.jsx=n,Mu.jsxs=n,Mu}var r1;function cz(){return r1||(r1=1,Jg.exports=uz()),Jg.exports}var g=cz(),eb={exports:{}},Et={};var i1;function fz(){if(i1)return Et;i1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=b&&P[b]||P["@@iterator"],typeof P=="function"?P:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function R(P,V,j){this.props=P,this.context=V,this.refs=E,this.updater=j||k}R.prototype.isReactComponent={},R.prototype.setState=function(P,V){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,V,"setState")},R.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function T(){}T.prototype=R.prototype;function C(P,V,j){this.props=P,this.context=V,this.refs=E,this.updater=j||k}var _=C.prototype=new T;_.constructor=C,S(_,R.prototype),_.isPureReactComponent=!0;var L=Array.isArray;function N(){}var A={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function z(P,V,j){var Z=j.ref;return{$$typeof:e,type:P,key:V,ref:Z!==void 0?Z:null,props:j}}function I(P,V){return z(P.type,V,P.props)}function Y(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function H(P){var V={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(j){return V[j]})}var q=/\/+/g;function D(P,V){return typeof P=="object"&&P!==null&&P.key!=null?H(""+P.key):V.toString(36)}function F(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(N,N):(P.status="pending",P.then(function(V){P.status==="pending"&&(P.status="fulfilled",P.value=V)},function(V){P.status==="pending"&&(P.status="rejected",P.reason=V)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function U(P,V,j,Z,te){var se=typeof P;(se==="undefined"||se==="boolean")&&(P=null);var ue=!1;if(P===null)ue=!0;else switch(se){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(P.$$typeof){case e:case t:ue=!0;break;case h:return ue=P._init,U(ue(P._payload),V,j,Z,te)}}if(ue)return te=te(P),ue=Z===""?"."+D(P,0):Z,L(te)?(j="",ue!=null&&(j=ue.replace(q,"$&/")+"/"),U(te,V,j,"",function(ge){return ge})):te!=null&&(Y(te)&&(te=I(te,j+(te.key==null||P&&P.key===te.key?"":(""+te.key).replace(q,"$&/")+"/")+ue)),V.push(te)),1;ue=0;var le=Z===""?".":Z+":";if(L(P))for(var fe=0;fe<P.length;fe++)Z=P[fe],se=le+D(Z,fe),ue+=U(Z,V,j,se,te);else if(fe=y(P),typeof fe=="function")for(P=fe.call(P),fe=0;!(Z=P.next()).done;)Z=Z.value,se=le+D(Z,fe++),ue+=U(Z,V,j,se,te);else if(se==="object"){if(typeof P.then=="function")return U(F(P),V,j,Z,te);throw V=String(P),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ue}function W(P,V,j){if(P==null)return P;var Z=[],te=0;return U(P,Z,"","",function(se){return V.call(j,se,te++)}),Z}function B(P){if(P._status===-1){var V=P._result;V=V(),V.then(function(j){(P._status===0||P._status===-1)&&(P._status=1,P._result=j)},function(j){(P._status===0||P._status===-1)&&(P._status=2,P._result=j)}),P._status===-1&&(P._status=0,P._result=V)}if(P._status===1)return P._result.default;throw P._result}var K=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},O={map:W,forEach:function(P,V,j){W(P,function(){V.apply(this,arguments)},j)},count:function(P){var V=0;return W(P,function(){V++}),V},toArray:function(P){return W(P,function(V){return V})||[]},only:function(P){if(!Y(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Et.Activity=m,Et.Children=O,Et.Component=R,Et.Fragment=n,Et.Profiler=s,Et.PureComponent=C,Et.StrictMode=r,Et.Suspense=d,Et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Et.__COMPILER_RUNTIME={__proto__:null,c:function(P){return A.H.useMemoCache(P)}},Et.cache=function(P){return function(){return P.apply(null,arguments)}},Et.cacheSignal=function(){return null},Et.cloneElement=function(P,V,j){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var Z=S({},P.props),te=P.key;if(V!=null)for(se in V.key!==void 0&&(te=""+V.key),V)!$.call(V,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&V.ref===void 0||(Z[se]=V[se]);var se=arguments.length-2;if(se===1)Z.children=j;else if(1<se){for(var ue=Array(se),le=0;le<se;le++)ue[le]=arguments[le+2];Z.children=ue}return z(P.type,te,Z)},Et.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:a,_context:P},P},Et.createElement=function(P,V,j){var Z,te={},se=null;if(V!=null)for(Z in V.key!==void 0&&(se=""+V.key),V)$.call(V,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(te[Z]=V[Z]);var ue=arguments.length-2;if(ue===1)te.children=j;else if(1<ue){for(var le=Array(ue),fe=0;fe<ue;fe++)le[fe]=arguments[fe+2];te.children=le}if(P&&P.defaultProps)for(Z in ue=P.defaultProps,ue)te[Z]===void 0&&(te[Z]=ue[Z]);return z(P,se,te)},Et.createRef=function(){return{current:null}},Et.forwardRef=function(P){return{$$typeof:c,render:P}},Et.isValidElement=Y,Et.lazy=function(P){return{$$typeof:h,_payload:{_status:-1,_result:P},_init:B}},Et.memo=function(P,V){return{$$typeof:f,type:P,compare:V===void 0?null:V}},Et.startTransition=function(P){var V=A.T,j={};A.T=j;try{var Z=P(),te=A.S;te!==null&&te(j,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(N,K)}catch(se){K(se)}finally{V!==null&&j.types!==null&&(V.types=j.types),A.T=V}},Et.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Et.use=function(P){return A.H.use(P)},Et.useActionState=function(P,V,j){return A.H.useActionState(P,V,j)},Et.useCallback=function(P,V){return A.H.useCallback(P,V)},Et.useContext=function(P){return A.H.useContext(P)},Et.useDebugValue=function(){},Et.useDeferredValue=function(P,V){return A.H.useDeferredValue(P,V)},Et.useEffect=function(P,V){return A.H.useEffect(P,V)},Et.useEffectEvent=function(P){return A.H.useEffectEvent(P)},Et.useId=function(){return A.H.useId()},Et.useImperativeHandle=function(P,V,j){return A.H.useImperativeHandle(P,V,j)},Et.useInsertionEffect=function(P,V){return A.H.useInsertionEffect(P,V)},Et.useLayoutEffect=function(P,V){return A.H.useLayoutEffect(P,V)},Et.useMemo=function(P,V){return A.H.useMemo(P,V)},Et.useOptimistic=function(P,V){return A.H.useOptimistic(P,V)},Et.useReducer=function(P,V,j){return A.H.useReducer(P,V,j)},Et.useRef=function(P){return A.H.useRef(P)},Et.useState=function(P){return A.H.useState(P)},Et.useSyncExternalStore=function(P,V,j){return A.H.useSyncExternalStore(P,V,j)},Et.useTransition=function(){return A.H.useTransition()},Et.version="19.2.6",Et}var s1;function Fc(){return s1||(s1=1,eb.exports=fz()),eb.exports}var v=Fc();const Ju=Bc(v),Rv=az({__proto__:null,default:Ju},[v]);var tb={exports:{}},Iu={},nb={exports:{}},rb={};var o1;function dz(){return o1||(o1=1,(function(e){function t(U,W){var B=U.length;U.push(W);e:for(;0<B;){var K=B-1>>>1,O=U[K];if(0<s(O,W))U[K]=W,U[B]=O,B=K;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var W=U[0],B=U.pop();if(B!==W){U[0]=B;e:for(var K=0,O=U.length,P=O>>>1;K<P;){var V=2*(K+1)-1,j=U[V],Z=V+1,te=U[Z];if(0>s(j,B))Z<O&&0>s(te,j)?(U[K]=te,U[Z]=B,K=Z):(U[K]=j,U[V]=B,K=V);else if(Z<O&&0>s(te,B))U[K]=te,U[Z]=B,K=Z;else break e}}return W}function s(U,W){var B=U.sortIndex-W.sortIndex;return B!==0?B:U.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],h=1,m=null,b=3,y=!1,k=!1,S=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function _(U){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=U)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function L(U){if(S=!1,_(U),!k)if(n(d)!==null)k=!0,N||(N=!0,H());else{var W=n(f);W!==null&&F(L,W.startTime-U)}}var N=!1,A=-1,$=5,z=-1;function I(){return E?!0:!(e.unstable_now()-z<$)}function Y(){if(E=!1,N){var U=e.unstable_now();z=U;var W=!0;try{e:{k=!1,S&&(S=!1,T(A),A=-1),y=!0;var B=b;try{t:{for(_(U),m=n(d);m!==null&&!(m.expirationTime>U&&I());){var K=m.callback;if(typeof K=="function"){m.callback=null,b=m.priorityLevel;var O=K(m.expirationTime<=U);if(U=e.unstable_now(),typeof O=="function"){m.callback=O,_(U),W=!0;break t}m===n(d)&&r(d),_(U)}else r(d);m=n(d)}if(m!==null)W=!0;else{var P=n(f);P!==null&&F(L,P.startTime-U),W=!1}}break e}finally{m=null,b=B,y=!1}W=void 0}}finally{W?H():N=!1}}}var H;if(typeof C=="function")H=function(){C(Y)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,D=q.port2;q.port1.onmessage=Y,H=function(){D.postMessage(null)}}else H=function(){R(Y,0)};function F(U,W){A=R(function(){U(e.unstable_now())},W)}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"):$=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(U){switch(b){case 1:case 2:case 3:var W=3;break;default:W=b}var B=b;b=W;try{return U()}finally{b=B}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(U,W){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var B=b;b=U;try{return W()}finally{b=B}},e.unstable_scheduleCallback=function(U,W,B){var K=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?K+B:K):B=K,U){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=B+O,U={id:h++,callback:W,priorityLevel:U,startTime:B,expirationTime:O,sortIndex:-1},B>K?(U.sortIndex=B,t(f,U),n(d)===null&&U===n(f)&&(S?(T(A),A=-1):S=!0,F(L,B-K))):(U.sortIndex=O,t(d,U),k||y||(k=!0,N||(N=!0,H()))),U},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(U){var W=b;return function(){var B=b;b=W;try{return U.apply(this,arguments)}finally{b=B}}}})(rb)),rb}var a1;function pz(){return a1||(a1=1,nb.exports=dz()),nb.exports}var ib={exports:{}},ir={};var l1;function hz(){if(l1)return ir;l1=1;var e=Fc();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(d,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:d,containerInfo:f,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ir.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ir.createPortal=function(d,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(d,f,null,h)},ir.flushSync=function(d){var f=l.T,h=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=h,r.d.f()}},ir.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},ir.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},ir.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:y}):h==="script"&&r.d.X(d,{crossOrigin:m,integrity:b,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ir.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},ir.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin);r.d.L(d,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},ir.preloadModule=function(d,f){if(typeof d=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},ir.requestFormReset=function(d){r.d.r(d)},ir.unstable_batchedUpdates=function(d,f){return d(f)},ir.useFormState=function(d,f,h){return l.H.useFormState(d,f,h)},ir.useFormStatus=function(){return l.H.useHostTransitionStatus()},ir.version="19.2.6",ir}var u1;function OC(){if(u1)return ib.exports;u1=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(),ib.exports=hz(),ib.exports}var c1;function mz(){if(c1)return Iu;c1=1;var e=pz(),t=Fc(),n=OC();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function a(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function l(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function c(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(a(i)!==i)throw Error(r(188))}function f(i){var o=i.alternate;if(!o){if(o=a(i),o===null)throw Error(r(188));return o!==i?null:i}for(var u=i,p=o;;){var x=u.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){u=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===u)return d(x),i;if(w===p)return d(x),o;w=w.sibling}throw Error(r(188))}if(u.return!==p.return)u=x,p=w;else{for(var M=!1,G=x.child;G;){if(G===u){M=!0,u=x,p=w;break}if(G===p){M=!0,p=x,u=w;break}G=G.sibling}if(!M){for(G=w.child;G;){if(G===u){M=!0,u=w,p=x;break}if(G===p){M=!0,p=w,u=x;break}G=G.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==p)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:o}function h(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=h(i),o!==null)return o;i=i.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),C=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function H(i){return i===null||typeof i!="object"?null:(i=Y&&i[Y]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function D(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case N:return"SuspenseList";case z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case C:return i.displayName||"Context";case T:return(i._context.displayName||"Context")+".Consumer";case _:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case A:return o=i.displayName||null,o!==null?o:D(i.type)||"Memo";case $:o=i._payload,i=i._init;try{return D(i(o))}catch{}}return null}var F=Array.isArray,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},K=[],O=-1;function P(i){return{current:i}}function V(i){0>O||(i.current=K[O],K[O]=null,O--)}function j(i,o){O++,K[O]=i.current,i.current=o}var Z=P(null),te=P(null),se=P(null),ue=P(null);function le(i,o){switch(j(se,o),j(te,i),j(Z,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?Tw(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=Tw(o),i=Rw(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(Z),j(Z,i)}function fe(){V(Z),V(te),V(se)}function ge(i){i.memoizedState!==null&&j(ue,i);var o=Z.current,u=Rw(o,i.type);o!==u&&(j(te,i),j(Z,u))}function _e(i){te.current===i&&(V(Z),V(te)),ue.current===i&&(V(ue),_u._currentValue=B)}var oe,ye;function Se(i){if(oe===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);oe=o&&o[1]||"",ye=-1<u.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+oe+i+ye}var Oe=!1;function we(i,o){if(!i||Oe)return"";Oe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(o){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(ve){var me=ve}Reflect.construct(i,[],Ae)}else{try{Ae.call()}catch(ve){me=ve}i.call(Ae.prototype)}}else{try{throw Error()}catch(ve){me=ve}(Ae=i())&&typeof Ae.catch=="function"&&Ae.catch(function(){})}}catch(ve){if(ve&&me&&typeof ve.stack=="string")return[ve.stack,me.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=p.DetermineComponentFrameRoot(),M=w[0],G=w[1];if(M&&G){var Q=M.split(`
|
|
4
|
+
`),pe=G.split(`
|
|
5
|
+
`);for(x=p=0;p<Q.length&&!Q[p].includes("DetermineComponentFrameRoot");)p++;for(;x<pe.length&&!pe[x].includes("DetermineComponentFrameRoot");)x++;if(p===Q.length||x===pe.length)for(p=Q.length-1,x=pe.length-1;1<=p&&0<=x&&Q[p]!==pe[x];)x--;for(;1<=p&&0<=x;p--,x--)if(Q[p]!==pe[x]){if(p!==1||x!==1)do if(p--,x--,0>x||Q[p]!==pe[x]){var Te=`
|
|
6
|
+
`+Q[p].replace(" at new "," at ");return i.displayName&&Te.includes("<anonymous>")&&(Te=Te.replace("<anonymous>",i.displayName)),Te}while(1<=p&&0<=x);break}}}finally{Oe=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Se(u):""}function ke(i,o){switch(i.tag){case 26:case 27:case 5:return Se(i.type);case 16:return Se("Lazy");case 13:return i.child!==o&&o!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return we(i.type,!1);case 11:return we(i.type.render,!1);case 1:return we(i.type,!0);case 31:return Se("Activity");default:return""}}function De(i){try{var o="",u=null;do o+=ke(i,u),u=i,i=i.return;while(i);return o}catch(p){return`
|
|
7
|
+
Error generating stack: `+p.message+`
|
|
8
|
+
`+p.stack}}var Me=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,He=e.unstable_cancelCallback,be=e.unstable_shouldYield,Re=e.unstable_requestPaint,ee=e.unstable_now,ce=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,re=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,$e=e.unstable_LowPriority,Xe=e.unstable_IdlePriority,Ye=e.log,ht=e.unstable_setDisableYieldValue,Qe=null,yt=null;function kt(i){if(typeof Ye=="function"&&ht(i),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(Qe,i)}catch{}}var nt=Math.clz32?Math.clz32:st,Tt=Math.log,_t=Math.LN2;function st(i){return i>>>=0,i===0?32:31-(Tt(i)/_t|0)|0}var vt=256,Dt=262144,Pt=4194304;function At(i){var o=i&42;if(o!==0)return o;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function X(i,o,u){var p=i.pendingLanes;if(p===0)return 0;var x=0,w=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var G=p&134217727;return G!==0?(p=G&~w,p!==0?x=At(p):(M&=G,M!==0?x=At(M):u||(u=G&~i,u!==0&&(x=At(u))))):(G=p&~w,G!==0?x=At(G):M!==0?x=At(M):u||(u=p&~i,u!==0&&(x=At(u)))),x===0?0:o!==0&&o!==x&&(o&w)===0&&(w=x&-x,u=o&-o,w>=u||w===32&&(u&4194048)!==0)?o:x}function he(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function Le(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Ze(){var i=Pt;return Pt<<=1,(Pt&62914560)===0&&(Pt=4194304),i}function St(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function at(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function qe(i,o,u,p,x,w){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var G=i.entanglements,Q=i.expirationTimes,pe=i.hiddenUpdates;for(u=M&~u;0<u;){var Te=31-nt(u),Ae=1<<Te;G[Te]=0,Q[Te]=-1;var me=pe[Te];if(me!==null)for(pe[Te]=null,Te=0;Te<me.length;Te++){var ve=me[Te];ve!==null&&(ve.lane&=-536870913)}u&=~Ae}p!==0&&Ee(i,p,0),w!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=w&~(M&~o))}function Ee(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var p=31-nt(o);i.entangledLanes|=o,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function Ue(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var p=31-nt(u),x=1<<p;x&o|i[p]&o&&(i[p]|=o),u&=~x}}function ze(i,o){var u=o&-o;return u=(u&42)!==0?1:Ne(u),(u&(i.suspendedLanes|o))!==0?0:u}function Ne(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Ie(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ut(){var i=W.p;return i!==0?i:(i=window.event,i===void 0?32:Yw(i.type))}function Be(i,o){var u=W.p;try{return W.p=i,o()}finally{W.p=u}}var Rt=Math.random().toString(36).slice(2),wt="__reactFiber$"+Rt,$t="__reactProps$"+Rt,Rn="__reactContainer$"+Rt,Lr="__reactEvents$"+Rt,zr="__reactListeners$"+Rt,Sn="__reactHandles$"+Rt,ba="__reactResources$"+Rt,Yi="__reactMarker$"+Rt;function Eo(i){delete i[wt],delete i[$t],delete i[Lr],delete i[zr],delete i[Sn]}function hr(i){var o=i[wt];if(o)return o;for(var u=i.parentNode;u;){if(o=u[Rn]||u[wt]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=Iw(i);i!==null;){if(u=i[wt])return u;i=Iw(i)}return o}i=u,u=i.parentNode}return null}function Xi(i){if(i=i[wt]||i[Rn]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function As(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function Os(i){var o=i[ba];return o||(o=i[ba]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function zn(i){i[Yi]=!0}var cf=new Set,To={};function Zi(i,o){Pe(i,o),Pe(i+"Capture",o)}function Pe(i,o){for(To[i]=o,i=0;i<o.length;i++)cf.add(o[i])}var ot=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]*$"),jt={},rn={};function Mn(i){return Me.call(rn,i)?!0:Me.call(jt,i)?!1:ot.test(i)?rn[i]=!0:(jt[i]=!0,!1)}function rr(i,o,u){if(Mn(o))if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var p=o.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+u)}}function Pr(i,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+u)}}function kr(i,o,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(o,u,""+p)}}function yn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function $r(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ff(i,o,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var x=p.get,w=p.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return x.call(this)},set:function(M){u=""+M,w.call(this,M)}}),Object.defineProperty(i,o,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function ya(i){if(!i._valueTracker){var o=$r(i)?"checked":"value";i._valueTracker=ff(i,o,""+i[o])}}function Fl(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),p="";return i&&(p=$r(i)?i.checked?"true":"false":i.value),i=p,i!==u?(o.setValue(i),!0):!1}function va(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Qh=/[\n"\\]/g;function Sr(i){return i.replace(Qh,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Ul(i,o,u,p,x,w,M,G){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),o!=null?M==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+yn(o)):i.value!==""+yn(o)&&(i.value=""+yn(o)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),o!=null?xa(i,M,yn(o)):u!=null?xa(i,M,yn(u)):p!=null&&i.removeAttribute("value"),x==null&&w!=null&&(i.defaultChecked=!!w),x!=null&&(i.checked=x&&typeof x!="function"&&typeof x!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?i.name=""+yn(G):i.removeAttribute("name")}function Ro(i,o,u,p,x,w,M,G){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),o!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||o!=null)){ya(i);return}u=u!=null?""+yn(u):"",o=o!=null?""+yn(o):u,G||o===i.value||(i.value=o),i.defaultValue=o}p=p??x,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=G?i.checked:!!p,i.defaultChecked=!!p,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),ya(i)}function xa(i,o,u){o==="number"&&va(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Xn(i,o,u,p){if(i=i.options,o){o={};for(var x=0;x<u.length;x++)o["$"+u[x]]=!0;for(u=0;u<i.length;u++)x=o.hasOwnProperty("$"+i[u].value),i[u].selected!==x&&(i[u].selected=x),x&&p&&(i[u].defaultSelected=!0)}else{for(u=""+yn(u),o=null,x=0;x<i.length;x++){if(i[x].value===u){i[x].selected=!0,p&&(i[x].defaultSelected=!0);return}o!==null||i[x].disabled||(o=i[x])}o!==null&&(o.selected=!0)}}function df(i,o,u){if(o!=null&&(o=""+yn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+yn(u):""}function ka(i,o,u,p){if(o==null){if(p!=null){if(u!=null)throw Error(r(92));if(F(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),o=u}u=yn(o),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),ya(i)}function bt(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var pf=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 Pn(i,o,u){var p=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":p?i.setProperty(o,u):typeof u!="number"||u===0||pf.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function sn(i,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||o!=null&&o.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var x in o)p=o[x],o.hasOwnProperty(x)&&u[x]!==p&&Pn(i,x,p)}else for(var w in o)o.hasOwnProperty(w)&&Pn(i,w,o[w])}function Ms(i){if(i.indexOf("-")===-1)return!1;switch(i){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 Qi=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"]]),ql=/^[\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 Is(i){return ql.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ve(){}var rt=null;function Ct(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var qt=null,Cn=null;function Qr(i){var o=Xi(i);if(o&&(i=o.stateNode)){var u=i[$t]||null;e:switch(i=o.stateNode,o.type){case"input":if(Ul(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Sr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var p=u[o];if(p!==i&&p.form===i.form){var x=p[$t]||null;if(!x)throw Error(r(90));Ul(p,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(o=0;o<u.length;o++)p=u[o],p.form===i.form&&Fl(p)}break e;case"textarea":df(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&Xn(i,!!u.multiple,o,!1)}}}var Hl=!1;function hf(i,o,u){if(Hl)return i(o,u);Hl=!0;try{var p=i(o);return p}finally{if(Hl=!1,(qt!==null||Cn!==null)&&(td(),qt&&(o=qt,i=Cn,Cn=qt=null,Qr(o),i)))for(o=0;o<i.length;o++)Qr(i[o])}}function Gl(i,o){var u=i.stateNode;if(u===null)return null;var p=u[$t]||null;if(p===null)return null;u=p[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var Ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jh=!1;if(Ji)try{var Vl={};Object.defineProperty(Vl,"passive",{get:function(){Jh=!0}}),window.addEventListener("test",Vl,Vl),window.removeEventListener("test",Vl,Vl)}catch{Jh=!1}var Ds=null,em=null,mf=null;function Rk(){if(mf)return mf;var i,o=em,u=o.length,p,x="value"in Ds?Ds.value:Ds.textContent,w=x.length;for(i=0;i<u&&o[i]===x[i];i++);var M=u-i;for(p=1;p<=M&&o[u-p]===x[w-p];p++);return mf=x.slice(i,1<p?1-p:void 0)}function gf(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function bf(){return!0}function Ck(){return!1}function wr(i){function o(u,p,x,w,M){this._reactName=u,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=M,this.currentTarget=null;for(var G in i)i.hasOwnProperty(G)&&(u=i[G],this[G]=u?u(w):w[G]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?bf:Ck,this.isPropagationStopped=Ck,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=bf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=bf)},persist:function(){},isPersistent:bf}),o}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yf=wr(Co),Wl=m({},Co,{view:0,detail:0}),sj=wr(Wl),tm,nm,Kl,vf=m({},Wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:im,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Kl&&(Kl&&i.type==="mousemove"?(tm=i.screenX-Kl.screenX,nm=i.screenY-Kl.screenY):nm=tm=0,Kl=i),tm)},movementY:function(i){return"movementY"in i?i.movementY:nm}}),_k=wr(vf),oj=m({},vf,{dataTransfer:0}),aj=wr(oj),lj=m({},Wl,{relatedTarget:0}),rm=wr(lj),uj=m({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),cj=wr(uj),fj=m({},Co,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),dj=wr(fj),pj=m({},Co,{data:0}),Nk=wr(pj),hj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mj={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"},gj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bj(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=gj[i])?!!o[i]:!1}function im(){return bj}var yj=m({},Wl,{key:function(i){if(i.key){var o=hj[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=gf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?mj[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:im,charCode:function(i){return i.type==="keypress"?gf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?gf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vj=wr(yj),xj=m({},vf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ak=wr(xj),kj=m({},Wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:im}),Sj=wr(kj),wj=m({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ej=wr(wj),Tj=m({},vf,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),Rj=wr(Tj),Cj=m({},Co,{newState:0,oldState:0}),_j=wr(Cj),Nj=[9,13,27,32],sm=Ji&&"CompositionEvent"in window,Yl=null;Ji&&"documentMode"in document&&(Yl=document.documentMode);var Aj=Ji&&"TextEvent"in window&&!Yl,Ok=Ji&&(!sm||Yl&&8<Yl&&11>=Yl),Mk=" ",Ik=!1;function Dk(i,o){switch(i){case"keyup":return Nj.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jk(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Sa=!1;function Oj(i,o){switch(i){case"compositionend":return jk(o);case"keypress":return o.which!==32?null:(Ik=!0,Mk);case"textInput":return i=o.data,i===Mk&&Ik?null:i;default:return null}}function Mj(i,o){if(Sa)return i==="compositionend"||!sm&&Dk(i,o)?(i=Rk(),mf=em=Ds=null,Sa=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Ok&&o.locale!=="ko"?null:o.data;default:return null}}var Ij={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 Lk(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!Ij[i.type]:o==="textarea"}function zk(i,o,u,p){qt?Cn?Cn.push(p):Cn=[p]:qt=p,o=ld(o,"onChange"),0<o.length&&(u=new yf("onChange","change",null,u,p),i.push({event:u,listeners:o}))}var Xl=null,Zl=null;function Dj(i){vw(i,0)}function xf(i){var o=As(i);if(Fl(o))return i}function Pk(i,o){if(i==="change")return o}var $k=!1;if(Ji){var om;if(Ji){var am="oninput"in document;if(!am){var Bk=document.createElement("div");Bk.setAttribute("oninput","return;"),am=typeof Bk.oninput=="function"}om=am}else om=!1;$k=om&&(!document.documentMode||9<document.documentMode)}function Fk(){Xl&&(Xl.detachEvent("onpropertychange",Uk),Zl=Xl=null)}function Uk(i){if(i.propertyName==="value"&&xf(Zl)){var o=[];zk(o,Zl,i,Ct(i)),hf(Dj,o)}}function jj(i,o,u){i==="focusin"?(Fk(),Xl=o,Zl=u,Xl.attachEvent("onpropertychange",Uk)):i==="focusout"&&Fk()}function Lj(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return xf(Zl)}function zj(i,o){if(i==="click")return xf(o)}function Pj(i,o){if(i==="input"||i==="change")return xf(o)}function $j(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Br=typeof Object.is=="function"?Object.is:$j;function Ql(i,o){if(Br(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),p=Object.keys(o);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var x=u[p];if(!Me.call(o,x)||!Br(i[x],o[x]))return!1}return!0}function qk(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Hk(i,o){var u=qk(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=o&&p>=o)return{node:u,offset:o-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=qk(u)}}function Gk(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?Gk(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Vk(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=va(i.document);o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)i=o.contentWindow;else break;o=va(i.document)}return o}function lm(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var Bj=Ji&&"documentMode"in document&&11>=document.documentMode,wa=null,um=null,Jl=null,cm=!1;function Wk(i,o,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;cm||wa==null||wa!==va(p)||(p=wa,"selectionStart"in p&&lm(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Jl&&Ql(Jl,p)||(Jl=p,p=ld(um,"onSelect"),0<p.length&&(o=new yf("onSelect","select",null,o,u),i.push({event:o,listeners:p}),o.target=wa)))}function _o(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var Ea={animationend:_o("Animation","AnimationEnd"),animationiteration:_o("Animation","AnimationIteration"),animationstart:_o("Animation","AnimationStart"),transitionrun:_o("Transition","TransitionRun"),transitionstart:_o("Transition","TransitionStart"),transitioncancel:_o("Transition","TransitionCancel"),transitionend:_o("Transition","TransitionEnd")},fm={},Kk={};Ji&&(Kk=document.createElement("div").style,"AnimationEvent"in window||(delete Ea.animationend.animation,delete Ea.animationiteration.animation,delete Ea.animationstart.animation),"TransitionEvent"in window||delete Ea.transitionend.transition);function No(i){if(fm[i])return fm[i];if(!Ea[i])return i;var o=Ea[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in Kk)return fm[i]=o[u];return i}var Yk=No("animationend"),Xk=No("animationiteration"),Zk=No("animationstart"),Fj=No("transitionrun"),Uj=No("transitionstart"),qj=No("transitioncancel"),Qk=No("transitionend"),Jk=new Map,dm="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(" ");dm.push("scrollEnd");function bi(i,o){Jk.set(i,o),Zi(o,[i])}var kf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Jr=[],Ta=0,pm=0;function Sf(){for(var i=Ta,o=pm=Ta=0;o<i;){var u=Jr[o];Jr[o++]=null;var p=Jr[o];Jr[o++]=null;var x=Jr[o];Jr[o++]=null;var w=Jr[o];if(Jr[o++]=null,p!==null&&x!==null){var M=p.pending;M===null?x.next=x:(x.next=M.next,M.next=x),p.pending=x}w!==0&&e0(u,x,w)}}function wf(i,o,u,p){Jr[Ta++]=i,Jr[Ta++]=o,Jr[Ta++]=u,Jr[Ta++]=p,pm|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function hm(i,o,u,p){return wf(i,o,u,p),Ef(i)}function Ao(i,o){return wf(i,null,null,o),Ef(i)}function e0(i,o,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var x=!1,w=i.return;w!==null;)w.childLanes|=u,p=w.alternate,p!==null&&(p.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(x=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,x&&o!==null&&(x=31-nt(u),i=w.hiddenUpdates,p=i[x],p===null?i[x]=[o]:p.push(o),o.lane=u|536870912),w):null}function Ef(i){if(50<ku)throw ku=0,wg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Ra={};function Hj(i,o,u,p){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fr(i,o,u,p){return new Hj(i,o,u,p)}function mm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function es(i,o){var u=i.alternate;return u===null?(u=Fr(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function t0(i,o){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,o=u.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function Tf(i,o,u,p,x,w){var M=0;if(p=i,typeof i=="function")mm(i)&&(M=1);else if(typeof i=="string")M=YL(i,u,Z.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case z:return i=Fr(31,u,o,x),i.elementType=z,i.lanes=w,i;case S:return Oo(u.children,x,w,o);case E:M=8,x|=24;break;case R:return i=Fr(12,u,o,x|2),i.elementType=R,i.lanes=w,i;case L:return i=Fr(13,u,o,x),i.elementType=L,i.lanes=w,i;case N:return i=Fr(19,u,o,x),i.elementType=N,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case C:M=10;break e;case T:M=9;break e;case _:M=11;break e;case A:M=14;break e;case $:M=16,p=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return o=Fr(M,u,o,x),o.elementType=i,o.type=p,o.lanes=w,o}function Oo(i,o,u,p){return i=Fr(7,i,p,o),i.lanes=u,i}function gm(i,o,u){return i=Fr(6,i,null,o),i.lanes=u,i}function n0(i){var o=Fr(18,null,null,0);return o.stateNode=i,o}function bm(i,o,u){return o=Fr(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var r0=new WeakMap;function ei(i,o){if(typeof i=="object"&&i!==null){var u=r0.get(i);return u!==void 0?u:(o={value:i,source:o,stack:De(o)},r0.set(i,o),o)}return{value:i,source:o,stack:De(o)}}var Ca=[],_a=0,Rf=null,eu=0,ti=[],ni=0,js=null,_i=1,Ni="";function ts(i,o){Ca[_a++]=eu,Ca[_a++]=Rf,Rf=i,eu=o}function i0(i,o,u){ti[ni++]=_i,ti[ni++]=Ni,ti[ni++]=js,js=i;var p=_i;i=Ni;var x=32-nt(p)-1;p&=~(1<<x),u+=1;var w=32-nt(o)+x;if(30<w){var M=x-x%5;w=(p&(1<<M)-1).toString(32),p>>=M,x-=M,_i=1<<32-nt(o)+x|u<<x|p,Ni=w+i}else _i=1<<w|u<<x|p,Ni=i}function ym(i){i.return!==null&&(ts(i,1),i0(i,1,0))}function vm(i){for(;i===Rf;)Rf=Ca[--_a],Ca[_a]=null,eu=Ca[--_a],Ca[_a]=null;for(;i===js;)js=ti[--ni],ti[ni]=null,Ni=ti[--ni],ti[ni]=null,_i=ti[--ni],ti[ni]=null}function s0(i,o){ti[ni++]=_i,ti[ni++]=Ni,ti[ni++]=js,_i=o.id,Ni=o.overflow,js=i}var Zn=null,wn=null,Wt=!1,Ls=null,ri=!1,xm=Error(r(519));function zs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tu(ei(o,i)),xm}function o0(i){var o=i.stateNode,u=i.type,p=i.memoizedProps;switch(o[wt]=i,o[$t]=p,u){case"dialog":Ft("cancel",o),Ft("close",o);break;case"iframe":case"object":case"embed":Ft("load",o);break;case"video":case"audio":for(u=0;u<wu.length;u++)Ft(wu[u],o);break;case"source":Ft("error",o);break;case"img":case"image":case"link":Ft("error",o),Ft("load",o);break;case"details":Ft("toggle",o);break;case"input":Ft("invalid",o),Ro(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ft("invalid",o);break;case"textarea":Ft("invalid",o),ka(o,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||p.suppressHydrationWarning===!0||ww(o.textContent,u)?(p.popover!=null&&(Ft("beforetoggle",o),Ft("toggle",o)),p.onScroll!=null&&Ft("scroll",o),p.onScrollEnd!=null&&Ft("scrollend",o),p.onClick!=null&&(o.onclick=Ve),o=!0):o=!1,o||zs(i,!0)}function a0(i){for(Zn=i.return;Zn;)switch(Zn.tag){case 5:case 31:case 13:ri=!1;return;case 27:case 3:ri=!0;return;default:Zn=Zn.return}}function Na(i){if(i!==Zn)return!1;if(!Wt)return a0(i),Wt=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||Pg(i.type,i.memoizedProps)),u=!u),u&&wn&&zs(i),a0(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));wn=Mw(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));wn=Mw(i)}else o===27?(o=wn,Zs(i.type)?(i=qg,qg=null,wn=i):wn=o):wn=Zn?si(i.stateNode.nextSibling):null;return!0}function Mo(){wn=Zn=null,Wt=!1}function km(){var i=Ls;return i!==null&&(Cr===null?Cr=i:Cr.push.apply(Cr,i),Ls=null),i}function tu(i){Ls===null?Ls=[i]:Ls.push(i)}var Sm=P(null),Io=null,ns=null;function Ps(i,o,u){j(Sm,o._currentValue),o._currentValue=u}function rs(i){i._currentValue=Sm.current,V(Sm)}function wm(i,o,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),i===u)break;i=i.return}}function Em(i,o,u,p){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var w=x.dependencies;if(w!==null){var M=x.child;w=w.firstContext;e:for(;w!==null;){var G=w;w=x;for(var Q=0;Q<o.length;Q++)if(G.context===o[Q]){w.lanes|=u,G=w.alternate,G!==null&&(G.lanes|=u),wm(w.return,u,i),p||(M=null);break e}w=G.next}}else if(x.tag===18){if(M=x.return,M===null)throw Error(r(341));M.lanes|=u,w=M.alternate,w!==null&&(w.lanes|=u),wm(M,u,i),M=null}else M=x.child;if(M!==null)M.return=x;else for(M=x;M!==null;){if(M===i){M=null;break}if(x=M.sibling,x!==null){x.return=M.return,M=x;break}M=M.return}x=M}}function Aa(i,o,u,p){i=null;for(var x=o,w=!1;x!==null;){if(!w){if((x.flags&524288)!==0)w=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var M=x.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var G=x.type;Br(x.pendingProps.value,M.value)||(i!==null?i.push(G):i=[G])}}else if(x===ue.current){if(M=x.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(_u):i=[_u])}x=x.return}i!==null&&Em(o,i,u,p),o.flags|=262144}function Cf(i){for(i=i.firstContext;i!==null;){if(!Br(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Do(i){Io=i,ns=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Qn(i){return l0(Io,i)}function _f(i,o){return Io===null&&Do(i),l0(i,o)}function l0(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},ns===null){if(i===null)throw Error(r(308));ns=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else ns=ns.next=o;return u}var Gj=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){o.aborted=!0,i.forEach(function(u){return u()})}},Vj=e.unstable_scheduleCallback,Wj=e.unstable_NormalPriority,$n={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Tm(){return{controller:new Gj,data:new Map,refCount:0}}function nu(i){i.refCount--,i.refCount===0&&Vj(Wj,function(){i.controller.abort()})}var ru=null,Rm=0,Oa=0,Ma=null;function Kj(i,o){if(ru===null){var u=ru=[];Rm=0,Oa=Ng(),Ma={status:"pending",value:void 0,then:function(p){u.push(p)}}}return Rm++,o.then(u0,u0),o}function u0(){if(--Rm===0&&ru!==null){Ma!==null&&(Ma.status="fulfilled");var i=ru;ru=null,Oa=0,Ma=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function Yj(i,o){var u=[],p={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return i.then(function(){p.status="fulfilled",p.value=o;for(var x=0;x<u.length;x++)(0,u[x])(o)},function(x){for(p.status="rejected",p.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),p}var c0=U.S;U.S=function(i,o){WS=ee(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&Kj(i,o),c0!==null&&c0(i,o)};var jo=P(null);function Cm(){var i=jo.current;return i!==null?i:gn.pooledCache}function Nf(i,o){o===null?j(jo,jo.current):j(jo,o.pool)}function f0(){var i=Cm();return i===null?null:{parent:$n._currentValue,pool:i}}var Ia=Error(r(460)),_m=Error(r(474)),Af=Error(r(542)),Of={then:function(){}};function d0(i){return i=i.status,i==="fulfilled"||i==="rejected"}function p0(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Ve,Ve),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,m0(i),i;default:if(typeof o.status=="string")o.then(Ve,Ve);else{if(i=gn,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(p){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=p}},function(p){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=p}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,m0(i),i}throw zo=o,Ia}}function Lo(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(zo=u,Ia):u}}var zo=null;function h0(){if(zo===null)throw Error(r(459));var i=zo;return zo=null,i}function m0(i){if(i===Ia||i===Af)throw Error(r(483))}var Da=null,iu=0;function Mf(i){var o=iu;return iu+=1,Da===null&&(Da=[]),p0(Da,i,o)}function su(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function If(i,o){throw o.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function g0(i){function o(ae,ie){if(i){var de=ae.deletions;de===null?(ae.deletions=[ie],ae.flags|=16):de.push(ie)}}function u(ae,ie){if(!i)return null;for(;ie!==null;)o(ae,ie),ie=ie.sibling;return null}function p(ae){for(var ie=new Map;ae!==null;)ae.key!==null?ie.set(ae.key,ae):ie.set(ae.index,ae),ae=ae.sibling;return ie}function x(ae,ie){return ae=es(ae,ie),ae.index=0,ae.sibling=null,ae}function w(ae,ie,de){return ae.index=de,i?(de=ae.alternate,de!==null?(de=de.index,de<ie?(ae.flags|=67108866,ie):de):(ae.flags|=67108866,ie)):(ae.flags|=1048576,ie)}function M(ae){return i&&ae.alternate===null&&(ae.flags|=67108866),ae}function G(ae,ie,de,Ce){return ie===null||ie.tag!==6?(ie=gm(de,ae.mode,Ce),ie.return=ae,ie):(ie=x(ie,de),ie.return=ae,ie)}function Q(ae,ie,de,Ce){var lt=de.type;return lt===S?Te(ae,ie,de.props.children,Ce,de.key):ie!==null&&(ie.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===$&&Lo(lt)===ie.type)?(ie=x(ie,de.props),su(ie,de),ie.return=ae,ie):(ie=Tf(de.type,de.key,de.props,null,ae.mode,Ce),su(ie,de),ie.return=ae,ie)}function pe(ae,ie,de,Ce){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==de.containerInfo||ie.stateNode.implementation!==de.implementation?(ie=bm(de,ae.mode,Ce),ie.return=ae,ie):(ie=x(ie,de.children||[]),ie.return=ae,ie)}function Te(ae,ie,de,Ce,lt){return ie===null||ie.tag!==7?(ie=Oo(de,ae.mode,Ce,lt),ie.return=ae,ie):(ie=x(ie,de),ie.return=ae,ie)}function Ae(ae,ie,de){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=gm(""+ie,ae.mode,de),ie.return=ae,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return de=Tf(ie.type,ie.key,ie.props,null,ae.mode,de),su(de,ie),de.return=ae,de;case k:return ie=bm(ie,ae.mode,de),ie.return=ae,ie;case $:return ie=Lo(ie),Ae(ae,ie,de)}if(F(ie)||H(ie))return ie=Oo(ie,ae.mode,de,null),ie.return=ae,ie;if(typeof ie.then=="function")return Ae(ae,Mf(ie),de);if(ie.$$typeof===C)return Ae(ae,_f(ae,ie),de);If(ae,ie)}return null}function me(ae,ie,de,Ce){var lt=ie!==null?ie.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return lt!==null?null:G(ae,ie,""+de,Ce);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===lt?Q(ae,ie,de,Ce):null;case k:return de.key===lt?pe(ae,ie,de,Ce):null;case $:return de=Lo(de),me(ae,ie,de,Ce)}if(F(de)||H(de))return lt!==null?null:Te(ae,ie,de,Ce,null);if(typeof de.then=="function")return me(ae,ie,Mf(de),Ce);if(de.$$typeof===C)return me(ae,ie,_f(ae,de),Ce);If(ae,de)}return null}function ve(ae,ie,de,Ce,lt){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return ae=ae.get(de)||null,G(ie,ae,""+Ce,lt);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case y:return ae=ae.get(Ce.key===null?de:Ce.key)||null,Q(ie,ae,Ce,lt);case k:return ae=ae.get(Ce.key===null?de:Ce.key)||null,pe(ie,ae,Ce,lt);case $:return Ce=Lo(Ce),ve(ae,ie,de,Ce,lt)}if(F(Ce)||H(Ce))return ae=ae.get(de)||null,Te(ie,ae,Ce,lt,null);if(typeof Ce.then=="function")return ve(ae,ie,de,Mf(Ce),lt);if(Ce.$$typeof===C)return ve(ae,ie,de,_f(ie,Ce),lt);If(ie,Ce)}return null}function Je(ae,ie,de,Ce){for(var lt=null,Qt=null,it=ie,Ot=ie=0,Gt=null;it!==null&&Ot<de.length;Ot++){it.index>Ot?(Gt=it,it=null):Gt=it.sibling;var Jt=me(ae,it,de[Ot],Ce);if(Jt===null){it===null&&(it=Gt);break}i&&it&&Jt.alternate===null&&o(ae,it),ie=w(Jt,ie,Ot),Qt===null?lt=Jt:Qt.sibling=Jt,Qt=Jt,it=Gt}if(Ot===de.length)return u(ae,it),Wt&&ts(ae,Ot),lt;if(it===null){for(;Ot<de.length;Ot++)it=Ae(ae,de[Ot],Ce),it!==null&&(ie=w(it,ie,Ot),Qt===null?lt=it:Qt.sibling=it,Qt=it);return Wt&&ts(ae,Ot),lt}for(it=p(it);Ot<de.length;Ot++)Gt=ve(it,ae,Ot,de[Ot],Ce),Gt!==null&&(i&&Gt.alternate!==null&&it.delete(Gt.key===null?Ot:Gt.key),ie=w(Gt,ie,Ot),Qt===null?lt=Gt:Qt.sibling=Gt,Qt=Gt);return i&&it.forEach(function(no){return o(ae,no)}),Wt&&ts(ae,Ot),lt}function gt(ae,ie,de,Ce){if(de==null)throw Error(r(151));for(var lt=null,Qt=null,it=ie,Ot=ie=0,Gt=null,Jt=de.next();it!==null&&!Jt.done;Ot++,Jt=de.next()){it.index>Ot?(Gt=it,it=null):Gt=it.sibling;var no=me(ae,it,Jt.value,Ce);if(no===null){it===null&&(it=Gt);break}i&&it&&no.alternate===null&&o(ae,it),ie=w(no,ie,Ot),Qt===null?lt=no:Qt.sibling=no,Qt=no,it=Gt}if(Jt.done)return u(ae,it),Wt&&ts(ae,Ot),lt;if(it===null){for(;!Jt.done;Ot++,Jt=de.next())Jt=Ae(ae,Jt.value,Ce),Jt!==null&&(ie=w(Jt,ie,Ot),Qt===null?lt=Jt:Qt.sibling=Jt,Qt=Jt);return Wt&&ts(ae,Ot),lt}for(it=p(it);!Jt.done;Ot++,Jt=de.next())Jt=ve(it,ae,Ot,Jt.value,Ce),Jt!==null&&(i&&Jt.alternate!==null&&it.delete(Jt.key===null?Ot:Jt.key),ie=w(Jt,ie,Ot),Qt===null?lt=Jt:Qt.sibling=Jt,Qt=Jt);return i&&it.forEach(function(oz){return o(ae,oz)}),Wt&&ts(ae,Ot),lt}function fn(ae,ie,de,Ce){if(typeof de=="object"&&de!==null&&de.type===S&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case y:e:{for(var lt=de.key;ie!==null;){if(ie.key===lt){if(lt=de.type,lt===S){if(ie.tag===7){u(ae,ie.sibling),Ce=x(ie,de.props.children),Ce.return=ae,ae=Ce;break e}}else if(ie.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===$&&Lo(lt)===ie.type){u(ae,ie.sibling),Ce=x(ie,de.props),su(Ce,de),Ce.return=ae,ae=Ce;break e}u(ae,ie);break}else o(ae,ie);ie=ie.sibling}de.type===S?(Ce=Oo(de.props.children,ae.mode,Ce,de.key),Ce.return=ae,ae=Ce):(Ce=Tf(de.type,de.key,de.props,null,ae.mode,Ce),su(Ce,de),Ce.return=ae,ae=Ce)}return M(ae);case k:e:{for(lt=de.key;ie!==null;){if(ie.key===lt)if(ie.tag===4&&ie.stateNode.containerInfo===de.containerInfo&&ie.stateNode.implementation===de.implementation){u(ae,ie.sibling),Ce=x(ie,de.children||[]),Ce.return=ae,ae=Ce;break e}else{u(ae,ie);break}else o(ae,ie);ie=ie.sibling}Ce=bm(de,ae.mode,Ce),Ce.return=ae,ae=Ce}return M(ae);case $:return de=Lo(de),fn(ae,ie,de,Ce)}if(F(de))return Je(ae,ie,de,Ce);if(H(de)){if(lt=H(de),typeof lt!="function")throw Error(r(150));return de=lt.call(de),gt(ae,ie,de,Ce)}if(typeof de.then=="function")return fn(ae,ie,Mf(de),Ce);if(de.$$typeof===C)return fn(ae,ie,_f(ae,de),Ce);If(ae,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,ie!==null&&ie.tag===6?(u(ae,ie.sibling),Ce=x(ie,de),Ce.return=ae,ae=Ce):(u(ae,ie),Ce=gm(de,ae.mode,Ce),Ce.return=ae,ae=Ce),M(ae)):u(ae,ie)}return function(ae,ie,de,Ce){try{iu=0;var lt=fn(ae,ie,de,Ce);return Da=null,lt}catch(it){if(it===Ia||it===Af)throw it;var Qt=Fr(29,it,null,ae.mode);return Qt.lanes=Ce,Qt.return=ae,Qt}}}var Po=g0(!0),b0=g0(!1),$s=!1;function Nm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Am(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Bs(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Fs(i,o,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(tn&2)!==0){var x=p.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),p.pending=o,o=Ef(i),e0(i,null,u),o}return wf(i,p,o,u),Ef(i)}function ou(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Ue(i,u)}}function Om(i,o){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var x=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?x=w=M:w=w.next=M,u=u.next}while(u!==null);w===null?x=w=o:w=w.next=o}else x=w=o;u={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var Mm=!1;function au(){if(Mm){var i=Ma;if(i!==null)throw i}}function lu(i,o,u,p){Mm=!1;var x=i.updateQueue;$s=!1;var w=x.firstBaseUpdate,M=x.lastBaseUpdate,G=x.shared.pending;if(G!==null){x.shared.pending=null;var Q=G,pe=Q.next;Q.next=null,M===null?w=pe:M.next=pe,M=Q;var Te=i.alternate;Te!==null&&(Te=Te.updateQueue,G=Te.lastBaseUpdate,G!==M&&(G===null?Te.firstBaseUpdate=pe:G.next=pe,Te.lastBaseUpdate=Q))}if(w!==null){var Ae=x.baseState;M=0,Te=pe=Q=null,G=w;do{var me=G.lane&-536870913,ve=me!==G.lane;if(ve?(Ht&me)===me:(p&me)===me){me!==0&&me===Oa&&(Mm=!0),Te!==null&&(Te=Te.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var Je=i,gt=G;me=o;var fn=u;switch(gt.tag){case 1:if(Je=gt.payload,typeof Je=="function"){Ae=Je.call(fn,Ae,me);break e}Ae=Je;break e;case 3:Je.flags=Je.flags&-65537|128;case 0:if(Je=gt.payload,me=typeof Je=="function"?Je.call(fn,Ae,me):Je,me==null)break e;Ae=m({},Ae,me);break e;case 2:$s=!0}}me=G.callback,me!==null&&(i.flags|=64,ve&&(i.flags|=8192),ve=x.callbacks,ve===null?x.callbacks=[me]:ve.push(me))}else ve={lane:me,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Te===null?(pe=Te=ve,Q=Ae):Te=Te.next=ve,M|=me;if(G=G.next,G===null){if(G=x.shared.pending,G===null)break;ve=G,G=ve.next,ve.next=null,x.lastBaseUpdate=ve,x.shared.pending=null}}while(!0);Te===null&&(Q=Ae),x.baseState=Q,x.firstBaseUpdate=pe,x.lastBaseUpdate=Te,w===null&&(x.shared.lanes=0),Vs|=M,i.lanes=M,i.memoizedState=Ae}}function y0(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function v0(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)y0(u[i],o)}var ja=P(null),Df=P(0);function x0(i,o){i=ds,j(Df,i),j(ja,o),ds=i|o.baseLanes}function Im(){j(Df,ds),j(ja,ja.current)}function Dm(){ds=Df.current,V(ja),V(Df)}var Ur=P(null),ii=null;function Us(i){var o=i.alternate;j(In,In.current&1),j(Ur,i),ii===null&&(o===null||ja.current!==null||o.memoizedState!==null)&&(ii=i)}function jm(i){j(In,In.current),j(Ur,i),ii===null&&(ii=i)}function k0(i){i.tag===22?(j(In,In.current),j(Ur,i),ii===null&&(ii=i)):qs()}function qs(){j(In,In.current),j(Ur,Ur.current)}function qr(i){V(Ur),ii===i&&(ii=null),V(In)}var In=P(0);function jf(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Fg(u)||Ug(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var is=0,Nt=null,un=null,Bn=null,Lf=!1,La=!1,$o=!1,zf=0,uu=0,za=null,Xj=0;function An(){throw Error(r(321))}function Lm(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Br(i[u],o[u]))return!1;return!0}function zm(i,o,u,p,x,w){return is=w,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,U.H=i===null||i.memoizedState===null?iS:Qm,$o=!1,w=u(p,x),$o=!1,La&&(w=w0(o,u,p,x)),S0(i),w}function S0(i){U.H=du;var o=un!==null&&un.next!==null;if(is=0,Bn=un=Nt=null,Lf=!1,uu=0,za=null,o)throw Error(r(300));i===null||Fn||(i=i.dependencies,i!==null&&Cf(i)&&(Fn=!0))}function w0(i,o,u,p){Nt=i;var x=0;do{if(La&&(za=null),uu=0,La=!1,25<=x)throw Error(r(301));if(x+=1,Bn=un=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}U.H=sS,w=o(u,p)}while(La);return w}function Zj(){var i=U.H,o=i.useState()[0];return o=typeof o.then=="function"?cu(o):o,i=i.useState()[0],(un!==null?un.memoizedState:null)!==i&&(Nt.flags|=1024),o}function Pm(){var i=zf!==0;return zf=0,i}function $m(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Bm(i){if(Lf){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Lf=!1}is=0,Bn=un=Nt=null,La=!1,uu=zf=0,za=null}function mr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bn===null?Nt.memoizedState=Bn=i:Bn=Bn.next=i,Bn}function Dn(){if(un===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=un.next;var o=Bn===null?Nt.memoizedState:Bn.next;if(o!==null)Bn=o,un=i;else{if(i===null)throw Nt.alternate===null?Error(r(467)):Error(r(310));un=i,i={memoizedState:un.memoizedState,baseState:un.baseState,baseQueue:un.baseQueue,queue:un.queue,next:null},Bn===null?Nt.memoizedState=Bn=i:Bn=Bn.next=i}return Bn}function Pf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cu(i){var o=uu;return uu+=1,za===null&&(za=[]),i=p0(za,i,o),o=Nt,(Bn===null?o.memoizedState:Bn.next)===null&&(o=o.alternate,U.H=o===null||o.memoizedState===null?iS:Qm),i}function $f(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return cu(i);if(i.$$typeof===C)return Qn(i)}throw Error(r(438,String(i)))}function Fm(i){var o=null,u=Nt.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var p=Nt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(o={data:p.data.map(function(x){return x.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=Pf(),Nt.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(i),p=0;p<i;p++)u[p]=I;return o.index++,u}function ss(i,o){return typeof o=="function"?o(i):o}function Bf(i){var o=Dn();return Um(o,un,i)}function Um(i,o,u){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=u;var x=i.baseQueue,w=p.pending;if(w!==null){if(x!==null){var M=x.next;x.next=w.next,w.next=M}o.baseQueue=x=w,p.pending=null}if(w=i.baseState,x===null)i.memoizedState=w;else{o=x.next;var G=M=null,Q=null,pe=o,Te=!1;do{var Ae=pe.lane&-536870913;if(Ae!==pe.lane?(Ht&Ae)===Ae:(is&Ae)===Ae){var me=pe.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),Ae===Oa&&(Te=!0);else if((is&me)===me){pe=pe.next,me===Oa&&(Te=!0);continue}else Ae={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},Q===null?(G=Q=Ae,M=w):Q=Q.next=Ae,Nt.lanes|=me,Vs|=me;Ae=pe.action,$o&&u(w,Ae),w=pe.hasEagerState?pe.eagerState:u(w,Ae)}else me={lane:Ae,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},Q===null?(G=Q=me,M=w):Q=Q.next=me,Nt.lanes|=Ae,Vs|=Ae;pe=pe.next}while(pe!==null&&pe!==o);if(Q===null?M=w:Q.next=G,!Br(w,i.memoizedState)&&(Fn=!0,Te&&(u=Ma,u!==null)))throw u;i.memoizedState=w,i.baseState=M,i.baseQueue=Q,p.lastRenderedState=w}return x===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function qm(i){var o=Dn(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var p=u.dispatch,x=u.pending,w=o.memoizedState;if(x!==null){u.pending=null;var M=x=x.next;do w=i(w,M.action),M=M.next;while(M!==x);Br(w,o.memoizedState)||(Fn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,p]}function E0(i,o,u){var p=Nt,x=Dn(),w=Wt;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=o();var M=!Br((un||x).memoizedState,u);if(M&&(x.memoizedState=u,Fn=!0),x=x.queue,Vm(C0.bind(null,p,x,i),[i]),x.getSnapshot!==o||M||Bn!==null&&Bn.memoizedState.tag&1){if(p.flags|=2048,Pa(9,{destroy:void 0},R0.bind(null,p,x,u,o),null),gn===null)throw Error(r(349));w||(is&127)!==0||T0(p,o,u)}return u}function T0(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Nt.updateQueue,o===null?(o=Pf(),Nt.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function R0(i,o,u,p){o.value=u,o.getSnapshot=p,_0(o)&&N0(i)}function C0(i,o,u){return u(function(){_0(o)&&N0(i)})}function _0(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Br(i,u)}catch{return!0}}function N0(i){var o=Ao(i,2);o!==null&&_r(o,i,2)}function Hm(i){var o=mr();if(typeof i=="function"){var u=i;if(i=u(),$o){kt(!0);try{u()}finally{kt(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:i},o}function A0(i,o,u,p){return i.baseState=u,Um(i,un,typeof p=="function"?p:ss)}function Qj(i,o,u,p,x){if(qf(i))throw Error(r(485));if(i=o.action,i!==null){var w={payload:x,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){w.listeners.push(M)}};U.T!==null?u(!0):w.isTransition=!1,p(w),u=o.pending,u===null?(w.next=o.pending=w,O0(o,w)):(w.next=u.next,o.pending=u.next=w)}}function O0(i,o){var u=o.action,p=o.payload,x=i.state;if(o.isTransition){var w=U.T,M={};U.T=M;try{var G=u(x,p),Q=U.S;Q!==null&&Q(M,G),M0(i,o,G)}catch(pe){Gm(i,o,pe)}finally{w!==null&&M.types!==null&&(w.types=M.types),U.T=w}}else try{w=u(x,p),M0(i,o,w)}catch(pe){Gm(i,o,pe)}}function M0(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){I0(i,o,p)},function(p){return Gm(i,o,p)}):I0(i,o,u)}function I0(i,o,u){o.status="fulfilled",o.value=u,D0(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,O0(i,u)))}function Gm(i,o,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=u,D0(o),o=o.next;while(o!==p)}i.action=null}function D0(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function j0(i,o){return o}function L0(i,o){if(Wt){var u=gn.formState;if(u!==null){e:{var p=Nt;if(Wt){if(wn){t:{for(var x=wn,w=ri;x.nodeType!==8;){if(!w){x=null;break t}if(x=si(x.nextSibling),x===null){x=null;break t}}w=x.data,x=w==="F!"||w==="F"?x:null}if(x){wn=si(x.nextSibling),p=x.data==="F!";break e}}zs(p)}p=!1}p&&(o=u[0])}}return u=mr(),u.memoizedState=u.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:j0,lastRenderedState:o},u.queue=p,u=tS.bind(null,Nt,p),p.dispatch=u,p=Hm(!1),w=Zm.bind(null,Nt,!1,p.queue),p=mr(),x={state:o,dispatch:null,action:i,pending:null},p.queue=x,u=Qj.bind(null,Nt,x,w,u),x.dispatch=u,p.memoizedState=i,[o,u,!1]}function z0(i){var o=Dn();return P0(o,un,i)}function P0(i,o,u){if(o=Um(i,o,j0)[0],i=Bf(ss)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=cu(o)}catch(M){throw M===Ia?Af:M}else p=o;o=Dn();var x=o.queue,w=x.dispatch;return u!==o.memoizedState&&(Nt.flags|=2048,Pa(9,{destroy:void 0},Jj.bind(null,x,u),null)),[p,w,i]}function Jj(i,o){i.action=o}function $0(i){var o=Dn(),u=un;if(u!==null)return P0(o,u,i);Dn(),o=o.memoizedState,u=Dn();var p=u.queue.dispatch;return u.memoizedState=i,[o,p,!1]}function Pa(i,o,u,p){return i={tag:i,create:u,deps:p,inst:o,next:null},o=Nt.updateQueue,o===null&&(o=Pf(),Nt.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,o.lastEffect=i),i}function B0(){return Dn().memoizedState}function Ff(i,o,u,p){var x=mr();Nt.flags|=i,x.memoizedState=Pa(1|o,{destroy:void 0},u,p===void 0?null:p)}function Uf(i,o,u,p){var x=Dn();p=p===void 0?null:p;var w=x.memoizedState.inst;un!==null&&p!==null&&Lm(p,un.memoizedState.deps)?x.memoizedState=Pa(o,w,u,p):(Nt.flags|=i,x.memoizedState=Pa(1|o,w,u,p))}function F0(i,o){Ff(8390656,8,i,o)}function Vm(i,o){Uf(2048,8,i,o)}function eL(i){Nt.flags|=4;var o=Nt.updateQueue;if(o===null)o=Pf(),Nt.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function U0(i){var o=Dn().memoizedState;return eL({ref:o,nextImpl:i}),function(){if((tn&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function q0(i,o){return Uf(4,2,i,o)}function H0(i,o){return Uf(4,4,i,o)}function G0(i,o){if(typeof o=="function"){i=i();var u=o(i);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function V0(i,o,u){u=u!=null?u.concat([i]):null,Uf(4,4,G0.bind(null,o,i),u)}function Wm(){}function W0(i,o){var u=Dn();o=o===void 0?null:o;var p=u.memoizedState;return o!==null&&Lm(o,p[1])?p[0]:(u.memoizedState=[i,o],i)}function K0(i,o){var u=Dn();o=o===void 0?null:o;var p=u.memoizedState;if(o!==null&&Lm(o,p[1]))return p[0];if(p=i(),$o){kt(!0);try{i()}finally{kt(!1)}}return u.memoizedState=[p,o],p}function Km(i,o,u){return u===void 0||(is&1073741824)!==0&&(Ht&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=YS(),Nt.lanes|=i,Vs|=i,u)}function Y0(i,o,u,p){return Br(u,o)?u:ja.current!==null?(i=Km(i,u,p),Br(i,o)||(Fn=!0),i):(is&42)===0||(is&1073741824)!==0&&(Ht&261930)===0?(Fn=!0,i.memoizedState=u):(i=YS(),Nt.lanes|=i,Vs|=i,o)}function X0(i,o,u,p,x){var w=W.p;W.p=w!==0&&8>w?w:8;var M=U.T,G={};U.T=G,Zm(i,!1,o,u);try{var Q=x(),pe=U.S;if(pe!==null&&pe(G,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var Te=Yj(Q,p);fu(i,o,Te,Vr(i))}else fu(i,o,p,Vr(i))}catch(Ae){fu(i,o,{then:function(){},status:"rejected",reason:Ae},Vr())}finally{W.p=w,M!==null&&G.types!==null&&(M.types=G.types),U.T=M}}function tL(){}function Ym(i,o,u,p){if(i.tag!==5)throw Error(r(476));var x=Z0(i).queue;X0(i,x,o,B,u===null?tL:function(){return Q0(i),u(p)})}function Z0(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:B},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function Q0(i){var o=Z0(i);o.next===null&&(o=i.alternate.memoizedState),fu(i,o.next.queue,{},Vr())}function Xm(){return Qn(_u)}function J0(){return Dn().memoizedState}function eS(){return Dn().memoizedState}function nL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Vr();i=Bs(u);var p=Fs(o,i,u);p!==null&&(_r(p,o,u),ou(p,o,u)),o={cache:Tm()},i.payload=o;return}o=o.return}}function rL(i,o,u){var p=Vr();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},qf(i)?nS(o,u):(u=hm(i,o,u,p),u!==null&&(_r(u,i,p),rS(u,o,p)))}function tS(i,o,u){var p=Vr();fu(i,o,u,p)}function fu(i,o,u,p){var x={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(qf(i))nS(o,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var M=o.lastRenderedState,G=w(M,u);if(x.hasEagerState=!0,x.eagerState=G,Br(G,M))return wf(i,o,x,0),gn===null&&Sf(),!1}catch{}if(u=hm(i,o,x,p),u!==null)return _r(u,i,p),rS(u,o,p),!0}return!1}function Zm(i,o,u,p){if(p={lane:2,revertLane:Ng(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},qf(i)){if(o)throw Error(r(479))}else o=hm(i,u,p,2),o!==null&&_r(o,i,2)}function qf(i){var o=i.alternate;return i===Nt||o!==null&&o===Nt}function nS(i,o){La=Lf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function rS(i,o,u){if((u&4194048)!==0){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Ue(i,u)}}var du={readContext:Qn,use:$f,useCallback:An,useContext:An,useEffect:An,useImperativeHandle:An,useLayoutEffect:An,useInsertionEffect:An,useMemo:An,useReducer:An,useRef:An,useState:An,useDebugValue:An,useDeferredValue:An,useTransition:An,useSyncExternalStore:An,useId:An,useHostTransitionStatus:An,useFormState:An,useActionState:An,useOptimistic:An,useMemoCache:An,useCacheRefresh:An};du.useEffectEvent=An;var iS={readContext:Qn,use:$f,useCallback:function(i,o){return mr().memoizedState=[i,o===void 0?null:o],i},useContext:Qn,useEffect:F0,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Ff(4194308,4,G0.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Ff(4194308,4,i,o)},useInsertionEffect:function(i,o){Ff(4,2,i,o)},useMemo:function(i,o){var u=mr();o=o===void 0?null:o;var p=i();if($o){kt(!0);try{i()}finally{kt(!1)}}return u.memoizedState=[p,o],p},useReducer:function(i,o,u){var p=mr();if(u!==void 0){var x=u(o);if($o){kt(!0);try{u(o)}finally{kt(!1)}}}else x=o;return p.memoizedState=p.baseState=x,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:x},p.queue=i,i=i.dispatch=rL.bind(null,Nt,i),[p.memoizedState,i]},useRef:function(i){var o=mr();return i={current:i},o.memoizedState=i},useState:function(i){i=Hm(i);var o=i.queue,u=tS.bind(null,Nt,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Wm,useDeferredValue:function(i,o){var u=mr();return Km(u,i,o)},useTransition:function(){var i=Hm(!1);return i=X0.bind(null,Nt,i.queue,!0,!1),mr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var p=Nt,x=mr();if(Wt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),gn===null)throw Error(r(349));(Ht&127)!==0||T0(p,o,u)}x.memoizedState=u;var w={value:u,getSnapshot:o};return x.queue=w,F0(C0.bind(null,p,w,i),[i]),p.flags|=2048,Pa(9,{destroy:void 0},R0.bind(null,p,w,u,o),null),u},useId:function(){var i=mr(),o=gn.identifierPrefix;if(Wt){var u=Ni,p=_i;u=(p&~(1<<32-nt(p)-1)).toString(32)+u,o="_"+o+"R_"+u,u=zf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=Xj++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:Xm,useFormState:L0,useActionState:L0,useOptimistic:function(i){var o=mr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Zm.bind(null,Nt,!0,u),u.dispatch=o,[i,o]},useMemoCache:Fm,useCacheRefresh:function(){return mr().memoizedState=nL.bind(null,Nt)},useEffectEvent:function(i){var o=mr(),u={impl:i};return o.memoizedState=u,function(){if((tn&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Qm={readContext:Qn,use:$f,useCallback:W0,useContext:Qn,useEffect:Vm,useImperativeHandle:V0,useInsertionEffect:q0,useLayoutEffect:H0,useMemo:K0,useReducer:Bf,useRef:B0,useState:function(){return Bf(ss)},useDebugValue:Wm,useDeferredValue:function(i,o){var u=Dn();return Y0(u,un.memoizedState,i,o)},useTransition:function(){var i=Bf(ss)[0],o=Dn().memoizedState;return[typeof i=="boolean"?i:cu(i),o]},useSyncExternalStore:E0,useId:J0,useHostTransitionStatus:Xm,useFormState:z0,useActionState:z0,useOptimistic:function(i,o){var u=Dn();return A0(u,un,i,o)},useMemoCache:Fm,useCacheRefresh:eS};Qm.useEffectEvent=U0;var sS={readContext:Qn,use:$f,useCallback:W0,useContext:Qn,useEffect:Vm,useImperativeHandle:V0,useInsertionEffect:q0,useLayoutEffect:H0,useMemo:K0,useReducer:qm,useRef:B0,useState:function(){return qm(ss)},useDebugValue:Wm,useDeferredValue:function(i,o){var u=Dn();return un===null?Km(u,i,o):Y0(u,un.memoizedState,i,o)},useTransition:function(){var i=qm(ss)[0],o=Dn().memoizedState;return[typeof i=="boolean"?i:cu(i),o]},useSyncExternalStore:E0,useId:J0,useHostTransitionStatus:Xm,useFormState:$0,useActionState:$0,useOptimistic:function(i,o){var u=Dn();return un!==null?A0(u,un,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Fm,useCacheRefresh:eS};sS.useEffectEvent=U0;function Jm(i,o,u,p){o=i.memoizedState,u=u(p,o),u=u==null?o:m({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var eg={enqueueSetState:function(i,o,u){i=i._reactInternals;var p=Vr(),x=Bs(p);x.payload=o,u!=null&&(x.callback=u),o=Fs(i,x,p),o!==null&&(_r(o,i,p),ou(o,i,p))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var p=Vr(),x=Bs(p);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=Fs(i,x,p),o!==null&&(_r(o,i,p),ou(o,i,p))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Vr(),p=Bs(u);p.tag=2,o!=null&&(p.callback=o),o=Fs(i,p,u),o!==null&&(_r(o,i,u),ou(o,i,u))}};function oS(i,o,u,p,x,w,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,w,M):o.prototype&&o.prototype.isPureReactComponent?!Ql(u,p)||!Ql(x,w):!0}function aS(i,o,u,p){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,p),o.state!==i&&eg.enqueueReplaceState(o,o.state,null)}function Bo(i,o){var u=o;if("ref"in o){u={};for(var p in o)p!=="ref"&&(u[p]=o[p])}if(i=i.defaultProps){u===o&&(u=m({},u));for(var x in i)u[x]===void 0&&(u[x]=i[x])}return u}function lS(i){kf(i)}function uS(i){console.error(i)}function cS(i){kf(i)}function Hf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function fS(i,o,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function tg(i,o,u){return u=Bs(u),u.tag=3,u.payload={element:null},u.callback=function(){Hf(i,o)},u}function dS(i){return i=Bs(i),i.tag=3,i}function pS(i,o,u,p){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var w=p.value;i.payload=function(){return x(w)},i.callback=function(){fS(o,u,p)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){fS(o,u,p),typeof x!="function"&&(Ws===null?Ws=new Set([this]):Ws.add(this));var G=p.stack;this.componentDidCatch(p.value,{componentStack:G!==null?G:""})})}function iL(i,o,u,p,x){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=u.alternate,o!==null&&Aa(o,u,x,!0),u=Ur.current,u!==null){switch(u.tag){case 31:case 13:return ii===null?nd():u.alternate===null&&On===0&&(On=3),u.flags&=-257,u.flags|=65536,u.lanes=x,p===Of?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([p]):o.add(p),Rg(i,p,x)),!1;case 22:return u.flags|=65536,p===Of?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([p]):u.add(p)),Rg(i,p,x)),!1}throw Error(r(435,u.tag))}return Rg(i,p,x),nd(),!1}if(Wt)return o=Ur.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,p!==xm&&(i=Error(r(422),{cause:p}),tu(ei(i,u)))):(p!==xm&&(o=Error(r(423),{cause:p}),tu(ei(o,u))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,p=ei(p,u),x=tg(i.stateNode,p,x),Om(i,x),On!==4&&(On=2)),!1;var w=Error(r(520),{cause:p});if(w=ei(w,u),xu===null?xu=[w]:xu.push(w),On!==4&&(On=2),o===null)return!0;p=ei(p,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=x&-x,u.lanes|=i,i=tg(u.stateNode,p,i),Om(u,i),!1;case 1:if(o=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Ws===null||!Ws.has(w))))return u.flags|=65536,x&=-x,u.lanes|=x,x=dS(x),pS(x,i,u,p),Om(u,x),!1}u=u.return}while(u!==null);return!1}var ng=Error(r(461)),Fn=!1;function Jn(i,o,u,p){o.child=i===null?b0(o,null,u,p):Po(o,i.child,u,p)}function hS(i,o,u,p,x){u=u.render;var w=o.ref;if("ref"in p){var M={};for(var G in p)G!=="ref"&&(M[G]=p[G])}else M=p;return Do(o),p=zm(i,o,u,M,w,x),G=Pm(),i!==null&&!Fn?($m(i,o,x),os(i,o,x)):(Wt&&G&&ym(o),o.flags|=1,Jn(i,o,p,x),o.child)}function mS(i,o,u,p,x){if(i===null){var w=u.type;return typeof w=="function"&&!mm(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,gS(i,o,w,p,x)):(i=Tf(u.type,null,p,o,o.mode,x),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!cg(i,x)){var M=w.memoizedProps;if(u=u.compare,u=u!==null?u:Ql,u(M,p)&&i.ref===o.ref)return os(i,o,x)}return o.flags|=1,i=es(w,p),i.ref=o.ref,i.return=o,o.child=i}function gS(i,o,u,p,x){if(i!==null){var w=i.memoizedProps;if(Ql(w,p)&&i.ref===o.ref)if(Fn=!1,o.pendingProps=p=w,cg(i,x))(i.flags&131072)!==0&&(Fn=!0);else return o.lanes=i.lanes,os(i,o,x)}return rg(i,o,u,p,x)}function bS(i,o,u,p){var x=p.children,w=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((o.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,i!==null){for(p=o.child=i.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;p=x&~w}else p=0,o.child=null;return yS(i,o,w,u,p)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Nf(o,w!==null?w.cachePool:null),w!==null?x0(o,w):Im(),k0(o);else return p=o.lanes=536870912,yS(i,o,w!==null?w.baseLanes|u:u,u,p)}else w!==null?(Nf(o,w.cachePool),x0(o,w),qs(),o.memoizedState=null):(i!==null&&Nf(o,null),Im(),qs());return Jn(i,o,x,u),o.child}function pu(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function yS(i,o,u,p,x){var w=Cm();return w=w===null?null:{parent:$n._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&Nf(o,null),Im(),k0(o),i!==null&&Aa(i,o,p,!0),o.childLanes=x,null}function Gf(i,o){return o=Wf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function vS(i,o,u){return Po(o,i.child,null,u),i=Gf(o,o.pendingProps),i.flags|=2,qr(o),o.memoizedState=null,i}function sL(i,o,u){var p=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Wt){if(p.mode==="hidden")return i=Gf(o,p),o.lanes=536870912,pu(null,i);if(jm(o),(i=wn)?(i=Ow(i,ri),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:js!==null?{id:_i,overflow:Ni}:null,retryLane:536870912,hydrationErrors:null},u=n0(i),u.return=o,o.child=u,Zn=o,wn=null)):i=null,i===null)throw zs(o);return o.lanes=536870912,null}return Gf(o,p)}var w=i.memoizedState;if(w!==null){var M=w.dehydrated;if(jm(o),x)if(o.flags&256)o.flags&=-257,o=vS(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Fn||Aa(i,o,u,!1),x=(u&i.childLanes)!==0,Fn||x){if(p=gn,p!==null&&(M=ze(p,u),M!==0&&M!==w.retryLane))throw w.retryLane=M,Ao(i,M),_r(p,i,M),ng;nd(),o=vS(i,o,u)}else i=w.treeContext,wn=si(M.nextSibling),Zn=o,Wt=!0,Ls=null,ri=!1,i!==null&&s0(o,i),o=Gf(o,p),o.flags|=4096;return o}return i=es(i.child,{mode:p.mode,children:p.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Vf(i,o){var u=o.ref;if(u===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(o.flags|=4194816)}}function rg(i,o,u,p,x){return Do(o),u=zm(i,o,u,p,void 0,x),p=Pm(),i!==null&&!Fn?($m(i,o,x),os(i,o,x)):(Wt&&p&&ym(o),o.flags|=1,Jn(i,o,u,x),o.child)}function xS(i,o,u,p,x,w){return Do(o),o.updateQueue=null,u=w0(o,p,u,x),S0(i),p=Pm(),i!==null&&!Fn?($m(i,o,w),os(i,o,w)):(Wt&&p&&ym(o),o.flags|=1,Jn(i,o,u,w),o.child)}function kS(i,o,u,p,x){if(Do(o),o.stateNode===null){var w=Ra,M=u.contextType;typeof M=="object"&&M!==null&&(w=Qn(M)),w=new u(p,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=eg,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=p,w.state=o.memoizedState,w.refs={},Nm(o),M=u.contextType,w.context=typeof M=="object"&&M!==null?Qn(M):Ra,w.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(Jm(o,u,M,p),w.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(M=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),M!==w.state&&eg.enqueueReplaceState(w,w.state,null),lu(o,p,w,x),au(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(i===null){w=o.stateNode;var G=o.memoizedProps,Q=Bo(u,G);w.props=Q;var pe=w.context,Te=u.contextType;M=Ra,typeof Te=="object"&&Te!==null&&(M=Qn(Te));var Ae=u.getDerivedStateFromProps;Te=typeof Ae=="function"||typeof w.getSnapshotBeforeUpdate=="function",G=o.pendingProps!==G,Te||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(G||pe!==M)&&aS(o,w,p,M),$s=!1;var me=o.memoizedState;w.state=me,lu(o,p,w,x),au(),pe=o.memoizedState,G||me!==pe||$s?(typeof Ae=="function"&&(Jm(o,u,Ae,p),pe=o.memoizedState),(Q=$s||oS(o,u,Q,p,me,pe,M))?(Te||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=p,o.memoizedState=pe),w.props=p,w.state=pe,w.context=M,p=Q):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{w=o.stateNode,Am(i,o),M=o.memoizedProps,Te=Bo(u,M),w.props=Te,Ae=o.pendingProps,me=w.context,pe=u.contextType,Q=Ra,typeof pe=="object"&&pe!==null&&(Q=Qn(pe)),G=u.getDerivedStateFromProps,(pe=typeof G=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==Ae||me!==Q)&&aS(o,w,p,Q),$s=!1,me=o.memoizedState,w.state=me,lu(o,p,w,x),au();var ve=o.memoizedState;M!==Ae||me!==ve||$s||i!==null&&i.dependencies!==null&&Cf(i.dependencies)?(typeof G=="function"&&(Jm(o,u,G,p),ve=o.memoizedState),(Te=$s||oS(o,u,Te,p,me,ve,Q)||i!==null&&i.dependencies!==null&&Cf(i.dependencies))?(pe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(p,ve,Q),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(p,ve,Q)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=ve),w.props=p,w.state=ve,w.context=Q,p=Te):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(o.flags|=1024),p=!1)}return w=p,Vf(i,o),p=(o.flags&128)!==0,w||p?(w=o.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:w.render(),o.flags|=1,i!==null&&p?(o.child=Po(o,i.child,null,x),o.child=Po(o,null,u,x)):Jn(i,o,u,x),o.memoizedState=w.state,i=o.child):i=os(i,o,x),i}function SS(i,o,u,p){return Mo(),o.flags|=256,Jn(i,o,u,p),o.child}var ig={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sg(i){return{baseLanes:i,cachePool:f0()}}function og(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Gr),i}function wS(i,o,u){var p=o.pendingProps,x=!1,w=(o.flags&128)!==0,M;if((M=w)||(M=i!==null&&i.memoizedState===null?!1:(In.current&2)!==0),M&&(x=!0,o.flags&=-129),M=(o.flags&32)!==0,o.flags&=-33,i===null){if(Wt){if(x?Us(o):qs(),(i=wn)?(i=Ow(i,ri),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:js!==null?{id:_i,overflow:Ni}:null,retryLane:536870912,hydrationErrors:null},u=n0(i),u.return=o,o.child=u,Zn=o,wn=null)):i=null,i===null)throw zs(o);return Ug(i)?o.lanes=32:o.lanes=536870912,null}var G=p.children;return p=p.fallback,x?(qs(),x=o.mode,G=Wf({mode:"hidden",children:G},x),p=Oo(p,x,u,null),G.return=o,p.return=o,G.sibling=p,o.child=G,p=o.child,p.memoizedState=sg(u),p.childLanes=og(i,M,u),o.memoizedState=ig,pu(null,p)):(Us(o),ag(o,G))}var Q=i.memoizedState;if(Q!==null&&(G=Q.dehydrated,G!==null)){if(w)o.flags&256?(Us(o),o.flags&=-257,o=lg(i,o,u)):o.memoizedState!==null?(qs(),o.child=i.child,o.flags|=128,o=null):(qs(),G=p.fallback,x=o.mode,p=Wf({mode:"visible",children:p.children},x),G=Oo(G,x,u,null),G.flags|=2,p.return=o,G.return=o,p.sibling=G,o.child=p,Po(o,i.child,null,u),p=o.child,p.memoizedState=sg(u),p.childLanes=og(i,M,u),o.memoizedState=ig,o=pu(null,p));else if(Us(o),Ug(G)){if(M=G.nextSibling&&G.nextSibling.dataset,M)var pe=M.dgst;M=pe,p=Error(r(419)),p.stack="",p.digest=M,tu({value:p,source:null,stack:null}),o=lg(i,o,u)}else if(Fn||Aa(i,o,u,!1),M=(u&i.childLanes)!==0,Fn||M){if(M=gn,M!==null&&(p=ze(M,u),p!==0&&p!==Q.retryLane))throw Q.retryLane=p,Ao(i,p),_r(M,i,p),ng;Fg(G)||nd(),o=lg(i,o,u)}else Fg(G)?(o.flags|=192,o.child=i.child,o=null):(i=Q.treeContext,wn=si(G.nextSibling),Zn=o,Wt=!0,Ls=null,ri=!1,i!==null&&s0(o,i),o=ag(o,p.children),o.flags|=4096);return o}return x?(qs(),G=p.fallback,x=o.mode,Q=i.child,pe=Q.sibling,p=es(Q,{mode:"hidden",children:p.children}),p.subtreeFlags=Q.subtreeFlags&65011712,pe!==null?G=es(pe,G):(G=Oo(G,x,u,null),G.flags|=2),G.return=o,p.return=o,p.sibling=G,o.child=p,pu(null,p),p=o.child,G=i.child.memoizedState,G===null?G=sg(u):(x=G.cachePool,x!==null?(Q=$n._currentValue,x=x.parent!==Q?{parent:Q,pool:Q}:x):x=f0(),G={baseLanes:G.baseLanes|u,cachePool:x}),p.memoizedState=G,p.childLanes=og(i,M,u),o.memoizedState=ig,pu(i.child,p)):(Us(o),u=i.child,i=u.sibling,u=es(u,{mode:"visible",children:p.children}),u.return=o,u.sibling=null,i!==null&&(M=o.deletions,M===null?(o.deletions=[i],o.flags|=16):M.push(i)),o.child=u,o.memoizedState=null,u)}function ag(i,o){return o=Wf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Wf(i,o){return i=Fr(22,i,null,o),i.lanes=0,i}function lg(i,o,u){return Po(o,i.child,null,u),i=ag(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function ES(i,o,u){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),wm(i.return,o,u)}function ug(i,o,u,p,x,w){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:x,treeForkCount:w}:(M.isBackwards=o,M.rendering=null,M.renderingStartTime=0,M.last=p,M.tail=u,M.tailMode=x,M.treeForkCount=w)}function TS(i,o,u){var p=o.pendingProps,x=p.revealOrder,w=p.tail;p=p.children;var M=In.current,G=(M&2)!==0;if(G?(M=M&1|2,o.flags|=128):M&=1,j(In,M),Jn(i,o,p,u),p=Wt?eu:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&ES(i,u,o);else if(i.tag===19)ES(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(x){case"forwards":for(u=o.child,x=null;u!==null;)i=u.alternate,i!==null&&jf(i)===null&&(x=u),u=u.sibling;u=x,u===null?(x=o.child,o.child=null):(x=u.sibling,u.sibling=null),ug(o,!1,x,u,w,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,x=o.child,o.child=null;x!==null;){if(i=x.alternate,i!==null&&jf(i)===null){o.child=x;break}i=x.sibling,x.sibling=u,u=x,x=i}ug(o,!0,u,null,w,p);break;case"together":ug(o,!1,null,null,void 0,p);break;default:o.memoizedState=null}return o.child}function os(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Vs|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(Aa(i,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,u=es(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=es(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function cg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Cf(i)))}function oL(i,o,u){switch(o.tag){case 3:le(o,o.stateNode.containerInfo),Ps(o,$n,i.memoizedState.cache),Mo();break;case 27:case 5:ge(o);break;case 4:le(o,o.stateNode.containerInfo);break;case 10:Ps(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,jm(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Us(o),o.flags|=128,null):(u&o.child.childLanes)!==0?wS(i,o,u):(Us(o),i=os(i,o,u),i!==null?i.sibling:null);Us(o);break;case 19:var x=(i.flags&128)!==0;if(p=(u&o.childLanes)!==0,p||(Aa(i,o,u,!1),p=(u&o.childLanes)!==0),x){if(p)return TS(i,o,u);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),j(In,In.current),p)break;return null;case 22:return o.lanes=0,bS(i,o,u,o.pendingProps);case 24:Ps(o,$n,i.memoizedState.cache)}return os(i,o,u)}function RS(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Fn=!0;else{if(!cg(i,u)&&(o.flags&128)===0)return Fn=!1,oL(i,o,u);Fn=(i.flags&131072)!==0}else Fn=!1,Wt&&(o.flags&1048576)!==0&&i0(o,eu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(i=Lo(o.elementType),o.type=i,typeof i=="function")mm(i)?(p=Bo(i,p),o.tag=1,o=kS(null,o,i,p,u)):(o.tag=0,o=rg(null,o,i,p,u));else{if(i!=null){var x=i.$$typeof;if(x===_){o.tag=11,o=hS(null,o,i,p,u);break e}else if(x===A){o.tag=14,o=mS(null,o,i,p,u);break e}}throw o=D(i)||i,Error(r(306,o,""))}}return o;case 0:return rg(i,o,o.type,o.pendingProps,u);case 1:return p=o.type,x=Bo(p,o.pendingProps),kS(i,o,p,x,u);case 3:e:{if(le(o,o.stateNode.containerInfo),i===null)throw Error(r(387));p=o.pendingProps;var w=o.memoizedState;x=w.element,Am(i,o),lu(o,p,null,u);var M=o.memoizedState;if(p=M.cache,Ps(o,$n,p),p!==w.cache&&Em(o,[$n],u,!0),au(),p=M.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:M.cache},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){o=SS(i,o,p,u);break e}else if(p!==x){x=ei(Error(r(424)),o),tu(x),o=SS(i,o,p,u);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,wn=si(i.firstChild),Zn=o,Wt=!0,Ls=null,ri=!0,u=b0(o,null,p,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Mo(),p===x){o=os(i,o,u);break e}Jn(i,o,p,u)}o=o.child}return o;case 26:return Vf(i,o),i===null?(u=zw(o.type,null,o.pendingProps,null))?o.memoizedState=u:Wt||(u=o.type,i=o.pendingProps,p=ud(se.current).createElement(u),p[wt]=o,p[$t]=i,er(p,u,i),zn(p),o.stateNode=p):o.memoizedState=zw(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return ge(o),i===null&&Wt&&(p=o.stateNode=Dw(o.type,o.pendingProps,se.current),Zn=o,ri=!0,x=wn,Zs(o.type)?(qg=x,wn=si(p.firstChild)):wn=x),Jn(i,o,o.pendingProps.children,u),Vf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Wt&&((x=p=wn)&&(p=LL(p,o.type,o.pendingProps,ri),p!==null?(o.stateNode=p,Zn=o,wn=si(p.firstChild),ri=!1,x=!0):x=!1),x||zs(o)),ge(o),x=o.type,w=o.pendingProps,M=i!==null?i.memoizedProps:null,p=w.children,Pg(x,w)?p=null:M!==null&&Pg(x,M)&&(o.flags|=32),o.memoizedState!==null&&(x=zm(i,o,Zj,null,null,u),_u._currentValue=x),Vf(i,o),Jn(i,o,p,u),o.child;case 6:return i===null&&Wt&&((i=u=wn)&&(u=zL(u,o.pendingProps,ri),u!==null?(o.stateNode=u,Zn=o,wn=null,i=!0):i=!1),i||zs(o)),null;case 13:return wS(i,o,u);case 4:return le(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=Po(o,null,p,u):Jn(i,o,p,u),o.child;case 11:return hS(i,o,o.type,o.pendingProps,u);case 7:return Jn(i,o,o.pendingProps,u),o.child;case 8:return Jn(i,o,o.pendingProps.children,u),o.child;case 12:return Jn(i,o,o.pendingProps.children,u),o.child;case 10:return p=o.pendingProps,Ps(o,o.type,p.value),Jn(i,o,p.children,u),o.child;case 9:return x=o.type._context,p=o.pendingProps.children,Do(o),x=Qn(x),p=p(x),o.flags|=1,Jn(i,o,p,u),o.child;case 14:return mS(i,o,o.type,o.pendingProps,u);case 15:return gS(i,o,o.type,o.pendingProps,u);case 19:return TS(i,o,u);case 31:return sL(i,o,u);case 22:return bS(i,o,u,o.pendingProps);case 24:return Do(o),p=Qn($n),i===null?(x=Cm(),x===null&&(x=gn,w=Tm(),x.pooledCache=w,w.refCount++,w!==null&&(x.pooledCacheLanes|=u),x=w),o.memoizedState={parent:p,cache:x},Nm(o),Ps(o,$n,x)):((i.lanes&u)!==0&&(Am(i,o),lu(o,null,null,u),au()),x=i.memoizedState,w=o.memoizedState,x.parent!==p?(x={parent:p,cache:p},o.memoizedState=x,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=x),Ps(o,$n,p)):(p=w.cache,Ps(o,$n,p),p!==x.cache&&Em(o,[$n],u,!0))),Jn(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function as(i){i.flags|=4}function fg(i,o,u,p,x){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(x&335544128)===x)if(i.stateNode.complete)i.flags|=8192;else if(JS())i.flags|=8192;else throw zo=Of,_m}else i.flags&=-16777217}function CS(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Uw(o))if(JS())i.flags|=8192;else throw zo=Of,_m}function Kf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Ze():536870912,i.lanes|=o,Ua|=o)}function hu(i,o){if(!Wt)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function En(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(o)for(var x=i.child;x!==null;)u|=x.lanes|x.childLanes,p|=x.subtreeFlags&65011712,p|=x.flags&65011712,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)u|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=p,i.childLanes=u,o}function aL(i,o,u){var p=o.pendingProps;switch(vm(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return En(o),null;case 1:return En(o),null;case 3:return u=o.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),rs($n),fe(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Na(o)?as(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,km())),En(o),null;case 26:var x=o.type,w=o.memoizedState;return i===null?(as(o),w!==null?(En(o),CS(o,w)):(En(o),fg(o,x,null,p,u))):w?w!==i.memoizedState?(as(o),En(o),CS(o,w)):(En(o),o.flags&=-16777217):(i=i.memoizedProps,i!==p&&as(o),En(o),fg(o,x,i,p,u)),null;case 27:if(_e(o),u=se.current,x=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&as(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return En(o),null}i=Z.current,Na(o)?o0(o):(i=Dw(x,p,u),o.stateNode=i,as(o))}return En(o),null;case 5:if(_e(o),x=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&as(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return En(o),null}if(w=Z.current,Na(o))o0(o);else{var M=ud(se.current);switch(w){case 1:w=M.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:w=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":w=M.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":w=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":w=M.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof p.is=="string"?M.createElement("select",{is:p.is}):M.createElement("select"),p.multiple?w.multiple=!0:p.size&&(w.size=p.size);break;default:w=typeof p.is=="string"?M.createElement(x,{is:p.is}):M.createElement(x)}}w[wt]=o,w[$t]=p;e:for(M=o.child;M!==null;){if(M.tag===5||M.tag===6)w.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===o)break e;for(;M.sibling===null;){if(M.return===null||M.return===o)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}o.stateNode=w;e:switch(er(w,x,p),x){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&as(o)}}return En(o),fg(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==p&&as(o);else{if(typeof p!="string"&&o.stateNode===null)throw Error(r(166));if(i=se.current,Na(o)){if(i=o.stateNode,u=o.memoizedProps,p=null,x=Zn,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}i[wt]=o,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||ww(i.nodeValue,u)),i||zs(o,!0)}else i=ud(i).createTextNode(p),i[wt]=o,o.stateNode=i}return En(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(p=Na(o),u!==null){if(i===null){if(!p)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[wt]=o}else Mo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),i=!1}else u=km(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(qr(o),o):(qr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return En(o),null;case 13:if(p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=Na(o),p!==null&&p.dehydrated!==null){if(i===null){if(!x)throw Error(r(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[wt]=o}else Mo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),x=!1}else x=km(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(qr(o),o):(qr(o),null)}return qr(o),(o.flags&128)!==0?(o.lanes=u,o):(u=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=o.child,x=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(x=p.alternate.memoizedState.cachePool.pool),w=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(w=p.memoizedState.cachePool.pool),w!==x&&(p.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),Kf(o,o.updateQueue),En(o),null);case 4:return fe(),i===null&&Ig(o.stateNode.containerInfo),En(o),null;case 10:return rs(o.type),En(o),null;case 19:if(V(In),p=o.memoizedState,p===null)return En(o),null;if(x=(o.flags&128)!==0,w=p.rendering,w===null)if(x)hu(p,!1);else{if(On!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=jf(i),w!==null){for(o.flags|=128,hu(p,!1),i=w.updateQueue,o.updateQueue=i,Kf(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)t0(u,i),u=u.sibling;return j(In,In.current&1|2),Wt&&ts(o,p.treeForkCount),o.child}i=i.sibling}p.tail!==null&&ee()>Jf&&(o.flags|=128,x=!0,hu(p,!1),o.lanes=4194304)}else{if(!x)if(i=jf(w),i!==null){if(o.flags|=128,x=!0,i=i.updateQueue,o.updateQueue=i,Kf(o,i),hu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Wt)return En(o),null}else 2*ee()-p.renderingStartTime>Jf&&u!==536870912&&(o.flags|=128,x=!0,hu(p,!1),o.lanes=4194304);p.isBackwards?(w.sibling=o.child,o.child=w):(i=p.last,i!==null?i.sibling=w:o.child=w,p.last=w)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=ee(),i.sibling=null,u=In.current,j(In,x?u&1|2:u&1),Wt&&ts(o,p.treeForkCount),i):(En(o),null);case 22:case 23:return qr(o),Dm(),p=o.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(o.flags|=8192):p&&(o.flags|=8192),p?(u&536870912)!==0&&(o.flags&128)===0&&(En(o),o.subtreeFlags&6&&(o.flags|=8192)):En(o),u=o.updateQueue,u!==null&&Kf(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==u&&(o.flags|=2048),i!==null&&V(jo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),rs($n),En(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function lL(i,o){switch(vm(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return rs($n),fe(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return _e(o),null;case 31:if(o.memoizedState!==null){if(qr(o),o.alternate===null)throw Error(r(340));Mo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(qr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Mo()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return V(In),null;case 4:return fe(),null;case 10:return rs(o.type),null;case 22:case 23:return qr(o),Dm(),i!==null&&V(jo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return rs($n),null;case 25:return null;default:return null}}function _S(i,o){switch(vm(o),o.tag){case 3:rs($n),fe();break;case 26:case 27:case 5:_e(o);break;case 4:fe();break;case 31:o.memoizedState!==null&&qr(o);break;case 13:qr(o);break;case 19:V(In);break;case 10:rs(o.type);break;case 22:case 23:qr(o),Dm(),i!==null&&V(jo);break;case 24:rs($n)}}function mu(i,o){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var x=p.next;u=x;do{if((u.tag&i)===i){p=void 0;var w=u.create,M=u.inst;p=w(),M.destroy=p}u=u.next}while(u!==x)}}catch(G){an(o,o.return,G)}}function Hs(i,o,u){try{var p=o.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var w=x.next;p=w;do{if((p.tag&i)===i){var M=p.inst,G=M.destroy;if(G!==void 0){M.destroy=void 0,x=o;var Q=u,pe=G;try{pe()}catch(Te){an(x,Q,Te)}}}p=p.next}while(p!==w)}}catch(Te){an(o,o.return,Te)}}function NS(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{v0(o,u)}catch(p){an(i,i.return,p)}}}function AS(i,o,u){u.props=Bo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){an(i,o,p)}}function gu(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(x){an(i,o,x)}}function Ai(i,o){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(x){an(i,o,x)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){an(i,o,x)}else u.current=null}function OS(i){var o=i.type,u=i.memoizedProps,p=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(x){an(i,i.return,x)}}function dg(i,o,u){try{var p=i.stateNode;AL(p,i.type,u,o),p[$t]=o}catch(x){an(i,i.return,x)}}function MS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Zs(i.type)||i.tag===4}function pg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||MS(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Zs(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function hg(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(i),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Ve));else if(p!==4&&(p===27&&Zs(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(hg(i,o,u),i=i.sibling;i!==null;)hg(i,o,u),i=i.sibling}function Yf(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(p!==4&&(p===27&&Zs(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Yf(i,o,u),i=i.sibling;i!==null;)Yf(i,o,u),i=i.sibling}function IS(i){var o=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);er(o,p,u),o[wt]=i,o[$t]=u}catch(w){an(i,i.return,w)}}var ls=!1,Un=!1,mg=!1,DS=typeof WeakSet=="function"?WeakSet:Set,Kn=null;function uL(i,o){if(i=i.containerInfo,Lg=gd,i=Vk(i),lm(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var M=0,G=-1,Q=-1,pe=0,Te=0,Ae=i,me=null;t:for(;;){for(var ve;Ae!==u||x!==0&&Ae.nodeType!==3||(G=M+x),Ae!==w||p!==0&&Ae.nodeType!==3||(Q=M+p),Ae.nodeType===3&&(M+=Ae.nodeValue.length),(ve=Ae.firstChild)!==null;)me=Ae,Ae=ve;for(;;){if(Ae===i)break t;if(me===u&&++pe===x&&(G=M),me===w&&++Te===p&&(Q=M),(ve=Ae.nextSibling)!==null)break;Ae=me,me=Ae.parentNode}Ae=ve}u=G===-1||Q===-1?null:{start:G,end:Q}}else u=null}u=u||{start:0,end:0}}else u=null;for(zg={focusedElem:i,selectionRange:u},gd=!1,Kn=o;Kn!==null;)if(o=Kn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Kn=i;else for(;Kn!==null;){switch(o=Kn,w=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)x=i[u],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,u=o,x=w.memoizedProps,w=w.memoizedState,p=u.stateNode;try{var Je=Bo(u.type,x);i=p.getSnapshotBeforeUpdate(Je,w),p.__reactInternalSnapshotBeforeUpdate=i}catch(gt){an(u,u.return,gt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Bg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Bg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,Kn=i;break}Kn=o.return}}function jS(i,o,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:cs(i,u),p&4&&mu(5,u);break;case 1:if(cs(i,u),p&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(M){an(u,u.return,M)}else{var x=Bo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(x,o,i.__reactInternalSnapshotBeforeUpdate)}catch(M){an(u,u.return,M)}}p&64&&NS(u),p&512&&gu(u,u.return);break;case 3:if(cs(i,u),p&64&&(i=u.updateQueue,i!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{v0(i,o)}catch(M){an(u,u.return,M)}}break;case 27:o===null&&p&4&&IS(u);case 26:case 5:cs(i,u),o===null&&p&4&&OS(u),p&512&&gu(u,u.return);break;case 12:cs(i,u);break;case 31:cs(i,u),p&4&&PS(i,u);break;case 13:cs(i,u),p&4&&$S(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=yL.bind(null,u),PL(i,u))));break;case 22:if(p=u.memoizedState!==null||ls,!p){o=o!==null&&o.memoizedState!==null||Un,x=ls;var w=Un;ls=p,(Un=o)&&!w?fs(i,u,(u.subtreeFlags&8772)!==0):cs(i,u),ls=x,Un=w}break;case 30:break;default:cs(i,u)}}function LS(i){var o=i.alternate;o!==null&&(i.alternate=null,LS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Eo(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Tn=null,Er=!1;function us(i,o,u){for(u=u.child;u!==null;)zS(i,o,u),u=u.sibling}function zS(i,o,u){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Qe,u)}catch{}switch(u.tag){case 26:Un||Ai(u,o),us(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Un||Ai(u,o);var p=Tn,x=Er;Zs(u.type)&&(Tn=u.stateNode,Er=!1),us(i,o,u),Tu(u.stateNode),Tn=p,Er=x;break;case 5:Un||Ai(u,o);case 6:if(p=Tn,x=Er,Tn=null,us(i,o,u),Tn=p,Er=x,Tn!==null)if(Er)try{(Tn.nodeType===9?Tn.body:Tn.nodeName==="HTML"?Tn.ownerDocument.body:Tn).removeChild(u.stateNode)}catch(w){an(u,o,w)}else try{Tn.removeChild(u.stateNode)}catch(w){an(u,o,w)}break;case 18:Tn!==null&&(Er?(i=Tn,Nw(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Xa(i)):Nw(Tn,u.stateNode));break;case 4:p=Tn,x=Er,Tn=u.stateNode.containerInfo,Er=!0,us(i,o,u),Tn=p,Er=x;break;case 0:case 11:case 14:case 15:Hs(2,u,o),Un||Hs(4,u,o),us(i,o,u);break;case 1:Un||(Ai(u,o),p=u.stateNode,typeof p.componentWillUnmount=="function"&&AS(u,o,p)),us(i,o,u);break;case 21:us(i,o,u);break;case 22:Un=(p=Un)||u.memoizedState!==null,us(i,o,u),Un=p;break;default:us(i,o,u)}}function PS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Xa(i)}catch(u){an(o,o.return,u)}}}function $S(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Xa(i)}catch(u){an(o,o.return,u)}}function cL(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new DS),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new DS),o;default:throw Error(r(435,i.tag))}}function Xf(i,o){var u=cL(i);o.forEach(function(p){if(!u.has(p)){u.add(p);var x=vL.bind(null,i,p);p.then(x,x)}})}function Tr(i,o){var u=o.deletions;if(u!==null)for(var p=0;p<u.length;p++){var x=u[p],w=i,M=o,G=M;e:for(;G!==null;){switch(G.tag){case 27:if(Zs(G.type)){Tn=G.stateNode,Er=!1;break e}break;case 5:Tn=G.stateNode,Er=!1;break e;case 3:case 4:Tn=G.stateNode.containerInfo,Er=!0;break e}G=G.return}if(Tn===null)throw Error(r(160));zS(w,M,x),Tn=null,Er=!1,w=x.alternate,w!==null&&(w.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)BS(o,i),o=o.sibling}var yi=null;function BS(i,o){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Tr(o,i),Rr(i),p&4&&(Hs(3,i,i.return),mu(3,i),Hs(5,i,i.return));break;case 1:Tr(o,i),Rr(i),p&512&&(Un||u===null||Ai(u,u.return)),p&64&&ls&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var x=yi;if(Tr(o,i),Rr(i),p&512&&(Un||u===null||Ai(u,u.return)),p&4){var w=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,x=x.ownerDocument||x;t:switch(p){case"title":w=x.getElementsByTagName("title")[0],(!w||w[Yi]||w[wt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=x.createElement(p),x.head.insertBefore(w,x.querySelector("head > title"))),er(w,p,u),w[wt]=i,zn(w),p=w;break e;case"link":var M=Bw("link","href",x).get(p+(u.href||""));if(M){for(var G=0;G<M.length;G++)if(w=M[G],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(G,1);break t}}w=x.createElement(p),er(w,p,u),x.head.appendChild(w);break;case"meta":if(M=Bw("meta","content",x).get(p+(u.content||""))){for(G=0;G<M.length;G++)if(w=M[G],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(G,1);break t}}w=x.createElement(p),er(w,p,u),x.head.appendChild(w);break;default:throw Error(r(468,p))}w[wt]=i,zn(w),p=w}i.stateNode=p}else Fw(x,i.type,i.stateNode);else i.stateNode=$w(x,p,i.memoizedProps);else w!==p?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,p===null?Fw(x,i.type,i.stateNode):$w(x,p,i.memoizedProps)):p===null&&i.stateNode!==null&&dg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Tr(o,i),Rr(i),p&512&&(Un||u===null||Ai(u,u.return)),u!==null&&p&4&&dg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Tr(o,i),Rr(i),p&512&&(Un||u===null||Ai(u,u.return)),i.flags&32){x=i.stateNode;try{bt(x,"")}catch(Je){an(i,i.return,Je)}}p&4&&i.stateNode!=null&&(x=i.memoizedProps,dg(i,x,u!==null?u.memoizedProps:x)),p&1024&&(mg=!0);break;case 6:if(Tr(o,i),Rr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(Je){an(i,i.return,Je)}}break;case 3:if(dd=null,x=yi,yi=cd(o.containerInfo),Tr(o,i),yi=x,Rr(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{Xa(o.containerInfo)}catch(Je){an(i,i.return,Je)}mg&&(mg=!1,FS(i));break;case 4:p=yi,yi=cd(i.stateNode.containerInfo),Tr(o,i),Rr(i),yi=p;break;case 12:Tr(o,i),Rr(i);break;case 31:Tr(o,i),Rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Xf(i,p)));break;case 13:Tr(o,i),Rr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Qf=ee()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Xf(i,p)));break;case 22:x=i.memoizedState!==null;var Q=u!==null&&u.memoizedState!==null,pe=ls,Te=Un;if(ls=pe||x,Un=Te||Q,Tr(o,i),Un=Te,ls=pe,Rr(i),p&8192)e:for(o=i.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(u===null||Q||ls||Un||Fo(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){Q=u=o;try{if(w=Q.stateNode,x)M=w.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{G=Q.stateNode;var Ae=Q.memoizedProps.style,me=Ae!=null&&Ae.hasOwnProperty("display")?Ae.display:null;G.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(Je){an(Q,Q.return,Je)}}}else if(o.tag===6){if(u===null){Q=o;try{Q.stateNode.nodeValue=x?"":Q.memoizedProps}catch(Je){an(Q,Q.return,Je)}}}else if(o.tag===18){if(u===null){Q=o;try{var ve=Q.stateNode;x?Aw(ve,!0):Aw(Q.stateNode,!1)}catch(Je){an(Q,Q.return,Je)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,Xf(i,u))));break;case 19:Tr(o,i),Rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Xf(i,p)));break;case 30:break;case 21:break;default:Tr(o,i),Rr(i)}}function Rr(i){var o=i.flags;if(o&2){try{for(var u,p=i.return;p!==null;){if(MS(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,w=pg(i);Yf(i,w,x);break;case 5:var M=u.stateNode;u.flags&32&&(bt(M,""),u.flags&=-33);var G=pg(i);Yf(i,G,M);break;case 3:case 4:var Q=u.stateNode.containerInfo,pe=pg(i);hg(i,pe,Q);break;default:throw Error(r(161))}}catch(Te){an(i,i.return,Te)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function FS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;FS(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function cs(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)jS(i,o.alternate,o),o=o.sibling}function Fo(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Hs(4,o,o.return),Fo(o);break;case 1:Ai(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&AS(o,o.return,u),Fo(o);break;case 27:Tu(o.stateNode);case 26:case 5:Ai(o,o.return),Fo(o);break;case 22:o.memoizedState===null&&Fo(o);break;case 30:Fo(o);break;default:Fo(o)}i=i.sibling}}function fs(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var p=o.alternate,x=i,w=o,M=w.flags;switch(w.tag){case 0:case 11:case 15:fs(x,w,u),mu(4,w);break;case 1:if(fs(x,w,u),p=w,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(pe){an(p,p.return,pe)}if(p=w,x=p.updateQueue,x!==null){var G=p.stateNode;try{var Q=x.shared.hiddenCallbacks;if(Q!==null)for(x.shared.hiddenCallbacks=null,x=0;x<Q.length;x++)y0(Q[x],G)}catch(pe){an(p,p.return,pe)}}u&&M&64&&NS(w),gu(w,w.return);break;case 27:IS(w);case 26:case 5:fs(x,w,u),u&&p===null&&M&4&&OS(w),gu(w,w.return);break;case 12:fs(x,w,u);break;case 31:fs(x,w,u),u&&M&4&&PS(x,w);break;case 13:fs(x,w,u),u&&M&4&&$S(x,w);break;case 22:w.memoizedState===null&&fs(x,w,u),gu(w,w.return);break;case 30:break;default:fs(x,w,u)}o=o.sibling}}function gg(i,o){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&nu(u))}function bg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&nu(i))}function vi(i,o,u,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)US(i,o,u,p),o=o.sibling}function US(i,o,u,p){var x=o.flags;switch(o.tag){case 0:case 11:case 15:vi(i,o,u,p),x&2048&&mu(9,o);break;case 1:vi(i,o,u,p);break;case 3:vi(i,o,u,p),x&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&nu(i)));break;case 12:if(x&2048){vi(i,o,u,p),i=o.stateNode;try{var w=o.memoizedProps,M=w.id,G=w.onPostCommit;typeof G=="function"&&G(M,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(Q){an(o,o.return,Q)}}else vi(i,o,u,p);break;case 31:vi(i,o,u,p);break;case 13:vi(i,o,u,p);break;case 23:break;case 22:w=o.stateNode,M=o.alternate,o.memoizedState!==null?w._visibility&2?vi(i,o,u,p):bu(i,o):w._visibility&2?vi(i,o,u,p):(w._visibility|=2,$a(i,o,u,p,(o.subtreeFlags&10256)!==0||!1)),x&2048&&gg(M,o);break;case 24:vi(i,o,u,p),x&2048&&bg(o.alternate,o);break;default:vi(i,o,u,p)}}function $a(i,o,u,p,x){for(x=x&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=i,M=o,G=u,Q=p,pe=M.flags;switch(M.tag){case 0:case 11:case 15:$a(w,M,G,Q,x),mu(8,M);break;case 23:break;case 22:var Te=M.stateNode;M.memoizedState!==null?Te._visibility&2?$a(w,M,G,Q,x):bu(w,M):(Te._visibility|=2,$a(w,M,G,Q,x)),x&&pe&2048&&gg(M.alternate,M);break;case 24:$a(w,M,G,Q,x),x&&pe&2048&&bg(M.alternate,M);break;default:$a(w,M,G,Q,x)}o=o.sibling}}function bu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=i,p=o,x=p.flags;switch(p.tag){case 22:bu(u,p),x&2048&&gg(p.alternate,p);break;case 24:bu(u,p),x&2048&&bg(p.alternate,p);break;default:bu(u,p)}o=o.sibling}}var yu=8192;function Ba(i,o,u){if(i.subtreeFlags&yu)for(i=i.child;i!==null;)qS(i,o,u),i=i.sibling}function qS(i,o,u){switch(i.tag){case 26:Ba(i,o,u),i.flags&yu&&i.memoizedState!==null&&XL(u,yi,i.memoizedState,i.memoizedProps);break;case 5:Ba(i,o,u);break;case 3:case 4:var p=yi;yi=cd(i.stateNode.containerInfo),Ba(i,o,u),yi=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=yu,yu=16777216,Ba(i,o,u),yu=p):Ba(i,o,u));break;default:Ba(i,o,u)}}function HS(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function vu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];Kn=p,VS(p,i)}HS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)GS(i),i=i.sibling}function GS(i){switch(i.tag){case 0:case 11:case 15:vu(i),i.flags&2048&&Hs(9,i,i.return);break;case 3:vu(i);break;case 12:vu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Zf(i)):vu(i);break;default:vu(i)}}function Zf(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];Kn=p,VS(p,i)}HS(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Hs(8,o,o.return),Zf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,Zf(o));break;default:Zf(o)}i=i.sibling}}function VS(i,o){for(;Kn!==null;){var u=Kn;switch(u.tag){case 0:case 11:case 15:Hs(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:nu(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Kn=p;else e:for(u=i;Kn!==null;){p=Kn;var x=p.sibling,w=p.return;if(LS(p),p===u){Kn=null;break e}if(x!==null){x.return=w,Kn=x;break e}Kn=w}}}var fL={getCacheForType:function(i){var o=Qn($n),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return Qn($n).controller.signal}},dL=typeof WeakMap=="function"?WeakMap:Map,tn=0,gn=null,Bt=null,Ht=0,on=0,Hr=null,Gs=!1,Fa=!1,yg=!1,ds=0,On=0,Vs=0,Uo=0,vg=0,Gr=0,Ua=0,xu=null,Cr=null,xg=!1,Qf=0,WS=0,Jf=1/0,ed=null,Ws=null,Gn=0,Ks=null,qa=null,ps=0,kg=0,Sg=null,KS=null,ku=0,wg=null;function Vr(){return(tn&2)!==0&&Ht!==0?Ht&-Ht:U.T!==null?Ng():ut()}function YS(){if(Gr===0)if((Ht&536870912)===0||Wt){var i=Dt;Dt<<=1,(Dt&3932160)===0&&(Dt=262144),Gr=i}else Gr=536870912;return i=Ur.current,i!==null&&(i.flags|=32),Gr}function _r(i,o,u){(i===gn&&(on===2||on===9)||i.cancelPendingCommit!==null)&&(Ha(i,0),Ys(i,Ht,Gr,!1)),at(i,u),((tn&2)===0||i!==gn)&&(i===gn&&((tn&2)===0&&(Uo|=u),On===4&&Ys(i,Ht,Gr,!1)),Oi(i))}function XS(i,o,u){if((tn&6)!==0)throw Error(r(327));var p=!u&&(o&127)===0&&(o&i.expiredLanes)===0||he(i,o),x=p?mL(i,o):Tg(i,o,!0),w=p;do{if(x===0){Fa&&!p&&Ys(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!pL(u)){x=Tg(i,o,!1),w=!1;continue}if(x===2){if(w=o,i.errorRecoveryDisabledLanes&w)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){o=M;e:{var G=i;x=xu;var Q=G.current.memoizedState.isDehydrated;if(Q&&(Ha(G,M).flags|=256),M=Tg(G,M,!1),M!==2){if(yg&&!Q){G.errorRecoveryDisabledLanes|=w,Uo|=w,x=4;break e}w=Cr,Cr=x,w!==null&&(Cr===null?Cr=w:Cr.push.apply(Cr,w))}x=M}if(w=!1,x!==2)continue}}if(x===1){Ha(i,0),Ys(i,o,0,!0);break}e:{switch(p=i,w=x,w){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Ys(p,o,Gr,!Gs);break e;case 2:Cr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(x=Qf+300-ee(),10<x)){if(Ys(p,o,Gr,!Gs),X(p,0,!0)!==0)break e;ps=o,p.timeoutHandle=Cw(ZS.bind(null,p,u,Cr,ed,xg,o,Gr,Uo,Ua,Gs,w,"Throttled",-0,0),x);break e}ZS(p,u,Cr,ed,xg,o,Gr,Uo,Ua,Gs,w,null,-0,0)}}break}while(!0);Oi(i)}function ZS(i,o,u,p,x,w,M,G,Q,pe,Te,Ae,me,ve){if(i.timeoutHandle=-1,Ae=o.subtreeFlags,Ae&8192||(Ae&16785408)===16785408){Ae={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ve},qS(o,w,Ae);var Je=(w&62914560)===w?Qf-ee():(w&4194048)===w?WS-ee():0;if(Je=ZL(Ae,Je),Je!==null){ps=w,i.cancelPendingCommit=Je(sw.bind(null,i,o,w,u,p,x,M,G,Q,Te,Ae,null,me,ve)),Ys(i,w,M,!pe);return}}sw(i,o,w,u,p,x,M,G,Q)}function pL(i){for(var o=i;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var x=u[p],w=x.getSnapshot;x=x.value;try{if(!Br(w(),x))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ys(i,o,u,p){o&=~vg,o&=~Uo,i.suspendedLanes|=o,i.pingedLanes&=~o,p&&(i.warmLanes|=o),p=i.expirationTimes;for(var x=o;0<x;){var w=31-nt(x),M=1<<w;p[w]=-1,x&=~M}u!==0&&Ee(i,u,o)}function td(){return(tn&6)===0?(Su(0),!1):!0}function Eg(){if(Bt!==null){if(on===0)var i=Bt.return;else i=Bt,ns=Io=null,Bm(i),Da=null,iu=0,i=Bt;for(;i!==null;)_S(i.alternate,i),i=i.return;Bt=null}}function Ha(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,IL(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),ps=0,Eg(),gn=i,Bt=u=es(i.current,null),Ht=o,on=0,Hr=null,Gs=!1,Fa=he(i,o),yg=!1,Ua=Gr=vg=Uo=Vs=On=0,Cr=xu=null,xg=!1,(o&8)!==0&&(o|=o&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=o;0<p;){var x=31-nt(p),w=1<<x;o|=i[x],p&=~w}return ds=o,Sf(),u}function QS(i,o){Nt=null,U.H=du,o===Ia||o===Af?(o=h0(),on=3):o===_m?(o=h0(),on=4):on=o===ng?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Hr=o,Bt===null&&(On=1,Hf(i,ei(o,i.current)))}function JS(){var i=Ur.current;return i===null?!0:(Ht&4194048)===Ht?ii===null:(Ht&62914560)===Ht||(Ht&536870912)!==0?i===ii:!1}function ew(){var i=U.H;return U.H=du,i===null?du:i}function tw(){var i=U.A;return U.A=fL,i}function nd(){On=4,Gs||(Ht&4194048)!==Ht&&Ur.current!==null||(Fa=!0),(Vs&134217727)===0&&(Uo&134217727)===0||gn===null||Ys(gn,Ht,Gr,!1)}function Tg(i,o,u){var p=tn;tn|=2;var x=ew(),w=tw();(gn!==i||Ht!==o)&&(ed=null,Ha(i,o)),o=!1;var M=On;e:do try{if(on!==0&&Bt!==null){var G=Bt,Q=Hr;switch(on){case 8:Eg(),M=6;break e;case 3:case 2:case 9:case 6:Ur.current===null&&(o=!0);var pe=on;if(on=0,Hr=null,Ga(i,G,Q,pe),u&&Fa){M=0;break e}break;default:pe=on,on=0,Hr=null,Ga(i,G,Q,pe)}}hL(),M=On;break}catch(Te){QS(i,Te)}while(!0);return o&&i.shellSuspendCounter++,ns=Io=null,tn=p,U.H=x,U.A=w,Bt===null&&(gn=null,Ht=0,Sf()),M}function hL(){for(;Bt!==null;)nw(Bt)}function mL(i,o){var u=tn;tn|=2;var p=ew(),x=tw();gn!==i||Ht!==o?(ed=null,Jf=ee()+500,Ha(i,o)):Fa=he(i,o);e:do try{if(on!==0&&Bt!==null){o=Bt;var w=Hr;t:switch(on){case 1:on=0,Hr=null,Ga(i,o,w,1);break;case 2:case 9:if(d0(w)){on=0,Hr=null,rw(o);break}o=function(){on!==2&&on!==9||gn!==i||(on=7),Oi(i)},w.then(o,o);break e;case 3:on=7;break e;case 4:on=5;break e;case 7:d0(w)?(on=0,Hr=null,rw(o)):(on=0,Hr=null,Ga(i,o,w,7));break;case 5:var M=null;switch(Bt.tag){case 26:M=Bt.memoizedState;case 5:case 27:var G=Bt;if(M?Uw(M):G.stateNode.complete){on=0,Hr=null;var Q=G.sibling;if(Q!==null)Bt=Q;else{var pe=G.return;pe!==null?(Bt=pe,rd(pe)):Bt=null}break t}}on=0,Hr=null,Ga(i,o,w,5);break;case 6:on=0,Hr=null,Ga(i,o,w,6);break;case 8:Eg(),On=6;break e;default:throw Error(r(462))}}gL();break}catch(Te){QS(i,Te)}while(!0);return ns=Io=null,U.H=p,U.A=x,tn=u,Bt!==null?0:(gn=null,Ht=0,Sf(),On)}function gL(){for(;Bt!==null&&!be();)nw(Bt)}function nw(i){var o=RS(i.alternate,i,ds);i.memoizedProps=i.pendingProps,o===null?rd(i):Bt=o}function rw(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=xS(u,o,o.pendingProps,o.type,void 0,Ht);break;case 11:o=xS(u,o,o.pendingProps,o.type.render,o.ref,Ht);break;case 5:Bm(o);default:_S(u,o),o=Bt=t0(o,ds),o=RS(u,o,ds)}i.memoizedProps=i.pendingProps,o===null?rd(i):Bt=o}function Ga(i,o,u,p){ns=Io=null,Bm(o),Da=null,iu=0;var x=o.return;try{if(iL(i,x,o,u,Ht)){On=1,Hf(i,ei(u,i.current)),Bt=null;return}}catch(w){if(x!==null)throw Bt=x,w;On=1,Hf(i,ei(u,i.current)),Bt=null;return}o.flags&32768?(Wt||p===1?i=!0:Fa||(Ht&536870912)!==0?i=!1:(Gs=i=!0,(p===2||p===9||p===3||p===6)&&(p=Ur.current,p!==null&&p.tag===13&&(p.flags|=16384))),iw(o,i)):rd(o)}function rd(i){var o=i;do{if((o.flags&32768)!==0){iw(o,Gs);return}i=o.return;var u=aL(o.alternate,o,ds);if(u!==null){Bt=u;return}if(o=o.sibling,o!==null){Bt=o;return}Bt=o=i}while(o!==null);On===0&&(On=5)}function iw(i,o){do{var u=lL(i.alternate,i);if(u!==null){u.flags&=32767,Bt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){Bt=i;return}Bt=i=u}while(i!==null);On=6,Bt=null}function sw(i,o,u,p,x,w,M,G,Q){i.cancelPendingCommit=null;do id();while(Gn!==0);if((tn&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=pm,qe(i,u,w,M,G,Q),i===gn&&(Bt=gn=null,Ht=0),qa=o,Ks=i,ps=u,kg=w,Sg=x,KS=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,xL(xe,function(){return cw(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=U.T,U.T=null,x=W.p,W.p=2,M=tn,tn|=4;try{uL(i,o,u)}finally{tn=M,W.p=x,U.T=p}}Gn=1,ow(),aw(),lw()}}function ow(){if(Gn===1){Gn=0;var i=Ks,o=qa,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=U.T,U.T=null;var p=W.p;W.p=2;var x=tn;tn|=4;try{BS(o,i);var w=zg,M=Vk(i.containerInfo),G=w.focusedElem,Q=w.selectionRange;if(M!==G&&G&&G.ownerDocument&&Gk(G.ownerDocument.documentElement,G)){if(Q!==null&&lm(G)){var pe=Q.start,Te=Q.end;if(Te===void 0&&(Te=pe),"selectionStart"in G)G.selectionStart=pe,G.selectionEnd=Math.min(Te,G.value.length);else{var Ae=G.ownerDocument||document,me=Ae&&Ae.defaultView||window;if(me.getSelection){var ve=me.getSelection(),Je=G.textContent.length,gt=Math.min(Q.start,Je),fn=Q.end===void 0?gt:Math.min(Q.end,Je);!ve.extend&>>fn&&(M=fn,fn=gt,gt=M);var ae=Hk(G,gt),ie=Hk(G,fn);if(ae&&ie&&(ve.rangeCount!==1||ve.anchorNode!==ae.node||ve.anchorOffset!==ae.offset||ve.focusNode!==ie.node||ve.focusOffset!==ie.offset)){var de=Ae.createRange();de.setStart(ae.node,ae.offset),ve.removeAllRanges(),gt>fn?(ve.addRange(de),ve.extend(ie.node,ie.offset)):(de.setEnd(ie.node,ie.offset),ve.addRange(de))}}}}for(Ae=[],ve=G;ve=ve.parentNode;)ve.nodeType===1&&Ae.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Ae.length;G++){var Ce=Ae[G];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}gd=!!Lg,zg=Lg=null}finally{tn=x,W.p=p,U.T=u}}i.current=o,Gn=2}}function aw(){if(Gn===2){Gn=0;var i=Ks,o=qa,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=U.T,U.T=null;var p=W.p;W.p=2;var x=tn;tn|=4;try{jS(i,o.alternate,o)}finally{tn=x,W.p=p,U.T=u}}Gn=3}}function lw(){if(Gn===4||Gn===3){Gn=0,Re();var i=Ks,o=qa,u=ps,p=KS;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Gn=5:(Gn=0,qa=Ks=null,uw(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(Ws=null),Ie(u),o=o.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(Qe,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=U.T,x=W.p,W.p=2,U.T=null;try{for(var w=i.onRecoverableError,M=0;M<p.length;M++){var G=p[M];w(G.value,{componentStack:G.stack})}}finally{U.T=o,W.p=x}}(ps&3)!==0&&id(),Oi(i),x=i.pendingLanes,(u&261930)!==0&&(x&42)!==0?i===wg?ku++:(ku=0,wg=i):ku=0,Su(0)}}function uw(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,nu(o)))}function id(){return ow(),aw(),lw(),cw()}function cw(){if(Gn!==5)return!1;var i=Ks,o=kg;kg=0;var u=Ie(ps),p=U.T,x=W.p;try{W.p=32>u?32:u,U.T=null,u=Sg,Sg=null;var w=Ks,M=ps;if(Gn=0,qa=Ks=null,ps=0,(tn&6)!==0)throw Error(r(331));var G=tn;if(tn|=4,GS(w.current),US(w,w.current,M,u),tn=G,Su(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(Qe,w)}catch{}return!0}finally{W.p=x,U.T=p,uw(i,o)}}function fw(i,o,u){o=ei(u,o),o=tg(i.stateNode,o,2),i=Fs(i,o,2),i!==null&&(at(i,2),Oi(i))}function an(i,o,u){if(i.tag===3)fw(i,i,u);else for(;o!==null;){if(o.tag===3){fw(o,i,u);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Ws===null||!Ws.has(p))){i=ei(u,i),u=dS(2),p=Fs(o,u,2),p!==null&&(pS(u,p,o,i),at(p,2),Oi(p));break}}o=o.return}}function Rg(i,o,u){var p=i.pingCache;if(p===null){p=i.pingCache=new dL;var x=new Set;p.set(o,x)}else x=p.get(o),x===void 0&&(x=new Set,p.set(o,x));x.has(u)||(yg=!0,x.add(u),i=bL.bind(null,i,o,u),o.then(i,i))}function bL(i,o,u){var p=i.pingCache;p!==null&&p.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,gn===i&&(Ht&u)===u&&(On===4||On===3&&(Ht&62914560)===Ht&&300>ee()-Qf?(tn&2)===0&&Ha(i,0):vg|=u,Ua===Ht&&(Ua=0)),Oi(i)}function dw(i,o){o===0&&(o=Ze()),i=Ao(i,o),i!==null&&(at(i,o),Oi(i))}function yL(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),dw(i,u)}function vL(i,o){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,x=i.memoizedState;x!==null&&(u=x.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(o),dw(i,u)}function xL(i,o){return je(i,o)}var sd=null,Va=null,Cg=!1,od=!1,_g=!1,Xs=0;function Oi(i){i!==Va&&i.next===null&&(Va===null?sd=Va=i:Va=Va.next=i),od=!0,Cg||(Cg=!0,SL())}function Su(i,o){if(!_g&&od){_g=!0;do for(var u=!1,p=sd;p!==null;){if(i!==0){var x=p.pendingLanes;if(x===0)var w=0;else{var M=p.suspendedLanes,G=p.pingedLanes;w=(1<<31-nt(42|i)+1)-1,w&=x&~(M&~G),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,gw(p,w))}else w=Ht,w=X(p,p===gn?w:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(w&3)===0||he(p,w)||(u=!0,gw(p,w));p=p.next}while(u);_g=!1}}function kL(){pw()}function pw(){od=Cg=!1;var i=0;Xs!==0&&ML()&&(i=Xs);for(var o=ee(),u=null,p=sd;p!==null;){var x=p.next,w=hw(p,o);w===0?(p.next=null,u===null?sd=x:u.next=x,x===null&&(Va=u)):(u=p,(i!==0||(w&3)!==0)&&(od=!0)),p=x}Gn!==0&&Gn!==5||Su(i),Xs!==0&&(Xs=0)}function hw(i,o){for(var u=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var M=31-nt(w),G=1<<M,Q=x[M];Q===-1?((G&u)===0||(G&p)!==0)&&(x[M]=Le(G,o)):Q<=o&&(i.expiredLanes|=G),w&=~G}if(o=gn,u=Ht,u=X(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===o&&(on===2||on===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&He(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||he(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(p!==null&&He(p),Ie(u)){case 2:case 8:u=re;break;case 32:u=xe;break;case 268435456:u=Xe;break;default:u=xe}return p=mw.bind(null,i),u=je(u,p),i.callbackPriority=o,i.callbackNode=u,o}return p!==null&&p!==null&&He(p),i.callbackPriority=2,i.callbackNode=null,2}function mw(i,o){if(Gn!==0&&Gn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(id()&&i.callbackNode!==u)return null;var p=Ht;return p=X(i,i===gn?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(XS(i,p,o),hw(i,ee()),i.callbackNode!=null&&i.callbackNode===u?mw.bind(null,i):null)}function gw(i,o){if(id())return null;XS(i,o,!0)}function SL(){DL(function(){(tn&6)!==0?je(J,kL):pw()})}function Ng(){if(Xs===0){var i=Oa;i===0&&(i=vt,vt<<=1,(vt&261888)===0&&(vt=256)),Xs=i}return Xs}function bw(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Is(""+i)}function yw(i,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,i.id&&u.setAttribute("form",i.id),o.parentNode.insertBefore(u,o),i=new FormData(i),u.parentNode.removeChild(u),i}function wL(i,o,u,p,x){if(o==="submit"&&u&&u.stateNode===x){var w=bw((x[$t]||null).action),M=p.submitter;M&&(o=(o=M[$t]||null)?bw(o.formAction):M.getAttribute("formAction"),o!==null&&(w=o,M=null));var G=new yf("action","action",null,p,x);i.push({event:G,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Xs!==0){var Q=M?yw(x,M):new FormData(x);Ym(u,{pending:!0,data:Q,method:x.method,action:w},null,Q)}}else typeof w=="function"&&(G.preventDefault(),Q=M?yw(x,M):new FormData(x),Ym(u,{pending:!0,data:Q,method:x.method,action:w},w,Q))},currentTarget:x}]})}}for(var Ag=0;Ag<dm.length;Ag++){var Og=dm[Ag],EL=Og.toLowerCase(),TL=Og[0].toUpperCase()+Og.slice(1);bi(EL,"on"+TL)}bi(Yk,"onAnimationEnd"),bi(Xk,"onAnimationIteration"),bi(Zk,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(Fj,"onTransitionRun"),bi(Uj,"onTransitionStart"),bi(qj,"onTransitionCancel"),bi(Qk,"onTransitionEnd"),Pe("onMouseEnter",["mouseout","mouseover"]),Pe("onMouseLeave",["mouseout","mouseover"]),Pe("onPointerEnter",["pointerout","pointerover"]),Pe("onPointerLeave",["pointerout","pointerover"]),Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wu="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(" "),RL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wu));function vw(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],x=p.event;p=p.listeners;e:{var w=void 0;if(o)for(var M=p.length-1;0<=M;M--){var G=p[M],Q=G.instance,pe=G.currentTarget;if(G=G.listener,Q!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Te){kf(Te)}x.currentTarget=null,w=Q}else for(M=0;M<p.length;M++){if(G=p[M],Q=G.instance,pe=G.currentTarget,G=G.listener,Q!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Te){kf(Te)}x.currentTarget=null,w=Q}}}}function Ft(i,o){var u=o[Lr];u===void 0&&(u=o[Lr]=new Set);var p=i+"__bubble";u.has(p)||(xw(o,i,2,!1),u.add(p))}function Mg(i,o,u){var p=0;o&&(p|=4),xw(u,i,p,o)}var ad="_reactListening"+Math.random().toString(36).slice(2);function Ig(i){if(!i[ad]){i[ad]=!0,cf.forEach(function(u){u!=="selectionchange"&&(RL.has(u)||Mg(u,!1,i),Mg(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[ad]||(o[ad]=!0,Mg("selectionchange",!1,o))}}function xw(i,o,u,p){switch(Yw(o)){case 2:var x=ez;break;case 8:x=tz;break;default:x=Kg}u=x.bind(null,o,u,i),x=void 0,!Jh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(x=!0),p?x!==void 0?i.addEventListener(o,u,{capture:!0,passive:x}):i.addEventListener(o,u,!0):x!==void 0?i.addEventListener(o,u,{passive:x}):i.addEventListener(o,u,!1)}function Dg(i,o,u,p,x){var w=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var M=p.tag;if(M===3||M===4){var G=p.stateNode.containerInfo;if(G===x)break;if(M===4)for(M=p.return;M!==null;){var Q=M.tag;if((Q===3||Q===4)&&M.stateNode.containerInfo===x)return;M=M.return}for(;G!==null;){if(M=hr(G),M===null)return;if(Q=M.tag,Q===5||Q===6||Q===26||Q===27){p=w=M;continue e}G=G.parentNode}}p=p.return}hf(function(){var pe=w,Te=Ct(u),Ae=[];e:{var me=Jk.get(i);if(me!==void 0){var ve=yf,Je=i;switch(i){case"keypress":if(gf(u)===0)break e;case"keydown":case"keyup":ve=vj;break;case"focusin":Je="focus",ve=rm;break;case"focusout":Je="blur",ve=rm;break;case"beforeblur":case"afterblur":ve=rm;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=_k;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=aj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=Sj;break;case Yk:case Xk:case Zk:ve=cj;break;case Qk:ve=Ej;break;case"scroll":case"scrollend":ve=sj;break;case"wheel":ve=Rj;break;case"copy":case"cut":case"paste":ve=dj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=Ak;break;case"toggle":case"beforetoggle":ve=_j}var gt=(o&4)!==0,fn=!gt&&(i==="scroll"||i==="scrollend"),ae=gt?me!==null?me+"Capture":null:me;gt=[];for(var ie=pe,de;ie!==null;){var Ce=ie;if(de=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||de===null||ae===null||(Ce=Gl(ie,ae),Ce!=null&>.push(Eu(ie,Ce,de))),fn)break;ie=ie.return}0<gt.length&&(me=new ve(me,Je,null,u,Te),Ae.push({event:me,listeners:gt}))}}if((o&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",me&&u!==rt&&(Je=u.relatedTarget||u.fromElement)&&(hr(Je)||Je[Rn]))break e;if((ve||me)&&(me=Te.window===Te?Te:(me=Te.ownerDocument)?me.defaultView||me.parentWindow:window,ve?(Je=u.relatedTarget||u.toElement,ve=pe,Je=Je?hr(Je):null,Je!==null&&(fn=a(Je),gt=Je.tag,Je!==fn||gt!==5&>!==27&>!==6)&&(Je=null)):(ve=null,Je=pe),ve!==Je)){if(gt=_k,Ce="onMouseLeave",ae="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(gt=Ak,Ce="onPointerLeave",ae="onPointerEnter",ie="pointer"),fn=ve==null?me:As(ve),de=Je==null?me:As(Je),me=new gt(Ce,ie+"leave",ve,u,Te),me.target=fn,me.relatedTarget=de,Ce=null,hr(Te)===pe&&(gt=new gt(ae,ie+"enter",Je,u,Te),gt.target=de,gt.relatedTarget=fn,Ce=gt),fn=Ce,ve&&Je)t:{for(gt=CL,ae=ve,ie=Je,de=0,Ce=ae;Ce;Ce=gt(Ce))de++;Ce=0;for(var lt=ie;lt;lt=gt(lt))Ce++;for(;0<de-Ce;)ae=gt(ae),de--;for(;0<Ce-de;)ie=gt(ie),Ce--;for(;de--;){if(ae===ie||ie!==null&&ae===ie.alternate){gt=ae;break t}ae=gt(ae),ie=gt(ie)}gt=null}else gt=null;ve!==null&&kw(Ae,me,ve,gt,!1),Je!==null&&fn!==null&&kw(Ae,fn,Je,gt,!0)}}e:{if(me=pe?As(pe):window,ve=me.nodeName&&me.nodeName.toLowerCase(),ve==="select"||ve==="input"&&me.type==="file")var Qt=Pk;else if(Lk(me))if($k)Qt=Pj;else{Qt=Lj;var it=jj}else ve=me.nodeName,!ve||ve.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?pe&&Ms(pe.elementType)&&(Qt=Pk):Qt=zj;if(Qt&&(Qt=Qt(i,pe))){zk(Ae,Qt,u,Te);break e}it&&it(i,me,pe),i==="focusout"&&pe&&me.type==="number"&&pe.memoizedProps.value!=null&&xa(me,"number",me.value)}switch(it=pe?As(pe):window,i){case"focusin":(Lk(it)||it.contentEditable==="true")&&(wa=it,um=pe,Jl=null);break;case"focusout":Jl=um=wa=null;break;case"mousedown":cm=!0;break;case"contextmenu":case"mouseup":case"dragend":cm=!1,Wk(Ae,u,Te);break;case"selectionchange":if(Bj)break;case"keydown":case"keyup":Wk(Ae,u,Te)}var Ot;if(sm)e:{switch(i){case"compositionstart":var Gt="onCompositionStart";break e;case"compositionend":Gt="onCompositionEnd";break e;case"compositionupdate":Gt="onCompositionUpdate";break e}Gt=void 0}else Sa?Dk(i,u)&&(Gt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Gt="onCompositionStart");Gt&&(Ok&&u.locale!=="ko"&&(Sa||Gt!=="onCompositionStart"?Gt==="onCompositionEnd"&&Sa&&(Ot=Rk()):(Ds=Te,em="value"in Ds?Ds.value:Ds.textContent,Sa=!0)),it=ld(pe,Gt),0<it.length&&(Gt=new Nk(Gt,i,null,u,Te),Ae.push({event:Gt,listeners:it}),Ot?Gt.data=Ot:(Ot=jk(u),Ot!==null&&(Gt.data=Ot)))),(Ot=Aj?Oj(i,u):Mj(i,u))&&(Gt=ld(pe,"onBeforeInput"),0<Gt.length&&(it=new Nk("onBeforeInput","beforeinput",null,u,Te),Ae.push({event:it,listeners:Gt}),it.data=Ot)),wL(Ae,i,pe,u,Te)}vw(Ae,o)})}function Eu(i,o,u){return{instance:i,listener:o,currentTarget:u}}function ld(i,o){for(var u=o+"Capture",p=[];i!==null;){var x=i,w=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||w===null||(x=Gl(i,u),x!=null&&p.unshift(Eu(i,x,w)),x=Gl(i,o),x!=null&&p.push(Eu(i,x,w))),i.tag===3)return p;i=i.return}return[]}function CL(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function kw(i,o,u,p,x){for(var w=o._reactName,M=[];u!==null&&u!==p;){var G=u,Q=G.alternate,pe=G.stateNode;if(G=G.tag,Q!==null&&Q===p)break;G!==5&&G!==26&&G!==27||pe===null||(Q=pe,x?(pe=Gl(u,w),pe!=null&&M.unshift(Eu(u,pe,Q))):x||(pe=Gl(u,w),pe!=null&&M.push(Eu(u,pe,Q)))),u=u.return}M.length!==0&&i.push({event:o,listeners:M})}var _L=/\r\n?/g,NL=/\u0000|\uFFFD/g;function Sw(i){return(typeof i=="string"?i:""+i).replace(_L,`
|
|
9
|
+
`).replace(NL,"")}function ww(i,o){return o=Sw(o),Sw(i)===o}function cn(i,o,u,p,x,w){switch(u){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||bt(i,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&bt(i,""+p);break;case"className":Pr(i,"class",p);break;case"tabIndex":Pr(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Pr(i,u,p);break;case"style":sn(i,p,w);break;case"data":if(o!=="object"){Pr(i,"data",p);break}case"src":case"href":if(p===""&&(o!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Is(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(u,"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 w=="function"&&(u==="formAction"?(o!=="input"&&cn(i,o,"name",x.name,x,null),cn(i,o,"formEncType",x.formEncType,x,null),cn(i,o,"formMethod",x.formMethod,x,null),cn(i,o,"formTarget",x.formTarget,x,null)):(cn(i,o,"encType",x.encType,x,null),cn(i,o,"method",x.method,x,null),cn(i,o,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Is(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=Ve);break;case"onScroll":p!=null&&Ft("scroll",i);break;case"onScrollEnd":p!=null&&Ft("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=Is(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""+p):i.removeAttribute(u);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":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":Ft("beforetoggle",i),Ft("toggle",i),rr(i,"popover",p);break;case"xlinkActuate":kr(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":kr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":kr(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":kr(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":kr(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":kr(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":kr(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":kr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":kr(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":rr(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Qi.get(u)||u,rr(i,u,p))}}function jg(i,o,u,p,x,w){switch(u){case"style":sn(i,p,w);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof p=="string"?bt(i,p):(typeof p=="number"||typeof p=="bigint")&&bt(i,""+p);break;case"onScroll":p!=null&&Ft("scroll",i);break;case"onScrollEnd":p!=null&&Ft("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ve);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!To.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),o=u.slice(2,x?u.length-7:void 0),w=i[$t]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(o,w,x),typeof p=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(o,p,x);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):rr(i,u,p)}}}function er(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ft("error",i),Ft("load",i);var p=!1,x=!1,w;for(w in u)if(u.hasOwnProperty(w)){var M=u[w];if(M!=null)switch(w){case"src":p=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:cn(i,o,w,M,u,null)}}x&&cn(i,o,"srcSet",u.srcSet,u,null),p&&cn(i,o,"src",u.src,u,null);return;case"input":Ft("invalid",i);var G=w=M=x=null,Q=null,pe=null;for(p in u)if(u.hasOwnProperty(p)){var Te=u[p];if(Te!=null)switch(p){case"name":x=Te;break;case"type":M=Te;break;case"checked":Q=Te;break;case"defaultChecked":pe=Te;break;case"value":w=Te;break;case"defaultValue":G=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,o));break;default:cn(i,o,p,Te,u,null)}}Ro(i,w,G,Q,pe,M,x,!1);return;case"select":Ft("invalid",i),p=M=w=null;for(x in u)if(u.hasOwnProperty(x)&&(G=u[x],G!=null))switch(x){case"value":w=G;break;case"defaultValue":M=G;break;case"multiple":p=G;default:cn(i,o,x,G,u,null)}o=w,u=M,i.multiple=!!p,o!=null?Xn(i,!!p,o,!1):u!=null&&Xn(i,!!p,u,!0);return;case"textarea":Ft("invalid",i),w=x=p=null;for(M in u)if(u.hasOwnProperty(M)&&(G=u[M],G!=null))switch(M){case"value":p=G;break;case"defaultValue":x=G;break;case"children":w=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(91));break;default:cn(i,o,M,G,u,null)}ka(i,p,x,w);return;case"option":for(Q in u)u.hasOwnProperty(Q)&&(p=u[Q],p!=null)&&(Q==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":cn(i,o,Q,p,u,null));return;case"dialog":Ft("beforetoggle",i),Ft("toggle",i),Ft("cancel",i),Ft("close",i);break;case"iframe":case"object":Ft("load",i);break;case"video":case"audio":for(p=0;p<wu.length;p++)Ft(wu[p],i);break;case"image":Ft("error",i),Ft("load",i);break;case"details":Ft("toggle",i);break;case"embed":case"source":case"link":Ft("error",i),Ft("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(pe in u)if(u.hasOwnProperty(pe)&&(p=u[pe],p!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:cn(i,o,pe,p,u,null)}return;default:if(Ms(o)){for(Te in u)u.hasOwnProperty(Te)&&(p=u[Te],p!==void 0&&jg(i,o,Te,p,u,void 0));return}}for(G in u)u.hasOwnProperty(G)&&(p=u[G],p!=null&&cn(i,o,G,p,u,null))}function AL(i,o,u,p){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,w=null,M=null,G=null,Q=null,pe=null,Te=null;for(ve in u){var Ae=u[ve];if(u.hasOwnProperty(ve)&&Ae!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":Q=Ae;default:p.hasOwnProperty(ve)||cn(i,o,ve,null,p,Ae)}}for(var me in p){var ve=p[me];if(Ae=u[me],p.hasOwnProperty(me)&&(ve!=null||Ae!=null))switch(me){case"type":w=ve;break;case"name":x=ve;break;case"checked":pe=ve;break;case"defaultChecked":Te=ve;break;case"value":M=ve;break;case"defaultValue":G=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,o));break;default:ve!==Ae&&cn(i,o,me,ve,p,Ae)}}Ul(i,M,G,Q,pe,Te,w,x);return;case"select":ve=M=G=me=null;for(w in u)if(Q=u[w],u.hasOwnProperty(w)&&Q!=null)switch(w){case"value":break;case"multiple":ve=Q;default:p.hasOwnProperty(w)||cn(i,o,w,null,p,Q)}for(x in p)if(w=p[x],Q=u[x],p.hasOwnProperty(x)&&(w!=null||Q!=null))switch(x){case"value":me=w;break;case"defaultValue":G=w;break;case"multiple":M=w;default:w!==Q&&cn(i,o,x,w,p,Q)}o=G,u=M,p=ve,me!=null?Xn(i,!!u,me,!1):!!p!=!!u&&(o!=null?Xn(i,!!u,o,!0):Xn(i,!!u,u?[]:"",!1));return;case"textarea":ve=me=null;for(G in u)if(x=u[G],u.hasOwnProperty(G)&&x!=null&&!p.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:cn(i,o,G,null,p,x)}for(M in p)if(x=p[M],w=u[M],p.hasOwnProperty(M)&&(x!=null||w!=null))switch(M){case"value":me=x;break;case"defaultValue":ve=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==w&&cn(i,o,M,x,p,w)}df(i,me,ve);return;case"option":for(var Je in u)me=u[Je],u.hasOwnProperty(Je)&&me!=null&&!p.hasOwnProperty(Je)&&(Je==="selected"?i.selected=!1:cn(i,o,Je,null,p,me));for(Q in p)me=p[Q],ve=u[Q],p.hasOwnProperty(Q)&&me!==ve&&(me!=null||ve!=null)&&(Q==="selected"?i.selected=me&&typeof me!="function"&&typeof me!="symbol":cn(i,o,Q,me,p,ve));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 gt in u)me=u[gt],u.hasOwnProperty(gt)&&me!=null&&!p.hasOwnProperty(gt)&&cn(i,o,gt,null,p,me);for(pe in p)if(me=p[pe],ve=u[pe],p.hasOwnProperty(pe)&&me!==ve&&(me!=null||ve!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,o));break;default:cn(i,o,pe,me,p,ve)}return;default:if(Ms(o)){for(var fn in u)me=u[fn],u.hasOwnProperty(fn)&&me!==void 0&&!p.hasOwnProperty(fn)&&jg(i,o,fn,void 0,p,me);for(Te in p)me=p[Te],ve=u[Te],!p.hasOwnProperty(Te)||me===ve||me===void 0&&ve===void 0||jg(i,o,Te,me,p,ve);return}}for(var ae in u)me=u[ae],u.hasOwnProperty(ae)&&me!=null&&!p.hasOwnProperty(ae)&&cn(i,o,ae,null,p,me);for(Ae in p)me=p[Ae],ve=u[Ae],!p.hasOwnProperty(Ae)||me===ve||me==null&&ve==null||cn(i,o,Ae,me,p,ve)}function Ew(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OL(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var x=u[p],w=x.transferSize,M=x.initiatorType,G=x.duration;if(w&&G&&Ew(M)){for(M=0,G=x.responseEnd,p+=1;p<u.length;p++){var Q=u[p],pe=Q.startTime;if(pe>G)break;var Te=Q.transferSize,Ae=Q.initiatorType;Te&&Ew(Ae)&&(Q=Q.responseEnd,M+=Te*(Q<G?1:(G-pe)/(Q-pe)))}if(--p,o+=8*(w+M)/(x.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Lg=null,zg=null;function ud(i){return i.nodeType===9?i:i.ownerDocument}function Tw(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Rw(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function Pg(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var $g=null;function ML(){var i=window.event;return i&&i.type==="popstate"?i===$g?!1:($g=i,!0):($g=null,!1)}var Cw=typeof setTimeout=="function"?setTimeout:void 0,IL=typeof clearTimeout=="function"?clearTimeout:void 0,_w=typeof Promise=="function"?Promise:void 0,DL=typeof queueMicrotask=="function"?queueMicrotask:typeof _w<"u"?function(i){return _w.resolve(null).then(i).catch(jL)}:Cw;function jL(i){setTimeout(function(){throw i})}function Zs(i){return i==="head"}function Nw(i,o){var u=o,p=0;do{var x=u.nextSibling;if(i.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(x),Xa(o);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")Tu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Tu(u);for(var w=u.firstChild;w;){var M=w.nextSibling,G=w.nodeName;w[Yi]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=M}}else u==="body"&&Tu(i.ownerDocument.body);u=x}while(u);Xa(o)}function Aw(i,o){var u=i;i=0;do{var p=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function Bg(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Bg(u),Eo(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function LL(i,o,u,p){for(;i.nodeType===1;){var x=u;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Yi])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==x.rel||i.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||i.getAttribute("title")!==(x.title==null?null:x.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(x.src==null?null:x.src)||i.getAttribute("type")!==(x.type==null?null:x.type)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var w=x.name==null?null:""+x.name;if(x.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=si(i.nextSibling),i===null)break}return null}function zL(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=si(i.nextSibling),i===null))return null;return i}function Ow(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=si(i.nextSibling),i===null))return null;return i}function Fg(i){return i.data==="$?"||i.data==="$~"}function Ug(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function PL(i,o){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||u.readyState!=="loading")o();else{var p=function(){o(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function si(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var qg=null;function Mw(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return si(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function Iw(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return i;o--}else u!=="/$"&&u!=="/&"||o++}i=i.previousSibling}return null}function Dw(i,o,u){switch(o=ud(u),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Tu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Eo(i)}var oi=new Map,jw=new Set;function cd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var hs=W.d;W.d={f:$L,r:BL,D:FL,C:UL,L:qL,m:HL,X:VL,S:GL,M:WL};function $L(){var i=hs.f(),o=td();return i||o}function BL(i){var o=Xi(i);o!==null&&o.tag===5&&o.type==="form"?Q0(o):hs.r(i)}var Wa=typeof document>"u"?null:document;function Lw(i,o,u){var p=Wa;if(p&&typeof o=="string"&&o){var x=Sr(o);x='link[rel="'+i+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),jw.has(x)||(jw.add(x),i={rel:i,crossOrigin:u,href:o},p.querySelector(x)===null&&(o=p.createElement("link"),er(o,"link",i),zn(o),p.head.appendChild(o)))}}function FL(i){hs.D(i),Lw("dns-prefetch",i,null)}function UL(i,o){hs.C(i,o),Lw("preconnect",i,o)}function qL(i,o,u){hs.L(i,o,u);var p=Wa;if(p&&i&&o){var x='link[rel="preload"][as="'+Sr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+Sr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+Sr(u.imageSizes)+'"]')):x+='[href="'+Sr(i)+'"]';var w=x;switch(o){case"style":w=Ka(i);break;case"script":w=Ya(i)}oi.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),oi.set(w,i),p.querySelector(x)!==null||o==="style"&&p.querySelector(Ru(w))||o==="script"&&p.querySelector(Cu(w))||(o=p.createElement("link"),er(o,"link",i),zn(o),p.head.appendChild(o)))}}function HL(i,o){hs.m(i,o);var u=Wa;if(u&&i){var p=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+Sr(p)+'"][href="'+Sr(i)+'"]',w=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Ya(i)}if(!oi.has(w)&&(i=m({rel:"modulepreload",href:i},o),oi.set(w,i),u.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Cu(w)))return}p=u.createElement("link"),er(p,"link",i),zn(p),u.head.appendChild(p)}}}function GL(i,o,u){hs.S(i,o,u);var p=Wa;if(p&&i){var x=Os(p).hoistableStyles,w=Ka(i);o=o||"default";var M=x.get(w);if(!M){var G={loading:0,preload:null};if(M=p.querySelector(Ru(w)))G.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=oi.get(w))&&Hg(i,u);var Q=M=p.createElement("link");zn(Q),er(Q,"link",i),Q._p=new Promise(function(pe,Te){Q.onload=pe,Q.onerror=Te}),Q.addEventListener("load",function(){G.loading|=1}),Q.addEventListener("error",function(){G.loading|=2}),G.loading|=4,fd(M,o,p)}M={type:"stylesheet",instance:M,count:1,state:G},x.set(w,M)}}}function VL(i,o){hs.X(i,o);var u=Wa;if(u&&i){var p=Os(u).hoistableScripts,x=Ya(i),w=p.get(x);w||(w=u.querySelector(Cu(x)),w||(i=m({src:i,async:!0},o),(o=oi.get(x))&&Gg(i,o),w=u.createElement("script"),zn(w),er(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function WL(i,o){hs.M(i,o);var u=Wa;if(u&&i){var p=Os(u).hoistableScripts,x=Ya(i),w=p.get(x);w||(w=u.querySelector(Cu(x)),w||(i=m({src:i,async:!0,type:"module"},o),(o=oi.get(x))&&Gg(i,o),w=u.createElement("script"),zn(w),er(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function zw(i,o,u,p){var x=(x=se.current)?cd(x):null;if(!x)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=Ka(u.href),u=Os(x).hoistableStyles,p=u.get(o),p||(p={type:"style",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Ka(u.href);var w=Os(x).hoistableStyles,M=w.get(i);if(M||(x=x.ownerDocument||x,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,M),(w=x.querySelector(Ru(i)))&&!w._p&&(M.instance=w,M.state.loading=5),oi.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},oi.set(i,u),w||KL(x,i,u,M.state))),o&&p===null)throw Error(r(528,""));return M}if(o&&p!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Ya(u),u=Os(x).hoistableScripts,p=u.get(o),p||(p={type:"script",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Ka(i){return'href="'+Sr(i)+'"'}function Ru(i){return'link[rel="stylesheet"]['+i+"]"}function Pw(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function KL(i,o,u,p){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?p.loading=1:(o=i.createElement("link"),p.preload=o,o.addEventListener("load",function(){return p.loading|=1}),o.addEventListener("error",function(){return p.loading|=2}),er(o,"link",u),zn(o),i.head.appendChild(o))}function Ya(i){return'[src="'+Sr(i)+'"]'}function Cu(i){return"script[async]"+i}function $w(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var p=i.querySelector('style[data-href~="'+Sr(u.href)+'"]');if(p)return o.instance=p,zn(p),p;var x=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),zn(p),er(p,"style",x),fd(p,u.precedence,i),o.instance=p;case"stylesheet":x=Ka(u.href);var w=i.querySelector(Ru(x));if(w)return o.state.loading|=4,o.instance=w,zn(w),w;p=Pw(u),(x=oi.get(x))&&Hg(p,x),w=(i.ownerDocument||i).createElement("link"),zn(w);var M=w;return M._p=new Promise(function(G,Q){M.onload=G,M.onerror=Q}),er(w,"link",p),o.state.loading|=4,fd(w,u.precedence,i),o.instance=w;case"script":return w=Ya(u.src),(x=i.querySelector(Cu(w)))?(o.instance=x,zn(x),x):(p=u,(x=oi.get(w))&&(p=m({},u),Gg(p,x)),i=i.ownerDocument||i,x=i.createElement("script"),zn(x),er(x,"link",p),i.head.appendChild(x),o.instance=x);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(p=o.instance,o.state.loading|=4,fd(p,u.precedence,i));return o.instance}function fd(i,o,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=p.length?p[p.length-1]:null,w=x,M=0;M<p.length;M++){var G=p[M];if(G.dataset.precedence===o)w=G;else if(w!==x)break}w?w.parentNode.insertBefore(i,w.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function Hg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Gg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var dd=null;function Bw(i,o,u){if(dd===null){var p=new Map,x=dd=new Map;x.set(u,p)}else x=dd,p=x.get(u),p||(p=new Map,x.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),x=0;x<u.length;x++){var w=u[x];if(!(w[Yi]||w[wt]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var M=w.getAttribute(o)||"";M=i+M;var G=p.get(M);G?G.push(w):p.set(M,[w])}}return p}function Fw(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function YL(i,o,u){if(u===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Uw(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function XL(i,o,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=Ka(p.href),w=o.querySelector(Ru(x));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=pd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,zn(w);return}w=o.ownerDocument||o,p=Pw(p),(x=oi.get(x))&&Hg(p,x),w=w.createElement("link"),zn(w);var M=w;M._p=new Promise(function(G,Q){M.onload=G,M.onerror=Q}),er(w,"link",p),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=pd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var Vg=0;function ZL(i,o){return i.stylesheets&&i.count===0&&md(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&md(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&Vg===0&&(Vg=62500*OL());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&md(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>Vg?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function pd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)md(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var hd=null;function md(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,hd=new Map,o.forEach(QL,i),hd=null,pd.call(i))}function QL(i,o){if(!(o.state.loading&4)){var u=hd.get(i);if(u)var p=u.get(null);else{u=new Map,hd.set(i,u);for(var x=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<x.length;w++){var M=x[w];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),p=M)}p&&u.set(null,p)}x=o.instance,M=x.getAttribute("data-precedence"),w=u.get(M)||p,w===p&&u.set(null,x),u.set(M,x),this.count++,p=pd.bind(this),x.addEventListener("load",p),x.addEventListener("error",p),w?w.parentNode.insertBefore(x,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(x,i.firstChild)),o.state.loading|=4}}var _u={$$typeof:C,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function JL(i,o,u,p,x,w,M,G,Q){this.tag=1,this.containerInfo=i,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=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=w,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function qw(i,o,u,p,x,w,M,G,Q,pe,Te,Ae){return i=new JL(i,o,u,M,Q,pe,Te,Ae,G),o=1,w===!0&&(o|=24),w=Fr(3,null,null,o),i.current=w,w.stateNode=i,o=Tm(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:p,isDehydrated:u,cache:o},Nm(w),i}function Hw(i){return i?(i=Ra,i):Ra}function Gw(i,o,u,p,x,w){x=Hw(x),p.context===null?p.context=x:p.pendingContext=x,p=Bs(o),p.payload={element:u},w=w===void 0?null:w,w!==null&&(p.callback=w),u=Fs(i,p,o),u!==null&&(_r(u,i,o),ou(u,i,o))}function Vw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Wg(i,o){Vw(i,o),(i=i.alternate)&&Vw(i,o)}function Ww(i){if(i.tag===13||i.tag===31){var o=Ao(i,67108864);o!==null&&_r(o,i,67108864),Wg(i,67108864)}}function Kw(i){if(i.tag===13||i.tag===31){var o=Vr();o=Ne(o);var u=Ao(i,o);u!==null&&_r(u,i,o),Wg(i,o)}}var gd=!0;function ez(i,o,u,p){var x=U.T;U.T=null;var w=W.p;try{W.p=2,Kg(i,o,u,p)}finally{W.p=w,U.T=x}}function tz(i,o,u,p){var x=U.T;U.T=null;var w=W.p;try{W.p=8,Kg(i,o,u,p)}finally{W.p=w,U.T=x}}function Kg(i,o,u,p){if(gd){var x=Yg(p);if(x===null)Dg(i,o,p,bd,u),Xw(i,p);else if(rz(x,i,o,u,p))p.stopPropagation();else if(Xw(i,p),o&4&&-1<nz.indexOf(i)){for(;x!==null;){var w=Xi(x);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var M=At(w.pendingLanes);if(M!==0){var G=w;for(G.pendingLanes|=2,G.entangledLanes|=2;M;){var Q=1<<31-nt(M);G.entanglements[1]|=Q,M&=~Q}Oi(w),(tn&6)===0&&(Jf=ee()+500,Su(0))}}break;case 31:case 13:G=Ao(w,2),G!==null&&_r(G,w,2),td(),Wg(w,2)}if(w=Yg(p),w===null&&Dg(i,o,p,bd,u),w===x)break;x=w}x!==null&&p.stopPropagation()}else Dg(i,o,p,null,u)}}function Yg(i){return i=Ct(i),Xg(i)}var bd=null;function Xg(i){if(bd=null,i=hr(i),i!==null){var o=a(i);if(o===null)i=null;else{var u=o.tag;if(u===13){if(i=l(o),i!==null)return i;i=null}else if(u===31){if(i=c(o),i!==null)return i;i=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return bd=i,null}function Yw(i){switch(i){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(ce()){case J:return 2;case re:return 8;case xe:case $e:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Zg=!1,Qs=null,Js=null,eo=null,Nu=new Map,Au=new Map,to=[],nz="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 Xw(i,o){switch(i){case"focusin":case"focusout":Qs=null;break;case"dragenter":case"dragleave":Js=null;break;case"mouseover":case"mouseout":eo=null;break;case"pointerover":case"pointerout":Nu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Au.delete(o.pointerId)}}function Ou(i,o,u,p,x,w){return i===null||i.nativeEvent!==w?(i={blockedOn:o,domEventName:u,eventSystemFlags:p,nativeEvent:w,targetContainers:[x]},o!==null&&(o=Xi(o),o!==null&&Ww(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),i)}function rz(i,o,u,p,x){switch(o){case"focusin":return Qs=Ou(Qs,i,o,u,p,x),!0;case"dragenter":return Js=Ou(Js,i,o,u,p,x),!0;case"mouseover":return eo=Ou(eo,i,o,u,p,x),!0;case"pointerover":var w=x.pointerId;return Nu.set(w,Ou(Nu.get(w)||null,i,o,u,p,x)),!0;case"gotpointercapture":return w=x.pointerId,Au.set(w,Ou(Au.get(w)||null,i,o,u,p,x)),!0}return!1}function Zw(i){var o=hr(i.target);if(o!==null){var u=a(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){i.blockedOn=o,Be(i.priority,function(){Kw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,Be(i.priority,function(){Kw(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function yd(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Yg(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);rt=p,u.target.dispatchEvent(p),rt=null}else return o=Xi(u),o!==null&&Ww(o),i.blockedOn=u,!1;o.shift()}return!0}function Qw(i,o,u){yd(i)&&u.delete(o)}function iz(){Zg=!1,Qs!==null&&yd(Qs)&&(Qs=null),Js!==null&&yd(Js)&&(Js=null),eo!==null&&yd(eo)&&(eo=null),Nu.forEach(Qw),Au.forEach(Qw)}function vd(i,o){i.blockedOn===o&&(i.blockedOn=null,Zg||(Zg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,iz)))}var xd=null;function Jw(i){xd!==i&&(xd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){xd===i&&(xd=null);for(var o=0;o<i.length;o+=3){var u=i[o],p=i[o+1],x=i[o+2];if(typeof p!="function"){if(Xg(p||u)===null)continue;break}var w=Xi(u);w!==null&&(i.splice(o,3),o-=3,Ym(w,{pending:!0,data:x,method:u.method,action:p},p,x))}}))}function Xa(i){function o(Q){return vd(Q,i)}Qs!==null&&vd(Qs,i),Js!==null&&vd(Js,i),eo!==null&&vd(eo,i),Nu.forEach(o),Au.forEach(o);for(var u=0;u<to.length;u++){var p=to[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<to.length&&(u=to[0],u.blockedOn===null);)Zw(u),u.blockedOn===null&&to.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var x=u[p],w=u[p+1],M=x[$t]||null;if(typeof w=="function")M||Jw(u);else if(M){var G=null;if(w&&w.hasAttribute("formAction")){if(x=w,M=w[$t]||null)G=M.formAction;else if(Xg(x)!==null)continue}else G=M.action;typeof G=="function"?u[p+1]=G:(u.splice(p,3),p-=3),Jw(u)}}}function e1(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(M){return x=M})},focusReset:"manual",scroll:"manual"})}function o(){x!==null&&(x(),x=null),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,x=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),x!==null&&(x(),x=null)}}}function Qg(i){this._internalRoot=i}kd.prototype.render=Qg.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,p=Vr();Gw(u,p,i,o,null,null)},kd.prototype.unmount=Qg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Gw(i.current,2,null,i,null,null),td(),o[Rn]=null}};function kd(i){this._internalRoot=i}kd.prototype.unstable_scheduleHydration=function(i){if(i){var o=ut();i={blockedOn:null,target:i,priority:o};for(var u=0;u<to.length&&o!==0&&o<to[u].priority;u++);to.splice(u,0,i),u===0&&Zw(i)}};var t1=t.version;if(t1!=="19.2.6")throw Error(r(527,t1,"19.2.6"));W.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var sz={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sd.isDisabled&&Sd.supportsFiber)try{Qe=Sd.inject(sz),yt=Sd}catch{}}return Iu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,p="",x=lS,w=uS,M=cS;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError)),o=qw(i,1,!1,null,null,u,p,null,x,w,M,e1),i[Rn]=o.current,Ig(i),new Qg(o)},Iu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var p=!1,x="",w=lS,M=uS,G=cS,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(G=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),o=qw(i,1,!0,o,u??null,p,x,Q,w,M,G,e1),o.context=Hw(null),u=o.current,p=Vr(),p=Ne(p),x=Bs(p),x.callback=null,Fs(u,x,p),u=p,o.current.lanes=u,at(o,u),Oi(o),i[Rn]=o.current,Ig(i),new kd(o)},Iu.version="19.2.6",Iu}var f1;function gz(){if(f1)return tb.exports;f1=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(),tb.exports=mz(),tb.exports}var bz=gz(),Du={},d1;function yz(){if(d1)return Du;d1=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.styleq=void 0;var e=new WeakMap,t="$$css";function n(s){var a,l,c;return s!=null&&(a=s.disableCache===!0,l=s.disableMix===!0,c=s.transform),function(){for(var f=[],h="",m=null,b="",y=a?null:e,k=new Array(arguments.length),S=0;S<arguments.length;S++)k[S]=arguments[S];for(;k.length>0;){var E=k.pop();if(!(E==null||E===!1)){if(Array.isArray(E)){for(var R=0;R<E.length;R++)k.push(E[R]);continue}var T=c!=null?c(E):E;if(T.$$css!=null){var C="";if(y!=null&&y.has(T)){var _=y.get(T);_!=null&&(C=_[0],b=_[2],f.push.apply(f,_[1]),y=_[3])}else{var L=[];for(var N in T){var A=T[N];if(N===t){var $=T[N];$!==!0&&(b=b?$+"; "+b:$);continue}typeof A=="string"||A===null?f.includes(N)||(f.push(N),y!=null&&L.push(N),typeof A=="string"&&(C+=C?" "+A:A)):console.error("styleq: ".concat(N," typeof ").concat(String(A),' is not "string" or "null".'))}if(y!=null){var z=new WeakMap;y.set(T,[C,L,b,z]),y=z}}C&&(h=h?C+" "+h:C)}else if(l)m==null&&(m={}),m=Object.assign({},T,m);else{var I=null;for(var Y in T){var H=T[Y];H!==void 0&&(f.includes(Y)||(H!=null&&(m==null&&(m={}),I==null&&(I={}),I[Y]=H),f.push(Y),y=null))}I!=null&&(m=Object.assign(I,m))}}}var q=[h,m,b];return q}}var r=Du.styleq=n();return r.factory=n,Du}var vz=yz();function Lt(...e){const[t,n,r]=vz.styleq(e),s={};return t!=null&&t!==""&&(s.className=t),n!=null&&Object.keys(n).length>0&&(s.style=n),r!=null&&r!==""&&(s["data-style-src"]=r),s}function MC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=MC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xz(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=MC(e))&&(r&&(r+=" "),r+=t);return r}function nn(...e){return xz(e)}function Kt({rootClass:e,stylexStyles:t,className:n,style:r}){const s=Lt(t);return{className:nn(e,s.className,n),style:{...s.style,...r}}}const kz={"--cursor-easing-out-quint":"var(--cursor-easing-out-quint)"},ki={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",khDVqt:"ui-uxw1ft",kMv6JI:"ui-1acoasx",krdFHd:"ui-1bi1pm6",kfmiAY:"ui-4ao1vk",kT0f0o:"ui-cwn6ta",kVL7Gh:"ui-42qtjs",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},sizeSm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1hcev8z",kGO01o:"ui-18d9i69",kZCmMZ:"ui-149t747",$$css:!0},sizeBase:{kLKAdn:"ui-493x5y",kwRFfy:"ui-1tlft3r",kGO01o:"ui-b6dno7",kZCmMZ:"ui-tw3t59",$$css:!0},pill:{krdFHd:"ui-inloh",kfmiAY:"ui-zbf5sq",kT0f0o:"ui-jpqjuy",kVL7Gh:"ui-mzb00y",$$css:!0},pillSizeSm:{kLKAdn:"ui-493x5y",kwRFfy:"ui-196pc8s",kGO01o:"ui-b6dno7",kZCmMZ:"ui-22095l",$$css:!0},pillSizeBase:{kLKAdn:"ui-5pb957",kwRFfy:"ui-19bzwdx",kGO01o:"ui-1mmyrcj",kZCmMZ:"ui-v853mj",$$css:!0},variantAccent:{kMwMTN:"ui-kbann2",kWkggS:"ui-gsjhps",$$css:!0},variantNeutral:{kMwMTN:"ui-19aaqeu",kWkggS:"ui-i07v4r",$$css:!0},variantSuccess:{kMwMTN:"ui-1w5rjie",kWkggS:"ui-1buh4up",$$css:!0},variantWarn:{kMwMTN:"ui-1izesbo",kWkggS:"ui-1xvwvse",$$css:!0},variantDanger:{kMwMTN:"ui-1jh5svw",kWkggS:"ui-1xnwcy6",$$css:!0}};function Sz({pill:e,size:t,variant:n}){return[ki.base,t==="sm"?ki.sizeSm:ki.sizeBase,e?[ki.pill,t==="sm"?ki.pillSizeSm:ki.pillSizeBase]:null,wz(n)]}function wz(e){switch(e){case"accent":return ki.variantAccent;case"neutral":return ki.variantNeutral;case"success":return ki.variantSuccess;case"warn":return ki.variantWarn;case"danger":return ki.variantDanger}}function qi({children:e,variant:t="neutral",size:n="base",pill:r=!1,as:s="span",className:a,style:l,...c}){const d=Kt({rootClass:"ui-status-badge",stylexStyles:Sz({pill:r,size:n,variant:t}),className:a,style:l});return g.jsx(s,{className:d.className,style:d.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function Ez(e,t){return function(r,...s){const a=new URL(e);return a.searchParams.set("code",r.toString()),s.forEach(l=>a.searchParams.append("args[]",l)),`${t} error #${r}; visit ${a} for the full message.`}}const Nn=Ez("https://base-ui.com/production-error","Base UI"),p1={};function Ir(e,t){const n=v.useRef(p1);return n.current===p1&&(n.current=e(t)),n}function co(e,t,n,r){const s=Ir(IC).current;return Rz(s,e,t,n,r)&&DC(s,[e,t,n,r]),s.callback}function Tz(e){const t=Ir(IC).current;return Cz(t,e)&&DC(t,e),t.callback}function IC(){return{callback:null,cleanup:null,refs:[]}}function Rz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function Cz(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function DC(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=a(n);typeof l=="function"&&(r[s]=l);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=r[s];typeof l=="function"?l():a(null);break}case"object":{a.current=null;break}}}}}}}const _z=parseInt(v.version,10);function Cv(e){return _z>=e}function h1(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(Cv(19)?n?.ref:t.ref)??null}function Sy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Vn(){}const fo=Object.freeze([]),Ln=Object.freeze({});function Nz(e,t){const n={};for(const r in e){const s=e[r];if(t?.hasOwnProperty(r)){const a=t[r](s);a!=null&&Object.assign(n,a);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function Az(e,t){return typeof e=="function"?e(t):e}function jC(e,t){return typeof e=="function"?e(t):e}const _v={};function Pi(e,t,n,r,s){if(!n&&!r&&!s&&!e)return gp(t);let a=gp(e);return t&&(a=ec(a,t)),n&&(a=ec(a,n)),r&&(a=ec(a,r)),s&&(a=ec(a,s)),a}function Oz(e){if(e.length===0)return _v;if(e.length===1)return gp(e[0]);let t=gp(e[0]);for(let n=1;n<e.length;n+=1)t=ec(t,e[n]);return t}function gp(e){return Nv(e)?{...zC(e,_v)}:Mz(e)}function ec(e,t){return Nv(t)?zC(t,e):Iz(e,t)}function Mz(e){const t={...e};for(const n in t){const r=t[n];LC(n,r)&&(t[n]=PC(r))}return t}function Iz(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Sy(e.style,r);break}case"className":{e[n]=$C(e.className,r);break}default:LC(n,r)?e[n]=Dz(e[n],r):e[n]=r}}return e}function LC(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function Nv(e){return typeof e=="function"}function zC(e,t){return Nv(e)?e(t):e??_v}function Dz(e,t){return t?e?(...n)=>{const r=n[0];if(BC(r)){const a=r;bp(a);const l=t(...n);return a.baseUIHandlerPrevented||e?.(...n),l}const s=t(...n);return e?.(...n),s}:PC(t):e}function PC(e){return e&&((...t)=>{const n=t[0];return BC(n)&&bp(n),e(...t)})}function bp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function $C(e,t){return t?e?t+" "+e:t:e}function BC(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function mn(e,t,n={}){const r=t.render,s=jz(t,n);if(n.enabled===!1)return null;const a=n.state??Ln;return Pz(e,r,s,a)}function jz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=Ln,ref:l,props:c,stateAttributesMapping:d,enabled:f=!0}=t,h=f?Az(n,a):void 0,m=f?jC(r,a):void 0,b=f?Nz(a,d):Ln,y=f&&c?Lz(c):void 0,k=f?Sy(b,y)??{}:Ln;return typeof document<"u"&&(f?Array.isArray(l)?k.ref=Tz([k.ref,h1(s),...l]):k.ref=co(k.ref,h1(s),l):co(null,null)),f?(h!==void 0&&(k.className=$C(k.className,h)),m!==void 0&&(k.style=Sy(k.style,m)),k):Ln}function Lz(e){return Array.isArray(e)?Oz(e):Pi(void 0,e)}const zz=Symbol.for("react.lazy");function Pz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=Pi(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===zz&&(a=v.Children.toArray(t)[0]),v.cloneElement(a,s)}if(e&&typeof e=="string")return $z(e,n);throw new Error(Nn(8))}function $z(e,t){return e==="button"?v.createElement("button",{type:"button",...t,key:t.key}):e==="img"?v.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}let ea=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Bz={[ea.startingStyle]:""},Fz={[ea.endingStyle]:""},go={transitionStatus(e){return e==="starting"?Bz:e==="ending"?Fz:null}};let Av=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ea.startingStyle]="startingStyle",e[e.endingStyle=ea.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),yp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Uz={[yp.popupOpen]:""},qz={[yp.popupOpen]:"",[yp.pressed]:""},Hz={[Av.open]:""},Gz={[Av.closed]:""},Vz={[Av.anchorHidden]:""},FC={open(e){return e?Uz:null}},Wz={open(e){return e?qz:null}},Uc={open(e){return e?Hz:Gz},anchorHidden(e){return e?Vz:null}};function rh(){return typeof window<"u"}function Wn(e){return ih(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vi(e){var t;return(t=(ih(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ih(e){return rh()?e instanceof Node||e instanceof kn(e).Node:!1}function ft(e){return rh()?e instanceof Element||e instanceof kn(e).Element:!1}function zt(e){return rh()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function po(e){return!rh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function bo(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function Kz(e){return/^(table|td|th)$/.test(Wn(e))}function sh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Yz=/transform|translate|scale|rotate|perspective|filter/,Xz=/paint|layout|strict|content/,qo=e=>!!e&&e!=="none";let sb;function Ov(e){const t=ft(e)?fr(e):e;return qo(t.transform)||qo(t.translate)||qo(t.scale)||qo(t.rotate)||qo(t.perspective)||!oh()&&(qo(t.backdropFilter)||qo(t.filter))||Yz.test(t.willChange||"")||Xz.test(t.contain||"")}function Zz(e){let t=Hi(e);for(;zt(t)&&!di(t);){if(Ov(t))return t;if(sh(t))return null;t=Hi(t)}return null}function oh(){return sb==null&&(sb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),sb}function di(e){return/^(html|body|#document)$/.test(Wn(e))}function fr(e){return kn(e).getComputedStyle(e)}function ah(e){return ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hi(e){if(Wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||po(e)&&e.host||Vi(e);return po(t)?t.host:t}function UC(e){const t=Hi(e);return di(t)?e.ownerDocument?e.ownerDocument.body:e.body:zt(t)&&bo(t)?t:UC(t)}function lo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=UC(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=kn(s);if(a){const c=wy(l);return t.concat(l,l.visualViewport||[],bo(s)?s:[],c&&n?lo(c):[])}else return t.concat(s,lo(s,[],n))}function wy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Mv={...Rv},ob=Mv.useInsertionEffect,Qz=ob&&ob!==Mv.useLayoutEffect?ob:e=>e();function We(e){const t=Ir(Jz).current;return t.next=e,Qz(t.effect),t.trampoline}function Jz(){const e={next:void 0,callback:e2,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function e2(){}const t2=()=>{},Ge=typeof document<"u"?v.useLayoutEffect:t2,qC=v.createContext(void 0);function HC(e=!1){const t=v.useContext(qC);if(t===void 0&&!e)throw new Error(Nn(16));return t}function n2(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:v.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=s,!a&&n&&(f.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(f["aria-disabled"]=n),a&&(!t||c)&&(f.disabled=n),f},[r,n,t,l,c,a,s])}}function Ol(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=v.useRef(null),c=HC(!0),d=a??c!==void 0,{props:f}=n2({focusableWhenDisabled:n,disabled:t,composite:d,tabIndex:r,isNativeButton:s}),h=v.useCallback(()=>{const y=l.current;ab(y)&&d&&t&&f.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,f.disabled,d]);Ge(h,[h]);const m=v.useCallback((y={})=>{const{onClick:k,onMouseDown:S,onKeyUp:E,onKeyDown:R,onPointerDown:T,...C}=y;return Pi({onClick(_){if(t){_.preventDefault();return}k?.(_)},onMouseDown(_){t||S?.(_)},onKeyDown(_){if(t||(bp(_),R?.(_),_.baseUIHandlerPrevented))return;const L=_.target===_.currentTarget,N=_.currentTarget,A=ab(N),$=!s&&r2(N),z=L&&(s?A:!$),I=_.key==="Enter",Y=_.key===" ",H=N.getAttribute("role"),q=H?.startsWith("menuitem")||H==="option"||H==="gridcell";if(L&&d&&Y){if(_.defaultPrevented&&q)return;_.preventDefault(),$||s&&A?(N.click(),_.preventBaseUIHandler()):z&&(k?.(_),_.preventBaseUIHandler());return}z&&(!s&&(Y||I)&&_.preventDefault(),!s&&I&&k?.(_))},onKeyUp(_){if(!t){if(bp(_),E?.(_),_.target===_.currentTarget&&s&&d&&ab(_.currentTarget)&&_.key===" "){_.preventDefault();return}_.baseUIHandlerPrevented||_.target===_.currentTarget&&!s&&!d&&_.key===" "&&k?.(_)}},onPointerDown(_){if(t){_.preventDefault();return}T?.(_)}},s?{type:"button"}:{role:"button"},f,C)},[t,f,d,s]),b=We(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:b}}function ab(e){return zt(e)&&e.tagName==="BUTTON"}function r2(e){return!!(e?.tagName==="A"&&e?.href)}const Ei="none",Ml="trigger-press",yr="trigger-hover",ap="trigger-focus",Iv="outside-press",lb="item-press",lh="focus-out",Dv="escape-key",m1="list-navigation",i2="cancel-open",GC="disabled",g1="missing",b1="initial",vp="imperative-action",s2="window-resize";function xt(e,t,n,r){let s=!1,a=!1;const l=r??Ln;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){a=!0},get isCanceled(){return s},get isPropagationAllowed(){return a},trigger:n,...l}}let y1=0;function o2(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(y1+=1,r(`${t}-${y1}`))},[n,t]),s}const v1=Mv.useId;function qc(e,t){if(v1!==void 0){const n=v1();return e??(t?`${t}-${n}`:n)}return o2(e,t)}function Il(e){return qc(e,"base-ui")}const a2=[];function jv(e){v.useEffect(e,a2)}const ju=0;class Ti{static create(){return new Ti}currentId=ju;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ju,n()},t)}isStarted(){return this.currentId!==ju}clear=()=>{this.currentId!==ju&&(clearTimeout(this.currentId),this.currentId=ju)};disposeEffect=()=>this.clear}function pi(){const e=Ir(Ti.create).current;return jv(e.disposeEffect),e}function l2(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:u2,platform:c2,maxTouchPoints:f2}=l2(),uh=u2.toLowerCase(),yc=c2.toLowerCase(),ch=/^i(os$|p)/.test(yc)||yc==="macintel"&&f2>1,x1="android",Ey=yc===x1||uh.includes(x1),VC=!ch&&yc.startsWith("mac");yc.startsWith("win");const d2=VC||ch,yo=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!yo&&uh.includes("firefox");!yo&&uh.includes("chrom");const p2=d2,Lv=/jsdom|happydom/.test(uh);function ji(e){e.preventDefault(),e.stopPropagation()}function h2(e){return"nativeEvent"in e}function zv(e){return e.pointerType===""&&e.isTrusted?!0:Ey&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function WC(e){return Lv?!1:!Ey&&e.width===0&&e.height===0||Ey&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function ta(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function m2(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Ty="data-base-ui-focusable",KC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",fh="ArrowLeft",dh="ArrowRight",YC="ArrowUp",Pv="ArrowDown";function ar(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function dt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&po(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function cr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function xp(e,t){if(!ft(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(dt(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function ub(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function g2(e){return e.matches("html,body")}function ph(e){return zt(e)&&e.matches(KC)}function b2(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${KC}`)!=null}function Ry(e){return e?e.getAttribute("role")==="combobox"&&ph(e):!1}function y2(e){if(!e||Lv)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function kp(e){return e?e.hasAttribute(Ty)?e:e.querySelector(`[${Ty}]`)||e:null}function v2(e,t){return t!=null&&!ta(t)?0:typeof e=="function"?e():e}function Sp(e,t,n){const r=v2(e,n);return typeof r=="number"?r:r?.[t]}function k1(e){return typeof e=="function"?e():e}function XC(e,t){return t||e==="click"||e==="mousedown"}function x2(e){return e?.includes("mouse")&&e!=="mousedown"}const k2=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ti,currentIdRef:{current:null},currentContextRef:{current:null}});function S2(e,t){e.current=t.current}function w2(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,s=r.useState("floatingId"),a=v.useContext(k2),{currentIdRef:l,delayRef:c,timeoutMs:d,initialDelayRef:f,currentContextRef:h,hasProvider:m,timeout:b}=a,[y,k]=v.useState(!1),S=v.useRef(n),E=v.useRef(!1);return Ge(()=>{S.current=n},[n]),Ge(()=>()=>{E.current=!0},[]),Ge(()=>{function R(){E.current||k(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=f.current,b.clear()}if(l.current&&!n&&l.current===s){if(k(!1),d){const T=s;return b.start(d,()=>{r.select("open")||l.current&&l.current!==T||R()}),()=>{(S.current||l.current!==T)&&b.clear()}}R()}},[n,s,l,c,d,f,h,b,r]),Ge(()=>{if(!n)return;const R=h.current,T=l.current;b.clear(),h.current={onOpenChange:r.setOpen,setIsInstantPhase:k},l.current=s,c.current={open:0,close:Sp(f.current,"close")},T!==null&&T!==s?(k(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,xt(Ei))):(k(!1),R?.setIsInstantPhase(!1))},[n,s,r,l,c,f,h,b]),Ge(()=>()=>{if(l.current===s){if(h.current=null,!S.current)return;l.current=null,S2(c,f),b.clear()}},[h,l,c,s,f,b]),v.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:y}),[m,c,y])}function It(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function $i(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function _n(e){const t=Ir(E2,e).current;return t.next=e,Ge(t.effect),t}function E2(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const wd=null;class T2{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)n[s]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Ed=new T2;class Ar{static create(){return new Ar}static request(t){return Ed.request(t)}static cancel(t){return Ed.cancel(t)}currentId=wd;request(t){this.cancel(),this.currentId=Ed.request(()=>{this.currentId=wd,t()})}cancel=()=>{this.currentId!==wd&&(Ed.cancel(this.currentId),this.currentId=wd)};disposeEffect=()=>this.cancel}function yl(){const e=Ir(Ar.create).current;return jv(e.disposeEffect),e}function Vt(e){return e?.ownerDocument||document}const ZC={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},QC={...ZC,position:"fixed",top:0,left:0},R2={...ZC,position:"absolute"},wp=v.forwardRef(function(t,n){const[r,s]=v.useState();Ge(()=>{p2&&yo&&s("button")},[]);const a={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:QC,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),C2=["top","right","bottom","left"],vl=Math.min,Yr=Math.max,xl=Math.round,ll=Math.floor,Bi=e=>({x:e,y:e}),_2={left:"right",right:"left",bottom:"top",top:"bottom"};function Cy(e,t,n){return Yr(e,vl(t,n))}function Ts(e,t){return typeof e=="function"?e(t):e}function Mr(e){return e.split("-")[0]}function vo(e){return e.split("-")[1]}function $v(e){return e==="x"?"y":"x"}function Bv(e){return e==="y"?"height":"width"}function ci(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Fv(e){return $v(ci(e))}function N2(e,t,n){n===void 0&&(n=!1);const r=vo(e),s=Fv(e),a=Bv(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Ep(l)),[l,Ep(l)]}function A2(e){const t=Ep(e);return[_y(e),t,_y(t)]}function _y(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const S1=["left","right"],w1=["right","left"],O2=["top","bottom"],M2=["bottom","top"];function I2(e,t,n){switch(e){case"top":case"bottom":return n?t?w1:S1:t?S1:w1;case"left":case"right":return t?O2:M2;default:return[]}}function D2(e,t,n,r){const s=vo(e);let a=I2(Mr(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(_y)))),a}function Ep(e){const t=Mr(e);return _2[t]+e.slice(t.length)}function j2(e){return{top:0,right:0,bottom:0,left:0,...e}}function JC(e){return typeof e!="number"?j2(e):{top:e,right:e,bottom:e,left:e}}function vc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function ic(e,t){return t<0||t>=e.length}function lp(e,t){return Ss(e.current,{disabledIndices:t})}function Ny(e,t){return Ss(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ss(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:s=1}={}){let a=t;do a+=n?-s:s;while(a>=0&&a<=e.length-1&&Tp(e,a,r));return a}function Tp(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?hh(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function L2(e){return e.visibility==="hidden"||e.visibility==="collapse"}function hh(e,t=e?fr(e):null){return!e||!e.isConnected||!t||L2(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const z2='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function P2(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return po(n)?n.host:null}function Ay(e){for(const t of Array.from(e.children))if(Wn(t)==="summary")return t;return null}function $2(e,t){const n=Ay(t);return!!n&&(e===n||dt(n,e))}function e_(e){const t=e?Wn(e):"";return e!=null&&e.matches(z2)&&(t!=="summary"||e.parentElement!=null&&Wn(e.parentElement)==="details"&&Ay(e.parentElement)===e)&&(t!=="details"||Ay(e)==null)&&(t!=="input"||e.type!=="hidden")}function t_(e){if(!e_(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=P2(t)){const n=t!==e,r=Wn(t)==="slot";if(t.hasAttribute("inert")||n&&Wn(t)==="details"&&!t.open&&!$2(e,t)||t.hasAttribute("hidden")||!r&&!B2(t,n))return!1}return!0}function B2(e,t){const n=fr(e);return t?n.display!=="none":hh(e,n)}function n_(e){const t=e.tabIndex;if(t<0){const n=Wn(e);if(n==="details"||n==="audio"||n==="video"||zt(e)&&e.isContentEditable)return 0}return t}function cb(e){if(Wn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function F2(e,t){const n=cb(e);if(!n)return!0;const r=t.find(s=>{const a=cb(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=cb(s);return a?.name===n.name&&a.form===n.form})===n}function r_(e){if(zt(e)&&Wn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return zt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function i_(e,t){r_(e).forEach(n=>{e_(n)&&t.push(n),i_(n,t)})}function s_(e,t,n){r_(e).forEach(r=>{zt(r)&&r.matches(t)&&n.push(r),s_(r,t,n)})}function Uv(e){return t_(e)&&n_(e)>=0}function o_(e){const t=[];return i_(e,t),t.filter(t_)}function mh(e){const t=o_(e);return t.filter(n=>n_(n)>=0&&F2(n,t))}function a_(e,t){const n=mh(e),r=n.length;if(r===0)return;const s=ar(Vt(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function l_(e){return a_(Vt(e).body,1)||e}function u_(e){return a_(Vt(e).body,-1)||e}function sc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!dt(n,r)}function U2(e){mh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function E1(e){const t=[];s_(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ho(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...ho(e,s.id,n)])}function T1(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(a=>a.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function xc(e){return`data-base-ui-${e}`}let Td=0;function up(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Td);function a(){s&&!s()||e?.focus({preventScroll:n})}if(r)return a(),Vn;const l=requestAnimationFrame(a);return Td=l,()=>{Td===l&&(cancelAnimationFrame(l),Td=0)}}const fb={inert:new WeakMap,"aria-hidden":new WeakMap},R1="data-base-ui-inert",Oy={inert:new WeakSet,"aria-hidden":new WeakSet};let Lu=new WeakMap,db=0;function q2(e){return Oy[e]}function c_(e){return e?po(e)?e.host:c_(e.parentNode):null}const C1=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=c_(n);return e.contains(r)?r:null}).filter(n=>n!=null),_1=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},N1=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Wn(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function H2(e,t,n,r,{mark:s=!0}){let a=null;r?a="inert":n&&(a="aria-hidden");let l=null,c=null;const d=C1(t,e),f=s?N1(t,_1(d),new Set(d)):[],h=[],m=[];if(a){const b=fb[a],y=q2(a);c=y,l=b;const k=C1(t,Array.from(t.querySelectorAll("[aria-live]"))),S=d.concat(k);N1(t,_1(S),new Set(S)).forEach(R=>{const T=R.getAttribute(a),C=T!==null&&T!=="false",_=(b.get(R)||0)+1;b.set(R,_),h.push(R),_===1&&C&&y.add(R),C||R.setAttribute(a,a==="inert"?"":"true")})}return s&&f.forEach(b=>{const y=(Lu.get(b)||0)+1;Lu.set(b,y),m.push(b),y===1&&b.setAttribute(R1,"")}),db+=1,()=>{l&&h.forEach(b=>{const k=(l.get(b)||0)-1;l.set(b,k),k||(!c?.has(b)&&a&&b.removeAttribute(a),c?.delete(b))}),s&&m.forEach(b=>{const y=(Lu.get(b)||0)-1;Lu.set(b,y),y||b.removeAttribute(R1)}),db-=1,db||(fb.inert=new WeakMap,fb["aria-hidden"]=new WeakMap,Oy.inert=new WeakSet,Oy["aria-hidden"]=new WeakSet,Lu=new WeakMap)}}function A1(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,a=Vt(e[0]).body;return H2(e,a,n,r,{mark:s})}var Ri=OC();const G2={style:{transition:"none"}},V2="data-base-ui-click-trigger",W2={fallbackAxisSide:"none"},f_={fallbackAxisSide:"end"},K2={clipPath:"inset(50%)",position:"fixed",top:0,left:0},d_=v.createContext(null),p_=()=>v.useContext(d_),Y2=xc("portal");function h_(e={}){const{ref:t,container:n,componentProps:r=Ln,elementProps:s}=e,a=qc(),c=p_()?.portalNode,[d,f]=v.useState(null),[h,m]=v.useState(null),b=We(E=>{E!==null&&m(E)}),y=v.useRef(null);Ge(()=>{if(n===null){y.current&&(y.current=null,m(null),f(null));return}if(a==null)return;const E=(n&&(ih(n)?n:n.current))??c??document.body;if(E==null){y.current&&(y.current=null,m(null),f(null));return}y.current!==E&&(y.current=E,m(null),f(E))},[n,c,a]);const k=mn("div",r,{ref:[t,b],props:[{id:a,[Y2]:""},s]});return{portalNode:h,portalSubtree:d&&k?Ri.createPortal(k,d):null}}const X2=v.forwardRef(function(t,n){const{render:r,className:s,style:a,children:l,container:c,renderGuards:d,...f}=t,{portalNode:h,portalSubtree:m}=h_({container:c,ref:n,componentProps:t,elementProps:f}),b=v.useRef(null),y=v.useRef(null),k=v.useRef(null),S=v.useRef(null),[E,R]=v.useState(null),T=v.useRef(!1),C=E?.modal,_=E?.open,L=typeof d=="boolean"?d:!!E&&!E.modal&&E.open&&!!h;v.useEffect(()=>{if(!h||C)return;function A($){h&&$.relatedTarget&&sc($)&&($.type==="focusin"?T.current&&(E1(h),T.current=!1):(U2(h),T.current=!0))}return $i(It(h,"focusin",A,!0),It(h,"focusout",A,!0))},[h,C]),Ge(()=>{!h||_!==!0||!T.current||(E1(h),T.current=!1)},[_,h]);const N=v.useMemo(()=>({beforeOutsideRef:b,afterOutsideRef:y,beforeInsideRef:k,afterInsideRef:S,portalNode:h,setFocusManagerState:R}),[h]);return g.jsxs(v.Fragment,{children:[m,g.jsxs(d_.Provider,{value:N,children:[L&&h&&g.jsx(wp,{"data-type":"outside",ref:b,onFocus:A=>{if(sc(A,h))k.current?.focus();else{const $=E?E.domReference:null;u_($)?.focus()}}}),L&&h&&g.jsx("span",{"aria-owns":h.id,style:K2}),h&&Ri.createPortal(l,h),L&&h&&g.jsx(wp,{"data-type":"outside",ref:y,onFocus:A=>{if(sc(A,h))S.current?.focus();else{const $=E?E.domReference:null;l_($)?.focus(),E?.closeOnFocusOut&&E?.onOpenChange(!1,xt(lh,A.nativeEvent))}}})]})]})});function m_(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class Z2{nodesRef={current:[]};events=m_();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const g_=v.createContext(null),b_=v.createContext(null),Dl=()=>v.useContext(g_)?.id||null,ua=e=>{const t=v.useContext(b_);return e??t};function Q2(e){const t=qc(),n=ua(e),r=Dl();return Ge(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function J2(e){const{children:t,id:n}=e,r=Dl();return g.jsx(g_.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function eP(e){const{children:t,externalTree:n}=e,r=Ir(()=>n??new Z2).current;return g.jsx(b_.Provider,{value:r,children:t})}function bs(e){return e==null?e:"current"in e?e.current:e}function tP(e,t){const n=kn(cr(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const O1=20;let oo=[];function qv(){oo=oo.filter(e=>e.deref()?.isConnected)}function M1(e){qv(),e&&Wn(e)!=="body"&&(oo.push(new WeakRef(e)),oo.length>O1&&(oo=oo.slice(-O1)))}function I1(){return qv(),oo[oo.length-1]?.deref()}function nP(e){return e?Uv(e)?e:mh(e)[0]||e:null}function D1(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=o_(e).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return Uv(s)||s.hasAttribute("data-tabindex")&&!a.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function rP(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:b,externalTree:y,getInsideElements:k}=e,S="rootStore"in t?t.rootStore:t,E=S.useState("open"),R=S.useState("domReferenceElement"),T=S.useState("floatingElement"),{events:C,dataRef:_}=S.context,L=We(()=>_.current.floatingContext?.nodeId),N=s===!1,A=Ry(R)&&N,$=_n(s),z=_n(a),I=_n(f),Y=_n(E),H=ua(y),q=p_(),D=v.useRef(!1),F=v.useRef(!1),U=v.useRef(!1),W=v.useRef(null),B=v.useRef(""),K=v.useRef(""),O=v.useRef(null),P=v.useRef(null),V=co(O,b,q?.beforeInsideRef),j=co(P,q?.afterInsideRef),Z=pi(),te=pi(),se=yl(),ue=q!=null,le=kp(T),fe=We((oe=le)=>oe?mh(oe):[]),ge=We(()=>k?.().filter(oe=>oe!=null)??[]);v.useEffect(()=>{if(r||!c)return;function oe(Se){Se.key==="Tab"&&dt(le,ar(Vt(le)))&&fe().length===0&&!A&&ji(Se)}const ye=Vt(le);return It(ye,"keydown",oe)},[r,le,c,A,fe]),v.useEffect(()=>{if(r||!E)return;const oe=Vt(le);function ye(){U.current=!1}function Se(we){const ke=cr(we),De=ge(),Me=dt(T,ke)||dt(R,ke)||dt(q?.portalNode,ke)||De.some(je=>je===ke||dt(je,ke));U.current=!Me,K.current=we.pointerType||"keyboard",ke?.closest(`[${V2}]`)&&(F.current=!0,te.start(0,()=>{F.current=!1}))}function Oe(){K.current="keyboard"}return $i(It(oe,"pointerdown",Se,!0),It(oe,"pointerup",ye,!0),It(oe,"pointercancel",ye,!0),It(oe,"keydown",Oe,!0),ye)},[r,T,R,le,E,q,te,ge]),v.useEffect(()=>{if(r||!d)return;const oe=Vt(le);function ye(){F.current=!0,te.start(0,()=>{F.current=!1})}function Se(De){const Me=cr(De);Uv(Me)&&(W.current=Me)}function Oe(De){const Me=De.relatedTarget,je=De.currentTarget,He=cr(De);c&&Me==null&&He!=null&&dt(T,He)&&M1(He),queueMicrotask(()=>{const be=L(),Re=S.context.triggerElements,ee=ge(),ce=Me?.hasAttribute(xc("focus-guard"))&&[O.current,P.current,q?.beforeInsideRef.current,q?.afterInsideRef.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,bs(m),bs(h)].includes(Me),J=!(dt(R,Me)||dt(T,Me)||dt(Me,T)||dt(q?.portalNode,Me)||ee.some(re=>re===Me||dt(re,Me))||Me!=null&&Re.hasElement(Me)||Re.hasMatchingElement(re=>dt(re,Me))||ce||H&&(ho(H.nodesRef.current,be).find(re=>dt(re.context?.elements.floating,Me)||dt(re.context?.elements.domReference,Me))||T1(H.nodesRef.current,be).find(re=>[re.context?.elements.floating,kp(re.context?.elements.floating)].includes(Me)||re.context?.elements.domReference===Me)));if(je===R&&le&&D1(le),l&&je!==R&&!hh(He)&&ar(oe)===oe.body){if(zt(le)&&(le.focus(),l==="popup")){se.request(()=>{le.focus()});return}const re=fe(),xe=W.current,$e=(xe&&re.includes(xe)?xe:null)||re[re.length-1]||le;zt($e)&&$e.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(A||!c)&&Me&&J&&!F.current&&(A||Me!==I1())&&(D.current=!0,S.setOpen(!1,xt(lh,De)))})}function we(){U.current||(_.current.insideReactTree=!0,Z.start(0,()=>{_.current.insideReactTree=!1}))}const ke=zt(R)?R:null;if(!(!T&&!ke))return $i(ke&&It(ke,"focusout",Oe),ke&&It(ke,"pointerdown",ye),T&&It(T,"focusin",Se),T&&It(T,"focusout",Oe),T&&q&&It(T,"focusout",we,!0))},[r,R,T,le,c,H,q,S,d,l,fe,A,L,_,Z,te,se,h,m,ge]),v.useEffect(()=>{if(r||!T||!E)return;const oe=Array.from(q?.portalNode?.querySelectorAll(`[${xc("portal")}]`)||[]),Se=(H?T1(H.nodesRef.current,L()):[]).find(je=>Ry(je.context?.elements.domReference||null))?.context?.elements.domReference,we=[...[T,...oe,O.current,P.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,...ge()],Se,bs(m),bs(h),A?R:null].filter(je=>je!=null),ke=A1(we,{ariaHidden:c||A,mark:!1}),De=[T,...oe].filter(je=>je!=null),Me=A1(De);return()=>{Me(),ke()}},[E,r,R,T,c,q,A,H,L,h,m,ge]),Ge(()=>{if(!E||r||!zt(le))return;const oe=Vt(le),ye=ar(oe);queueMicrotask(()=>{const Se=$.current,Oe=typeof Se=="function"?Se(I.current||""):Se;if(Oe===void 0||Oe===!1||dt(le,ye))return;let ke=null;const De=()=>(ke==null&&(ke=fe(le)),ke[0]||le);let Me;Oe===!0||Oe===null?Me=De():Me=bs(Oe),Me=Me||De();const je=dt(le,ar(oe));up(Me,{preventScroll:Me===le,shouldFocus(){if(!Y.current)return!1;if(je)return!0;const He=ar(oe);return!(He!==Me&&dt(le,He))}})})},[r,E,le,fe,$,I,Y]),Ge(()=>{if(r||!le)return;const oe=Vt(le),ye=ar(oe),Se=I.current==null;M1(ye);function Oe(ke){if(ke.open||(B.current=tP(ke.nativeEvent,K.current)),ke.reason===yr&&ke.nativeEvent.type==="mouseleave"&&(D.current=!0),ke.reason===Iv)if(ke.nested)D.current=!1;else if(zv(ke.nativeEvent)||WC(ke.nativeEvent))D.current=!1;else{let De=!1;Vt(le).createElement("div").focus({get preventScroll(){return De=!0,!1}}),De?D.current=!1:D.current=!0}}C.on("openchange",Oe);function we(){const ke=z.current;let De=typeof ke=="function"?ke(B.current):ke;if(De===void 0||De===!1)return null;De===null&&(De=!0);const Me=R?.isConnected?R:null,je=ye?.isConnected&&Wn(ye)!=="body"?ye:null;let He=Se?je||Me:Me||je;return He||(He=I1()||null),typeof De=="boolean"?He:bs(De)||He||null}return()=>{C.off("openchange",Oe);const ke=ar(oe),De=ge(),Me=dt(T,ke)||De.some(be=>be===ke||dt(be,ke))||H&&ho(H.nodesRef.current,L(),!1).some(be=>dt(be.context?.elements.floating,ke)),je=z.current,He=we();queueMicrotask(()=>{const be=nP(He),Re=typeof je!="boolean";je&&!D.current&&zt(be)&&(!(!Re&&be!==ke&&ke!==oe.body)||Me)&&be.focus({preventScroll:!0}),D.current=!1})}},[r,T,le,z,I,C,H,R,L,ge]),Ge(()=>{if(!yo||E||!T)return;const oe=ar(Vt(T));!zt(oe)||!ph(oe)||dt(T,oe)&&oe.blur()},[E,T]),Ge(()=>{if(!(r||!q))return q.setFocusManagerState({modal:c,closeOnFocusOut:d,open:E,onOpenChange:S.setOpen,domReference:R}),()=>{q.setFocusManagerState(null)}},[r,q,c,E,S,d,R]),Ge(()=>{if(!(r||!le))return D1(le),()=>{queueMicrotask(qv)}},[r,le]);const _e=!r&&(c?!A:!0)&&(ue||c);return g.jsxs(v.Fragment,{children:[_e&&g.jsx(wp,{"data-type":"inside",ref:V,onFocus:oe=>{if(c){const ye=fe();up(ye[ye.length-1])}else q?.portalNode&&(D.current=!1,sc(oe,q.portalNode)?l_(R)?.focus():bs(m??q.beforeOutsideRef)?.focus())}}),n,_e&&g.jsx(wp,{"data-type":"inside",ref:j,onFocus:oe=>{c?up(fe()[0]):q?.portalNode&&(d&&(D.current=!0),sc(oe,q.portalNode)?u_(R)?.focus():bs(h??q.afterOutsideRef)?.focus())}})]})}function iP(e,t={}){const{enabled:n=!0,event:r="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:d=Ml}=t,f="rootStore"in e?e.rootStore:e,h=f.context.dataRef,m=v.useRef(void 0),b=yl(),y=pi(),k=v.useMemo(()=>{function S(R,T,C,_){const L=xt(d,T,C);R&&_==="touch"&&c>0?y.start(c,()=>{f.setOpen(!0,L)}):f.setOpen(R,L)}function E(R,T,C){const _=h.current.openEvent,L=f.select("domReferenceElement")!==T;return R&&L||!R||!s?!0:_&&l?!C(_.type):!1}return{onPointerDown(R){m.current=R.pointerType},onMouseDown(R){const T=m.current,C=R.nativeEvent,_=f.select("open");if(R.button!==0||r==="click"||ta(T,!0)&&a)return;const L=E(_,R.currentTarget,$=>$==="click"||$==="mousedown"),N=cr(C);if(ph(N)){S(L,C,N,T);return}const A=R.currentTarget;b.request(()=>{S(L,C,A,T)})},onClick(R){if(r==="mousedown-only")return;const T=m.current;if(r==="mousedown"&&T){m.current=void 0;return}if(ta(T,!0)&&a)return;const C=f.select("open"),_=E(C,R.currentTarget,L=>L==="click"||L==="mousedown"||L==="keydown"||L==="keyup");S(_,R.nativeEvent,R.currentTarget,T)},onKeyDown(){m.current=void 0}}},[h,r,a,d,f,l,s,b,y,c]);return v.useMemo(()=>n?{reference:k}:Ln,[n,k])}function sP(e,t){let n=null,r=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let f=a.width,h=a.height,m=a.x,b=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),m-=n||0,b-=r||0,f=0,h=0,!s||d?(f=t.axis==="y"?a.width:0,h=t.axis==="x"?a.height:0,m=l&&t.x!=null?t.x:m,b=c&&t.y!=null?t.y:b):s&&!d&&(h=t.axis==="x"?a.height:h,f=t.axis==="y"?a.width:f),s=!0,{width:f,height:h,x:m,y:b,top:b,right:m+f,bottom:b+h,left:m}}}}function j1(e){return e!=null&&e.clientX!=null}function oP(e,t={}){const{enabled:n=!0,axis:r="both"}=t,s="rootStore"in e?e.rootStore:e,a=s.useState("open"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.context.dataRef,f=v.useRef(!1),h=v.useRef(null),[m,b]=v.useState(),[y,k]=v.useState([]),S=We(_=>{s.set("positionReference",_)}),E=We((_,L,N)=>{f.current||d.current.openEvent&&!j1(d.current.openEvent)||s.set("positionReference",sP(N??c,{x:_,y:L,axis:r,dataRef:d,pointerType:m}))}),R=We(_=>{a?h.current||(E(_.clientX,_.clientY,_.currentTarget),k([])):E(_.clientX,_.clientY,_.currentTarget)}),T=ta(m)?l:a;v.useEffect(()=>{if(!n){S(c);return}if(!T)return;function _(){h.current?.(),h.current=null}const L=kn(l);function N(A){const $=cr(A);dt(l,$)?_():E(A.clientX,A.clientY)}return!d.current.openEvent||j1(d.current.openEvent)?h.current=It(L,"mousemove",N):S(c),_},[T,n,l,d,c,s,E,S,y]),v.useEffect(()=>()=>{s.set("positionReference",null)},[s]),v.useEffect(()=>{n&&!l&&(f.current=!1)},[n,l]),v.useEffect(()=>{!n&&a&&(f.current=!0)},[n,a]);const C=v.useMemo(()=>{function _(L){b(L.pointerType)}return{onPointerDown:_,onPointerEnter:_,onMouseMove:R,onMouseEnter:R}},[R]);return v.useMemo(()=>n?{reference:C,trigger:C}:{},[n,C])}function aP(){return!1}function lP(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Hv(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:a="sloppy",referencePress:l=aP,bubbles:c,externalTree:d}=t,f="rootStore"in e?e.rootStore:e,h=f.useState("open"),m=f.useState("floatingElement"),{dataRef:b}=f.context,y=ua(d),k=We(typeof s=="function"?s:()=>!1),S=typeof s=="function"?k:s,E=S!==!1,R=We(()=>a),{escapeKey:T,outsidePress:C}=lP(c),_=v.useRef(!1),L=v.useRef(!1),N=v.useRef(!1),A=v.useRef(!1),$=v.useRef(""),z=v.useRef(null),I=pi(),Y=pi(),H=We(()=>{Y.clear(),b.current.insideReactTree=!1}),q=We(V=>{const j=b.current.floatingContext?.nodeId;return(y?ho(y.nodesRef.current,j):[]).some(te=>te.context?.open&&!te.context.dataRef.current[V])}),D=We(V=>ub(V,f.select("floatingElement"))||ub(V,f.select("domReferenceElement"))),F=We(V=>{l()&&f.setOpen(!1,xt(Ml,V.nativeEvent))}),U=We(V=>{if(!h||!n||!r||V.key!=="Escape"||A.current||!T&&q("__escapeKeyBubbles"))return;const j=h2(V)?V.nativeEvent:V,Z=xt(Dv,j);f.setOpen(!1,Z),Z.isCanceled||V.preventDefault(),!T&&!Z.isPropagationAllowed&&V.stopPropagation()}),W=We(()=>{b.current.insideReactTree=!0,Y.start(0,H)}),B=We(V=>{if(!h||!n||V.button!==0)return;const j=cr(V.nativeEvent);dt(f.select("floatingElement"),j)&&(_.current||(_.current=!0,L.current=!1))}),K=We(V=>{!h||!n||(V.defaultPrevented||V.nativeEvent.defaultPrevented)&&_.current&&(L.current=!0)});v.useEffect(()=>{if(!h||!n)return;b.current.__escapeKeyBubbles=T,b.current.__outsidePressBubbles=C;const V=new Ti,j=new Ti;function Z(){V.clear(),A.current=!0}function te(){V.start(yo?5:0,()=>{A.current=!1})}function se(){N.current=!0,j.start(0,()=>{N.current=!1})}function ue(){_.current=!1,L.current=!1}function le(){const ee=$.current,ce=ee==="pen"||!ee?"mouse":ee,J=R(),re=typeof J=="function"?J():J;return typeof re=="string"?re:re[ce]}function fe(ee){const ce=le();return ce==="intentional"&&ee.type!=="click"||ce==="sloppy"&&ee.type==="click"}function ge(ee){const ce=b.current.floatingContext?.nodeId,J=y&&ho(y.nodesRef.current,ce).some(re=>ub(ee,re.context?.elements.floating));return D(ee)||J}function _e(ee){if(fe(ee)){ee.type!=="click"&&!D(ee)&&(j.clear(),N.current=!1),H();return}if(b.current.insideReactTree){H();return}const ce=cr(ee),J=`[${xc("inert")}]`,re=ft(ce)?ce.getRootNode():null,xe=Array.from((po(re)?re:Vt(f.select("floatingElement"))).querySelectorAll(J)),$e=f.context.triggerElements;if(ce&&($e.hasElement(ce)||$e.hasMatchingElement(Ye=>dt(Ye,ce))))return;let Xe=ft(ce)?ce:null;for(;Xe&&!di(Xe);){const Ye=Hi(Xe);if(di(Ye)||!ft(Ye))break;Xe=Ye}if(!(xe.length&&ft(ce)&&!g2(ce)&&!dt(ce,f.select("floatingElement"))&&xe.every(Ye=>!dt(Xe,Ye)))){if(zt(ce)&&!("touches"in ee)){const Ye=di(ce),ht=fr(ce),Qe=/auto|scroll/,yt=Ye||Qe.test(ht.overflowX),kt=Ye||Qe.test(ht.overflowY),nt=yt&&ce.clientWidth>0&&ce.scrollWidth>ce.clientWidth,Tt=kt&&ce.clientHeight>0&&ce.scrollHeight>ce.clientHeight,_t=ht.direction==="rtl",st=Tt&&(_t?ee.offsetX<=ce.offsetWidth-ce.clientWidth:ee.offsetX>ce.clientWidth),vt=nt&&ee.offsetY>ce.clientHeight;if(st||vt)return}if(!ge(ee)){if(le()==="intentional"&&N.current){j.clear(),N.current=!1;return}typeof S=="function"&&!S(ee)||q("__outsidePressBubbles")||(f.setOpen(!1,xt(Iv,ee)),H())}}}function oe(ee){le()!=="sloppy"||ee.pointerType==="touch"||!f.select("open")||!n||D(ee)||_e(ee)}function ye(ee){if(le()!=="sloppy"||!f.select("open")||!n||D(ee))return;const ce=ee.touches[0];ce&&(z.current={startTime:Date.now(),startX:ce.clientX,startY:ce.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},I.start(1e3,()=>{z.current&&(z.current.dismissOnTouchEnd=!1,z.current.dismissOnMouseDown=!1)}))}function Se(ee,ce){const J=cr(ee);if(!J)return;const re=It(J,ee.type,()=>{ce(ee),re()})}function Oe(ee){$.current="touch",Se(ee,ye)}function we(ee){I.clear(),ee.type==="pointerdown"&&($.current=ee.pointerType),!(ee.type==="mousedown"&&z.current&&!z.current.dismissOnMouseDown)&&Se(ee,ce=>{ce.type==="pointerdown"?oe(ce):_e(ce)})}function ke(ee){if(!_.current)return;const ce=L.current;if(ue(),le()==="intentional"){if(ee.type==="pointercancel"){ce&&se();return}if(!ge(ee)){if(ce){se();return}typeof S=="function"&&!S(ee)||(j.clear(),N.current=!0,H())}}}function De(ee){if(le()!=="sloppy"||!z.current||D(ee))return;const ce=ee.touches[0];if(!ce)return;const J=Math.abs(ce.clientX-z.current.startX),re=Math.abs(ce.clientY-z.current.startY),xe=Math.sqrt(J*J+re*re);xe>5&&(z.current.dismissOnTouchEnd=!0),xe>10&&(_e(ee),I.clear(),z.current=null)}function Me(ee){Se(ee,De)}function je(ee){le()!=="sloppy"||!z.current||D(ee)||(z.current.dismissOnTouchEnd&&_e(ee),I.clear(),z.current=null)}function He(ee){Se(ee,je)}const be=Vt(m),Re=$i(r&&$i(It(be,"keydown",U),It(be,"compositionstart",Z),It(be,"compositionend",te)),E&&$i(It(be,"click",we,!0),It(be,"pointerdown",we,!0),It(be,"pointerup",ke,!0),It(be,"pointercancel",ke,!0),It(be,"mousedown",we,!0),It(be,"mouseup",ke,!0),It(be,"touchstart",Oe,!0),It(be,"touchmove",Me,!0),It(be,"touchend",He,!0)));return()=>{Re(),V.clear(),j.clear(),ue(),N.current=!1}},[b,m,r,E,S,h,n,T,C,U,H,R,q,D,y,f,I]),v.useEffect(H,[S,H]);const O=v.useMemo(()=>({onKeyDown:U,onPointerDown:F,onClick:F}),[U,F]),P=v.useMemo(()=>({onKeyDown:U,onPointerDown:K,onMouseDown:K,onClickCapture:W,onMouseDownCapture(V){W(),B(V)},onPointerDownCapture(V){W(),B(V)},onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[U,W,B,K]);return v.useMemo(()=>n?{reference:O,floating:P,trigger:O}:{},[n,O,P])}function L1(e,t,n){let{reference:r,floating:s}=e;const a=ci(t),l=Fv(t),c=Bv(l),d=Mr(t),f=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}switch(vo(t)){case"start":y[l]-=b*(n&&f?-1:1);break;case"end":y[l]+=b*(n&&f?-1:1);break}return y}async function uP(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=Ts(t,e),k=JC(y),E=c[b?m==="floating"?"reference":"floating":m],R=vc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:d})),T=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),_=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},L=vc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:C,strategy:d}):T);return{top:(R.top-L.top+k.top)/_.y,bottom:(L.bottom-R.bottom+k.bottom)/_.y,left:(R.left-L.left+k.left)/_.x,right:(L.right-R.right+k.right)/_.x}}const cP=50,fP=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:uP},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=L1(f,r,d),b=r,y=0;const k={};for(let S=0;S<a.length;S++){const E=a[S];if(!E)continue;const{name:R,fn:T}=E,{x:C,y:_,data:L,reset:N}=await T({x:h,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:k,rects:f,platform:c,elements:{reference:e,floating:t}});h=C??h,m=_??m,k[R]={...k[R],...L},N&&y<cP&&(y++,typeof N=="object"&&(N.placement&&(b=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:h,y:m}=L1(f,b,d)),S=-1)}return{x:h,y:m,placement:b,strategy:s,middlewareData:k}},dP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...E}=Ts(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const R=Mr(s),T=ci(c),C=Mr(c)===c,_=await(d.isRTL==null?void 0:d.isRTL(f.floating)),L=b||(C||!S?[Ep(c)]:A2(c)),N=k!=="none";!b&&N&&L.push(...D2(c,S,k,_));const A=[c,...L],$=await d.detectOverflow(t,E),z=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&z.push($[R]),m){const D=N2(s,l,_);z.push($[D[0]],$[D[1]])}if(I=[...I,{placement:s,overflows:z}],!z.every(D=>D<=0)){var Y,H;const D=(((Y=a.flip)==null?void 0:Y.index)||0)+1,F=A[D];if(F&&(!(m==="alignment"?T!==ci(F):!1)||I.every(B=>ci(B.placement)===T?B.overflows[0]>0:!0)))return{data:{index:D,overflows:I},reset:{placement:F}};let U=(H=I.filter(W=>W.overflows[0]<=0).sort((W,B)=>W.overflows[1]-B.overflows[1])[0])==null?void 0:H.placement;if(!U)switch(y){case"bestFit":{var q;const W=(q=I.filter(B=>{if(N){const K=ci(B.placement);return K===T||K==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(K=>K>0).reduce((K,O)=>K+O,0)]).sort((B,K)=>B[1]-K[1])[0])==null?void 0:q[0];W&&(U=W);break}case"initialPlacement":U=c;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function z1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function P1(e){return C2.some(t=>e[t]>=0)}const pP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=Ts(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=z1(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:P1(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=z1(l,n.floating);return{data:{escapedOffsets:c,escaped:P1(c)}}}default:return{}}}}},y_=new Set(["left","top"]);async function hP(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Mr(n),c=vo(n),d=ci(n)==="y",f=y_.has(l)?-1:1,h=a&&d?-1:1,m=Ts(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:k}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof k=="number"&&(y=c==="end"?k*-1:k),d?{x:y*h,y:b*f}:{x:b*f,y:y*h}}const mP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:c}=t,d=await hP(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:a+d.y,data:{...d,placement:l}}}}},gP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:R=>{let{x:T,y:C}=R;return{x:T,y:C}}},...f}=Ts(e,t),h={x:n,y:r},m=await a.detectOverflow(t,f),b=ci(Mr(s)),y=$v(b);let k=h[y],S=h[b];if(l){const R=y==="y"?"top":"left",T=y==="y"?"bottom":"right",C=k+m[R],_=k-m[T];k=Cy(C,k,_)}if(c){const R=b==="y"?"top":"left",T=b==="y"?"bottom":"right",C=S+m[R],_=S-m[T];S=Cy(C,S,_)}const E=d.fn({...t,[y]:k,[b]:S});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[y]:l,[b]:c}}}}}},bP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Ts(e,t),h={x:n,y:r},m=ci(s),b=$v(m);let y=h[b],k=h[m];const S=Ts(c,t),E=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const C=b==="y"?"height":"width",_=a.reference[b]-a.floating[C]+E.mainAxis,L=a.reference[b]+a.reference[C]-E.mainAxis;y<_?y=_:y>L&&(y=L)}if(f){var R,T;const C=b==="y"?"width":"height",_=y_.has(Mr(s)),L=a.reference[m]-a.floating[C]+(_&&((R=l.offset)==null?void 0:R[m])||0)+(_?0:E.crossAxis),N=a.reference[m]+a.reference[C]+(_?0:((T=l.offset)==null?void 0:T[m])||0)-(_?E.crossAxis:0);k<L?k=L:k>N&&(k=N)}return{[b]:y,[m]:k}}}},yP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:l,elements:c}=t,{apply:d=()=>{},...f}=Ts(e,t),h=await l.detectOverflow(t,f),m=Mr(s),b=vo(s),y=ci(s)==="y",{width:k,height:S}=a.floating;let E,R;m==="top"||m==="bottom"?(E=m,R=b===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(R=m,E=b==="end"?"top":"bottom");const T=S-h.top-h.bottom,C=k-h.left-h.right,_=vl(S-h[E],T),L=vl(k-h[R],C),N=!t.middlewareData.shift;let A=_,$=L;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=T),N&&!b){const I=Yr(h.left,0),Y=Yr(h.right,0),H=Yr(h.top,0),q=Yr(h.bottom,0);y?$=k-2*(I!==0||Y!==0?I+Y:Yr(h.left,h.right)):A=S-2*(H!==0||q!==0?H+q:Yr(h.top,h.bottom))}await d({...t,availableWidth:$,availableHeight:A});const z=await l.getDimensions(c.floating);return k!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function v_(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zt(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=xl(n)!==a||xl(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function Gv(e){return ft(e)?e:e.contextElement}function dl(e){const t=Gv(e);if(!zt(t))return Bi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=v_(t);let l=(a?xl(n.width):n.width)/r,c=(a?xl(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const vP=Bi(0);function x_(e){const t=kn(e);return!oh()||!t.visualViewport?vP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function na(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Gv(e);let l=Bi(1);t&&(r?ft(r)&&(l=dl(r)):l=dl(e));const c=xP(a,n,r)?x_(a):Bi(0);let d=(s.left+c.x)/l.x,f=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a){const b=kn(a),y=r&&ft(r)?kn(r):r;let k=b,S=wy(k);for(;S&&r&&y!==k;){const E=dl(S),R=S.getBoundingClientRect(),T=fr(S),C=R.left+(S.clientLeft+parseFloat(T.paddingLeft))*E.x,_=R.top+(S.clientTop+parseFloat(T.paddingTop))*E.y;d*=E.x,f*=E.y,h*=E.x,m*=E.y,d+=C,f+=_,k=kn(S),S=wy(k)}}return vc({width:h,height:m,x:d,y:f})}function gh(e,t){const n=ah(e).scrollLeft;return t?t.left+n:na(Vi(e)).left+n}function k_(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gh(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function kP(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Vi(r),c=t?sh(t.floating):!1;if(r===l||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Bi(1);const h=Bi(0),m=zt(r);if((m||!m&&!a)&&((Wn(r)!=="body"||bo(l))&&(d=ah(r)),m)){const y=na(r);f=dl(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const b=l&&!m&&!a?k_(l,d):Bi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+b.x,y:n.y*f.y-d.scrollTop*f.y+h.y+b.y}}function SP(e){return Array.from(e.getClientRects())}function wP(e){const t=Vi(e),n=ah(e),r=e.ownerDocument.body,s=Yr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Yr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+gh(e);const c=-n.scrollTop;return fr(r).direction==="rtl"&&(l+=Yr(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:l,y:c}}const $1=25;function EP(e,t){const n=kn(e),r=Vi(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,c=0,d=0;if(s){a=s.width,l=s.height;const h=oh();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=gh(r);if(f<=0){const h=r.ownerDocument,m=h.body,b=getComputedStyle(m),y=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,k=Math.abs(r.clientWidth-m.clientWidth-y);k<=$1&&(a-=k)}else f<=$1&&(a+=f);return{width:a,height:l,x:c,y:d}}function TP(e,t){const n=na(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=zt(e)?dl(e):Bi(1),l=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:l,height:c,x:d,y:f}}function B1(e,t,n){let r;if(t==="viewport")r=EP(e,n);else if(t==="document")r=wP(Vi(e));else if(ft(t))r=TP(t,n);else{const s=x_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return vc(r)}function S_(e,t){const n=Hi(e);return n===t||!ft(n)||di(n)?!1:fr(n).position==="fixed"||S_(n,t)}function RP(e,t){const n=t.get(e);if(n)return n;let r=lo(e,[],!1).filter(c=>ft(c)&&Wn(c)!=="body"),s=null;const a=fr(e).position==="fixed";let l=a?Hi(e):e;for(;ft(l)&&!di(l);){const c=fr(l),d=Ov(l);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||bo(l)&&!d&&S_(e,l))?r=r.filter(h=>h!==l):s=c,l=Hi(l)}return t.set(e,r),r}function CP(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?sh(t)?[]:RP(t,this._c):[].concat(n),r],c=B1(t,l[0],s);let d=c.top,f=c.right,h=c.bottom,m=c.left;for(let b=1;b<l.length;b++){const y=B1(t,l[b],s);d=Yr(y.top,d),f=vl(y.right,f),h=vl(y.bottom,h),m=Yr(y.left,m)}return{width:f-m,height:h-d,x:m,y:d}}function _P(e){const{width:t,height:n}=v_(e);return{width:t,height:n}}function NP(e,t,n){const r=zt(t),s=Vi(t),a=n==="fixed",l=na(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Bi(0);function f(){d.x=gh(s)}if(r||!r&&!a)if((Wn(t)!=="body"||bo(s))&&(c=ah(t)),r){const y=na(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const h=s&&!r&&!a?k_(s,c):Bi(0),m=l.left+c.scrollLeft-d.x-h.x,b=l.top+c.scrollTop-d.y-h.y;return{x:m,y:b,width:l.width,height:l.height}}function pb(e){return fr(e).position==="static"}function F1(e,t){if(!zt(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vi(e)===n&&(n=n.ownerDocument.body),n}function w_(e,t){const n=kn(e);if(sh(e))return n;if(!zt(e)){let s=Hi(e);for(;s&&!di(s);){if(ft(s)&&!pb(s))return s;s=Hi(s)}return n}let r=F1(e,t);for(;r&&Kz(r)&&pb(r);)r=F1(r,t);return r&&di(r)&&pb(r)&&!Ov(r)?n:r||Zz(e)||n}const AP=async function(e){const t=this.getOffsetParent||w_,n=this.getDimensions,r=await n(e.floating);return{reference:NP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function OP(e){return fr(e).direction==="rtl"}const E_={convertOffsetParentRelativeRectToViewportRelativeRect:kP,getDocumentElement:Vi,getClippingRect:CP,getOffsetParent:w_,getElementRects:AP,getClientRects:SP,getDimensions:_P,getScale:dl,isElement:ft,isRTL:OP};function T_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function MP(e,t){let n=null,r;const s=Vi(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:h,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const k=ll(m),S=ll(s.clientWidth-(h+b)),E=ll(s.clientHeight-(m+y)),R=ll(h),C={rootMargin:-k+"px "+-S+"px "+-E+"px "+-R+"px",threshold:Yr(0,vl(1,d))||1};let _=!0;function L(N){const A=N[0].intersectionRatio;if(A!==d){if(!_)return l();A?l(!1,A):r=setTimeout(()=>{l(!1,1e-7)},1e3)}A===1&&!T_(f,e.getBoundingClientRect())&&l(),_=!1}try{n=new IntersectionObserver(L,{...C,root:s.ownerDocument})}catch{n=new IntersectionObserver(L,C)}n.observe(e)}return l(!0),a}function Rp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Gv(e),h=s||a?[...f?lo(f):[],...t?lo(t):[]]:[];h.forEach(R=>{s&&R.addEventListener("scroll",n,{passive:!0}),a&&R.addEventListener("resize",n)});const m=f&&c?MP(f,n):null;let b=-1,y=null;l&&(y=new ResizeObserver(R=>{let[T]=R;T&&T.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),t&&y.observe(t));let k,S=d?na(e):null;d&&E();function E(){const R=na(e);S&&!T_(S,R)&&n(),S=R,k=requestAnimationFrame(E)}return n(),()=>{var R;h.forEach(T=>{s&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),m?.(),(R=y)==null||R.disconnect(),y=null,d&&cancelAnimationFrame(k)}}const IP=mP,DP=gP,jP=dP,LP=yP,zP=pP,PP=bP,$P=(e,t,n)=>{const r=new Map,s={platform:E_,...n},a={...s.platform,_c:r};return fP(e,t,{...s,platform:a})};var BP=typeof document<"u",FP=function(){},cp=BP?v.useLayoutEffect:FP;function Cp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Cp(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!Cp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function R_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function U1(e,t){const n=R_(e);return Math.round(t*n)/n}function hb(e){const t=v.useRef(e);return cp(()=>{t.current=e}),t}function C_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[h,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=v.useState(r);Cp(b,r)||y(r);const[k,S]=v.useState(null),[E,R]=v.useState(null),T=v.useCallback(B=>{B!==N.current&&(N.current=B,S(B))},[]),C=v.useCallback(B=>{B!==A.current&&(A.current=B,R(B))},[]),_=a||k,L=l||E,N=v.useRef(null),A=v.useRef(null),$=v.useRef(h),z=d!=null,I=hb(d),Y=hb(s),H=hb(f),q=v.useCallback(()=>{if(!N.current||!A.current)return;const B={placement:t,strategy:n,middleware:b};Y.current&&(B.platform=Y.current),$P(N.current,A.current,B).then(K=>{const O={...K,isPositioned:H.current!==!1};D.current&&!Cp($.current,O)&&($.current=O,Ri.flushSync(()=>{m(O)}))})},[b,t,n,Y,H]);cp(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,m(B=>({...B,isPositioned:!1})))},[f]);const D=v.useRef(!1);cp(()=>(D.current=!0,()=>{D.current=!1}),[]),cp(()=>{if(_&&(N.current=_),L&&(A.current=L),_&&L){if(I.current)return I.current(_,L,q);q()}},[_,L,q,I,z]);const F=v.useMemo(()=>({reference:N,floating:A,setReference:T,setFloating:C}),[T,C]),U=v.useMemo(()=>({reference:_,floating:L}),[_,L]),W=v.useMemo(()=>{const B={position:n,left:0,top:0};if(!U.floating)return B;const K=U1(U.floating,h.x),O=U1(U.floating,h.y);return c?{...B,transform:"translate("+K+"px, "+O+"px)",...R_(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:O}},[n,c,U.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:q,refs:F,elements:U,floatingStyles:W}),[h,q,F,U,W])}const Vv=(e,t)=>{const n=IP(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wv=(e,t)=>{const n=DP(e);return{name:n.name,fn:n.fn,options:[e,t]}},UP=(e,t)=>({fn:PP(e).fn,options:[e,t]}),Kv=(e,t)=>{const n=jP(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yv=(e,t)=>{const n=LP(e);return{name:n.name,fn:n.fn,options:[e,t]}},qP=(e,t)=>{const n=zP(e);return{name:n.name,fn:n.fn,options:[e,t]}};function _p(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function HP(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function __(e){const t=[];let n,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(const c of Array.from(e).sort((d,f)=>d.top-f.top)){if(r=Math.min(r,c.left),s=Math.min(s,c.top),a=Math.max(a,c.right),l=Math.max(l,c.bottom),!n||c.top-n.top>n.height/2)t.push(HP(c));else{const d=t[t.length-1];d.left=Math.min(d.left,c.left),d.right=Math.max(d.right,c.right),d.bottom=Math.max(d.bottom,c.bottom),d.width=d.right-d.left,d.height=d.bottom-d.top}n=c}return{lines:t,fallback:_p(r,s,a,l)}}function N_(e,t,n){return e.findIndex(r=>t>r.left-2&&t<r.right+2&&n>r.top-2&&n<r.bottom+2)}function q1(e){return _p(e.left,e.top,e.right,e.bottom)}function GP(e,t,n){const{lines:r}=__(e.getClientRects());if(r.length<2)return;const s=N_(r,t,n);return{x:t,y:n,lineIndex:s===-1?void 0:s,element:e}}function VP(e,t,n){const{lines:r,fallback:s}=__(e.getClientRects());if(r.length<2)return null;const a=n?.x,l=n?.y,c=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return q1(r[n.lineIndex]);if(a!=null&&l!=null){const k=N_(r,a,l);if(k!==-1)return q1(r[k])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&l!=null)return s;if(c==="t"||c==="b"){const k=r[0],S=r[r.length-1],E=c==="t"?k:S;return _p(E.left,k.top,E.right,S.bottom)}const d=c==="l";let f=r[0].left,h=r[0].right,m=d?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,b=r[0],y=r[0];for(const k of r){f=Math.min(f,k.left),h=Math.max(h,k.right);const S=d?k.left:k.right;d&&S<m||!d&&S>m?(m=S,b=k,y=k):S===m&&(y=k)}return _p(f,b.top,h,y.bottom)}function WP(e){return"contextElement"in e&&e.contextElement?e.contextElement:ft(e)?e:void 0}function KP(e,t){function n(s){A_(e,s.currentTarget,s.clientX,s.clientY)}function r(s){t||n(s)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function A_(e,t,n,r){const s=GP(t,n,r);return e.current=s,s}function YP(e){return{name:"inline",async fn(t){const n=t.elements.reference;if(typeof n?.getClientRects!="function")return{};const r=WP(n),s=e.current,a=s?.element===n||s?.element===r?s:void 0,l=VP(n,t.placement,a);if(!l||typeof t.platform.getElementRects!="function")return{};const c=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return l}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===c.reference.x&&t.rects.reference.y===c.reference.y&&t.rects.reference.width===c.reference.width&&t.rects.reference.height===c.reference.height?{}:{reset:{rects:c}}}}}function O_(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const et=(e,t,n,r,s,a,...l)=>{if(l.length>0)throw new Error(Nn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var mb={exports:{}},gb={};var H1;function XP(){if(H1)return gb;H1=1;var e=Fc();function t(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(m,b){var y=b(),k=r({inst:{value:y,getSnapshot:b}}),S=k[0].inst,E=k[1];return a(function(){S.value=y,S.getSnapshot=b,d(S)&&E({inst:S})},[m,y,b]),s(function(){return d(S)&&E({inst:S}),m(function(){d(S)&&E({inst:S})})},[m]),l(y),y}function d(m){var b=m.getSnapshot;m=m.value;try{var y=b();return!n(m,y)}catch{return!0}}function f(m,b){return b()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return gb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,gb}var G1;function M_(){return G1||(G1=1,mb.exports=XP()),mb.exports}var Xv=M_(),bb={exports:{}},yb={};var V1;function ZP(){if(V1)return yb;V1=1;var e=Fc(),t=M_();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return yb.useSyncExternalStoreWithSelector=function(f,h,m,b,y){var k=a(null);if(k.current===null){var S={hasValue:!1,value:null};k.current=S}else S=k.current;k=c(function(){function R(N){if(!T){if(T=!0,C=N,N=b(N),y!==void 0&&S.hasValue){var A=S.value;if(y(A,N))return _=A}return _=N}if(A=_,r(C,N))return A;var $=b(N);return y!==void 0&&y(A,$)?(C=N,A):(C=N,_=$)}var T=!1,C,_,L=m===void 0?null:m;return[function(){return R(h())},L===null?void 0:function(){return R(L())}]},[h,m,b,y]);var E=s(f,k[0],k[1]);return l(function(){S.hasValue=!0,S.value=E},[E]),d(E),E},yb}var W1;function QP(){return W1||(W1=1,bb.exports=ZP()),bb.exports}var JP=QP();const My=[];let Iy;function e$(){return Iy}function t$(e){My.push(e)}function Zv(e){const t=(n,r)=>{const s=Ir(n$).current;let a;try{Iy=s;for(const l of My)l.before(s);a=e(n,r);for(const l of My)l.after(s);s.didInitialize=!0}finally{Iy=void 0}return a};return t.displayName=e.displayName||e.name,t}function I_(e){return v.forwardRef(Zv(e))}function n$(){return{didInitialize:!1}}const r$=Cv(19),i$=r$?o$:a$;function pt(e,t,n,r,s){return i$(e,t,n,r,s)}function s$(e,t,n,r,s){const a=v.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return Xv.useSyncExternalStore(e.subscribe,a,a)}t$({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],s=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,s)||(t=!0,r.value=s)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const s of e.syncHooks)n.add(s.store);const r=[];for(const s of n)r.push(s.subscribe(t));return()=>{for(const s of r)s()}}),Xv.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function o$(e,t,n,r,s){const a=e$();if(!a)return s$(e,t,n,r,s);const l=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,s))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=s,c.value=t(e.getSnapshot(),n,r,s))):(c={store:e,selector:t,a1:n,a2:r,a3:s,value:t(e.getSnapshot(),n,r,s)},a.syncHooks.push(c)),c.value}function a$(e,t,n,r,s){return JP.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class D_{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,s){return pt(this,t,n,r,s)}}class Qv extends D_{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){v.useDebugValue(t);const r=this;Ge(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ge(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);Ge(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){v.useDebugValue(t);const r=this,s=n!==void 0;Ge(()=>{s&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,s])}select(t,n,r,s){const a=this.selectors[t];return a(this.state,n,r,s)}useState(t,n,r,s){return v.useDebugValue(t),pt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){v.useDebugValue(t);const r=We(n??Vn);this.context[t]=r}useStateSetter(t){const n=v.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let s=r(this.state);return n(s,s,this),this.subscribe(a=>{const l=r(a);if(!Object.is(s,l)){const c=s;s=l,n(l,c,this)}})}}function l$(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}const u$={open:et(e=>e.open),transitionStatus:et(e=>e.transitionStatus),domReferenceElement:et(e=>e.domReferenceElement),referenceElement:et(e=>e.positionReference??e.referenceElement),floatingElement:et(e=>e.floatingElement),floatingId:et(e=>e.floatingId)};class bh extends Qv{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:a,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:m_(),nested:r,triggerElements:a},u$),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&m2(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function c$(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:a,onOpenChange:l}=e,c=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),h=t.context.triggerElements,m=l,b=v.useRef(null);r===void 0&&b.current===null&&(b.current=new bh({open:c,transitionStatus:void 0,referenceElement:d,floatingElement:f,triggerElements:h,onOpenChange:m,floatingId:s,syncOnly:!0,nested:a}));const y=r??b.current;return t.useSyncedValue("floatingId",s),Ge(()=>{const k={open:c,floatingId:s,referenceElement:d,floatingElement:f};ft(d)&&(k.domReferenceElement=d),y.state.positionReference===y.state.referenceElement&&(k.positionReference=d),y.update(k)},[c,s,d,f,y]),y.context.onOpenChange=m,y.context.nested=a,y}function Hc(e,t=!1,n=!1){const[r,s]=v.useState(e&&t?"idle":void 0),[a,l]=v.useState(e);return e&&!a&&(l(!0),s("starting")),!e&&a&&r!=="ending"&&!n&&s("ending"),!e&&!a&&r==="ending"&&s(void 0),Ge(()=>{if(!e&&a&&r!=="ending"&&n){const c=Ar.request(()=>{s("ending")});return()=>{Ar.cancel(c)}}},[e,a,r,n]),Ge(()=>{if(!e||t)return;const c=Ar.request(()=>{s(void 0)});return()=>{Ar.cancel(c)}},[t,e]),Ge(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=Ar.request(()=>{s("idle")});return()=>{Ar.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function j_(e,t=!1,n=!0){const r=yl();return We((s,a=null)=>{r.cancel();const l=bs(e);if(l==null)return;const c=l,d=()=>{Ri.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function f(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||d()}).catch(()=>{if(n){a?.aborted||d();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&f()})}if(t){const h=ea.startingStyle;if(!c.hasAttribute(h)){r.request(f);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),f())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(f)})}function xo(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=We(s),l=j_(r,n,!1);v.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}const Jv={tabIndex:-1,[Ty]:""};function L_(e,t,n=!1){const r=qc(),s=Dl()!=null,a=v.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,s));const l=e??a.current;return c$({popupStore:l,treatPopupAsFloatingElement:n,floatingRootContext:l.state.floatingRootContext,floatingId:r,nested:s,onOpenChange:l.setOpen}),{store:l,internalStore:a.current}}function f$(e,t){const n=v.useRef(null),r=v.useRef(null);return v.useCallback(s=>{if(e===void 0)return;let a=!1;if(n.current!==null){const l=n.current,c=r.current,d=t.context.triggerElements.getById(l);c&&d===c&&(t.context.triggerElements.delete(l),a=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),a=!0),a){const l=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==l&&t.set("triggerCount",l)}},[t,e])}function d$(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function p$(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function z_(e,t,n,r={}){const s=n.reason,a=s===yr,l=t&&s===ap,c=!t&&(s===Ml||s===Dv),d=p$(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const f=()=>{const h={...r.extraState,open:t};l?h.instantType="focus":c?h.instantType="dismiss":a&&(h.instantType=void 0),d$(h,t,n.trigger,d()),e.update(h)};a?Ri.flushSync(f):f()}function P_(e,t,n,r){O_(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function $_(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=f$(e,n),l=We(c=>{if(a(c),!c)return;const d=n.select("open"),f=n.select("activeTriggerId");if(f===e){n.update({activeTriggerElement:c,...d?r:null});return}f==null&&d&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return Ge(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function B_(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),s=e.useState("triggerCount");Ge(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const a=e.context.triggerElements.size,l={};e.state.triggerCount!==a&&(l.triggerCount=a);const c=e.select("activeTriggerId");let d=null;if(c){const f=e.context.triggerElements.getById(c);f?f!==e.state.activeTriggerElement&&(l.activeTriggerElement=f):d=c}if(!d&&!c&&a===1){const f=e.context.triggerElements.entries().next();if(!f.done){const[h,m]=f.value;l.activeTriggerId=h,l.activeTriggerElement=m}}(l.triggerCount!==void 0||l.activeTriggerId!==void 0||l.activeTriggerElement!==void 0)&&e.update(l),d&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){const f=xt(Ei);e.setOpen(!1,f),f.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,n])}function F_(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=Hc(e),l=t.useState("preventUnmountingOnClose"),c=e?!1:l;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:c});const d=We(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return xo({enabled:r&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:a}}function U_(e,t){e.useSyncedValues(t),Ge(()=>()=>{e.update({activeTriggerProps:Ln,inactiveTriggerProps:Ln,popupProps:Ln})},[e])}class yh{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function h$(){return new bh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new yh,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function q_(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:h$(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ln,inactiveTriggerProps:Ln,popupProps:Ln}}function H_(e,t,n=!1){return new bh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const oc=et(e=>e.triggerIdProp??e.activeTriggerId),ex=et(e=>e.openProp??e.open),K1=et(e=>(e.popupElement?.id??e.floatingId)||void 0);function G_(e,t){return t!==void 0&&ex(e)&&oc(e)===t}function m$(e,t){return G_(e,t)?!0:t!==void 0&&ex(e)&&oc(e)==null&&e.triggerCount===1}const V_={open:ex,mounted:et(e=>e.mounted),transitionStatus:et(e=>e.transitionStatus),floatingRootContext:et(e=>e.floatingRootContext),triggerCount:et(e=>e.triggerCount),preventUnmountingOnClose:et(e=>e.preventUnmountingOnClose),payload:et(e=>e.payload),activeTriggerId:oc,activeTriggerElement:et(e=>e.mounted?e.activeTriggerElement:null),popupId:K1,isTriggerActive:et((e,t)=>t!==void 0&&oc(e)===t),isOpenedByTrigger:et((e,t)=>G_(e,t)),isMountedByTrigger:et((e,t)=>t!==void 0&&oc(e)===t&&e.mounted),triggerProps:et((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:et((e,t)=>m$(e,t)?K1(e):void 0),popupProps:et(e=>e.popupProps),popupElement:et(e=>e.popupElement),positionerElement:et(e=>e.positionerElement)};function W_(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=qc(),a=Dl()!=null,l=Ir(()=>new bh({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new yh,floatingId:s,syncOnly:!1,nested:a})).current;return Ge(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=ft(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,s,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=a,l}function g$(e={}){const{nodeId:t,externalTree:n}=e,r=W_(e),s=e.rootContext||r,a=s.useState("referenceElement"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),d=s.useState("open"),f=s.useState("floatingId"),[h,m]=v.useState(null),[b,y]=v.useState(void 0),[k,S]=v.useState(void 0),E=v.useRef(null),R=ua(n),T=v.useMemo(()=>({reference:a,floating:l,domReference:c}),[a,l,c]),C=C_({...e,elements:{...T,...h&&{reference:h}}}),_=ft(b)?b:null,L=k===void 0?s.state.floatingElement:k;s.useSyncedValue("referenceElement",b??null),s.useSyncedValue("domReferenceElement",b===void 0?c:_),s.useSyncedValue("floatingElement",L);const N=v.useCallback(H=>{const q=ft(H)?{getBoundingClientRect:()=>H.getBoundingClientRect(),getClientRects:()=>H.getClientRects(),contextElement:H}:H;m(q),C.refs.setReference(q)},[C.refs]),A=v.useCallback(H=>{(ft(H)||H===null)&&(E.current=H,y(H)),(ft(C.refs.reference.current)||C.refs.reference.current===null||H!==null&&!ft(H))&&C.refs.setReference(H)},[C.refs,y]),$=v.useCallback(H=>{S(H),C.refs.setFloating(H)},[C.refs]),z=v.useMemo(()=>({...C.refs,setReference:A,setFloating:$,setPositionReference:N,domReference:E}),[C.refs,A,$,N]),I=v.useMemo(()=>({...C.elements,domReference:c}),[C.elements,c]),Y=v.useMemo(()=>({...C,dataRef:s.context.dataRef,open:d,onOpenChange:s.setOpen,events:s.context.events,floatingId:f,refs:z,elements:I,nodeId:t,rootStore:s}),[C,z,I,t,s,d,f]);return Ge(()=>{c&&(E.current=c)},[c]),Ge(()=>{s.context.dataRef.current.floatingContext=Y;const H=R?.nodesRef.current.find(q=>q.id===t);H&&(H.context=Y)}),v.useMemo(()=>({...C,context:Y,refs:z,elements:I,rootStore:s}),[C,z,I,Y,s])}const vb=VC&&yo;function K_(e,t={}){const{enabled:n=!0,delay:r}=t,s="rootStore"in e?e.rootStore:e,{events:a,dataRef:l}=s.context,c=v.useRef(!1),d=v.useRef(null),f=v.useRef(!0),h=pi();v.useEffect(()=>{const b=s.select("domReferenceElement");if(!n)return;const y=kn(b);function k(){const R=s.select("domReferenceElement");!s.select("open")&&zt(R)&&R===ar(Vt(R))&&(c.current=!0)}function S(){f.current=!0}function E(){f.current=!1}return $i(It(y,"blur",k),vb&&It(y,"keydown",S,!0),vb&&It(y,"pointerdown",E,!0))},[s,n]),v.useEffect(()=>{if(!n)return;function b(y){if(y.reason===Ml||y.reason===Dv){const k=s.select("domReferenceElement");ft(k)&&(d.current=k,c.current=!0)}}return a.on("openchange",b),()=>{a.off("openchange",b)}},[a,n,s]);const m=v.useMemo(()=>{function b(){c.current=!1,d.current=null}return{onMouseLeave(){b()},onFocus(y){const k=y.currentTarget;if(c.current){if(d.current===k)return;b()}const S=cr(y.nativeEvent);if(ft(S)){if(vb&&!y.relatedTarget){if(!f.current&&!ph(S))return}else if(!y2(S))return}const E=xp(y.relatedTarget,s.context.triggerElements),{nativeEvent:R,currentTarget:T}=y,C=typeof r=="function"?r():r;if(s.select("open")&&E||C===0||C===void 0){s.setOpen(!0,xt(ap,R,T));return}h.start(C,()=>{c.current||s.setOpen(!0,xt(ap,R,T))})},onBlur(y){b();const k=y.relatedTarget,S=y.nativeEvent,E=ft(k)&&k.hasAttribute(xc("focus-guard"))&&k.getAttribute("data-type")==="outside";h.start(0,()=>{const R=s.select("domReferenceElement"),T=ar(Vt(R));!k&&T===R||dt(l.current.floatingContext?.refs.floating.current,T)||dt(R,T)||E||xp(k??T,s.context.triggerElements)||s.setOpen(!1,xt(ap,S))})}}},[l,r,s,h]);return v.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}class tx{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ti,this.restTimeout=new Ti,this.handleCloseOptions=void 0}static create(){return new tx}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Np=new WeakMap;function Ap(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Np.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Np.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Y_(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Np.get(n);a&&a!==e&&Ap(a),Ap(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,Np.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function nx(e){const t=e.context.dataRef.current,n=Ir(()=>t.hoverInteractionState??tx.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),jv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function X_(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:s}=t,a="rootStore"in e?e.rootStore:e,l=a.useState("open"),c=a.useState("floatingElement"),d=a.useState("domReferenceElement"),{dataRef:f}=a.context,h=ua(),m=Dl(),b=nx(a),y=pi(),k=We(()=>XC(f.current.openEvent?.type,b.interactedInside)),S=We(()=>x2(f.current.openEvent?.type)),E=We(()=>{Ap(b)});Ge(()=>{l||(b.pointerType=void 0,b.restTimeoutPending=!1,b.interactedInside=!1,E())},[l,b,E]),v.useEffect(()=>E,[E]),Ge(()=>{if(n&&l&&b.handleCloseOptions?.blockPointerEvents&&S()&&ft(d)&&c){const R=d,T=c,C=Vt(c),_=h?.nodesRef.current.find($=>$.id===m)?.context?.elements.floating;_&&(_.style.pointerEvents="");const L=b.pointerEventsScopeElement!==T?b.pointerEventsScopeElement:null,N=_!==T?_:null,A=b.handleCloseOptions?.getScope?.()??L??N??R.closest("[data-rootownerid]")??C.body;return Y_(b,{scopeElement:A,referenceElement:R,floatingElement:T}),()=>{E()}}},[n,l,d,c,b,S,h,m,E]),v.useEffect(()=>{if(!n)return;function R(){return!!(h&&m&&ho(h.nodesRef.current,m).length>0)}function T($){const z=Sp(r,"close",b.pointerType),I=()=>{a.setOpen(!1,xt(yr,$)),h?.events.emit("floating.closed",$)};z?b.openChangeTimeout.start(z,I):(b.openChangeTimeout.clear(),I())}function C($){const z=cr($);if(!b2(z)){b.interactedInside=!1;return}b.interactedInside=z?.closest("[aria-haspopup]")!=null}function _(){b.openChangeTimeout.clear(),y.clear(),h?.events.off("floating.closed",N),E()}function L($){if(R()&&h){h.events.on("floating.closed",N);return}if(xp($.relatedTarget,a.context.triggerElements))return;const z=f.current.floatingContext?.nodeId??s,I=$.relatedTarget;if(!(h&&z&&ft(I)&&ho(h.nodesRef.current,z,!1).some(H=>dt(H.context?.elements.floating,I)))){if(b.handler){b.handler($);return}E(),S()&&!k()&&T($)}}function N($){!h||!m||R()||y.start(0,()=>{h.events.off("floating.closed",N),a.setOpen(!1,xt(yr,$)),h.events.emit("floating.closed",$)})}const A=c;return $i(A&&It(A,"mouseenter",_),A&&It(A,"mouseleave",L),A&&It(A,"pointerdown",C,!0),()=>{h?.events.off("floating.closed",N)})},[n,c,a,f,r,s,S,k,E,b,h,m,y])}const b$={current:null};function Z_(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:s=null,mouseOnly:a=!1,restMs:l=0,move:c=!0,triggerElementRef:d=b$,externalTree:f,isActiveTrigger:h=!0,getHandleCloseContext:m,isClosing:b,shouldOpen:y}=t,k="rootStore"in e?e.rootStore:e,{dataRef:S,events:E}=k.context,R=ua(f),T=nx(k),C=v.useRef(!1),_=_n(s),L=_n(r),N=_n(l),A=_n(n),$=_n(y),z=_n(b),I=We(()=>XC(S.current.openEvent?.type,T.interactedInside)),Y=We(()=>$.current?.()!==!1),H=We((F,U,W)=>{const B=k.context.triggerElements;if(B.hasElement(U))return!F||!dt(F,U);if(!ft(W))return!1;const K=W;return B.hasMatchingElement(O=>dt(O,K))&&(!F||!dt(F,K))}),q=We(()=>{if(!T.handler)return;Vt(k.select("domReferenceElement")).removeEventListener("mousemove",T.handler),T.handler=void 0}),D=We(()=>{Ap(T)});return h&&(T.handleCloseOptions=_.current?.__options),v.useEffect(()=>q,[q]),v.useEffect(()=>{if(!n)return;function F(U){U.open?C.current=!1:(C.current=U.reason===yr,q(),T.openChangeTimeout.clear(),T.restTimeout.clear(),T.blockMouseMove=!0,T.restTimeoutPending=!1)}return E.on("openchange",F),()=>{E.off("openchange",F)}},[n,E,T,q]),v.useEffect(()=>{if(!n)return;function F(K,O=!0){const P=Sp(L.current,"close",T.pointerType);P?T.openChangeTimeout.start(P,()=>{k.setOpen(!1,xt(yr,K)),R?.events.emit("floating.closed",K)}):O&&(T.openChangeTimeout.clear(),k.setOpen(!1,xt(yr,K)),R?.events.emit("floating.closed",K))}const U=d.current??(h?k.select("domReferenceElement"):null);if(!ft(U))return;function W(K){if(T.openChangeTimeout.clear(),T.blockMouseMove=!1,a&&!ta(T.pointerType))return;const O=k1(N.current),P=Sp(L.current,"open",T.pointerType),V=cr(K),j=K.currentTarget??null,Z=k.select("domReferenceElement");let te=j;if(ft(V)&&!k.context.triggerElements.hasElement(V)){for(const Se of k.context.triggerElements.elements())if(dt(Se,V)){te=Se;break}}ft(j)&&ft(Z)&&!k.context.triggerElements.hasElement(j)&&dt(j,Z)&&(te=Z);const se=te==null?!1:H(Z,te,V),ue=k.select("open"),le=z.current?.()??k.select("transitionStatus")==="ending",fe=!ue&&le&&C.current,ge=!se&&ft(te)&&ft(Z)&&dt(Z,te)&&fe,_e=O>0&&!P,oe=se&&(ue||fe)||ge,ye=!ue||se;if(oe){Y()&&k.setOpen(!0,xt(yr,K,te));return}_e||(P?T.openChangeTimeout.start(P,()=>{ye&&Y()&&k.setOpen(!0,xt(yr,K,te))}):ye&&Y()&&k.setOpen(!0,xt(yr,K,te)))}function B(K){if(I()){D();return}q();const O=k.select("domReferenceElement"),P=Vt(O);T.restTimeout.clear(),T.restTimeoutPending=!1;const V=S.current.floatingContext??m?.();if(xp(K.relatedTarget,k.context.triggerElements))return;if(_.current&&V){k.select("open")||T.openChangeTimeout.clear();const Z=d.current;T.handler=_.current({...V,tree:R,x:K.clientX,y:K.clientY,onClose(){D(),q(),A.current&&!I()&&Z===k.select("domReferenceElement")&&F(K,!0)}}),P.addEventListener("mousemove",T.handler),T.handler(K);return}(T.pointerType!=="touch"||!dt(k.select("floatingElement"),K.relatedTarget))&&F(K)}return c?$i(It(U,"mousemove",W,{once:!0}),It(U,"mouseenter",W),It(U,"mouseleave",B)):$i(It(U,"mouseenter",W),It(U,"mouseleave",B))},[q,D,S,L,k,n,_,T,h,H,I,a,c,N,d,R,A,m,z,Y]),v.useMemo(()=>{if(!n)return;function F(U){T.pointerType=U.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(U){const{nativeEvent:W}=U,B=U.currentTarget,K=k.select("domReferenceElement"),O=k.select("open"),P=H(K,B,U.target);if(a&&!ta(T.pointerType))return;if(O&&P&&T.handleCloseOptions?.blockPointerEvents){const Z=k.select("floatingElement");if(Z){const te=T.handleCloseOptions?.getScope?.()??B.ownerDocument.body;Y_(T,{scopeElement:te,referenceElement:B,floatingElement:Z})}}const V=k1(N.current);if(O&&!P||V===0||!P&&T.restTimeoutPending&&U.movementX**2+U.movementY**2<2)return;T.restTimeout.clear();function j(){if(T.restTimeoutPending=!1,I())return;const Z=k.select("open");!T.blockMouseMove&&(!Z||P)&&Y()&&k.setOpen(!0,xt(yr,W,B))}T.pointerType==="touch"?Ri.flushSync(()=>{j()}):P&&O?j():(T.restTimeoutPending=!0,T.restTimeout.start(V,j))}}},[n,T,I,H,a,k,N,Y])}const y$="Escape";function vh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Rd(e,t){return vh(t,e===YC||e===Pv,e===fh||e===dh)}function xb(e,t,n){return vh(t,e===Pv,n?e===fh:e===dh)||e==="Enter"||e===" "||e===""}function v$(e,t,n){return vh(t,n?e===fh:e===dh,e===Pv)}function x$(e,t,n,r){const s=n?e===dh:e===fh,a=e===YC;return t==="both"||t==="horizontal"&&r?e===y$:vh(t,s,a)}function k$(e,t){const{listRef:n,activeIndex:r,onNavigate:s=()=>{},enabled:a=!0,selectedIndex:l=null,allowEscape:c=!1,loopFocus:d=!1,nested:f=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:k=!0,disabledIndices:S=void 0,orientation:E="vertical",parentOrientation:R,id:T,resetOnPointerLeave:C=!0,externalTree:_,grid:L}=t,N=L!=null,A="rootStore"in e?e.rootStore:e,$=A.useState("open"),z=A.useState("floatingElement"),I=A.useState("domReferenceElement"),Y=A.context.dataRef,H=kp(z),q=Ry(I),D=_n(H),F=Dl(),U=ua(_),W=v.useRef(b),B=v.useRef(l??-1),K=v.useRef(null),O=v.useRef(!0),P=We(ee=>{s(B.current===-1?null:B.current,ee)}),V=v.useRef(!!z),j=v.useRef($),Z=v.useRef(!1),te=v.useRef(!1),se=v.useRef(null),ue=_n(S),le=_n($),fe=_n(l),ge=_n(C),_e=yl(),oe=yl(),ye=We(()=>{function ee(xe){m?U?.events.emit("virtualfocus",xe):se.current=up(xe,{sync:Z.current,preventScroll:!0})}const ce=n.current[B.current],J=te.current;ce&&ee(ce),(Z.current?xe=>xe():xe=>_e.request(xe))(()=>{const xe=n.current[B.current]||ce;if(!xe)return;ce||ee(xe),Me&&(J||!O.current)&&xe.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Ge(()=>{Y.current.orientation=E},[Y,E]),Ge(()=>{a&&($&&z?(B.current=l??-1,W.current&&l!=null&&(te.current=!0,P())):V.current&&(B.current=-1,P()))},[a,$,z,l,P]),Ge(()=>{if(a){if(!$){Z.current=!1;return}if(z)if(r==null){if(Z.current=!1,fe.current!=null)return;if(V.current&&(B.current=-1,ye()),(!j.current||!V.current)&&W.current&&(K.current!=null||W.current===!0&&K.current==null)){let ee=0;const ce=()=>{n.current[0]==null?(ee<2&&(ee?re=>oe.request(re):queueMicrotask)(ce),ee+=1):(B.current=K.current==null||xb(K.current,E,h)||f?lp(n):Ny(n),K.current=null,P())};ce()}}else ic(n.current,r)||(B.current=r,ye(),te.current=!1)}},[a,$,z,r,fe,f,n,E,h,P,ye,oe]),Ge(()=>{if(!a||z||!U||m||!V.current)return;const ee=U.nodesRef.current,ce=ee.find(xe=>xe.id===F)?.context?.elements.floating,J=ar(Vt(I??ce??null)),re=ee.some(xe=>xe.context&&dt(xe.context.elements.floating,J));ce&&!re&&O.current&&ce.focus({preventScroll:!0})},[a,z,I,U,F,m]),Ge(()=>{j.current=$,V.current=!!z}),Ge(()=>{$||(K.current=null,W.current=b)},[$,b]);const Se=r!=null,Oe=We(ee=>{if(!le.current)return;const ce=n.current.indexOf(ee.currentTarget);ce!==-1&&(B.current!==ce||r!==ce)&&(B.current=ce,P(ee))}),we=We(()=>R??U?.nodesRef.current.find(ee=>ee.id===F)?.context?.dataRef?.current.orientation),ke=We(()=>lp(n,ue.current)),De=We(ee=>{if(O.current=!1,Z.current=!0,ee.which===229||!le.current&&ee.currentTarget===D.current)return;if(f&&x$(ee.key,E,h,N)){Rd(ee.key,we())||ji(ee),A.setOpen(!1,xt(m1,ee.nativeEvent)),zt(I)&&(m?U?.events.emit("virtualfocus",I):I.focus());return}const ce=B.current,J=lp(n,S),re=Ny(n,S);if(q||(ee.key==="Home"&&(ji(ee),B.current=J,P(ee)),ee.key==="End"&&(ji(ee),B.current=re,P(ee))),L!=null){const xe=L(ee,B.current,n,E,d,h,S,J,re);if(xe!=null&&(B.current=xe,P(ee)),E==="both")return}if(Rd(ee.key,E)){if(ji(ee),$&&!m&&ar(ee.currentTarget.ownerDocument)===ee.currentTarget){B.current=xb(ee.key,E,h)?J:re,P(ee);return}xb(ee.key,E,h)?d?ce>=re?c&&ce!==n.current.length?B.current=-1:(Z.current=!1,B.current=J):B.current=Ss(n.current,{startingIndex:ce,disabledIndices:S}):B.current=Math.min(re,Ss(n.current,{startingIndex:ce,disabledIndices:S})):d?ce<=J?c&&ce!==-1?B.current=n.current.length:(Z.current=!1,B.current=re):B.current=Ss(n.current,{startingIndex:ce,decrement:!0,disabledIndices:S}):B.current=Math.max(J,Ss(n.current,{startingIndex:ce,decrement:!0,disabledIndices:S})),ic(n.current,B.current)&&(B.current=-1),P(ee)}}),Me=v.useMemo(()=>({onFocus(ce){Z.current=!0,Oe(ce)},onClick:({currentTarget:ce})=>ce.focus({preventScroll:!0}),onMouseMove(ce){Z.current=!0,te.current=!1,y&&Oe(ce)},onPointerLeave(ce){if(!le.current||!O.current||ce.pointerType==="touch")return;Z.current=!0;const J=ce.relatedTarget;if(!(!y||n.current.includes(J))&&ge.current&&(se.current?.(),se.current=null,B.current=-1,P(ce),!m)){const re=D.current,xe=ar(Vt(re));re&&dt(re,xe)&&re.focus({preventScroll:!0})}}}),[Oe,le,D,y,n,P,ge,m]),je=v.useMemo(()=>m&&$&&Se&&{"aria-activedescendant":`${T}-${r}`},[m,$,Se,T,r]),He=v.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...q?{}:je,onKeyDown(ee){if(ee.key==="Tab"&&ee.shiftKey&&$&&!m){const ce=cr(ee.nativeEvent);if(ce&&!dt(D.current,ce))return;ji(ee),A.setOpen(!1,xt(lh,ee.nativeEvent)),zt(I)&&I.focus();return}De(ee)},onPointerMove(){O.current=!0}}),[je,De,D,E,q,A,$,m,I]),be=v.useMemo(()=>{function ee(re){A.setOpen(!0,xt(m1,re.nativeEvent,re.currentTarget))}function ce(re){b==="auto"&&zv(re.nativeEvent)&&(W.current=!m)}function J(re){W.current=b,b==="auto"&&WC(re.nativeEvent)&&(W.current=!0)}return{onKeyDown(re){const xe=A.select("open");O.current=!1;const $e=re.key.startsWith("Arrow"),Xe=v$(re.key,we(),h),Ye=Rd(re.key,E),ht=(f?Xe:Ye)||re.key==="Enter"||re.key.trim()==="";if(m&&xe)return De(re);if(!(!xe&&!k&&$e)){if(ht){const Qe=Rd(re.key,we());K.current=f&&Qe?null:re.key}if(f){Xe&&(ji(re),xe?(B.current=ke(),P(re)):ee(re));return}Ye&&(fe.current!=null&&(B.current=fe.current),ji(re),!xe&&k?ee(re):De(re),xe&&P(re))}},onFocus(re){A.select("open")&&!m&&(B.current=-1,P(re))},onPointerDown:J,onPointerEnter:J,onMouseDown:ce,onClick:ce}},[De,b,ke,f,P,A,k,E,we,h,fe,m]),Re=v.useMemo(()=>({...je,...be}),[je,be]);return v.useMemo(()=>a?{reference:Re,floating:He,item:Me,trigger:be}:{},[a,Re,He,be,Me])}function S$(e,t){const{listRef:n,elementsRef:r,activeIndex:s,onMatch:a,disabledIndices:l,onTyping:c,enabled:d=!0,resetMs:f=750,selectedIndex:h=null}=t,m="rootStore"in e?e.rootStore:e,b=m.useState("open"),y=pi(),k=v.useRef(""),S=v.useRef(h??s??-1),E=v.useRef(null),R=We(_=>{function L(D){const F=r?.current[D];return!F||hh(F)}function N(D){return L(D)?l==null||!Tp(fo,D,l):!1}function A(D,F,U=0){if(D.length===0)return-1;const W=(U%D.length+D.length)%D.length,B=F.toLowerCase();for(let K=0;K<D.length;K+=1){const O=(W+K)%D.length;if(!(!D[O]?.toLowerCase().startsWith(B)||!N(O)))return O}return-1}const $=n.current;if(k.current.length>0&&_.key===" "&&(ji(_),c?.(!0)),k.current.length>0&&k.current[0]!==" "&&A($,k.current)===-1&&_.key!==" "&&c?.(!1),$==null||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;b&&_.key!==" "&&(ji(_),c?.(!0));const z=k.current==="";z&&(S.current=h??s??-1),$.every((D,F)=>D&&N(F)?D[0]?.toLowerCase()!==D[1]?.toLowerCase():!0)&&k.current===_.key&&(k.current="",S.current=E.current),k.current+=_.key,y.start(f,()=>{k.current="",S.current=E.current,c?.(!1)});const H=((z?h??s??-1:S.current)??0)+1,q=A($,k.current,H);q!==-1?(a?.(q),E.current=q):_.key!==" "&&(k.current="",c?.(!1))}),T=We(_=>{const L=_.relatedTarget,N=m.select("domReferenceElement"),A=m.select("floatingElement");dt(N,L)||dt(A,L)||(y.clear(),k.current="",S.current=E.current,c?.(!1))});Ge(()=>{!b&&h!==null||(y.clear(),E.current=null,k.current!==""&&(k.current=""))},[b,h,y]),Ge(()=>{b&&k.current===""&&(S.current=h??s??-1)},[b,h,s]);const C=v.useMemo(()=>({onKeyDown:R,onBlur:T}),[R,T]);return v.useMemo(()=>d?{reference:C,floating:C}:{},[d,C])}const Y1=.1,w$=Y1*Y1,dn=.5;function Cd(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function _d(e,t,n,r,s,a,l,c,d,f){let h=!1;return Cd(e,t,n,r,s,a)&&(h=!h),Cd(e,t,s,a,l,c)&&(h=!h),Cd(e,t,l,c,d,f)&&(h=!h),Cd(e,t,d,f,n,r)&&(h=!h),h}function E$(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Nd(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),d=Math.min(r,a),f=Math.max(r,a);return e>=l&&e<=c&&t>=d&&t<=f}function Q_(e={}){const{blockPointerEvents:t=!1}=e,n=new Ti,r=({x:s,y:a,placement:l,elements:c,onClose:d,nodeId:f,tree:h})=>{const m=l?.split("-")[0];let b=!1,y=null,k=null,S=typeof performance<"u"?performance.now():0;function E(T,C){const _=performance.now(),L=_-S;if(y===null||k===null||L===0)return y=T,k=C,S=_,!1;const N=T-y,A=C-k,$=N*N+A*A,z=L*L*w$;return y=T,k=C,S=_,$<z}function R(){n.clear(),d()}return function(C){n.clear();const _=c.domReference,L=c.floating;if(!_||!L||m==null||s==null||a==null)return;const{clientX:N,clientY:A}=C,$=cr(C),z=C.type==="mouseleave",I=dt(L,$),Y=dt(_,$);if(I&&(b=!0,!z))return;if(Y&&(b=!1,!z)){b=!0;return}if(z&&ft(C.relatedTarget)&&dt(L,C.relatedTarget))return;function H(){return!!(h&&ho(h.nodesRef.current,f).length>0)}function q(){H()||R()}if(H())return;const D=_.getBoundingClientRect(),F=L.getBoundingClientRect(),U=s>F.right-F.width/2,W=a>F.bottom-F.height/2,B=F.width>D.width,K=F.height>D.height,O=(B?D:F).left,P=(B?D:F).right,V=(K?D:F).top,j=(K?D:F).bottom;if(m==="top"&&a>=D.bottom-1||m==="bottom"&&a<=D.top+1||m==="left"&&s>=D.right-1||m==="right"&&s<=D.left+1){q();return}let Z=!1;switch(m){case"top":Z=Nd(N,A,O,D.top+1,P,F.bottom-1);break;case"bottom":Z=Nd(N,A,O,F.top+1,P,D.bottom-1);break;case"left":Z=Nd(N,A,F.right-1,j,D.left+1,V);break;case"right":Z=Nd(N,A,D.right-1,j,F.left+1,V);break}if(Z)return;if(b&&!E$(N,A,D)){q();return}if(!z&&E(N,A)){q();return}let te=!1;switch(m){case"top":{const se=B?dn/2:dn*4,ue=B||U?s+se:s-se,le=B?s-se:U?s+se:s-se,fe=a+dn+1,ge=U||B?F.bottom-dn:F.top,_e=U?B?F.bottom-dn:F.top:F.bottom-dn;te=_d(N,A,ue,fe,le,fe,F.left,ge,F.right,_e);break}case"bottom":{const se=B?dn/2:dn*4,ue=B||U?s+se:s-se,le=B?s-se:U?s+se:s-se,fe=a-dn,ge=U||B?F.top+dn:F.bottom,_e=U?B?F.top+dn:F.bottom:F.top+dn;te=_d(N,A,ue,fe,le,fe,F.left,ge,F.right,_e);break}case"left":{const se=K?dn/2:dn*4,ue=K||W?a+se:a-se,le=K?a-se:W?a+se:a-se,fe=s+dn+1,ge=W||K?F.right-dn:F.left,_e=W?K?F.right-dn:F.left:F.right-dn;te=_d(N,A,ge,F.top,_e,F.bottom,fe,ue,fe,le);break}case"right":{const se=K?dn/2:dn*4,ue=K||W?a+se:a-se,le=K?a-se:W?a+se:a-se,fe=s-dn,ge=W||K?F.left+dn:F.right,_e=W?K?F.left+dn:F.right:F.left+dn;te=_d(N,A,fe,ue,fe,le,ge,F.top,_e,F.bottom);break}}te?b||n.start(40,q):q()}};return r.__options={...e,blockPointerEvents:t},r}const ac="ArrowUp",lc="ArrowDown",Op="ArrowLeft",Mp="ArrowRight",xh="Home",kh="End",J_=new Set([Op,Mp]),T$=new Set([Op,Mp,xh,kh]),eN=new Set([ac,lc]),R$=new Set([ac,lc,xh,kh]),tN=new Set([...J_,...eN]),nN=new Set([...tN,xh,kh]),C$="Shift",_$="Control",N$="Alt",A$="Meta",O$=new Set([C$,_$,N$,A$]);function M$(e){return zt(e)&&e.tagName==="INPUT"}function X1(e){return!!(M$(e)&&e.selectionStart!=null||zt(e)&&e.tagName==="TEXTAREA")}function Z1(e,t,n,r){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,a=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const d=Q1(e,t,"left"),f=Ad(e),h=Ad(t);n==="ltr"&&(d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:d-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(s=d-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(d-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?s=d-h.scrollMarginLeft-f.scrollPaddingLeft:d+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(s=d+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(c&&r!=="horizontal"){const d=Q1(e,t,"top"),f=Ad(e),h=Ad(t);d-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?a=d-h.scrollMarginTop-f.scrollPaddingTop:d+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(a=d+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function Q1(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[r],t.offsetParent!==e);)t=t.offsetParent;return s}function Ad(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function I$(e){return Cv(19)?e:e?"true":void 0}const D$=v.forwardRef(function(t,n){const{cutout:r,...s}=t;let a;if(r){const l=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${l.left}px ${l.top}px,${l.left}px ${l.bottom}px,${l.right}px ${l.bottom}px,${l.right}px ${l.top}px,${l.left}px ${l.top}px)`}return g.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})});let J1={},eE={},tE="";function j$(e){if(typeof document>"u")return!1;const t=Vt(e);return kn(t).innerWidth-t.documentElement.clientWidth>0}function L$(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Vt(e),r=n.documentElement,s=n.body,a=bo(r)?r:s,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const d=a.offsetWidth;a.style.overflowY="hidden";const f=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,d===f}function z$(e){const t=Vt(e),n=t.documentElement,r=t.body,s=bo(n)?n:r,a={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,a)}}function P$(e){const t=Vt(e),n=t.documentElement,r=t.body,s=kn(n);let a=0,l=0,c=!1;const d=Ar.create();if(yo&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=s.getComputedStyle(n),k=s.getComputedStyle(r),R=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,J1={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},tE=n.style.scrollBehavior,eE={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const T=n.scrollHeight>n.clientHeight,C=n.scrollWidth>n.clientWidth,_=y.overflowY==="scroll"||k.overflowY==="scroll",L=y.overflowX==="scroll"||k.overflowX==="scroll",N=Math.max(0,s.innerWidth-r.clientWidth),A=Math.max(0,s.innerHeight-r.clientHeight),$=parseFloat(k.marginTop)+parseFloat(k.marginBottom),z=parseFloat(k.marginLeft)+parseFloat(k.marginRight),I=bo(n)?n:r;if(c=L$(e),c){n.style.scrollbarGutter=R,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(T||_)&&(n.style.overflowY="scroll"),(C||L)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||A?`calc(100dvh - ${$+A}px)`:"100dvh",width:z||N?`calc(100vw - ${z+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,J1),Object.assign(r.style,eE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=tE)}function m(){h(),d.request(f)}f();const b=It(s,"resize",m);return()=>{d.cancel(),h(),typeof s.removeEventListener=="function"&&b()}}class $${lockCount=0;restore=null;timeoutLock=Ti.create();timeoutUnlock=Ti.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Vt(t).documentElement,s=kn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=Vn;return}const a=ch||!j$(t);this.restore=a?z$(t):P$(t)}}const B$=new $$;function F$(e=!0,t=null){Ge(()=>{if(e)return B$.acquire(t)},[e,t])}function U$(e){const t=v.useRef(""),n=v.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:v.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:n}}function rN(e,t){const n=v.useRef(e),r=We(t);Ge(()=>{n.current!==e&&r(n.current)},[e,r]),Ge(()=>{n.current=e},[e])}function q$(e,t){const n=We((a,l)=>{(typeof e=="function"?e():e)||t(l||(ch?"touch":""))}),{onClick:r,onPointerDown:s}=U$(n);return v.useMemo(()=>({onClick:r,onPointerDown:s}),[r,s])}function H$(e){const[t,n]=v.useState(null),r=q$(e,n);return rN(e,s=>{s&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const G$=v.createContext(void 0);function Ci(){return v.useContext(G$)?.direction??"ltr"}const iN={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-biomejs":"","file-type-bower":"","file-type-bun":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-dart":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prettier":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-dialog":"","layout-empty":"","layout-floating-window":"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""},V$={account:"",add:"",agent:"","agent-circle":"","agent-square":"",agents:"","agents-swarm":"","alarm-clock":"",alert:"",archive:"","army-base":"","arrow-block-down":"","arrow-block-left":"","arrow-block-line-down":"","arrow-block-line-left":"","arrow-block-line-right":"","arrow-block-line-up":"","arrow-block-right":"","arrow-block-up":"","arrow-bracket-from-down":"","arrow-bracket-from-left":"","arrow-bracket-from-right":"","arrow-bracket-from-up":"","arrow-bracket-from-up-dashed":"","arrow-bracket-to-down":"","arrow-bracket-to-left":"","arrow-bracket-to-right":"","arrow-bracket-to-up":"","arrow-ccw":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-cw":"","arrow-down":"","arrow-left":"","arrow-left-down":"","arrow-left-up":"","arrow-right":"","arrow-right-down":"","arrow-right-up":"","arrow-square-down":"","arrow-square-from-down":"","arrow-square-from-left":"","arrow-square-from-right":"","arrow-square-from-up":"","arrow-square-left":"","arrow-square-left-down":"","arrow-square-left-top":"","arrow-square-left-up":"","arrow-square-right":"","arrow-square-right-down":"","arrow-square-right-top":"","arrow-square-right-up":"","arrow-square-to-down":"","arrow-square-to-left":"","arrow-square-to-right":"","arrow-square-to-up":"","arrow-square-up":"","arrow-swap":"","arrow-u-up-left":"","arrow-u-up-right":"","arrow-up":"","arrows-both-horizontal":"","arrows-both-vertical":"","arrows-ccw":"","arrows-ccw-angular":"","arrows-contract":"","arrows-contract-simple":"","arrows-cw":"","arrows-down-up":"","arrows-expand":"","arrows-expand-simple":"","arrows-left-right":"","arrows-out-cardinal":"",asterisk:"",at:"",atom:"",bandaid:"",banknote:"","banknotes-stack":"",barbell:"",basketball:"","beach-umbrella":"",beaker:"","beaker-stop":"",beehouse:"",bell:"","bell-dot":"","bell-slash":"",binary:"",binoculars:"",bluetooth:"","board-kanban":"",book:"","book-open":"",bookmark:"",books:"",bowtie:"",bracket:"","bracket-dot":"","bracket-error":"","brackets-curly":"","brackets-curly-dot":"","brackets-curly-x":"","brackets-square":"",brain:"","brain-hourglass":"","brain-simple":"","brain-simplest":"","brain-slash":"",briefcase:"",browser:"",browsers:"",brush:"",bug:"",bugbot:"",building:"",buildings:"",bullseye:"",calculator:"",calendar:"","calendar-hourglass":"",camera:"",car:"",cardholder:"",castle:"",cd:"","chart-bars":"","chart-line":"","chart-pie":"","chart-pyramid":"","chart-scatter":"","chat-bubble":"","chat-bubble-chevrons-left-right":"","chat-bubble-ellipsis":"","chat-bubble-exclamation":"","chat-bubble-pencil":"","chat-bubble-question":"","chat-bubbles":"","chat-bubbles-grid":"",chatBubble:"","chatBubble-ellipsis":"","chatBubble-exclamation":"","chatBubble-question":"",chatBubbles:"",check:"","check-circle":"","check-square":"",checks:"","chef-hat":"","chess-king":"","chess-tower":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-down-small":"","chevron-left":"","chevron-left-small":"","chevron-right":"","chevron-right-small":"","chevron-up":"","chevron-up-small":"","chevrons-down":"","chevrons-down-up":"","chevrons-left":"","chevrons-left-right":"","chevrons-right":"","chevrons-right-dotted-left":"","chevrons-up":"","chevrons-up-down":"",chip:"","chip-simple":"",circle:"","circle-circle":"","circle-dashed":"",circles:"","circles-check":"",clipboard:"",clock:"",clone:"",close:"",cloud:"","cloud-arrow-down":"","cloud-arrow-up":"","cloud-download":"","cloud-upload":"",code:"","code-brackets":"","code-simple":"",cog:"",collection:"","collection-plus":"","color-mode":"",command:"",comment:"","comment-dashed":"","comment-discussion":"","comment-dot":"",comments:"",compass:"","compass-check":"","compass-dot":"",conversation:"",cookie:"",copilot:"",copy:"","corners-in":"","corners-out":"","corners-out-check":"","corners-out-sparkle":"","cost-high":"","cost-low":"","cost-medium":"","credit-card":"","cross-medical":"",crosshair:"",crown:"","crystal-ball":"",cube:"","cube-coordinates":"","cube-nodes":"","cube-transparent":"","currency-btc":"","currency-dollar":"","currency-eth":"","cursor-logo":"","cursor-text":"",cutlery:"",cylinder:"",dashboard:"",database:"","database-network":"","debug-pause":"","debug-restart":"","debug-start":"","debug-stop":"","deckchair-umbrella":"","desktop-download":"","device-camera":"","device-camera-video":"","device-desktop":"","device-mobile":"",diagram:"",diff:"","diff-added":"","diff-ignored":"","diff-modified":"","diff-multiple":"","diff-removed":"","diff-renamed":"","diff-single":"","diff-single-arrow-right-up":"","diff-single-dot":"",discard:"",display:"","display-check":"","display-circle":"","display-connect":"","display-play":"","display-waves":"",displays:"","dots-3-horizontal":"","dots-3-vertical":"",drop:"",easel:"",edit:"",elephant:"",ellipsis:"",envelope:"","envelope-open":"",eraser:"",error:"","exclamation-circle":"","exclamation-triangle":"","execution-parallel":"","execution-sequential":"",extensions:"",eye:"","eye-closed":"","eye-slash":"","fast-backward":"","fast-forward":"",feedback:"",file:"","file-add":"","file-arrow-right-up":"","file-binary":"","file-chevrons-left-right":"","file-code":"","file-directory":"","file-directory-create":"","file-image":"","file-list":"","file-lock":"","file-media":"","file-pdf":"","file-plus":"","file-text":"","file-type-adobe-illustrator":"","file-type-adobe-photoshop":"","file-type-babel":"","file-type-bazel":"","file-type-bevy":"","file-type-bicep":"","file-type-biomejs":"","file-type-bower":"","file-type-bun":"","file-type-c-plus-plus":"","file-type-c-sharp":"","file-type-clojure":"","file-type-crystal":"","file-type-cuda":"","file-type-dart":"","file-type-docker":"","file-type-ejs":"","file-type-elixir":"","file-type-eslint":"","file-type-f-sharp":"","file-type-firebase":"","file-type-geckodriver":"","file-type-git-meta":"","file-type-go":"","file-type-godot":"","file-type-grails":"","file-type-graphql":"","file-type-groovy":"","file-type-grunt":"","file-type-gulp":"","file-type-haml":"","file-type-handlebars":"","file-type-haskell":"","file-type-ionic":"","file-type-java":"","file-type-javascript":"","file-type-julia":"","file-type-jupyter":"","file-type-karma":"","file-type-kotlin":"","file-type-latex":"","file-type-liquid":"","file-type-maven":"","file-type-mustache":"","file-type-npm":"","file-type-nunjucks":"","file-type-ocaml":"","file-type-odata":"","file-type-pdf":"","file-type-perl":"","file-type-platformio":"","file-type-powershell":"","file-type-prettier":"","file-type-prisma":"","file-type-prolog":"","file-type-puppet":"","file-type-python":"","file-type-reason":"","file-type-rescript":"","file-type-rollup":"","file-type-rust":"","file-type-sass":"","file-type-sbt":"","file-type-scala":"","file-type-slim":"","file-type-stylus":"","file-type-sublime":"","file-type-svelte":"","file-type-swift":"","file-type-terraform":"","file-type-typescript":"","file-type-vala":"","file-type-vite":"","file-type-vsc":"","file-type-vue":"","file-type-web-assembly":"","file-type-webpack":"","file-type-windows":"","file-type-yarn":"","file-type-zig":"","file-zip":"",files:"","film-reel":"","film-strip":"",filter:"",flag:"","flag-hill":"",flame:"",flask:"","flask-slash-circle":"","floppy-disc":"","focus-window":"","fold-dashed":"",folder:"","folder-active":"","folder-arrow-right-up":"","folder-check":"","folder-dashed":"","folder-library":"","folder-open":"","folder-opened":"","folder-plus":"",folders:"",fork:"",funnel:"","funnel-simple":"","game-controller":"","game-controller-retro":"",gauge:"",gear:"",gem:"",gift:"","git-branch":"","git-commit":"","git-commit-horizontal":"","git-compare":"","git-fetch":"","git-fork":"","git-merge":"","git-pull":"","git-pull-request":"","git-pull-request-closed":"","git-pull-request-create":"","git-pull-request-done":"","git-pull-request-draft":"","git-push":"",github:"","github-actions":"",globe:"","graduation-cap":"",graph:"","graph-line":"","graph-scatter":"",grid:"","grid-plus":"","grid-sparkle":"",gripper:"",hamburger:"",hammer:"",hash:"",hat:"",headphones:"",headset:"",heart:"",hexagon:"",history:"",home:"",hourglass:"",house:"","i-circle":"",image:"","image-square":"",inbox:"",infinity:"",info:"",inspect:"",issue:"","issue-closed":"","issue-draft":"",issues:"",joystick:"",json:"","kebab-horizontal":"","kebab-vertical":"",key:"",keyboard:"","keyboard-tab":"",laptop:"",layers:"","layout-dialog":"","layout-empty":"","layout-floating-window":"","layout-panel-bottom":"","layout-panel-bottom-dock":"","layout-panel-bottom-on":"","layout-panel-bottom-undock":"","layout-panel-off":"","layout-sidebar-left":"","layout-sidebar-left-dock":"","layout-sidebar-left-off":"","layout-sidebar-left-on":"","layout-sidebar-left-undock":"","layout-sidebar-right":"","layout-sidebar-right-dock":"","layout-sidebar-right-off":"","layout-sidebar-right-on":"","layout-sidebar-right-undock":"","layout-split-horizontal":"","layout-split-horizontal-dashed":"","layout-split-horizontal-right-dock":"","layout-split-horizontal-right-undock":"","layout-split-vertical":"",leaf:"",lego:"",library:"",lightbulb:"","lightbulb-sparkle":"",lightning:"",link:"","link-external":"","list-bullets":"","list-checks":"","list-filter":"","list-ordered":"","list-todo":"","list-todo-subtask":"","list-x":"",loading:"",location:"",lock:"","lock-locked":"","lock-unlocked":"","logo-azure":"","logo-azure-devops":"","logo-figma":"","logo-github":"","logo-gitlab":"","logo-jira":"","logo-linear":"","logo-markdown":"","logo-mcp":"","logo-microsoft-teams":"","logo-notion":"","logo-python":"","logo-sentry":"","logo-slack":"","logo-vscode":"","logo-vscode-insiders":"","logo-x":"","mac-mini":"","magic-wand":"",magnet:"","magnifying-glass":"","magnifying-glass-fuzzy":"","magnifying-glass-minus":"","magnifying-glass-plus":"","magnifying-glass-slash-circle":"","magnifying-glass-sparkle":"",magnifyingGlass:"","magnifyingGlass-minus":"","magnifyingGlass-plus":"","magnifyingGlass-slash-circle":"",mail:"",map:"","map-pin":"","mark-github":"",markdown:"","mask-happy":"","masks-happy":"",mcp:"",megaphone:"",mention:"",menu:"",merge:"",mic:"",microscope:"",minus:"","minus-circle":"","minus-small":"",mobile:"",moon:"","moon-sparkle":"","moon-z":"",more:"",music:"",mute:"","new-file":"","new-folder":"",newspaper:"",note:"","one-circle":"",organization:"","organization-filled":"",owl:"",package:"","package-zipper":"","paint-roller":"",palette:"",paperclip:"",paperplane:"",paragraph:"",pass:"",pause:"","pause-circle":"",paw:"","pen-nib":"",pencil:"","pencil-square":"",pentagon:"",people:"","people-3":"",percent:"",person:"","person-add":"","person-chat-bubble":"","person-circle":"","person-follow":"","person-plus":"",piano:"","pie-chart":"",pilcrow:"",pin:"","pin-slash":"",pipe:"",plan:"",plane:"",play:"","play-bug":"","play-circle":"","play-slow":"","play-super-fast":"","playback-loop":"","plays-bug":"",plug:"","plug-slash":"",plus:"","plus-circle":"","plus-minus":"","pointer-arrow":"",pug:"",pulse:"","puzzle-piece":"",question:"","question-circle":"",quote:"",radar:"","radio-tower":"","rect-magnifying-glass":"","rect-magnifyingGlass":"",redo:"",refresh:"",regex:"","remote-control":"",remove:"","remove-close":"",replace:"","replace-all":"",report:"",return:"",review:"",robot:"",rocket:"","rocking-chair":"",rss:"",ruler:"",rules:"",run:"",satellite:"",scales:"",seal:"","seal-check":"","seal-question":"",search:"","search-stop":"",send:"",server:"",servers:"",settings:"","settings-gear":"","shapes-square-circle":"",share:"",shield:"","shield-check":"","shield-question":"","shield-x":"","shoe-fast":"","shopping-bag":"","shopping-basket":"",signal:"",skills:"","skills-capability":"","slash-circle":"",sliders:"",smartwatch:"","smiley-happy":"","smiley-happy-square":"","smiley-neutral":"","smiley-plus":"","smiley-sad":"",snowflake:"","soccer-ball":"","sort-ascending":"","sort-descending":"","source-control":"",sparkle:"",sparkles:"","speaker-hifi":"","speaker-waves":"","speaker-x":"",spinner:"",split:"","split-horizontal":"","split-vertical":"",sprint:"",square:"","square-dashed":"","square-dot":"",squares:"","squares-minus":"","squares-plus":"","squares-x":"",stack:"",star:"","star-empty":"","star-full":"","status-done":"","status-draft":"","status-needs-attention":"",stop:"","stop-circle":"",stopwatch:"",storefront:"",sun:"",swatches:"","symbol-folder":"",sync:"","t-shirt":"",table:"",tabs:"",tag:"","tags-chevron-down":"","tags-chevron-left":"","tags-chevron-right":"","tags-chevron-up":"",target:"",terminal:"","terminal-rectangle":"","text-aa":"","text-ab":"","text-b":"","text-c":"","text-d":"","text-italic":"","text-j":"","text-r":"","text-s":"","text-strikethrough":"","text-t":"","text-t-square":"","text-tt":"","text-y":"","thinking-high":"","thinking-low":"","thinking-medium":"","threads-parallel":"","threads-single":"","three-bars":"","thumbs-down":"","thumbs-up":"",thumbsdown:"",thumbsup:"","traffic-cone":"",trafficCone:"",trash:"",trashcan:"",tray:"","treasure-chest":"","trending-down":"","trending-up":"","triangle-small-down":"","triangle-small-left":"","triangle-small-right":"","triangle-small-up":"",twig:"","unfold-dashed":"",unlock:"",unmute:"",unverified:"",vault:"",verified:"",versions:"","video-camera":"",vm:"",vr:"","vr-headset":"","vr-headset-head":"",wallet:"",wand:"",warning:"",watch:"",waveform:"","whole-word":"",window:"","window-pointer-arrow":"",windows:"",wrench:"",x:"","x-circle":"",yarn:"",zap:"",zipper:"","zoom-in":"","zoom-out":"",zzz:""},W$=Object.keys(iN);function K$(e,t="outline"){return t==="filled"?V$[e]:iN[e]}const Y$={root:{km0Bbg:"ui-ngwomw",$$css:!0}},X$=new Set(["ui-progress-spin","cursor-icon-spin"]);function Z$(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&X$.has(t.animationName)&&(t.startTime=0)}const Dy=v.createContext(void 0);function Cs({iconSize:e,iconButtonSize:t,iconButtonVariant:n,iconButtonTone:r,iconButtonRootStyle:s,iconButtonIconStyle:a,iconButtonIconSize:l,buttonSize:c,buttonRootStyle:d,buttonVariant:f,buttonTone:h,buttonIconSize:m,buttonRounded:b,buttonFullWidth:y,menuSize:k,disabled:S,children:E}){const R=v.useContext(Dy),T=v.useMemo(()=>({iconSize:e??R?.iconSize,iconButtonSize:t??R?.iconButtonSize,iconButtonVariant:n??R?.iconButtonVariant,iconButtonTone:r??R?.iconButtonTone,iconButtonRootStyle:s??R?.iconButtonRootStyle,iconButtonIconStyle:a??R?.iconButtonIconStyle,iconButtonIconSize:l??R?.iconButtonIconSize,buttonSize:c??R?.buttonSize,buttonRootStyle:d??R?.buttonRootStyle,buttonVariant:f??R?.buttonVariant,buttonTone:h??R?.buttonTone,buttonIconSize:m??R?.buttonIconSize,buttonRounded:b??R?.buttonRounded,buttonFullWidth:y??R?.buttonFullWidth,menuSize:k??R?.menuSize,disabled:S??R?.disabled}),[y,h,m,d,b,c,f,S,l,a,r,s,t,n,e,k,R]);return g.jsx(Dy.Provider,{value:T,children:E})}function ca(){return v.useContext(Dy)}const Q$="sm",J$=/(^|-)(left|right)(-|$)/,e3=new Set(["history","link-external","list-bullets","list-ordered","quote","redo","return"]),t3=new Set(W$.filter(e=>J$.test(e)||e3.has(e))),Xt={base:{kKX8nH:"ui-1j61x8r",k63SB2:"ui-etm3q0",kGuDYH:"ui-1tachi3",kMv6JI:"ui-1qt6sjn",kLWn49:"ui-o5v014",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kMwMTN:"ui-1heor9g",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kXLuUW:"ui-xymvpz",kMnn75:"ui-krqix3",kJwUce:"ui-1403hyl",k9WMMc:"ui-2b8uid",kP9fke:"ui-6mezaz",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kfSwDN:"ui-87ps6o",kO7zv1:"ui-1winvzj","--icon-size":"ui-1u4itkb","--icon-weight":"ui-1q5xvfy",kQmYQc:"ui-1ehclkv",kgeoSG:"ui-1yj7g93",$$css:!0},noPresetSize:{$$css:!0},sizeXs:{"--icon-size":"ui-aiyo0p",$$css:!0},sizeSm:{"--icon-size":"ui-1u4itkb",$$css:!0},sizeBase:{"--icon-size":"ui-xfpx3u",$$css:!0},sizeLg:{"--icon-size":"ui-1qxde8p",$$css:!0},sizeXl:{"--icon-size":"ui-dyy2ci",$$css:!0},size2xl:{"--icon-size":"ui-7lg4th",$$css:!0},noColor:{$$css:!0},colorPrimary:{kMwMTN:"ui-1nqczng",$$css:!0},colorSecondary:{kMwMTN:"ui-1mh7f6w",$$css:!0},colorTertiary:{kMwMTN:"ui-1lbmi28",$$css:!0},colorQuaternary:{kMwMTN:"ui-1qh17o",$$css:!0},colorGitAdded:{kMwMTN:"ui-15wwr8d",$$css:!0},colorGitModified:{kMwMTN:"ui-eedwss",$$css:!0},colorGitRemoved:{kMwMTN:"ui-fowoju",$$css:!0},colorGitUntracked:{kMwMTN:"ui-1p7vtww",$$css:!0},colorCyan:{kMwMTN:"ui-1rbygr4",$$css:!0},colorBlue:{kMwMTN:"ui-101qeuz",$$css:!0},colorRed:{kMwMTN:"ui-ku4wcm",$$css:!0},colorGreen:{kMwMTN:"ui-p6nzhx",$$css:!0},colorSuccess:{kMwMTN:"ui-1qphcl",$$css:!0},colorDanger:{kMwMTN:"ui-yz91fk",$$css:!0},colorYellow:{kMwMTN:"ui-1hn9r2r",$$css:!0},colorMagenta:{kMwMTN:"ui-pwp9en",$$css:!0},colorOrange:{kMwMTN:"ui-4qtrdv",$$css:!0},colorPurple:{kMwMTN:"ui-1b0hn6l",$$css:!0},colorAccent:{kMwMTN:"ui-scuw3h",$$css:!0},colorBrand:{kMwMTN:"ui-v3vxec",$$css:!0},noModifier:{$$css:!0},modifierSpin:{kKVMdj:"ui-138fvbv",k44tkh:"ui-lmf4m6",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0},modifierDisabled:{kSiTet:"ui-ti2d7y",$$css:!0},modifierHidden:{k33iCy:"ui-lshs6z",$$css:!0},capTrim:{kQypYc:"ui-14ymb62",$$css:!0}};function n3(e,t,n){return[Xt.base,sN(e),r3(t),i3(n)]}function rx(e){return typeof e=="string"&&!e.startsWith("var(")}function sN(e){if(!rx(e))return Xt.noPresetSize;switch(e){case"xs":return Xt.sizeXs;case"sm":return Xt.sizeSm;case"base":return Xt.sizeBase;case"lg":return Xt.sizeLg;case"xl":return Xt.sizeXl;case"2xl":return Xt.size2xl}}function r3(e){switch(e){case"primary":return Xt.colorPrimary;case"secondary":return Xt.colorSecondary;case"tertiary":return Xt.colorTertiary;case"quaternary":return Xt.colorQuaternary;case"git-added":return Xt.colorGitAdded;case"git-modified":return Xt.colorGitModified;case"git-removed":return Xt.colorGitRemoved;case"git-untracked":return Xt.colorGitUntracked;case"cyan":return Xt.colorCyan;case"blue":return Xt.colorBlue;case"red":return Xt.colorRed;case"green":return Xt.colorGreen;case"success":return Xt.colorSuccess;case"danger":return Xt.colorDanger;case"yellow":return Xt.colorYellow;case"magenta":return Xt.colorMagenta;case"orange":return Xt.colorOrange;case"purple":return Xt.colorPurple;case"accent":return Xt.colorAccent;case"brand":return Xt.colorBrand;case void 0:return Xt.noColor}}function i3(e){switch(e){case"spin":return Xt.modifierSpin;case"disabled":return Xt.modifierDisabled;case"hidden":return Xt.modifierHidden;case void 0:return Xt.noModifier}}function s3(e){if(!(typeof e!="string"||e.length===0))return`"${e}"`}function Yt({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,rootStyle:d,style:f,title:h,"aria-label":m,"aria-hidden":b,ref:y}){const k=ca(),S=v.useCallback(N=>{typeof y=="function"?y(N):y&&(y.current=N),N&&t==="spin"&&n&&Z$(N)},[y,t,n]),E=s??k?.iconSize??Q$,R=rx(E),T=Ci()==="rtl"&&t3.has(e),C=s3(K$(e,r)),_={...C?{"--cursor-icon-content":C}:{},...R?{}:{"--icon-size":typeof E=="number"?`${E}px`:E},...f},L=Kt({rootClass:"ui-icon",stylexStyles:[n3(E,a,t),T&&Y$.root,l&&Xt.capTrim,d],className:nn("cursor-icon",c),style:_});return g.jsx("i",{ref:S,className:L.className,"data-icon-name":e,"data-size":R?E:void 0,"data-color":a,style:L.style,title:h??m,"aria-hidden":b??(m?void 0:!0)})}const o3=v.createContext({root:null});function fa(){return v.useContext(o3).root}const a3={dropdown:"--ui-portal-layer-z-index-dropdown",tooltip:"--ui-portal-layer-z-index-tooltip",modal:"--ui-portal-layer-z-index-modal",popover:"--ui-portal-layer-z-index-popover"},l3={},u3=3e3,c3=10;let nE=u3;function f3(){const e=nE;return nE+=c3,{zIndex:e,release:()=>{}}}const d3=v.createContext(null);function p3(){return v.useContext(d3)}function jl(e,t){const n=p3(),[r,s]=v.useState(null);v.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??f3();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=v.useMemo(()=>r===null?l3:{[a3[e]]:String(r)},[r,e]);return v.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const ix=v.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:d,...f}=t,{getButtonProps:h,buttonRef:m}=Ol({disabled:a,focusableWhenDisabled:l,native:c});return mn("button",t,{state:{disabled:a},ref:[n,m],props:[f,h]})}),oN={none:{kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kVAM5u:"ui-9r1u3d",$$css:!0},subtle:{kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-qz0629 ui-1njd9qq ui-8df9bq ui-1tkfsc1 ui-uv06hm",$$css:!0}},h3=["secondary","tertiary","accent","monochrome","success","warning","danger","git-added","git-modified","git-removed","git-untracked","plan"],m3=["accent","monochrome","success","danger","warning","plan","git-added","git-modified","git-removed","git-untracked"],g3=new Set(h3);new Set(m3);function b3(e){return e!==void 0&&g3.has(e)}const aN="accent",y3=["primary","secondary","media"],v3=["outline","ghost","text"],x3=new Set(y3),k3=new Set(v3);function S3(e){return x3.has(e)}function w3(e){return k3.has(e)}const E3=new Set(["accent","success","warning","danger","plan","git-added","git-modified","git-removed","git-untracked"]);function sx(e,t){const n=e==="secondary"&&b3(t)&&!E3.has(t);return{applyControlTone:e!=="secondary"||n,applyFilledColors:S3(e)&&!n,applyNonFilledBackground:w3(e)||n}}const ox={foreground:{"--ui-button-fg":"ui-1h31wig ui-qalphj ui-alrmhx ui-1e1xjh9 ui-1eont2s ui-qygd40 ui-1ucl2ju ui-4txb8k ui-xy4i2e ui-1y3ilr3 ui-1g9hv69 ui-1t2lbjw ui-1u8kle6 ui-7f1mz7 ui-cn7l2l ui-v6bjuk ui-17og37h ui-1mruliz ui-10ch5e ui-1xnt5ni ui-bcxwum","--ui-button-fg-hover":"ui-ve8a38 ui-572mpw ui-vp5bk3 ui-16shgaf ui-mjj3su ui-1v3oqsu ui-2ngaw7 ui-28dmf3",$$css:!0}},lN={secondary:{"--ui-button-fg":"ui-1j8p2m6","--ui-button-fg-hover":"ui-e6ovir",$$css:!0},tertiary:{"--ui-button-fg":"ui-1fwx157","--ui-button-fg-hover":"ui-111fdx3",$$css:!0},accent:{"--ui-button-fg":"ui-1f79f0m","--ui-button-fg-hover":"ui-orjwaf",$$css:!0},monochrome:{"--ui-button-fg":"ui-4zyimg","--ui-button-fg-hover":"ui-l1tqj1",$$css:!0},success:{"--ui-button-fg":"ui-gquhxt","--ui-button-fg-hover":"ui-10bqnq7",$$css:!0},warning:{"--ui-button-fg":"ui-1sxygwt","--ui-button-fg-hover":"ui-1bw7wxf",$$css:!0},danger:{"--ui-button-fg":"ui-3kwxde","--ui-button-fg-hover":"ui-1z0kkrr",$$css:!0},"git-added":{"--ui-button-fg":"ui-1atr7y6","--ui-button-fg-hover":"ui-18h1be3",$$css:!0},"git-modified":{"--ui-button-fg":"ui-hgltzh","--ui-button-fg-hover":"ui-2hn4cg",$$css:!0},"git-removed":{"--ui-button-fg":"ui-1c1bp8o","--ui-button-fg-hover":"ui-kk408f",$$css:!0},"git-untracked":{"--ui-button-fg":"ui-1fpy100","--ui-button-fg-hover":"ui-7ehido",$$css:!0},plan:{"--ui-button-fg":"ui-1c8nrdx","--ui-button-fg-hover":"ui-1by700s",$$css:!0}},T3={secondary:{"--ui-button-fg":"ui-zinbld","--ui-button-fg-hover":"ui-l1tqj1",$$css:!0},tertiary:{"--ui-button-fg":"ui-1mn641q","--ui-button-fg-hover":"ui-17wn194",$$css:!0}},Si={appearance:{kWkggS:"ui-elcf9h ui-g74ub2 ui-86fbs8",kMwMTN:"ui-gl2jp8 ui-qfdz8i",k1ekBW:"ui-fvdr79",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},press:{k3aq6I:"ui-3oybdh ui-e60hhf ui-1v3nhsv",k3nNDw:"ui-1g0ag68",$$css:!0},engaged:{kWkggS:"ui-1x1890e",kMwMTN:"ui-8ech78",$$css:!0},media:{k6WDB:"ui-1hvsj6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-1aml6k",$$css:!0},colors:{"--ui-button-bg":"ui-111vzy2 ui-125v35v ui-4462wj ui-ln9km0 ui-htinfv ui-1tjgpey ui-1le2bn6 ui-1u2lfwm ui-186rrbs ui-uzems4 ui-302ab4 ui-18o3eha ui-1lf2xg1 ui-8nfnk1 ui-1a0cs8t ui-10ymqg5 ui-1xfuoz4 ui-1s4pfgv ui-1x5ih9k ui-1dph52k ui-18ab9qp","--ui-button-bg-hover":"ui-10ckxxq ui-10aqgsk ui-nikh4q ui-v0nv0s ui-m9yhoz ui-1hx6fzk ui-10w9v6x ui-1v87jpz ui-kcfunw ui-11g56iz ui-1kvkcw9 ui-43o616 ui-8plkn9 ui-1l8tdf5 ui-zytb9n ui-y212bs ui-jzkrsc ui-13b5mdj ui-n9k1sf ui-1v4rm0v ui-uontnf","--ui-button-fg":"ui-18rr0f6 ui-crn35x ui-1oum4wa ui-rwu1v7 ui-9sccad ui-z1osth ui-s45wth ui-13k0jm5 ui-1h8ruqd ui-gh4tnf ui-sop4tk ui-1o7cpox ui-d2q3b0 ui-pzfz8q","--ui-button-fg-hover":"ui-ve8a38",$$css:!0}},kl={background:{"--ui-button-bg":"ui-1gwrc9l ui-302ab4 ui-1luhpj5 ui-14iu9ww","--ui-button-bg-hover":"ui-s16ggv ui-1kvkcw9 ui-hqa6pe ui-e032zu",$$css:!0},outline:{kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-13747pv",$$css:!0}},uN=["success","warning","danger","plan","git-added","git-modified","git-removed","git-untracked"],R3=new Set(uN);function cN(e){return e!==void 0&&R3.has(e)}const C3=["accent",...uN],_3=new Set(C3);function fN(e){return e!==void 0&&_3.has(e)}const dN={success:{"--ui-button-bg-hover":"ui-1tdt9ah",$$css:!0},warning:{"--ui-button-bg-hover":"ui-1feq7lt",$$css:!0},danger:{"--ui-button-bg-hover":"ui-1filpbt",$$css:!0},plan:{"--ui-button-bg-hover":"ui-2jb78i",$$css:!0},"git-added":{"--ui-button-bg-hover":"ui-1bw414x",$$css:!0},"git-modified":{"--ui-button-bg-hover":"ui-1hxpt55",$$css:!0},"git-removed":{"--ui-button-bg-hover":"ui-137iwle",$$css:!0},"git-untracked":{"--ui-button-bg-hover":"ui-1bf1sw5",$$css:!0}},pN={accent:{kVAM5u:"ui-5r2jki",$$css:!0},success:{kVAM5u:"ui-1gvt79p",$$css:!0},warning:{kVAM5u:"ui-1cucnr7",$$css:!0},danger:{kVAM5u:"ui-105evjg",$$css:!0},plan:{kVAM5u:"ui-1cucnr7",$$css:!0},"git-added":{kVAM5u:"ui-1y8sze9",$$css:!0},"git-modified":{kVAM5u:"ui-1wu7fly",$$css:!0},"git-removed":{kVAM5u:"ui-1b3t4f7",$$css:!0},"git-untracked":{kVAM5u:"ui-pop0y2",$$css:!0}},N3={rowActive:{k1xSpc:"ui-1s85apg ui-i8sxwt ui-14aajud ui-1gue9j1",kmuXW:"ui-2lah0s",$$css:!0}},hN={always:null,rowActive:N3.rowActive},ax={root:{kFalU9:"ui-ggy1nq",kSiTet:"ui-1szrgyu",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},A3={root:{kB7OPa:"ui-9f619",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-9r1u3d",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w ui-7gqb9v",$$css:!0}},mN={root:[A3.root,ax.root]},zu={xs:{kaIpWk:"ui-1e1y6u3",$$css:!0},sm:{kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kaIpWk:"ui-1043rbw",$$css:!0},lg:{kaIpWk:"ui-1043rbw",$$css:!0},xl:{kaIpWk:"ui-1043rbw",$$css:!0}},ui={xs:{kZKoxP:"ui-1vatr1o",$$css:!0},sm:{kZKoxP:"ui-1a6rlst",$$css:!0},md:{kZKoxP:"ui-1e94bgo",$$css:!0},lg:{kZKoxP:"ui-170hpbr",$$css:!0},xl:{kZKoxP:"ui-t8t6p",$$css:!0}},gN={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},Gi={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},Fi={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},bN={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},O3={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},M3={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},I3={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Ll={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},lx={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},Pu={root:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",k63SB2:"ui-20ajya",khDVqt:"ui-uxw1ft","--ui-md-state-color":"ui-1w18epr",kfSwDN:"ui-87ps6o",k9WMMc:"ui-2b8uid",$$css:!0},alignLeft:{kjj79g:"ui-1nhvcw1",$$css:!0},fullWidth:{kzqmXN:"ui-h8yej3",$$css:!0},frameContent:{kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},$u={xs:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1tlft3r",kGO01o:"ui-18d9i69",kZCmMZ:"ui-tw3t59",kOIVth:"ui-xhr3t",$$css:!0},sm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1tlft3r",kGO01o:"ui-18d9i69",kZCmMZ:"ui-tw3t59",$$css:!0},md:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-19bzwdx",kGO01o:"ui-18d9i69",kZCmMZ:"ui-v853mj",kOIVth:"ui-11twubx",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",kOIVth:"ui-pkkfsy",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1fg0g13",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1tajz9i",$$css:!0}},D3={xs:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",$$css:!0},sm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",$$css:!0},md:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1fg0g13",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1tajz9i",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-t1q3vd",kGO01o:"ui-18d9i69",kZCmMZ:"ui-8fiw5y",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1n9uuka",kGO01o:"ui-18d9i69",kZCmMZ:"ui-cssynl",$$css:!0}},rE={labelGroup:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},kbs:{kMv6JI:"ui-y1aii3",k63SB2:"ui-20ajya",kSiTet:"ui-byyjgo ui-s6mkfk",$$css:!0}},xi={root:[mN.root,Pu.root],fontSmoothing:lx.root,align:{center:null,left:Pu.alignLeft},fullWidth:Pu.fullWidth,frame:{container:null,content:Pu.frameContent},shape:{pill:Pu.shapePill},size:{xs:[ui.xs,zu.xs,$u.xs],sm:[ui.sm,zu.sm,$u.sm],md:[ui.md,zu.md,$u.md],lg:[ui.lg,zu.lg,$u.lg],xl:[ui.xl,zu.xl,$u.xl]},pillSize:D3,typography:{xs:Gi.root,sm:Fi.root,md:Fi.root,lg:Fi.root,xl:bN.root},labelGroup:rE.labelGroup,kbs:[Gi.root,rE.kbs]};function j3({rounded:e,variant:t,enforcedRounded:n}){return e!==void 0?e:t==="text"?!1:n===!0}const L3="md",z3={xs:"sm",sm:"base",md:"sm",lg:"sm",xl:"lg"},P3={"ui--default-marker":"ui--default-marker",$$css:!0};function ln({variant:e,tone:t,border:n,size:r,iconSize:s,rounded:a,frame:l="container",reveal:c="always",align:d,fullWidth:f,disabled:h,children:m,kbs:b,kbsStyle:y,labelGroupStyle:k,pressed:S,className:E,style:R,rootStyle:T,"aria-expanded":C,"aria-pressed":_,...L}){const N=ca(),A=e??N?.buttonVariant??"secondary",$=r??N?.buttonSize??L3,z=j3({enforcedRounded:N?.buttonRounded,rounded:a,variant:A}),I=f??N?.buttonFullWidth??!1,Y=h??N?.disabled,H=t??(A==="primary"||A==="ghost"?N?.buttonTone:void 0),q=H??(A==="primary"?aN:void 0),D=s??N?.buttonIconSize??z3[$],F=L["data-pressed"],U=sx(A,H),W=Lt(xi.root,xi.fontSmoothing,Si.appearance,U.applyControlTone&&ox.foreground,U.applyControlTone&&H!==void 0&&lN[H],U.applyFilledColors&&Si.colors,U.applyNonFilledBackground&&kl.background,(A==="outline"||A==="ghost")&&cN(H)&&dN[H],A==="outline"&&kl.outline,A==="outline"&&fN(H)&&pN[H],A==="media"&&Si.media,n&&oN[n],hN[c],S===!0&&Si.engaged,xi.size[$],xi.typography[$],xi.align[d??"center"],I&&xi.fullWidth,z&&xi.shape.pill,z&&xi.pillSize[$],xi.frame[l],N?.buttonRootStyle,T,P3);let B=m;if(b!=null){const K=Lt(xi.labelGroup,k),O=Lt(xi.kbs,y);B=g.jsxs("span",{className:nn("ui-button__label-group",K.className),style:K.style,children:[m,g.jsx("span",{className:nn("ui-button__kbs",O.className),style:O.style,children:b})]})}return g.jsx(ix,{...L,"aria-expanded":C,"aria-pressed":C===void 0&&S!==void 0?S:_,className:nn("ui-button",W.className,E),style:{...W.style,...R},"data-variant":A,"data-size":$,"data-rounded":z||void 0,"data-frame":l!=="container"?l:void 0,"data-border":n,"data-tone":q,"data-align":d==="left"?d:void 0,"data-full-width":I||void 0,"data-reveal":c!=="always"?c:void 0,"data-pressed":S!==void 0?String(S):F,disabled:Y,children:g.jsx(Cs,{iconSize:D,children:B})})}function Gc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Sl({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=v.useRef(e!==void 0),[a,l]=v.useState(t),c=s?e:a,d=v.useCallback(f=>{s||l(f)},[]);return[c,d]}let iE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({}),sE=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const $3={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tc={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},B3={disabled:!1,...tc},Vc={valid(e){return e===null?null:e?{[sE.valid]:""}:{[sE.invalid]:""}}};function F3(e){return v.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[iE.checked]:""}:{[iE.unchecked]:""}},...Vc}),[e.indeterminate])}const U3={invalid:void 0,name:void 0,validityData:{state:$3,errors:[],error:"",value:"",initialValue:null},setValidityData:Vn,disabled:void 0,touched:tc.touched,setTouched:Vn,dirty:tc.dirty,setDirty:Vn,filled:tc.filled,setFilled:Vn,focused:tc.focused,setFocused:Vn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:B3,markedDirtyRef:{current:!1},registerFieldControl:Vn,validation:{getValidationProps:(e,t=Ln)=>t,inputRef:{current:null},registerInput:Vn,commit:async()=>{},change:Vn}},q3=v.createContext(U3);function Sh(e=!0){const t=v.useContext(q3);if(t.setValidityData===Vn&&!e)throw new Error(Nn(28));return t}function yN(e,t,n,r,s=!0,a){const{registerFieldControl:l}=Sh(),c=v.useRef(null);c.current||(c.current=Symbol()),Ge(()=>{const d=c.current;return!d||!s?void 0:(l(d,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{l(d,void 0)})},[e,s,r,t,a,l,n])}const H3=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Vn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function vN(){return v.useContext(H3)}const G3=v.createContext({controlId:void 0,registerControlId:Vn,labelId:void 0,setLabelId:Vn,messageIds:[],setMessageIds:Vn,getDescriptionProps:e=>e});function ux(){return v.useContext(G3)}const V3=v.createContext(void 0);function W3(){const e=v.useContext(V3);if(e===void 0)throw new Error(Nn(14));return e}const K3=v.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,d=W3(),f=d.checked||d.indeterminate,{mounted:h,transitionStatus:m,setMounted:b}=Hc(f),y=v.useRef(null),k={...d,transitionStatus:m};xo({open:f,ref:y,onComplete(){f||b(!1)}});const E={...F3(d),...go,...Vc},R=l||h,T=mn("span",t,{ref:[n,y],state:k,stateAttributesMapping:E,props:c});return R?T:null}),Y3="md",oE={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kMeerF:"ui-1k57tk5 ui-1gv1zob",k3XXqK:"ui-1t137rt ui-1rsevuf",kjBf7l:"ui-1uczgqu ui-14qs42y",kInvED:"ui-1wfwxd8 ui-1i57s2w",kSiTet:"ui-1hc1fzr ui-1goyyu5",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kaIpWk:"ui-1e1y6u3",kMwMTN:"ui-1lriclw",kWkggS:"ui-i07v4r ui-190xqy7",kVAM5u:"ui-1tjqsyf ui-14ytyh1",k3aq6I:"ui-3oybdh ui-78fr0e",k3nNDw:"ui-1g0ag68",k1ekBW:"ui-1lxufdw",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-2s4hoy",kZKoxP:"ui-px1j5t",$$css:!0},md:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},lg:{kzqmXN:"ui-1xx3ewh",kZKoxP:"ui-14dyci",$$css:!0}},X3={primary:{"--ui-checkbox-bg":"ui-x0sf4j","--ui-checkbox-border":"ui-14p436a","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},green:{"--ui-checkbox-bg":"ui-1g72fie","--ui-checkbox-border":"ui-165ap9x","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},neutral:{"--ui-checkbox-bg":"ui-1rpsy8r","--ui-checkbox-border":"ui-mtpsoh","--ui-checkbox-glyph":"ui-qnctk6",$$css:!0}},Z3={sm:9,md:10,lg:11},aE={"--icon-weight":"700"};function Q3({indeterminate:e,interactive:t,size:n,variant:r}){const s=Lt(oE.root,oE[n],X3[r]),a={className:"ui-10l6tqk ui-10a8y8t ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-n9if97 ui-7pq1vu ui-sagj69 ui-6ekqhr ui-g01cxk ui-hhdk15 ui-nyzrob ui-h98lc ui-1nrvvgt ui-cntms"},l=Z3[n];return g.jsx("span",{"aria-hidden":"true",className:nn("ui-checkbox__box",s.className),style:s.style,children:t?g.jsx(K3,{className:nn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,d)=>g.jsx("span",{...c,children:g.jsx(Yt,{name:d.indeterminate?"minus":"check",size:l,style:aE})}),style:a.style}):g.jsx("span",{className:nn("ui-checkbox__icon",a.className),style:a.style,children:g.jsx(Yt,{name:e?"minus":"check",size:l,style:aE})})})}function xN({checked:e,disabled:t,indeterminate:n=!1,size:r=Y3,variant:s="primary"}){const a={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker"};return g.jsx("span",{"aria-hidden":"true",className:nn("ui-checkbox",a.className),style:a.style,"data-component":"checkbox","data-size":r,"data-variant":s,"data-checked":e||void 0,"data-disabled":t||void 0,"data-indeterminate":n||void 0,children:g.jsx(Q3,{indeterminate:n,interactive:!1,size:r,variant:s})})}function J3(e,t,n=(r,s)=>r===s){return e.length===t.length&&e.every((r,s)=>n(r,t[s]))}function e6(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,[a,l]=Sl({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:d,transitionStatus:f}=Hc(a,!0,!0),h=Il(),[m,b]=v.useState(),y=m??h,k=We(S=>{const E=!a,R=xt(Ml,S.nativeEvent);r(E,R),!R.isCanceled&&l(E)});return v.useMemo(()=>({disabled:s,handleTrigger:k,mounted:c,open:a,panelId:y,setMounted:d,setOpen:l,setPanelIdState:b,transitionStatus:f}),[s,k,c,a,y,d,l,b,f])}const kN=v.createContext(void 0);function SN(){const e=v.useContext(kN);if(e===void 0)throw new Error(Nn(15));return e}let cx=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ea.startingStyle]="startingStyle",e[e.endingStyle=ea.endingStyle]="endingStyle",e})({}),t6=(function(e){return e.panelOpen="data-panel-open",e})({});const n6={[cx.open]:""},r6={[cx.closed]:""},i6={open(e){return e?{[t6.panelOpen]:""}:null}},s6={open(e){return e?n6:r6}},wN={...s6,...go},o6=v.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:d,style:f,...h}=t,m=We(c),b=e6({open:d,defaultOpen:a,onOpenChange:m,disabled:l}),y=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),k=v.useMemo(()=>({...b,onOpenChange:m,state:y}),[b,m,y]),S=mn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:wN});return g.jsx(kN.Provider,{value:k,children:S})}),a6={...i6,...go},lE=v.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=SN(),{className:d,disabled:f=c,render:h,nativeButton:m=!0,style:b,...y}=t,{getButtonProps:k,buttonRef:S}=Ol({disabled:f,focusableWhenDisabled:!0,native:m});return mn("button",t,{state:l,ref:[n,S],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a},y,k],stateAttributesMapping:a6})}),Bu={height:void 0,width:void 0};function l6(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:a,onOpenChange:l,open:c,setMounted:d,setOpen:f,transitionStatus:h}=e,m=v.useRef(null),b=v.useRef(null),[y,k]=v.useState(Bu),S=v.useRef(Bu),E=v.useRef(!1),R=v.useRef(c),T=v.useRef(!1),[C,_]=v.useState(!1),L=v.useRef(null),N=co(t,m),A=_n({mounted:a,open:c}),$=j_(m,!1,!1),z=!c&&!a,I=C?"idle":h,Y=c&&(R.current||T.current),H=!c&&a&&b.current==="css-animation"&&y.height===void 0&&y.width===void 0?S.current:y,q=n&&z&&b.current!=="css-animation",D=We((K,O=!0)=>{O&&(S.current=K),k(K)}),F=We(()=>{L.current?.(),L.current=null}),U=We(K=>{F(),L.current=()=>{L.current=null,K()}}),W=We(()=>{c&&a&&b.current==="css-animation"&&(T.current=!0)});Ge(()=>{!C||h==="starting"||_(!1)},[C,h]),v.useEffect(()=>()=>{W(),F()},[W,F]),Ge(()=>{const K=m.current;if(!K)return;!c&&L.current&&F();const O=u6(K,Y);if(b.current=O,c&&h==="idle"&&R.current&&O==="css-animation"){S.current=Za(K);return}if(c&&h==="starting"){const j=E.current;if(E.current=!1,O==="none"){D(Za(K)),_(!0);return}if(O==="css-transition"){const Z=c6(K);if(D(Za(K)),!j)return Z;const te=Fu(K,"transition-duration","0s");return U(te),_(!0),Z}if(O==="css-animation"){if(D(Za(K)),!j){Fu(K,"animation-name","none")();return}const Z=Fu(K,"animation-name","none"),te=Fu(K,"animation-duration","0s");Z(),U(te),_(!0);return}}if(!c&&a&&(h==="idle"||h==="starting")){if(R.current=!1,T.current=!1,O==="none"){D(Bu,!1),d(!1);return}D(Za(K));return}if(h!=="ending")return;if(O==="none"){d(!1);return}const P=Za(K);if(!((P.height??0)>0||(P.width??0)>0)){d(!1);return}D(P),O==="css-animation"&&Fu(K,"animation-name","none")()},[a,c,F,D,d,U,Y,h]),xo({enabled:c&&a&&I==="idle",open:!0,ref:m,onComplete(){c&&D(Bu,!1)}}),v.useEffect(()=>{if(c||!a||I!=="ending"||!m.current)return;const O=new AbortController;let P=-1;function V(){A.current.open||(d(!1),D(Bu,!1))}return P=Ar.request(()=>{O.signal.aborted||$(V,O.signal)}),()=>{Ar.cancel(P),O.abort()}},[A,a,c,I,$,D,d]),Ge(()=>{const K=m.current;!K||!n||!z||K.setAttribute("hidden","until-found")},[z,n]),v.useEffect(function(){const O=m.current;if(!O)return;function P(V){const j=xt(Ei,V);l(!0,j),!j.isCanceled&&(E.current=!0,f(!0))}return It(O,"beforematch",P)},[l,f]);const B=s||n||a||c;return{height:H.height,props:{...q?{[cx.startingStyle]:""}:void 0,hidden:z,id:r},ref:N,shouldPreventOpenAnimation:Y,shouldRender:B,transitionStatus:I,width:H.width}}function Za(e){return{height:e.scrollHeight,width:e.scrollWidth}}function u6(e,t=!1){const n=kn(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&uE(n.animationDuration),s=uE(n.transitionDuration);return r&&s||s?"css-transition":r?"css-animation":"none"}function uE(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Fu(e,t,n){const r=e.style.getPropertyValue(t),s=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,s)}}function c6(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(s=>{e.style.setProperty(s,"initial","important")});function n(){Object.entries(t).forEach(([s,a])=>{if(a===""){e.style.removeProperty(s);return}e.style.setProperty(s,a)})}const r=Ar.request(n);return()=>{Ar.cancel(r),n()}}let cE=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const f6=v.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:d,...f}=t,{mounted:h,onOpenChange:m,open:b,panelId:y,setMounted:k,setPanelIdState:S,setOpen:E,state:R,transitionStatus:T}=SN(),C=s??!1,_=a??!1;Ge(()=>{if(c)return S(c),()=>{S(void 0)}},[c,S]);const{height:L,props:N,ref:A,shouldPreventOpenAnimation:$,shouldRender:z,transitionStatus:I,width:Y}=l6({externalRef:n,hiddenUntilFound:C,id:y,keepMounted:_,mounted:h,onOpenChange:m,open:b,setMounted:k,setOpen:E,transitionStatus:T}),H={...R,transitionStatus:I},q=jC(d,H),D=mn("div",{...t,style:void 0},{state:H,ref:A,props:[N,{style:{[cE.collapsiblePanelHeight]:L===void 0?"auto":`${L}px`,[cE.collapsiblePanelWidth]:Y===void 0?"auto":`${Y}px`}},f,q?{style:q}:void 0,$?{style:{animationName:"none"}}:void 0],stateAttributesMapping:wN});return z?D:null}),d6={root:{kKwaWg:"ui-c079w9 ui-phioz4",kgSjnq:"ui-akli9p",kHypHr:"ui-1ta4xzc ui-15mlgz9",kBahZS:"ui-1t23j8t ui-nqxwjk",kUisrP:"ui-g7jpbn ui-1xgngqn",kKVMdj:"ui-1dtn8og ui-1aquc0h",k44tkh:"ui-1q3qbx4",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0}},p6={inherit:{"--ui-text-shimmer-base":"ui-1ptom83","--ui-text-shimmer-highlight":"ui-rxqqkw",$$css:!0},primary:{kMwMTN:"ui-1wd3ewq","--ui-text-shimmer-base":"ui-cf8467","--ui-text-shimmer-highlight":"ui-17vhta",$$css:!0},secondary:{kMwMTN:"ui-19aaqeu","--ui-text-shimmer-base":"ui-1dl6blw","--ui-text-shimmer-highlight":"ui-17vhta",$$css:!0},tertiary:{kMwMTN:"ui-4b2ntj","--ui-text-shimmer-base":"ui-3zfljf","--ui-text-shimmer-highlight":"ui-1ph1pus",$$css:!0}};function EN(e){return[d6.root,p6[e]]}const h6={"ui--default-marker":"ui--default-marker",$$css:!0};function TN(e){return e==="default"?"secondary":"tertiary"}const Ho={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kfSwDN:"ui-87ps6o",kOIVth:"ui-11twubx",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",kGuDYH:"ui-hwpfco",kLWn49:"ui-1bcdmom",$$css:!0},buttonReset:{kWkggS:"ui-jbqb8w",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",keoZOQ:"ui-dj266r",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k71WvV:"ui-14z9mp",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-1heor9g",k9WMMc:"ui-1yc453h",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-1bqaal",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0},presentational:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",$$css:!0},clickable:{kkrTdU:"ui-1ypdohk",$$css:!0},disabled:{kSiTet:"ui-byyjgo",$$css:!0},detailsButton:{ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kkrTdU:"ui-1ypdohk",kMnn75:"ui-ujl8zx",k1TLXF:"ui-r5o5jz ui-9ojkr9 ui-1e7jyuc",k1ekBW:"ui-eirdtl",kIyJzY:"ui-7pq1vu ui-6xbvzw ui-1nk6rg0",kAMwcw:"ui-1bt1wk1",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0}},kb={base:{kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu ui-1dkqrid",k63SB2:"ui-20ajya",k1ekBW:"ui-t3l3uh",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-1bt1wk1",$$css:!0},muted:{kMwMTN:"ui-4b2ntj ui-1uq8sgy",$$css:!0},tabularNums:{kcqcaj:"ui-ss6m8b",$$css:!0}};function m6({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:d,tone:f}){const h=Lt(kb.base,(f==="muted"||f==="tertiary")&&kb.muted,d&&kb.tabularNums,a&&!l&&EN(TN(f))),m={0:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},2:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw"},1:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},3:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b"}}[(f==="muted")<<1|!!d<<0],b={className:"ui-2lah0s ui-fdlg0y ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},y={className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-14ju556 ui-1urst0s"};return g.jsxs(g.Fragment,{children:[s!=null&&g.jsx("span",{className:nn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),e!=null&&g.jsx("span",{className:nn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&g.jsx("span",{ref:r,className:nn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&g.jsx(Yt,{ref:t,name:"chevron-right",className:nn("ui-collapsible-chevron",b.className),style:b.style,size:"sm"})]})}function hi({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,headerStyle:s,leadingIcon:a,disabled:l=!1,expandable:c=!0,loading:d=!1,shimmerDetails:f=!0,tabularNums:h=!1,tone:m="default",children:b,headerRef:y,detailsRef:k,chevronRef:S,className:E,contentClassName:R,open:T,defaultOpen:C,onOpenChange:_,...L}){const N=n!==void 0,A=c&&N,$=T!==void 0,[z,I]=v.useState(()=>C??!1),Y=$?!!T:z,H=(Z,te)=>{$||I(Z),_?.(Z,te)},q=N?g.jsx("button",{type:"button",...Lt(Ho.buttonReset,Ho.detailsButton,r),disabled:l,onClick:Z=>{Z.stopPropagation(),n(Z)},children:t}):t,D=c&&b!=null&&typeof b!="boolean",F={className:"ui-78zum5 ui-dt5ytf"},U=Lt(Ho.base,c&&!N?Ho.buttonReset:Ho.presentational,c&&!l&&Ho.clickable,l&&Ho.disabled,d&&f&&EN(TN(m)),h6,s),W={0:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"},1:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"}}[!l<<0],B={className:"ui-2lah0s ui-fdlg0y ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1 ui-1hc1fzr"},K={className:"ui-1lliihq ui-1kd3hbs ui-uan8c8 ui-1fe7yth ui-12wejat ui-6ikm8r ui-10wlt62 ui-pv8u57 ui-ua3uq3 ui-4wkmsb ui-g3p6pi ui-ptf4uz"},O={className:"ui-6ikm8r ui-10wlt62 ui-2lwn1j"},P={className:"ui-78zum5 ui-dt5ytf ui-1y48gol ui-1vdilah ui-1hc1fzr ui-19991ni ui-4wkmsb ui-g3p6pi ui-1bt1wk1"},V={"data-component":"collapsible-header",className:nn("ui-collapsible-header",U.className),style:U.style},j=g.jsx(m6,{action:e,chevronRef:S,details:q,detailsRef:k,leadingIcon:a,loading:d,shimmerDetails:f,showChevron:c&&!N,tabularNums:h,tone:m});return g.jsxs(o6,{...L,open:A?Y:T,defaultOpen:A?void 0:C,onOpenChange:A?H:_,disabled:l,"data-expandable":c?"":void 0,"data-loading":d?"":void 0,"data-tone":m,className:nn("ui-collapsible",F.className,E),style:F.style,children:[A?g.jsxs("div",{...V,ref:y,onClick:()=>{l||H(!Y)},children:[j,g.jsx(lE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:W.className,style:W.style,...D?null:{"aria-controls":void 0},onClick:Z=>{l||Z.stopPropagation()},children:g.jsx(Yt,{ref:S,name:"chevron-right",className:nn("ui-collapsible-chevron",B.className),style:B.style,size:"sm"})})]}):c?g.jsx(lE,{...V,ref:y,...D?null:{"aria-controls":void 0},onClick:Z=>{l||Z.stopPropagation()},children:j}):g.jsx("div",{...V,ref:y,children:j}),D&&g.jsx(f6,{keepMounted:!0,className:nn("ui-collapsible-content-view",K.className),style:K.style,children:g.jsx("div",{className:O.className,style:O.style,children:g.jsx("div",{className:nn("ui-collapsible-content",P.className,R),style:P.style,children:b})})})]})}const g6=(e,t)=>Object.is(e,t);function ra(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function b6(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:ra(t,r,n))}function uc(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:ra(r,t,n))}function y6(e,t,n){return e.filter(r=>!ra(t,r,n))}function jy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function RN(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function v6(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(RN(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function CN(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return jy(e)}function Wo(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?jy(e.value):jy(e)}function _N(e,t,n){function r(){return CN(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const s=t,a=RN(s)?s.flatMap(l=>l.items):s;if(e==null||typeof e!="object"){const l=a.find(c=>c.value===e);return l&&l.label!=null?l.label:r()}if("value"in e){const l=a.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return r()}function x6(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(g.jsx(v.Fragment,{children:_N(s,t,n)},a)),r),[])}function fx(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=ux(),l=Il(t),c=n?s:void 0,d=Ir(()=>Symbol("labelable-control")),f=v.useRef(!1),h=v.useRef(t!=null),m=We(()=>{!f.current||a===Vn||(f.current=!1,a(d.current,void 0))});return Ge(()=>{if(a===Vn)return;let b;if(n){const y=r?.current;ft(y)&&y.closest("label")!=null?b=t??null:b=c??l}else if(t!=null)h.current=!0,b=t;else if(h.current)b=l;else{m();return}if(b===void 0){m();return}f.current=!0,a(d.current,b)},[t,r,c,a,n,l,d,m]),v.useEffect(()=>m,[m]),s??l}function k6(e,t){return e??t}function S6(e){const t=e.getBoundingClientRect(),n=kn(e);if(Lv)return t;const r=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||s.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,d=parseFloat(s.width)||0,f=parseFloat(s.height)||0,h=Math.max(t.width,l,d),m=Math.max(t.height,c,f),b=h-t.width,y=m-t.height;return{left:t.left-b/2,right:t.right+b/2,top:t.top-y/2,bottom:t.bottom+y/2}}const NN=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function w6(){return v.useContext(NN)}function dx(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=We(s),l=v.useRef(0),c=Ir(T6).current,d=Ir(E6).current,[f,h]=v.useState(0),m=v.useRef(f),b=We((R,T)=>{d.set(R,T??null),m.current+=1,h(m.current)}),y=We(R=>{d.delete(R),m.current+=1,h(m.current)}),k=v.useMemo(()=>{const R=new Map;return Array.from(d.keys()).filter(C=>C.isConnected).sort(R6).forEach((C,_)=>{const L=d.get(C)??{};R.set(C,{...L,index:_})}),R},[d,f]);Ge(()=>{if(typeof MutationObserver!="function"||k.size===0)return;const R=new MutationObserver(T=>{const C=new Set,_=L=>C.has(L)?C.delete(L):C.add(L);T.forEach(L=>{L.removedNodes.forEach(_),L.addedNodes.forEach(_)}),C.size===0&&(m.current+=1,h(m.current))});return k.forEach((T,C)=>{C.parentElement&&R.observe(C.parentElement,{childList:!0})}),()=>{R.disconnect()}},[k]),Ge(()=>{m.current===f&&(n.current.length!==k.size&&(n.current.length=k.size),r&&r.current.length!==k.size&&(r.current.length=k.size),l.current=k.size),a(k)},[a,k,n,r,f]),Ge(()=>()=>{n.current=[]},[n]),Ge(()=>()=>{r&&(r.current=[])},[r]);const S=We(R=>(c.add(R),()=>{c.delete(R)}));Ge(()=>{c.forEach(R=>R(k))},[c,k]);const E=v.useMemo(()=>({register:b,unregister:y,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[b,y,S,n,r,l]);return g.jsx(NN.Provider,{value:E,children:t})}function E6(){return new Map}function T6(){return new Set}function R6(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const C6=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:h=0,offsetParent:m="real"}=Ts(e,t)||{};if(f==null)return{};const b=JC(h),y={x:n,y:r},k=Fv(s),S=Bv(k),E=await l.getDimensions(f),R=k==="y",T=R?"top":"left",C=R?"bottom":"right",_=R?"clientHeight":"clientWidth",L=a.reference[S]+a.reference[k]-y[k]-a.floating[S],N=y[k]-a.reference[k],A=m==="real"?await l.getOffsetParent?.(f):c.floating;let $=c.floating[_]||a.floating[S];(!$||!await l.isElement?.(A))&&($=c.floating[_]||a.floating[S]);const z=L/2-N/2,I=$/2-E[S]/2-1,Y=Math.min(b[T],I),H=Math.min(b[C],I),q=Y,D=$-E[S]-H,F=$/2-E[S]/2+z,U=Cy(q,F,D),W=!d.arrow&&vo(s)!=null&&F!==U&&a.reference[S]/2-(F<q?Y:H)-E[S]/2<0,B=W?F<q?F-q:F-D:0;return{[k]:y[k]+B,data:{[k]:U,centerOffset:F-U-B,...W&&{alignmentOffset:B}},reset:W}}}),_6=(e,t)=>({...C6(e),options:[e,t]}),N6=qP().fn,A6={name:"hide",async fn(e){const{width:t,height:n,x:r,y:s}=e.rects.reference,a=t===0&&n===0&&r===0&&s===0;return{data:{referenceHidden:(await N6(e)).data?.referenceHidden||a}}}},fp={sideX:"left",sideY:"top"},AN={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,d=kn(s),f=d.getComputedStyle(s);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:fp};const m=await a.getOffsetParent?.(s);let b={width:0,height:0};if(l==="fixed"&&d?.visualViewport)b={width:d.visualViewport.width,height:d.visualViewport.height};else if(m===d){const T=Vt(s);b={width:T.documentElement.clientWidth,height:T.documentElement.clientHeight}}else await a.isElement?.(m)&&(b=await a.getDimensions(m));const y=Mr(c);let k=t,S=n;y==="left"&&(k=b.width-(t+r.width)),y==="top"&&(S=b.height-(n+r.height));const E=y==="left"?"right":fp.sideX,R=y==="top"?"bottom":fp.sideY;return{x:k,y:S,data:{sideX:E,sideY:R}}}};function ON(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function fE(e,t,n){const{rects:r,placement:s}=e;return{side:ON(t,Mr(s),n),align:vo(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function px(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:d=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,inline:b,keepMounted:y=!1,floatingRootContext:k,mounted:S,collisionAvoidance:E,shiftCrossAxis:R=!1,nodeId:T,adaptiveOrigin:C,lazyFlip:_=!1,externalTree:L}=e,[N,A]=v.useState(null);!S&&N!==null&&A(null);const $=E.side||"flip",z=E.align||"flip",I=E.fallbackAxisSide||"end",Y=typeof t=="function"?t:void 0,H=We(Y),q=Y?H:t,D=_n(t),F=_n(S),W=Ci()==="rtl",B=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":W?"left":"right","inline-start":W?"right":"left"}[r],K=a==="center"?B:`${B}-${a}`;let O=d;const P=1,V=r==="bottom"?P:0,j=r==="top"?P:0,Z=r==="right"?P:0,te=r==="left"?P:0;typeof O=="number"?O={top:O+V,right:O+te,bottom:O+j,left:O+Z}:O&&(O={top:(O.top||0)+V,right:(O.right||0)+te,bottom:(O.bottom||0)+j,left:(O.left||0)+Z});const se={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:O},ue=v.useRef(null),le=_n(s),fe=_n(l),ge=typeof s!="function"?s:0,_e=typeof l!="function"?l:0,oe=[];b&&oe.push(b),oe.push(Vv(st=>{const vt=fE(st,r,W),Dt=typeof le.current=="function"?le.current(vt):le.current,Pt=typeof fe.current=="function"?fe.current(vt):fe.current;return{mainAxis:Dt,crossAxis:Pt,alignmentAxis:Pt}},[ge,_e,W,r]));const ye=z==="none"&&$!=="shift",Se=!ye&&(f||R||$==="shift"),Oe=$==="none"?null:Kv({...se,padding:{top:O.top+P,right:O.right+P,bottom:O.bottom+P,left:O.left+P},mainAxis:!R&&$==="flip",crossAxis:z==="flip"?"alignment":!1,fallbackAxisSideDirection:I}),we=ye?null:Wv(st=>{const vt=Vt(st.elements.floating).documentElement;return{...se,rootBoundary:R?{x:0,y:0,width:vt.clientWidth,height:vt.clientHeight}:void 0,mainAxis:z!=="none",crossAxis:Se,limiter:f||R?void 0:UP(Dt=>{if(!ue.current)return{};const{width:Pt,height:At}=ue.current.getBoundingClientRect(),X=ci(Mr(Dt.placement)),he=X==="y"?Pt:At,Le=X==="y"?O.left+O.right:O.top+O.bottom;return{offset:he/2+Le/2}})}},[se,f,R,O,z]);$==="shift"||z==="shift"||a==="center"?oe.push(we,Oe):oe.push(Oe,we),oe.push(Yv({...se,apply({elements:{floating:st},availableWidth:vt,availableHeight:Dt,rects:Pt}){if(!F.current)return;const At=st.style;At.setProperty("--available-width",`${vt}px`),At.setProperty("--available-height",`${Dt}px`);const X=kn(st).devicePixelRatio||1,{x:he,y:Le,width:Ze,height:St}=Pt.reference,at=(Math.round((he+Ze)*X)-Math.round(he*X))/X,qe=(Math.round((Le+St)*X)-Math.round(Le*X))/X;At.setProperty("--anchor-width",`${at}px`),At.setProperty("--anchor-height",`${qe}px`)}}),_6(st=>({element:ue.current||Vt(st.elements.floating).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(st){const{elements:vt,middlewareData:Dt,placement:Pt,rects:At,y:X}=st,he=Mr(Pt),Le=ci(he),Ze=ue.current,St=Dt.arrow?.x||0,at=Dt.arrow?.y||0,qe=Ze?.clientWidth||0,Ee=Ze?.clientHeight||0,Ue=St+qe/2,ze=at+Ee/2,Ne=Math.abs(Dt.shift?.y||0),Ie=At.reference.height/2,ut=typeof s=="function"?s(fE(st,r,W)):s,Be=Ne>ut,Rt={top:`${Ue}px calc(100% + ${ut}px)`,bottom:`${Ue}px ${-ut}px`,left:`calc(100% + ${ut}px) ${ze}px`,right:`${-ut}px ${ze}px`}[he],wt=`${Ue}px ${At.reference.y+Ie-X}px`;return vt.floating.style.setProperty("--transform-origin",Se&&Le==="y"&&Be?wt:Rt),{}}},A6,C),Ge(()=>{!S&&k&&k.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[S,k]);const ke=v.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:De,elements:Me,x:je,y:He,middlewareData:be,update:Re,placement:ee,context:ce,isPositioned:J,floatingStyles:re}=g$({rootContext:k,open:y?S:void 0,placement:K,middleware:oe,strategy:n,whileElementsMounted:y?void 0:(...st)=>Rp(...st,ke),nodeId:T,externalTree:L}),{sideX:xe,sideY:$e}=be.adaptiveOrigin||fp,Xe=J?n:"fixed",Ye=v.useMemo(()=>{const st=C?{position:Xe,[xe]:je,[$e]:He}:{position:Xe,...re};return J||(st.opacity=0),st},[C,Xe,xe,je,$e,He,re,J]),ht=v.useRef(null);Ge(()=>{if(!S)return;const st=D.current,vt=typeof st=="function"?st():st,Pt=(dE(vt)?vt.current:vt)||null||null;Pt!==ht.current&&(De.setPositionReference(Pt),ht.current=Pt)},[S,De,q,D]),v.useEffect(()=>{if(!S)return;const st=D.current;typeof st!="function"&&dE(st)&&st.current!==ht.current&&(De.setPositionReference(st.current),ht.current=st.current)},[S,De,q,D]),v.useEffect(()=>{if(y&&S&&Me.reference&&Me.floating)return Rp(Me.reference,Me.floating,Re,ke)},[y,S,Me,Re,ke]);const Qe=Mr(ee),yt=ON(r,Qe,W),kt=vo(ee)||"center",nt=!!be.hide?.referenceHidden;Ge(()=>{_&&S&&J&&A(Qe)},[_,S,J,Qe]);const Tt=v.useMemo(()=>({position:"absolute",top:be.arrow?.y,left:be.arrow?.x}),[be.arrow]),_t=be.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Ye,arrowStyles:Tt,arrowRef:ue,arrowUncentered:_t,side:yt,align:kt,physicalSide:Qe,anchorHidden:nt,refs:De,context:ce,isPositioned:J,update:Re}),[Ye,Tt,ue,_t,yt,kt,Qe,nt,De,ce,J,Re])}function dE(e){return e!=null&&"current"in e}function wh(e){return e==="starting"?G2:Ln}function hx(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const d={...n};return c&&(d.pointerEvents="none"),mn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:d},wh(r),s],stateAttributesMapping:Uc})}const O6=20;function M6(e,t,n,r){const[s,a]=v.useState(!1);Ge(()=>{if(!e||!t||n==null){a(!1);return}const l=Vt(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-O6)},[e,t,n]),F$(e&&(!t||s),r)}let MN=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function IN(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:d,elementsRef:f,labelsRef:h,nextIndexRef:m}=w6(),b=v.useRef(-1),[y,k]=v.useState(a??(s===MN.GuessFromOrder?()=>{if(b.current===-1){const R=m.current;m.current+=1,b.current=R}return b.current}:-1)),S=v.useRef(null),E=v.useCallback(R=>{if(S.current=R,y!==-1&&R!==null&&(f.current[y]=R,h)){const T=t!==void 0;h.current[y]=T?t:r?.current?.textContent??R.textContent}},[y,f,h,t,r]);return Ge(()=>{if(a!=null)return;const R=S.current;if(R)return l(R,n),()=>{c(R)}},[a,l,c,n]),Ge(()=>{if(a==null)return d(R=>{const T=S.current?R.get(S.current)?.index:null;T!=null&&k(T)})},[a,d,k]),{ref:E,index:y}}const DN={popup:{k6sLGO:"ui-1so62im",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-11xpdln",kAMwcw:"ui-19frgs0",kIyJzY:"ui-7pq1vu ui-1fdgx8g ui-sagj69",k3aq6I:"ui-1c071of ui-17ll0io ui-2um2vg ui-1ahjy9u ui-s2p038 ui-fld6f8 ui-14hpypv ui-1296zyv ui-1h7md5i",$$css:!0},positioner:{"--ui-floating-anchor-fade-duration":"ui-1kwwprx ui-5ece57 ui-4rr00i",kSiTet:"ui-1hc1fzr ui-4itv7f ui-fwszop",$$css:!0}},Eh=DN.popup,I6=DN.positioner,D6={transition:`opacity var(--ui-floating-anchor-fade-duration) ${kz["--cursor-easing-out-quint"]}`};function Th(...e){const t=Lt(I6,...e);return{...t,style:{...t.style,...D6}}}const Rh={border:{k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",k3foIR:"ui-1m1drc7",kH8aOt:"ui-1unh1gc",k8Iv0R:"ui-1xrz1ek",kc1e00:"ui-1iygr5g",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1o7vem3",kloYau:"ui-2q1x1w",$$css:!0}},nr={positioner:{kY2c9j:"ui-2hst0z",$$css:!0},popupPositioner:{kY2c9j:"ui-fc2p8",$$css:!0},popupShadow:{kGVxlE:"ui-1x78n9t",$$css:!0},tooltipShadow:{kGVxlE:"ui-4l6n3x",$$css:!0},popupRadius:{kaIpWk:"ui-1pkpdue",$$css:!0},tooltipRadius:{kaIpWk:"ui-15ujvgx",$$css:!0},surface:{kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kaIpWk:"ui-1pkpdue",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},popupLayout:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-ezivpi",ks0D6T:"ui-w5ewwj",kHjlTd:"ui-j0a0fe",$$css:!0},popupInset:{kLKAdn:"ui-uve7l6",kwRFfy:"ui-196pc8s",kGO01o:"ui-1rgtt3y",kZCmMZ:"ui-22095l",$$css:!0},previewCardInset:{kLKAdn:"ui-oyc9vk",kwRFfy:"ui-1fg0g13",kGO01o:"ui-2lprc",kZCmMZ:"ui-1tajz9i",$$css:!0},popupInteractive:{kfzvcC:"ui-67bb7w",kfSwDN:"ui-1hx0egp",$$css:!0},popupSurfaceMd:{kaIpWk:"ui-1pkpdue",$$css:!0},tooltipSurface:{"--ui-surface-hairline-width":"ui-10ssw4j",kGuDYH:"ui-mppzg7",kLWn49:"ui-l68z86",kb6lSQ:"ui-55tv1j",kLKAdn:"ui-3jsnqb",kGO01o:"ui-1w5ico7",kwRFfy:"ui-180w9kh",kZCmMZ:"ui-1vs96pt",$$css:!0}},jN=nr.positioner,mx=[nr.surface,Rh.border],LN=[jN,nr.popupShadow,nr.popupRadius],j6=[jN,nr.tooltipShadow,nr.tooltipRadius],L6=[nr.tooltipRadius,nr.tooltipSurface],z6=nr.popupLayout,P6=nr.popupInset,zN=nr.previewCardInset,PN=[z6,P6],$6=nr.popupInteractive,$N=[nr.surface,Rh.border],B6=nr.popupSurfaceMd,F6=nr.popupPositioner,U6=[F6,nr.popupShadow,nr.popupRadius],da={popupFrame:{kB7OPa:"ui-9f619",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kHBbk8:"ui-c8icb0",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",$$css:!0},list:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-ryxfnj",$$css:!0},row:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kkrTdU:"ui-1ypdohk ui-mh7c9n",kMwMTN:"ui-1wd3ewq ui-1kosevp",kWkggS:"ui-jbqb8w ui-1sbws7q",$$css:!0},rowFrame:{kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kOIVth:"ui-xhr3t",kaIpWk:"ui-2u8bby","--ui-popup-list-row-highlighted-opacity":"ui-5i412e ui-1nlrr02",kWkggS:"ui-jbqb8w ui-9wl9qz",$$css:!0},rowInsetHighlight:{kfYRhQ:"ui-1b16mni",k7VdEw:"ui-1nwgpwx",kXO8Uu:"ui-1r87rg3",kDFFfQ:"ui-1wv1pz9",kllAdU:"ui-1v0xhfw",kxsapM:"ui-13bjwnm",k3JYP4:"ui-t2or2s",kDMCui:"ui-tj3xra",kWQQwa:"ui-50seq6",kYNu72:"ui-95qkr9",$$css:!0},rowSectionTrailing:{keTefX:"ui-kiyga0",$$css:!0},rowSectionDescription:{kSGwAc:"ui-qcrz7y",keoZOQ:"ui-1k5org8",$$css:!0}},q6=da.list,H6=da.row,G6=da.popupFrame,V6=da.rowFrame,W6=da.rowInsetHighlight,K6=da.rowSectionTrailing,Y6=da.rowSectionDescription,Dr={popup:{k7Eaqz:"ui-1i9suas",ks0D6T:"ui-13kvn80",kskxy:"ui-2pj5ht",$$css:!0},popupWidth:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],popupDefaultWidth:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-lopysa",$$css:!0},list:{kOIVth:"ui-ihas45",kLKAdn:"ui-9g4tyx",kwRFfy:"ui-yri2b",kGO01o:"ui-x776sp",kZCmMZ:"ui-1c1uobl",$$css:!0},row:{kAzted:"ui-14dnd5q ui-12uk8lx",kLKAdn:"ui-p90ga9 ui-17apzky",kwRFfy:"ui-mk9vl6",kGO01o:"ui-1ep5yuf ui-zkc5ih",kZCmMZ:"ui-vtdk6d",$$css:!0},rowText:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",$$css:!0},rowLabel:{k1xSpc:"ui-1lliihq",kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0},itemTextWithMeta:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},rowTextWithDescription:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1cy8zhl",kOIVth:"ui-137clkk",$$css:!0},rowDescription:{k1xSpc:"ui-1lliihq",ks0D6T:"ui-193iq5w",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",kMwMTN:"ui-4b2ntj",$$css:!0},rowMeta:{keTefX:"ui-1uokl23",$$css:!0},rowSection:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kMwMTN:"ui-19aaqeu",$$css:!0},rowSectionLeading:{k71WvV:"ui-17adnql",$$css:!0},rowSectionEnd:{kOIVth:"ui-1jcujwu",$$css:!0}},X6=[$N,G6,Dr.popup],Z6={sm:null,md:B6},Q6=Dr.popupWidth,J6=Dr.popupDefaultWidth,eB=[q6,Dr.list],tB=[H6,V6,Dr.row,W6,Fi.root],nB=Dr.rowText,rB=Dr.rowLabel,iB=Dr.itemTextWithMeta,sB=Dr.rowTextWithDescription,oB=Dr.rowDescription,aB=Dr.rowMeta,Sb=Dr.rowSection,lB=Dr.rowSectionLeading,pE=K6,uB=Dr.rowSectionEnd,wb=Y6;function Qa(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,d,f;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((k,S)=>r[S]!==k)))return s;r=m;let y;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(y=Date.now()),s=t(...m),n.key&&((f=n.debug)!=null&&f.call(n))){const k=Math.round((Date.now()-h)*100)/100,S=Math.round((Date.now()-y)*100)/100,E=S/16,R=(T,C)=>{for(T=String(T);T.length<C;)T=" "+T;return T};console.info(`%c⏱ ${R(S,5)} /${R(k,5)} ms`,`
|
|
10
|
+
font-size: .6rem;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
color: hsl(${Math.max(0,Math.min(120-120*E,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(s),a=!1,s}return l.updateDeps=c=>{r=c},l}function hE(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const cB=(e,t)=>Math.abs(e-t)<1.01,fB=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},mE=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},dB=e=>e,pB=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},hB=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:d}=l;t({width:Math.round(c),height:Math.round(d)})};if(s(mE(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const d=l[0];if(d?.borderBoxSize){const f=d.borderBoxSize[0];if(f){s({width:f.inlineSize,height:f.blockSize});return}}s(mE(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},gE={passive:!0},bE=typeof window>"u"?!0:"onscrollend"in window,mB=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&bE?()=>{}:fB(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:m,isRtl:b}=e.options;s=m?n.scrollLeft*(b&&-1||1):n.scrollTop,a(),t(s,h)},c=l(!0),d=l(!1);n.addEventListener("scroll",c,gE);const f=e.options.useScrollendEvent&&bE;return f&&n.addEventListener("scrollend",d,gE),()=>{n.removeEventListener("scroll",c),f&&n.removeEventListener("scrollend",d)}},gB=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},bB=(e,{adjustments:t=0,behavior:n},r)=>{var s,a;const l=e+t;(a=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class yB{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var n,r,s;return((s=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{const l=()=>{const c=a.target,d=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,this.options.measureElement(c,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var a;return(a=r())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=r())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:dB,rangeExtractor:pB,onChange:()=>{},measureElement:gB,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Qa(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,a=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(s.has(c.lane))continue;const d=a.get(c.lane);if(d==null||c.end>d.end?a.set(c.lane,c):c.end<d.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=Qa(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=Qa(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const f=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,f),m=new Array(c).fill(void 0);for(let b=0;b<f;b++){const y=h[b];y&&(m[y.lane]=b)}for(let b=f;b<n;b++){const y=a(b),k=this.laneAssignments.get(b);let S,E;if(k!==void 0&&this.options.lanes>1){S=k;const _=m[S],L=_!==void 0?h[_]:void 0;E=L?L.end+this.options.gap:r+s}else{const _=this.options.lanes===1?h[b-1]:this.getFurthestMeasurement(h,b);E=_?_.end+this.options.gap:r+s,S=_?_.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,S)}const R=d.get(y),T=typeof R=="number"?R:this.options.estimateSize(b),C=E+T;h[b]={index:b,start:E,size:T,end:C,key:y,lane:S},m[S]=b}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Qa(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?vB({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Qa(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,a,l)=>a===null||l===null?[]:n({startIndex:a,endIndex:l,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,s-a),c=Math.min(this.options.count-1,s+a);return n>=l&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((l,c)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(c))});return}const r=this.indexFromElement(n),s=this.options.getItemKey(r),a=this.elementsCache.get(s);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(s,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var s;const a=this.measurementsCache[n];if(!a)return;const l=this.itemSizeCache.get(a.key)??a.size,c=r-l;c!==0&&(((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,c,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,r)),this.notify(!1))},this.getVirtualItems=Qa(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],d=r[c];s.push(d)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return hE(r[BN(0,r.length-1,s=>hE(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+a?"end":"start"),r==="center"?n+=(s-a)/2:r==="end"&&(n-=a);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getSize(),a=this.getScrollOffset(),l=this.measurementsCache[n];if(!l)return;if(r==="auto")if(l.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(l.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,l.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:s="auto"}={})=>{const a=this.getOffsetForAlignment(n,r),l=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:s="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,r);if(!a)return;const[l,c]=a,d=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:d,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const a=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&a.some(c=>c===null);){const c=r[l];a[c.lane]===null&&(a[c.lane]=c.end),l--}s=Math.max(...a.filter(c=>c!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,a=1,l=s!==this.scrollState.lastTargetOffset;if(!l&&cB(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.scrollState=null;return}}else this.scrollState.stableFrames=0,l&&(this.scrollState.lastTargetOffset=s,this.scrollState.behavior="auto",this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const BN=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,a=n(s);if(a<r)e=s+1;else if(a>r)t=s-1;else return s}return e>0?e-1:0};function vB({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=BN(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const d=Array(r).fill(0);for(;c<s&&d.some(h=>h<n+t);){const h=e[c];d[h.lane]=h.end,c++}const f=Array(r).fill(n+t);for(;l>=0&&f.some(h=>h>=n);){const h=e[l];f[h.lane]=h.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}function xB(){const e=v.useRef(void 0),t=v.useCallback(()=>{const r=e.current;r!==void 0&&(e.current=void 0,cancelAnimationFrame(r))},[]),n=v.useCallback(r=>{t(),e.current=requestAnimationFrame(s=>{e.current=void 0,r(s)})},[t]);return v.useEffect(()=>t,[t]),v.useMemo(()=>({dispose:t,request:n}),[t,n])}function FN(e){return typeof ResizeObserver>"u"?null:new ResizeObserver(e)}function Ly({deltaX:e,deltaY:t,mapVerticalWheelToHorizontal:n,axisBehavior:r="dominant",mappedBehavior:s="dominant"}){if(n){let c;return s==="dominant"&&Math.abs(t)>Math.abs(e)?c=t:c=e||t,c===0?null:c}if(r==="raw")return e===0?null:e;const a=Math.abs(e),l=Math.abs(t);return e===0||a<=l?null:e}const kB="hover",SB=4,wB={kn1fP1:"ui-xqa2ke",kJcbqH:"ui-16fucec",$$css:!0};function EB(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}function TB(e){const{scrollLeft:t,scrollWidth:n,clientWidth:r,threshold:s}=e,a=Math.abs(t);return{isAtStart:a<=s,isAtEnd:a+r>=n-s}}const yE={maskGeometry:e=>[wB,{kQB4zb:(e>1?"intersect":null)!=null?"ui-1xrn8sl":e>1?"intersect":null,kRVSR3:(e>1?"source-in":null)!=null?"ui-60m5pi":e>1?"source-in":null,$$css:!0},{"--x-maskSize":(e>1?"100% 100%, 100% 100%":"100% 100%")!=null?e>1?"100% 100%, 100% 100%":"100% 100%":void 0,"--x-maskComposite":(e>1?"intersect":null)!=null?e>1?"intersect":null:void 0,"--x-WebkitMaskComposite":(e>1?"source-in":null)!=null?e>1?"source-in":null:void 0}],mask:e=>[{kX1K2I:e!=null?"ui-wjwp01":e,kAExgp:e!=null?"ui-11jd449":e,$$css:!0},{"--x-maskImage":e??void 0,"--x-WebkitMaskImage":e??void 0}]};function RB({topFadePx:e,bottomFadePx:t,topFadeStartOpacity:n=0,bottomFadeStartOpacity:r=0,startFadePx:s=0,endFadePx:a=0}){const l=[];return(e>0||t>0)&&l.push(`linear-gradient(to bottom, rgba(0, 0, 0, ${n}) 0px, black ${e}px, black calc(100% - ${t}px), rgba(0, 0, 0, ${r}) 100%)`),(s>0||a>0)&&l.push(`linear-gradient(to right, transparent 0px, black ${s}px, black calc(100% - ${a}px), transparent 100%)`),l.length===0?null:[yE.maskGeometry(l.length),yE.mask(l.join(", "))]}const CB=20;class _B{constructor(){this._trackSize=0,this._viewportSize=0,this._scrollSize=0,this._scrollPosition=0,this._isScrollable=!1,this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0}setDimensions(t,n,r,s){const a=Math.round(t),l=Math.round(n),c=Math.round(r),d=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===d?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=d,this._recompute(),!0)}setScrollPosition(t){const n=Math.round(t);return this._scrollPosition===n?!1:(this._scrollPosition=n,this._thumbPosition=this._computeThumbPosition(),!0)}_recompute(){if(this._isScrollable=this._scrollSize>0&&this._viewportSize>0&&this._scrollSize>this._viewportSize,!this._isScrollable||this._trackSize<=0){this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0;return}const t=Math.floor(this._trackSize*this._viewportSize/this._scrollSize);this._thumbSize=Math.min(this._trackSize,Math.max(CB,t));const n=this._trackSize-this._thumbSize,r=this._scrollSize-this._viewportSize;this._thumbRatio=r>0?n/r:0,this._thumbPosition=this._computeThumbPosition()}_computeThumbPosition(){return!this._isScrollable||this._thumbRatio===0?0:Math.round(this._scrollPosition*this._thumbRatio)}isScrollable(){return this._isScrollable}getThumbSize(){return this._thumbSize}getThumbPosition(){return this._thumbPosition}getScrollPositionFromThumbDelta(t,n){return!this._isScrollable||this._thumbRatio===0?0:Math.round(n+t/this._thumbRatio)}getScrollPositionFromTrackOffset(t){if(!this._isScrollable||this._thumbRatio===0)return 0;const n=Math.max(0,Math.min(this._trackSize-this._thumbSize,t-this._thumbSize/2));return Math.round(n/this._thumbRatio)}}const fl=class fl{constructor(t){this.thumbInsetStart=0,this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null,this.resizeObserver=null,this.boundOnScroll=null,this.boundOnThumbDown=null,this.boundOnTrackDown=null,this.boundOnWheel=null,this.dragCleanup=null,this.pendingSyncThumbFrame=null,this.viewport=t.viewport,this.content=t.content,this.scrollbar=t.scrollbar,this.thumb=t.thumb,this.state=new _B,this.direction=t.direction,this.mapVerticalWheelToHorizontal=t.mapVerticalWheelToHorizontal??!1}get horizontal(){return this.direction==="horizontal"}attach(){this.attachScrollListener(),this.attachResizeObserver(),this.attachPointerEvents(),this.attachWheelForwarding(),this.scheduleSyncThumb()}detach(){this.detachScrollListener(),this.detachResizeObserver(),this.detachPointerEvents(),this.detachWheelForwarding(),this.pendingSyncThumbFrame!==null&&(cancelAnimationFrame(this.pendingSyncThumbFrame),this.pendingSyncThumbFrame=null),this.horizontalWheelResetTimer&&(clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=null),this.horizontalWheelAxisLock=null}refresh(){this.scheduleSyncThumb()}attachScrollListener(){this.boundOnScroll=this.handleScroll.bind(this),this.viewport.addEventListener("scroll",this.boundOnScroll,{passive:!0})}detachScrollListener(){this.boundOnScroll&&(this.viewport.removeEventListener("scroll",this.boundOnScroll),this.boundOnScroll=null)}handleScroll(){const t=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop;if(this.state.setScrollPosition(t)){const n=this.state.getThumbPosition();this.thumb.style.transform=this.getThumbTransform(n)}}attachResizeObserver(){this.resizeObserver=FN(()=>this.scheduleSyncThumb()),this.resizeObserver!==null&&(this.resizeObserver.observe(this.viewport),this.content!==void 0&&this.resizeObserver.observe(this.content),this.resizeObserver.observe(this.scrollbar))}detachResizeObserver(){this.resizeObserver?.disconnect(),this.resizeObserver=null}scheduleSyncThumb(){this.pendingSyncThumbFrame===null&&(this.pendingSyncThumbFrame=requestAnimationFrame(()=>{this.pendingSyncThumbFrame=null,this.syncThumb()}))}syncThumb(){this.thumbInsetStart=this.getThumbInsetStart();const t=this.readDimensions();this.state.setDimensions(t.trackSize,t.viewportSize,t.scrollSize,t.scrollPos)&&this.applyThumbStyle()}readDimensions(){const t=Math.max(0,this.scrollbar.clientHeight-this.thumbInsetStart);return{trackSize:this.horizontal?this.scrollbar.clientWidth:t,viewportSize:this.horizontal?this.viewport.clientWidth:this.viewport.clientHeight,scrollSize:this.horizontal?this.viewport.scrollWidth:this.viewport.scrollHeight,scrollPos:this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop}}applyThumbStyle(){const t=this.state.getThumbSize(),n=this.state.getThumbPosition();this.horizontal?(this.thumb.style.width=`${t}px`,this.thumb.style.height="",this.thumb.style.transform=this.getThumbTransform(n)):(this.thumb.style.height=`${t}px`,this.thumb.style.width="",this.thumb.style.transform=this.getThumbTransform(n)),this.scrollbar.dataset.scrollable=this.state.isScrollable()?"true":"false"}attachPointerEvents(){this.boundOnThumbDown=this.handleThumbDown.bind(this),this.boundOnTrackDown=this.handleTrackDown.bind(this),this.thumb.addEventListener("pointerdown",this.boundOnThumbDown),this.scrollbar.addEventListener("pointerdown",this.boundOnTrackDown)}detachPointerEvents(){this.boundOnThumbDown&&(this.thumb.removeEventListener("pointerdown",this.boundOnThumbDown),this.boundOnThumbDown=null),this.boundOnTrackDown&&(this.scrollbar.removeEventListener("pointerdown",this.boundOnTrackDown),this.boundOnTrackDown=null),this.dragCleanup?.(),this.dragCleanup=null}handleThumbDown(t){if(t.button!==0)return;t.preventDefault();const n=this.horizontal?t.clientX:t.clientY,r=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop,s=t.pointerId;this.thumb.setPointerCapture(s),this.thumb.classList.add("ui-scroll-area__thumb--active");const a=c=>{const d=(this.horizontal?c.clientX:c.clientY)-n,f=this.state.getScrollPositionFromThumbDelta(d,r);this.horizontal?this.viewport.scrollLeft=f:this.viewport.scrollTop=f},l=()=>{this.thumb.classList.remove("ui-scroll-area__thumb--active");try{this.thumb.releasePointerCapture(s)}catch{}this.thumb.removeEventListener("pointermove",a),this.thumb.removeEventListener("pointerup",l),this.thumb.removeEventListener("pointercancel",l),this.dragCleanup=null};this.thumb.addEventListener("pointermove",a),this.thumb.addEventListener("pointerup",l),this.thumb.addEventListener("pointercancel",l),this.dragCleanup=l}handleTrackDown(t){if(t.button!==0||t.target===this.thumb)return;const n=this.scrollbar.getBoundingClientRect();if(!this.horizontal){this.viewport.scrollTop=this.state.getScrollPositionFromTrackOffset(t.clientY-n.top-this.thumbInsetStart);return}const r=getComputedStyle(this.viewport).direction==="rtl",s=r?n.right-t.clientX:t.clientX-n.left,a=this.state.getScrollPositionFromTrackOffset(s);this.viewport.scrollLeft=r?-a:a}attachWheelForwarding(){this.boundOnWheel=t=>{if(this.horizontal){const n=this.viewport.scrollWidth-this.viewport.clientWidth;if(n<=0)return;let r=null;if(this.mapVerticalWheelToHorizontal)r=Ly({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!0,mappedBehavior:"prefer-horizontal"});else{if(this.horizontalWheelAxisLock||(this.horizontalWheelAxisLock=Math.abs(t.deltaX)>Math.abs(t.deltaY)?"x":"y"),this.horizontalWheelResetTimer&&clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=setTimeout(()=>{this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null},fl.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Ly({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!1,axisBehavior:"raw"}),r===null){t.preventDefault(),t.stopPropagation();return}}if(r===null)return;const s=Math.max(0,Math.min(n,this.viewport.scrollLeft+r));this.viewport.scrollLeft=s,t.preventDefault(),t.stopPropagation()}else this.viewport.scrollTop+=t.deltaY},this.scrollbar.addEventListener("wheel",this.boundOnWheel,{passive:!1})}detachWheelForwarding(){this.boundOnWheel&&(this.scrollbar.removeEventListener("wheel",this.boundOnWheel),this.boundOnWheel=null)}getThumbTransform(t){return this.horizontal?`translateX(${t}px)`:`translateY(${t+this.thumbInsetStart}px)`}getThumbInsetStart(){if(this.horizontal)return 0;const t=getComputedStyle(this.scrollbar).getPropertyValue(fl.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};fl.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",fl.WHEEL_GESTURE_RESET_MS=150;let Ip=fl;const NB={base:{"--scrollbar-size":"ui-1ekbvf6","--scrollbar-inset":"ui-1logqu4","--scrollbar-thumb-top-offset":"ui-1fx8caa","--scroll-area-scroll-padding":"ui-8ddqcf",kVAEAm:"ui-1n2onr6",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",k1xSpc:"ui-rvj5dj",k52YG4:"ui-ypqxfk",$$css:!0}},Eb={base:{kJuA4N:"ui-175mniq",kAzted:"ui-2lwn1j",kskxy:"ui-mz0i5r",kaIpWk:"ui-1pjcqnp",kXHlph:"ui-6ikm8r",kORKVm:"ui-1odjw0f",kaPefq:"ui-1fu52t7",kC2sXz:"ui-1ufbpdf",k9lH4S:"ui-3oazx1",kphCe6:"ui-19l4kpp",kvh3hx:"ui-1t1jukp",kacamN:"ui-1e4zzel",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0},horizontal:{kXHlph:"ui-w2csxc",kORKVm:"ui-10wlt62",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kvh3hx:"ui-7p5m3t",kacamN:"ui-y5w88m",$$css:!0},both:{kXHlph:"ui-w2csxc",kORKVm:"ui-1odjw0f",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kZeWKH:"ui-ish69e",$$css:!0}},Tb={base:{kB7OPa:"ui-9f619",kzqmXN:"ui-eq5yr9",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-193iq5w",kAzted:"ui-1us19tq",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",$$css:!0},horizontal:{kzqmXN:"ui-14atkfc",kZKoxP:"ui-g7h5cd",kXwgrk:"ui-1q0g3np",$$css:!0},both:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-1x1rfll",kZKoxP:"ui-t7dq6l",kXwgrk:"ui-dt5ytf",$$css:!0}},Uu={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1n327nk",k87sOh:"ui-16271f3",kt4wiu:"ui-1cdd6y0",krVfgx:"ui-1c87l4o",kLqNvP:"ui-hi6v0a",kzqmXN:"ui-790ffn",kfzvcC:"ui-67bb7w",k1xSpc:"ui-1lliihq ui-y36ywk",$$css:!0},horizontal:{k87sOh:"ui-80663w",kt4wiu:"ui-1cdd6y0",krVfgx:"ui-1gncbth",kLqNvP:"ui-pl0nw1",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",$$css:!0},bothVertical:{krVfgx:"ui-1143y87",$$css:!0},bothHorizontal:{kt4wiu:"ui-13kbk1n",$$css:!0},visibilityNever:{k1xSpc:"ui-1s85apg",$$css:!0}},Rb={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kt4wiu:"ui-tijo5x",krVfgx:"ui-dd4er5",kLqNvP:"ui-1o0tod",kAzted:"ui-4jlmx6",kzqmXN:"ui-790ffn",kaIpWk:"ui-1i4c3av",kWkggS:"ui-1m4ooaa ui-1kik0b9 ui-19p5jqy ui-gk890x",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w",k3aq6I:"ui-oww4n8",k1ekBW:"ui-1e8aii2",kIyJzY:"ui-1vaoic9 ui-144st5w",kAMwcw:"ui-1aiz5cx",$$css:!0},horizontal:{k87sOh:"ui-13vifvy",kt4wiu:"ui-1woyocn",krVfgx:"ui-1ey2m1c",kLqNvP:"ui-1o0tod",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",kAzted:"ui-65nank",k7Eaqz:"ui-cbmsab",$$css:!0},hoverHidden:{kSiTet:"ui-g01cxk ui-4gyw5p ui-gorybd",$$css:!0}};function AB(){return NB.base}function OB({direction:e}){return[Eb.base,e==="horizontal"?Eb.horizontal:null,e==="both"?Eb.both:null]}function MB(e){return[Tb.base,e==="horizontal"?Tb.horizontal:null,e==="both"?Tb.both:null]}function vE({direction:e,orientation:t,visibility:n}){return[Uu.base,t==="horizontal"?Uu.horizontal:null,e==="both"&&t==="vertical"?Uu.bothVertical:null,e==="both"&&t==="horizontal"?Uu.bothHorizontal:null,n==="never"?Uu.visibilityNever:null]}function xE(e,t){return[Rb.base,e==="horizontal"?Rb.horizontal:null,t?Rb.hoverHidden:null]}const IB=1e4,qu=5,wl=v.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:d,allowScrollChaining:f=!1,contentStyle:h,overlay:m,style:b,scrollbarVisibility:y=kB,isScrollbarRevealed:k=!1,direction:S="vertical",topFadeSize:E,bottomFadeSize:R,topFadeStartOpacity:T=0,bottomFadeStartOpacity:C=0,startFadeSize:_,endFadeSize:L,autoScrollToBottom:N=!1,scrollTrigger:A,autoScrollPauseTimeout:$=IB,onScrollStateChange:z,mapVerticalWheelToHorizontal:I=!1,scrollPadding:Y=SB,scrollbarInset:H,onPointerEnter:q,onPointerLeave:D,...F},U){const W=v.useRef(null),B=v.useRef(null),K=v.useRef(null),O=v.useRef(null),P=v.useRef(null),V=v.useRef(null),j=v.useRef(null),Z=S!=="horizontal",te=S!=="vertical",se=I&&!Z,[ue,le]=v.useState(!1),[fe,ge]=v.useState(!1),[_e,oe]=v.useState(!1),[ye,Se]=v.useState(!1),[Oe,we]=v.useState(!1),ke=v.useRef(!1);ke.current=Oe;const De=v.useRef(0),Me=v.useRef(0),je=v.useRef(null),He=v.useRef(null);v.useLayoutEffect(()=>{const Ee=B.current,Ue=K.current;if(!Ee||!Ue)return;const ze=[];if(Z){const Ne=O.current,Ie=P.current;Ne&&Ie&&ze.push(new Ip({viewport:Ee,content:Ue,scrollbar:Ne,thumb:Ie,direction:"vertical",mapVerticalWheelToHorizontal:se}))}if(te){const Ne=V.current,Ie=j.current;Ne&&Ie&&ze.push(new Ip({viewport:Ee,content:Ue,scrollbar:Ne,thumb:Ie,direction:"horizontal",mapVerticalWheelToHorizontal:se}))}if(ze.length!==0){for(const Ne of ze)Ne.attach();return()=>{for(const Ne of ze)Ne.detach()}}},[Z,te,se]);const be=v.useCallback(()=>{const Ee=B.current;return Ee?{scrollTop:Ee.scrollTop,scrollHeight:Ee.scrollHeight,clientHeight:Ee.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),Re=v.useCallback((Ee=!1)=>{const Ue=B.current;Ue&&Ue.scrollTo({top:Ue.scrollHeight,behavior:Ee?"smooth":"instant"})},[]),ee=v.useCallback((Ee=!1)=>{const Ue=B.current;Ue&&Ue.scrollTo({top:0,behavior:Ee?"smooth":"instant"})},[]),ce=v.useCallback(()=>{He.current===null&&(He.current=requestAnimationFrame(()=>{He.current=null,!ke.current&&Re(!1)}))},[Re]),J=v.useCallback(()=>{N&&(ke.current||ce())},[N,ce]);v.useImperativeHandle(U,()=>({scrollToBottom:Re,scrollToTop:ee,requestAutoScroll:J,getScrollPosition:be,get rootElement(){return W.current},get viewportElement(){return B.current}}),[Re,ee,J,be]);const re=v.useCallback(()=>{const Ee=B.current;if(!Ee)return;const{scrollTop:Ue,scrollHeight:ze,clientHeight:Ne}=Ee,{isAtTop:Ie,isAtBottom:ut}=EB({scrollTop:Ue,scrollHeight:ze,clientHeight:Ne,threshold:qu});le(!Ie),ge(!ut);const{isAtStart:Be,isAtEnd:Rt}=TB({scrollLeft:Ee.scrollLeft,scrollWidth:Ee.scrollWidth,clientWidth:Ee.clientWidth,threshold:qu});oe(!Be),Se(!Rt),z?.({isAtBottom:ut,isAtTop:Ie}),ut&&ke.current&&(we(!1),je.current&&(clearTimeout(je.current),je.current=null));const wt=ze<Me.current-qu,$t=ze>Me.current+qu,Rn=Ue<De.current-qu;Rn&&!wt&&!ut&&N&&!ke.current&&(we(!0),je.current&&clearTimeout(je.current),je.current=setTimeout(()=>{we(!1),je.current=null},$)),$t&&N&&!ke.current&&!ut&&!Rn&&ce(),wt&&N&&!ke.current&&!ut&&ce(),De.current=Ue,Me.current=ze},[z,N,$,ce]),xe=xB(),$e=v.useCallback(()=>{xe.request(re)},[xe,re]);v.useEffect(()=>{const Ee=B.current,Ue=K.current;if(!Ee)return;const ze=()=>{$e()};Ee.addEventListener("scroll",ze,{passive:!0});const Ne=FN(re);return Ne!==null&&(Ne.observe(Ee),Ue&&Ne.observe(Ue)),()=>{Ee.removeEventListener("scroll",ze),Ne?.disconnect(),xe.dispose()}},[re,$e,xe]),v.useEffect(()=>{A!==void 0&&N&&(ke.current||ce())},[A,N,ce]),v.useEffect(()=>{if(!Z)return;const Ee=B.current;if(!Ee)return;const Ue=ze=>{const Ne=ze.deltaY;if(Ne===0)return;const Ie=Ee.scrollHeight-Ee.clientHeight;if(Ie<=0)return;const ut=Ee.scrollTop,Be=ut<=0&&Ne<0,Rt=ut>=Ie-.5&&Ne>0;Be||Rt||ze.stopPropagation()};return Ee.addEventListener("wheel",Ue,{passive:!0}),()=>Ee.removeEventListener("wheel",Ue)},[Z]),v.useEffect(()=>{if(!te)return;const Ee=B.current;if(!Ee)return;const Ue=Ne=>{const Ie=Ly({deltaX:Ne.deltaX,deltaY:Ne.deltaY,mapVerticalWheelToHorizontal:se});if(Ie===null)return;const ut=Ee.scrollWidth-Ee.clientWidth;if(ut<=0)return;const Be=Ee.scrollLeft;if(!(Ie<0&&Be<=0)&&!(Ie>0&&Be>=ut-.5)){if(!se){Ne.stopPropagation();return}Ne.preventDefault(),Ee.scrollLeft=Be+Ie}},ze=se?{passive:!1,capture:!0}:{passive:!0,capture:!0};return Ee.addEventListener("wheel",Ue,ze),()=>Ee.removeEventListener("wheel",Ue,ze)},[te,se]);const Xe=E!==void 0||R!==void 0,Ye=_!==void 0||L!==void 0,ht=Xe||Ye,Qe=Xe?E??24:0,yt=Xe?R??24:0,kt=Ye?_??24:0,nt=Ye?L??24:0,Tt=y==="hover",[_t,st]=v.useState(!1);v.useLayoutEffect(()=>{Tt&&st(W.current?.matches(":hover")??!1)},[Tt]);const vt=v.useCallback(Ee=>{st(!0),q?.(Ee)},[q]),Dt=v.useCallback(Ee=>{st(!1),D?.(Ee)},[D]),Pt=Tt&&!_t&&!k;v.useEffect(()=>()=>{je.current&&clearTimeout(je.current),He.current!==null&&(cancelAnimationFrame(He.current),He.current=null)},[]);const At={"--scroll-area-scroll-padding":`${Y}px`,...H!==void 0?{"--scrollbar-inset":`${H}px`}:void 0},X=Kt({rootClass:"ui-scroll-area",stylexStyles:[AB(),c],className:nn(ht&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...At,...b}}),he=Kt({rootClass:"ui-scroll-area__viewport",stylexStyles:[OB({direction:S}),d,ht?RB({topFadePx:ue?Qe:0,bottomFadePx:fe?yt:0,topFadeStartOpacity:T,bottomFadeStartOpacity:C,startFadePx:_e?kt:0,endFadePx:ye?nt:0}):null],className:l,style:f?{overscrollBehavior:"auto"}:void 0}),Le=Kt({rootClass:"ui-scroll-area__content",stylexStyles:[MB(S),h]}),Ze=Kt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:vE({direction:S,orientation:"vertical",visibility:y})}),St=Lt(xE("vertical",Pt)),at=Kt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:vE({direction:S,orientation:"horizontal",visibility:y})}),qe=Lt(xE("horizontal",Pt));return g.jsxs("div",{ref:W,className:X.className,style:X.style,"data-scroll-padding":Y,"data-visibility":y,"data-direction":S,...F,onPointerEnter:Tt?vt:q,onPointerLeave:Tt?Dt:D,children:[g.jsx("div",{ref:B,className:he.className,style:he.style,"data-native-scrollbar":"none",children:g.jsx("div",{ref:K,className:Le.className,style:Le.style,children:t})}),m,Z&&g.jsx("div",{ref:O,className:Ze.className,style:Ze.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:P,className:St.className,style:St.style,"data-orientation":"vertical"})}),te&&g.jsx("div",{ref:V,className:at.className,style:at.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:j,className:qe.className,style:qe.style,"data-orientation":"horizontal"})})]})}),Cb={root:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",k7Eaqz:"ui-euugli",$$css:!0},rootHidden:{k1xSpc:"ui-1s85apg",$$css:!0},viewport:{kaPefq:"ui-1uzft2t",k9lH4S:"ui-pt7jon",$$css:!0}};function DB({children:e,hidden:t=!1,ref:n}){return g.jsx(wl,{ref:n,"data-component":"list-popup-scroll",maxHeight:"none",rootStyle:[Cb.root,t&&Cb.rootHidden],viewportStyle:Cb.viewport,children:e})}const Ch="top",gx=300,_h=100;function jB(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function LB(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function zB(e){return e?{side:"flip",align:"shift",fallbackAxisSide:"none"}:{side:"flip",align:"shift",fallbackAxisSide:"start"}}function Nh(e,t,n){const{side:r,align:s}=v.useMemo(()=>jB(e),[e]),{sideOffset:a,alignOffset:l}=v.useMemo(()=>LB(t),[t]),c=v.useMemo(()=>zB(n),[n]);return{side:r,align:s,sideOffset:a,alignOffset:l,collisionAvoidance:c,positionMethod:"fixed"}}const PB=v.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:d=!1,onValueChange:f,defaultValue:h,autoFocus:m=!1,style:b,...y}=t,{state:k,name:S,disabled:E,setTouched:R,setDirty:T,validityData:C,setFocused:_,setFilled:L,validationMode:N,validation:A}=Sh(),{clearErrors:$}=vN(),z=E||d,I=S??l,Y={...k,disabled:z},{labelId:H}=ux(),q=fx({id:a});Ge(()=>{const O=c!=null;A.inputRef.current?.value||O&&c!==""?L(!0):O&&c===""&&L(!1)},[A.inputRef,L,c]);const D=v.useRef(null);Ge(()=>{m&&D.current===ar(Vt(D.current))&&_(!0)},[m,_]);const[F]=Sl({controlled:c,default:h,name:"FieldControl",state:"value"}),U=c!==void 0,W=U?F:void 0,B=We(()=>A.inputRef.current?.value);return yN(A.inputRef,q,W,B,!z,l),mn("input",t,{ref:[n,D],state:Y,props:[{id:q,disabled:z,name:I,ref:A.inputRef,"aria-labelledby":H,autoFocus:m,...U?{value:W}:{defaultValue:h},onChange(O){const P=O.currentTarget.value;f?.(P,xt(Ei,O.nativeEvent)),T(P!==C.initialValue),L(P!==""),O.nativeEvent.defaultPrevented||($(I),A.change(P))},onFocus(){_(!0)},onBlur(O){R(!0),_(!1),N==="onBlur"&&A.commit(O.currentTarget.value)},onKeyDown(O){O.currentTarget.tagName==="INPUT"&&O.key==="Enter"&&(R(!0),A.commit(O.currentTarget.value))}},y,O=>A.getValidationProps(z,O)],stateAttributesMapping:Vc})}),$B=v.forwardRef(function(t,n){return g.jsx(PB,{ref:n,...t})});var BB=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Dp=BB.join(","),UN=typeof Element>"u",El=UN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jp=!UN&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Lp=function(t,n){var r;n===void 0&&(n=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=s===""||s==="true",l=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Lp(t.parentNode));return l},FB=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},qN=function(t,n,r){if(Lp(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Dp));return n&&El.call(t,Dp)&&s.unshift(t),s=s.filter(r),s},zp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!Lp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),d=c.length?c:l.children,f=zp(d,!0,r);r.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else{var h=El.call(l,Dp);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),b=!Lp(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&b){var y=zp(m===!0?l.children:m.children,!0,r);r.flatten?s.push.apply(s,y):s.push({scopeParent:l,candidates:y})}else a.unshift.apply(a,l.children)}}return s},HN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},GN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||FB(t))&&!HN(t)?0:t.tabIndex},UB=function(t,n){var r=GN(t);return r<0&&n&&!HN(t)?0:r},qB=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},VN=function(t){return t.tagName==="INPUT"},HB=function(t){return VN(t)&&t.type==="hidden"},GB=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},VB=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},WB=function(t){if(!t.name)return!0;var n=t.form||jp(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(t.name));else try{s=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=VB(s,t.form);return!a||a===t},KB=function(t){return VN(t)&&t.type==="radio"},YB=function(t){return KB(t)&&!WB(t)},XB=function(t){var n,r=t&&jp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,d;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&s;){var f,h,m;r=jp(s),s=(f=r)===null||f===void 0?void 0:f.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},kE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},ZB=function(t,n){var r=n.displayCheck,s=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var l=El.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(El.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var f=t.parentElement,h=jp(t);if(f&&!f.shadowRoot&&s(f)===!0)return kE(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=d}if(XB(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return kE(t);return!1},QB=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return El.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},zy=function(t,n){return!(n.disabled||HB(n)||ZB(n,t)||GB(n)||QB(n))},Py=function(t,n){return!(YB(n)||GN(n)<0||!zy(t,n))},JB=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},WN=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,d=UB(c,l),f=l?WN(s.candidates):c;d===0?l?n.push.apply(n,f):n.push(c):r.push({documentOrder:a,tabIndex:d,item:s,isScope:l,content:f})}),r.sort(qB).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},Ah=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zp([t],n.includeContainer,{filter:Py.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:JB}):r=qN(t,n.includeContainer,Py.bind(null,n)),WN(r)},e4=function(t,n){n=n||{};var r;return n.getShadowRoot?r=zp([t],n.includeContainer,{filter:zy.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=qN(t,n.includeContainer,zy.bind(null,n)),r},KN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return El.call(t,Dp)===!1?!1:Py(n,t)};function t4(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function YN(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function n4(){return/apple/i.test(navigator.vendor)}function $y(){const e=/android/i;return e.test(t4())||e.test(YN())}function r4(){return YN().includes("jsdom/")}const SE="data-floating-ui-focusable",i4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",_b="ArrowLeft",Nb="ArrowRight",s4="ArrowUp",o4="ArrowDown";function io(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function gr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&po(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function so(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ab(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function a4(e){return e.matches("html,body")}function lr(e){return e?.ownerDocument||document}function XN(e){return zt(e)&&e.matches(i4)}function By(e){return e?e.getAttribute("role")==="combobox"&&XN(e):!1}function Pp(e){return e?e.hasAttribute(SE)?e:e.querySelector("["+SE+"]")||e:null}function Zo(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...Zo(e,s.id,n)])}function l4(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),Zo(e,a).forEach(d=>{s(d.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function wE(e,t){var n;let r=[],s=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;s;){const a=e.find(l=>l.id===s);s=a?.parentId,a&&(r=r.concat(a))}return r}function tr(e){e.preventDefault(),e.stopPropagation()}function u4(e){return"nativeEvent"in e}function ZN(e){return e.mozInputSource===0&&e.isTrusted?!0:$y()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function QN(e){return r4()?!1:!$y()&&e.width===0&&e.height===0||$y()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function kc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var c4=typeof document<"u",f4=function(){},hn=c4?v.useLayoutEffect:f4;const d4={...Rv};function Yn(e){const t=v.useRef(e);return hn(()=>{t.current=e}),t}const p4=d4.useInsertionEffect,h4=p4||(e=>e());function jn(e){const t=v.useRef(()=>{});return h4(()=>{t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function Od(e,t,n){return Math.floor(e/t)!==n}function cc(e,t){return t<0||t>=e.current.length}function Ob(e,t){return or(e,{disabledIndices:t})}function EE(e,t){return or(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function or(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=t===void 0?{}:t,l=n;do l+=r?-a:a;while(l>=0&&l<=e.current.length-1&&dp(e,l,s));return l}function m4(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:d,maxIndex:f,prevIndex:h,stopEvent:m=!1}=t,b=h;if(n.key===s4){if(m&&tr(n),h===-1)b=f;else if(b=or(e,{startingIndex:b,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<d||b<0)){const y=h%l,k=f%l,S=f-(k-y);k===y?b=f:b=k>y?S:S-l}cc(e,b)&&(b=h)}if(n.key===o4&&(m&&tr(n),h===-1?b=d:(b=or(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>f&&(b=or(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),cc(e,b)&&(b=h)),r==="both"){const y=ll(h/l);n.key===(a?_b:Nb)&&(m&&tr(n),h%l!==l-1?(b=or(e,{startingIndex:h,disabledIndices:c}),s&&Od(b,l,y)&&(b=or(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(b=or(e,{startingIndex:h-h%l-1,disabledIndices:c})),Od(b,l,y)&&(b=h)),n.key===(a?Nb:_b)&&(m&&tr(n),h%l!==0?(b=or(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&Od(b,l,y)&&(b=or(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(b=or(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),Od(b,l,y)&&(b=h));const k=ll(f/l)===y;cc(e,b)&&(s&&k?b=n.key===(a?Nb:_b)?f:or(e,{startingIndex:h-h%l-1,disabledIndices:c}):b=h)}return b}function g4(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:d}=a,f=!1;for(n&&(s=0);!f;){const h=[];for(let m=0;m<c;m++)for(let b=0;b<d;b++)h.push(s+m+b*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),f=!0):s++}}),[...r]}function b4(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function y4(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function dp(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Wc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function JN(e,t){const n=Ah(e,Wc()),r=n.length;if(r===0)return;const s=io(lr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function eA(e){return JN(lr(e).body,1)||e}function tA(e){return JN(lr(e).body,-1)||e}function fc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gr(n,r)}function v4(e){Ah(e,Wc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function TE(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Kc(e){const t=v.useRef(void 0),n=v.useCallback(r=>{const s=e.map(a=>{if(a!=null){if(typeof a=="function"){const l=a,c=l(r);return typeof c=="function"?c:()=>{l(null)}}return a.current=r,()=>{a.current=null}}});return()=>{s.forEach(a=>a?.())}},e);return v.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function x4(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const nA=v.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function rA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=v.useState(()=>new Set),l=v.useCallback(f=>{a(h=>new Set(h).add(f))},[]),c=v.useCallback(f=>{a(h=>{const m=new Set(h);return m.delete(f),m})},[]),d=v.useMemo(()=>{const f=new Map;return Array.from(s.keys()).sort(x4).forEach((m,b)=>{f.set(m,b)}),f},[s]);return g.jsx(nA.Provider,{value:v.useMemo(()=>({register:l,unregister:c,map:d,elementsRef:n,labelsRef:r}),[l,c,d,n,r]),children:t})}function Oh(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=v.useContext(nA),[c,d]=v.useState(null),f=v.useRef(null),h=v.useCallback(m=>{if(f.current=m,c!==null&&(a.current[c]=m,l)){var b;const y=t!==void 0;l.current[c]=y?t:(b=m?.textContent)!=null?b:null}},[c,a,l,t]);return hn(()=>{const m=f.current;if(m)return n(m),()=>{r(m)}},[n,r]),hn(()=>{const m=f.current?s.get(f.current):null;m!=null&&d(m)},[s]),v.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const k4="data-floating-ui-focusable",RE="active",CE="selected",Yc="ArrowLeft",Xc="ArrowRight",iA="ArrowUp",Mh="ArrowDown",S4={...Rv};let _E=!1,w4=0;const NE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+w4++;function E4(){const[e,t]=v.useState(()=>_E?NE():void 0);return hn(()=>{e==null&&t(NE())},[]),v.useEffect(()=>{_E=!0},[]),e}const T4=S4.useId,Ih=T4||E4;function sA(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const oA=v.createContext(null),aA=v.createContext(null),ko=()=>{var e;return((e=v.useContext(oA))==null?void 0:e.id)||null},So=()=>v.useContext(aA);function bx(e){const t=Ih(),n=So(),s=ko();return hn(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function yx(e){const{children:t,id:n}=e,r=ko();return g.jsx(oA.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function R4(e){const{children:t}=e,n=v.useRef([]),r=v.useCallback(l=>{n.current=[...n.current,l]},[]),s=v.useCallback(l=>{n.current=n.current.filter(c=>c!==l)},[]),[a]=v.useState(()=>sA());return g.jsx(aA.Provider,{value:v.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function Tl(e){return"data-floating-ui-"+e}function sr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const AE=Tl("safe-polygon");function Mb(e,t,n){if(n&&!kc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Ib(e){return typeof e=="function"?e():e}function lA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:d=0,handleClose:f=null,mouseOnly:h=!1,restMs:m=0,move:b=!0}=t,y=So(),k=ko(),S=Yn(f),E=Yn(d),R=Yn(n),T=Yn(m),C=v.useRef(),_=v.useRef(-1),L=v.useRef(),N=v.useRef(-1),A=v.useRef(!0),$=v.useRef(!1),z=v.useRef(()=>{}),I=v.useRef(!1),Y=jn(()=>{var W;const B=(W=s.current.openEvent)==null?void 0:W.type;return B?.includes("mouse")&&B!=="mousedown"});v.useEffect(()=>{if(!c)return;function W(B){let{open:K}=B;K||(sr(_),sr(N),A.current=!0,I.current=!1)}return a.on("openchange",W),()=>{a.off("openchange",W)}},[c,a]),v.useEffect(()=>{if(!c||!S.current||!n)return;function W(K){Y()&&r(!1,K,"hover")}const B=lr(l.floating).documentElement;return B.addEventListener("mouseleave",W),()=>{B.removeEventListener("mouseleave",W)}},[l.floating,n,r,c,S,Y]);const H=v.useCallback(function(W,B,K){B===void 0&&(B=!0),K===void 0&&(K="hover");const O=Mb(E.current,"close",C.current);O&&!L.current?(sr(_),_.current=window.setTimeout(()=>r(!1,W,K),O)):B&&(sr(_),r(!1,W,K))},[E,r]),q=jn(()=>{z.current(),L.current=void 0}),D=jn(()=>{if($.current){const W=lr(l.floating).body;W.style.pointerEvents="",W.removeAttribute(AE),$.current=!1}}),F=jn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);v.useEffect(()=>{if(!c)return;function W(V){if(sr(_),A.current=!1,h&&!kc(C.current)||Ib(T.current)>0&&!Mb(E.current,"open"))return;const j=Mb(E.current,"open",C.current);j?_.current=window.setTimeout(()=>{R.current||r(!0,V,"hover")},j):n||r(!0,V,"hover")}function B(V){if(F()){D();return}z.current();const j=lr(l.floating);if(sr(N),I.current=!1,S.current&&s.current.floatingContext){n||sr(_),L.current=S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){D(),q(),F()||H(V,!0,"safe-polygon")}});const te=L.current;j.addEventListener("mousemove",te),z.current=()=>{j.removeEventListener("mousemove",te)};return}(C.current!=="touch"||!gr(l.floating,V.relatedTarget))&&H(V)}function K(V){F()||s.current.floatingContext&&(S.current==null||S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){D(),q(),F()||H(V)}})(V))}function O(){sr(_)}function P(V){F()||H(V,!1)}if(ft(l.domReference)){const V=l.domReference,j=l.floating;return n&&V.addEventListener("mouseleave",K),b&&V.addEventListener("mousemove",W,{once:!0}),V.addEventListener("mouseenter",W),V.addEventListener("mouseleave",B),j&&(j.addEventListener("mouseleave",K),j.addEventListener("mouseenter",O),j.addEventListener("mouseleave",P)),()=>{n&&V.removeEventListener("mouseleave",K),b&&V.removeEventListener("mousemove",W),V.removeEventListener("mouseenter",W),V.removeEventListener("mouseleave",B),j&&(j.removeEventListener("mouseleave",K),j.removeEventListener("mouseenter",O),j.removeEventListener("mouseleave",P))}}},[l,c,e,h,b,H,q,D,r,n,R,y,E,S,s,F,T]),hn(()=>{var W;if(c&&n&&(W=S.current)!=null&&(W=W.__options)!=null&&W.blockPointerEvents&&Y()){$.current=!0;const K=l.floating;if(ft(l.domReference)&&K){var B;const O=lr(l.floating).body;O.setAttribute(AE,"");const P=l.domReference,V=y==null||(B=y.nodesRef.current.find(j=>j.id===k))==null||(B=B.context)==null?void 0:B.elements.floating;return V&&(V.style.pointerEvents=""),O.style.pointerEvents="none",P.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{O.style.pointerEvents="",P.style.pointerEvents="",K.style.pointerEvents=""}}}},[c,n,k,l,y,S,Y]),hn(()=>{n||(C.current=void 0,I.current=!1,q(),D())},[n,q,D]),v.useEffect(()=>()=>{q(),sr(_),sr(N),D()},[c,l.domReference,q,D]);const U=v.useMemo(()=>{function W(B){C.current=B.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(B){const{nativeEvent:K}=B;function O(){!A.current&&!R.current&&r(!0,K,"hover")}h&&!kc(C.current)||n||Ib(T.current)===0||I.current&&B.movementX**2+B.movementY**2<2||(sr(N),C.current==="touch"?O():(I.current=!0,N.current=window.setTimeout(O,Ib(T.current))))}}},[h,r,n,R,T]);return v.useMemo(()=>c?{reference:U}:{},[c,U])}let OE=0;function Ko(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(OE);const a=()=>e?.focus({preventScroll:n});s?a():OE=requestAnimationFrame(a)}function Db(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&po(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function C4(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _4(e){return e?.ownerDocument||document}const pl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ME(e){return e==="inert"?pl.inert:e==="aria-hidden"?pl["aria-hidden"]:pl.none}let Md=new WeakSet,Id={},jb=0;const N4=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,uA=e=>e&&(e.host||uA(e.parentNode)),A4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=uA(n);return e.contains(r)?r:null}).filter(n=>n!=null);function O4(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=A4(t,e),c=new Set,d=new Set(l),f=[];Id[s]||(Id[s]=new WeakMap);const h=Id[s];l.forEach(m),b(t),c.clear();function m(y){!y||c.has(y)||(c.add(y),y.parentNode&&m(y.parentNode))}function b(y){!y||d.has(y)||[].forEach.call(y.children,k=>{if(Wn(k)!=="script")if(c.has(k))b(k);else{const S=a?k.getAttribute(a):null,E=S!==null&&S!=="false",R=ME(a),T=(R.get(k)||0)+1,C=(h.get(k)||0)+1;R.set(k,T),h.set(k,C),f.push(k),T===1&&E&&Md.add(k),C===1&&k.setAttribute(s,""),!E&&a&&k.setAttribute(a,a==="inert"?"":"true")}})}return jb++,()=>{f.forEach(y=>{const k=ME(a),E=(k.get(y)||0)-1,R=(h.get(y)||0)-1;k.set(y,E),h.set(y,R),E||(!Md.has(y)&&a&&y.removeAttribute(a),Md.delete(y)),R||y.removeAttribute(s)}),jb--,jb||(pl.inert=new WeakMap,pl["aria-hidden"]=new WeakMap,pl.none=new WeakMap,Md=new WeakSet,Id={})}}function IE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=_4(e[0]).body;return O4(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Dh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},$p=v.forwardRef(function(t,n){const[r,s]=v.useState();hn(()=>{n4()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Tl("focus-guard")]:"",style:Dh};return g.jsx("span",{...t,...a})}),cA=v.createContext(null),DE=Tl("portal");function M4(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ih(),s=fA(),[a,l]=v.useState(null),c=v.useRef(null);return hn(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),hn(()=>{if(!r||c.current)return;const d=t?document.getElementById(t):null;if(!d)return;const f=document.createElement("div");f.id=r,f.setAttribute(DE,""),d.appendChild(f),c.current=f,l(f)},[t,r]),hn(()=>{if(n===null||!r||c.current)return;let d=n||s?.portalNode;d&&!ih(d)&&(d=d.current),d=d||document.body;let f=null;t&&(f=document.createElement("div"),f.id=t,d.appendChild(f));const h=document.createElement("div");h.id=r,h.setAttribute(DE,""),d=f||d,d.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function vx(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=M4({id:n,root:r}),[l,c]=v.useState(null),d=v.useRef(null),f=v.useRef(null),h=v.useRef(null),m=v.useRef(null),b=l?.modal,y=l?.open,k=!!l&&!l.modal&&l.open&&s&&!!(r||a);return v.useEffect(()=>{if(!a||!s||b)return;function S(E){a&&fc(E)&&(E.type==="focusin"?TE:v4)(a)}return a.addEventListener("focusin",S,!0),a.addEventListener("focusout",S,!0),()=>{a.removeEventListener("focusin",S,!0),a.removeEventListener("focusout",S,!0)}},[a,s,b]),v.useEffect(()=>{a&&(y||TE(a))},[y,a]),g.jsxs(cA.Provider,{value:v.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[k&&a&&g.jsx($p,{"data-type":"outside",ref:d,onFocus:S=>{if(fc(S,a)){var E;(E=h.current)==null||E.focus()}else{const R=l?l.domReference:null,T=tA(R);T?.focus()}}}),k&&a&&g.jsx("span",{"aria-owns":a.id,style:Dh}),a&&Ri.createPortal(t,a),k&&a&&g.jsx($p,{"data-type":"outside",ref:f,onFocus:S=>{if(fc(S,a)){var E;(E=m.current)==null||E.focus()}else{const R=l?l.domReference:null,T=eA(R);T?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const fA=()=>v.useContext(cA);function jE(e){return v.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const I4=20;let ao=[];function xx(){ao=ao.filter(e=>e.isConnected)}function D4(e){xx(),e&&Wn(e)!=="body"&&(ao.push(e),ao.length>I4&&(ao=ao.slice(-20)))}function LE(){return xx(),ao[ao.length-1]}function j4(e){const t=Wc();return KN(e,t)?e:Ah(e,t)[0]||e}function zE(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Wc(),a=e4(e,r).filter(c=>{const d=c.getAttribute("data-tabindex")||"";return KN(c,r)||c.hasAttribute("data-tabindex")&&!d.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const L4=v.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Dh})});function kx(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:d=!1,modal:f=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:b=!1,getInsideElements:y=()=>[]}=e,{open:k,onOpenChange:S,events:E,dataRef:R,elements:{domReference:T,floating:C}}=t,_=jn(()=>{var oe;return(oe=R.current.floatingContext)==null?void 0:oe.nodeId}),L=jn(y),N=typeof l=="number"&&l<0,A=By(T)&&N,$=N4(),z=$?a:!0,I=!z||$&&b,Y=Yn(s),H=Yn(l),q=Yn(c),D=So(),F=fA(),U=v.useRef(null),W=v.useRef(null),B=v.useRef(!1),K=v.useRef(!1),O=v.useRef(-1),P=v.useRef(-1),V=F!=null,j=Pp(C),Z=jn(function(oe){return oe===void 0&&(oe=j),oe?Ah(oe,Wc()):[]}),te=jn(oe=>{const ye=Z(oe);return Y.current.map(Se=>T&&Se==="reference"?T:j&&Se==="floating"?j:ye).filter(Boolean).flat()});v.useEffect(()=>{if(r||!f)return;function oe(Se){if(Se.key==="Tab"){gr(j,io(lr(j)))&&Z().length===0&&!A&&tr(Se);const Oe=te(),we=so(Se);Y.current[0]==="reference"&&we===T&&(tr(Se),Se.shiftKey?Ko(Oe[Oe.length-1]):Ko(Oe[1])),Y.current[1]==="floating"&&we===j&&Se.shiftKey&&(tr(Se),Ko(Oe[0]))}}const ye=lr(j);return ye.addEventListener("keydown",oe),()=>{ye.removeEventListener("keydown",oe)}},[r,T,j,f,Y,A,Z,te]),v.useEffect(()=>{if(r||!C)return;function oe(ye){const Se=so(ye),we=Z().indexOf(Se);we!==-1&&(O.current=we)}return C.addEventListener("focusin",oe),()=>{C.removeEventListener("focusin",oe)}},[r,C,Z]),v.useEffect(()=>{if(r||!m)return;function oe(){K.current=!0,setTimeout(()=>{K.current=!1})}function ye(we){const ke=we.relatedTarget,De=we.currentTarget,Me=so(we);queueMicrotask(()=>{const je=_(),He=!(gr(T,ke)||gr(C,ke)||gr(ke,C)||gr(F?.portalNode,ke)||ke!=null&&ke.hasAttribute(Tl("focus-guard"))||D&&(Zo(D.nodesRef.current,je).find(be=>{var Re,ee;return gr((Re=be.context)==null?void 0:Re.elements.floating,ke)||gr((ee=be.context)==null?void 0:ee.elements.domReference,ke)})||wE(D.nodesRef.current,je).find(be=>{var Re,ee,ce;return[(Re=be.context)==null?void 0:Re.elements.floating,Pp((ee=be.context)==null?void 0:ee.elements.floating)].includes(ke)||((ce=be.context)==null?void 0:ce.elements.domReference)===ke})));if(De===T&&j&&zE(j,Y),d&&De!==T&&!(Me!=null&&Me.isConnected)&&io(lr(j))===lr(j).body){zt(j)&&j.focus();const be=O.current,Re=Z(),ee=Re[be]||Re[Re.length-1]||j;zt(ee)&&ee.focus()}if(R.current.insideReactTree){R.current.insideReactTree=!1;return}(A||!f)&&ke&&He&&!K.current&&ke!==LE()&&(B.current=!0,S(!1,we,"focus-out"))})}const Se=!!(!D&&F);function Oe(){sr(P),R.current.insideReactTree=!0,P.current=window.setTimeout(()=>{R.current.insideReactTree=!1})}if(C&&zt(T))return T.addEventListener("focusout",ye),T.addEventListener("pointerdown",oe),C.addEventListener("focusout",ye),Se&&C.addEventListener("focusout",Oe,!0),()=>{T.removeEventListener("focusout",ye),T.removeEventListener("pointerdown",oe),C.removeEventListener("focusout",ye),Se&&C.removeEventListener("focusout",Oe,!0)}},[r,T,C,j,f,D,F,S,m,d,Z,A,_,Y,R]);const se=v.useRef(null),ue=v.useRef(null),le=jE([se,F?.beforeInsideRef]),fe=jE([ue,F?.afterInsideRef]);v.useEffect(()=>{var oe,ye;if(r||!C)return;const Se=Array.from((F==null||(oe=F.portalNode)==null?void 0:oe.querySelectorAll("["+Tl("portal")+"]"))||[]),we=(ye=(D?wE(D.nodesRef.current,_()):[]).find(Me=>{var je;return By(((je=Me.context)==null?void 0:je.elements.domReference)||null)}))==null||(ye=ye.context)==null?void 0:ye.elements.domReference,ke=[C,we,...Se,...L(),U.current,W.current,se.current,ue.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,Y.current.includes("reference")||A?T:null].filter(Me=>Me!=null),De=f||A?IE(ke,!I,I):IE(ke);return()=>{De()}},[r,T,C,f,Y,F,A,z,I,D,_,L]),hn(()=>{if(r||!zt(j))return;const oe=lr(j),ye=io(oe);queueMicrotask(()=>{const Se=te(j),Oe=H.current,we=(typeof Oe=="number"?Se[Oe]:Oe.current)||j,ke=gr(j,ye);!N&&!ke&&k&&Ko(we,{preventScroll:we===j})})},[r,k,j,N,te,H]),hn(()=>{if(r||!j)return;const oe=lr(j),ye=io(oe);D4(ye);function Se(ke){let{reason:De,event:Me,nested:je}=ke;if(["hover","safe-polygon"].includes(De)&&Me.type==="mouseleave"&&(B.current=!0),De==="outside-press")if(je)B.current=!1;else if(ZN(Me)||QN(Me))B.current=!1;else{let He=!1;document.createElement("div").focus({get preventScroll(){return He=!0,!1}}),He?B.current=!1:B.current=!0}}E.on("openchange",Se);const Oe=oe.createElement("span");Oe.setAttribute("tabindex","-1"),Oe.setAttribute("aria-hidden","true"),Object.assign(Oe.style,Dh),V&&T&&T.insertAdjacentElement("afterend",Oe);function we(){if(typeof q.current=="boolean"){const ke=T||LE();return ke&&ke.isConnected?ke:Oe}return q.current.current||Oe}return()=>{E.off("openchange",Se);const ke=io(oe),De=gr(C,ke)||D&&Zo(D.nodesRef.current,_(),!1).some(je=>{var He;return gr((He=je.context)==null?void 0:He.elements.floating,ke)}),Me=we();queueMicrotask(()=>{const je=j4(Me);q.current&&!B.current&&zt(je)&&(!(je!==ke&&ke!==oe.body)||De)&&je.focus({preventScroll:!0}),Oe.remove()})}},[r,C,j,q,R,E,D,V,T,_]),v.useEffect(()=>(queueMicrotask(()=>{B.current=!1}),()=>{queueMicrotask(xx)}),[r]),hn(()=>{if(!r&&F)return F.setFocusManagerState({modal:f,closeOnFocusOut:m,open:k,onOpenChange:S,domReference:T}),()=>{F.setFocusManagerState(null)}},[r,F,f,k,S,m,T]),hn(()=>{r||j&&zE(j,Y)},[r,j,Y]);function ge(oe){return r||!h||!f?null:g.jsx(L4,{ref:oe==="start"?U:W,onClick:ye=>S(!1,ye.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const _e=!r&&z&&(f?!A:!0)&&(V||f);return g.jsxs(g.Fragment,{children:[_e&&g.jsx($p,{"data-type":"inside",ref:le,onFocus:oe=>{if(f){const Se=te();Ko(s[0]==="reference"?Se[0]:Se[Se.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(B.current=!1,fc(oe,F.portalNode)){const Se=eA(T);Se?.focus()}else{var ye;(ye=F.beforeOutsideRef.current)==null||ye.focus()}}}),!A&&ge("start"),n,ge("end"),_e&&g.jsx($p,{"data-type":"inside",ref:fe,onFocus:oe=>{if(f)Ko(te()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(m&&(B.current=!0),fc(oe,F.portalNode)){const Se=tA(T);Se?.focus()}else{var ye;(ye=F.afterOutsideRef.current)==null||ye.focus()}}})]})}function PE(e){return zt(e.target)&&e.target.tagName==="BUTTON"}function z4(e){return zt(e.target)&&e.target.tagName==="A"}function $E(e){return XN(e)}function dA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:d=!0,ignoreMouse:f=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,b=v.useRef(),y=v.useRef(!1),k=v.useMemo(()=>({onPointerDown(S){b.current=S.pointerType},onMouseDown(S){const E=b.current;S.button===0&&c!=="click"&&(kc(E,!0)&&f||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const E=b.current;if(c==="mousedown"&&b.current){b.current=void 0;return}kc(E,!0)&&f||(n&&d&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){b.current=void 0,!(S.defaultPrevented||!h||PE(S))&&(S.key===" "&&!$E(a)&&(S.preventDefault(),y.current=!0),!z4(S)&&S.key==="Enter"&&r(!(n&&d),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!h||PE(S)||$E(a)||S.key===" "&&y.current&&(y.current=!1,r(!(n&&d),S.nativeEvent,"click"))}}),[s,a,c,f,h,r,n,m,d]);return v.useMemo(()=>l?{reference:k}:{},[l,k])}const P4={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},$4={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},BE=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function pA(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:d=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:b=!1,bubbles:y,capture:k}=t,S=So(),E=jn(typeof d=="function"?d:()=>!1),R=typeof d=="function"?E:d,T=v.useRef(!1),{escapeKey:C,outsidePress:_}=BE(y),{escapeKey:L,outsidePress:N}=BE(k),A=v.useRef(!1),$=jn(D=>{var F;if(!n||!l||!c||D.key!=="Escape"||A.current)return;const U=(F=a.current.floatingContext)==null?void 0:F.nodeId,W=S?Zo(S.nodesRef.current,U):[];if(!C&&(D.stopPropagation(),W.length>0)){let B=!0;if(W.forEach(K=>{var O;if((O=K.context)!=null&&O.open&&!K.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,u4(D)?D.nativeEvent:D,"escape-key")}),z=jn(D=>{var F;const U=()=>{var W;$(D),(W=so(D))==null||W.removeEventListener("keydown",U)};(F=so(D))==null||F.addEventListener("keydown",U)}),I=jn(D=>{var F;const U=a.current.insideReactTree;a.current.insideReactTree=!1;const W=T.current;if(T.current=!1,f==="click"&&W||U||typeof R=="function"&&!R(D))return;const B=so(D),K="["+Tl("inert")+"]",O=lr(s.floating).querySelectorAll(K);let P=ft(B)?B:null;for(;P&&!di(P);){const te=Hi(P);if(di(te)||!ft(te))break;P=te}if(O.length&&ft(B)&&!a4(B)&&!gr(B,s.floating)&&Array.from(O).every(te=>!gr(P,te)))return;if(zt(B)&&q){const te=di(B),se=fr(B),ue=/auto|scroll/,le=te||ue.test(se.overflowX),fe=te||ue.test(se.overflowY),ge=le&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,_e=fe&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,oe=se.direction==="rtl",ye=_e&&(oe?D.offsetX<=B.offsetWidth-B.clientWidth:D.offsetX>B.clientWidth),Se=ge&&D.offsetY>B.clientHeight;if(ye||Se)return}const V=(F=a.current.floatingContext)==null?void 0:F.nodeId,j=S&&Zo(S.nodesRef.current,V).some(te=>{var se;return Ab(D,(se=te.context)==null?void 0:se.elements.floating)});if(Ab(D,s.floating)||Ab(D,s.domReference)||j)return;const Z=S?Zo(S.nodesRef.current,V):[];if(Z.length>0){let te=!0;if(Z.forEach(se=>{var ue;if((ue=se.context)!=null&&ue.open&&!se.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,D,"outside-press")}),Y=jn(D=>{var F;const U=()=>{var W;I(D),(W=so(D))==null||W.removeEventListener(f,U)};(F=so(D))==null||F.addEventListener(f,U)});v.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=_;let D=-1;function F(O){r(!1,O,"ancestor-scroll")}function U(){window.clearTimeout(D),A.current=!0}function W(){D=window.setTimeout(()=>{A.current=!1},oh()?5:0)}const B=lr(s.floating);c&&(B.addEventListener("keydown",L?z:$,L),B.addEventListener("compositionstart",U),B.addEventListener("compositionend",W)),R&&B.addEventListener(f,N?Y:I,N);let K=[];return b&&(ft(s.domReference)&&(K=lo(s.domReference)),ft(s.floating)&&(K=K.concat(lo(s.floating))),!ft(s.reference)&&s.reference&&s.reference.contextElement&&(K=K.concat(lo(s.reference.contextElement)))),K=K.filter(O=>{var P;return O!==((P=B.defaultView)==null?void 0:P.visualViewport)}),K.forEach(O=>{O.addEventListener("scroll",F,{passive:!0})}),()=>{c&&(B.removeEventListener("keydown",L?z:$,L),B.removeEventListener("compositionstart",U),B.removeEventListener("compositionend",W)),R&&B.removeEventListener(f,N?Y:I,N),K.forEach(O=>{O.removeEventListener("scroll",F)}),window.clearTimeout(D)}},[a,s,c,R,f,n,r,b,l,C,_,$,L,z,I,N,Y]),v.useEffect(()=>{a.current.insideReactTree=!1},[a,R,f]);const H=v.useMemo(()=>({onKeyDown:$,...h&&{[P4[m]]:D=>{r(!1,D.nativeEvent,"reference-press")},...m!=="click"&&{onClick(D){r(!1,D.nativeEvent,"reference-press")}}}}),[$,r,h,m]),q=v.useMemo(()=>({onKeyDown:$,onMouseDown(){T.current=!0},onMouseUp(){T.current=!0},[$4[f]]:()=>{a.current.insideReactTree=!0}}),[$,f,a]);return v.useMemo(()=>l?{reference:H,floating:q}:{},[l,H,q])}function B4(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=Ih(),a=v.useRef({}),[l]=v.useState(()=>sA()),c=ko()!=null,[d,f]=v.useState(r.reference),h=jn((y,k,S)=>{a.current.openEvent=y?k:void 0,l.emit("openchange",{open:y,event:k,reason:S,nested:c}),n?.(y,k,S)}),m=v.useMemo(()=>({setPositionReference:f}),[]),b=v.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return v.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:b,events:l,floatingId:s,refs:m}),[t,h,b,l,s,m])}function Sx(e){e===void 0&&(e={});const{nodeId:t}=e,n=B4({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=v.useState(null),[c,d]=v.useState(null),h=s?.domReference||a,m=v.useRef(null),b=So();hn(()=>{h&&(m.current=h)},[h]);const y=C_({...e,elements:{...s,...c&&{reference:c}}}),k=v.useCallback(C=>{const _=ft(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;d(_),y.refs.setReference(_)},[y.refs]),S=v.useCallback(C=>{(ft(C)||C===null)&&(m.current=C,l(C)),(ft(y.refs.reference.current)||y.refs.reference.current===null||C!==null&&!ft(C))&&y.refs.setReference(C)},[y.refs]),E=v.useMemo(()=>({...y.refs,setReference:S,setPositionReference:k,domReference:m}),[y.refs,S,k]),R=v.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),T=v.useMemo(()=>({...y,...r,refs:E,elements:R,nodeId:t}),[y,E,R,t,r]);return hn(()=>{r.dataRef.current.floatingContext=T;const C=b?.nodesRef.current.find(_=>_.id===t);C&&(C.context=T)}),v.useMemo(()=>({...y,context:T,refs:E,elements:R}),[y,E,R,T])}function Lb(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[RE]:l,[CE]:c,...d}=e;a=d}return{...n==="floating"&&{tabIndex:-1,[k4]:""},...a,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(d=>{let[f,h]=d;if(!(s&&[RE,CE].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof h=="function"){var m;(m=r.get(f))==null||m.push(h),l[f]=function(){for(var b,y=arguments.length,k=new Array(y),S=0;S<y;S++)k[S]=arguments[S];return(b=r.get(f))==null?void 0:b.map(E=>E(...k)).find(E=>E!==void 0)}}}else l[f]=h}),l),{})}}function hA(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),s=v.useCallback(c=>Lb(c,e,"reference"),t),a=v.useCallback(c=>Lb(c,e,"floating"),n),l=v.useCallback(c=>Lb(c,e,"item"),r);return v.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const F4="Escape";function jh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Dd(e,t){return jh(t,e===iA||e===Mh,e===Yc||e===Xc)}function zb(e,t,n){return jh(t,e===Mh,n?e===Yc:e===Xc)||e==="Enter"||e===" "||e===""}function FE(e,t,n){return jh(t,n?e===Yc:e===Xc,e===Mh)}function UE(e,t,n,r){const s=n?e===Xc:e===Yc,a=e===iA;return t==="both"||t==="horizontal"&&r&&r>1?e===F4:jh(t,s,a)}function mA(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:d=()=>{},enabled:f=!0,selectedIndex:h=null,allowEscape:m=!1,loop:b=!1,nested:y=!1,rtl:k=!1,virtual:S=!1,focusItemOnOpen:E="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:T=!0,disabledIndices:C=void 0,orientation:_="vertical",parentOrientation:L,cols:N=1,scrollItemIntoView:A=!0,virtualItemRef:$,itemSizes:z,dense:I=!1}=t,Y=Pp(s.floating),H=Yn(Y),q=ko(),D=So();hn(()=>{e.dataRef.current.orientation=_},[e,_]);const F=jn(()=>{d(B.current===-1?null:B.current)}),U=By(s.domReference),W=v.useRef(E),B=v.useRef(h??-1),K=v.useRef(null),O=v.useRef(!0),P=v.useRef(F),V=v.useRef(!!s.floating),j=v.useRef(n),Z=v.useRef(!1),te=v.useRef(!1),se=Yn(C),ue=Yn(n),le=Yn(A),fe=Yn(h),[ge,_e]=v.useState(),[oe,ye]=v.useState(),Se=jn(()=>{function be(J){if(S){var re;(re=J.id)!=null&&re.endsWith("-fui-option")&&(J.id=a+"-"+Math.random().toString(16).slice(2,10)),_e(J.id),D?.events.emit("virtualfocus",J),$&&($.current=J)}else Ko(J,{sync:Z.current,preventScroll:!0})}const Re=l.current[B.current],ee=te.current;Re&&be(Re),(Z.current?J=>J():requestAnimationFrame)(()=>{const J=l.current[B.current]||Re;if(!J)return;Re||be(J);const re=le.current;re&&we&&(ee||!O.current)&&(J.scrollIntoView==null||J.scrollIntoView(typeof re=="boolean"?{block:"nearest",inline:"nearest"}:re))})});hn(()=>{f&&(n&&s.floating?W.current&&h!=null&&(te.current=!0,B.current=h,F()):V.current&&(B.current=-1,P.current()))},[f,n,s.floating,h,F]),hn(()=>{if(f&&n&&s.floating)if(c==null){if(Z.current=!1,fe.current!=null)return;if(V.current&&(B.current=-1,Se()),(!j.current||!V.current)&&W.current&&(K.current!=null||W.current===!0&&K.current==null)){let be=0;const Re=()=>{l.current[0]==null?(be<2&&(be?requestAnimationFrame:queueMicrotask)(Re),be++):(B.current=K.current==null||zb(K.current,_,k)||y?Ob(l,se.current):EE(l,se.current),K.current=null,F())};Re()}}else cc(l,c)||(B.current=c,Se(),te.current=!1)},[f,n,s.floating,c,fe,y,l,_,k,F,Se,se]),hn(()=>{var be;if(!f||s.floating||!D||S||!V.current)return;const Re=D.nodesRef.current,ee=(be=Re.find(re=>re.id===q))==null||(be=be.context)==null?void 0:be.elements.floating,ce=io(lr(s.floating)),J=Re.some(re=>re.context&&gr(re.context.elements.floating,ce));ee&&!J&&O.current&&ee.focus({preventScroll:!0})},[f,s.floating,D,q,S]),hn(()=>{if(!f||!D||!S||q)return;function be(Re){ye(Re.id),$&&($.current=Re)}return D.events.on("virtualfocus",be),()=>{D.events.off("virtualfocus",be)}},[f,D,S,q,$]),hn(()=>{P.current=F,j.current=n,V.current=!!s.floating}),hn(()=>{n||(K.current=null,W.current=E)},[n,E]);const Oe=c!=null,we=v.useMemo(()=>{function be(ee){if(!ue.current)return;const ce=l.current.indexOf(ee);ce!==-1&&B.current!==ce&&(B.current=ce,F())}return{onFocus(ee){let{currentTarget:ce}=ee;Z.current=!0,be(ce)},onClick:ee=>{let{currentTarget:ce}=ee;return ce.focus({preventScroll:!0})},onMouseMove(ee){let{currentTarget:ce}=ee;Z.current=!0,te.current=!1,R&&be(ce)},onPointerLeave(ee){let{pointerType:ce}=ee;if(!(!O.current||ce==="touch")&&(Z.current=!0,!!R&&(B.current=-1,F(),!S))){var J;(J=H.current)==null||J.focus({preventScroll:!0})}}}},[ue,H,R,l,F,S]),ke=v.useCallback(()=>{var be;return L??(D==null||(be=D.nodesRef.current.find(Re=>Re.id===q))==null||(be=be.context)==null||(be=be.dataRef)==null?void 0:be.current.orientation)},[q,D,L]),De=jn(be=>{if(O.current=!1,Z.current=!0,be.which===229||!ue.current&&be.currentTarget===H.current)return;if(y&&UE(be.key,_,k,N)){Dd(be.key,ke())||tr(be),r(!1,be.nativeEvent,"list-navigation"),zt(s.domReference)&&(S?D?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const Re=B.current,ee=Ob(l,C),ce=EE(l,C);if(U||(be.key==="Home"&&(tr(be),B.current=ee,F()),be.key==="End"&&(tr(be),B.current=ce,F())),N>1){const J=z||Array.from({length:l.current.length},()=>({width:1,height:1})),re=g4(J,N,I),xe=re.findIndex(Ye=>Ye!=null&&!dp(l,Ye,C)),$e=re.reduce((Ye,ht,Qe)=>ht!=null&&!dp(l,ht,C)?Qe:Ye,-1),Xe=re[m4({current:re.map(Ye=>Ye!=null?l.current[Ye]:null)},{event:be,orientation:_,loop:b,rtl:k,cols:N,disabledIndices:y4([...(typeof C!="function"?C:null)||l.current.map((Ye,ht)=>dp(l,ht,C)?ht:void 0),void 0],re),minIndex:xe,maxIndex:$e,prevIndex:b4(B.current>ce?ee:B.current,J,re,N,be.key===Mh?"bl":be.key===(k?Yc:Xc)?"tr":"tl"),stopEvent:!0})];if(Xe!=null&&(B.current=Xe,F()),_==="both")return}if(Dd(be.key,_)){if(tr(be),n&&!S&&io(be.currentTarget.ownerDocument)===be.currentTarget){B.current=zb(be.key,_,k)?ee:ce,F();return}zb(be.key,_,k)?b?B.current=Re>=ce?m&&Re!==l.current.length?-1:ee:or(l,{startingIndex:Re,disabledIndices:C}):B.current=Math.min(ce,or(l,{startingIndex:Re,disabledIndices:C})):b?B.current=Re<=ee?m&&Re!==-1?l.current.length:ce:or(l,{startingIndex:Re,decrement:!0,disabledIndices:C}):B.current=Math.max(ee,or(l,{startingIndex:Re,decrement:!0,disabledIndices:C})),cc(l,B.current)&&(B.current=-1),F()}}),Me=v.useMemo(()=>S&&n&&Oe&&{"aria-activedescendant":oe||ge},[S,n,Oe,oe,ge]),je=v.useMemo(()=>({"aria-orientation":_==="both"?void 0:_,...U?{}:Me,onKeyDown:De,onPointerMove(){O.current=!0}}),[Me,De,_,U]),He=v.useMemo(()=>{function be(ee){E==="auto"&&ZN(ee.nativeEvent)&&(W.current=!0)}function Re(ee){W.current=E,E==="auto"&&QN(ee.nativeEvent)&&(W.current=!0)}return{...Me,onKeyDown(ee){O.current=!1;const ce=ee.key.startsWith("Arrow"),J=["Home","End"].includes(ee.key),re=ce||J,xe=FE(ee.key,_,k),$e=UE(ee.key,_,k,N),Xe=FE(ee.key,ke(),k),Ye=Dd(ee.key,_),ht=(y?Xe:Ye)||ee.key==="Enter"||ee.key.trim()==="";if(S&&n){const nt=D?.nodesRef.current.find(_t=>_t.parentId==null),Tt=D&&nt?l4(D.nodesRef.current,nt.id):null;if(re&&Tt&&$){const _t=new KeyboardEvent("keydown",{key:ee.key,bubbles:!0});if(xe||$e){var Qe,yt;const st=((Qe=Tt.context)==null?void 0:Qe.elements.domReference)===ee.currentTarget,vt=$e&&!st?(yt=Tt.context)==null?void 0:yt.elements.domReference:xe?l.current.find(Dt=>Dt?.id===ge):null;vt&&(tr(ee),vt.dispatchEvent(_t),ye(void 0))}if((Ye||J)&&Tt.context&&Tt.context.open&&Tt.parentId&&ee.currentTarget!==Tt.context.elements.domReference){var kt;tr(ee),(kt=Tt.context.elements.domReference)==null||kt.dispatchEvent(_t);return}}return De(ee)}if(!(!n&&!T&&ce)){if(ht){const nt=Dd(ee.key,ke());K.current=y&&nt?null:ee.key}if(y){Xe&&(tr(ee),n?(B.current=Ob(l,se.current),F()):r(!0,ee.nativeEvent,"list-navigation"));return}Ye&&(h!=null&&(B.current=h),tr(ee),!n&&T?r(!0,ee.nativeEvent,"list-navigation"):De(ee),n&&F())}},onFocus(){n&&!S&&(B.current=-1,F())},onPointerDown:Re,onPointerEnter:Re,onMouseDown:be,onClick:be}},[ge,Me,N,De,se,E,l,y,F,r,n,T,_,ke,k,h,D,S,$]);return v.useMemo(()=>f?{reference:He,floating:je,item:we}:{},[f,He,je,we])}const U4=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function gA(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:d="dialog"}=t,f=Ih(),h=((n=a.domReference)==null?void 0:n.id)||f,m=v.useMemo(()=>{var T;return((T=Pp(a.floating))==null?void 0:T.id)||l},[a.floating,l]),b=(r=U4.get(d))!=null?r:d,k=ko()!=null,S=v.useMemo(()=>b==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:s?m:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":b==="alertdialog"?"dialog":b,"aria-controls":s?m:void 0,...b==="listbox"&&{role:"combobox"},...b==="menu"&&{id:h},...b==="menu"&&k&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[b,m,k,s,h,d]),E=v.useMemo(()=>{const T={id:m,...b&&{role:b}};return b==="tooltip"||d==="label"?T:{...T,...b==="menu"&&{"aria-labelledby":h}}},[b,m,h,d]),R=v.useCallback(T=>{let{active:C,selected:_}=T;const L={role:"option",...C&&{id:m+"-fui-option"}};switch(d){case"select":case"combobox":return{...L,"aria-selected":_}}return{}},[m,d]);return v.useMemo(()=>c?{reference:S,floating:E,item:R}:{},[c,S,E,R])}const qE=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ja(e,t){return typeof e=="function"?e(t):e}function q4(e,t){const[n,r]=v.useState(e);return e&&!n&&r(!0),v.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function H4(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,l=(typeof s=="number"?s:s.close)||0,[c,d]=v.useState("unmounted"),f=q4(n,l);return!f&&c==="close"&&d("unmounted"),hn(()=>{if(r){if(n){d("initial");const h=requestAnimationFrame(()=>{Ri.flushSync(()=>{d("open")})});return()=>{cancelAnimationFrame(h)}}d("close")}},[n,r]),{isMounted:f,status:c}}function bA(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,d=c.split("-")[0],f=v.useMemo(()=>({side:d,placement:c}),[d,c]),h=typeof l=="number",m=(h?l:l.open)||0,b=(h?l:l.close)||0,[y,k]=v.useState(()=>({...Ja(a,f),...Ja(n,f)})),{isMounted:S,status:E}=H4(e,{duration:l}),R=Yn(n),T=Yn(r),C=Yn(s),_=Yn(a);return hn(()=>{const L=Ja(R.current,f),N=Ja(C.current,f),A=Ja(_.current,f),$=Ja(T.current,f)||Object.keys(L).reduce((z,I)=>(z[I]="",z),{});if(E==="initial"&&k(z=>({transitionProperty:z.transitionProperty,...A,...L})),E==="open"&&k({transitionProperty:Object.keys($).map(qE).join(","),transitionDuration:m+"ms",...A,...$}),E==="close"){const z=N||L;k({transitionProperty:Object.keys(z).map(qE).join(","),transitionDuration:b+"ms",...A,...z})}},[b,C,R,T,_,m,E,f]),{isMounted:S,styles:y}}function yA(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:d,enabled:f=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:b=[],selectedIndex:y=null}=t,k=v.useRef(-1),S=v.useRef(""),E=v.useRef((n=y??l)!=null?n:-1),R=v.useRef(null),T=jn(c),C=jn(d),_=Yn(h),L=Yn(b);hn(()=>{r&&(sr(k),R.current=null,S.current="")},[r]),hn(()=>{if(r&&S.current===""){var I;E.current=(I=y??l)!=null?I:-1}},[r,y,l]);const N=jn(I=>{I?s.current.typing||(s.current.typing=I,C(I)):s.current.typing&&(s.current.typing=I,C(I))}),A=jn(I=>{function Y(U,W,B){const K=_.current?_.current(W,B):W.find(O=>O?.toLocaleLowerCase().indexOf(B.toLocaleLowerCase())===0);return K?U.indexOf(K):-1}const H=a.current;if(S.current.length>0&&S.current[0]!==" "&&(Y(H,H,S.current)===-1?N(!1):I.key===" "&&tr(I)),H==null||L.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(tr(I),N(!0)),H.every(U=>{var W,B;return U?((W=U[0])==null?void 0:W.toLocaleLowerCase())!==((B=U[1])==null?void 0:B.toLocaleLowerCase()):!0})&&S.current===I.key&&(S.current="",E.current=R.current),S.current+=I.key,sr(k),k.current=window.setTimeout(()=>{S.current="",E.current=R.current,N(!1)},m);const D=E.current,F=Y(H,[...H.slice((D||0)+1),...H.slice(0,(D||0)+1)],S.current);F!==-1?(T(F),R.current=F):I.key!==" "&&(S.current="",N(!1))}),$=v.useMemo(()=>({onKeyDown:A}),[A]),z=v.useMemo(()=>({onKeyDown:A,onKeyUp(I){I.key===" "&&N(!1)}}),[A,N]);return v.useMemo(()=>f?{reference:$,floating:z}:{},[f,$,z])}function vA(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...vA(e,s.id,n)])}function HE(e,t){const[n,r]=e;let s=!1;const a=t.length;for(let l=0,c=a-1;l<a;c=l++){const[d,f]=t[l]||[0,0],[h,m]=t[c]||[0,0];f>=r!=m>=r&&n<=(h-d)*(r-f)/(m-f)+d&&(s=!s)}return s}function G4(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function xA(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,s={current:-1};let a=!1,l=null,c=null,d=typeof performance<"u"?performance.now():0;function f(m,b){const y=performance.now(),k=y-d;if(l===null||c===null||k===0)return l=m,c=b,d=y,null;const S=m-l,E=b-c,T=Math.sqrt(S*S+E*E)/k;return l=m,c=b,d=y,T}const h=m=>{let{x:b,y,placement:k,elements:S,onClose:E,nodeId:R,tree:T}=m;return function(_){function L(){sr(s),E()}if(sr(s),!S.domReference||!S.floating||k==null||b==null||y==null)return;const{clientX:N,clientY:A}=_,$=[N,A],z=C4(_),I=_.type==="mouseleave",Y=Db(S.floating,z),H=Db(S.domReference,z),q=S.domReference.getBoundingClientRect(),D=S.floating.getBoundingClientRect(),F=k.split("-")[0],U=b>D.right-D.width/2,W=y>D.bottom-D.height/2,B=G4($,q),K=D.width>q.width,O=D.height>q.height,P=(K?q:D).left,V=(K?q:D).right,j=(O?q:D).top,Z=(O?q:D).bottom;if(Y&&(a=!0,!I))return;if(H&&(a=!1),H&&!I){a=!0;return}if(I&&ft(_.relatedTarget)&&Db(S.floating,_.relatedTarget)||T&&vA(T.nodesRef.current,R).length)return;if(F==="top"&&y>=q.bottom-1||F==="bottom"&&y<=q.top+1||F==="left"&&b>=q.right-1||F==="right"&&b<=q.left+1)return L();let te=[];switch(F){case"top":te=[[P,q.top+1],[P,D.bottom-1],[V,D.bottom-1],[V,q.top+1]];break;case"bottom":te=[[P,D.top+1],[P,q.bottom-1],[V,q.bottom-1],[V,D.top+1]];break;case"left":te=[[D.right-1,Z],[D.right-1,j],[q.left+1,j],[q.left+1,Z]];break;case"right":te=[[q.right-1,Z],[q.right-1,j],[D.left+1,j],[D.left+1,Z]];break}function se(ue){let[le,fe]=ue;switch(F){case"top":{const ge=[K?le+t/2:U?le+t*4:le-t*4,fe+t+1],_e=[K?le-t/2:U?le+t*4:le-t*4,fe+t+1],oe=[[D.left,U||K?D.bottom-t:D.top],[D.right,U?K?D.bottom-t:D.top:D.bottom-t]];return[ge,_e,...oe]}case"bottom":{const ge=[K?le+t/2:U?le+t*4:le-t*4,fe-t],_e=[K?le-t/2:U?le+t*4:le-t*4,fe-t],oe=[[D.left,U||K?D.top+t:D.bottom],[D.right,U?K?D.top+t:D.bottom:D.top+t]];return[ge,_e,...oe]}case"left":{const ge=[le+t+1,O?fe+t/2:W?fe+t*4:fe-t*4],_e=[le+t+1,O?fe-t/2:W?fe+t*4:fe-t*4];return[...[[W||O?D.right-t:D.left,D.top],[W?O?D.right-t:D.left:D.right-t,D.bottom]],ge,_e]}case"right":{const ge=[le-t,O?fe+t/2:W?fe+t*4:fe-t*4],_e=[le-t,O?fe-t/2:W?fe+t*4:fe-t*4],oe=[[W||O?D.left+t:D.right,D.top],[W?O?D.left+t:D.right:D.left+t,D.bottom]];return[ge,_e,...oe]}}}if(!HE([N,A],te)){if(a&&!B)return L();if(!I&&r){const ue=f(_.clientX,_.clientY);if(ue!==null&&ue<.1)return L()}HE([N,A],se([b,y]))?!a&&r&&(s.current=window.setTimeout(L,40)):L()}}};return h.__options={blockPointerEvents:n},h}function kA(e){return mn(e.defaultTagName??"div",e,e)}const V4=v.createContext(void 0);function W4(){return v.useContext(V4)}const Pb={base:{kVAEAm:"ui-10l6tqk",krVfgx:"ui-r0fw0u",kCIrl2:"ui-7zl9wm",kzqmXN:"ui-jwey39",kZKoxP:"ui-wbbb81",kaIpWk:"ui-16rqkct",kfzvcC:"ui-47corl",$$css:!0},colorBlue:{kWkggS:"ui-1b558e3",$$css:!0},colorGreen:{kWkggS:"ui-15xcjd2",$$css:!0}};function K4(e){return[Pb.base,e==="green"?Pb.colorGreen:Pb.colorBlue]}function Y4({color:e="blue",className:t}){const n=Kt({rootClass:"ui-indicator-dot",stylexStyles:K4(e),className:t});return g.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const X4={root:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kmuXW:"ui-2lah0s",kB7OPa:"ui-9f619",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1e1y6u3 ui-r5ixlt ui-1yhsa9g",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:null,kfzvcC:"ui-67bb7w ui-7gqb9v",kVAEAm:"ui-1fxuinm",$$css:!0}},Hu={xs:{kzqmXN:"ui-1pwdyn5",$$css:!0},sm:{kzqmXN:"ui-16bvwqk",$$css:!0},md:{kzqmXN:"ui-1eu7oa3",$$css:!0},lg:{kzqmXN:"ui-jst10v",$$css:!0},xl:{kzqmXN:"ui-mjrt60",$$css:!0}},Z4={xs:{keoZOQ:"ui-zrgnep",k71WvV:"ui-ozlrqm",k1K539:"ui-11b1quy",keTefX:"ui-1adsbrk",$$css:!0},sm:{keoZOQ:"ui-vqhhvk",k71WvV:"ui-1bk7dnq",k1K539:"ui-1dy9ubm",keTefX:"ui-1fesk1l",$$css:!0},md:{keoZOQ:"ui-kv60qn",k71WvV:"ui-xku7nj",k1K539:"ui-1hi8m59",keTefX:"ui-13srazm",$$css:!0},lg:{keoZOQ:"ui-4xtw7q",k71WvV:"ui-7quaee",k1K539:"ui-eci9o5",keTefX:"ui-1na8g2l",$$css:!0},xl:{keoZOQ:"ui-1fm9hdn",k71WvV:"ui-tyhy2u",k1K539:"ui-foffu7",keTefX:"ui-1tnioq7",$$css:!0}},$b={root:[X4.root,ax.root],size:{xs:[ui.xs,Hu.xs],sm:[ui.sm,Hu.sm],md:[ui.md,Hu.md],lg:[ui.lg,Hu.lg],xl:[ui.xl,Hu.xl]},contentFrame:Z4},Q4="md",J4={root:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kGuDYH:"ui-1tachi3",kLWn49:"ui-o5v014",$$css:!0}};function SA(e){if(rx(e))return Lt(J4.root,sN(e));const t={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014"};return{...t,style:{...t.style,"--icon-size":typeof e=="number"?`${e}px`:e}}}function eF(e){return{border:e??"variant"}}function tF({chrome:e,variant:t,rounded:n,frame:r,reveal:s="always",size:a,tone:l,indicatorDot:c}){return{"data-variant":t,"data-border":e.border==="variant"?void 0:e.border,"data-rounded":n||void 0,"data-frame":r,"data-size":a,"data-tone":l,"data-fg-channel":"icon","data-indicator-dot":c||void 0,"data-reveal":s!=="always"?s:void 0}}function wA({border:e,enforcedRootStyle:t,frame:n,indicatorDot:r,reveal:s,rootStyle:a,rounded:l,size:c,tone:d,variant:f}){const h=eF(e),m=sx(f,d);return{dataAttrs:tF({chrome:h,frame:n,indicatorDot:r,reveal:s,rounded:l,size:c,tone:d,variant:f}),rootAttrs:Lt($b.root,Si.appearance,m.applyControlTone&&ox.foreground,m.applyControlTone&&d!==void 0&&lN[d],f==="ghost"&&(d==="secondary"||d==="tertiary")&&T3[d],m.applyFilledColors&&Si.colors,m.applyNonFilledBackground&&kl.background,(f==="outline"||f==="ghost")&&cN(d)&&dN[d],f==="outline"&&kl.outline,f==="outline"&&fN(d)&&pN[d],f==="media"&&Si.media,h.border!=="variant"&&oN[h.border],hN[s],Si.press,$b.size[c],n==="content"&&$b.contentFrame[c],t,a)}}function EA({size:e,iconSize:t,disabled:n,variant:r,tone:s,enforced:a}){const l=e??a?.iconButtonSize??Q4,c=r??a?.iconButtonVariant??"ghost",d=l==="lg"||l==="xl"?"base":"sm";return{size:l,innerIconSize:t??a?.iconButtonIconSize??d,disabled:n??a?.disabled,variant:c,tone:s??a?.iconButtonTone??(c==="primary"?aN:void 0)}}function dr({icon:e,iconVariant:t="outline",variant:n,border:r,rounded:s,frame:a="container",reveal:l="always",size:c,iconSize:d,tone:f,isSuccess:h=!1,className:m,style:b,rootStyle:y,iconStyle:k,disabled:S,indicatorDot:E=!1,indicatorDotColor:R="blue","aria-label":T,"aria-labelledby":C,..._}){const L=ca(),{size:N,innerIconSize:A,disabled:$,variant:z,tone:I}=EA({disabled:S,enforced:L,iconSize:d,size:c,tone:f,variant:n}),Y=h?"check":e,H=wA({border:r,enforcedRootStyle:L?.iconButtonRootStyle,frame:a,indicatorDot:E,reveal:l,rootStyle:y,rounded:s,size:N,tone:I,variant:z});return g.jsxs(ix,{..._,className:nn("ui-icon-button",H.rootAttrs.className,m),style:{...H.rootAttrs.style,...b},...H.dataAttrs,disabled:$,"aria-label":T,"aria-labelledby":C,children:[typeof Y=="string"?g.jsx(Yt,{name:Y,rootStyle:[L?.iconButtonIconStyle,k],variant:t,size:A,"aria-hidden":"true"}):g.jsx("span",{...SA(A),"aria-hidden":"true",children:Y}),E?g.jsx(Y4,{color:R}):null]})}function nF(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function wx(e){if(!(nF()?e.metaKey:e.ctrlKey)||e.shiftKey||e.altKey)return!1;switch(e.key.toLowerCase()){case"a":return e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),e.currentTarget.select(),!0;case"c":case"v":case"x":case"z":return e.nativeEvent.stopImmediatePropagation(),!0;default:return!1}}const jd={base:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},monoInput:{kGuDYH:"ui-pr5cyi",$$css:!0}};function rF({className:e,disabled:t=!1,mono:n=!1,ref:r,rootStyle:s,style:a,onKeyDown:l,...c}){const d=Kt({rootClass:"ui-input-group__input",stylexStyles:[jd.base,t?jd.disabled:null,n?jd.mono:null,n?jd.monoInput:null,s],className:e,style:a}),f=v.useCallback(h=>{l?.(h),!h.defaultPrevented&&wx(h)},[l]);return g.jsx("input",{ref:r,className:d.className,style:d.style,disabled:t,onKeyDown:f,...c})}const xr={base:{"--ui-input-group-border-width":"ui-1cx02xk","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4","--input-group-button-inset":"ui-1c59nzh",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kzqmXN:"ui-h8yej3",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j ui-9afaxg ui-4vz0kq",ke9TFa:"ui-1lun4ml",k8ry5P:"ui-18b5jzi",kBCPoo:"ui-5q6521 ui-jsivns ui-1n6ytmu",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba ui-illscj ui-1rfq9xa",k2ei4v:"ui-pilrb4",kVhnKS:"ui-1t7ytsu",kGJrpR:"ui-4n2izg ui-16dcxar ui-ghzbfo",kaIpWk:"ui-1043rbw",kLKAdn:"ui-e8kt42",kwRFfy:"ui-n29lvp",kGO01o:"ui-1ftrzfz",kZCmMZ:"ui-1ecvjd7",kWkggS:"ui-1gwrjia",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},disabled:{kLZC3w:"ui-1aeic0j",kBCPoo:"ui-5q6521",kL6WhQ:"ui-17fyfba",kGJrpR:"ui-4n2izg",kkrTdU:"ui-1h6gzvc",kSiTet:"ui-byyjgo",$$css:!0},sizeBase:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-xlcw59","--input-group-button-inset":"ui-1ethuh",kZKoxP:"ui-1e94bgo",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1u9w55t",kZKoxP:"ui-170hpbr",kOIVth:"ui-pkkfsy",$$css:!0},sizeXl:{"--ui-input-group-padding-block":"ui-17wxzvn","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1ethuh",kOIVth:"ui-ehausa",$$css:!0},layoutTextarea:{kGNEyG:"ui-1cy8zhl",kZKoxP:"ui-t7dq6l",kAzted:"ui-16ry4p3",$$css:!0},layoutTextareaBase:{kAzted:"ui-t6xkjb",$$css:!0},layoutTextareaLg:{kAzted:"ui-16ry4p3",$$css:!0},frameContent:{kzqmXN:"ui-q8za26",kqGvvJ:"ui-1k4kybs",kUOVxO:"ui-d1nd0v",$$css:!0},variantDefault:{kLZC3w:"ui-2kampu",kBCPoo:"ui-15nuqqu",kL6WhQ:"ui-1jfuf7k",kGJrpR:"ui-19smxde",$$css:!0},variantElevated:{kWkggS:"ui-f1vpex",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-qjnua1 ui-aig341",kLZC3w:"ui-1v8p93f",kBCPoo:"ui-1o3jo1z",kL6WhQ:"ui-16stqrj",kGJrpR:"ui-v5lvn5",$$css:!0},variantUnfilled:{"--ui-input-group-border-width":"ui-qkl0tc","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4",kWkggS:"ui-jbqb8w",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kBCPoo:"ui-1273586",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kGJrpR:"ui-1mi4oqr",kOIVth:"ui-137clkk",kGVxlE:"ui-1gnnqk1 ui-15ysqaf",$$css:!0},variantUnfilledSize:{kZKoxP:"ui-t7dq6l",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},Ld={field:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",kAzted:"ui-10fesj9",kHenm0:"ui-tt52l0",kORKVm:"ui-10wlt62",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},collapseBlur:{kskxy:"ui-1kxtfma ui-5u5ifr",kORKVm:"ui-10wlt62",$$css:!0}},Rl={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",keTefX:"ui-1lziwak ui-dve3mh",k71WvV:"ui-14z9mp ui-rybaqh",$$css:!0},textareaLayout:{kAzted:"ui-1tn5z8q",$$css:!0}},GE={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0}},iF={base:xr.sizeBase,lg:xr.sizeLg,xl:xr.sizeXl},sF={base:xr.layoutTextareaBase,lg:xr.layoutTextareaLg,xl:null},oF={container:null,content:xr.frameContent},aF={default:xr.variantDefault,elevated:xr.variantElevated,ghost:xr.variantGhost,unfilled:xr.variantUnfilled},lF={rounded:null,pill:xr.shapePill},TA=v.createContext(null);function pa(e){const t=v.useContext(TA);if(!t)throw new Error(`${e} must be used within InputGroup.Root`);return t}function uF(){return pa("InputGroup.useContext")}const cF={base:"sm",lg:"base",xl:"lg"},fF={base:"xs",lg:"xs",xl:"sm"},dF={base:"xs",lg:"sm",xl:"md"};function VE({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:d,children:f}){const h=W4(),m=l||h?.disabled===!0,b=Kt({rootClass:"ui-input-group",stylexStyles:[xr.base,iF[n],s==="textarea"?xr.layoutTextarea:null,s==="textarea"?sF[n]:null,oF[t],aF[e],e==="unfilled"?xr.variantUnfilledSize:null,lF[r],m?xr.disabled:null,c],className:d});return g.jsx(TA.Provider,{value:{disabled:m,layout:s,mono:a},children:g.jsx(Cs,{iconSize:cF[n],iconButtonSize:fF[n],buttonSize:dF[n],disabled:m||void 0,children:g.jsx("div",{className:b.className,style:b.style,"data-variant":e,"data-frame":t,"data-size":n,"data-shape":r!=="rounded"?r:void 0,"data-layout":s==="textarea"?"textarea":void 0,"data-mono":a||void 0,"data-disabled":m||void 0,children:f})})})}function pF({className:e,disabled:t,ref:n,rootStyle:r,style:s,...a}){const l=pa("InputGroup.Input"),c=l.disabled||t===!0;return g.jsx($B,{...a,className:e,disabled:c,ref:n,render:g.jsx(rF,{mono:l.mono,rootStyle:r}),style:s})}function hF({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:d,minRows:f=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:b=!1,rows:y,value:k,placeholder:S,focusedPlaceholder:E,...R}){const T=pa("InputGroup.Textarea"),C=T.disabled||t===!0,_=Kt({rootClass:"ui-input-group__textarea",stylexStyles:[Ld.field,C?Ld.disabled:null,T.mono?Ld.mono:null,b?Ld.collapseBlur:null,r],className:e,style:s}),L=v.useRef(null),N=Kc([L,n]),[A,$]=v.useState(!1),z=f<1?1:f,I=h===void 0?void 0:h<z?z:h,Y=v.useCallback(()=>{if(!m)return;const B=L.current;if(!B)return;if(I===z&&(y===void 0||y===z)){B.style.height="",B.style.overflowY="auto";return}B.style.height="auto";const K=window.getComputedStyle(B),O=Number.parseFloat(K.lineHeight),P=Number.parseFloat(K.paddingTop)||0,V=Number.parseFloat(K.paddingBottom)||0,j=Number.parseFloat(K.borderTopWidth)||0,Z=Number.parseFloat(K.borderBottomWidth)||0,te=P+V+j+Z,se=Number.isFinite(O)&&O>0?te+O*z:0,ue=I!==void 0&&Number.isFinite(O)&&O>0?te+O*I:void 0,le=Math.max(B.scrollHeight,se),fe=ue!==void 0?Math.min(le,ue):le;B.style.height=`${fe}px`,B.style.overflowY=ue!==void 0&&B.scrollHeight>ue?"auto":"hidden"},[m,I,z,y]);v.useLayoutEffect(()=>{Y()},[k,Y]);const H=v.useCallback(B=>{a?.(B),!B.defaultPrevented&&wx(B)},[a]),q=v.useCallback(B=>{l?.(B),B.defaultPrevented||Y()},[l,Y]),D=v.useCallback(B=>{$(!0),c?.(B)},[c]),F=v.useCallback(B=>{$(!1),d?.(B)},[d]),U=y??z,W=A&&E!==void 0?E:S;return g.jsx("textarea",{ref:N,className:_.className,style:_.style,disabled:C,onKeyDown:H,rows:U,value:k,placeholder:W,...R,"data-textarea-collapse-blur":b?"":void 0,onInput:q,onFocus:D,onBlur:F})}function mF({addonStyle:e,className:t,ref:n,...r}){const s=pa("InputGroup.Icon"),a=Kt({rootClass:"ui-input-group__addon",stylexStyles:[Rl.base,s.layout==="textarea"?Rl.textareaLayout:null,e],className:t});return g.jsx("span",{className:a.className,style:a.style,children:g.jsx(Yt,{ref:n,...r})})}function gF({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=pa("InputGroup.IconButton"),l=a.disabled?!0:n,c=Kt({rootClass:"ui-input-group__addon",stylexStyles:[Rl.base,a.layout==="textarea"?Rl.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(dr,{ref:r,disabled:l,...s})})}function bF({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=pa("InputGroup.Button"),l=a.disabled?!0:n,c=Kt({rootClass:"ui-input-group__addon",stylexStyles:[Rl.base,a.layout==="textarea"?Rl.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(ln,{ref:r,disabled:l,...s})})}function yF({className:e,children:t}){const n=pa("InputGroup.Span"),r=Kt({rootClass:"ui-input-group__span",stylexStyles:[GE.base,n.mono?GE.mono:null],className:e});return g.jsx("span",{className:r.className,style:r.style,children:t})}const zd=Object.assign(VE,{Root:VE,Input:pF,Textarea:hF,Icon:mF,IconButton:gF,Button:bF,Span:yF,useContext:uF}),vF=v.createContext(void 0);function xF(e){return v.useContext(vF)}function RA(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=HC(),{ref:s,index:a}=IN(e),l=n===a,c=v.useRef(null),d=co(s,c);return{compositeProps:{tabIndex:l?0:-1,onFocus(){r(a)},onMouseMove(){const h=c.current;if(!t||!h)return;const m=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!m&&h.focus()}},compositeRef:d,index:a}}function kF(e){const{render:t,className:n,style:r,state:s=Ln,props:a=fo,refs:l=fo,metadata:c,stateAttributesMapping:d,tag:f="div",...h}=e,{compositeProps:m,compositeRef:b}=RA({metadata:c});return mn(f,e,{state:s,ref:[...l,b],props:[m,...a,h],stateAttributesMapping:d})}function SF(e){const[t,n]=v.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function WE(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zt(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(xl(n)!==a||xl(r)!==l)&&(n=a,r=l),{width:n,height:r}}function CA(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const _A=v.createContext(void 0);function Zc(e){const t=v.useContext(_A);if(t===void 0&&!e)throw new Error(Nn(50));return t}const wF=600,NA=300,EF={...V_,instantType:et(e=>e.instantType),hasViewport:et(e=>e.hasViewport)};class Lh extends Qv{constructor(t,n,r=!1){const s=new yh,a={...TF(),...t};a.floatingRootContext=H_(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s,closeDelayRef:{current:NA},inlineRectCoordsRef:{current:void 0}},EF)}setOpen=(t,n)=>{const{inlineRectCoordsRef:r}=this.context;z_(this,t,n,{onBeforeDispatch(){const s=n.event;t&&n.reason===yr&&n.trigger&&"clientX"in s&&"clientY"in s&&r.current?.element!==n.trigger&&A_(r,n.trigger,s.clientX,s.clientY)}})};static useStore(t,n){return L_(t,(s,a)=>new Lh(n,s,a)).store}}function TF(){return{...q_(),instantType:void 0,hasViewport:!1}}function KE(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:s,actionsRef:a,handle:l,triggerId:c,defaultTriggerId:d=null,children:f}=e,h=Lh.useStore(l?.store,{open:n,openProp:t,activeTriggerId:d,triggerIdProp:c});P_(h,t,n,d),h.useControlledProp("openProp",t),h.useControlledProp("triggerIdProp",c),h.useContextCallback("onOpenChange",r),h.useContextCallback("onOpenChangeComplete",s);const m=h.useState("open"),b=h.useState("activeTriggerId"),y=h.useState("mounted"),k=h.useState("payload");B_(h,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S}=F_(m,h,()=>{h.context.inlineRectCoordsRef.current=void 0});Ge(()=>{m&&b==null&&h.set("payload",void 0)},[h,b,m]);const E=v.useCallback(()=>{h.setOpen(!1,xt(vp))},[h]);v.useImperativeHandle(a,()=>({unmount:S,close:E}),[S,E]);const R=m||y;return g.jsxs(_A.Provider,{value:h,children:[R&&g.jsx(RF,{store:h}),typeof f=="function"?f({payload:k}):f]})}function RF({store:e}){const t=e.useState("floatingRootContext"),n=Hv(t),r=n.reference??Ln,s=n.trigger??Ln,a=v.useMemo(()=>Pi(Jv,n.floating),[n.floating]);return U_(e,{activeTriggerProps:r,inactiveTriggerProps:s,popupProps:a}),null}const AA=Zv(function(t){return Zc(!0)?g.jsx(KE,{...t}):g.jsx(eP,{children:g.jsx(KE,{...t})})}),OA=v.createContext(void 0);function CF(){const e=v.useContext(OA);if(e===void 0)throw new Error(Nn(48));return e}const MA=v.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...d}=t,{portalNode:f,portalSubtree:h}=h_({container:s,ref:n,componentProps:t,elementProps:d});return!h&&!f?null:g.jsxs(v.Fragment,{children:[h,f&&Ri.createPortal(r,f)]})}),IA=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Zc().useState("mounted")||r?g.jsx(OA.Provider,{value:r,children:g.jsx(MA,{ref:n,...s})}):null}),DA=I_(function(t,n){const{render:r,className:s,delay:a,closeDelay:l,id:c,payload:d,handle:f,style:h,...m}=t,b=Zc(!0),y=f?.store??b;if(!y)throw new Error(Nn(89));const k=Il(c),S=y.useState("isTriggerActive",k),E=y.useState("isOpenedByTrigger",k),R=y.useState("floatingRootContext"),T=y.context.inlineRectCoordsRef,C=v.useRef(null),_=a??wF,L=l??NA,{registerTrigger:N,isMountedByThisTrigger:A}=$_(k,C,y,{payload:d});Ge(()=>{A&&(y.context.closeDelayRef.current=L)},[y,A,L]);const $=Z_(R,{mouseOnly:!0,move:!1,handleClose:Q_(),delay:()=>({open:_,close:L}),triggerElementRef:C,isActiveTrigger:S,isClosing:()=>y.select("transitionStatus")==="ending"}),z=K_(R,{delay:_}),I={open:E},Y=y.useState("triggerProps",A),H=KP(T,E);return mn("a",t,{state:I,ref:[n,N,C],props:[$,z.reference,Y,H,{id:k},m],stateAttributesMapping:FC})}),jA=v.createContext(void 0);function _F(){const e=v.useContext(jA);if(e===void 0)throw new Error(Nn(49));return e}const LA=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:E=f_,style:R,...T}=t,C=Zc(),_=CF(),L=Q2(),N=C.useState("open"),A=C.useState("mounted"),$=C.useState("floatingRootContext"),z=C.useState("instantType"),I=C.useState("transitionStatus"),Y=C.useState("hasViewport"),H=C.context.inlineRectCoordsRef,q=px({anchor:a,floatingRootContext:$,positionMethod:l,mounted:A,side:c,sideOffset:f,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S,keepMounted:_,nodeId:L,collisionAvoidance:E,adaptiveOrigin:Y?AN:void 0,inline:YP(H)}),D=q.update;Ge(()=>{N&&A&&D()},[N,A,D]);const F={open:N,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:z},U=hx(t,F,{styles:q.positionerStyles,transitionStatus:I,props:T,refs:[n,C.useStateSetter("positionerElement")],hidden:!A,inert:!N});return g.jsx(jA.Provider,{value:q,children:g.jsx(J2,{id:L,children:U})})}),NF={...Uc,...go},zA=v.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=Zc(),{side:d,align:f}=_F(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext");xo({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const S=We(()=>c.context.closeDelayRef.current);return X_(k,{closeDelay:S}),mn("div",t,{state:{open:h,side:d,align:f,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,wh(b),l],stateAttributesMapping:NF})});class AF{constructor(){this.store=new Lh}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(Nn(88,t));this.store.setOpen(!0,xt(vp,void 0,n))}close(){this.store.setOpen(!1,xt(vp,void 0,void 0))}get isOpen(){return this.store.select("open")}}function OF(){return new AF}const PA="never",Bb={base:{kVAEAm:"ui-1n2onr6",kfSwDN:"ui-1hx0egp",kfzvcC:"ui-67bb7w",$$css:!0},width:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],maxWidth:e=>[{ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},MF={base:{kB7OPa:"ui-9f619",$$css:!0}};function IF({ariaLabel:e,close:t,content:n,contentStyle:r,maxHeight:s,maxWidth:a,offset:l,placement:c,sameAxisOnly:d,scrollbarVisibility:f,surfaceClassName:h,surfaceStyle:m,width:b}){const{portalLayerStyles:y}=jl("tooltip",!0),{side:k,align:S,sideOffset:E,alignOffset:R,collisionAvoidance:T,positionMethod:C}=Nh(c??Ch,l,d),_=Th(LN),L=Lt(mx,Bb.base,Eh,Bb.width(b),a!==void 0&&Bb.maxWidth(a),m),N=Lt(zN,MF.base,r);return g.jsx(LA,{align:S,alignOffset:R,className:_.className,collisionAvoidance:T,collisionPadding:8,positionMethod:C,side:k,sideOffset:E,style:{..._.style,...y},children:g.jsx(zA,{"aria-label":e,className:nn("ui-preview-card",h,L.className),role:"dialog",style:L.style,children:g.jsx(wl,{maxHeight:s,scrollbarVisibility:f,children:g.jsx("div",{className:nn("ui-preview-card__content",N.className),style:N.style,children:typeof n=="function"?n(t):n})})})})}function $A({children:e,content:t,placement:n=Ch,sameAxisOnly:r=!1,offset:s=8,openDelay:a=gx,closeDelay:l=_h,disabled:c=!1,maxHeight:d=300,maxWidth:f,scrollbarVisibility:h=PA,width:m=280,className:b,surfaceStyle:y,contentStyle:k,"aria-label":S,ref:E,defaultOpen:R=!1,open:T,onOpenChange:C,onOpenChangeComplete:_,...L}){const N=v.useRef(null),A=v.Children.only(e),$=v.isValidElement(A),z=v.useCallback(D=>{D!==null&&(N.current?.close(),T===void 0&&N.current?.unmount())},[T]),I=kA({defaultTagName:"span",props:L,ref:[E,z],render:$?A:void 0}),Y=fa(),H=v.useCallback((D,F)=>{if(c){D&&F.cancel();return}if(F.reason==="outside-press"||F.reason==="trigger-press"){F.cancel();return}C?.(D,F)},[c,C]),q=v.useCallback(()=>N.current?.close(),[]);return $?g.jsxs(AA,{actionsRef:N,defaultOpen:R,onOpenChange:H,onOpenChangeComplete:_,open:T,children:[c?I:g.jsx(DA,{...L,closeDelay:l,delay:a,ref:E,render:A}),c?null:g.jsx(IA,{container:Y??void 0,children:g.jsx(IF,{ariaLabel:S,close:q,content:t,contentStyle:k,maxHeight:d,maxWidth:f,offset:s,placement:n,sameAxisOnly:r,scrollbarVisibility:h,surfaceClassName:b,surfaceStyle:y,width:m})})]}):g.jsx(g.Fragment,{children:e})}function YE(e){const t=v.useRef(e);return v.useLayoutEffect(()=>{t.current=e},[e]),t}function DF(e,t){const n=YE(e),r=YE(t);return v.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const d=c.target,f=a.defaultView?.Element;if(f===void 0||!(d instanceof f))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&d.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const Bp=v.createContext(!1);function BA({children:e,dismiss:t}){const n=v.use(Bp);return g.jsx(Bp.Provider,{value:n||t,children:e})}const FA=v.createContext(null),UA=v.createContext(null),qA=v.createContext(null);function HA(e){const t=v.use(FA);if(t===null)throw new Error(`${e} must be used within PreviewCardLayer`);return t}function jF(){const e=v.use(UA);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function LF(){const e=v.use(qA);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function zF({children:e}){const t=bx();return Sx({nodeId:t,open:!0}),g.jsx(yx,{id:t,children:e})}function Sc({children:e,placement:t=Ch,offset:n=8,sameAxisOnly:r=!1,openDelay:s=gx,closeDelay:a=_h,controlledTargetId:l}){const c=v.useMemo(()=>OF(),[]),d=v.useRef(null),f=v.useRef(null),h=v.useRef(null),m=v.useRef(!1),b=v.useRef(new Map),y=v.useRef(l),[k,S]=v.useState(!1),E=v.use(Bp),R=Nh(t,n,r),T=v.useCallback($=>{d.current===$&&(d.current=null,c.close())},[c]),C=v.useCallback(()=>{const $=y.current;if($===void 0)return;const z=$===null?void 0:b.current.get($);if($===null||z===void 0||z.suppressed){d.current=null,c.close();return}d.current=z.triggerId,c.open(z.triggerId)},[c]),_=v.useCallback(()=>{const $=m.current;m.current=!1;const z=f.current;if(z===null)return;const I=h.current;I===null||I.id!==z||!I.isConnected||I.hasAttribute("data-preview-card-layer-trigger-suppressed")||!$&&I!==I.ownerDocument.activeElement&&!I.matches(":hover")||(d.current=z,c.open(z))},[c]),L=v.useCallback(($,z)=>(b.current.set($,z),C(),()=>{b.current.get($)===z&&(b.current.delete($),C())}),[C]);v.useLayoutEffect(()=>{const $=y.current;if($===void 0&&l!==void 0&&(f.current=d.current),y.current=l,l===void 0){$!==void 0&&_();return}$!==l&&(m.current=!1),C()},[l,C,_]);const N=v.useCallback(($,z)=>{if(y.current!==void 0&&z.reason!=="imperative-action"){$&&z.trigger!==void 0&&!z.trigger.hasAttribute("data-preview-card-layer-trigger-suppressed")?(f.current=z.trigger.id,h.current=z.trigger,m.current=!0):!$&&z.trigger?.id===f.current&&(f.current=null,h.current=null,m.current=!1),z.cancel(),C();return}if($&&z.trigger?.hasAttribute("data-preview-card-layer-trigger-suppressed")){if(z.cancel(),y.current!==void 0){C();return}d.current=null,f.current=null,c.close();return}if(!$&&z.reason==="trigger-focus"&&z.event instanceof FocusEvent&&z.event.relatedTarget===null&&z.event.target instanceof Element&&z.event.target.matches(":hover")){z.cancel();return}!$&&z.reason!=="imperative-action"&&z.trigger?.id===f.current&&(f.current=null,h.current=null,m.current=!1),d.current=$?z.trigger?.id??d.current:null,y.current===void 0&&(f.current=d.current),S($),y.current===void 0&&z.trigger!==void 0&&(h.current=$?z.trigger:null)},[c,C]),A=v.useMemo(()=>({handle:c,instantDismiss:E,openDelay:s,closeDelay:a,positioner:R,closeIfActive:T,registerTarget:L}),[a,T,c,E,s,R,L]);return g.jsxs(FA.Provider,{value:A,children:[e,g.jsx(AA,{handle:c,onOpenChange:N,children:({payload:$})=>!E&&k&&$!==void 0?g.jsx(UA.Provider,{value:$.triggerId,children:g.jsx(qA.Provider,{value:$.contentKey,children:g.jsx(zF,{children:$.content})})}):null})]})}function PF({children:e,content:t,targetId:n,contentKey:r,disabled:s=!1,openDelay:a,closeDelay:l}){const{handle:c,instantDismiss:d,openDelay:f,closeDelay:h,closeIfActive:m,registerTarget:b}=HA("PreviewCardLayer.Trigger"),y=v.useId(),k=e.props.id,S=typeof k=="string"?k:y,E=s||d,R=v.useMemo(()=>({content:t,contentKey:r??S,triggerId:S}),[t,r,S]);return v.useLayoutEffect(()=>{const T=n===void 0?void 0:b(n,{triggerId:S,suppressed:E});return E&&m(S),()=>{T?.(),m(S)}},[m,b,E,n,S]),g.jsx(DA,{closeDelay:l??h,delay:a??f,handle:c,id:S,payload:R,"data-preview-card-layer-trigger-suppressed":E?"":void 0,render:e})}function $F({children:e,maxHeight:t,surfaceClassName:n,surfaceStyle:r}){const{handle:s,positioner:a}=HA("PreviewCardLayer.Popup"),l=jF(),c=LF(),d=fa(),f=DF(s,l),{portalLayerStyles:h}=jl("tooltip",!0),m=Th(LN),b=Lt(mx,PN,zN,Eh,$6,r);return g.jsx(IA,{container:d??void 0,children:g.jsx(LA,{align:a.align,alignOffset:a.alignOffset,className:m.className,collisionAvoidance:a.collisionAvoidance,collisionPadding:8,positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,style:{...m.style,...h},children:g.jsx(zA,{"data-component":"preview-card-layer-popup",className:nn("ui-preview-card-layer",n,b.className),ref:f,role:"dialog",style:b.style,children:t===void 0?e:g.jsx(wl,{maxHeight:`min(${typeof t=="number"?`${t}px`:t}, var(--available-height, 100vh))`,scrollbarVisibility:PA,children:e})},c)})})}(function(e){e.Trigger=PF,e.Popup=$F})(Sc||(Sc={}));function wc(e,t,n,r){const[s,a]=v.useState(t),l=v.useRef(n),c=v.useRef(s),d=e!==void 0,f=v.useRef(d);v.useLayoutEffect(()=>{l.current=n},[n]),v.useEffect(()=>{c.current!==s&&l.current?.(s),c.current=s},[s]),v.useEffect(()=>{f.current,f.current=d},[r,d]);const h=d?e:s,m=v.useCallback(b=>{if(!d){a(b);return}const y=typeof b=="function"?b(e):b;y!==e&&l.current?.(y)},[e,d]);return[h,m]}const GA="data-composite-item-active",BF=[];function FF(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:s,direction:a,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:h=!1,disabledIndices:m,modifierKeys:b=BF}=e,[y,k]=v.useState(0),S=r!=null,E=v.useRef(null),R=co(E,d),T=v.useRef([]),C=v.useRef(!1),_=l??y,L=We((I,Y=!1)=>{if((c??k)(I),Y){const H=T.current[I];Z1(E.current,H,a,n)}}),N=We(I=>{if(I.size===0||C.current)return;C.current=!0;const Y=Array.from(I.keys()),H=Y.find(D=>D?.hasAttribute(GA))??null,q=H?Y.indexOf(H):-1;if(q!==-1)L(q);else if(Tp(Y,_,m)){const D=Ss(Y,{disabledIndices:m});ic(Y,D)||L(D)}Z1(E.current,H,a,n)});Ge(()=>{if(m==null||l!=null||!C.current)return;const I=T.current;if(Tp(I,_,m)){const Y=Ss(I,{disabledIndices:m});ic(I,Y)||L(Y)}},[m,l,_,T,L]);const A=We((I,Y,H)=>s?s(I,Y,H,T):H),$=We(I=>{const Y=f?nN:tN;if(!Y.has(I.key)||UF(I,b)||!E.current)return;const q=a==="rtl",D=q?Op:Mp,F={horizontal:D,vertical:lc,both:D}[n],U=q?Mp:Op,W={horizontal:U,vertical:ac,both:U}[n],B=cr(I.nativeEvent);if(B!=null&&X1(B)&&!CA(B)){const te=B.selectionStart,se=B.selectionEnd,ue=B.value??"";if(te==null||I.shiftKey||te!==se||I.key!==W&&te<ue.length||I.key!==F&&te>0)return}let K=_;const O=lp(T,m),P=Ny(T,m);r!=null&&(K=r({disabledIndices:m,elementsRef:T,event:I,highlightedIndex:_,loopFocus:t,maxIndex:P,minIndex:O,onLoop:A,orientation:n,rtl:q}));const V={horizontal:[D],vertical:[lc],both:[D,lc]}[n],j={horizontal:[U],vertical:[ac],both:[U,ac]}[n],Z=S?Y:{horizontal:f?T$:J_,vertical:f?R$:eN,both:Y}[n];f&&(I.key===xh?K=O:I.key===kh&&(K=P)),K===_&&(V.includes(I.key)||j.includes(I.key))&&(t&&K===P&&V.includes(I.key)?(K=O,s&&(K=s(I,_,K,T))):t&&K===O&&j.includes(I.key)?(K=P,s&&(K=s(I,_,K,T))):K=Ss(T.current,{startingIndex:K,decrement:j.includes(I.key),disabledIndices:m})),K!==_&&!ic(T.current,K)&&(h&&I.stopPropagation(),Z.has(I.key)&&I.preventDefault(),L(K,!0),queueMicrotask(()=>{T.current[K]?.focus()}))});return{props:{ref:R,onFocus(I){const Y=E.current,H=cr(I.nativeEvent);!Y||H==null||!X1(H)||H.setSelectionRange(0,H.value.length??0)},onKeyDown:$},highlightedIndex:_,onHighlightedIndexChange:L,elementsRef:T,disabledIndices:m,onMapChange:N,relayKeyboardEvent:$}}function UF(e,t){for(const n of O$.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function qF(e){const{render:t,className:n,style:r,refs:s=fo,props:a=fo,state:l=Ln,stateAttributesMapping:c,highlightedIndex:d,onHighlightedIndexChange:f,orientation:h,grid:m,loopFocus:b,onLoop:y,enableHomeAndEndKeys:k,onMapChange:S,stopEventPropagation:E=!0,rootRef:R,disabledIndices:T,modifierKeys:C,highlightItemOnHover:_=!1,tag:L="div",...N}=e,A=Ci(),{props:$,highlightedIndex:z,onHighlightedIndexChange:I,elementsRef:Y,onMapChange:H,relayKeyboardEvent:q}=FF({grid:m,loopFocus:b,onLoop:y,orientation:h,highlightedIndex:d,onHighlightedIndexChange:f,rootRef:R,stopEventPropagation:E,enableHomeAndEndKeys:k,direction:A,disabledIndices:T,modifierKeys:C}),D=mn(L,e,{state:l,ref:s,props:[$,...a,N],stateAttributesMapping:c}),F=v.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:I,highlightItemOnHover:_,relayKeyboardEvent:q}),[z,I,_,q]);return g.jsx(qC.Provider,{value:F,children:g.jsx(dx,{elementsRef:Y,onMapChange:U=>{S?.(U),H(U)},children:D})})}const HF=v.createContext(void 0);function GF(){const e=v.useContext(HF);if(e===void 0)throw new Error(Nn(63));return e}let XE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const VF={...Vc,checked(e){return e?{[XE.checked]:""}:{[XE.unchecked]:""}}},WF=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=GF();return mn("span",t,{state:c,ref:n,stateAttributesMapping:VF,props:l})}),KF="md",ZE={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kmuXW:"ui-2lah0s",kaIpWk:"ui-1i4c3av",kMeerF:"ui-1k57tk5 ui-x510wv",k3XXqK:"ui-1t137rt ui-15veape",kjBf7l:"ui-1uczgqu ui-1whe2fk",kInvED:"ui-1wfwxd8 ui-1edn9mt",kSiTet:"ui-1hc1fzr ui-vlaemc",kWkggS:"ui-59yu97 ui-1jnhqrh",k1ekBW:"ui-15406qy",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-23j0i4",kZKoxP:"ui-1vatr1o","--ui-switch-thumb-travel":"ui-sc32xf",$$css:!0},regular:{kzqmXN:"ui-1849jeq",kZKoxP:"ui-mix8c7","--ui-switch-thumb-travel":"ui-9pb0k7",kWkggS:"ui-3dhcaw ui-1jnhqrh",kGVxlE:"ui-1gnnqk1 ui-10yfhlr",$$css:!0},md:{kzqmXN:"ui-1td3qas",kZKoxP:"ui-1a6rlst","--ui-switch-thumb-travel":"ui-9pb0k7",$$css:!0},lg:{kzqmXN:"ui-1guw455",kZKoxP:"ui-1e94bgo","--ui-switch-thumb-travel":"ui-1c3f5sz",$$css:!0}},YF={primary:{"--ui-switch-active-bg":"ui-i0s8m6",$$css:!0},green:{"--ui-switch-active-bg":"ui-1g3p0vo",$$css:!0},neutral:{"--ui-switch-active-bg":"ui-742exl",$$css:!0},monochrome:{"--ui-switch-active-bg":"ui-1iuey4n","--ui-switch-thumb-bg":"ui-1bnmce8",$$css:!0}};function XF({interactive:e,size:t,variant:n}){const r=g.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-hwtojv ui-10z6xd1 ui-19ule2h ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?g.jsx(WF,{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r}):g.jsx("span",{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r});return g.jsx("span",{"aria-hidden":"true",...Lt(ZE.root,ZE[t],YF[n]),children:s})}function ZF({checked:e,disabled:t,size:n=KF,variant:r="green"}){return g.jsx("span",{"aria-hidden":"true","data-component":"switch","data-size":n,"data-variant":r,"data-checked":e||void 0,"data-disabled":t||void 0,className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker",children:g.jsx(XF,{interactive:!1,size:n,variant:r})})}const vn={base:{kMv6JI:"ui-1acoasx",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",$$css:!0},sizeInherit:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kb6lSQ:"ui-4gjf66",$$css:!0},variantCode:{kMv6JI:"ui-ul7cyv",$$css:!0},weightRegular:{k63SB2:"ui-20ajya",$$css:!0},weightMedium:{k63SB2:"ui-1yl5bsf",$$css:!0},weightSemibold:{k63SB2:"ui-13ebx5f",$$css:!0},weightBold:{k63SB2:"ui-1v8v64w",$$css:!0},colorPrimary:{kMwMTN:"ui-1wd3ewq",$$css:!0},colorSecondary:{kMwMTN:"ui-19aaqeu",$$css:!0},colorTertiary:{kMwMTN:"ui-4b2ntj",$$css:!0},colorQuaternary:{kMwMTN:"ui-1e4uaio",$$css:!0},colorActive:{kMwMTN:"ui-7qsbfx",$$css:!0},colorFocused:{kMwMTN:"ui-zlszhr",$$css:!0},colorRed:{kMwMTN:"ui-1jh5svw",$$css:!0},colorRedSecondary:{kMwMTN:"ui-o7cye4",$$css:!0},colorYellow:{kMwMTN:"ui-1izesbo",$$css:!0},colorYellowSecondary:{kMwMTN:"ui-14nh9a",$$css:!0},colorGreen:{kMwMTN:"ui-1w5rjie",$$css:!0},colorGreenSecondary:{kMwMTN:"ui-dki84f",$$css:!0},colorMagenta:{kMwMTN:"ui-xjecij",$$css:!0},colorMagentaSecondary:{kMwMTN:"ui-29qggb",$$css:!0},colorCyan:{kMwMTN:"ui-1d0l12",$$css:!0},colorCyanSecondary:{kMwMTN:"ui-l34bp",$$css:!0},colorOrange:{kMwMTN:"ui-11pqmr",$$css:!0},colorOrangeSecondary:{kMwMTN:"ui-11nfuof",$$css:!0},truncateStart:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",ksoyAI:"ui-zyj77d",k9WMMc:"ui-dpxx8g",$$css:!0}},QF={xs:gN.root,sm:Gi.root,md:Fi.root,lg:bN.root,xl:O3.root,"2xl":M3.root,"3xl":I3.root,inherit:vn.sizeInherit},JF={regular:vn.weightRegular,medium:vn.weightMedium,semibold:vn.weightSemibold,bold:vn.weightBold},e9={primary:vn.colorPrimary,secondary:vn.colorSecondary,tertiary:vn.colorTertiary,quaternary:vn.colorQuaternary,active:vn.colorActive,focused:vn.colorFocused,red:vn.colorRed,"red-secondary":vn.colorRedSecondary,yellow:vn.colorYellow,"yellow-secondary":vn.colorYellowSecondary,green:vn.colorGreen,"green-secondary":vn.colorGreenSecondary,magenta:vn.colorMagenta,"magenta-secondary":vn.colorMagentaSecondary,cyan:vn.colorCyan,"cyan-secondary":vn.colorCyanSecondary,orange:vn.colorOrange,"orange-secondary":vn.colorOrangeSecondary};function t9({color:e,size:t,truncate:n,variant:r,weight:s}){return[vn.base,lx.root,QF[t],JF[s],r==="code"?vn.variantCode:null,e?e9[e]:null,n==="start"?vn.truncateStart:null,n==="end"?Ll.root:null]}function Fp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,rootStyle:d,className:f,style:h,ref:m,...b}){const y=a===!0?"end":a===!1?void 0:a??void 0,{className:k,style:S}=Lt(t9({color:s,size:n,truncate:y,variant:t,weight:r}),d);return g.jsx(e,{ref:m,className:nn("ui-text",k,f),style:{...S,...h},"data-variant":t,"data-size":n,"data-weight":r,"data-color":s,"data-truncate":y,"data-numeric":l||void 0,...b,children:y==="start"?g.jsxs(g.Fragment,{children:["",c,""]}):c})}const VA={text:{kzqmXN:"ui-h8yej3",kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0}};function WA({children:e}){return g.jsx("div",{"data-component":"empty-state-root",className:"ui-98rzlu ui-5yr21d ui-2lwn1j ui-euugli ui-78zum5 ui-dt5ytf ui-6s0dn4 ui-l56j7k ui-1rea2x4 ui-j2grvh ui-mw8u6f ui-9f619 ui-2b8uid ui-1oot3zn",children:e})}function KA({children:e,variant:t="default"}){return g.jsx("div",{"data-component":"empty-state-icon","data-variant":t,...{0:{className:"ui-1pwdyn5 ui-1vatr1o ui-2lah0s ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1lbmi28"},1:{className:"ui-2lah0s ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1lbmi28 ui-1niwmkg ui-f2gx5w ui-9f619 ui-mkeg23 ui-1y0btm7 ui-qz0629 ui-1m7fhj7"}}[(t==="tab")<<0],children:e})}function YA({children:e}){return g.jsx("div",{"data-component":"empty-state-header",className:"ui-h8yej3 ui-euugli ui-78zum5 ui-dt5ytf ui-6s0dn4 ui-137clkk",children:e})}function XA({children:e}){return g.jsx(Fp,{as:"p",color:"primary","data-component":"empty-state-title",rootStyle:VA.text,size:"md",weight:"medium",children:e})}function ZA({children:e}){return g.jsx(Fp,{as:"p",color:"secondary","data-component":"empty-state-description",rootStyle:VA.text,size:"md",weight:"regular",children:e})}function QA({children:e}){return g.jsx("div",{"data-component":"empty-state-content",className:"ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1a02dak ui-ehausa",children:e})}function n9({body:e,cta:t,icon:n,iconVariant:r="default",title:s}){const a=typeof n=="string"?n:void 0,l=a!==void 0?g.jsx(Yt,{color:"tertiary",name:a,size:"lg"}):n;return g.jsxs(WA,{children:[l===void 0?null:g.jsx(KA,{variant:r,children:l}),g.jsxs(YA,{children:[s===void 0?null:g.jsx(XA,{children:s}),g.jsx(ZA,{children:e})]}),t===void 0?null:g.jsx(QA,{children:g.jsx(ln,{disabled:t.disabled,onClick:t.onClick,size:"md",variant:"outline",children:t.label})})]})}const ws=Object.assign(n9,{Root:WA,Icon:KA,Header:YA,Title:XA,Description:ZA,Content:QA});function Qc({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,inputGroupRootStyle:c,...d}){return g.jsxs(zd.Root,{className:e,rootStyle:c,variant:t,size:n,disabled:s,children:[a!=null&&g.jsx(zd.Icon,{name:a}),g.jsx(zd.Input,{ref:r,...d}),l!=null&&g.jsx(zd.Icon,{name:l})]})}const xs=class xs{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return xs.instance||(xs.instance=new xs),xs.instance}static subscribe(t){return xs.getInstance().subscribeToChanges(t)}static isDragActive(){return xs.getInstance().hasData()}notifyListeners(){for(const t of this.listeners)t()}subscribeToChanges(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setData(t){this.data!==t&&(this.data=t,this.notifyListeners())}getData(){return this.data}getValidatedData(t){if(!this.data)return null;for(const n of t)if(this.data instanceof n)return n.schema.safeParse(this.data.payload).success?this.data:null;return null}hasAnyClass(t){return this.data?t.some(n=>this.data instanceof n):!1}clearData(){this.data!==null&&(this.data=null,this.notifyListeners())}hasData(){return this.data!==null}};xs.instance=null;let fi=xs;const Fb={fontFamily:{sans:"var(--cursor-font-family, var(--vscode-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif))",mono:"var(--cursor-font-family-mono, var(--monaco-monospace-font, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace))"},scrollbar:{verticalSize:"var(--vscode-scrollbar-vertical-size, 14px)",horizontalSize:"var(--vscode-scrollbar-horizontal-size, 12px)",thumbBackground:"var(--vscode-scrollbarSlider-background)",thumbHoverBackground:"var(--vscode-scrollbarSlider-hoverBackground)",thumbActiveBackground:"var(--vscode-scrollbarSlider-activeBackground)"},syntax:{foreground:"oklch(0.878 0.01 286.202)",background:"oklch(0.209 0 0)",keyword:"oklch(0.811 0.079 191.639)",string:"oklch(0.769 0.132 329.919)",function:"oklch(0.805 0.097 58.138)",number:"oklch(0.849 0.086 80.222)",comment:"oklch(0.919 0 0 / 0.369)",constant:"oklch(0.854 0.131 83.385)",parameter:"oklch(0.878 0.01 286.202)",punctuation:"oklch(0.878 0.01 286.202)",link:"oklch(0.799 0.106 249.274)",stringExpression:"oklch(0.769 0.132 329.919)"}},r9={1:1,2:2},Fy={instant:50,fast:100,normal:150,slow:200,slower:300},JA={default:"ease",in:"ease-in",out:"ease-out",inOut:"ease-in-out",inStrong:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",outStrong:"cubic-bezier(0.165, 0.84, 0.44, 1)",outCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",outQuint:"cubic-bezier(0.16, 1, 0.3, 1)",inOutStrong:"cubic-bezier(0.77, 0, 0.175, 1)"},i9={"ne-0.25":-1,"ne-0.5":-2,"ne-0.75":-3,"ne-1":-4,"ne-1.25":-5,"ne-1.5":-6,"ne-1.75":-7,"ne-2":-8,"ne-2.25":-9,"ne-2.5":-10,"ne-2.75":-11,"ne-3":-12,"ne-3.25":-13,"ne-3.5":-14,"ne-3.75":-15,"ne-4":-16,"ne-4.25":-17,"ne-4.5":-18,"ne-4.75":-19,"ne-5":-20,"0.25":1,"0.5":2,"0.75":3,1:4,"1.25":5,"1.5":6,"1.75":7,2:8,"2.25":9,"2.5":10,"2.75":11,3:12,"3.25":13,"3.5":14,"3.75":15,4:16,"4.25":17,"4.5":18,"4.75":19,5:20,"5.5":22,6:24,"6.5":26,7:28,"7.5":30,8:32,"8.5":34,9:36,"9.5":38,10:40,11:44,12:48,13:52,14:56,15:60,16:64,17:68,18:72,19:76,20:80},s9={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,"4xl":18,full:9999},o9={xs:20,sm:24,base:28,lg:32},a9={xs:11,sm:12,base:13,lg:14},l9={xs:14,sm:16,base:18,lg:22},u9={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},c9=.98,f9=2,QE={open:Fy.fast,close:Fy.fast},d9=JA.outQuint;function eO(e){const[t,n]=e.split("-");switch(t){case"top":case"right":case"bottom":case"left":return{side:t,alignment:n==="start"||n==="end"?n:void 0};default:throw new Error(`Unsupported floating placement: ${e}`)}}function p9(e){const{side:t,alignment:n}=eO(e);switch(t){case"top":return`${JE(n)} bottom`;case"right":return`left ${eT(n)}`;case"bottom":return`${JE(n)} top`;case"left":return`right ${eT(n)}`}}function h9(e,t={}){const{side:n}=eO(e),r=t.offset??f9,s=t.scale??c9;switch(n){case"top":return`translate3d(0, ${r}px, 0) scale(${s})`;case"right":return`translate3d(-${r}px, 0, 0) scale(${s})`;case"bottom":return`translate3d(0, -${r}px, 0) scale(${s})`;case"left":return`translate3d(${r}px, 0, 0) scale(${s})`}}function m9(e,t){return{opacity:0,transform:h9(e,t)}}function g9(e){return{transformOrigin:p9(e),transitionTimingFunction:d9}}function b9({closeDuration:e=QE.close,transform:t}={}){return{duration:{open:QE.open,close:e},initial:({placement:n})=>m9(n,t),common:({placement:n})=>g9(n)}}function JE(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function eT(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}function y9(){const e=v.useRef(!0),t=v.useRef(void 0),n=v.useCallback(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),r=v.useCallback((s,a)=>{e.current&&(n(),t.current=setTimeout(()=>{t.current=void 0,s()},a))},[n]);return v.useEffect(()=>(e.current=!0,()=>{e.current=!1,n()}),[n]),v.useMemo(()=>({cancel:n,schedule:r}),[n,r])}const v9=300,tO=v.createContext(null);function Uy({children:e}){const[t,n]=v.useState(null),r=y9(),s=v.useCallback(c=>{r.cancel(),n(c)},[r]),a=v.useCallback(c=>{r.schedule(()=>{n(d=>d===c?null:d)},v9)},[r]),l=v.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return g.jsx(tO.Provider,{value:l,children:e})}function x9(e,t){const n=v.useContext(tO),r=n?.markOpen,s=n?.markClosed;return v.useEffect(()=>{if(!(!t||e==null||r==null||s==null))return r(e),()=>s(e)},[t,e,r,s]),{activeId:n?.activeId??null}}const zl="data-ui-menu-item-region",nO=v.createContext("body");function Es({value:e,children:t}){return g.jsx(nO.Provider,{value:e,children:t})}function Jc(){return v.useContext(nO)}const k9='[role="menuitem"]',tT=["pointermove","mousemove"];function rO(e){if(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="Home"||e.key==="End")return!0;if(!e.ctrlKey||e.metaKey)return!1;const t=e.key.toLowerCase();return t==="n"||t==="p"||t==="j"||t==="k"}function S9(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function w9(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(zl)===t)return r;return null}function iO(e,t,n){queueMicrotask(()=>{const r=w9(e,t);n(r??null)})}function sO(e,t){if(!(e instanceof Element))return null;const n=e.closest(k9);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function E9(e,t){if(!e)return()=>{};for(const n of tT)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of tT)e.removeEventListener(n,t)}}function T9({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=S9(r,n);if(!a)return!1;e.preventDefault(),e.stopPropagation();const l=document.activeElement===e.currentTarget;return a.focus(),a.dispatchEvent(new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0})),l&&document.activeElement===a&&s?.(),!0}function oO(){const[e,t]=v.useState(!0),n=v.useCallback(()=>{t(!1)},[]),r=v.useCallback(()=>{t(!0)},[]),s=v.useCallback(()=>{t(!0)},[]);return{focusItemOnHoverEnabled:e,markKeyboardNavigation:n,markPointerNavigation:r,resetFocusItemOnHover:s}}const R9=360,aO="--ui-menu-available-width",Ex="--ui-menu-available-height",C9=new Set(["none","auto","initial","inherit","unset","revert","revert-layer","min-content","max-content","fit-content","stretch"]);function lO(e){const t=`var(${Ex}, 100vh)`;return e==null||_9(e)?t:`min(${il(e)}, ${t})`}function _9(e){return typeof e=="string"&&C9.has(e.trim().toLowerCase())}const N9="320px";function il(e){return typeof e=="number"?`${e}px`:e}function Ub(e){return`min(${e}, var(${aO}, 100vw))`}function Tx(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":il(t??"200px");return s?{width:l==="max-content"?l:Ub(l),...n!=null&&{minWidth:Ub(il(n))},maxWidth:Ub(r!=null?il(r):N9)}:{width:l,...n!=null&&{minWidth:il(n)},...r!=null&&{maxWidth:il(r)}}}const A9=50;function Rx({isOpen:e,isPositioned:t}){return e&&!t?{opacity:0}:void 0}function O9(e,t){v.useLayoutEffect(()=>{if(!e)return;const n=t.current;if(!(n instanceof HTMLElement))return;const r=n.closest('[role="menu"]');if(r!=null)return r.style.pointerEvents="none",n.style.pointerEvents="auto",()=>{r.style.pointerEvents="",n.style.pointerEvents=""}},[e,t])}function M9(){return{name:"bottomAnchor",fn({y:e,placement:t,rects:n,elements:r}){if(!t.startsWith("top"))return{};const s=r.floating.offsetParent,a=s===document.body&&window.getComputedStyle(s).position==="static";return{data:{bottom:(!s||s===document.documentElement||a?document.documentElement.clientHeight||window.innerHeight:s.clientHeight)-e-n.floating.height}}}}}function zh(e=200){const t=v.useRef(0);return v.useEffect(()=>{const n=()=>{t.current=Date.now()+e};return window.addEventListener("focus",n),()=>{window.removeEventListener("focus",n)}},[e]),v.useCallback(n=>{const r=n.target,s=r instanceof Node?r.ownerDocument:document,a=Date.now(),l=s?.hasFocus()??document.hasFocus(),c=a>=t.current;return l&&c},[])}const I9={open:0,close:0},D9={opacity:1,transform:"none"},Cx=v.createContext(null);function Wi(e){const t=v.useContext(Cx);if(!t)throw new Error(`${e} must be used within LegacyMenu`);return t}function uO(){return Wi("LegacyMenu.useContext")}function j9({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:d=!0,closeOnSelect:f,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:b=!0,returnFocus:y,focusItemOnOpen:k=!1,virtualFocus:S=!1,shouldKeepOpenDuringDrag:E=!1,lockPositionWhileOpen:R=!1,dismissOnReferenceScroll:T=!1,enableClick:C=!0,strategy:_,shouldDismissOutsidePress:L}){const N=bx(),[A,$]=wc(t,n,r,"LegacyMenu.Root (open)"),[z,I]=v.useState(""),Y=v.useRef(null),[H,q]=v.useState(!1),[D,F]=v.useState(!1),[U,W]=wc(s,null,a,"LegacyMenu.Root (activeIndex)"),{focusItemOnHoverEnabled:B,markKeyboardNavigation:K,markPointerNavigation:O,resetFocusItemOnHover:P}=oO(),V=v.useRef([]),j=v.useRef([]),Z=v.useRef(null),te=v.useCallback(xe=>{$(xe),xe?(I(""),Z.current=null):W(null),P()},[P,$,W]),se=v.useRef(!1);v.useLayoutEffect(()=>{const xe=se.current;se.current=A,!xe&&A&&I(""),xe!==A&&P()},[A,P]);const{refs:ue,floatingStyles:le,middlewareData:fe,context:ge,update:_e}=Sx({nodeId:N,open:A,onOpenChange:te,placement:l,strategy:_,middleware:[Vv(c),...d?[Kv()]:[],Wv(),Yv({padding:8,apply({availableHeight:xe,elements:$e}){$e.floating.style.setProperty(Ex,`${Math.max(0,Math.floor(xe))}px`)}}),M9()],whileElementsMounted:R?void 0:Rp,transform:!1}),oe=lA(ge,{enabled:D,delay:{open:75},handleClose:xA({blockPointerEvents:!0,requireIntent:!1})}),ye=dA(ge,{enabled:C&&!D}),Se=zh(),Oe=v.useCallback(xe=>L!==void 0&&!L(xe)||E&&fi.getInstance().hasData()?!1:Se(xe),[L,E,Se]),we=pA(ge,{ancestorScroll:T,outsidePressEvent:"click",outsidePress:Oe}),ke=gA(ge,{role:"menu"}),De=mA(ge,{listRef:V,activeIndex:U,onNavigate:W,loop:!1,virtual:S||H,focusItemOnOpen:k,focusItemOnHover:B}),Me=yA(ge,{listRef:j,activeIndex:U,onMatch:H?void 0:W,enabled:!H}),{getReferenceProps:je,getFloatingProps:He,getItemProps:be}=hA([oe,ye,we,ke,De,Me]),Re=v.useCallback(xe=>({...je(xe),ref:ue.setReference,"aria-haspopup":"menu","aria-expanded":A}),[je,ue.setReference,A]),ee=m?{duration:I9,initial:D9}:b9(h?{closeDuration:0}:void 0),{isMounted:ce,styles:J}=bA(ge,ee),re=v.useMemo(()=>({isOpen:A,isMounted:ce,setIsOpen:$,activeIndex:U,setActiveIndex:W,markKeyboardNavigation:K,markPointerNavigation:O,virtualFocus:S,searchValue:z,setSearchValue:I,hasSearchInput:H,setHasSearchInput:q,enableHover:D,setHasHoverTrigger:F,closeOnSelect:f,returnFocusOnSelect:b,returnFocus:y,nodeId:N,listRef:V,labelsRef:j,searchInputRef:Y,refs:ue,floatingStyles:le,middlewareData:fe,transitionStyles:J,context:ge,updateFloating:_e,getReferenceProps:je,getFloatingProps:He,getItemProps:be,getTriggerProps:Re,dismissCauseRef:Z,shouldAllowPointerInteraction:Oe}),[A,ce,$,U,W,K,O,S,z,H,D,f,b,y,N,ue,le,fe,J,ge,_e,je,He,be,Re,Oe]);return g.jsx(yx,{id:N,children:g.jsx(Cx.Provider,{value:re,children:g.jsx(Uy,{children:e})})})}function Gu(e,t){return n=>{e?.(n),n.defaultPrevented||t(n)}}function Pl(e,t){switch(e){case"ArrowLeft":return t==="rtl"?"end":"start";case"ArrowRight":return t==="rtl"?"start":"end";default:return null}}const L9={_zod:{output:{}},safeParse:e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?{success:!0}:{success:!1,error:new TypeError("drag payload must be an object")}};function cO(e,t=()=>L9){var a;let n=null;const r=()=>(n===null&&(n=t()),n);return a=class{constructor(c){this.type=e,this.payload=c}static get schema(){return r()}},a.type=e,a}const z9=v.createContext(null);function P9(){return v.useContext(z9)}const $9=v.createContext("copy-with-plain-text");function B9(){return v.useContext($9)}const F9="application/x-cursor-draggable",Pd=q9("ui-i9pz9s"),U9="data-no-drag";let Yo=!1,nT=!1;function q9(e){return e?.split(/\s+/).filter(Boolean)??[]}function $d(e,t,n){for(const r of t)e.classList.toggle(r,n)}function H9(){if(nT||typeof document>"u")return;nT=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){Yo=!1;return}Yo=t.target.closest(`[${U9}]`)!==null},{capture:!0});const e=()=>{Yo=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function G9({id:e,data:t,disabled:n=!1,dragImageOffset:r,onDragStart:s,onDragEnd:a}){const l=P9(),c=B9(),d=v.useRef(null),f=v.useRef({onDragStart:s,onDragEnd:a});f.current={onDragStart:s,onDragEnd:a};const h=v.useRef(t);h.current=t;const m=v.useRef(r);m.current=r;const b=v.useRef(l);b.current=l;const y=l?.activeDragId===e,k=v.useRef(y);return k.current=y,v.useEffect(()=>{const E=d.current;if(E)return $d(E,Pd,!n&&y),()=>{$d(E,Pd,!1)}},[n,y]),v.useEffect(()=>{const E=d.current;if(!E)return;if(n){E.removeAttribute("aria-grabbed");return}const R=y?"true":"false";E.getAttribute("aria-grabbed")!==R&&E.setAttribute("aria-grabbed",R)},[n,y]),{ref:v.useCallback(E=>{if(d.current=E,!E)return;$d(E,Pd,!n&&k.current);const R=!n;if(E.draggable!==R&&(E.draggable=R),n)return;H9();const T=fi.getInstance(),C=L=>{if(Yo){Yo=!1,L.preventDefault(),L.stopPropagation();return}const N=h.current;T.setData(N);const A=E.ownerDocument,$=()=>{A.removeEventListener("dragend",$,!0),A.removeEventListener("drop",$,!0),A.removeEventListener("mousemove",$,!0),setTimeout(()=>{T.getData()===N&&(T.clearData(),Yo=!1,b.current?.setDragging(null,null))},0)};if(A.addEventListener("dragend",$,!0),A.addEventListener("drop",$,!0),A.addEventListener("mousemove",$,!0),L.dataTransfer){const z=c==="copy-with-plain-text";L.dataTransfer.effectAllowed=z?"copyMove":"move",L.dataTransfer.setData(F9,N.type),z&&L.dataTransfer.setData("text/plain",N.type);const I=m.current;I&&L.dataTransfer.setDragImage(E,I.x,I.y)}b.current?.setDragging(e,N,{x:L.clientX,y:L.clientY}),f.current.onDragStart?.(L)},_=L=>{T.clearData(),Yo=!1,b.current?.setDragging(null,null),f.current.onDragEnd?.(L)};return E.addEventListener("dragstart",C),E.addEventListener("dragend",_),()=>{E.removeEventListener("dragstart",C),E.removeEventListener("dragend",_),$d(E,Pd,!1)}},[e,n,c]),isDragging:y}}const pp={base:{"--ui-menu-row-padding-block":"ui-kd6fbz","--ui-menu-row-padding-inline":"ui-1ucplye","--ui-menu-row-gap":"ui-1fi38xd","--ui-menu-row-border-radius":"ui-1swa0pb","--ui-menu-item-left-width":"ui-1bm229x","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-so2ig8","--ui-menu-section-title-padding-inline":"ui-e020nh",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kY2c9j:"ui-fc2p8",kVAEAm:"ui-1n2onr6",kGVxlE:"ui-1gnnqk1",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",k6sLGO:"ui-1q1rmc8",k3aq6I:"ui-17dzmu4",kgyCeQ:"ui-lp1x4z",kdrBUz:"ui-7iibnf",kHBbk8:"ui-c8icb0",ktR8K2:"ui-awy1a7",kgeoSG:"ui-1cpjm7i",kEoFBp:"ui-1hmns74",kFcpXp:"ui-xx281p",kPB484:"ui-xyica1",ktNmms:"ui-wfqmlb",km8f2m:"ui-kk1bqk",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1o7vem3",kloYau:"ui-2q1x1w",$$css:!0},sizeMd:{"--ui-menu-row-padding-block":"ui-1jjxvf6","--ui-menu-row-padding-inline":"ui-18k90n9","--ui-menu-row-gap":"ui-vzyzmz","--ui-menu-item-left-width":"ui-eurstk","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-14atyw8","--ui-menu-section-title-padding-inline":"ui-mhevzc","--ui-menu-row-border-radius":"ui-s7jddj",kaIpWk:"ui-1pkpdue",$$css:!0},hasAttachment:{kWkggS:"ui-jbqb8w",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",khm7nJ:"ui-3r2rup",kP1sEF:"ui-15ozc13",kc3QkE:"ui-1h1zc6f",$$css:!0},dropIndicator:{kMeerF:"ui-1qgsegg",k3XXqK:"ui-aatb59",kjBf7l:"ui-pkz39j",kInvED:"ui-1jn6s22",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kc1e00:"ui-cfinr5",kH8aOt:"ui-14idyls",k3foIR:"ui-17mrvg7",k4zj60:"ui-1d1o5dh",ks3ayO:"ui-1ssvodr",kUfP38:"ui-gad8h8",kloYau:"ui-2q1x1w",kDVEDD:"ui-itxdhh",$$css:!0}},V9={base:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kY2c9j:"ui-cfsmg2",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kBCPoo:"ui-1273586",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kGJrpR:"ui-1mi4oqr",kysU6D:"ui-jyslct",kkrTdU:"ui-t0e3qv",kWkggS:"ui-jbqb8w",kY4cRS:"ui-lvsv26",$$css:!0}},mi={dropIndicatorSlot:{k1xSpc:"ui-jp7ctv",kfzvcC:"ui-47corl",$$css:!0},inner:{kLKAdn:"ui-12ryuzz",kwRFfy:"ui-opxd5p",kGO01o:"ui-ftabeb",kZCmMZ:"ui-1bpcb8s",k2VNRW:"ui-1aj3mmm",$$css:!0},layout:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",$$css:!0},bodyScroll:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",$$css:!0},header:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1tlft3r",kGO01o:"ui-cnij5n",kZCmMZ:"ui-tw3t59",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0},footer:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1tlft3r",kGO01o:"ui-cnij5n",kZCmMZ:"ui-tw3t59",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j",$$css:!0},layoutCard:{kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-1x78n9t",$$css:!0},attachment:{kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-1x78n9t",$$css:!0},list:{kH6xsr:"ui-3ct3a4",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-1374kml",$$css:!0},virtualizedList:{kOIVth:"ui-xhr3t",$$css:!0},virtualizedRow:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",$$css:!0},virtualizedScroller:{kzqmXN:"ui-h8yej3",kXHlph:"ui-6ikm8r",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0}},Mi={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1cy8zhl",kB7OPa:"ui-9f619",kAzted:"ui-bpgt9h",kOIVth:"ui-1kk7d6x",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kLKAdn:"ui-1xgckd",kwRFfy:"ui-yupq46",kGO01o:"ui-1mv37q2",kZCmMZ:"ui-1xc7y5k",kaIpWk:"ui-1w5zb4f",kkrTdU:"ui-1ypdohk",kWkggS:"ui-jbqb8w",$$css:!0},focused:{kWkggS:"ui-flfp0o",$$css:!0},submenuHover:{kWkggS:"ui-qjnua1",$$css:!0},selected:{kWkggS:"ui-i07v4r",$$css:!0},disabled:{kMwMTN:"ui-4b2ntj",kkrTdU:"ui-t0e3qv",$$css:!0},disabledFocused:{kWkggS:"ui-jbqb8w",$$css:!0},muted:{kMwMTN:"ui-1e4uaio",$$css:!0},mutedFocused:{kMwMTN:"ui-19aaqeu",$$css:!0},indent:{kZCmMZ:"ui-bp56qb",$$css:!0},expanded:{kWkggS:"ui-flfp0o",$$css:!0}},Ui={left:{kmuXW:"ui-2lah0s",kMwMTN:"ui-r88yfa",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1kvrb00",kZKoxP:"ui-g2ss61",$$css:!0},leftWide:{kzqmXN:"ui-1td3qas",$$css:!0},content:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",$$css:!0},right:{kmuXW:"ui-2lah0s",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kMwMTN:"ui-19aaqeu",kZKoxP:"ui-g2ss61",$$css:!0},rightDisabled:{kMwMTN:"ui-1e4uaio",$$css:!0},rightHidden:{k33iCy:"ui-lshs6z",$$css:!0},submenuRight:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-euugli",kUk6DE:"ui-98rzlu",kLWn49:"ui-1evy7pa",$$css:!0},title:{kzqmXN:"ui-h8yej3",kUk6DE:"ui-98rzlu",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},description:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj",$$css:!0}},Qo={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",$$css:!0},wrapperInline:{kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",kOIVth:"ui-ehausa",$$css:!0},title:{kMwMTN:"ui-1wd3ewq",$$css:!0},titleInline:{kzQI83:"ui-1ikap7u",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitle:{kMwMTN:"ui-4b2ntj",$$css:!0},subtitleInline:{kzQI83:"ui-gyuaek",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitleWrap:{khDVqt:"ui-eaf4i8",kXHlph:"ui-1plvlek",kORKVm:"ui-ryxfnj",kg5iWk:"ui-brixnn",$$css:!0}},Up={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-1374kml",kEbPVU:"ui-g259vi",kisVnR:"ui-141yacn",kPhN0D:"ui-xacq05",kCI4qJ:"ui-119sr6i",kflGA3:"ui-144guhz",kuQXTp:"ui-yhg72o",k8KjL7:"ui-o6llqc",k6ANuI:"ui-qapjow",kzNLci:"ui-13cyfv6",kvgbxY:"ui-449esf",kSChS3:"ui-i7iayf",kW5UhK:"ui-43qgld",kIK0UP:"ui-16isvt",kKhlpd:"ui-1s6a5gi",kWPmei:"ui-f2yixb",k1ZCP1:"ui-9ymq9g",k8vVtf:"ui-8il1zj",kXJ5VR:"ui-tv04z4",kFqVbU:"ui-al8qud",k3zOy0:"ui-bvt3p7",kYzy8m:"ui-1b3rhy7",k4QksK:"ui-azug9i",kA8bO0:"ui-p35uty",kOegPX:"ui-11nj3wz",kMHwGy:"ui-1db8ipi",kcy3WD:"ui-1xjs8pl",k1e9jE:"ui-1lnrnqe",kSTvrD:"ui-ejpia5",kvV0by:"ui-6xymf4",kysnry:"ui-1hw1hzy",$$css:!0},title:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-fp2jl6",kGO01o:"ui-cnij5n",kZCmMZ:"ui-vc46pw",kMwMTN:"ui-4b2ntj",$$css:!0},titleAction:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",$$css:!0},textAction:{kmuXW:"ui-2lah0s",kEafiO:"ui-972fbf",ke9TFa:"ui-10w94by",kt9PQ7:"ui-1qhh985",k2ei4v:"ui-14e42zd",kWkggS:"ui-jbqb8w",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-4b2ntj ui-7gh5u8",kkrTdU:"ui-1ypdohk",kaIpWk:"ui-1e1y6u3",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},W9={divider:{k1xSpc:"ui-1lliihq",kEafiO:"ui-jpjugk",kPef9Z:"ui-13fuv20",kLZC3w:"ui-14av3n6",keoZOQ:"ui-15lde7i",k71WvV:"ui-1av4zx7",k1K539:"ui-4qbr5s",keTefX:"ui-3f5ixz",kfzvcC:"ui-47corl",$$css:!0}},K9={row:{kLKAdn:"ui-fs8kq3",kwRFfy:"ui-yupq46",kGO01o:"ui-b6dno7",kZCmMZ:"ui-1xc7y5k",$$css:!0}},qy={surface:{kzqmXN:"ui-1oysuqx",kskxy:"ui-uyqlj2",kORKVm:"ui-1odjw0f",kfzvcC:"ui-67bb7w",k5wCbM:"ui-1597r2g",k6w4Gs:"ui-xkn5u1",$$css:!0},surfaceMedium:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-y2m5lo",$$css:!0},surfaceWide:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-c74ic2",$$css:!0}},qp={empty:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-t1q3vd",kGO01o:"ui-cnij5n",kZCmMZ:"ui-8fiw5y",kMwMTN:"ui-4b2ntj",k9WMMc:"ui-2b8uid",$$css:!0},emptyIndent:{kZCmMZ:"ui-14o0yop",$$css:!0},loading:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-ehausa",kLKAdn:"ui-13ly8rp",kwRFfy:"ui-t1q3vd",kGO01o:"ui-1xlntvz",kZCmMZ:"ui-8fiw5y",kMwMTN:"ui-4b2ntj",$$css:!0},loadingSpinner:{k44tkh:"ui-1s1fvk8",$$css:!0}};function Y9(e,t=!1){return[$N,pp.base,Fi.root,e==="md"&&pp.sizeMd,t&&pp.hasAttachment]}function X9(e=!1){return e&&pp.dropIndicator}function Z9(){return V9.base}function Q9(){return mi.inner}function J9(){return mi.dropIndicatorSlot}function eU(e=!1){return[mi.layout,e&&mi.layoutCard,e&&Rh.border]}function tU(){return[mi.attachment,Rh.border]}function fO(){return mi.bodyScroll}function nU(){return mi.header}function rU(){return mi.footer}function iU(e=!1){return[mi.list,e&&mi.virtualizedList]}function sU(){return mi.virtualizedRow}function oU(){return mi.virtualizedScroller}function _x(e={}){return[Mi.base,e.selected&&Mi.selected,e.inSubmenu&&!e.disabled&&Mi.submenuHover,e.focused&&Mi.focused,e.expanded&&Mi.expanded,e.disabled&&Mi.disabled,e.disabled&&e.focused&&Mi.disabledFocused,e.variant==="muted"&&Mi.muted,e.variant==="muted"&&e.focused&&Mi.mutedFocused,e.indent&&Mi.indent]}const aU={disabled:{kkrTdU:"ui-1h6gzvc",$$css:!0}};function lU(){return aU.disabled}function uU(e={}){return[Ui.left,e.wideLeft&&Ui.leftWide]}function cU(){return Ui.content}function fU(e={}){return[Ui.right,e.disabled&&Ui.rightDisabled,e.trailingHidden&&Ui.rightHidden]}function dU(){return Ui.submenuRight}function pU(){return Ui.wrapper}function hU(){return[Ll.root,Ui.title]}function mU(){return[Gi.root,Ll.root,Ui.description]}function gU(e){return[Qo.wrapper,e&&Qo.wrapperInline]}function bU(e){return[Ll.root,Qo.title,e&&Qo.titleInline]}function yU({inline:e,wrap:t}){return[Gi.root,Ll.root,Qo.subtitle,e&&Qo.subtitleInline,t&&Qo.subtitleWrap]}function vU(){return K9.row}function xU(){return Up.wrapper}function kU(e){return[Gi.root,Up.title,e&&Up.titleAction]}function SU(){return Up.textAction}function wU(){return W9.divider}function Nx(){return qy.surface}function dO(e){switch(e){case"default":return;case"medium":return qy.surfaceMedium;case"wide":return qy.surfaceWide;default:return e}}function EU(e){return[Gi.root,qp.empty,e&&qp.emptyIndent]}function TU(){return[Fi.root,qp.loading]}function RU(){return qp.loadingSpinner}const pO=v.createContext(null);function ef(e){const t=v.useContext(pO);if(!t)throw new Error(`${e} must be used within LegacyMenu.Content or LegacyMenu.SubMenuContent`);return t}function hO({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1}){const c=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l}),[t,n,r,s,a,l]);return g.jsx(pO.Provider,{value:c,children:e})}const mO=v.createContext(void 0);function Ph(e){const t=v.useContext(mO);if(t===void 0&&!e)throw new Error(Nn(72));return t}const CU={...V_,disabled:et(e=>e.disabled),instantType:et(e=>e.instantType),isInstantPhase:et(e=>e.isInstantPhase),trackCursorAxis:et(e=>e.trackCursorAxis),disableHoverablePopup:et(e=>e.disableHoverablePopup),lastOpenChangeReason:et(e=>e.openChangeReason),closeOnClick:et(e=>e.closeOnClick),closeDelay:et(e=>e.closeDelay),hasViewport:et(e=>e.hasViewport)};class Ax extends Qv{constructor(t,n,r=!1){const s=new yh,a={..._U(),...t};a.floatingRootContext=H_(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s},CU)}setOpen=(t,n)=>{z_(this,t,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,xt(Ml,t))}static useStore(t,n){return L_(t,(s,a)=>new Ax(n,s,a)).store}}function _U(){return{...q_(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const NU=Zv(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:d,onOpenChangeComplete:f,handle:h,triggerId:m,defaultTriggerId:b=null,children:y}=t,k=Ax.useStore(h?.store,{open:r,openProp:s,activeTriggerId:b,triggerIdProp:m});P_(k,s,r,b),k.useControlledProp("openProp",s),k.useControlledProp("triggerIdProp",m),k.useContextCallback("onOpenChange",d),k.useContextCallback("onOpenChangeComplete",f);const S=k.useState("open"),E=!n&&S,R=k.useState("activeTriggerId"),T=k.useState("mounted"),C=k.useState("payload");k.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),k.useSyncedValue("disabled",n),B_(k,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:_,transitionStatus:L}=F_(E,k),N=k.useState("isInstantPhase"),A=k.useState("instantType"),$=k.useState("lastOpenChangeReason"),z=v.useRef(null);Ge(()=>{S&&n&&k.setOpen(!1,xt(GC))},[S,n,k]),Ge(()=>{L==="ending"&&$===Ei||L!=="ending"&&N?(A!=="delay"&&(z.current=A),k.set("instantType","delay")):z.current!==null&&(k.set("instantType",z.current),z.current=null)},[L,N,$,A,k]),Ge(()=>{E&&R==null&&k.set("payload",void 0)},[k,R,E]);const I=v.useCallback(()=>{k.setOpen(!1,xt(vp))},[k]);v.useImperativeHandle(c,()=>({unmount:_,close:I}),[_,I]);const Y=E||T||!n&&l!=="none";return g.jsxs(mO.Provider,{value:k,children:[Y&&g.jsx(AU,{store:k,disabled:n,trackCursorAxis:l}),typeof y=="function"?y({payload:C}):y]})});function AU({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),s=Hv(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=oP(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),l=v.useMemo(()=>Pi(a.reference,s.reference),[a.reference,s.reference]),c=v.useMemo(()=>Pi(a.trigger,s.trigger),[a.trigger,s.trigger]),d=v.useMemo(()=>Pi(Jv,a.floating,s.floating),[a.floating,s.floating]);return U_(e,{activeTriggerProps:l,inactiveTriggerProps:c,popupProps:d}),null}const OU=v.createContext(void 0);function MU(){return v.useContext(OU)}let IU=(function(e){return e[e.popupOpen=yp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const DU=600,gO="data-base-ui-tooltip-trigger";function rT(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const s=n[r];if(ft(s))return s}}const t=e.target;return ft(t)?t:null}function jU(e){let t=e;for(;t;){if(t.hasAttribute(gO))return t;const n=t.parentElement;if(n){t=n;continue}const r=t.getRootNode();t="host"in r&&ft(r.host)?r.host:null}return null}const LU=I_(function(t,n){const{render:r,className:s,style:a,handle:l,payload:c,disabled:d,delay:f,closeOnClick:h=!0,closeDelay:m,id:b,...y}=t,k=Ph(!0),S=l?.store??k;if(!S)throw new Error(Nn(82));const E=Il(b),R=S.useState("isTriggerActive",E),T=S.useState("isOpenedByTrigger",E),C=S.useState("floatingRootContext"),_=v.useRef(null),L=f??DU,N=m??0,{registerTrigger:A,isMountedByThisTrigger:$}=$_(E,_,S,{payload:c,closeOnClick:h,closeDelay:N}),z=MU(),{delayRef:I,isInstantPhase:Y,hasProvider:H}=w2(C,{open:T}),q=nx(C);S.useSyncedValue("isInstantPhase",Y);const D=S.useState("disabled"),F=d??D,U=_n(F),W=S.useState("trackCursorAxis"),B=S.useState("disableHoverablePopup"),K=v.useRef(!1),O=pi(),P=v.useRef(void 0);function V(){const oe=z?.delay,ye=typeof I.current=="object"?I.current.open:void 0;let Se=L;return H&&(ye!==0?Se=f??oe??L:Se=0),Se}function j(oe){const ye=_.current;if(!ye||!oe)return!1;const Se=jU(oe);return Se!==null&&Se!==ye&&dt(ye,Se)}function Z(oe){const ye=j(oe);return K.current=ye,ye&&(q.openChangeTimeout.clear(),q.restTimeout.clear(),q.restTimeoutPending=!1,O.clear()),ye}const te=Z_(C,{enabled:!F,mouseOnly:!0,move:!1,handleClose:!B&&W!=="both"?Q_():null,restMs:V,delay(){const oe=typeof I.current=="object"?I.current.close:void 0;let ye=N;return m==null&&H&&(ye=oe),{close:ye}},triggerElementRef:_,isActiveTrigger:R,isClosing:()=>S.select("transitionStatus")==="ending",shouldOpen(){return!K.current}}),se=K_(C,{enabled:!F}).reference,ue=oe=>{const ye=K.current,Se=rT(oe),Oe=Z(Se),we=_.current,ke=we&&Se&&dt(we,Se);if(Oe&&S.select("open")&&S.select("lastOpenChangeReason")===yr){S.setOpen(!1,xt(yr,oe));return}if(ye&&!Oe&&ke&&!U.current&&!S.select("open")&&we&&ta(P.current)){const De=()=>{!K.current&&!U.current&&!S.select("open")&&S.setOpen(!0,xt(yr,oe,we))},Me=V();Me===0?(O.clear(),De()):O.start(Me,De)}},le=S.useState("triggerProps",$);return mn("button",t,{state:{open:T},ref:[n,A,_],props:[te,se,$||W!=="none"?le:void 0,{onMouseOver(oe){ue(oe.nativeEvent)},onFocus(oe){j(rT(oe.nativeEvent))&&oe.preventBaseUIHandler()},onMouseLeave(){K.current=!1,O.clear(),P.current=void 0},onPointerEnter(oe){P.current=oe.pointerType},onPointerDown(oe){P.current=oe.pointerType,S.set("closeOnClick",h),h&&!S.select("open")&&S.cancelPendingOpen(oe.nativeEvent)},onClick(oe){h&&!S.select("open")&&S.cancelPendingOpen(oe.nativeEvent)},id:E,[IU.triggerDisabled]:F?"":void 0,[gO]:F?void 0:""},y],stateAttributesMapping:FC})}),bO=v.createContext(void 0);function zU(){const e=v.useContext(bO);if(e===void 0)throw new Error(Nn(70));return e}const PU=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Ph().useState("mounted")||r?g.jsx(bO.Provider,{value:r,children:g.jsx(MA,{ref:n,...s})}):null}),yO=v.createContext(void 0);function $U(){const e=v.useContext(yO);if(e===void 0)throw new Error(Nn(71));return e}const BU=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:E=f_,style:R,...T}=t,C=Ph(),_=zU(),L=C.useState("open"),N=C.useState("mounted"),A=C.useState("trackCursorAxis"),$=C.useState("disableHoverablePopup"),z=C.useState("floatingRootContext"),I=C.useState("instantType"),Y=C.useState("transitionStatus"),H=C.useState("hasViewport"),q=px({anchor:a,positionMethod:l,floatingRootContext:z,mounted:N,side:c,sideOffset:f,align:d,alignOffset:h,collisionBoundary:m,collisionPadding:b,sticky:k,arrowPadding:y,disableAnchorTracking:S,keepMounted:_,collisionAvoidance:E,adaptiveOrigin:H?AN:void 0}),D=v.useMemo(()=>({open:L,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:A!=="none"?"tracking-cursor":I}),[L,q.side,q.align,q.anchorHidden,A,I]),F=hx(t,D,{styles:q.positionerStyles,transitionStatus:Y,props:T,refs:[n,C.useStateSetter("positionerElement")],hidden:!N,inert:!L||A==="both"||$});return g.jsx(yO.Provider,{value:q,children:F})}),FU={...Uc,...go},UU=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=Ph(),{side:d,align:f}=$U(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext"),S=c.useState("disabled"),E=c.useState("closeDelay");xo({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),X_(k,{enabled:!S,closeDelay:E});const R=c.useStateSetter("popupElement");return mn("div",t,{state:{open:h,side:d,align:f,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,R],props:[y,wh(b),l],stateAttributesMapping:FU})}),qU=v.createContext(null),HU={base:{kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",$$css:!0}},vO=v.createContext(null);function xO(e){const t=v.use(vO);if(t===null)throw new Error(`${e} must be used within Tooltip.Root`);return t}function kO({children:e,placement:t=Ch,offset:n=8,openDelay:r=gx,closeDelay:s=_h,disabled:a=!1,defaultOpen:l,open:c,sameAxisOnly:d=!1,onOpenChange:f,onOpenChangeComplete:h}){const m=v.use(qU),b=v.use(Bp),y=a||b,k=m?.open??r,S=m?.close??s,E=v.useMemo(()=>({disabled:y,instantDismiss:b,offset:n,placement:t,sameAxisOnly:d,triggerCloseDelay:S,triggerDelay:k}),[y,b,n,t,d,S,k]);return g.jsx(vO.Provider,{value:E,children:g.jsx(NU,{defaultOpen:l,disabled:y,disableHoverablePopup:!0,onOpenChange:f,onOpenChangeComplete:h,open:c,children:e})})}function SO({children:e,ref:t,...n}){const{disabled:r,triggerCloseDelay:s,triggerDelay:a}=xO("Tooltip.Trigger"),l=e.props?.id;return g.jsx(LU,{...n,closeDelay:s,delay:a,disabled:r,id:l??n.id,ref:t,render:e})}function wO({content:e,anchor:t,ariaLabel:n,width:r,minWidth:s,maxWidth:a}){const{instantDismiss:l,offset:c,placement:d,sameAxisOnly:f}=xO("Tooltip.Popup"),h=fa(),{side:m,align:b,sideOffset:y,alignOffset:k,collisionAvoidance:S,positionMethod:E}=Nh(d,c,f),R=Th(j6),T=Lt(mx,PN,L6,HU.base,Eh);return l?null:g.jsx(PU,{container:h??void 0,children:g.jsx(BU,{align:b,alignOffset:k,anchor:t,className:R.className,collisionAvoidance:S,collisionPadding:8,positionMethod:E,side:m,sideOffset:y,style:R.style,children:g.jsx(UU,{"aria-label":n,className:T.className,"data-component":"tooltip-popup",role:"tooltip",style:r===void 0&&s===void 0&&a===void 0?T.style:{...T.style,width:r,minWidth:s,maxWidth:a},children:typeof e=="function"?e():e})})})}function GU({children:e,anchor:t,"aria-label":n,width:r,minWidth:s,maxWidth:a}){return g.jsx(wO,{anchor:t,ariaLabel:n,content:e,maxWidth:a,minWidth:s,width:r})}function Hy({children:e,content:t,placement:n,offset:r,openDelay:s,closeDelay:a,disabled:l,defaultOpen:c,open:d,"aria-label":f,width:h,minWidth:m,maxWidth:b,sameAxisOnly:y,onOpenChange:k,onOpenChangeComplete:S,ref:E,...R}){const T=v.Children.only(e);return v.isValidElement(T)?g.jsxs(kO,{closeDelay:a,defaultOpen:c,disabled:l,offset:r,onOpenChange:k,onOpenChangeComplete:S,open:d,openDelay:s,placement:n,sameAxisOnly:y,children:[g.jsx(SO,{...R,ref:E,children:T}),g.jsx(wO,{ariaLabel:f,content:t,maxWidth:b,minWidth:m,width:h})]}):g.jsx(g.Fragment,{children:e})}(function(e){e.Root=kO,e.Trigger=SO,e.Popup=GU})(Hy||(Hy={}));const VU="ui-menu",Ox="ui-menu__backdrop",WU="ui-menu__list",KU="ui-menu__content",YU="ui-menu__drop-indicator-slot",XU="ui-menu__layout",EO="ui-menu__body-scroll",ZU="ui-menu__header",QU="ui-menu__footer",JU="ui-menu__attachment",e5="ui-menu__row",t5="ui-menu__item-left",n5="ui-menu__item-content",r5="ui-menu__item-right",i5="ui-menu__item-wrapper",s5="ui-menu__item-title",o5="ui-menu__item-description",a5="ui-menu__text-wrapper",l5="ui-menu__title",u5="ui-menu__subtitle",c5="ui-menu__search-row",f5="ui-menu__section",d5="ui-menu__section-title",p5="ui-menu__section-text-action",h5="ui-menu__virtualized-section-divider",m5="ui-menu__submenu-trigger",g5="ui-menu__submenu-right-section",b5="ui-menu__toggle-row",y5="ui-menu__tooltip",v5="ui-menu__empty",x5="ui-menu__loading",k5="ui-menu__loading-spinner",S5="ui-menu__virtualized-row",w5="ui-menu__virtualized-scroller";function en(e,t,n={}){return Kt({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function Mx({className:e,hasDropIndicator:t=!1,size:n,style:r,hasAttachment:s=!1,surfaceStyle:a}){return a=[X9(t),a],en(VU,[Y9(n,s),a],{className:e,style:r})}function TO(e){return en(Ox,Z9(),{style:e})}function Ix(e=!1,t){return en(WU,[iU(e),t],{className:e?"ui-menu__list--virtualized":void 0})}function Dx(e){return en(KU,[Q9(),e])}function E5(){return en(YU,J9())}function jx(e,t=!1,n){return en(XU,[eU(t),n],{style:e})}function T5(){return en(JU,tU())}function Lx(){return en(ZU,nU())}function zx(){return en(QU,rU())}function Px(e={},t){return en(e5,[{"ui--default-marker":"ui--default-marker",$$css:!0},_x(e),t],{className:e.className})}function R5(e={},t){return en(b5,[_x(e),e.disabled&&lU(),t],{className:e.className})}function C5(e={}){return en(m5,_x(e),{className:e.className})}function _5(e={},t){return en(t5,[uU(e),t])}function N5(e){return en(n5,[cU(),e])}function A5(e={},t){return en(r5,[fU(e),t])}function $x(){return en(i5,pU())}function Bx(){return en(s5,hU())}function Fx(){return en(o5,mU())}function O5(e){return en(a5,gU(e))}function M5(e){return en(l5,bU(e))}function I5({inline:e,wrap:t}){return en(u5,yU({inline:e,wrap:t}))}function D5(e,t){return en(c5,[vU(),t],{className:e})}function j5(e){return en(f5,[xU(),e])}function RO(e,t){return en(d5,[kU(e),t])}function L5(){return en(p5,SU())}function z5(){return en(h5,wU())}function P5(){return en(g5,dU())}function $5(e,t){return en(v5,[EU(e),t])}function B5(){return en(x5,TU())}function F5(){return en(S5,sU())}function U5(){return en(w5,oU())}const q5=en(k5,RU()).className,Hp="submenuOpenChange",Ux=v.createContext(null);function qx(e){return Math.max(e,_h)}function Hx(){return v.use(Ux)}function Gx({children:e,layerNodeId:t,placement:n="right-start"}){const r=So(),[s,a]=v.useState(new Set);v.useEffect(()=>{if(!r)return;const d=f=>{f.parentId===t&&a(h=>{const m=new Set(h);return f.isOpen?m.add(f.nodeId):m.delete(f.nodeId),m})};return r.events.on(Hp,d),()=>{r.events.off(Hp,d)}},[r,t]);const l=s.size>0,c=v.useMemo(()=>({hasOpenChild:l}),[l]);return g.jsx(Ux.Provider,{value:c,children:g.jsx(Sc,{offset:6,placement:n,sameAxisOnly:!0,children:e})})}function H5({content:e,surfaceStyle:t}){return g.jsx(Sc.Popup,{surfaceClassName:y5,surfaceStyle:[Nx(),t],children:typeof e=="function"?e():e})}function CO({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=v.use(Ux);return c==null?g.jsx(g.Fragment,{children:e}):g.jsx(Sc.Trigger,{closeDelay:qx(a),content:g.jsx(H5,{content:t,surfaceStyle:l}),contentKey:n,openDelay:s,disabled:r||c.hasOpenChild,children:e})}function G5(e,t){const n=So(),r=ko();v.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(Hp,s),()=>{t&&n.events.emit(Hp,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}function tf({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return Hx()!=null?g.jsx(CO,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):l?g.jsx($A,{closeDelay:qx(a),content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:[Nx(),c],children:e}):g.jsx(Hy,{closeDelay:a,content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,children:e})}function Cl({children:e,disabled:t=!1,leading:n,trailing:r,rightFallback:s,trailingAccessory:a,trailingHidden:l=!1,wideLeft:c=!1,leadingStyle:d,contentStyle:f,trailingStyle:h}){const m=r??s,b=m!=null||a!=null,y=_5({wideLeft:c},d),k=N5(f),S=A5({disabled:t,trailingHidden:l},h);return g.jsxs(Cs,{iconSize:"base",children:[n!=null?g.jsx("span",{className:y.className,style:y.style,"data-component":"menu-item-left",children:n}):null,g.jsx("div",{className:k.className,style:k.style,"data-component":"menu-item-content",children:e}),b?g.jsxs("span",{className:S.className,style:S.style,"data-component":"menu-item-right",children:[m,a]}):null]})}const _O=v.createContext(!1);function nf(){return v.useContext(_O)}const $h=v.createContext(null);function Bh(e){const t=v.useContext($h);if(!t)throw new Error(`${e} must be used within LegacyMenu.SubMenu`);return t}function V5(){return Bh("LegacyMenu.SubMenu.useContext")}function Vx(){const e=v.useContext($h),{setIsOpen:t,dismissCauseRef:n}=uO();return v.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function Wx(e,t,n){const{searchValue:r}=ef(n);return t||!r||!e?!0:e.toLowerCase().includes(r.toLowerCase())}const W5=cO("@@menu-item-noop"),K5=new W5({}),NO=v.createContext(null);function Y5(){return v.useContext(NO)}function AO({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return Wx(s,n,"LegacyMenu.Item")?g.jsx(OO,{...r,contextPart:"LegacyMenu.Item",itemLabel:s,children:e}):null}function OO({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:d,onKeyDown:f,leading:h,trailing:m,tooltip:b,tooltipDisabled:y=!1,tooltipOpenDelay:k=0,tooltipCloseDelay:S=0,tooltipSurface:E="default",closeOnSelect:R,description:T,rootStyle:C,leadingStyle:_,contentStyle:L,trailingStyle:N,variant:A="default",trailingVisibility:$="always",selected:z=!1,radioChecked:I,indent:Y=!1,wideLeftSection:H=!1,draggable:q,ref:D,itemLabel:F,referenceRef:U,itemPropsTransform:W,trailingAccessory:B,contextPart:K}){const{activeIndex:O,setIsOpen:P,getItemProps:V,closeOnSelect:j,virtualFocus:Z}=ef(K),{shouldAllowPointerInteraction:te}=Wi(K),se=nf(),ue=Vx(),le=Jc(),fe=Ci(),ge=le==="body",_e=R??j??!0,{ref:oe,index:ye}=Oh({label:F||null}),Se=O===ye,[Oe,we]=v.useState(!1);Hx();const ke=v.useRef(null),De=v.useId(),Me=q!=null,je=q?.mode==="pointer",He=v.useSyncExternalStore(fi.subscribe,fi.isDragActive,fi.isDragActive),be=v.useRef(null),Re=v.useRef(null),ee=v.useRef(null),ce=v.useRef(null),J=v.useRef(!1),[re,xe]=v.useState(null),{ref:$e,isDragging:Xe}=G9({id:q?.id??`menu-item-${De}`,data:q?.data??K5,disabled:!Me||je||(q?.disabled??!1),dragImageOffset:q?.dragImageOffset,onDragStart:q?.onDragStart,onDragEnd:q?.onDragEnd}),Ye=Kc([oe,U,D,Me&&!je?$e:null]),ht=v.useCallback(Be=>{ke.current=Be},[]),Qe=v.useMemo(()=>({setSubMenuOpen:we,isSubMenuOpen:Oe,registerSubMenuOpener:ht}),[Oe,ht]),yt=dO(E);v.useEffect(()=>()=>{be.current?.(),ee.current!=null&&cancelAnimationFrame(ee.current)},[]);const kt=v.useCallback(()=>{ee.current=null;const Be=Re.current,Rt=ce.current;!Be||!Rt||(Be.style.transform=`translate3d(${Rt.x+8}px, ${Rt.y+8}px, 0)`)},[]),nt=v.useCallback(Be=>{ce.current=Be,ee.current==null&&(ee.current=requestAnimationFrame(kt))},[kt]),Tt=v.useCallback(Be=>{Re.current=Be,kt()},[kt]),_t=()=>{if(a)return;const Be={defaultPrevented:!1,preventDefault:()=>{Be.defaultPrevented=!0}};d?.(Be),_e&&!Be.defaultPrevented&&ue(P)},st=Be=>{if(J.current){J.current=!1,Be.preventDefault(),Be.stopPropagation();return}if(!te(Be.nativeEvent)){Be.preventDefault(),Be.stopPropagation();return}_t()},vt=v.useCallback(Be=>{if(!te(Be.nativeEvent)){Be.preventDefault(),Be.stopPropagation();return}if(l?.(Be),!Be.defaultPrevented){if(je&&q!=null&&!q.disabled&&Be.button===0){be.current?.();const Rt=fi.getInstance(),wt=Be.currentTarget,$t={clientX:Be.clientX,clientY:Be.clientY,isDragging:!1},Rn=()=>{document.removeEventListener("mousemove",Lr,!0),document.removeEventListener("mouseup",zr,!0),ee.current!=null&&(cancelAnimationFrame(ee.current),ee.current=null),ce.current=null,be.current=null,Rt.clearData(),setTimeout(()=>{J.current=!1},0)},Lr=Sn=>{const ba=Sn.clientX-$t.clientX,Yi=Sn.clientY-$t.clientY;if(!(!$t.isDragging&&Math.hypot(ba,Yi)<4)){if(!$t.isDragging){$t.isDragging=!0,J.current=!0,Rt.setData(q.data);const Eo=wt.getBoundingClientRect().width;nt({x:Sn.clientX,y:Sn.clientY}),xe(Eo),q.onPointerDragStart?.(Sn)}Sn.preventDefault(),nt({x:Sn.clientX,y:Sn.clientY}),q.onPointerDragMove?.(Sn)}},zr=Sn=>{if(!$t.isDragging){Rn();return}Sn.preventDefault(),xe(null),q.onPointerDragEnd?.(Sn),Rn()};be.current=Rn,document.addEventListener("mousemove",Lr,!0),document.addEventListener("mouseup",zr,!0)}Z&&!Me&&Be.preventDefault()}},[q,Me,je,l,nt,te,Z]),Dt=v.useCallback(Be=>{if(!te(Be.nativeEvent)){Be.preventDefault(),Be.stopPropagation();return}c?.(Be)},[c,te]),At=V({onClick:st,onKeyDown:Be=>{a||(f?.(Be),!Be.defaultPrevented&&((Be.key==="Enter"||Be.key===" ")&&(Be.preventDefault(),Be.stopPropagation(),_t()),Pl(Be.key,fe)==="end"&&ke.current&&(Be.preventDefault(),Be.stopPropagation(),ke.current())))},onMouseDown:vt,onAuxClick:Dt}),X=W?.(At)??At,he=m!=null?g.jsx(NO.Provider,{value:Qe,children:m}):void 0,Le=$x(),Ze=Bx(),St=Fx(),at=T!=null?g.jsxs("div",{className:Le.className,style:Le.style,children:[g.jsx("div",{className:Ze.className,style:Ze.style,children:e}),g.jsx("div",{className:St.className,style:St.style,"data-component":"menu-item-description",children:T})]}):e,qe=y||He||Oe,Ee=$==="focused"&&(He||!Se),Ue=Px({disabled:a,expanded:r===!0,focused:!He&&Se,indent:Y,inSubmenu:se,selected:z,variant:A},C),ze={role:I===void 0?"menuitem":"menuitemradio",tabIndex:Se?0:-1,...I!==void 0?{"aria-checked":I}:{},...n!==void 0?{"aria-haspopup":n}:{},...r!==void 0?{"aria-expanded":r}:{},"aria-disabled":a||void 0,"data-component":"menu-row","data-expanded":r===!0||void 0,draggable:je?!1:void 0,"data-disabled":a||void 0,"data-focused":!He&&Se?!0:void 0,"data-menu-draggable":Me||void 0,"data-selected":z||void 0,"data-has-description":T!=null||void 0,"data-variant":A!=="default"?A:void 0,"data-indent":Y||void 0,"data-wide-left":H||void 0,"data-dragging":Xe||re!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[zl]:le,className:Ue.className,style:Ue.style,...X},Ne={className:"ui-u96u03 ui-47corl ui-ixxii4 ui-13vifvy ui-u1ixa1 ui-1so62im ui-18ivbjn"},Ie=re!=null&&q?.preview!=null?Ri.createPortal(g.jsx("div",{"aria-hidden":"true",ref:Tt,className:Ne.className,style:{...Ne.style,width:re},children:q.preview}),document.body):null,ut=ge?g.jsxs("li",{ref:Ye,...ze,children:[g.jsx(Cl,{disabled:a,leading:h,trailing:he,trailingAccessory:B,trailingHidden:Ee,wideLeft:H,leadingStyle:_,contentStyle:L,trailingStyle:N,children:at}),Ie]}):g.jsxs("div",{ref:Ye,...ze,children:[g.jsx(Cl,{disabled:a,leading:h,trailing:he,trailingAccessory:B,trailingHidden:Ee,wideLeft:H,leadingStyle:_,contentStyle:L,trailingStyle:N,children:at}),Ie]});return b!=null?g.jsx(tf,{closeDelay:S,content:qe?null:b,disabled:qe,openDelay:k,surfaceStyle:yt,children:ut}):ut}const MO=v.createContext(null);function IO(e){const t=v.useContext(MO);if(!t)throw new Error(`${e} must be used within LegacyMenu.ExpandableSection`);return t}function X5({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=v.useState(t),l=n!==void 0,c=l?n:s,d=h=>{l||a(h),r?.(h)},f=()=>d(!c);return g.jsx(MO.Provider,{value:{expanded:c,setExpanded:d,toggle:f},children:e})}function Z5({children:e,contentStyle:t,leading:n,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c}){const{expanded:d,setExpanded:f,toggle:h}=IO("LegacyMenu.ExpandableSectionTrigger"),m=Ci(),b=typeof n=="function"?n(d):n,y=k=>{const S=Pl(k.key,m);if(S==="end"&&!d){k.preventDefault(),k.stopPropagation(),f(!0);return}S==="start"&&d&&(k.preventDefault(),k.stopPropagation(),f(!1))};return g.jsx(AO,{closeOnSelect:!1,contentStyle:t,wideLeftSection:!0,leading:b,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c??(typeof e=="string"?e:void 0),onKeyDown:y,onSelect:h,children:e})}function Q5({children:e}){const{expanded:t}=IO("LegacyMenu.ExpandableSectionContent");return t?g.jsx(g.Fragment,{children:e}):null}function J5({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return Wx(s,n,"LegacyMenu.CheckboxItem")?g.jsx(eq,{...r,itemLabel:s,children:e}):null}function eq({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:d,tooltipOpenDelay:f=0,tooltipCloseDelay:h=0,tooltipSurface:m="default",closeOnSelect:b,itemLabel:y,rootStyle:k,contentStyle:S,trailingStyle:E}){const{activeIndex:R,getItemProps:T,setIsOpen:C,closeOnSelect:_}=ef("LegacyMenu.CheckboxItem"),{shouldAllowPointerInteraction:L}=Wi("LegacyMenu.CheckboxItem"),N=nf(),A=Vx(),$=Jc(),z=$==="body",I=b??_??!1,[Y,H]=v.useState(r),q=n!==void 0,D=q?n:Y,{ref:F,index:U}=Oh({label:y||null}),W=R===U,B=Hx(),K=dO(m),O=v.useCallback(()=>{if(a)return;const Oe=!D;q||H(Oe);const we={defaultPrevented:!1,preventDefault:()=>{we.defaultPrevented=!0}};s?.(Oe,we),I&&!we.defaultPrevented&&A(C)},[a,D,q,s,I,C,A]),P=v.useCallback(Oe=>{if(!L(Oe.nativeEvent)){Oe.preventDefault(),Oe.stopPropagation();return}Oe.preventDefault(),Oe.stopPropagation(),O()},[O,L]),V=v.useCallback(Oe=>{a||(Oe.key==="Enter"||Oe.key===" ")&&(Oe.preventDefault(),Oe.stopPropagation(),O())},[a,O]),j=T({onClick:P,onKeyDown:V}),Z=c!=null,te=Px({disabled:a,focused:W,inSubmenu:N},k),se={role:"menuitemcheckbox","aria-checked":D,tabIndex:W?0:-1,"aria-disabled":a||void 0,"data-checked":D||void 0,"data-component":"menu-row","data-disabled":a||void 0,"data-focused":W||void 0,"data-has-description":Z||void 0,...t?{"data-testid":t}:{},[zl]:$,className:te.className,style:te.style,...j},ue=g.jsx(xN,{checked:D,disabled:a}),le=$x(),fe=Bx(),ge=Fx(),_e=Z?g.jsxs("div",{className:le.className,style:le.style,children:[g.jsx("div",{className:fe.className,style:fe.style,children:e}),g.jsx("div",{className:ge.className,style:ge.style,"data-component":"menu-item-description",children:c})]}):e,oe=g.jsx(Cl,{disabled:a,leading:ue,trailing:l,contentStyle:S,trailingStyle:E,children:_e}),ye=d!=null&&B!=null,Se=z?g.jsx("li",{ref:F,...se,children:oe}):g.jsx("div",{ref:F,...se,children:oe});return ye?g.jsx(CO,{closeDelay:h,content:d,openDelay:f,surfaceStyle:K,children:Se}):d!=null?g.jsx($A,{content:d,placement:"right",offset:6,openDelay:f,closeDelay:qx(h),sameAxisOnly:!0,surfaceStyle:[Nx(),K],children:Se}):Se}function qb(e,t){if(!t?.length||!e.dataTransfer)return!1;for(const n of e.dataTransfer.types)for(const r of t)if(n.toLowerCase()===r.toLowerCase())return!0;return!1}function tq(e,t){const n=e.relatedTarget;if(n!==null&&t.contains(n))return!1;const r=t.defaultView;return r?e.clientX<=0||e.clientY<=0||e.clientX>=r.innerWidth||e.clientY>=r.innerHeight:!0}function nq(e){const{accept:t,disabled:n=!1,acceptNativeTypes:r,onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c}=e,d=v.useRef(null),f=v.useRef(null),h=v.useRef(0),m=v.useRef(null),[b,y]=v.useState(!1),[k,S]=v.useState(!1),E=v.useRef(b);E.current=b;const R=v.useCallback(()=>{h.current=0,y(!1),S(!1)},[]),T=v.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)},[]);v.useEffect(()=>{if(!b)return;const A=f.current?.ownerDocument??document,$=()=>{T(),R()};return A.addEventListener("mousemove",$,!0),()=>{A.removeEventListener("mousemove",$,!0)}},[b,T,R]);const C=v.useRef({onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c});C.current={onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c};const _=v.useRef(r);_.current=r;const L=v.useRef(Array.isArray(t)?t:[t]);L.current=Array.isArray(t)?t:[t];const N=v.useCallback(A=>{if(f.current=A,d.current&&(d.current(),d.current=null),h.current=0,A!==null&&(y(!1),S(!1)),!A||n)return;const $=fi.getInstance(),z=B=>{if(h.current++,h.current===1){y(!0);const K=L.current,O=!n&&$.hasAnyClass(K),P=O||!n&&qb(B,_.current);S(P);const V=O?$.getValidatedData(K):null;C.current.onDragEnter?.(B,V)}},I=B=>{h.current=Math.max(0,h.current-1),h.current===0&&(T(),R(),C.current.onDragLeave?.(B))},Y=B=>{const K=L.current,O=!n&&$.hasAnyClass(K),P=!O&&!n&&qb(B,_.current);if(O||P){if(B.preventDefault(),B.dataTransfer&&(B.dataTransfer.dropEffect=O?"move":"copy"),h.current===0){h.current=1,y(!0),S(!0);const V=O?$.getValidatedData(K):null;C.current.onDragEnter?.(B,V)}if(C.current.onDragOver&&m.current===null){const V=O?$.getValidatedData(K):null;m.current=requestAnimationFrame(()=>{m.current=null,C.current.onDragOver?.(B,V)})}}},H=B=>{B.preventDefault(),T(),R();const K=L.current;if($.hasAnyClass(K)){const O=$.getValidatedData(K),{onDrop:P}=C.current;P&&(P(B,O),B.stopPropagation())}else if(qb(B,_.current)){const{onDrop:O}=C.current;O&&(O(B,null),B.stopPropagation())}};A.addEventListener("dragenter",z),A.addEventListener("dragleave",I),A.addEventListener("dragover",Y),A.addEventListener("drop",H);const q=A.ownerDocument,D=()=>{(h.current!==0||E.current)&&(T(),R())},F=()=>D(),U=()=>D(),W=B=>{tq(B,q)&&D()};q.addEventListener("drop",F,!0),q.addEventListener("dragend",U,!0),q.addEventListener("dragleave",W,!0),d.current=()=>{A.removeEventListener("dragenter",z),A.removeEventListener("dragleave",I),A.removeEventListener("dragover",Y),A.removeEventListener("drop",H),q.removeEventListener("drop",F,!0),q.removeEventListener("dragend",U,!0),q.removeEventListener("dragleave",W,!0),m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)}},[n,R,T]);return v.useEffect(()=>()=>{d.current&&(d.current(),d.current=null)},[]),{ref:N,isOver:b,canDrop:k,isDropBlocked:b&&!k}}const rq=cO("@@menu-content-noop");function iq({children:e,header:t,footer:n,attachment:r,"aria-label":s,"data-testid":a,className:l,surfaceStyle:c,contentStyle:d,layoutStyle:f,listStyle:h,scrollAreaStyles:m,style:b,dropIndicatorTop:y,maxHeight:k,width:S,minWidth:E,maxWidth:R,tooltipPlacement:T,size:C,backdrop:_,adaptiveHeight:L=!0,returnFocus:N,onKeyDownCapture:A,onBodyPointerEnter:$,droppable:z,ref:I}){const Y=ca(),{isOpen:H,isMounted:q,activeIndex:D,setActiveIndex:F,setIsOpen:U,markKeyboardNavigation:W,markPointerNavigation:B,virtualFocus:K,searchValue:O,setSearchValue:P,hasSearchInput:V,searchInputRef:j,enableHover:Z,closeOnSelect:te,nodeId:se,listRef:ue,labelsRef:le,refs:fe,floatingStyles:ge,middlewareData:_e,transitionStyles:oe,context:ye,getFloatingProps:Se,getItemProps:Oe,dismissCauseRef:we,returnFocusOnSelect:ke,returnFocus:De}=Wi("LegacyMenu.Content"),Me=_??!Z,[je,He]=v.useState(null),be=K&&!V,Re=zh(),ee=v.useSyncExternalStore(fi.subscribe,fi.isDragActive,fi.isDragActive),ce=ye.placement.startsWith("top"),J=ce&&q?_e.bottomAnchor?.bottom??null:null,re=v.useRef(null),xe=v.useRef(D),$e=v.useRef(!1);v.useLayoutEffect(()=>{xe.current=D},[D]),v.useLayoutEffect(()=>{if(!H){$e.current=!1;return}const Ie=wt=>{rO(wt)&&($e.current=!0,W())},ut=wt=>{const $t=sO(wt,ue);$t==null||$t===xe.current||F($t)},Be=wt=>{const $t=$e.current;$e.current=!1,B(),$t&&ut(wt.target)};document.addEventListener("keydown",Ie,!0);const Rt=E9(je,Be);return()=>{document.removeEventListener("keydown",Ie,!0),Rt()}},[H,ue,W,B,je,F]),v.useLayoutEffect(()=>{if(!H){re.current=null;return}if(!K||D==null||re.current===D||(re.current=D,!$e.current))return;const Ie=ue.current[D]??null;if(!Ie)return;const ut=requestAnimationFrame(()=>{Ie.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(ut)},[H,K,D,ue]);const Xe=v.useCallback(Ie=>{if(Ie.key==="Escape"){we.current="escape";return}if(Ie.ctrlKey&&!Ie.metaKey){const Be=Ie.key.toLowerCase(),Rt=Be==="n"||Be==="j";if(Rt||(Be==="p"||Be==="k")){Ie.preventDefault();const $t=ue.current,Rn=$t.length;if(Rn===0)return;const Lr=xe.current,zr=Rt?1:-1;let Sn=Lr==null?Rt?0:Rn-1:Lr+zr;for(;Sn>=0&&Sn<Rn;){if($t[Sn]!=null){F(Sn);return}Sn+=zr}return}}if(!V)return;if(Ie.key.length===1&&!Ie.ctrlKey&&!Ie.metaKey&&!Ie.altKey){if(document.activeElement===j.current)return;Ie.preventDefault(),Ie.stopPropagation(),j.current?.focus(),P(O+Ie.key),iO(ue,"body",F)}},[we,V,ue,j,O,F,P]),Ye=v.useCallback(Ie=>{Re(Ie.nativeEvent)&&(we.current="backdrop",U(!1))},[we,U,Re]),ht=v.useCallback(Ie=>{if(Ie.stopPropagation(),!Re(Ie.nativeEvent))return;Ie.preventDefault(),we.current="backdrop",U(!1);const Rt=document.elementsFromPoint(Ie.clientX,Ie.clientY).find(wt=>!wt.classList.contains(Ox));Rt&&Rt.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Ie.clientX,clientY:Ie.clientY,screenX:Ie.screenX,screenY:Ie.screenY,button:Ie.button,buttons:Ie.buttons,ctrlKey:Ie.ctrlKey,shiftKey:Ie.shiftKey,altKey:Ie.altKey,metaKey:Ie.metaKey}))},[we,U,Re]),Qe=z!=null,{ref:yt,isOver:kt,isDropBlocked:nt}=nq({accept:z?.accept??rq,disabled:!Qe||(z?.disabled??!1),onDragEnter:z?.onDragEnter,onDragOver:z?.onDragOver,onDragLeave:z?.onDragLeave,onDrop:z?.onDrop}),Tt=Kc([fe.setFloating,He,I,Qe?yt:null]),_t=fa(),{zIndex:st,portalLayerStyles:vt}=jl("popover",q);if(!q)return null;const Dt=C??Y?.menuSize??"sm",Pt={...ge,...oe,...vt,...st!==null?{zIndex:st}:{},...b,...y!==void 0?{"--ui-menu-drop-indicator-top":`${y}px`}:{},...Tx({width:S,minWidth:E,maxWidth:R}),...ce&&J!==null?{top:"auto",bottom:J}:{},...Rx({isOpen:H,isPositioned:ye.isPositioned})},At={...vt,...st!==null?{zIndex:st-1}:{},pointerEvents:Qe&&ee?"none":void 0},X=L?lO(k):k,he=r!=null,Le=TO(At),Ze=Mx({className:l,hasDropIndicator:y!==void 0,size:Dt,surfaceStyle:c,style:he&&X!==void 0?{...Pt,maxHeight:X}:Pt,hasAttachment:he}),St=jx(he||X===void 0?void 0:{maxHeight:X},he,f),at=Lx(),qe=Dx(d),Ee=Ix(!1,h),Ue=zx(),ze=T5(),Ne=E5();return g.jsxs(vx,{..._t?{root:_t}:{},children:[Me&&g.jsx("div",{className:Le.className,style:Le.style,"data-component":"menu-backdrop",onClick:Ye,onContextMenu:ht,role:"none"}),g.jsx(kx,{context:ye,initialFocus:be?-1:j,returnFocus:N??De??(we.current!=="backdrop"&&(we.current!=="selection"||ke)),modal:!be,children:g.jsxs("div",{ref:Tt,className:Ze.className,style:Ze.style,tabIndex:-1,"data-component":"menu-popup","data-size":Dt,"data-drop-active":Qe&&kt&&!nt?"":void 0,"data-drop-blocked":Qe&&nt?"":void 0,...a?{"data-testid":a}:{},...he?{"aria-label":s??"Menu"}:{},...Se({onKeyDown:Xe,onKeyDownCapture:A,onMouseDown:K?Ie=>{Ie.stopPropagation()}:void 0}),children:[Qe&&z?.indicator!=null?g.jsx("div",{"aria-hidden":"true",className:Ne.className,style:Ne.style,children:z.indicator}):null,g.jsx(Cs,{menuSize:Dt,children:g.jsx(BA,{dismiss:!H,children:g.jsx(Gx,{layerNodeId:se,placement:T,children:g.jsx(hO,{activeIndex:D,setIsOpen:U,getItemProps:Oe,searchValue:O,closeOnSelect:te,virtualFocus:K,children:g.jsxs(rA,{elementsRef:ue,labelsRef:le,children:[g.jsxs("div",{className:St.className,style:St.style,"data-component":"menu-layout",...he?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?g.jsx("div",{className:at.className,style:at.style,"data-component":"menu-header",children:g.jsx(Es,{value:"header",children:t})}):null,g.jsx(wl,{className:EO,rootStyle:[fO(),m?.root],viewportStyle:m?.viewport,contentStyle:m?.content,maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:qe.className,style:qe.style,"data-component":"menu-content",onPointerEnter:$,children:g.jsx("ul",{role:"presentation",className:Ee.className,style:Ee.style,"data-component":"menu-list",children:e})})}),n!=null?g.jsx("div",{className:Ue.className,style:Ue.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:n})}):null]}),r!=null?g.jsx("div",{className:ze.className,style:ze.style,"data-component":"menu-attachment",children:g.jsx("div",{className:qe.className,style:qe.style,"data-component":"menu-content",children:g.jsx(Es,{value:"footer",children:r})})}):null]})})})})})]})})]})}function sq({children:e,indent:t=!1,rootStyle:n}){const r=$5(t,n);return g.jsx("div",{className:r.className,style:r.style,"data-component":"menu-empty","data-indent":t||void 0,children:e})}function DO(e){const t=v.useContext($h),n=v.useContext(Cx),r=t??n;if(!r)throw new Error(`${e} must be used within LegacyMenu or LegacyMenu.SubMenu`);return r}function oq(){return DO("LegacyMenu.useLayerContext")}function aq({children:e}){const t=B5();return g.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[g.jsx(Yt,{name:"loading",size:"base",modifier:"spin",className:q5}),g.jsx("span",{children:e??"Loading..."})]})}function lq({placeholder:e="Search...","aria-label":t,className:n,rootStyle:r,inputGroupRootStyle:s,value:a,onValueChange:l,autoFocus:c=!1}){const f=Jc()==="body",h=nf(),m=Ci(),{searchValue:b,setSearchValue:y,searchInputRef:k,activeIndex:S,setActiveIndex:E,listRef:R,setHasSearchInput:T}=DO("LegacyMenu.SearchInput"),C=v.useRef(null),_=a!==void 0&&l!==void 0,N=!_||c||h?k:C,A=_?a:b;v.useEffect(()=>{if(!_)return T(!0),()=>T(!1)},[_,T]),v.useLayoutEffect(()=>{if(_&&!c)return;const H=k.current;if(!H)return;H.focus({preventScroll:!0});const q=requestAnimationFrame(()=>{document.activeElement!==H&&H.focus({preventScroll:!0})});return()=>cancelAnimationFrame(q)},[_,c,k]);const $=H=>{_?l(H.target.value):(y(H.target.value),iO(R,"body",E),l?.(H.target.value))},z=H=>{if(wx(H))return;if(H.ctrlKey&&!H.metaKey){const W=H.key.toLowerCase();if(W==="n"||W==="p"||W==="j"||W==="k"){H.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes(H.key)&&!H.metaKey&&!H.ctrlKey&&!H.altKey&&H.stopPropagation(),_&&H.key==="Enter"){H.preventDefault(),H.stopPropagation();return}if(!_&&H.key==="Enter"&&S!=null){H.preventDefault();const W=R.current[S];W&&(W.click(),k.current?.focus())}if(H.key!=="ArrowLeft"&&H.key!=="ArrowRight")return;const D=H.currentTarget,F=Pl(H.key,m)==="end"?D.value.length:0;if(!(D.selectionStart===F&&D.selectionEnd===F)){H.stopPropagation();return}T9({event:H,direction:H.key,activeIndex:S,listRef:R,restoreFocus:()=>k.current?.focus()})},I=D5(n,r),Y=g.jsx(Qc,{ref:N,type:"text",variant:"unfilled",size:"base",inputGroupRootStyle:s,value:A,onChange:$,onKeyDown:z,placeholder:e,"aria-label":t??"Search menu items"});return f?g.jsx("li",{className:I.className,style:I.style,"data-component":"menu-search-row",role:"none",children:Y}):g.jsx("div",{className:I.className,style:I.style,"data-component":"menu-search-row",role:"none",children:Y})}function uq(e){const[t,n]=v.useState(!1);return v.useLayoutEffect(()=>{const r=e.current;if(r===null||r.parentElement===null)return;const s=()=>{n(r.nextElementSibling?.hasAttribute("data-menu-section")??!1)};s();const a=new MutationObserver(s);return a.observe(r.parentElement,{childList:!0}),()=>a.disconnect()},[e]),t}function cq({children:e,title:t,dividerVisibility:n="default",trailingDividerVisibility:r="default",textAction:s,titleTrailing:a,tooltip:l,noDivider:c,rootStyle:d,titleStyle:f}){const h=v.useRef(null),m=uq(h),b=j5(d),y=s!=null||a!=null,k=RO(y,f),S=L5(),E=t!=null&&t!==!1?g.jsxs("div",{role:"presentation",className:k.className,style:k.style,"data-component":"menu-section-title","data-has-action":y||void 0,children:[g.jsx("span",{children:t}),a,s!=null?g.jsx("button",{type:"button",className:S.className,style:S.style,onClick:s.onClick,children:s.label}):null]}):null,R=E!=null&&l!=null?g.jsx(tf,{content:l,openDelay:0,closeDelay:0,children:E}):E;return g.jsxs("div",{ref:h,role:"group","aria-label":typeof t=="string"?t:void 0,className:b.className,style:b.style,"data-menu-section":!0,"data-next-is-section":m||void 0,"data-divider-visibility":n!=="default"?n:void 0,"data-trailing-divider-visibility":r!=="default"?r:void 0,"data-no-divider":c||void 0,children:[R,e]})}function jO({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:d=!1,onOpenChange:f,hoverOpenDelay:h,keepOpenOnHoverOut:m=!1,dismissOnReferenceScroll:b=!1,suppressSiblingPointerGuard:y=!1,virtualFocus:k=!1,focusItemOnOpen:S}){const E=bx(),R=Ci(),[T,C]=wc(c,d,f,"LegacyMenu.SubMenu"),_=c!==void 0,L=t==="hover"&&(!_||r==null),[N,A]=v.useState(null),{focusItemOnHoverEnabled:$,markKeyboardNavigation:z,markPointerNavigation:I,resetFocusItemOnHover:Y}=oO(),[H,q]=v.useState(""),[D,F]=v.useState(!1),U=v.useRef([]),W=v.useRef([]),B=v.useRef(null);G5(E,T);const K=Y5();v.useEffect(()=>{K&&K.setSubMenuOpen(T)},[T,K]);const O=v.useRef(T);v.useEffect(()=>{const $e=O.current;O.current=T,$e!==T&&(q(""),T||A(null),Y())},[T,Y]);const P=v.useCallback($e=>{C($e)},[C]);v.useEffect(()=>{if(K)return K.registerSubMenuOpener(()=>P(!0)),()=>{K.registerSubMenuOpener(null)}},[K,P]);const V=v.useCallback(($e,Xe,Ye)=>{const ht=B.current;!$e&&t==="hover"&&(Ye==="hover"||Ye==="safe-polygon")&&(m||ht?.value&&ht.ownerDocument.activeElement===ht)||P($e)},[m,P,t]),j=v.useCallback(()=>{P(!1)},[P]),te=n??(t==="hover"?R==="rtl"?"left-start":"right-start":"bottom-start"),se={mainAxis:-2,alignmentAxis:-2},fe=s??(a?se:t==="hover"?se:4),{refs:ge,floatingStyles:_e,context:oe}=Sx({nodeId:E,open:T,onOpenChange:V,placement:te,middleware:[Vv(fe),Kv(),Wv({crossAxis:te.startsWith("left")||te.startsWith("right")}),Yv({padding:8,apply({availableWidth:$e,availableHeight:Xe,elements:Ye}){Ye.floating.style.setProperty(aO,`${Math.max(0,Math.floor($e))}px`),Ye.floating.style.setProperty(Ex,`${Math.max(0,Math.floor(Xe))}px`)}})],whileElementsMounted:Rp,transform:!1});v.useLayoutEffect(()=>{const $e=r?.current;$e&&ge.setReference($e)}),O9(L&&T&&!y,ge.domReference);const{activeId:ye}=x9(E,T),Se=ye!=null?0:h??75,Oe=lA(oe,{enabled:L,delay:{open:Se},handleClose:xA({blockPointerEvents:!1,requireIntent:!1})}),we=dA(oe,{enabled:t==="click"&&!_}),ke=zh(),De=pA(oe,{ancestorScroll:b,bubbles:!0,outsidePressEvent:"click",outsidePress:ke}),Me=gA(oe,{role:"menu"}),je=mA(oe,{listRef:U,activeIndex:N,onNavigate:A,nested:!0,rtl:R==="rtl",loop:!0,focusItemOnOpen:k?!1:S??!0,virtual:D||k,focusItemOnHover:$&&!k}),He=yA(oe,{listRef:W,activeIndex:N,onMatch:D?void 0:A,enabled:!D&&!k}),{getReferenceProps:be,getFloatingProps:Re,getItemProps:ee}=hA([Oe,we,De,Me,je,He]),ce=v.useCallback(()=>({...be(),ref:r?void 0:ge.setReference,"aria-haspopup":"menu","aria-expanded":T}),[be,ge.setReference,T,r]),{isMounted:J,styles:re}=bA(oe,{duration:{open:0,close:A9},initial:{opacity:0,transform:"scale(1)"}}),xe=v.useMemo(()=>({isOpen:T,isMounted:J,setIsOpen:P,closeFromKeyboard:j,activeIndex:N,setActiveIndex:A,markKeyboardNavigation:z,markPointerNavigation:I,trigger:t,closeOnSelect:l,nodeId:E,listRef:U,labelsRef:W,searchInputRef:B,searchValue:H,setSearchValue:q,hasSearchInput:D,setHasSearchInput:F,refs:ge,floatingStyles:_e,transitionStyles:re,context:oe,getReferenceProps:be,getFloatingProps:Re,getItemProps:ee,getTriggerProps:ce,virtualFocus:k}),[T,J,P,j,N,t,z,I,l,E,H,D,k,ge,_e,re,oe,be,Re,ee,ce]);return g.jsx(yx,{id:E,children:g.jsx($h.Provider,{value:xe,children:e})})}function fq({children:e,disabled:t=!1,label:n,leading:r,leadingStyle:s,trailing:a,contentStyle:l,trailingStyle:c}){const{activeIndex:d,getItemProps:f}=ef("LegacyMenu.SubMenuTrigger"),{shouldAllowPointerInteraction:h}=Wi("LegacyMenu.SubMenuTrigger"),m=Bh("LegacyMenu.SubMenuTrigger"),b=Jc(),y=Ci(),k=b==="body",S=n??(typeof e=="string"?e:""),{ref:E,index:R}=Oh({label:S||null}),T=d===R,C=Kc([E,m.refs.setReference]),_=g.jsx(Yt,{name:"chevron-right",color:"tertiary"}),L=C5({disabled:t,expanded:m.isOpen,focused:T}),N={role:"menuitem","aria-haspopup":"menu","aria-expanded":m.isOpen,"data-component":"menu-submenu-trigger","data-expanded":m.isOpen||void 0,tabIndex:T?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":T||void 0,[zl]:b,className:L.className,style:L.style,...m.getReferenceProps(f({onMouseDown(z){h(z.nativeEvent)||(z.preventDefault(),z.stopPropagation())},onClick(z){if(!h(z.nativeEvent)){z.preventDefault(),z.stopPropagation();return}!t&&m.trigger==="hover"&&m.setIsOpen(!0)},onKeyDown(z){(Pl(z.key,y)==="end"||z.key==="Enter"||z.key===" ")&&!t&&(z.preventDefault(),z.stopPropagation(),m.setIsOpen(!0))}}))},A=P5(),$=g.jsx(Cl,{disabled:t,leading:r,leadingStyle:s,contentStyle:l,trailing:a!=null?g.jsx("div",{className:A.className,style:A.style,"data-component":"menu-submenu-right-section",children:a}):void 0,rightFallback:_,trailingStyle:c,children:e});return k?g.jsx("li",{ref:C,...N,children:$}):g.jsx("div",{ref:C,...N,children:$})}function dq({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=Bh("LegacyMenu.SubMenuItem"),c=Ci(),d=t??(typeof e=="string"?e:""),f=m=>{a.disabled||(r?.(m),!m.defaultPrevented&&Pl(m.key,c)==="end"&&(m.preventDefault(),m.stopPropagation(),l.setIsOpen(!0)))},h=n?g.jsx(Yt,{name:"chevron-right",color:"tertiary"}):void 0;return g.jsx(OO,{...a,contextPart:"LegacyMenu.SubMenuItem",itemLabel:d,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:f,trailingAccessory:h,children:e})}function pq({children:e,header:t,footer:n,"aria-label":r,"data-testid":s,onPointerEnter:a,keepSearchFocus:l=!1,className:c,surfaceStyle:d,contentStyle:f,listStyle:h,width:m,minWidth:b,maxWidth:y,maxHeight:k,size:S,contentPadding:E}){const R=ca(),T=Bh("LegacyMenu.SubMenuContent"),C=Ci(),_=fa(),{portalLayerStyles:L}=jl("popover",T.isMounted),N=S??R?.menuSize??"sm",{virtualFocus:A}=T;if(!T.isMounted)return null;const $={...T.floatingStyles,...T.transitionStyles,...L,...Tx({width:m,minWidth:b,maxWidth:y,clampToAvailableWidth:!0}),...Rx({isOpen:T.isOpen,isPositioned:T.context.isPositioned})},z=Mx({className:c,size:N,surfaceStyle:d,style:$}),I=Dx(f),Y=Ix(!1,h),H=lO(k),q=t!=null||n!=null,D=jx(q?{maxHeight:H}:void 0),F=Lx(),U=zx(),W=E===void 0?I.style:{...I.style,padding:E,scrollPaddingBlock:E},B=O=>{O.stopPropagation()},K=O=>{T.markPointerNavigation();const P=sO(O,T.listRef);if(P!=null&&P!==T.activeIndex&&T.setActiveIndex(P),!l||P==null)return;const V=T.searchInputRef.current;if(V==null)return;const j=V.ownerDocument.activeElement;j!==V&&(j instanceof HTMLInputElement||j instanceof HTMLTextAreaElement||V.focus({preventScroll:!0}))};return g.jsx(vx,{..._?{root:_}:{},children:g.jsx(kx,{context:T.context,disabled:A,initialFocus:T.hasSearchInput?T.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:T.trigger==="click",children:g.jsx("div",{ref:T.refs.setFloating,className:z.className,style:z.style,"data-component":"menu-popup","data-submenu":"","data-size":N,...s?{"data-testid":s}:{},...T.getFloatingProps({onClick:B,onPointerEnter:a,onMouseMove(O){K(O.target)},onPointerMove(O){K(O.target)},onKeyDown(O){if(rO(O)&&T.markKeyboardNavigation(),Pl(O.key,C)==="start"||O.key==="Escape"){O.preventDefault(),O.stopPropagation(),T.closeFromKeyboard();const P=T.refs.domReference.current;P instanceof HTMLElement&&P.focus()}}}),children:g.jsx(_O.Provider,{value:!0,children:g.jsx(Cs,{menuSize:N,children:g.jsx(Gx,{layerNodeId:T.nodeId,children:g.jsx(hO,{activeIndex:T.activeIndex,setIsOpen:T.setIsOpen,getItemProps:T.getItemProps,searchValue:T.searchValue,closeOnSelect:T.closeOnSelect,virtualFocus:A,children:g.jsx(rA,{elementsRef:T.listRef,labelsRef:T.labelsRef,children:q?g.jsxs("div",{className:D.className,style:D.style,role:"menu","aria-label":r??"Submenu","data-component":"menu-layout",children:[t!=null?g.jsx("div",{className:F.className,style:F.style,"data-component":"menu-header",children:g.jsx(Es,{value:"header",children:t})}):null,g.jsx(wl,{className:EO,rootStyle:fO(),maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:I.className,style:W,"data-component":"menu-content",children:g.jsx("ul",{role:"presentation",className:Y.className,style:Y.style,"data-component":"menu-list",children:g.jsx(Es,{value:"body",children:g.jsx(Uy,{children:e})})})})}),n!=null?g.jsx("div",{className:U.className,style:U.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:n})}):null]}):g.jsx(wl,{maxHeight:H,children:g.jsx("div",{className:I.className,style:W,"data-component":"menu-content",children:g.jsx("ul",{role:"menu","aria-label":r??"Submenu",className:Y.className,style:Y.style,"data-component":"menu-list",children:g.jsx(Es,{value:"body",children:g.jsx(Uy,{children:e})})})})})})})})})})})})})}function hq({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return Wx(s,n,"LegacyMenu.SwitchItem")?g.jsx(mq,{...r,itemLabel:s,children:e}):null}function mq({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,leadingStyle:d,trailing:f,contentStyle:h,trailingStyle:m,rootStyle:b,tooltip:y,closeOnSelect:k,itemLabel:S}){const{activeIndex:E,getItemProps:R,setIsOpen:T,closeOnSelect:C}=ef("LegacyMenu.SwitchItem"),{shouldAllowPointerInteraction:_}=Wi("LegacyMenu.SwitchItem"),L=nf(),N=Vx(),A=Jc(),$=A==="body",z=k??C??!1,[I,Y]=v.useState(r),H=n!==void 0,q=H?n:I,{ref:D,index:F}=Oh({label:S||null}),U=E===F,W=v.useCallback(()=>{if(a)return;const te=!q;H||Y(te);const se={defaultPrevented:!1,preventDefault:()=>{se.defaultPrevented=!0}};s?.(te,se),z&&!se.defaultPrevented&&N(T)},[a,q,H,s,z,T,N]),B=v.useCallback(te=>{if(!_(te.nativeEvent)){te.preventDefault(),te.stopPropagation();return}te.preventDefault(),te.stopPropagation(),W()},[W,_]),K=v.useCallback(te=>{a||(te.key==="Enter"||te.key===" ")&&(te.preventDefault(),te.stopPropagation(),W())},[a,W]),O=R({onClick:B,onKeyDown:K}),P=R5({disabled:a,focused:U,inSubmenu:L},b),V={role:"menuitemcheckbox","aria-checked":q,tabIndex:U?0:-1,"aria-disabled":a||void 0,"data-checked":q||void 0,"data-component":"menu-toggle-row","data-disabled":a||void 0,"data-focused":U||void 0,...t?{"data-testid":t}:{},[zl]:A,className:P.className,style:P.style,...O},j=g.jsx(Cl,{disabled:a,leading:c,leadingStyle:d,contentStyle:h,trailing:f,trailingStyle:m,trailingAccessory:g.jsx(ZF,{checked:q,disabled:a,size:"sm",variant:l}),children:e}),Z=$?g.jsx("li",{ref:D,...V,children:j}):g.jsx("div",{ref:D,...V,children:j});return y!=null?g.jsx(tf,{content:y,openDelay:0,closeDelay:0,children:Z}):Z}function gq({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=O5(n),a=M5(n),l=I5({inline:n,wrap:r});return g.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[g.jsx(Fp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?g.jsx(Fp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const bq={title:{kZKoxP:"ui-xk0z11",kB7OPa:"ui-9f619",kVQacm:"ui-b3r6kr",$$css:!0}};function yq({title:e,divider:t}){const n=RO(!1,bq.title),r=z5();return g.jsxs(g.Fragment,{children:[t?g.jsx("div",{role:"presentation","aria-hidden":"true",className:r.className,style:r.style}):null,e!==void 0?g.jsx("div",{role:"presentation",className:n.className,"data-component":"menu-section-title",style:n.style,children:g.jsx("span",{children:e})}):null]})}const Ec=typeof window<"u"?v.useLayoutEffect:v.useEffect;function iT(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function vq({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:d}=v.useMemo(()=>({styleHeight:iT(l?.height),styleWidth:iT(l?.width)}),[l?.height,l?.width]),[f,h]=v.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&d!==void 0;return Ec(()=>{if(s===null||m)return;const b=new ResizeObserver(y=>{for(const k of y){const{contentRect:S,target:E}=k;s===E&&h(R=>R.height===S.height&&R.width===S.width?R:{height:S.height,width:S.width})}});return b.observe(s,{box:e}),()=>{b?.unobserve(s)}},[e,m,s,c,d]),v.useMemo(()=>({height:c??f.height,width:d??f.width}),[f,c,d])}function xq(e){const t=v.useRef(()=>{throw new Error("Cannot call during render.")});return Ec(()=>{t.current=e},[e]),v.useCallback(n=>t.current?.(n),[t])}function Hb({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function uo(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function dc(e,t){if(e===t)return!0;if(!!e!=!!t||(uo(e!==void 0),uo(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(const n in e)if(!Object.is(t[n],e[n]))return!1;return!0}function LO({cachedBounds:e,itemCount:t,itemSize:n}){if(t===0)return 0;if(typeof n=="number")return t*n;{const r=e.get(e.size===0?0:e.size-1);uo(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function kq({align:e,cachedBounds:t,index:n,itemCount:r,itemSize:s,containerScrollOffset:a,containerSize:l}){if(n<0||n>=r)throw RangeError(`Invalid index specified: ${n}`,{cause:`Index ${n} is not within the range of 0 - ${r-1}`});const c=LO({cachedBounds:t,itemCount:r,itemSize:s}),d=t.get(n),f=Math.max(0,Math.min(c-l,d.scrollOffset)),h=Math.max(0,d.scrollOffset-l+d.size);switch(e==="smart"&&(a>=h&&a<=f?e="auto":e="center"),e){case"start":return f;case"end":return h;case"center":return d.scrollOffset<=l/2?0:d.scrollOffset+d.size/2>=c-l/2?c-l:d.scrollOffset+d.size/2-l/2;default:return a>=h&&a<=f?a:a<h?h:f}}function sT({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,d=0,f=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,d=Math.max(0,l-s);h<a;){const m=e.get(h);if(m.scrollOffset+m.size>=t+n)break;h++}return c=Math.min(a,h),f=Math.min(r-1,c+s),l<0&&(l=0,c=-1,d=0,f=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:d,stopIndexOverscan:f}}function Sq({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(uo(s<e,`Invalid index ${s}`);r.size-1<s;){const l=r.size;let c;switch(typeof n){case"function":{c=n(l,t);break}case"number":{c=n;break}}if(l===0)r.set(l,{size:c,scrollOffset:0});else{const d=r.get(l-1);uo(d!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:d.scrollOffset+d.size,size:c})}}const a=r.get(s);return uo(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function wq({itemCount:e,itemProps:t,itemSize:n}){return v.useMemo(()=>Sq({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function Eq({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(uo(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),uo(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function Tq({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:d,overscanCount:f}){const[h,m]=v.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:b,startIndexOverscan:y,stopIndexVisible:k,stopIndexOverscan:S}={startIndexVisible:Math.min(a-1,h.startIndexVisible),startIndexOverscan:Math.min(a-1,h.startIndexOverscan),stopIndexVisible:Math.min(a-1,h.stopIndexVisible),stopIndexOverscan:Math.min(a-1,h.stopIndexOverscan)},{height:E=n,width:R=n}=vq({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),T=v.useRef({height:0,width:0}),C=E,_=Eq({containerSize:C,itemSize:c});v.useLayoutEffect(()=>{if(typeof d=="function"){const I=T.current;(I.height!==E||I.width!==R)&&(d({height:E,width:R},{...I}),I.height=E,I.width=R)}},[E,d,R]);const L=wq({itemCount:a,itemProps:l,itemSize:_}),N=v.useCallback(I=>L.get(I),[L]),A=v.useCallback(()=>LO({cachedBounds:L,itemCount:a,itemSize:_}),[L,a,_]),$=v.useCallback(I=>{const Y=Hb({containerElement:e,direction:r,isRtl:s,scrollOffset:I});return sT({cachedBounds:L,containerScrollOffset:Y,containerSize:C,itemCount:a,overscanCount:f})},[L,e,C,r,s,a,f]);Ec(()=>{const I=e?.scrollTop??0;m($(I))},[e,r,$]),Ec(()=>{if(!e)return;const I=()=>{m(Y=>{const{scrollLeft:H,scrollTop:q}=e,D=Hb({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),F=sT({cachedBounds:L,containerScrollOffset:D,containerSize:C,itemCount:a,overscanCount:f});return dc(F,Y)?Y:F})};return e.addEventListener("scroll",I),()=>{e.removeEventListener("scroll",I)}},[L,e,C,r,a,f]);const z=xq(({align:I="auto",containerScrollOffset:Y,index:H})=>{let q=kq({align:I,cachedBounds:L,containerScrollOffset:Y,containerSize:C,index:H,itemCount:a,itemSize:_});if(e){if(q=Hb({containerElement:e,direction:r,isRtl:s,scrollOffset:q}),typeof e.scrollTo!="function"){const D=$(q);dc(h,D)||m(D)}return q}});return{getCellBounds:N,getEstimatedSize:A,scrollToIndex:z,startIndexOverscan:y,startIndexVisible:b,stopIndexOverscan:S,stopIndexVisible:k}}function Rq(e){return v.useMemo(()=>e,Object.values(e))}function Cq(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return dc(n,a)&&dc(r,l)&&dc(s,c)}function _q(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const Nq="data-react-window-index";function Aq({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:d,rowHeight:f,rowProps:h,tagName:m="div",style:b,...y}){const k=Rq(h),S=v.useMemo(()=>v.memo(c,Cq),[c]),[E,R]=v.useState(null),T=_q(f),C=v.useMemo(()=>T?q=>f.getRowHeight(q)??f.getAverageRowHeight():f,[T,f]),{getCellBounds:_,getEstimatedSize:L,scrollToIndex:N,startIndexOverscan:A,startIndexVisible:$,stopIndexOverscan:z,stopIndexVisible:I}=Tq({containerElement:E,containerStyle:b,defaultContainerSize:n,direction:"vertical",itemCount:d,itemProps:k,itemSize:C,onResize:s,overscanCount:l});v.useImperativeHandle(r,()=>({get element(){return E},scrollToRow({align:q="auto",behavior:D="auto",index:F}){const U=N({align:q,containerScrollOffset:E?.scrollTop??0,index:F});typeof E?.scrollTo=="function"&&E.scrollTo({behavior:D,top:U})}}),[E,N]),Ec(()=>{if(!E)return;const q=Array.from(E.children).filter((D,F)=>{if(D.hasAttribute("aria-hidden"))return!1;const U=`${A+F}`;return D.setAttribute(Nq,U),!0});if(T)return f.observeRowElements(q)},[E,T,f,A,z]),v.useEffect(()=>{A>=0&&z>=0&&a&&a({startIndex:$,stopIndex:I},{startIndex:A,stopIndex:z})},[a,A,$,z,I]);const Y=v.useMemo(()=>{const q=[];if(d>0)for(let D=A;D<=z;D++){const F=_(D);q.push(v.createElement(S,{...k,ariaAttributes:{"aria-posinset":D+1,"aria-setsize":d,role:"listitem"},key:D,index:D,style:{position:"absolute",left:0,transform:`translateY(${F.scrollOffset}px)`,height:T?void 0:F.size,width:"100%"}}))}return q},[S,_,T,d,k,A,z]),H=g.jsx("div",{"aria-hidden":!0,style:{height:L(),width:"100%",zIndex:-1}});return v.createElement(m,{role:"list",...y,className:t,ref:R,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...b}},Y,e,H)}const zO=v.createContext(null);function Oq(e){const t=v.useContext(zO);if(!t)throw new Error(`${e} must be used within LegacyMenu.VirtualizedContent`);return t}function Mq({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}){const c=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}),[t,n,r,s,a,l]);return g.jsx(zO.Provider,{value:c,children:e})}const Iq=4,oT="ui-menu--virtualized";function Dq({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,d=F5();return g.jsx("div",{className:d.className,style:{...t,...d.style},onMouseMove:f=>a(e,f),children:s(l,e,c)})}function jq({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:d,style:f,surfaceStyle:h,maxHeight:m,width:b="200px",size:y,backdrop:k,closeOnSelect:S=!0,overscanCount:E=5,getItemKey:R,onPreserveActiveIndex:T,renderActivePreview:C,ref:_}){const L=ca(),{isOpen:N,isMounted:A,activeIndex:$,setActiveIndex:z,setIsOpen:I,virtualFocus:Y,enableHover:H,nodeId:q,listRef:D,labelsRef:F,searchValue:U,refs:W,floatingStyles:B,middlewareData:K,transitionStyles:O,context:P,getFloatingProps:V,getItemProps:j,dismissCauseRef:Z,returnFocusOnSelect:te,returnFocus:se}=Wi("LegacyMenu.VirtualizedContent"),ue=v.useRef(null),le=v.useRef(null),fe=v.useRef($);fe.current=$;const ge=v.useRef(null),[_e,oe]=v.useState(null),[ye,Se]=v.useState(null),Oe=k??!H,we=zh(),{portalLayerStyles:ke}=jl("popover",A),De=v.useRef(null),Me=v.useRef(void 0),je=v.useRef(e),He=v.useRef($),be=v.useRef(null);v.useEffect(()=>{r?F.current=e.map(ze=>r(ze)):F.current=e.map(()=>null),D.current.length!==e.length&&(D.current.length=e.length)},[e,r,F,D]),v.useLayoutEffect(()=>{const ze=je.current!==e,Ne=He.current!==$;if(je.current=e,He.current=$,R===void 0||$==null){Me.current=void 0;return}const Ie=Me.current;if(ze&&!Ne&&Ie!==void 0){const Be=e.findIndex(Rt=>R(Rt)===Ie);if(Be>=0&&Be!==$){be.current=Be,T===void 0?z(Be):T(Be);return}}const ut=e[$];Me.current=ut===void 0?void 0:R(ut)},[$,R,e,T,z]);const Re=P.placement.startsWith("top"),ee=Re&&A?K.bottomAnchor?.bottom??null:null,ce=v.useRef(null);v.useLayoutEffect(()=>{if(!N){ce.current=null,De.current=null;return}if($==null||ce.current===$)return;ce.current=$;const ze=be.current===$;if(be.current=null,ze)return;const Ne=De.current===$;De.current=null,!Ne&&($<0||$>=e.length||le.current?.scrollToRow({index:$,align:"smart",behavior:"instant"}))},[N,$,e.length]);const J=v.useRef(U),re=v.useRef(N);v.useEffect(()=>{const ze=J.current,Ne=re.current;J.current=U,re.current=N,!(!N||!Ne||ze===U)&&(e.length>0&&le.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),z(e.length>0?0:null))},[N,e.length,U,z]);const xe=v.useCallback((ze,Ne)=>{ge.current=ze,oe(Ie=>Ie===ze?Ie:ze),Se(Ie=>Ie===Ne?Ie:Ne)},[]);v.useLayoutEffect(()=>{if(!N||$==null||$<0||$>=e.length){xe(null,null);return}const ze=D.current[$];ze!=null&&xe(ze,$)},[$,N,e.length,D,xe]);const $e=v.useCallback((ze,Ne)=>{ze===fe.current&&Ne!=null&&xe(Ne,ze)},[xe]),Xe=v.useRef(null),Ye=v.useCallback((ze,Ne)=>{const Ie=Xe.current;Xe.current={x:Ne.clientX,y:Ne.clientY},!(Ie!==null&&Ie.x===Ne.clientX&&Ie.y===Ne.clientY)&&$!==ze&&(De.current=ze,z(ze))},[$,z]),ht=v.useCallback(ze=>{ze.key==="Escape"&&(Z.current="escape")},[Z]),Qe=v.useCallback(ze=>{we(ze.nativeEvent)&&(Z.current="backdrop",I(!1))},[Z,I,we]),yt=v.useCallback(ze=>{if(!we(ze.nativeEvent))return;ze.preventDefault(),Z.current="backdrop",I(!1);const ut=document.elementsFromPoint(ze.clientX,ze.clientY).find(Be=>!Be.classList.contains(Ox));ut&&ut.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:ze.clientX,clientY:ze.clientY,screenX:ze.screenX,screenY:ze.screenY,button:ze.button,buttons:ze.buttons,ctrlKey:ze.ctrlKey,shiftKey:ze.shiftKey,altKey:ze.altKey,metaKey:ze.metaKey}))},[Z,I,we]),kt=Kc([W.setFloating,ue,_]),nt=fa();if(!A)return null;const Tt=m??R9,_t=typeof t=="number"?e.length*t:e.reduce((ze,Ne,Ie)=>ze+t(Ie),0),st=Math.min(_t,Math.max(0,Tt-Iq*2)),vt=y??L?.menuSize??"sm",Dt={...B,...O,...f,...Tx({width:b}),...ke,...Re&&ee!==null?{top:"auto",bottom:ee}:{},...Rx({isOpen:N,isPositioned:P.isPositioned})},Pt=TO(ke),At=Mx({className:d?`${oT} ${d}`:oT,size:vt,style:Dt,surfaceStyle:h}),X=jx(),he=Lx(),Le=Dx(),Ze=Ix(!0),St=U5(),at=zx(),qe=N&&ye!=null&&ye>=0&&ye<e.length&&_e!=null&&C!=null?C(ye,{rowElement:_e,menuContentElement:ue.current}):null,Ee=qe!=null&&_e!=null,Ue={items:e,activeIndex:$,renderItem:n,onMouseMove:Ye};return g.jsxs(vx,{...nt?{root:nt}:{},children:[Oe&&g.jsx("div",{className:Pt.className,style:Pt.style,"data-component":"menu-backdrop",onClick:Qe,onContextMenu:yt,role:"none"}),g.jsx(kx,{context:P,initialFocus:-1,returnFocus:se??(Z.current!=="backdrop"&&(Z.current!=="selection"||te)),modal:!Y&&N,children:g.jsx("div",{ref:kt,className:At.className,style:At.style,tabIndex:-1,"data-component":"menu-popup","data-virtualized":"","data-size":vt,...V({onKeyDown:ht,onMouseDown:Y?ze=>{ze.stopPropagation()}:void 0}),children:g.jsx(Cs,{menuSize:vt,children:g.jsx("div",{className:X.className,style:X.style,"data-component":"menu-layout",role:"menu","aria-label":c??"Menu",children:g.jsx(BA,{dismiss:!N,children:g.jsx(Gx,{layerNodeId:q,children:g.jsxs(Mq,{activeIndex:$,setIsOpen:I,getItemProps:j,listRef:D,closeOnSelect:S,onRowElementChange:$e,children:[s!=null?g.jsx("div",{className:he.className,style:he.style,"data-component":"menu-header",children:g.jsx(Es,{value:"header",children:s})}):null,e.length>0?g.jsx("div",{className:Le.className,style:Le.style,"data-component":"menu-content",children:g.jsx("div",{className:Ze.className,style:Ze.style,"data-component":"menu-list",role:"presentation",children:g.jsx(Aq,{listRef:le,className:St.className,rowComponent:Dq,rowProps:Ue,rowCount:e.length,rowHeight:t,overscanCount:E,"data-native-scrollbar":"none",style:{height:st}})})}):l,a!=null?g.jsx("div",{className:at.className,style:at.style,"data-component":"menu-footer",children:g.jsx(Es,{value:"footer",children:a})}):null,C!=null?g.jsx(jO,{open:Ee,placement:"right-start",anchorRef:ge,offset:6,closeOnSelect:!1,virtualFocus:!0,children:Ee?qe:null}):null]})})})})})})})]})}function Lq({index:e,children:t,disabled:n=!1,onSelect:r,onMouseDown:s,leading:a,leadingStyle:l,contentStyle:c,trailing:d,trailingStyle:f,wideLeftSection:h=!1,tooltip:m,tooltipContentKey:b,closeOnSelect:y,description:k,variant:S="default",checked:E,ref:R}){const{shouldAllowPointerInteraction:T,virtualFocus:C}=Wi("LegacyMenu.VirtualizedItem"),_=nf(),{activeIndex:L,setIsOpen:N,getItemProps:A,listRef:$,closeOnSelect:z,onRowElementChange:I}=Oq("LegacyMenu.VirtualizedItem"),Y=y??z??!0,H=L===e,q=v.useCallback(ge=>{$.current[e]=ge,I?.(e,ge),typeof R=="function"?R(ge):R&&(R.current=ge)},[e,$,I,R]),D=()=>{if(n)return;const ge={defaultPrevented:!1,preventDefault:()=>{ge.defaultPrevented=!0}};r?.(ge),Y&&!ge.defaultPrevented&&N(!1)},F=ge=>{if(!T(ge.nativeEvent)){ge.preventDefault(),ge.stopPropagation();return}D()},U=ge=>{n||(ge.key==="Enter"||ge.key===" ")&&(ge.preventDefault(),D())},W=ge=>{if(!T(ge.nativeEvent)){ge.preventDefault(),ge.stopPropagation();return}s?.(ge),!ge.defaultPrevented&&C&&ge.preventDefault()},{onMouseMove:B,onPointerLeave:K,...O}=A({onClick:F,onKeyDown:U,onMouseDown:W}),P=$x(),V=Bx(),j=Fx(),Z=k!=null?g.jsxs("div",{className:P.className,style:P.style,children:[g.jsx("div",{className:V.className,style:V.style,children:t}),g.jsx("div",{className:j.className,style:j.style,"data-component":"menu-item-description",children:k})]}):t,te=Px({disabled:n,focused:H,inSubmenu:_,variant:S}),se=E!==void 0,ue=se&&a==null?g.jsx(xN,{checked:E,disabled:n}):a,le=se?{role:"menuitemcheckbox","aria-checked":E,"data-checked":E||void 0}:{role:"menuitem"},fe=g.jsx("li",{ref:q,...le,tabIndex:H?0:-1,"aria-disabled":n||void 0,"data-component":"menu-row","data-disabled":n||void 0,"data-focused":H||void 0,"data-has-description":k!=null||void 0,"data-variant":S!=="default"?S:void 0,"data-wide-left":h||void 0,[zl]:"body",className:te.className,style:te.style,...O,children:g.jsx(Cl,{disabled:n,leading:ue,leadingStyle:l,contentStyle:c,trailing:d,trailingStyle:f,wideLeft:h,children:Z})});return m!=null?g.jsx(tf,{content:m,contentKey:b,children:fe}):fe}function aT({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:E,lockPositionWhileOpen:R,dismissOnReferenceScroll:T}){return g.jsx(j9,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:d,closeOnSelect:f,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:E,lockPositionWhileOpen:R,dismissOnReferenceScroll:T,children:e})}function zq(e){return ko()===null?g.jsx(R4,{children:g.jsx(aT,{...e})}):g.jsx(aT,{...e})}function PO(e,t,n){const{ref:r,...s}=n,a=kA({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function Pq({children:e,disabled:t=!1}){const{getTriggerProps:n}=Wi("LegacyMenu.Trigger");return PO(e,t,n())}function $q({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Wi("LegacyMenu.HoverTrigger");v.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return PO(e,n,{...l,onPointerDown:Gu(void 0,Gu(l.onPointerDown,c=>{c.button===2&&a(!1)})),onContextMenu:Gu(void 0,Gu(l.onContextMenu,c=>{a(!1),c.stopPropagation()})),onClick:Gu(t,c=>{l.onClick?.(c)})})}const Bq=Object.assign(jO,{useContext:V5}),Xr=Object.assign(zq,{useContext:uO,useLayerContext:oq,Trigger:Pq,HoverTrigger:$q,Content:iq,Item:AO,CheckboxItem:J5,TextItem:gq,SwitchItem:hq,Section:cq,SearchInput:lq,EmptyState:sq,LoadingState:aq,ExpandableSection:X5,ExpandableSectionTrigger:Z5,ExpandableSectionContent:Q5,SubMenu:Bq,SubMenuItem:dq,SubMenuTrigger:fq,SubMenuContent:pq,VirtualizedContent:jq,VirtualizedItem:Lq,VirtualizedSectionHeader:yq}),$O=v.createContext(void 0);function Kx(){const e=v.useContext($O);if(e===void 0)throw new Error(Nn(64));return e}let Fq=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Fh={tabActivationDirection:e=>({[Fq.activationDirection]:e})},BO=v.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:d,style:f,...h}=t,m=t.defaultValue!==void 0,b=v.useRef([]),[y,k]=v.useState(()=>new Map),[S,E]=Sl({controlled:d,default:s,name:"Tabs",state:"value"}),R=d!==void 0,[T,C]=v.useState(()=>new Map),_=v.useRef(void 0),L=v.useCallback(fe=>{if(fe===void 0)return null;for(const[ge,_e]of T.entries())if(_e!=null&&fe===(_e.value??_e.index))return ge;return null},[T]),[N,A]=v.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:$,tabActivationDirection:z}=N;let I=z,Y=!1;$!==S&&(I=lT($,S,l,T),Y=$!=null&&S!=null&&L(S)==null);const H=Y?$:S,q=$!==H||z!==I;Ge(()=>{q&&A({previousValue:H,tabActivationDirection:I})},[H,q,I]);const D=We((fe,ge)=>{const _e=lT(S,fe,l,T);ge.activationDirection=_e,a?.(fe,ge),!ge.isCanceled&&E(fe)}),F=We((fe,ge)=>{a?.(fe,xt(ge,void 0,void 0,{activationDirection:"none"}))}),U=We((fe,ge)=>{k(_e=>{if(_e.get(fe)===ge)return _e;const oe=new Map(_e);return oe.set(fe,ge),oe})}),W=We((fe,ge)=>{k(_e=>{if(!_e.has(fe)||_e.get(fe)!==ge)return _e;const oe=new Map(_e);return oe.delete(fe),oe})}),B=v.useCallback(fe=>y.get(fe),[y]),K=v.useCallback(fe=>{for(const ge of T.values())if(fe===ge?.value)return ge?.id},[T]),O=v.useMemo(()=>({getTabElementBySelectedValue:L,getTabIdByPanelValue:K,getTabPanelIdByValue:B,onValueChange:D,orientation:l,registerMountedTabPanel:U,setTabMap:C,unregisterMountedTabPanel:W,tabActivationDirection:I,value:S}),[L,K,B,D,l,U,C,W,I,S]),P=v.useMemo(()=>{for(const fe of T.values())if(fe!=null&&fe.value===S)return fe},[T,S]),V=v.useMemo(()=>{for(const fe of T.values())if(fe!=null&&!fe.disabled)return fe.value},[T]),j=v.useRef(!m),Z=v.useRef(s),te=v.useRef(m),se=v.useRef(!1);Ge(()=>{if(R)return;function fe(ye,Se){E(ye),A(Oe=>Oe.previousValue===ye&&Oe.tabActivationDirection==="none"?Oe:{previousValue:ye,tabActivationDirection:"none"}),F(ye,Se),j.current=!1}if(T.size===0){se.current&&S!==null&&!_.current?.isConnected&&fe(null,g1);return}se.current=!0,_.current=T.keys().next().value;const ge=P?.disabled,_e=P==null&&S!==null;if(!ge&&S===Z.current&&(te.current=!1),te.current&&ge&&S===Z.current)return;const oe=j.current;if(ge||_e){const ye=V??null;if(S===ye){j.current=!1;return}let Se=g1;oe?Se=b1:ge&&(Se=GC),fe(ye,Se);return}oe&&P!=null&&(F(S,b1),j.current=!1)},[V,R,F,P,E,T,S]);const le=mn("div",t,{state:{orientation:l,tabActivationDirection:I},ref:n,props:h,stateAttributesMapping:Fh});return g.jsx($O.Provider,{value:O,children:g.jsx(dx,{elementsRef:b,children:le})})});function lT(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[d,f]of r.entries()){if(f==null)continue;const h=f.value??f.index;if(e===h&&(s=d),t===h&&(a=d),s!=null&&a!=null)break}if(s==null||a==null)return s!==a&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const l=s.getBoundingClientRect(),c=a.getBoundingClientRect();if(n==="horizontal"){if(c.left<l.left)return"left";if(c.left>l.left)return"right"}else{if(c.top<l.top)return"up";if(c.top>l.top)return"down"}return"none"}const FO=v.createContext(void 0);function UO(){const e=v.useContext(FO);if(e===void 0)throw new Error(Nn(65));return e}const qO=v.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:d=!0,style:f,...h}=t,{value:m,getTabPanelIdByValue:b,orientation:y,tabActivationDirection:k}=Kx(),{activateOnFocus:S,highlightedTabIndex:E,onTabActivation:R,registerTabResizeObserverElement:T,setHighlightedTabIndex:C,tabsListElement:_}=UO(),L=Il(c),N=v.useMemo(()=>({disabled:s,id:L,value:l}),[s,L,l]),{compositeProps:A,compositeRef:$,index:z}=RA({metadata:N}),I=l===m,Y=v.useRef(!1),H=v.useRef(null);Ge(()=>{const j=H.current;if(j)return T(j)},[T]),Ge(()=>{if(Y.current){Y.current=!1;return}if(!(I&&z>-1&&E!==z))return;const j=_;if(j!=null){const Z=ar(Vt(j));if(Z&&dt(j,Z))return}s||C(z)},[I,z,E,C,s,_]);const{getButtonProps:q,buttonRef:D}=Ol({disabled:s,native:d,focusableWhenDisabled:!0}),F=b(l),U=v.useRef(!1),W=v.useRef(!1);function B(j){I||s||R(l,xt(Ei,j.nativeEvent,void 0,{activationDirection:"none"}))}function K(j){I||(z>-1&&!s&&C(z),!s&&S&&(!U.current||U.current&&W.current)&&R(l,xt(Ei,j.nativeEvent,void 0,{activationDirection:"none"})))}function O(j){if(I||s)return;U.current=!0;function Z(){U.current=!1,W.current=!1}(!j.button||j.button===0)&&(W.current=!0,Vt(j.currentTarget).addEventListener("pointerup",Z,{once:!0}))}return mn("button",t,{state:{disabled:s,active:I,orientation:y,tabActivationDirection:k},ref:[n,D,$,H],props:[A,{role:"tab","aria-controls":F,"aria-selected":I,id:L,onClick:B,onFocus:K,onPointerDown:O,[GA]:I?"":void 0,onKeyDownCapture(){Y.current=!0}},h,q],stateAttributesMapping:Fh})});function Uq(){return Vn}function qq(){return!1}function Hq(){return!0}function Gq(){return Xv.useSyncExternalStore(Uq,qq,Hq)}const Vq='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let el=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const Wq=v.createContext(void 0),Kq={disableStyleElements:!1};function HO(){return v.useContext(Wq)??Kq}const Yq={...Fh,activeTabPosition:()=>null,activeTabSize:()=>null},GO=v.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:d}=HO(),{getTabElementBySelectedValue:f,orientation:h,tabActivationDirection:m,value:b}=Kx(),{tabsListElement:y,registerIndicatorUpdateListener:k}=UO(),S=Gq(),E=l$();v.useEffect(()=>k(E),[k,E]);let R=0,T=0,C=0,_=0,L=0,N=0,A=!1;if(b!=null&&y!=null){const D=f(b);if(D!=null){A=!0;const{width:F,height:U}=WE(D),{width:W,height:B}=WE(y),K=D.getBoundingClientRect(),O=y.getBoundingClientRect(),P=W>0?O.width/W:1,V=B>0?O.height/B:1;if(Math.abs(P)>Number.EPSILON&&Math.abs(V)>Number.EPSILON){const Z=K.left-O.left,te=K.top-O.top;R=Z/P+y.scrollLeft-y.clientLeft,C=te/V+y.scrollTop-y.clientTop}else R=D.offsetLeft,C=D.offsetTop;L=F,N=U,T=y.scrollWidth-R-L,_=y.scrollHeight-C-N}}const $=A?{left:R,right:T,top:C,bottom:_}:null,z=A?{width:L,height:N}:null,I=A?{[el.activeTabLeft]:`${R}px`,[el.activeTabRight]:`${T}px`,[el.activeTabTop]:`${C}px`,[el.activeTabBottom]:`${_}px`,[el.activeTabWidth]:`${L}px`,[el.activeTabHeight]:`${N}px`}:void 0,Y=A&&L>0&&N>0,q=mn("span",t,{state:{orientation:h,activeTabPosition:$,activeTabSize:z,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:I,hidden:!Y},c,{suppressHydrationWarning:!0}],stateAttributesMapping:Yq});return b==null?null:g.jsxs(v.Fragment,{children:[q,S&&a&&g.jsx("script",{nonce:d,dangerouslySetInnerHTML:{__html:Vq},suppressHydrationWarning:!0})]})}),VO=v.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...d}=t,{onValueChange:f,orientation:h,value:m,setTabMap:b,tabActivationDirection:y}=Kx(),[k,S]=v.useState(0),[E,R]=v.useState(null),T=v.useRef(new Set),C=v.useRef(new Set),_=v.useRef(null);Ge(()=>{if(typeof ResizeObserver>"u")return;const Y=new ResizeObserver(()=>{T.current.forEach(H=>{H()})});return _.current=Y,E&&Y.observe(E),C.current.forEach(H=>{Y.observe(H)}),()=>{Y.disconnect(),_.current=null}},[E]);const L=We(Y=>(T.current.add(Y),()=>{T.current.delete(Y)})),N=We(Y=>(C.current.add(Y),_.current?.observe(Y),()=>{C.current.delete(Y),_.current?.unobserve(Y)})),A=We((Y,H)=>{Y!==m&&f(Y,H)}),$={orientation:h,tabActivationDirection:y},z={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},I=v.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:k,registerIndicatorUpdateListener:L,registerTabResizeObserverElement:N,onTabActivation:A,setHighlightedTabIndex:S,tabsListElement:E}),[r,k,L,N,A,S,E]);return g.jsx(FO.Provider,{value:I,children:g.jsx(qF,{render:l,className:s,style:c,state:$,refs:[n,R],props:[z,d],stateAttributesMapping:Fh,highlightedIndex:k,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:S,onMapChange:b,disabledIndices:fo})})}),uT={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kzQI83:"ui-1iyjqo2",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},default:{kWkggS:"ui-flfp0o",$$css:!0}},Xq={sm:{kmVPX3:"ui-1e29tyv",kaIpWk:"ui-1sxf85j",$$css:!0},md:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kmVPX3:"ui-1hbkpea",kaIpWk:"ui-1043rbw",$$css:!0}},Zq={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1ja2u2z",kfzvcC:"ui-47corl",kB7OPa:"ui-9f619",kbCHJM:"ui-vbikie",k87sOh:"ui-10uur0e",kzqmXN:"ui-offw1",kZKoxP:"ui-1gezbiy",kWkggS:"ui-i07v4r",k1ekBW:"ui-98hnz2",kIyJzY:"ui-1bqoo3p ui-sagj69",kAMwcw:"ui-1tkypeg",$$css:!0}},Qq={sm:{kaIpWk:"ui-1bl94mz",$$css:!0},md:{kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kaIpWk:"ui-1e1y6u3",$$css:!0}},Gb={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzQI83:"ui-1c4vz4f",kmuXW:"ui-2lah0s",kCS8Yb:"ui-dl72j9",khDVqt:"ui-uxw1ft",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},fullWidth:{kzQI83:"ui-1iyjqo2",kCS8Yb:"ui-1r8uery",$$css:!0},compact:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w ui-x05fgs",$$css:!0}},Jq={sm:{kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1bl94mz",$$css:!0},md:{kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1e1y6u3",$$css:!0},lg:{kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1e1y6u3",$$css:!0}},e8={sm:{kpe85a:"ui-g31tg3",kE3dHu:"ui-43mhey",kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kpe85a:"ui-17v7654",kE3dHu:"ui-1lfpczk",kaIpWk:"ui-1043rbw",$$css:!0},lg:{kpe85a:"ui-1yxiud8",kE3dHu:"ui-yab65l",kaIpWk:"ui-1043rbw",$$css:!0}},WO=v.createContext(null);function t8(){const e=v.use(WO);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function n8({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",disabled:a=!1,fullWidth:l=!1,children:c,"aria-label":d,"aria-labelledby":f,...h}){const m=v.useMemo(()=>({variant:r,size:s,disabled:a,fullWidth:l}),[a,l,s,r]);return g.jsx(WO.Provider,{value:m,children:g.jsx(BO,{...h,value:e,defaultValue:t,onValueChange:n,"data-component":"segmented-control","data-size":s,"data-variant":r,...{0:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-eq5yr9 ui-193iq5w"},1:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-193iq5w ui-h8yej3"}}[!!l<<0],children:g.jsxs(VO,{activateOnFocus:!0,"aria-label":d,"aria-labelledby":f,"data-component":"segmented-control-list",...Lt(uT.base,ui[s],r==="default"&&uT.default,r==="default"&&Xq[s]),children:[c,r==="default"?g.jsx(GO,{"data-component":"segmented-control-indicator",...Lt(Zq.base,Qq[s])}):null]})})})}function r8({value:e,disabled:t=!1,children:n,...r}){const s=t8();return g.jsx(qO,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,...Lt(Gb.base,ax.root,s.size==="sm"?Gi.root:Fi.root,s.variant==="default"?Jq[s.size]:e8[s.size],s.variant==="compact"&&Gb.compact,s.fullWidth&&Gb.fullWidth),children:n})}const pc=Object.assign(n8,{Item:r8}),KO=v.createContext(null),YO=v.createContext(null);function _s(){const e=v.useContext(KO);if(e===null)throw new Error(Nn(60));return e}function XO(){const e=v.useContext(YO);if(e===null)throw new Error(Nn(61));return e}const ct={id:et(e=>e.id),labelId:et(e=>e.labelId),modal:et(e=>e.modal),multiple:et(e=>e.multiple),items:et(e=>e.items),itemToStringLabel:et(e=>e.itemToStringLabel),itemToStringValue:et(e=>e.itemToStringValue),isItemEqualToValue:et(e=>e.isItemEqualToValue),value:et(e=>e.value),hasSelectedValue:et(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Wo(t,r)!==""}),hasNullItemLabel:et((e,t)=>t?v6(e.items):!1),open:et(e=>e.open),mounted:et(e=>e.mounted),forceMount:et(e=>e.forceMount),transitionStatus:et(e=>e.transitionStatus),openMethod:et(e=>e.openMethod),activeIndex:et(e=>e.activeIndex),selectedIndex:et(e=>e.selectedIndex),isActive:et((e,t)=>e.activeIndex===t),isSelected:et((e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(s=>ra(t,s,n)):ra(t,r,n)}),isSelectedByFocus:et((e,t)=>e.selectedIndex===t),popupProps:et(e=>e.popupProps),triggerProps:et(e=>e.triggerProps),triggerElement:et(e=>e.triggerElement),positionerElement:et(e=>e.positionerElement),listElement:et(e=>e.listElement),popupSide:et(e=>e.popupSide),scrollUpArrowVisible:et(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:et(e=>e.scrollDownArrowVisible),hasScrollArrows:et(e=>e.hasScrollArrows)};function nc(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const ys=1;function ZO(e,t){return Math.max(0,e-t)}function i8(e,t){if(t<=0)return 0;const n=nc(e,0,t),r=n,s=t-n,a=r<=ys,l=s<=ys;return a&&l?r<=s?0:t:a?0:l?t:n}function s8(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:d,form:f,autoComplete:h,disabled:m=!1,readOnly:b=!1,required:y=!1,modal:k=!0,actionsRef:S,inputRef:E,onOpenChangeComplete:R,items:T,multiple:C=!1,itemToStringLabel:_,itemToStringValue:L,isItemEqualToValue:N=g6,highlightItemOnHover:A=!0,children:$}=e,{clearErrors:z}=vN(),{setDirty:I,setTouched:Y,setFocused:H,validityData:q,setFilled:D,name:F,disabled:U,validation:W,validationMode:B}=Sh(),K=fx({id:t}),O=U||m,P=F??d,[V,j]=Sl({controlled:n,default:C?r??fo:r,name:"Select",state:"value"}),[Z,te]=Sl({controlled:a,default:l,name:"Select",state:"open"}),se=v.useRef([]),ue=v.useRef([]),le=v.useRef(null),fe=v.useRef(null),ge=v.useRef(0),_e=v.useRef(null),oe=v.useRef([]),ye=v.useRef(!1),Se=v.useRef(null),Oe=v.useRef(null),we=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ke=v.useRef(!1),{mounted:De,setMounted:Me,transitionStatus:je}=Hc(Z),{openMethod:He,triggerProps:be}=H$(Z),Re=Ir(()=>new D_({id:K,labelId:void 0,modal:k,multiple:C,itemToStringLabel:_,itemToStringValue:L,isItemEqualToValue:N,value:V,open:Z,mounted:De,transitionStatus:je,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ee=pt(Re,ct.activeIndex),ce=pt(Re,ct.selectedIndex),J=pt(Re,ct.triggerElement),re=pt(Re,ct.positionerElement),xe=SF(He),$e=He??xe??null,Xe=v.useMemo(()=>C?"":Wo(V,L),[C,V,L]),Ye=v.useMemo(()=>C&&Array.isArray(V)?V.map(Ne=>Wo(Ne,L)):Wo(V,L),[C,V,L]),ht=_n(Re.state.triggerElement),Qe=We(()=>Ye);yN(ht,K,V,Qe,!O,d);const yt=v.useRef(V),kt=C?Array.isArray(V)&&V.length>0:V!=null&&Wo(V,L)!=="";Ge(()=>{V!==yt.current&&Re.set("forceMount",!0)},[Re,V]),Ge(()=>{D(kt)},[kt,D]),Ge(function(){const Ie=oe.current;let ut;if(C){const Be=Array.isArray(V)?V:[];if(Be.length===0)ut=null;else{const Rt=Be[Be.length-1],wt=uc(Ie,Rt,N);ut=wt===-1?null:wt}}else{const Be=uc(Ie,V,N);ut=Be===-1?null:Be}ut===null&&(Oe.current=null),!Z&&Re.set("selectedIndex",ut)},[kt,C,Z,V,oe,N,Re,Oe]);function nt(Ne){const Ie=q.initialValue;return Array.isArray(Ne)&&Array.isArray(Ie)?!J3(Ne,Ie,(ut,Be)=>ra(ut,Be,N)):Ne!==Ie}rN(V,()=>{z(P),I(nt(V)),W.change(V)});const Tt=We((Ne,Ie)=>{c?.(Ne,Ie),!Ie.isCanceled&&(te(Ne),!Ne&&(Ie.reason===lh||Ie.reason===Iv)&&(Y(!0),H(!1),B==="onBlur"&&W.commit(V)))}),_t=We(()=>{Me(!1),Re.update({activeIndex:null,openMethod:null}),R?.(!1)});xo({enabled:!S,open:Z,ref:le,onComplete(){Z||_t()}}),v.useImperativeHandle(S,()=>({unmount:_t}),[_t]);const st=We((Ne,Ie)=>{s?.(Ne,Ie),!Ie.isCanceled&&j(Ne)}),vt=We(()=>{const Ne=Re.state.listElement||le.current;if(!Ne)return;const Ie=ZO(Ne.scrollHeight,Ne.clientHeight),ut=i8(Ne.scrollTop,Ie),Be=ut>0,Rt=ut<Ie;Re.state.scrollUpArrowVisible!==Be&&Re.set("scrollUpArrowVisible",Be),Re.state.scrollDownArrowVisible!==Rt&&Re.set("scrollDownArrowVisible",Rt)}),Dt=W_({open:Z,onOpenChange:Tt,elements:{reference:J,floating:re}}),Pt=iP(Dt,{enabled:!b&&!O,event:"mousedown"}),At=Hv(Dt),X=k$(Dt,{enabled:!b&&!O,listRef:se,activeIndex:ee,selectedIndex:ce,disabledIndices:fo,onNavigate(Ne){Ne===null&&!Z||Re.set("activeIndex",Ne)},focusItemOnHover:A}),he=S$(Dt,{enabled:!b&&!O&&(Z||!C),listRef:ue,activeIndex:ee,selectedIndex:ce,disabledIndices:Ne=>CA(se.current[Ne]),onMatch(Ne){Z?Re.set("activeIndex",Ne):st(oe.current[Ne],xt("none"))},onTyping(Ne){ye.current=Ne}}),Le=v.useMemo(()=>{const Ne=Pi(he.reference,X.reference,At.reference,Pt.reference,be);return K&&(Ne.id=K),Ne},[Pt.reference,he.reference,X.reference,At.reference,be,K]),Ze=v.useMemo(()=>Pi(Jv,he.floating,X.floating,At.floating),[he.floating,X.floating,At.floating]),St=X.item??Ln;O_(()=>{Re.update({popupProps:Ze,triggerProps:Le})}),Ge(()=>{Re.update({id:K,modal:k,multiple:C,value:V,open:Z,mounted:De,transitionStatus:je,popupProps:Ze,triggerProps:Le,items:T,itemToStringLabel:_,itemToStringValue:L,isItemEqualToValue:N,openMethod:$e})},[Re,K,k,C,V,Z,De,je,Ze,Le,T,_,L,N,$e]);const at=v.useMemo(()=>({store:Re,name:P,required:y,disabled:O,readOnly:b,multiple:C,highlightItemOnHover:A,setValue:st,setOpen:Tt,listRef:se,popupRef:le,scrollHandlerRef:fe,handleScrollArrowVisibility:vt,scrollArrowsMountedCountRef:ge,itemProps:St,valueRef:_e,valuesRef:oe,labelsRef:ue,typingRef:ye,selectionRef:we,firstItemTextRef:Se,selectedItemTextRef:Oe,validation:W,onOpenChangeComplete:R,alignItemWithTriggerActiveRef:ke,initialValueRef:yt}),[Re,P,y,O,b,C,A,st,Tt,St,W,R,vt]),qe=co(E,W.inputRef),Ee=C&&Array.isArray(V)&&V.length>0,Ue=C?void 0:P,ze=v.useMemo(()=>!C||!Array.isArray(V)||!P?null:V.map(Ne=>{const Ie=Wo(Ne,L);return g.jsx("input",{type:"hidden",form:f,name:P,value:Ie,disabled:O},Ie)}),[C,V,f,P,L,O]);return g.jsx(KO.Provider,{value:at,children:g.jsxs(YO.Provider,{value:Dt,children:[$,g.jsx("input",{...W.getValidationProps(O,{onFocus(){Re.state.triggerElement?.focus({focusVisible:!0})},onChange(Ne){if(Ne.nativeEvent.defaultPrevented||O||b)return;const Ie=Ne.currentTarget.value,ut=xt(Ei,Ne.nativeEvent);function Be(){if(C)return;const Rt=Ie.toLowerCase();let wt=oe.current.findIndex(Rn=>Wo(Rn,L).toLowerCase()===Rt||CN(Rn,_).toLowerCase()===Rt);wt===-1&&(wt=oe.current.findIndex((Rn,Lr)=>{const zr=ue.current[Lr];return zr!=null&&zr.toLowerCase()===Rt}));const $t=wt===-1?void 0:oe.current[wt];$t!=null&&st($t,ut)}Re.set("forceMount",!0),queueMicrotask(Be)}}),id:K&&Ue==null?`${K}-hidden-input`:void 0,form:f,name:Ue,autoComplete:h,value:Xe,disabled:O,required:y&&!Ee,readOnly:b,ref:qe,style:P?R2:QC,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ze]})})}const Bd=2,o8=400,a8={...Wz,...Vc,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},l8=v.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:d,...f}=t,{setTouched:h,setFocused:m,validationMode:b,state:y,disabled:k}=Sh(),{labelId:S}=ux(),{store:E,setOpen:R,selectionRef:T,validation:C,readOnly:_,required:L,alignItemWithTriggerActiveRef:N,disabled:A}=_s(),$=k||A||l,z=pt(E,ct.open),I=pt(E,ct.mounted),Y=pt(E,ct.value),H=pt(E,ct.triggerProps),q=pt(E,ct.positionerElement),D=pt(E,ct.listElement),F=pt(E,ct.popupSide),U=pt(E,ct.id),W=pt(E,ct.labelId),B=pt(E,ct.hasSelectedValue),K=I&&q?F:null,O=a??U,P=k6(S,W);fx({id:O});const V=_n(q),j=v.useRef(null),{getButtonProps:Z,buttonRef:te}=Ol({disabled:$,native:c}),se=We(ye=>{E.set("triggerElement",ye)}),ue=pi(),le=pi(),fe=pi();v.useEffect(()=>{if(z)return fe.start(o8,()=>{T.current.allowUnselectedMouseUp=!0,T.current.allowSelectedMouseUp=!0}),()=>{fe.clear()};T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},le.clear()},[z,T,le,fe]);const ge=Pi(H,{id:O,role:"combobox","aria-expanded":z?"true":"false","aria-haspopup":"listbox","aria-controls":z?D?.id??kp(q)?.id:void 0,"aria-labelledby":P,"aria-readonly":_||void 0,"aria-required":L||void 0,tabIndex:$?-1:0,onFocus(ye){m(!0),z&&N.current&&R(!1,xt(Ei,ye.nativeEvent)),ue.start(0,()=>{E.set("forceMount",!0)})},onBlur(ye){dt(q,ye.relatedTarget)||(h(!0),m(!1),b==="onBlur"&&C.commit(Y))},onMouseDown(ye){if(z)return;const Se=Vt(ye.currentTarget);function Oe(we){if(!j.current)return;const ke=we.target;if(dt(j.current,ke)||dt(V.current,ke))return;const De=S6(j.current);we.clientX>=De.left-Bd&&we.clientX<=De.right+Bd&&we.clientY>=De.top-Bd&&we.clientY<=De.bottom+Bd||R(!1,xt(i2,we))}le.start(0,()=>{Se.addEventListener("mouseup",Oe,{once:!0})})}},f,Z),_e=C.getValidationProps($,ge);_e.role="combobox";const oe={...y,open:z,disabled:$,value:Y,readOnly:_,popupSide:K,placeholder:!B};return mn("button",t,{ref:[n,j,te,se],state:oe,stateAttributesMapping:a8,props:_e})}),u8={value:()=>null},c8=v.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...d}=t,{store:f,valueRef:h}=_s(),m=pt(f,ct.value),b=pt(f,ct.items),y=pt(f,ct.itemToStringLabel),k=pt(f,ct.hasSelectedValue),S=!k&&l!=null&&a==null,E=pt(f,ct.hasNullItemLabel,S),R={value:m,placeholder:!k};let T=null;return typeof a=="function"?T=a(m):a!=null?T=a:!k&&l!=null&&!E?T=l:Array.isArray(m)?T=x6(m,b,y):T=_N(m,b,y),mn("span",t,{state:R,ref:[n,h],props:[{children:T},d],stateAttributesMapping:u8})}),f8=v.createContext(void 0),d8=v.forwardRef(function(t,n){const{store:r}=_s(),s=pt(r,ct.mounted),a=pt(r,ct.forceMount);return s||a?g.jsx(f8.Provider,{value:!0,children:g.jsx(X2,{ref:n,...t})}):null}),p8={...Uc,...go},h8=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c}=_s(),d=pt(c,ct.open),f=pt(c,ct.mounted),h=pt(c,ct.transitionStatus);return mn("div",t,{state:{open:d,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:p8})}),QO=v.createContext(void 0);function JO(){const e=v.useContext(QO);if(!e)throw new Error(Nn(59));return e}function Gp(e,t){e&&Object.assign(e.style,t)}const eM={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},m8={position:"fixed"},g8=v.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:d="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S,alignItemWithTrigger:E=!0,collisionAvoidance:R=W2,style:T,...C}=t,{store:_,listRef:L,labelsRef:N,alignItemWithTriggerActiveRef:A,selectedItemTextRef:$,valuesRef:z,initialValueRef:I,popupRef:Y,setValue:H}=_s(),q=XO(),D=pt(_,ct.open),F=pt(_,ct.mounted),U=pt(_,ct.modal),W=pt(_,ct.value),B=pt(_,ct.openMethod),K=pt(_,ct.positionerElement),O=pt(_,ct.triggerElement),P=pt(_,ct.isItemEqualToValue),V=pt(_,ct.transitionStatus),j=v.useRef(null),Z=v.useRef(null),[te,se]=v.useState(E),ue=F&&te&&B!=="touch";!F&&te!==E&&se(E),Ge(()=>{F||(ct.scrollUpArrowVisible(_.state)&&_.set("scrollUpArrowVisible",!1),ct.scrollDownArrowVisible(_.state)&&_.set("scrollDownArrowVisible",!1))},[_,F]),v.useImperativeHandle(A,()=>ue),M6((ue||U)&&D,B==="touch",K,O);const le=px({anchor:r,floatingRootContext:q,positionMethod:s,mounted:F,side:c,sideOffset:f,align:d,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S??ue,collisionAvoidance:R,keepMounted:!0}),fe=ue?"none":le.side,ge=ue?m8:le.positionerStyles,_e={open:D,side:fe,align:le.align,anchorHidden:le.anchorHidden};Ge(()=>{_.set("popupSide",le.side)},[_,le.side]);const oe=We(ke=>{_.set("positionerElement",ke)}),ye=hx(t,_e,{styles:ge,transitionStatus:V,props:C,refs:[n,oe],hidden:!F,inert:!D}),Se=v.useRef(0),Oe=We(ke=>{if(ke.size===0&&Se.current===0||z.current.length===0)return;const De=Se.current;if(Se.current=ke.size,ke.size===De)return;const Me=xt(Ei);if(De!==0&&!_.state.multiple&&W!==null&&uc(z.current,W,P)===-1){const He=I.current,Re=He!=null&&uc(z.current,He,P)!==-1?He:null;H(Re,Me),Re===null&&(_.set("selectedIndex",null),$.current=null)}if(De!==0&&_.state.multiple&&Array.isArray(W)){const je=be=>uc(z.current,be,P)!==-1,He=W.filter(be=>je(be));(He.length!==W.length||He.some(be=>!b6(W,be,P)))&&(H(He,Me),He.length===0&&(_.set("selectedIndex",null),$.current=null))}if(D&&ue){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const je={height:""};Gp(K,je),Gp(Y.current,je)}}),we=v.useMemo(()=>({...le,side:fe,alignItemWithTriggerActive:ue,setControlledAlignItemWithTrigger:se,scrollUpArrowRef:j,scrollDownArrowRef:Z}),[le,fe,ue,se]);return g.jsx(dx,{elementsRef:L,labelsRef:N,onMapChange:Oe,children:g.jsxs(QO.Provider,{value:we,children:[F&&U&&g.jsx(D$,{inert:I$(!D),cutout:O}),ye]})})}),Fd="base-ui-disable-scrollbar",Gy={className:Fd,getElement(e){return g.jsx("style",{nonce:e,href:Fd,precedence:"base-ui:low",children:`.${Fd}{scrollbar-width:none}.${Fd}::-webkit-scrollbar{display:none}`})}},b8={...Uc,...go},y8=v.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:d,popupRef:f,onOpenChangeComplete:h,setOpen:m,valueRef:b,firstItemTextRef:y,selectedItemTextRef:k,multiple:S,handleScrollArrowVisibility:E,scrollHandlerRef:R,listRef:T,highlightItemOnHover:C}=_s(),{side:_,align:L,alignItemWithTriggerActive:N,isPositioned:A,setControlledAlignItemWithTrigger:$}=JO(),z=xF()!=null,I=XO(),Y=Ci(),{nonce:H,disableStyleElements:q}=HO(),D=pt(d,ct.id),F=pt(d,ct.open),U=pt(d,ct.openMethod),W=pt(d,ct.mounted),B=pt(d,ct.popupProps),K=pt(d,ct.transitionStatus),O=pt(d,ct.triggerElement),P=pt(d,ct.positionerElement),V=pt(d,ct.listElement),j=v.useRef(!1),Z=v.useRef(!1),te=v.useRef({}),se=yl(),ue=We(_e=>{if(!P||!f.current||!Z.current)return;if(j.current||!N){E();return}const oe=P.style.top==="0px",ye=P.style.bottom==="0px";if(!oe&&!ye){E();return}const Se=fT(P),Oe=rc(P.getBoundingClientRect().height,"y",Se),we=Vt(P),ke=kn(P),De=ke.getComputedStyle(P),Me=parseFloat(De.marginTop),je=parseFloat(De.marginBottom),He=cT(ke.getComputedStyle(f.current)),be=Math.min(we.documentElement.clientHeight-Me-je,He),Re=_e.scrollTop,ee=Ud(_e);let ce=0,J=null,re=!1,xe=!1;const $e=Qe=>{P.style.height=`${Qe}px`},Xe=(Qe,yt)=>{const kt=nc(Qe,0,be-Oe);kt>0&&$e(Oe+kt),_e.scrollTop=yt,be-(Oe+kt)<=ys&&(j.current=!0),E()},Ye=oe?ee-Re:Re,ht=Math.min(Oe+Ye,be);if(ce=ht,Ye<=ys){Xe(Ye,oe?ee:0);return}if(be-ht>ys)oe?xe=!0:J=0;else if(re=!0,ye&&Re<ee){const Qe=Oe+Ye-be;J=Re-(Ye-Qe)}if(ce=Math.ceil(ce),ce!==0&&$e(ce),xe||J!=null){const Qe=Ud(_e),yt=xe?Qe:nc(J,0,Qe);Math.abs(_e.scrollTop-yt)>ys&&(_e.scrollTop=yt)}(re||ce>=be-ys)&&(j.current=!0),E()});v.useImperativeHandle(R,()=>ue,[ue]),xo({open:F,ref:f,onComplete(){F&&h?.(!0)}});const le={open:F,transitionStatus:K,side:_,align:L};Ge(()=>{!P||!f.current||Object.keys(te.current).length||(te.current={top:P.style.top||"0",left:P.style.left||"0",right:P.style.right,height:P.style.height,bottom:P.style.bottom,minHeight:P.style.minHeight,maxHeight:P.style.maxHeight,marginTop:P.style.marginTop,marginBottom:P.style.marginBottom})},[f,P]),Ge(()=>{F||N||(Z.current=!1,j.current=!1,Gp(P,te.current))},[F,N,P,f]),Ge(()=>{const _e=f.current;if(!F||!O||!P||!_e||N&&!A||d.state.transitionStatus==="ending")return;if(!N){Z.current=!0,se.request(E),_e.style.removeProperty("--transform-origin");return}const oe=v8(_e);_e.style.removeProperty("--transform-origin");try{let ye=k.current;ye?.isConnected||(ye=!ct.hasSelectedValue(d.state)&&y.current?.isConnected?y.current:null);const Se=b.current,Oe=kn(P),we=Oe.getComputedStyle(P),ke=Oe.getComputedStyle(_e),De=Vt(O),Me=fT(O),je=qd(O.getBoundingClientRect(),Me),He=qd(P.getBoundingClientRect(),Me),be=je.height,Re=V||_e,ee=Re.scrollHeight,ce=parseFloat(ke.borderBottomWidth),J=parseFloat(we.marginTop)||10,re=parseFloat(we.marginBottom)||10,xe=parseFloat(we.minHeight)||100,$e=cT(ke),Xe=5,Ye=5,ht=20,Qe=De.documentElement.clientHeight-J-re,yt=De.documentElement.clientWidth,kt=Qe-je.bottom+be;let nt,Tt=Y==="rtl"?je.right-He.width:je.left,_t=0;if(ye&&Se){const at=qd(Se.getBoundingClientRect(),Me);nt=qd(ye.getBoundingClientRect(),Me),Tt=He.left+(Y==="rtl"?at.right-nt.right:at.left-nt.left);const qe=at.top-je.top+at.height/2;_t=nt.top-He.top+nt.height/2-qe}const st=kt+_t+re+ce;let vt=Math.min(Qe,st);const Dt=Qe-J-re,Pt=st-vt,At=yt-Ye;P.style.left=`${nc(Tt,Xe,At-He.width)}px`,P.style.height=`${vt}px`,P.style.maxHeight="none",P.style.marginTop=`${J}px`,P.style.marginBottom=`${re}px`,_e.style.height="100%";const X=Ud(Re),he=Pt>=X-ys;he&&(vt=Math.min(Qe,He.height)-(Pt-X));const Le=je.top<ht||je.bottom>Qe-ht||Math.ceil(vt)+ys<Math.min(ee,xe),Ze=(Oe.visualViewport?.scale??1)!==1&&yo;if(Le||Ze){Z.current=!0,Gp(P,te.current),$(!1);return}const St=Math.max(xe,vt);if(he){const at=Math.max(0,Qe-st);P.style.top=He.height>=Dt?"0":`${at}px`,P.style.height=`${vt}px`,Re.scrollTop=Ud(Re)}else P.style.bottom="0",Re.scrollTop=Pt;if(nt){const at=He.top,qe=He.height,Ee=nt.top+nt.height/2,Ue=qe>0?(Ee-at)/qe*100:50,ze=nc(Ue,0,100);_e.style.setProperty("--transform-origin",`50% ${ze}%`)}(St===Qe||vt>=$e)&&(j.current=!0),E(),C&&d.state.selectedIndex===null&&d.state.activeIndex===null&&T.current[0]!=null&&d.set("activeIndex",0),Z.current=!0}finally{oe()}},[d,F,P,O,b,y,k,f,E,N,$,se,V,T,C,Y,A]),v.useEffect(()=>{if(!N||!P||!F)return;const _e=kn(P);function oe(ye){m(!1,xt(s2,ye))}return It(_e,"resize",oe)},[m,N,P,F]);const fe={...V?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${D}-list`},onKeyDown(_e){z&&nN.has(_e.key)&&_e.stopPropagation()},onScroll(_e){V||ue(_e.currentTarget)},...N&&{style:V?{height:"100%"}:eM}},ge=mn("div",t,{ref:[n,f],state:le,stateAttributesMapping:b8,props:[B,fe,wh(K),{className:!V&&N?Gy.className:void 0},c]});return g.jsxs(v.Fragment,{children:[!q&&Gy.getElement(H),g.jsx(rP,{context:I,modal:!1,disabled:!W,openInteractionType:U,returnFocus:l,restoreFocus:!0,children:ge})]})});function cT(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Ud(e){return ZO(e.scrollHeight,e.clientHeight)}function fT(e){return E_.getScale(e)}function rc(e,t,n){return e/n[t]}function qd(e,t){return vc({x:rc(e.x,"x",t),y:rc(e.y,"y",t),width:rc(e.width,"x",t),height:rc(e.height,"y",t)})}const dT=[["transform","none"],["scale","1"],["translate","0 0"]];function v8(e){const{style:t}=e,n={};for(const[r,s]of dT)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of dT){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const x8=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c,scrollHandlerRef:d}=_s(),{alignItemWithTriggerActive:f}=JO(),h=pt(c,ct.hasScrollArrows),m=pt(c,ct.openMethod),b=pt(c,ct.multiple),k={id:`${pt(c,ct.id)}-list`,role:"listbox","aria-multiselectable":b||void 0,onScroll(E){d.current?.(E.currentTarget)},...f&&{style:eM},className:h&&m!=="touch"?Gy.className:void 0},S=We(E=>{c.set("listElement",E)});return mn("div",t,{ref:[n,S],props:[k,l]})}),tM=v.createContext(void 0);function Yx(){const e=v.useContext(tM);if(!e)throw new Error(Nn(57));return e}const k8=v.memo(v.forwardRef(function(t,n){const{render:r,className:s,style:a,value:l=null,label:c,disabled:d=!1,nativeButton:f=!1,...h}=t,m=v.useRef(null),b=IN({label:c,textRef:m,indexGuessBehavior:MN.GuessFromOrder}),{store:y,itemProps:k,setOpen:S,setValue:E,selectionRef:R,typingRef:T,valuesRef:C,multiple:_,selectedItemTextRef:L,disabled:N,readOnly:A}=_s(),$=pt(y,ct.isActive,b.index),z=pt(y,ct.open),I=pt(y,ct.isSelected,l),Y=pt(y,ct.isSelectedByFocus,b.index),H=pt(y,ct.isItemEqualToValue),q=b.index,D=q!==-1,F=v.useRef(null);Ge(()=>{if(!D)return;const ue=C.current;return ue[q]=l,()=>{delete ue[q]}},[D,q,l,C]),Ge(()=>{if(!D)return;const ue=y.state.value;let le=ue;_&&Array.isArray(ue)&&(le=ue.length>0?ue[ue.length-1]:void 0),le!==void 0&&ra(l,le,H)&&(y.set("selectedIndex",q),m.current&&(L.current=m.current))},[D,q,_,H,y,l,L]);const U=v.useRef(null),W=v.useRef("mouse"),B=v.useRef(!1),{getButtonProps:K,buttonRef:O}=Ol({disabled:d,focusableWhenDisabled:!0,native:f,composite:!0}),P={disabled:d,selected:I,highlighted:$};function V(ue){if(N||A)return;const le=y.state.value;if(_){const fe=Array.isArray(le)?le:[],ge=I?y6(fe,l,H):[...fe,l];E(ge,xt(lb,ue))}else E(l,xt(lb,ue)),S(!1,xt(lb,ue))}function j(){R.current.dragY=0}const Z={role:"option","aria-selected":I,tabIndex:z&&$?0:-1,onKeyDown(ue){U.current=ue.key,y.set("activeIndex",q),ue.key===" "&&T.current&&ue.preventDefault()},onClick(ue){const le=ue.type==="click"&&W.current!=="touch",fe=ue.nativeEvent.pointerType,ge=le&&zv(ue.nativeEvent)&&(fe!==void 0||$),_e=le&&!ge&&!B.current;B.current=!1,!(ue.type==="keydown"&&U.current===null)&&(d||ue.type==="keydown"&&U.current===" "&&T.current||_e||(U.current=null,V(ue.nativeEvent)))},onPointerEnter(ue){W.current=ue.pointerType},onPointerMove(ue){if(ue.pointerType==="mouse"&&ue.buttons===1){const le=R.current;le.dragY+=ue.movementY,le.dragY**2>=64&&(le.allowUnselectedMouseUp=!0)}},onPointerDown(ue){W.current=ue.pointerType,B.current=!0,j()},onMouseUp(){if(j(),d||W.current==="touch"||B.current)return;const ue=!R.current.allowSelectedMouseUp&&I,le=!R.current.allowUnselectedMouseUp&&!I;ue||le||(B.current=!0,F.current?.click(),B.current=!1)}},te=mn("div",t,{ref:[O,n,b.ref,F],state:P,props:[k,Z,h,K]}),se=v.useMemo(()=>({selected:I,index:q,textRef:m,selectedByFocus:Y,hasRegistered:D}),[I,q,m,Y,D]);return g.jsx(tM.Provider,{value:se,children:te})})),pT=v.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=Yx();return r||s?g.jsx(S8,{...t,ref:n}):null}),S8=v.memo(v.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=Yx(),d=v.useRef(null),{transitionStatus:f,setMounted:h}=Hc(c),b=mn("span",e,{ref:[t,d],state:{selected:c,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:go});return xo({open:c,ref:d,onComplete(){c||h(!1)}}),b})),w8=v.memo(v.forwardRef(function(t,n){const{index:r,textRef:s,selectedByFocus:a,hasRegistered:l}=Yx(),{firstItemTextRef:c,selectedItemTextRef:d}=_s(),{render:f,className:h,style:m,...b}=t,y=v.useCallback(S=>{S&&(l&&r===0&&(c.current=S),l&&a&&(d.current=S))},[c,d,r,a,l]);return mn("div",t,{ref:[y,n,s],props:b})})),nM="lg",rM="outline",E8={"ui--default-marker":"ui--default-marker",$$css:!0},zi={base:{kysU6D:"ui-jyslct",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k63SB2:"ui-1pd3egz",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1msowdo",kGO01o:"ui-cnij5n",kZCmMZ:"ui-1uxnm1j",$$css:!0},sizeMd:{kLKAdn:"ui-493x5y",kwRFfy:"ui-1tlft3r",kGO01o:"ui-b6dno7",kZCmMZ:"ui-v853mj",$$css:!0},shapeRounded:{kaIpWk:"ui-1043rbw",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0},frameContentLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",keTefX:"ui-1t34h19",k71WvV:"ui-u45m27",$$css:!0},frameContentMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",keTefX:"ui-1hk7dha",k71WvV:"ui-yy14hb",$$css:!0},frameContentHugFalseLg:{kzqmXN:"ui-lai49p",$$css:!0},frameContentHugFalseMd:{kzqmXN:"ui-u0r5jw",$$css:!0},hugFalse:{kzqmXN:"ui-h8yej3",kjj79g:"ui-13a6bvl",$$css:!0}},hT={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-1yc453h",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj",$$css:!0}},T8="sm",R8={md:zi.sizeMd,lg:zi.sizeLg},C8={md:zi.frameContentMd,lg:zi.frameContentLg},_8={md:zi.frameContentHugFalseMd,lg:zi.frameContentHugFalseLg};function N8({children:e,variant:t=rM,frame:n="container",shape:r="rounded",size:s=nM,hug:a=!0,className:l,style:c,rootStyle:d,labelStyle:f,disabled:h=!1,id:m,leading:b,trailing:y,open:k,placeholder:S,hideChevron:E=!1,ref:R,"data-popup-open":T,...C}){const _=e==null&&S!=null,L=k??(T!==void 0&&T!==!1),N=k===void 0?T:k||void 0,A=sx(t,void 0),$=Lt(mN.root,zi.base,Fi.root,ui[s],R8[s],Si.appearance,A.applyControlTone&&ox.foreground,A.applyFilledColors&&Si.colors,A.applyNonFilledBackground&&kl.background,t==="outline"&&kl.outline,L&&Si.engaged,!a&&zi.hugFalse,r==="pill"?zi.shapePill:zi.shapeRounded,n==="content"&&C8[s],n==="content"&&!a&&_8[s],d,E8),z=Lt(Ll.root,lx.root,hT.base,_&&hT.placeholder,f),I={className:"ui-78zum5 ui-6s0dn4 ui-2lah0s ui-1mh7f6w"},Y={0:{className:"ui-2lah0s ui-1mh7f6w"},1:{className:"ui-2lah0s ui-7qsbfx"}}[!!L<<0];return g.jsxs(ix,{...C,ref:R,id:m,className:nn("ui-select-trigger",$.className,l),style:{...$.style,...c},"data-popup-open":N,"data-variant":t,"data-size":s,disabled:h,children:[b!=null&&g.jsx("span",{className:I.className,style:I.style,children:b}),g.jsx("span",{className:nn("ui-select-label",z.className),style:z.style,children:_?S:e}),y!=null&&g.jsx("span",{className:I.className,style:I.style,children:y}),E?null:g.jsx(Yt,{name:"chevron-down",size:10,className:nn("ui-select-icon",Y.className),style:Y.style})]})}const mT={backdrop:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kWkggS:"ui-jbqb8w",$$css:!0},backdropZIndex:e=>[{kY2c9j:e!=null?"ui-r3buco":e,$$css:!0},{"--x-zIndex":e??void 0}]},iM=v.createContext(null);function Xx(){const e=v.useContext(iM);if(!e)throw new Error("Select internals must be used within Select");return e}function A8(){const e=Xx(),t=e.hasValue?g.jsx(c8,{}):void 0;return g.jsx(l8,{disabled:e.disabled,id:e.id,...e.ariaLabel!==void 0?{"aria-label":e.ariaLabel}:{},...e.ariaLabelledBy!==void 0?{"aria-labelledby":e.ariaLabelledBy}:{},render:e.renderTrigger??((n,r)=>g.jsx(N8,{...n,className:nn(n.className,e.className),disabled:e.disabled,frame:e.frame,hug:e.hug,hideChevron:e.hideChevron,leading:e.leading,labelStyle:e.labelStyle,open:r.open,placeholder:e.placeholder,rootStyle:e.rootStyle,trailing:e.trailing,shape:e.shape,size:e.size,variant:e.variant})),children:t})}function O8({children:e}){const t=Xx(),n=fa(),{zIndex:r,portalLayerStyles:s}=jl("popover",t.open),a=Nh(t.placement,t.offset,!1),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth;return g.jsxs(d8,{container:n??void 0,style:s,children:[g.jsx(h8,{"data-component":"select-backdrop",...Lt(mT.backdrop,r!==null&&mT.backdropZIndex(r-1))}),g.jsx(g8,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,...Th(U6),children:g.jsx(y8,{"data-component":"select-popup","data-size":t.menuSize,...Lt(X6,Eh,Z6[t.menuSize],l!==void 0?Q6(l):J6,t.contentStyle),children:g.jsx(Cs,{menuSize:t.menuSize,children:g.jsx(DB,{children:g.jsx(x8,{"aria-label":t.ariaLabel??"Select an option",...Lt(eB),children:e})})})})})]})}function M8({option:e}){Xx();const t=e.description!==void 0,n=g.jsxs(k8,{disabled:e.disabled,label:typeof e.label=="string"?e.label:void 0,value:e.value,"data-component":"select-item","data-has-description":t||void 0,...Lt(tB),children:[e.leading!=null?g.jsx("span",{...Lt(Sb,lB,t&&wb),children:e.leading}):null,g.jsxs("span",{...Lt(nB,t&&sB),children:[g.jsxs(w8,{...Lt(e.labelMeta!=null&&iB),children:[g.jsx("span",{...Lt(rB),children:e.label}),e.labelMeta!=null?g.jsx("span",{...Lt(aB),children:e.labelMeta}):null]}),t?g.jsx("span",{"data-component":"select-item-description",...Lt(oB,Gi.root),children:e.description}):null]}),e.trailing!=null?g.jsxs("span",{"data-component":"select-item-end",...Lt(Sb,pE,uB,t&&wb),children:[e.trailing,g.jsx(pT,{"data-component":"select-item-indicator",children:g.jsx(Yt,{color:"primary",name:"check","aria-hidden":!0})})]}):g.jsx(pT,{"data-component":"select-item-indicator",...Lt(Sb,pE,t&&wb),children:g.jsx(Yt,{color:"primary",name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:g.jsx(tf,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function I8({value:e,defaultValue:t,onValueChange:n,open:r,defaultOpen:s,onOpenChange:a,options:l,placeholder:c,variant:d=rM,frame:f="container",shape:h="rounded",size:m=nM,menuSize:b,contentWidth:y,matchAnchorWidth:k=!1,hug:S=!0,disabled:E=!1,className:R,renderTrigger:T,placement:C="bottom-start",offset:_=4,"aria-label":L,"aria-labelledby":N,id:A,leading:$,trailing:z,labelStyle:I,rootStyle:Y,hideChevron:H=!1,contentStyle:q,...D}){const[F,U]=wc(e,t,void 0,"Select.Root (value)"),W=F!=null&&l.some(te=>te.value===F),[B,K]=wc(r,s??!1,void 0,"Select.Root (open)"),O=b??"sm",P=v.useCallback((te,se)=>{n?.(te,se),!se.isCanceled&&U(te)},[n,U]),V=v.useCallback((te,se)=>{a?.(te,se),!se.isCanceled&&K(te)},[a,K]),j=v.useMemo(()=>({hasValue:W,variant:d,frame:f,shape:h,size:m,menuSize:O,hug:S,disabled:E,open:B,placement:C,offset:_,id:A,ariaLabel:L,ariaLabelledBy:N,placeholder:c,leading:$,trailing:z,labelStyle:I,rootStyle:Y,hideChevron:H,contentStyle:q,className:R,renderTrigger:T,contentWidth:y,matchAnchorWidth:k}),[L,N,R,q,y,E,f,S,W,H,A,B,I,$,k,_,C,c,O,Y,z,T,h,m,d]),Z=l.map(te=>({label:te.label,value:te.value}));return g.jsx(iM.Provider,{value:j,children:g.jsx(Cs,{iconSize:T8,children:g.jsxs(s8,{...D,defaultOpen:s,defaultValue:t,disabled:E,id:A,items:Z,onOpenChange:V,onValueChange:P,open:r,value:e,children:[g.jsx(A8,{}),g.jsx(O8,{children:l.map((te,se)=>g.jsx(M8,{option:te},typeof te.value=="string"||typeof te.value=="number"?String(te.value):se))})]})})})}const D8=v.createContext(void 0);function j8(e=!0){const t=v.useContext(D8);if(t===void 0&&!e)throw new Error(Nn(7));return t}const L8=v.forwardRef(function(t,n){const{className:r,defaultPressed:s=!1,disabled:a=!1,form:l,onPressedChange:c,pressed:d,render:f,type:h,value:m,nativeButton:b=!0,style:y,...k}=t,S=Il(m||void 0),E=j8(),R=E?.value??[],T=E?void 0:s,C=(a||E?.disabled)??!1,[_,L]=Sl({controlled:E?S!==void 0&&R.indexOf(S)>-1:d,default:T,name:"Toggle",state:"pressed"}),{getButtonProps:N,buttonRef:A}=Ol({disabled:C,native:b}),$={disabled:C,pressed:_},z=[A,n],I=[{"aria-pressed":_,onClick(q){const D=!_,F=xt(Ei,q.nativeEvent);c?.(D,F),!F.isCanceled&&(S&&E?.setGroupValue?.(S,D,F),!F.isCanceled&&L(D))}},k,N],Y=mn("button",t,{enabled:!E,state:$,ref:z,props:I}),H=v.useMemo(()=>({disabled:C,focusableWhenDisabled:!1}),[C]);return E?g.jsx(kF,{tag:"button",render:f,className:r,style:y,metadata:H,state:$,refs:z,props:I}):Y});function gT(e,t,n,r){return typeof e=="string"?g.jsx(Yt,{"aria-hidden":"true",name:e,rootStyle:r,size:n,variant:t}):g.jsx("span",{...SA(n),"aria-hidden":"true",children:e})}function z8({icon:e,pressedIcon:t,pressed:n,iconVariant:r,iconSize:s,iconStyle:a}){return g.jsxs("span",{className:"ui-rvj5dj ui-6s0dn4 ui-1o2pa38 ui-c8icb0 ui-47corl ui-1heor9g","aria-hidden":"true",children:[g.jsx("span",{className:"ui-1ms6mhf ui-gkxs2y ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-g01cxk ui-6rycqq ui-fimr68 ui-1owdx9d ui-tea3wc ui-1qzdkne ui-nejef0 ui-4wkmsb ui-7pq1vu ui-6ekqhr","data-swap-active":!n||void 0,children:gT(e,r,s,a)}),g.jsx("span",{className:"ui-1ms6mhf ui-gkxs2y ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-g01cxk ui-6rycqq ui-fimr68 ui-1owdx9d ui-tea3wc ui-1qzdkne ui-nejef0 ui-4wkmsb ui-7pq1vu ui-6ekqhr","data-swap-active":n||void 0,children:gT(t,r,s,a)})]})}function P8({icon:e,pressedIcon:t=e,iconVariant:n="outline",variant:r,border:s,rounded:a,frame:l="container",reveal:c="always",size:d,iconSize:f,tone:h,rootStyle:m,iconStyle:b,disabled:y,"aria-label":k,"aria-labelledby":S,...E}){const R=ca(),{size:T,innerIconSize:C,disabled:_,variant:L,tone:N}=EA({disabled:y,enforced:R,iconSize:f,size:d,tone:h,variant:r}),A=wA({border:s,enforcedRootStyle:R?.iconButtonRootStyle,frame:l,reveal:c,rootStyle:m,rounded:a,size:T,tone:N,variant:L});return g.jsx(L8,{...E,className:nn("ui-icon-button",A.rootAttrs.className),style:A.rootAttrs.style,...A.dataAttrs,"aria-label":k,"aria-labelledby":S,"data-component":"toggle-icon-button",disabled:_,render:($,z)=>g.jsx("button",{...$,"data-pressed":void 0,children:g.jsx(z8,{icon:e,iconSize:C,iconStyle:[R?.iconButtonIconStyle,b],iconVariant:n,pressed:z.pressed,pressedIcon:t})})})}function $8({pressed:e,...t}){return g.jsx(P8,{...t,pressed:e,variant:e?"secondary":"ghost"})}const bT=e=>Number.isFinite(e)?e:0;function B8(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(bT(e*1e3)%1e3),nanoseconds:Math.trunc(bT(e*1e6)%1e3)}}function F8(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function U8(e){switch(typeof e){case"number":{if(Number.isFinite(e))return B8(e);break}case"bigint":return F8(e)}throw new TypeError("Expected a finite number or bigint")}const q8=e=>e===0||e===0n,H8=(e,t)=>t===1||t===1n?e:`${e}s`,G8=1e-7,V8=24n*60n*60n*1000n;function W8(e,t){const n=typeof e=="bigint";if(!n&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};const r=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[];const a=(h,m)=>{const b=Math.floor(h*10**m+G8);return(Math.round(b)/10**m).toFixed(m)},l=(h,m,b,y)=>{if(!((s.length===0||!t.colonNotation)&&q8(h)&&!(t.colonNotation&&b==="m"))){if(y??=String(h),t.colonNotation){const k=y.includes(".")?y.split(".")[0].length:y.length,S=s.length>0?2:1;y="0".repeat(Math.max(0,S-k))+y}else y+=t.verbose?" "+H8(m,h):b;s.push(y)}},c=U8(e),d=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(d)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(d,"day","d"):(l(d/365n,"year","y"),l(d%365n,"day","d")),l(Number(c.hours),"hour","h")),l(Number(c.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const h=Number(c.seconds),m=Number(c.milliseconds),b=Number(c.microseconds),y=Number(c.nanoseconds);if(l(h,"second","s"),t.formatSubMilliseconds)l(m,"millisecond","ms"),l(b,"microsecond","µs"),l(y,"nanosecond","ns");else{const k=m+b/1e3+y/1e6,S=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,E=k>=1?Math.round(k):Math.ceil(k),R=S?k.toFixed(S):E;l(Number.parseFloat(R),"millisecond","ms",R)}}else{const h=(n?Number(e%V8):e)/1e3%60,m=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,b=a(h,m),y=t.keepDecimalsOnWholeSeconds?b:b.replace(/\.0+$/,"");l(Number.parseFloat(y),"second","s",y)}if(s.length===0)return r+"0"+(t.verbose?" milliseconds":"ms");const f=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(f)}var sM="en",Zx={},Vy={};function oM(){return sM}function aM(e){sM=e}function K8(e){return Zx[e]}function lM(e){if(!e)throw new Error("No locale data passed");Zx[e.locale]=e,Vy[e.locale.toLowerCase()]=e.locale}function yT(e){if(Zx[e])return e;if(Vy[e.toLowerCase()])return Vy[e.toLowerCase()]}function uM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return vT(e);case"best fit":return vT(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function vT(e){var t=yT(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=yT(e);if(r)return r}}var ne={af:function(t){return t==1?"one":"other"},ak:function(t){return t==0||t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"},ast:function(t){var n=String(t).split("."),r=!n[1];return t==1&&r?"one":"other"},be:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return s==1&&a!=11?"one":s>=2&&s<=4&&(a<12||a>14)?"few":r&&s==0||s>=5&&s<=9||a>=11&&a<=14?"many":"other"},blo:function(t){return t==0?"zero":t==1?"one":"other"},br:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2),l=r&&n[0].slice(-6);return s==1&&a!=11&&a!=71&&a!=91?"one":s==2&&a!=12&&a!=72&&a!=92?"two":(s==3||s==4||s==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&r&&l==0?"many":"other"},bs:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),d=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||d==1&&f!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||d>=2&&d<=4&&(f<12||f>14)?"few":"other"},ca:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1&&a?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ceb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=s.slice(-1);return a&&(r==1||r==2||r==3)||a&&l!=4&&l!=6&&l!=9||!a&&c!=4&&c!=6&&c!=9?"one":"other"},cs:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return t==1||!s&&(r==0||r==1)?"one":"other"},dsb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-2),c=s.slice(-2);return a&&l==1||c==1?"one":a&&l==2||c==2?"two":a&&(l==3||l==4)||c==3||c==4?"few":"other"},dz:function(t){return"other"},es:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t>=0&&t<2?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ga:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return r==1&&s||r==0&&!s?"one":r==2&&s?"two":"other"},is:function(t){var n=String(t).split("."),r=n[0],s=(n[1]||"").replace(/0+$/,""),a=Number(n[0])==t,l=r.slice(-1),c=r.slice(-2);return a&&l==1&&c!=11||s%10==1&&s%100!=11?"one":"other"},lt:function(t){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,a=s&&n[0].slice(-1),l=s&&n[0].slice(-2);return a==1&&(l<11||l>19)?"one":a>=2&&a<=9&&(l<11||l>19)?"few":r!=0?"many":"other"},lv:function(t){var n=String(t).split("."),r=n[1]||"",s=r.length,a=Number(n[0])==t,l=a&&n[0].slice(-1),c=a&&n[0].slice(-2),d=r.slice(-2),f=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&d>=11&&d<=19?"zero":l==1&&c!=11||s==2&&f==1&&d!=11||s!=2&&f==1?"one":"other"},mk:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),d=s.slice(-1),f=s.slice(-2);return a&&l==1&&c!=11||d==1&&f!=11?"one":"other"},mt:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==1?"one":t==2?"two":t==0||s>=3&&s<=10?"few":s>=11&&s<=19?"many":"other"},pl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return t==1&&s?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&r!=1&&(a==0||a==1)||s&&a>=5&&a<=9||s&&l>=12&&l<=14?"many":"other"},pt:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return s==0||s==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ro:function(t){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,a=s&&n[0].slice(-2);return t==1&&r?"one":!r||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return s&&a==1&&l!=11?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&a==0||s&&a>=5&&a<=9||s&&l>=11&&l<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"";return t==0||t==1||r==0&&s==1?"one":"other"},sl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-2);return s&&a==1?"one":s&&a==2?"two":s&&(a==3||a==4)||!s?"few":"other"}};ne.as=ne.am;ne.az=ne.af;ne.bal=ne.af;ne.bg=ne.af;ne.bn=ne.am;ne.brx=ne.af;ne.ce=ne.af;ne.chr=ne.af;ne.csw=ne.ak;ne.cv=ne.blo;ne.de=ne.ast;ne.doi=ne.am;ne.ee=ne.af;ne.el=ne.af;ne.en=ne.ast;ne.eo=ne.af;ne.et=ne.ast;ne.eu=ne.af;ne.fa=ne.am;ne.fi=ne.ast;ne.fil=ne.ceb;ne.fo=ne.af;ne.fur=ne.af;ne.fy=ne.ast;ne.gl=ne.ast;ne.gu=ne.am;ne.ha=ne.af;ne.hi=ne.am;ne.hr=ne.bs;ne.hsb=ne.dsb;ne.hu=ne.af;ne.hy=ne.ff;ne.ia=ne.ast;ne.id=ne.dz;ne.ie=ne.ast;ne.ig=ne.dz;ne.ii=ne.dz;ne.it=ne.ca;ne.ja=ne.dz;ne.jgo=ne.af;ne.jv=ne.dz;ne.ka=ne.af;ne.kea=ne.dz;ne.kk=ne.af;ne.kl=ne.af;ne.km=ne.dz;ne.kn=ne.am;ne.ko=ne.dz;ne.kok=ne.am;ne.ks=ne.af;ne.ksh=ne.blo;ne.ku=ne.af;ne.ky=ne.af;ne.lb=ne.af;ne.lkt=ne.dz;ne.lld=ne.ca;ne.lo=ne.dz;ne.ml=ne.af;ne.mn=ne.af;ne.mr=ne.af;ne.ms=ne.dz;ne.my=ne.dz;ne.nb=ne.af;ne.ne=ne.af;ne.nl=ne.ast;ne.nn=ne.af;ne.no=ne.af;ne.nqo=ne.dz;ne.nso=ne.ak;ne.om=ne.af;ne.or=ne.af;ne.pa=ne.ak;ne.pcm=ne.am;ne.ps=ne.af;ne.rm=ne.af;ne.sah=ne.dz;ne.sc=ne.ast;ne.scn=ne.ca;ne.sd=ne.af;ne.sk=ne.cs;ne.so=ne.af;ne.sq=ne.af;ne.sr=ne.bs;ne.su=ne.dz;ne.sv=ne.ast;ne.sw=ne.ast;ne.syr=ne.af;ne.ta=ne.af;ne.te=ne.af;ne.th=ne.dz;ne.ti=ne.ak;ne.tk=ne.af;ne.tn=ne.af;ne.to=ne.dz;ne.tr=ne.af;ne.ug=ne.af;ne.uk=ne.ru;ne.ur=ne.ast;ne.uz=ne.af;ne.vec=ne.ca;ne.vi=ne.dz;ne.wae=ne.af;ne.wo=ne.dz;ne.xh=ne.af;ne.yi=ne.ast;ne.yo=ne.dz;ne.yue=ne.dz;ne.zh=ne.dz;ne.zu=ne.am;function xT(e){return e==="pt-PT"?e:X8(e)}var Y8=/^([a-z0-9]+)/i;function X8(e){var t=e.match(Y8);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function Z8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,J8(r.key),r)}}function Q8(e,t,n){return t&&kT(e.prototype,t),n&&kT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function J8(e){var t=eH(e,"string");return Tc(t)=="symbol"?t:t+""}function eH(e,t){if(Tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wy=(function(){function e(t,n){Z8(this,e);var r=e.supportedLocalesOf(t);if(r.length===0)throw new RangeError("Unsupported locale: "+t);if(n&&n.type!=="cardinal")throw new RangeError('Only "cardinal" "type" is supported');this.$=ne[xT(r[0])]}return Q8(e,[{key:"select",value:function(n){return this.$(n)}}],[{key:"supportedLocalesOf",value:function(n){return typeof n=="string"&&(n=[n]),n.filter(function(r){return ne[xT(r)]})}}]),e})();function _l(e){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function ST(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function wT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ST(Object(n),!0).forEach(function(r){tH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ST(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tH(e,t,n){return(t=cM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ET(e,t){return sH(e)||iH(e,t)||rH(e,t)||nH()}function nH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rH(e,t){if(e){if(typeof e=="string")return TT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TT(e,t):void 0}}function TT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){f=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function sH(e){if(Array.isArray(e))return e}function oH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cM(r.key),r)}}function lH(e,t,n){return t&&aH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cM(e){var t=uH(e,"string");return _l(t)=="symbol"?t:t+""}function uH(e,t){if(_l(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cH=["second","minute","hour","day","week","month","quarter","year"],fH=["auto","always"],dH=["long","short","narrow"],pH=["lookup","best fit"],Rs=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};oH(this,e);var r=n.numeric,s=n.style,a=n.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",r!==void 0){if(fH.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(dH.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(pH.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(oM()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");Wy.supportedLocalesOf(this.locale).length>0?this.pluralRules=new Wy(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=uM(this.locale,{localeMatcher:this.localeMatcher})}return lH(e,[{key:"format",value:function(){var n=RT(arguments),r=ET(n,2),s=r[0],a=r[1];return this.getRule(s,a).replace("{0}",this.formatNumber(Math.abs(s)))}},{key:"formatToParts",value:function(){var n=RT(arguments),r=ET(n,2),s=r[0],a=r[1],l=this.getRule(s,a),c=l.indexOf("{0}");if(c<0)return[{type:"literal",value:l}];var d=[];return c>0&&d.push({type:"literal",value:l.slice(0,c)}),d=d.concat(this.formatNumberToParts(Math.abs(s)).map(function(f){return wT(wT({},f),{},{unit:a})})),c+3<l.length-1&&d.push({type:"literal",value:l.slice(c+3)}),d}},{key:"getRule",value:function(n,r){var s=K8(this.locale)[this.style][r];if(typeof s=="string")return s;if(this.numeric==="auto"){if(n===-2||n===-1){var a=s["previous".concat(n===-1?"":"-"+Math.abs(n))];if(a)return a}else if(n===1||n===2){var l=s["next".concat(n===1?"":"-"+Math.abs(n))];if(l)return l}else if(n===0&&s.current)return s.current}var c=s[yH(n)?"past":"future"];if(typeof c=="string")return c;var d=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[d]||c.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"formatNumberToParts",value:function(n){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(n):[{type:"integer",value:this.formatNumber(n)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}]),e})();Rs.supportedLocalesOf=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(n){return uM(n,t)})};Rs.addLocale=lM;Rs.addDefaultLocale=function(e){lM(e),aM(e.locale)};Rs.setDefaultLocale=aM;Rs.getDefaultLocale=oM;Rs.PluralRules=Wy;var Vb='Invalid "unit" argument';function hH(e){if(_l(e)==="symbol")throw new TypeError(Vb);if(typeof e!="string")throw new RangeError("".concat(Vb,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),cH.indexOf(e)<0)throw new RangeError("".concat(Vb,": ").concat(e));return e}var mH='Invalid "number" argument';function gH(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(mH,": ").concat(e));return e}function bH(e){return 1/e===-1/0}function yH(e){return e<0||e===0&&bH(e)}function RT(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[gH(e[0]),hH(e[1])]}function ia(e){"@babel/helpers - typeof";return ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(e)}function vH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SH(r.key),r)}}function kH(e,t,n){return t&&xH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SH(e){var t=wH(e,"string");return ia(t)=="symbol"?t:t+""}function wH(e,t){if(ia(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ia(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var CT=(function(){function e(){vH(this,e),this.cache={}}return kH(e,[{key:"get",value:function(){for(var n=this.cache,r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];for(var l=0,c=s;l<c.length;l++){var d=c[l];if(ia(n)!=="object")return;n=n[d]}return n}},{key:"put",value:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];for(var a=r.pop(),l=r.pop(),c=this.cache,d=0,f=r;d<f.length;d++){var h=f[d];ia(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function Ky(e){"@babel/helpers - typeof";return Ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ky(e)}function EH(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=TH(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TH(e,t){if(e){if(typeof e=="string")return _T(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_T(e,t):void 0}}function _T(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function RH(e,t){for(var n=EH(e),r;!(r=n()).done;){var s=r.value;if(t(s))return s;for(var a=s.split("-");a.length>1;)if(a.pop(),s=a.join("-"),t(s))return s}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function CH(){var e=(typeof Intl>"u"?"undefined":Ky(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function Yy(e){"@babel/helpers - typeof";return Yy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yy(e)}function _H(e){return AH(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var NH={}.constructor;function AH(e){return Yy(e)!==void 0&&e!==null&&e.constructor===NH}var ks=60,Vp=60*ks,Jo=24*Vp,Xy=7*Jo,Zy=30.44*Jo,fM=146097/400*Jo;function hl(e){switch(e){case"second":return 1;case"minute":return ks;case"hour":return Vp;case"day":return Jo;case"week":return Xy;case"month":return Zy;case"year":return fM}}function dM(e){return e.factor!==void 0?e.factor:hl(e.unit||e.formatAs)||1}function Rc(e){return e==="floor"?Math.floor:Math.round}function Qx(e){return e==="floor"?1:.5}function Qy(e){"@babel/helpers - typeof";return Qy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qy(e)}function pM(e,t){var n=t.prevStep,r=t.timestamp,s=t.now,a=t.future,l=t.round,c;return n&&(n.id||n.unit)&&(c=e["threshold_for_".concat(n.id||n.unit)]),c===void 0&&e.threshold!==void 0&&(c=e.threshold,typeof c=="function"&&(c=c(s,a))),c===void 0&&(c=e.minTime),Qy(c)==="object"&&(n&&n.id&&c[n.id]!==void 0?c=c[n.id]:c=c.default),typeof c=="function"&&(c=c(r,{future:a,getMinTimeForUnit:function(f,h){return NT(f,h||n&&n.formatAs,{round:l})}})),c===void 0&&e.test&&(e.test(r,{now:s,future:a})?c=0:c=9007199254740991),c===void 0&&(n?e.formatAs&&n.formatAs&&(c=NT(e.formatAs,n.formatAs,{round:l})):c=0),c===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),c}function NT(e,t,n){var r=n.round,s=hl(e),a=hl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-Qx(r))}function Cc(e){"@babel/helpers - typeof";return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}function AT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function OH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(n),!0).forEach(function(r){MH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MH(e,t,n){return(t=IH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IH(e){var t=DH(e,"string");return Cc(t)=="symbol"?t:t+""}function DH(e,t){if(Cc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=zH(e,l);var c=LH(e,t,{now:r,future:s,round:a});{if(c){var d=e[e.indexOf(c)-1],f=e[e.indexOf(c)+1];return[d,c,f]}return[void 0,void 0,e[0]]}}function LH(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=hM(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var d=Rc(a)(Math.abs(t)/dM(c)/c.granularity)*c.granularity;if(d===0&&l>0)return e[l-1]}return c}}}function hM(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=pM(e[r],OH({prevStep:e[r-1],timestamp:n.now-t*1e3},n));return s===void 0||Math.abs(t)<s?r-1:r===e.length-1?r:hM(e,t,n,r+1)}function zH(e,t){return e.filter(function(n){var r=n.unit,s=n.formatAs;return r=r||s,r?t.indexOf(r)>=0:!0})}function PH(e,t,n){var r=n.now,s=n.round;if(hl(e)){var a=hl(e)*1e3,l=t>r,c=Math.abs(t-r),d=Rc(s)(c/a)*a;return l?d>0?c-d+BH(s,a):c-d+1:-(c-d)+$H(s,a)}}function $H(e,t){return Qx(e)*t}function BH(e,t){return(1-Qx(e))*t+1}var FH=365*24*60*60*1e3,mM=1e3*FH;function UH(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,d=e.getTime?e.getTime():e,f=function(k){return PH(k,d,{now:a,round:c})},h=HH(l?t:s,d,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(d,{getTimeToNextUpdateForUnit:f,getRoundFunction:Rc,now:a,future:l,round:c})),m===void 0)){var b=t.unit||t.formatAs;b&&(m=f(b))}return m===void 0?h:Math.min(m,h)}}function qH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=pM(e,{timestamp:t,now:r,future:s,round:a,prevStep:l});if(c!==void 0)return s?t-c*1e3+1:c===0&&t===r?mM:t+c*1e3}function HH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=qH(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:mM}var gM={};function ul(e){return gM[e]}function bM(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");gM[e.locale]=e}const GH=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],Jy={steps:GH,labels:"long"};function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function OT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function MT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OT(Object(n),!0).forEach(function(r){VH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VH(e,t,n){return(t=WH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WH(e){var t=KH(e,"string");return _c(t)=="symbol"?t:t+""}function KH(e,t){if(_c(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_c(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const ev=MT(MT({},Jy),{},{steps:Jy.steps.filter(function(e){return e.formatAs!=="second"})}),yM=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:ks,unit:"minute"},{threshold:2.5*ks,granularity:5,factor:ks,unit:"minute"},{threshold:22.5*ks,factor:.5*Vp,unit:"half-hour"},{threshold:42.5*ks,threshold_for_minute:52.5*ks,factor:Vp,unit:"hour"},{threshold:20.5/24*Jo,factor:Jo,unit:"day"},{threshold:5.5*Jo,factor:Xy,unit:"week"},{threshold:3.5*Xy,factor:Zy,unit:"month"},{threshold:10.5*Zy,factor:fM,unit:"year"}],IT={gradation:yM,flavour:"long",units:["now","minute","hour","day","week","month","year"]},YH={gradation:yM,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function vM(e){return e instanceof Date?e:new Date(e)}var tv=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Li={},XH={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonth||(Li[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),Li[n].dayMonth.format(vM(t))}},ZH={minTime:function(t,n){var r=n.future;if(r){var s=new Date(new Date(t).getFullYear(),0).getTime()-1;return(t-s)/1e3}else{var a=new Date(new Date(t).getFullYear()+1,0).getTime();return(a-t)/1e3}},format:function(t,n){return Li[n]||(Li[n]={}),Li[n].dayMonthYear||(Li[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),Li[n].dayMonthYear.format(vM(t))}};CH()?tv.push(XH,ZH):tv.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const sa={steps:tv,labels:["mini","short-time","narrow","short"]};function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function DT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function jT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DT(Object(n),!0).forEach(function(r){QH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QH(e,t,n){return(t=JH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JH(e){var t=e7(e,"string");return Nc(t)=="symbol"?t:t+""}function e7(e,t){if(Nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const t7=jT(jT({},sa),{},{steps:[{formatAs:"now"}].concat(sa.steps)});function Ac(e){"@babel/helpers - typeof";return Ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ac(e)}function LT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function zT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LT(Object(n),!0).forEach(function(r){n7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n7(e,t,n){return(t=r7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r7(e){var t=i7(e,"string");return Ac(t)=="symbol"?t:t+""}function i7(e,t){if(Ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const nv=zT(zT({},sa),{},{steps:sa.steps.filter(function(e){return e.formatAs!=="second"})});function Oc(e){"@babel/helpers - typeof";return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function $T(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){s7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function s7(e,t,n){return(t=o7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o7(e){var t=a7(e,"string");return Oc(t)=="symbol"?t:t+""}function a7(e,t){if(Oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const l7=$T($T({},nv),{},{steps:[{formatAs:"now"}].concat(nv.steps)});function Mc(e){"@babel/helpers - typeof";return Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(e)}function BT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Hd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BT(Object(n),!0).forEach(function(r){u7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u7(e,t,n){return(t=c7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c7(e){var t=f7(e,"string");return Mc(t)=="symbol"?t:t+""}function f7(e,t){if(Mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const d7=Hd(Hd({},sa),{},{steps:sa.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?Hd(Hd({},e),{},{minTime:ks}):e})}),Ic={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function FT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function UT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FT(Object(n),!0).forEach(function(r){p7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p7(e,t,n){return(t=h7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h7(e){var t=m7(e,"string");return Dc(t)=="symbol"?t:t+""}function m7(e,t){if(Dc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const g7=UT(UT({},Ic),{},{steps:[{formatAs:"now"}].concat(Ic.steps)});function jc(e){"@babel/helpers - typeof";return jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jc(e)}function qT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function HT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qT(Object(n),!0).forEach(function(r){b7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b7(e,t,n){return(t=y7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y7(e){var t=v7(e,"string");return jc(t)=="symbol"?t:t+""}function v7(e,t){if(jc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const rv=HT(HT({},Ic),{},{steps:Ic.steps.filter(function(e){return e.formatAs!=="second"})});function Lc(e){"@babel/helpers - typeof";return Lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(e)}function GT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function VT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(n),!0).forEach(function(r){x7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function x7(e,t,n){return(t=k7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k7(e){var t=S7(e,"string");return Lc(t)=="symbol"?t:t+""}function S7(e,t){if(Lc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const w7=VT(VT({},rv),{},{steps:[{formatAs:"now"}].concat(rv.steps)});function E7(e){switch(e){case"default":case"round":return Jy;case"round-minute":return ev;case"approximate":return IT;case"time":case"approximate-time":return YH;case"mini":return Ic;case"mini-now":return g7;case"mini-minute":return rv;case"mini-minute-now":return w7;case"twitter":return sa;case"twitter-now":return t7;case"twitter-minute":return nv;case"twitter-minute-now":return l7;case"twitter-first-minute":return d7;default:return IT}}function oa(e){"@babel/helpers - typeof";return oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(e)}function T7(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=xM(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R7(e,t){return N7(e)||_7(e,t)||xM(e,t)||C7()}function C7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xM(e,t){if(e){if(typeof e=="string")return WT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?WT(e,t):void 0}}function WT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _7(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(d=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);d=!0);}catch(h){f=!0,s=h}finally{try{if(!d&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw s}}return c}}function N7(e){if(Array.isArray(e))return e}function A7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I7(r.key),r)}}function M7(e,t,n){return t&&O7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function I7(e){var t=D7(e,"string");return oa(t)=="symbol"?t:t+""}function D7(e,t){if(oa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Or=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.polyfill;A7(this,e),typeof t=="string"&&(t=[t]),this.locale=RH(t.concat(e.getDefaultLocale()),ul),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Rs,this.IntlPluralRules=Rs.PluralRules),this.relativeTimeFormatCache=new CT,this.pluralRulesCache=new CT}return M7(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!$7(r)?(s=r,r=void 0):s={}),r||(r=ev),typeof r=="string"&&(r=E7(r));var l=j7(n),c=this.getLabels(r.flavour||r.labels),d=c.labels,f=c.labelsType,h=s.round||r.round,m,b=Date.now();r.now!==void 0&&(m=r.now),m===void 0&&s.now!==void 0&&(m=s.now),m===void 0&&(m=b);var y=function(N){var A=N.now,$=(A-l)/1e3,z=s.future||$<0,I=P7(d,ul(a.locale).now,ul(a.locale).long,z);if(r.custom){var Y=r.custom({now:A,date:new Date(l),time:l,elapsed:$,locale:a.locale});if(Y!==void 0)return{getText:function(){return Y},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var H=z7(r.units,d,I),q=jH(r.gradation||r.steps||ev.steps,$,{now:A,units:H,round:h,future:z}),D=R7(q,3),F=D[0],U=D[1],W=D[2],B=function(){return a.formatDateForStep(l,U,$,{labels:d,labelsType:f,nowLabel:I,now:A,future:z,round:h})||""},K=function(){var P=UH(l,U,{nextStep:W,prevStep:F,now:A,future:z,round:h});if(typeof P=="number")return s.getTimeToNextUpdateUncapped?P:SM(P)};return{getText:B,getTextRefreshDelay:K}},k=y({now:m}),S=k.getText,E=k.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[S(),E()];if(s.refresh){var R=6e4,T,C=function L(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:R;T=B7(function(){var A=y({now:m+(Date.now()-b)}),$=A.getText,z=A.getTextRefreshDelay;s.refresh($()),L(z())},N)};C(E());var _=function(){clearTimeout(T)};return[S(),_]}return S()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,d=a.labelsType,f=a.nowLabel,h=a.now,m=a.future,b=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(R,T){return l.formatValue(T,R,{labels:c,future:m})},now:h,future:m});var y=r.unit||r.formatAs;if(!y)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(y==="now")return f;var k=Math.abs(s)/dM(r);r.granularity&&(k=Rc(b)(k/r.granularity)*r.granularity);var S=-1*Math.sign(s)*Rc(b)(k);switch(S===0&&(m?S=0:S=-0),d){case"long":case"short":case"narrow":return this.getFormatter(d).format(S,y);default:return this.formatValue(S,y,{labels:c,future:m})}}}},{key:"formatValue",value:function(n,r,s){var a=s.labels,l=s.future;return this.getFormattingRule(a,r,n,{future:l}).replace("{0}",this.formatNumber(Math.abs(n)))}},{key:"getFormattingRule",value:function(n,r,s,a){var l=a.future;if(this.locale,n=n[r],typeof n=="string")return n;var c=s===0?l?"future":"past":s<0?"past":"future",d=n[c]||n;if(typeof d=="string")return d;var f=this.getPluralRules().select(Math.abs(s));return d[f]||d.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"getFormatter",value:function(n){return this.relativeTimeFormatCache.get(this.locale,n)||this.relativeTimeFormatCache.put(this.locale,n,new this.IntlRelativeTimeFormat(this.locale,{style:n}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof n=="string"&&(n=[n]),n=n.map(function(c){switch(c){case"tiny":case"mini-time":return"mini";default:return c}}),n=n.concat("long");for(var r=ul(this.locale),s=T7(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),kM="en";Or.getDefaultLocale=function(){return kM};Or.setDefaultLocale=function(e){iv=!0,kM=e};Or.addDefaultLocale=function(e){iv&&Or.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(Or.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),iv=!0,Or.addLocale(e),Or.setDefaultLocale(e.locale)};var iv=!1;Or.addLocale=function(e){bM(e),Rs.addLocale(e)};Or.locale=Or.addLocale;Or.addLabels=function(e,t,n){var r=ul(e);r||(bM({locale:e}),r=ul(e)),r[t]=n};function j7(e){if(e.constructor===Date||L7(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(oa(e),", ").concat(e))}function L7(e){return oa(e)==="object"&&typeof e.getTime=="function"}function z7(e,t,n){var r=Object.keys(t);return n&&r.push("now"),e&&(r=e.filter(function(s){return s==="now"||r.indexOf(s)>=0})),r}function P7(e,t,n,r){var s=e.now||t&&t.now;if(s)return typeof s=="string"?s:r?s.future:s.past;if(n&&n.second&&n.second.current)return n.second.current}function $7(e){return typeof e=="string"||_H(e)}function B7(e,t){return setTimeout(e,SM(t))}function SM(e){return Math.min(e,F7)}var F7=2147483647;const wM={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}};Or.addLocale(wM);Or.addDefaultLocale(wM);const U7=new Or("en-US");function Hn(e,t){let n=typeof e=="string"?e:JSON.stringify(e);return n===void 0&&(n=""),n.length>t?`${n.slice(0,t-1)}…`:n}function Kr(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function q7(e,t){const n=String(e??"").replace(/\s+/g," ").trim();if(n.length<=t)return n;const r=t-1,s=Math.max(1,Math.floor(r*.35)),a=Math.max(1,r-s);return`${n.slice(0,s)}…${n.slice(n.length-a)}`}function ml(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function gi(e){return e==null||!Number.isFinite(e)?"—":W8(e)}function Jx(e){const t=Math.ceil(e/1e3);if(e<1e3)return"1s";if(t<60)return`${t}s`;if(t>=3600){const s=Math.floor(t/3600),a=Math.floor(t%3600/60);return a>0?`${s}h ${a}m`:`${s}h`}const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}const H7=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function KT(e){return e==null||!Number.isFinite(e)?"—":H7.format(e)}function Wp(e,t=Date.now()){const n=ml(e);return n===null?null:U7.format(Math.min(n,t),"mini",{now:t})}function mo(e,t=8e3){if(e==null)return"";let n;try{n=typeof e=="string"?e:JSON.stringify(e,null,2)}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}const G7=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function Kp(e){return e==null||!Number.isFinite(e)?"0":G7.format(e)}function Uh(e){return e==null||!Number.isFinite(e)?"—":e===0?"$0.00":e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function sv(e){const t=String(e||"").trim();if(!t)return[];if(t.charAt(0)==="[")try{const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}const n=[];for(const r of t.split(/\n/)){const s=r.trim();if(s)try{n.push(JSON.parse(s))}catch{}}return n}function EM(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean);return t.hostname==="github.com"&&n.length>=4&&n[2]==="pull"||t.hostname==="review.cursor.com"&&n[0]==="pr"?!0:(/^origin(-[a-z0-9]+)?\.cursor\.com$/i.test(t.hostname)||t.hostname==="localhost")&&n.length>=4&&n[2]==="github"}catch{return!1}}function V7(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}const YT=e=>{let t;const n=new Set,r=(f,h)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const b=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,b))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,s,c);return c},W7=(e=>e?YT(e):YT),K7=e=>e;function Y7(e,t=K7){const n=Ju.useSyncExternalStore(e.subscribe,Ju.useCallback(()=>t(e.getState()),[e,t]),Ju.useCallback(()=>t(e.getInitialState()),[e,t]));return Ju.useDebugValue(n),n}const X7=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,Z7=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function Q7(e=window.location.pathname,t=window.location.hostname){const n=Z7.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=X7.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function J7(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function TM(e=window.location,t=window.history){const n=e.hash.startsWith("#")?e.hash.slice(1):e.hash;if(n==="")return"";const s=new URLSearchParams(n).get("access")?.trim()??"";return s===""?"":(t.replaceState(null,"",`${e.pathname}${e.search}`),s)}function eG(e,t=window){const n=()=>{const r=TM(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}class tG{constructor(t,n,r=()=>""){this.basePath=t,this.getToken=n,this.getAliasToken=r}url(t){return(this.basePath||"")+t}headers(t){const n={...t},r=this.getToken().trim();r&&(n.authorization=`Bearer ${r}`);const s=this.getAliasToken().trim();return s&&(n["x-agent-alias-token"]=s),n}async request(t,n={}){const r=await fetch(this.url(t),{...n,headers:this.headers(n.headers)}),s=await r.text();let a=null;try{a=s?JSON.parse(s):null}catch{a=null}return{status:r.status,ok:r.ok,body:a}}postJson(t,n){return this.request(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}health(){return this.request("/v1/health")}info(){return this.request("/v1/info")}logs(t=-1){const n=t<0?"":`?after=${t}`;return this.request(`/v1/logs${n}`)}meta(){return this.request("/v1/meta")}sessions(){return this.request("/v1/sessions")}abs(){return this.request("/v1/abs")}artifacts(t={}){const n=new URLSearchParams;t.sessionId!==void 0&&t.sessionId!==""&&n.set("sessionId",t.sessionId),t.limit!==void 0&&n.set("limit",String(t.limit));const r=n.toString();return this.request(`/v1/artifacts${r===""?"":`?${r}`}`)}async artifactContent(t,n){const r=await fetch(this.url(`/v1/artifacts/${encodeURIComponent(t)}/content`),{headers:this.headers()}),s=r.headers.get("content-type")??void 0;if(!r.ok||r.body===null)return await r.body?.cancel().catch(()=>{}),{status:r.status,ok:!1,contentType:s,bytes:new Uint8Array(0),truncated:!1};const a=r.body.getReader(),l=[];let c=0,d=!1;for(;;){const{done:m,value:b}=await a.read();if(m)break;if(b!==void 0){if(c+b.length>n){l.push(b.slice(0,n-c)),c=n,d=!0,await a.cancel().catch(()=>{});break}l.push(b),c+=b.length}}const f=new Uint8Array(c);let h=0;for(const m of l)f.set(m,h),h+=m.length;return{status:r.status,ok:!0,contentType:s,bytes:f,truncated:d}}createSession(t){return this.postJson("/v1/session",{message:t})}followUp(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}`,{message:n,continuationToken:r})}stopSession(t){return this.postJson(`/v1/session/${encodeURIComponent(t)}/stop`,{})}resolveApproval(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,{decision:r})}resolveAuth(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/auths/${encodeURIComponent(n)}`,{decision:r})}dispatchSchedule(t){return this.request(`/v1/dev/schedules/${encodeURIComponent(t)}`,{method:"POST"})}evalsList(){return this.request("/v1/dev/evals")}evalsListRuns(){return this.request("/v1/dev/evals/runs")}evalsStartRun(t={}){return this.postJson("/v1/dev/evals/runs",t)}evalsRunStatus(t){return this.request(`/v1/dev/evals/runs/${encodeURIComponent(t)}`)}evalsCancelRun(t){return this.postJson(`/v1/dev/evals/runs/${encodeURIComponent(t)}/cancel`,{})}channelRequest(t,n,r={}){let s=n;if(r.query!==void 0){const l=new URLSearchParams;for(const[d,f]of Object.entries(r.query))f!==""&&l.set(d,f);const c=l.toString();c!==""&&(s=`${n}?${c}`)}const a={method:t.toUpperCase()};return r.body!==void 0&&(a.headers={"content-type":"application/json"},a.body=JSON.stringify(r.body)),this.request(s,a)}streamFetch(t,n,r){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/stream?startIndex=${n}`),{signal:r,headers:this.headers()})}eventsText(t){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/events`),{headers:this.headers()})}sessionCost(t){return this.request(`/v1/session/${encodeURIComponent(t)}/cost`)}}function RM(e){const t=typeof e=="string"?e:e!==null&&typeof e=="object"&&typeof e.url=="string"?e.url:null;if(t===null)return null;let n;try{n=new URL(t)}catch{return null}return n.protocol==="http:"||n.protocol==="https:"?t:null}function CM(e){return{kind:typeof e.kind=="string"&&e.kind!==""?e.kind:"artifact",title:typeof e.title=="string"&&e.title.trim()!==""?e.title:void 0,url:RM(e.data)??void 0,artifactId:typeof e.id=="string"&&e.id!==""?e.id:void 0,data:e.data}}function ov(e){if(!Number.isFinite(e)||e<0)return"";if(e<1024)return`${e} B`;const t=["KB","MB","GB"];let n=e,r="B";for(const s of t){if(n<1024)break;n/=1024,r=s}return`${n>=10?Math.round(n):Math.round(n*10)/10} ${r}`}function nG(e){if(e===void 0||e.trim()==="")return!0;const t=e.split(";")[0]?.trim().toLowerCase()??"";return t.startsWith("text/")||t.endsWith("+json")||t.endsWith("+xml")||t==="application/json"||t==="application/x-ndjson"||t==="application/xml"||t==="application/javascript"||t==="application/yaml"||t==="application/x-yaml"||t==="application/toml"||t==="application/sql"?!0:!(t.startsWith("image/")||t.startsWith("audio/")||t.startsWith("video/")||t.startsWith("font/")||t==="application/pdf"||t==="application/zip"||t==="application/gzip")}function rG(e){return/\u0000|[\u0001-\u0008\u000b\u000e-\u001f]{4}/.test(e)}function iG(e,t){const n=e?.split(";")[0]?.trim().toLowerCase()??"";if(n==="text/x-diff"||n==="text/x-patch")return!0;const r=t.slice(0,4e3);return/^diff --git /m.test(r)||/^--- /m.test(r)&&/^\+\+\+ /m.test(r)&&/^@@ /m.test(r)}function sG(e){return e.startsWith("+++")||e.startsWith("---")?"meta":e.startsWith("+")?"add":e.startsWith("-")?"del":e.startsWith("@@")?"hunk":e.startsWith("diff ")||e.startsWith("index ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("similarity index")||e.startsWith("Binary files ")?"meta":"ctx"}function oG(e){const t=e.title?.trim();return t!==void 0&&t!==""?t:`${e.kind} · ${e.id}`}function aG(e){const t=new Set;for(const n of e)t.add(n.kind);return[...t].sort((n,r)=>n.localeCompare(r))}function XT(e){const t=Date.parse(e.updatedAt);return Number.isNaN(t)?0:t}function _M(e){return[...e].sort((t,n)=>XT(n)-XT(t))}function lG(e,t){return t===null?e:e.filter(n=>n.kind===t)}function uG(e){const t=new Map,n=[];for(const s of _M(e)){const a=s.sessionId;if(a===void 0||a===""){n.push(s);continue}const l=t.get(a);l===void 0?t.set(a,[s]):l.push(s)}const r=[...t.entries()].map(([s,a])=>({sessionId:s,artifacts:a}));return n.length>0&&r.push({sessionId:null,artifacts:n}),r}const cG=["home","runs","evals","logs"],av="section",fG="home",dG={agent:"home"};function pG(e){const t=e?.trim()??"";return t===""?null:cG.includes(t)?t:dG[t]??null}function hG(e){let t=null,n=null,r=null;try{const s=new URL(e,"https://playground.invalid"),a=s.searchParams.get("sessionId")?.trim()??"";t=a.length>0?a:null;const l=s.searchParams.get("view")?.trim()??"";n=l.length>0?l:null,r=pG(s.searchParams.get(av))}catch{return{sessionId:null,view:null,section:null}}return n==="logs"&&r===null&&(r="logs"),{sessionId:t,view:n,section:r}}function NM(e){try{const t=new URL(window.location.href);e===fG?t.searchParams.delete(av):t.searchParams.set(av,e);const n=t.toString();if(n===window.location.href)return;history.replaceState(null,"",n)}catch{}}const mG="cursor-playground",gG=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function bG(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return gG.includes(n)?n:null}function yG(e,t,n=bG(),r){if(n===null)return;const s={source:mG,type:"state",view:e};t!==void 0&&(s.sessionId=t),r!==void 0&&(s.section=r),window.parent.postMessage(s,n)}function AM(e){return e!=="http"}const vG=new Set(["chat","trace","raw","artifacts"]);function xG(e){if(!e.seeded||!e.embedded)return{action:"none"};const n=e.sessions.filter(s=>!e.knownIds.has(s.sessionId)&&AM(s.channelId)&&s.running===!0)[0];return n===void 0?{action:"none"}:e.currentSessionId===null&&vG.has(e.view)?{action:"select",sessionId:n.sessionId}:{action:"reveal",sessionId:n.sessionId}}function kG(e){return e.filter(t=>AM(t.channelId)&&t.running===!0).length}const SG=new Set(["github","slack"]);function wG(e){return/^\s*\//.test(e)}function qh(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&SG.has(n.kind)))for(const r of n.routes??[]){const s=_G(n.id,r.path);if(s===null)continue;const a={name:s,channelId:n.id,method:r.method.toUpperCase(),url:r.url,path:r.path};r.description!==void 0&&(a.description=r.description),r.bodySchema!==void 0&&(a.bodySchema=r.bodySchema),r.querySchema!==void 0&&(a.querySchema=r.querySchema),t.push(a)}return t.sort((n,r)=>{const s=n.name.localeCompare(r.name);return s!==0?s:Yp(n.method)-Yp(r.method)}),t}function OM(e){const t=new Set,n=[];for(const r of e)t.has(r.name)||(t.add(r.name),n.push(r.name));return n}function EG(e,t){const n=e.trim().toLowerCase();if(!n.startsWith("/"))return[];const r=new Set,s=[];for(const a of t)a.name.toLowerCase().startsWith(n)&&(r.has(a.name)||(r.add(a.name),s.push(a)));return s}function TG(e){if(e.length===0)return"No channel slash commands on this agent. Send a normal message to chat on http.";const t=["Channel slash commands (from `/v1/info` routes):",""],n=new Map;for(const r of e){const s=n.get(r.name)??[];s.push(r),n.set(r.name,s)}for(const[r,s]of n){const a=s.map(f=>f.method).join("|"),l=s.find(f=>f.description)?.description??"",c=ek(s[0]),d=MM(c);t.push(d?`- \`${r}\` (${a}) — ${l}${l?" ":""}${d}`:`- \`${r}\` (${a})${l?` — ${l}`:""}`)}return t.push("","Args: JSON object, `key=value` flags, or a positional value for the first required string field."),t.join(`
|
|
17
|
+
`)}function RG(e,t){const n=e.trim(),r=/^(\/[^\s]+)(?:\s+([\s\S]*))?$/.exec(n);if(r===null)return{ok:!1,error:"Expected `/command` optionally followed by args."};const s=r[1],a=(r[2]??"").trim(),l=t.filter(m=>m.name===s);if(l.length===0){const m=OM(t);return{ok:!1,error:m.length===0?`Unknown command \`${s}\`. No channel commands on this agent.`:`Unknown command \`${s}\`. Try ${m.map(b=>`\`${b}\``).join(", ")} or \`/help\`.`,commandName:s}}const c=CG(l,a),d=ek(c),f=OG(a,d);if(!f.ok)return{ok:!1,error:f.error,commandName:s};const h=NG(d,f.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${MM(d)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:DG(f.value)}:{ok:!0,command:c,body:f.value,query:c.querySchema!==void 0?jG(f.value,c.querySchema):void 0}}function CG(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>Yp(a.method)-Yp(l.method)),r=IM(t);if(r!==null){let a=null,l=-1;for(const c of n){const d=ek(c),f=AG(d,r);f>l&&(l=f,a=c)}if(a!==null&&l>0)return a}const s=n.find(a=>a.method==="GET");return s!==void 0?s:n[0]}function _G(e,t){const n=e.trim();if(n==="")return null;const r=t===""||t==="/"?"":t.startsWith("/")?t.replace(/\/+$/,""):`/${t.replace(/\/+$/,"")}`;return r.includes(":")?null:`/${n}${r}`}function Yp(e){switch(e.toUpperCase()){case"GET":return 0;case"POST":return 1;case"PUT":return 2;case"PATCH":return 3;case"DELETE":return 4;default:return 9}}function ek(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function MM(e){if(e===void 0)return"";const t=Hh(e);if(t===void 0)return"";const n=Gh(e),r=[];for(const s of n)t[s]?.type==="string"?r.push(`<${s}>`):r.push(`${s}=…`);for(const s of Object.keys(t))n.has(s)||r.push(`[${s}=…]`);return r.length>0?`Usage: ${r.join(" ")}`:""}function Hh(e){if(e===void 0||e.type!=="object")return;const t=e.properties;if(!(typeof t!="object"||t===null||Array.isArray(t)))return t}function Gh(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function NG(e,t){const n=Gh(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function AG(e,t){const n=Hh(e);if(n===void 0)return 0;let r=0;for(const s of Object.keys(t))s in n?r+=2:r-=1;for(const s of Gh(e))s in t&&(r+=3);return r}function IM(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);if(typeof n=="object"&&n!==null&&!Array.isArray(n))return n}catch{return null}return null}function OG(e,t){if(e==="")return{ok:!0,value:{}};const n=IM(e);if(n!==null)return{ok:!0,value:n};if(e.startsWith("{"))return{ok:!1,error:"Args look like JSON but failed to parse."};const r=Hh(t),s={},a=[];for(const l of MG(e)){const c=l.indexOf("=");if(c>0){const d=l.slice(0,c),f=l.slice(c+1);s[d]=IG(f,r?.[d])}else a.push(l)}if(a.length>0){const l=[...Gh(t)],c=(l.length>0?l:Object.keys(r??{})).filter(f=>{const h=r?.[f];return h===void 0||h.type==="string"||h.type===void 0}),d=c.find(f=>s[f]===void 0)??c[0];if(d===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[d]=a[0]:s[d]=a.join(" ")}return{ok:!0,value:s}}function MG(e){const t=[];let n="",r=null;for(let s=0;s<e.length;s++){const a=e[s];if(r!==null){a===r?r=null:n+=a;continue}if(a==='"'||a==="'"){r=a;continue}if(/\s/.test(a)){n!==""&&(t.push(n),n="");continue}n+=a}return n!==""&&t.push(n),t}function IG(e,t){const n=t?.type;if(n==="number"||n==="integer"){const r=Number(e);return Number.isFinite(r)?r:e}if(n==="boolean"){if(e==="true")return!0;if(e==="false")return!1}if(n==="array"||n==="object")try{return JSON.parse(e)}catch{return e}return e}function DG(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function jG(e,t){const n=Hh(t);if(n===void 0)return;const r={};for(const s of Object.keys(n)){const a=e[s];a!=null&&(r[s]=typeof a=="string"?a:String(a))}return Object.keys(r).length>0?r:void 0}const LG=new Set(["actions.requested","action.result","action.approval_requested","action.approval_resolved","action.auth_requested","action.auth_resolved","subagent.called","subagent.completed","artifact.tagged"]),zG=new Set(["message.received","turn.started","message.completed","reasoning.appended","reasoning.completed","actions.requested","action.approval_requested","action.approval_resolved","action.auth_requested","action.auth_resolved","action.result","subagent.called","subagent.completed","artifact.tagged","turn.completed","turn.failed","agent.bound","session.failed"]);function DM(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function PG(){const e=Q7()!==null,t=e?TM():"";return{meta:{name:"agent",dev:!1,basePath:DM()},info:null,health:"unknown",sessions:[],current:null,localTrace:!1,view:"overview",running:!1,turnStartedAt:null,queued:[],composerDraft:null,authToken:"",aliasToken:t,aliasHosted:e,embedded:e&&J7(),transcript:[],traceEvents:[],sessionCostUsd:null,barTitle:"No session",barId:"",externalUrl:null,drawerOpen:!1,overviewSection:"home",overviewRunId:null,surfaceFocusNonce:0,chatPanelOpen:!0,toast:null,evalCases:[],evalConfig:null,evalRun:null,evalRuns:[],evalNavReturn:!1}}const Xo=W7(()=>PG());class $G{constructor(){this.api=new tG(DM(),()=>this.state.authToken,()=>this.state.aliasToken),this.items=[],this.itemIndex=new Map,this.toolIds=new Set,this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds=new Map,this.nestedReasoningIds=new Map,this.idSeq=0,this.streamAbort=null,this.snapshotOpen=!1,this.snapshotToken=0,this.lastIndex=-1,this.toastTimer=null,this.evalPollTimer=null,this.evalRestoreGeneration=0,this.evalPollGeneration=0,this.evalRestoreInFlight=null,this.booted=!1,this.pendingSessionDeepLink=null,this.aliasStreamInterrupted=!1,this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.flushingQueue=!1,this.queueHeld=!1,this.knownSessionIds=new Set,this.sessionsSeeded=!1,this.subscribe=Xo.subscribe,this.getState=()=>Xo.getState()}get historyOnly(){return this.state.meta.readonly===!0}get state(){return Xo.getState()}set(t){Xo.setState(t)}commitTranscript(){this.set({transcript:this.items.slice()})}toast(t){this.set({toast:t}),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>this.set({toast:null}),4e3)}setAuthToken(t){this.set({authToken:t})}async signInWithAliasToken(t){const n=t.trim();if(n==="")return{ok:!1,error:"Enter the deployment's alias token."};this.set({aliasToken:n});const r=await this.api.health();return!r.ok&&r.status===404?(this.set({aliasToken:""}),{ok:!1,error:"That token was not accepted. Check it and try again."}):(this.aliasStreamInterrupted=!1,this.booted=!1,await this.boot(),{ok:!0})}acceptAliasTokenHandoff(t){if(this.set({aliasToken:t}),!this.booted){this.boot();return}if(!this.aliasStreamInterrupted)return;this.aliasStreamInterrupted=!1;const n=this.state.current;n!==null&&this.streamAbort===null&&this.startStream(n.sessionId,this.lastIndex+1)}noteAliasAuthLoss(t){return!this.state.aliasHosted||t!==401&&t!==404||this.state.aliasToken.trim()===""?!1:(this.aliasStreamInterrupted=this.streamAbort!==null,this.stopStream(),this.set({aliasToken:""}),!0)}setDrawerOpen(t){this.set({drawerOpen:t})}setOverviewSection(t,n=null){this.set({overviewSection:t,overviewRunId:n}),this.setView("overview")}focusAgentSurface(){this.setOverviewSection("home"),this.set({drawerOpen:!1,surfaceFocusNonce:this.state.surfaceFocusNonce+1})}setChatPanelOpen(t){this.set({chatPanelOpen:t})}nextId(t){return this.idSeq+=1,`${t}-${this.idSeq}`}push(t){this.itemIndex.set(t.id,this.items.length),this.items.push(t)}update(t,n){const r=this.itemIndex.get(t);r!==void 0&&(this.items[r]={...this.items[r],...n})}resetTranscript(){this.items=[],this.itemIndex.clear(),this.toolIds.clear(),this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds.clear(),this.nestedReasoningIds.clear(),this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.queueHeld=!1}subagentToolCallId(t){return`sub:${t}`}ensureSubagentTool(t,n){const r=this.subagentToolCallId(t),s=this.itemIndex.has(this.toolItemId(r));return this.upsertTool(r,s?"":"subagent:task",null,n)}getToolItem(t){const n=this.itemIndex.get(t);if(n===void 0)return null;const r=this.items[n];return r?.kind==="tool"?r:null}updateSubagentChildren(t,n,r=null){const s=this.ensureSubagentTool(t,r),a=this.getToolItem(s);if(a===null)return;const l=n([...a.children??[]]);this.update(s,{children:l})}upsertNestedTool(t,n,r,s,a){this.updateSubagentChildren(t,l=>{const c=l.findIndex(d=>d.kind==="tool"&&d.callId===n);if(c>=0){const d=l[c];if(d?.kind!=="tool")return l;const f=l.slice();return f[c]={...d,name:r||d.name,args:s??d.args},f}return l.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:s??null,status:"running",output:null,startedAt:a??Date.now(),endedAt:null}),l},a)}finishNestedTool(t,n,r,s,a,l){this.updateSubagentChildren(t,c=>{const d=c.findIndex(b=>b.kind==="tool"&&b.callId===n),f=s==null?"(no output)":Hn(s,4e3);if(d<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:f,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[d];if(h?.kind!=="tool")return c;const m=c.slice();return m[d]={...h,name:r||h.name,status:a?"error":"done",output:f,outputRaw:s,endedAt:l??Date.now()},m},l)}ensureNestedAssistant(t){const n=this.nestedAssistantIds.get(t);if(n)return n;const r=this.nextId("nested-asst");return this.nestedAssistantIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"assistant",id:r,text:"",streaming:!0}),s)),r}ensureNestedReasoning(t){const n=this.nestedReasoningIds.get(t);if(n)return n;const r=this.nextId("nested-think");return this.nestedReasoningIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"reasoning",id:r,text:"",open:!0}),s)),r}updateNestedChild(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(d=>d.id===n);if(a<0)return s;const l=s[a];if(l===void 0)return s;const c=s.slice();return c[a]={...l,...r},c})}pushUser(t){this.assistantId=null,this.reasoningId=null,this.push({kind:"user",id:this.nextId("user"),text:String(t??"")})}pushDivider(t,n=!1,r){this.push({kind:"divider",id:this.nextId("div"),text:t,fail:n,url:r})}ensureAssistant(){if(this.assistantId)return this.assistantId;const t=this.nextId("asst");return this.push({kind:"assistant",id:t,text:"",streaming:!0}),this.assistantId=t,t}ensureReasoning(){if(this.reasoningId)return this.reasoningId;const t=this.nextId("think");return this.push({kind:"reasoning",id:t,text:"",open:!0}),this.reasoningId=t,t}toolItemId(t){return`tool:${t}`}upsertTool(t,n,r,s){const a=this.toolItemId(t);if(this.itemIndex.has(a)){const l={};if(n&&(l.name=n),r!=null&&(l.args=r),s!==null){const c=this.getToolItem(a);c!==null&&c.startedAt===null&&(l.startedAt=s)}return Object.keys(l).length>0&&this.update(a,l),a}return this.push({kind:"tool",id:a,callId:t,name:n,args:r??null,status:"running",output:null,startedAt:s??Date.now(),endedAt:null}),this.toolIds.add(a),a}markAwaiting(t,n,r){const s=this.upsertTool(t,n,r,Date.now());this.update(s,{status:"awaiting",gate:"approval",output:"Parked for human approval. Approve or deny to continue the turn."})}markAwaitingAuth(t,n,r,s){const a=this.upsertTool(t,n,null,Date.now());this.update(a,{status:"awaiting",gate:"auth",connection:r,authUrl:s,output:`Waiting for ${r} authorization.`})}clearAwaiting(t,n){const r=this.toolItemId(t);if(!this.itemIndex.has(r))return;const s=this.getToolItem(r)?.gate==="auth",a=n==="deny";this.update(r,{status:"running",output:a?s?"Canceled — tool will not execute.":"Denied — tool will not execute.":s?"Connected — retrying…":"Approved — executing…"})}finishTool(t,n,r,s,a){const l=this.upsertTool(t,n,null,a),c=r==null?"(no output)":Hn(r,4e3);this.update(l,{status:s?"error":"done",output:c,outputRaw:r,endedAt:a??Date.now()}),this.activeTurnId===null&&!this.hasOpenTools()&&this.setRunning(!1)}hasOpenTools(){for(const t of this.toolIds){const n=this.itemIndex.get(t);if(n===void 0)continue;const r=this.items[n];if(r.kind==="tool"&&(r.status==="running"||r.status==="awaiting"))return!0}return!1}finalizeOpenTools(t,n){const r=t??Date.now();for(const s of this.toolIds){const a=this.itemIndex.get(s);if(a===void 0)continue;const l=this.items[a];l.kind==="tool"&&(l.status==="done"||l.status==="error"||l.status!=="awaiting"&&this.update(s,{status:"orphan",endedAt:r,output:n}))}}beginDiscardStaleTurnBody(){this.discardTurnBody=!0,this.activeTurnId=null}applyChat(t){if(this.discardTurnBody){if(t.type==="turn.started")this.discardTurnBody=!1;else if(t.type!=="message.received"&&t.type!=="agent.bound")return}else if(this.activeTurnId!==null&&t.turnId!==void 0&&t.turnId!==this.activeTurnId&&!LG.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=ml(t.at)||Date.now();switch(t.type){case"message.received":this.pushUser(n.text);break;case"agent.bound":this.pushDivider(n.url?`cloud agent ${n.sdkAgentId}`:`agent ${n.sdkAgentId}`,!1,typeof n.url=="string"?n.url:void 0);break;case"turn.started":this.activeTurnId=t.turnId??null,this.activeTurnStartedAt=ml(t.at),this.setRunning(!0);break;case"reasoning.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedReasoning(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureReasoning(),{text:String(n.text??"")});break;case"reasoning.completed":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.nestedReasoningIds.get(n.parentCallId);s&&(this.updateNestedChild(n.parentCallId,s,{open:!1}),this.nestedReasoningIds.delete(n.parentCallId))}else this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null);break;case"message.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureAssistant(),{text:String(n.text??"")});break;case"message.completed":{if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??""),streaming:!1}),this.nestedAssistantIds.delete(n.parentCallId)}else{const s=this.ensureAssistant();this.update(s,{text:String(n.text??""),streaming:!1}),this.assistantId=null}break}case"actions.requested":this.setRunning(!0);for(const s of n.calls||[]){const a=typeof s.parentCallId=="string"&&s.parentCallId!==""?s.parentCallId:typeof n.parentCallId=="string"&&n.parentCallId!==""?n.parentCallId:void 0;a!==void 0?this.upsertNestedTool(a,s.callId,s.toolName,s.args,r):s.toolName==="task"||this.upsertTool(s.callId,s.toolName,s.args,r)}break;case"action.approval_requested":this.markAwaiting(n.callId,n.toolName,n.args);break;case"action.approval_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.auth_requested":this.markAwaitingAuth(n.callId,n.toolName,n.connection,n.authUrl);break;case"action.auth_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.result":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.finishNestedTool(n.parentCallId,n.callId,n.toolName,n.output,!!n.isError,r):n.toolName==="task"||this.finishTool(n.callId,n.toolName,n.output,!!n.isError,r);break;case"subagent.called":this.setRunning(!0),this.upsertTool(this.subagentToolCallId(n.callId),`subagent:${n.name||"task"}`,n.description,r);break;case"artifact.tagged":{const s=CM(n);this.push({kind:"artifact",id:this.nextId("artifact"),artifactKind:s.kind,title:s.title,url:s.url,artifactId:s.artifactId,data:s.data});break}case"subagent.completed":this.nestedAssistantIds.delete(n.callId),this.nestedReasoningIds.delete(n.callId),this.finishTool(this.subagentToolCallId(n.callId),"","completed",!1,r);break;case"turn.completed":{this.activeTurnId=null,this.finalizeOpenTools(r,"(no result — turn completed before the tool reported back)");const s=this.activeTurnStartedAt;this.activeTurnStartedAt=null,this.push({kind:"turn-end",id:this.nextId("turn"),ms:s!==null&&ml(t.at)!==null?Math.max(0,r-s):null,inTokens:typeof n.usage?.inputTokens=="number"?n.usage.inputTokens:void 0,outTokens:typeof n.usage?.outputTokens=="number"?n.usage.outputTokens:void 0,costUsd:typeof n.cost?.totalUsd=="number"?n.cost.totalUsd:void 0});const a=this.state.current?.sessionId;a&&this.refreshSessionCost(a),this.setRunning(this.hasOpenTools());break}case"turn.failed":this.activeTurnId=null,this.activeTurnStartedAt=null,this.finalizeOpenTools(r,`(no result — turn failed: ${n.message||"unknown"})`),this.pushDivider(`turn failed: ${n.message}`,!0),this.setRunning(this.hasOpenTools());break;case"session.waiting":this.setRunning(this.hasOpenTools()),this.refreshSessions();break;case"session.completed":this.finalizeOpenTools(r,"(no result — session completed)"),this.pushDivider("task session completed"),this.setRunning(!1),this.refreshSessions();break;case"session.failed":this.finalizeOpenTools(r,`(no result — session failed: ${n.message||"unknown"})`),this.pushDivider(`session failed: ${n.message}`,!0),this.setRunning(!1),this.refreshSessions();break}}ingestStreamEvent(t){if(t.index!==void 0){if(t.index<=this.lastIndex)return;this.lastIndex=t.index}this.state.traceEvents.push(t),this.applyChat(t)}flushStreamPaint(){this.set({transcript:this.items.slice(),traceEvents:this.state.traceEvents.slice()})}setRunning(t){this.set({running:t,turnStartedAt:t?this.activeTurnStartedAt:null}),t||queueMicrotask(()=>this.maybeFlushQueue())}setView(t){if(t==="logs"){this.set({view:"overview",overviewSection:"logs",evalNavReturn:!1});try{const s=new URL(window.location.href);s.searchParams.delete("view"),history.replaceState(null,"",s.toString())}catch{}NM("logs");return}const n=t==="overview"||t==="chat"||t==="trace"||t==="raw"||t==="evals"||t==="abs"||t==="artifacts"?t:"overview",r=(this.state.view==="evals"||this.state.view==="abs")&&(n==="chat"||n==="trace"||n==="raw"||n==="artifacts");this.set({view:n,...n==="evals"||n==="overview"?{evalNavReturn:!1}:r?{evalNavReturn:!0}:{}}),r&&this.state.current===null&&this.attachEvalCaseSessionForView(n);try{const s=new URL(window.location.href);n==="overview"?s.searchParams.delete("view"):s.searchParams.set("view",n),history.replaceState(null,"",s.toString())}catch{}n==="evals"&&(this.refreshEvalRuns(),this.restoreEvalRun())}backToEvals(){this.set({evalNavReturn:!1}),this.setView("evals")}backToOverview(){this.set({evalNavReturn:!1}),this.setView("overview")}newChat(){this.historyOnly||(this.deselectSession(),this.setView("chat"))}async refreshSessions(){let t;try{t=await this.api.sessions()}catch{return}if(!t.ok||!t.body){this.noteAliasAuthLoss(t.status);return}const n=t.body.sessions||[],r=xG({knownIds:this.knownSessionIds,sessions:n,currentSessionId:this.state.current?.sessionId??null,embedded:this.state.embedded,view:this.state.view,seeded:this.sessionsSeeded});this.knownSessionIds=new Set(n.map(l=>l.sessionId)),this.sessionsSeeded=!0;const s={sessions:n};let a=!1;if(this.state.current){const l=n.find(c=>c.sessionId===this.state.current?.sessionId);l?.continuationToken&&(s.current={...this.state.current,continuationToken:l.continuationToken}),l?.running===!0&&!this.state.running&&this.streamAbort===null&&!this.snapshotOpen&&!this.historyOnly?(s.running=!0,a=!0):l?.running===!1&&this.state.running&&!this.hasOpenTools()&&(s.running=!1)}if(this.set(s),s.running===!1&&queueMicrotask(()=>this.maybeFlushQueue()),a&&this.state.current!==null&&this.startStream(this.state.current.sessionId,this.lastIndex+1),r.action==="select"){const l=n.find(c=>c.sessionId===r.sessionId);l!==void 0&&this.selectSession(l);return}r.action==="reveal"&&this.revealEmbeddedTriggeredRun(r.sessionId,n)}revealEmbeddedTriggeredRun(t,n){if(this.state.view==="overview"){this.set({overviewSection:"runs"});return}const r=n.find(l=>l.sessionId===t),s=r?.channelId??"triggered",a=r?.title?.trim();this.toast(a===void 0||a===""?`New ${s} run started`:`New ${s} run: ${a}`)}isCurrent(t){return this.state.current!==null&&this.state.current.sessionId===t}stopStream(){this.streamAbort&&(this.streamAbort.abort(),this.streamAbort=null)}startStream(t,n){if(this.historyOnly)return;this.stopStream();const r=new AbortController;this.streamAbort=r,this.api.streamFetch(t,n,r.signal).then(async s=>{if(!s.ok||!s.body){this.toast(`Stream failed (${s.status})`);return}const a=s.body.getReader(),l=new TextDecoder;let c="";for(;;){const d=await a.read();if(d.done){this.scheduleReconnect(t,r);return}c+=l.decode(d.value,{stream:!0});const f=c.split(`
|
|
18
|
+
`);c=f.pop()||"";const h=[];for(const m of f){if(r.signal.aborted)return;if(!m||!m.trim())continue;let b=null;try{b=JSON.parse(m)}catch{continue}b!==null&&h.push(b)}if(r.signal.aborted)return;for(const m of h)this.ingestStreamEvent(m);h.length>0&&this.flushStreamPaint()}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}scheduleReconnect(t,n){n.signal.aborted||this.historyOnly||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},1e3)}async refreshSessionCost(t){try{const n=await this.api.sessionCost(t);if(!n.ok||n.body===null||this.state.current?.sessionId!==t)return;this.set({sessionCostUsd:n.body.source==="unavailable"?null:n.body.costUsd})}catch{}}selectSession(t){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[];const n=this.state.view==="evals"||this.state.view==="abs";this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,continuationToken:t.continuationToken,externalUrl:t.externalUrl||null,prUrl:t.prUrl||null},running:!!t.running,turnStartedAt:null,queued:[],composerDraft:null,barTitle:t.title||"Session",barId:t.sessionId,externalUrl:t.externalUrl||null,transcript:[],traceEvents:[],sessionCostUsd:null,chatPanelOpen:!0,evalNavReturn:!1}),this.syncSessionUrl(t.sessionId),(n||this.state.view==="overview")&&(this.setView("chat"),this.set({evalNavReturn:!1})),this.refreshSessions(),this.refreshSessionCost(t.sessionId),this.loadEventsSnapshot(t.sessionId,!!t.running)}syncSessionUrl(t){try{const n=new URL(window.location.href);t?n.searchParams.set("sessionId",t):n.searchParams.delete("sessionId"),history.replaceState(null,"",n.toString())}catch{}}async loadEventsSnapshot(t,n){const r=++this.snapshotToken;this.snapshotOpen=!0,this.stopStream();try{const s=await this.api.eventsText(t);if(r!==this.snapshotToken||!this.isCurrent(t))return;if(!s.ok){this.historyOnly?this.toast(`Could not load trace (${s.status})`):(this.toast(`Could not load trace (${s.status}) — falling back to stream`),this.startStream(t,0));return}const a=await s.text();if(r!==this.snapshotToken||!this.isCurrent(t)||(await this.refreshSessions(),r!==this.snapshotToken||!this.isCurrent(t)))return;const l=this.state.sessions.find(f=>f.sessionId===t),c=l!==void 0?l.running===!0:n;this.ingestEventsCompact(sv(a),c);const d=this.hasOpenTools()||c;this.setRunning(d),d&&!this.historyOnly&&this.startStream(t,this.lastIndex+1)}catch(s){if(r!==this.snapshotToken||!this.isCurrent(t))return;this.toast(`Trace load failed: ${BG(s)}`),this.historyOnly||this.startStream(t,0)}finally{r===this.snapshotToken&&(this.snapshotOpen=!1)}}ingestEventsCompact(t,n=!1){this.resetTranscript(),this.lastIndex=-1;for(const r of t){const s=zG.has(r.type)||n&&r.type==="message.appended";s&&this.applyChat(r),!(!s&&r.type==="message.appended")&&typeof r.index=="number"&&r.index>this.lastIndex&&(this.lastIndex=r.index)}this.setRunning(this.hasOpenTools()||n),this.set({traceEvents:t.slice(),transcript:this.items.slice()})}deselectSession(){this.stopStream(),this.resetTranscript(),this.lastIndex=-1,this.set({current:null,localTrace:!1,running:!1,turnStartedAt:null,queued:[],composerDraft:null,transcript:[],traceEvents:[],sessionCostUsd:null,barTitle:"No session",barId:"",externalUrl:null,chatPanelOpen:!0,evalNavReturn:!1}),this.syncSessionUrl(null),this.state.embedded||this.setView("overview"),this.refreshSessions()}loadLocalTrace(t,n){this.stopStream(),this.resetTranscript(),this.lastIndex=-1;const r=sv(t);if(r.length===0){this.toast("No session events found in that file."),this.deselectSession();return}const s=r[0].sessionId||"local-trace";this.set({current:null,localTrace:!0,running:!1,turnStartedAt:null,queued:[],composerDraft:null,barTitle:"Trace",barId:`${n||s} · ${r.length} events`,externalUrl:null,chatPanelOpen:!0}),this.setView("trace"),this.syncSessionUrl(null),this.ingestEventsCompact(r),this.toast(`Loaded ${r.length} events — Trace timeline ready`)}slashCommands(){return qh(this.state.info?.channels)}async sendMessage(t,n={}){const r=t.trim();if(!r||this.state.localTrace||this.historyOnly)return!1;const s=this.state.current;if(wG(r))return this.invokeSlashCommand(r);if(this.queueHeld=!1,s!==null&&this.state.running&&!n.force)return this.queueMessage(r),!0;if(s===null){this.setRunning(!0);const a=await this.api.createSession(r);return!a.ok||!a.body?(this.setRunning(!1),this.toast(`Create failed: ${Hn(a.body,160)}`),!1):(this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:a.body.sessionId,channelId:"http",mode:"chat",continuationToken:a.body.continuationToken},barTitle:"Session",barId:a.body.sessionId,externalUrl:null,transcript:[],traceEvents:[]}),this.syncSessionUrl(a.body.sessionId),this.startStream(a.body.sessionId,0),this.refreshSessions(),!0)}return this.setRunning(!0),this.beginDiscardStaleTurnBody(),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,r,!0)}async postFollowUp(t,n,r){const s=await this.api.followUp(t.sessionId,n,t.continuationToken);if(s.ok&&s.body)return this.set({current:{...t,continuationToken:s.body.continuationToken}}),!0;if(s.body?.error==="stale_continuation_token"&&r){await this.refreshSessions();const a=this.state.current??t;return this.postFollowUp(a,n,!1)}return this.setRunning(!1),this.toast(`Send failed: ${Hn(s.body,160)}`),!1}queueMessage(t){this.set({queued:[...this.state.queued,{id:this.nextId("queued"),text:t}]})}removeQueued(t){this.set({queued:this.state.queued.filter(n=>n.id!==t)})}clearQueue(){this.set({queued:[]})}editQueued(t){const n=this.state.queued.find(r=>r.id===t);n!==void 0&&(this.removeQueued(t),this.set({composerDraft:n.text}))}consumeComposerDraft(){this.set({composerDraft:null})}setComposerDraft(t){this.set({composerDraft:t})}async sendQueuedNow(t){const n=this.state.queued.find(s=>s.id===t);if(n===void 0)return;this.removeQueued(t),this.queueHeld=!1,await this.sendMessage(n.text,{force:!0})||this.requeueFront(n)}requeueFront(t){this.set({queued:[t,...this.state.queued]}),this.queueHeld=!0}maybeFlushQueue(){if(this.flushingQueue||this.queueHeld)return;const{running:t,queued:n,localTrace:r,current:s}=this.state;if(t||r||this.historyOnly||s===null||n.length===0)return;const[a,...l]=n;a!==void 0&&(this.flushingQueue=!0,this.set({queued:l}),this.setRunning(!0),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,a.text,!0).then(c=>{c||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1}))}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||this.historyOnly||!this.state.running)return;this.state.queued.length>0&&(this.queueHeld=!0),this.beginDiscardStaleTurnBody(),this.stopStream(),this.setRunning(!1),this.assistantId&&(this.update(this.assistantId,{streaming:!1}),this.assistantId=null),this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null),this.finalizeOpenTools(Date.now(),"(no result — turn interrupted)"),this.pushDivider("turn interrupted"),this.commitTranscript();const n=await this.api.stopSession(t);if(!n.ok){this.toast(`Stop failed: ${Hn(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly)return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${Hn(s.body,160)}`)}async submitAuth(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly)return;const s=await this.api.resolveAuth(r,t,n);s.ok||this.toast(`Connect failed: ${Hn(s.body,160)}`)}async dispatchSchedule(t){if(this.historyOnly)return;const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${Hn(n.body,120)}`);return}await this.refreshSessions();const r=n.body.sessionIds?.[0],s=this.state.sessions.find(a=>a.sessionId===r);s&&this.selectSession(s)}async refreshEvalCases(){const t=await this.api.evalsList();if(!t.ok||!t.body){t.status!==0&&this.toast(`Could not list evals (${t.status}): ${Hn(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async refreshEvalRuns(){const t=await this.api.evalsListRuns();if(!t.ok||t.body===null)return;const n=Array.isArray(t.body.runs)?t.body.runs:null;n!==null&&this.set({evalRuns:n})}async selectEvalRun(t){const n=t.trim();if(n==="")return;this.set({chatPanelOpen:!0});const r=this.state.evalRuns.find(a=>a.runId===n);if(r!==void 0&&r.status!=="running"){this.applyRestoredEvalRun(r),this.setView("evals");return}const s=await this.api.evalsRunStatus(n);if(!s.ok||s.body===null){this.toast(`Eval run not found: ${n}`);return}this.applyRestoredEvalRun(s.body),this.setView("evals"),this.refreshEvalRuns()}async openEvalRunInOverview(t){const n=t.trim();n!==""&&(this.setOverviewSection("runs",n),await this.selectEvalRun(n))}async restoreEvalRun(){return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=qG();if(n!==null){const f=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(f.ok&&f.body){this.applyRestoredEvalRun(f.body),this.refreshEvalRuns();return}}const r=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration)return;const s=r.ok?r.body:null,a=Array.isArray(s?.runs)?s.runs:null;if(a!==null&&this.set({evalRuns:a}),s?.activeRunId!==void 0&&a!==null){const f=s.activeRunId,h=a.find(m=>m.runId===f)??await this.fetchEvalRunIfCurrent(t,f);if(t!==this.evalRestoreGeneration)return;if(h!==void 0){this.state.evalRun?.runId===h.runId?(this.set({evalRun:h}),h.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(h.runId)):this.applyRestoredEvalRun(h);return}}const l=this.state.evalRun;if(l!==null){l.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(l.runId);return}const c=UG(this.state.meta.basePath);if(c!==null){const f=await this.api.evalsRunStatus(c);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(f.ok&&f.body){this.applyRestoredEvalRun(f.body);return}}if(a===null)return;const d=a[0];d!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(d)}async fetchEvalRunIfCurrent(t,n){const r=await this.api.evalsRunStatus(n);if(t===this.evalRestoreGeneration)return r.ok&&r.body?r.body:void 0}applyRestoredEvalRun(t){this.set({evalRun:t}),this.mergeEvalRunIntoList(t),Gd(this.state.meta.basePath,t.runId),HG(t.runId),t.status==="running"&&this.startEvalRunPoll(t.runId)}mergeEvalRunIntoList(t){const n=this.state.evalRuns.filter(r=>r.runId!==t.runId);this.set({evalRuns:[t,...n]})}async startEvalRun(t){if(this.historyOnly)return;if(this.state.evalRun?.status==="running"){this.toast("An eval run is already in progress");return}this.evalRestoreGeneration+=1;const n=await this.api.evalsStartRun(t===void 0||t.length===0?{}:{filterIds:t});if(!n.ok||!n.body){this.toast(`Eval start failed: ${Hn(n.body,160)}`);return}this.set({evalRun:n.body}),Gd(this.state.meta.basePath,n.body.runId),(this.state.view==="overview"||this.state.view==="chat")&&(this.set({overviewSection:"runs",overviewRunId:n.body.runId,chatPanelOpen:!0}),this.mergeEvalRunIntoList(n.body)),this.setView("evals"),this.toast(`Eval ID: ${n.body.runId}`),this.startEvalRunPoll(n.body.runId),this.refreshEvalRuns()}async cancelEvalRun(t){const n=t??this.state.evalRun?.runId;if(n===void 0||n===""){this.toast("No eval run to cancel");return}const r=await this.api.evalsCancelRun(n);if(!r.ok||!r.body){this.toast(`Eval cancel failed: ${Hn(r.body,160)}`);return}this.set({evalRun:r.body}),Gd(this.state.meta.basePath,r.body.runId),this.toast(`Cancelled Eval ID ${r.body.runId}`),r.body.status==="running"?this.startEvalRunPoll(r.body.runId):this.stopEvalRunPoll(),this.refreshEvalRuns()}stopEvalRunPoll(){this.evalPollTimer!==null&&(clearInterval(this.evalPollTimer),this.evalPollTimer=null)}startEvalRunPoll(t){this.stopEvalRunPoll();const n=++this.evalPollGeneration;let r=!1,s=!1;const a=async()=>{if(!(n!==this.evalPollGeneration||r)){r=!0;try{const l=await this.api.evalsRunStatus(t);if(n!==this.evalPollGeneration||!l.ok||!l.body)return;if(this.set({evalRun:l.body}),Gd(this.state.meta.basePath,l.body.runId),this.mergeEvalRunIntoList(l.body),l.body.status!=="running"){if(this.stopEvalRunPoll(),this.refreshSessions(),this.refreshEvalRuns(),s||n!==this.evalPollGeneration)return;s=!0;const{passed:c,failed:d,total:f}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${d} failed, ${f} total`)}}finally{r=!1}}};a(),this.evalPollTimer=setInterval(()=>{a()},1500)}async attachEvalCaseSessionForView(t){const r=(this.state.evalRun??this.state.evalRuns[0]??null)?.cases.find(a=>a.sessionId!==void 0)?.sessionId;if(r===void 0||(await this.refreshSessions(),this.state.current!==null||this.state.view!==t))return;const s=this.state.sessions.find(a=>a.sessionId===r);s!==void 0?this.selectSession({...s,running:s.running===!0}):this.selectSession({sessionId:r,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView(t)}async openEvalCaseSession(t){await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView("chat")}async openEvalCaseTrace(t){await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView("trace")}async openSessionFromChannelResponse(t,n){const r=typeof n?.sessionId=="string"&&n.sessionId.trim()!==""?n.sessionId:null;if(r===null)return!1;await this.refreshSessions();const s=this.state.sessions.find(c=>c.sessionId===r),a=typeof n.status=="string"?n.status:void 0,l=a===void 0||a==="started"||a==="running";if(s!==void 0)this.selectSession({...s,running:l?!0:!!s.running});else{const c=typeof n.continuationToken=="string"?n.continuationToken:typeof n.key=="string"?n.key:void 0,d=typeof n.pr=="string"?n.pr:typeof n.title=="string"?n.title:"Session";this.selectSession({sessionId:r,channelId:t,mode:typeof n.mode=="string"?n.mode:"task",title:d,turnCount:0,running:l,continuationToken:c,externalUrl:typeof n.agentUrl=="string"?n.agentUrl:null})}return this.setView("chat"),this.setDrawerOpen(!1),!0}async openSessionById(t){const n=t.trim();if(n==="")return;await this.refreshSessions();const r=this.state.sessions.find(s=>s.sessionId===n);r!==void 0?this.selectSession(r):this.selectSession({sessionId:n,channelId:"http",mode:"conversation",title:"Session",turnCount:0,running:!1}),this.setView("chat")}async invokeSlashCommand(t){const n=t.trim(),r=this.slashCommands();if(/^\/help(?:\s|$)/i.test(n)){this.resetTranscript(),this.pushUser(n);const l=this.ensureAssistant();return this.update(l,{text:TG(r),streaming:!1}),this.assistantId=null,this.set({localTrace:!1,current:null,barTitle:"Help",barId:"",externalUrl:null,running:!1,turnStartedAt:null}),this.syncSessionUrl(null),this.commitTranscript(),!0}const s=RG(n,r);if(!s.ok)return this.toast(s.error),!1;this.setRunning(!0),this.resetTranscript(),this.pushUser(n);const a=this.ensureAssistant();this.update(a,{text:`Running \`${s.command.name}\` (${s.command.method} ${s.command.url})…`}),this.set({localTrace:!1,current:null,barTitle:s.command.name,barId:s.command.method,externalUrl:null,transcript:this.items.slice()}),this.syncSessionUrl(null);try{const l=await this.api.channelRequest(s.command.method,s.command.url,{body:s.body,query:s.query});return l.ok?await this.openSessionFromChannelResponse(s.command.channelId,l.body)?(this.assistantId=null,!0):(this.setRunning(!1),this.update(a,{text:"```json\n"+FG(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${Hn(l.body,400)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0)}catch(l){return this.setRunning(!1),this.update(a,{text:`Command failed: ${l instanceof Error?l.message:String(l)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0}}async loadEngineMeta(){let t;try{t=await this.api.meta()}catch{return!1}return!t.ok||!t.body?!1:(this.set({meta:{name:t.body.name??"agent",dev:!!t.body.dev,basePath:this.api.basePath,indexPath:t.body.indexPath,version:t.body.version,readonly:t.body.readonly===!0}}),console.info(`[playground] engine version ${t.body.version??"pre-0.1.14"}`),!0)}refreshEngineStatus(){this.api.health().then(t=>{this.set({health:t.ok?"ok":"bad"})}),this.api.info().then(t=>{t.ok&&t.body?this.set({info:t.body}):t.status===401&&(this.noteAliasAuthLoss(t.status)||this.toast("Unauthorized: set a bearer token (⋯ menu) that matches the channel auth."))})}async pollEngineMetaUntilReady(){const t=Date.now()+18e4;let n=1e3;for(;Date.now()<t;){if(await new Promise(r=>setTimeout(r,n)),n=Math.min(n*2,1e4),this.aliasAuthPending)return;if(await this.loadEngineMeta()){this.refreshEngineStatus(),this.refreshEvalCases(),this.restoreEvalRun();const r=this.pendingSessionDeepLink;if(this.pendingSessionDeepLink=null,r!==null){await this.refreshSessions(),this.selectDeepLinkedSession(r);try{new URL(window.location.href).searchParams.get("view")==="overview"&&this.setView("overview")}catch{}}return}}this.pendingSessionDeepLink=null}selectDeepLinkedSession(t){const n=this.state.sessions.find(r=>r.sessionId===t);n?this.selectSession(n):this.state.sessions.length>0&&this.toast(`Session not found: ${t}`)}get aliasAuthPending(){return this.state.aliasHosted&&this.state.aliasToken.trim()===""}async boot(){if(this.booted||this.aliasAuthPending)return;this.booted=!0;let t=null,n=null,r=null;try{const a=hG(window.location.href);t=a.sessionId,n=a.view,r=a.section}catch{}const s=await this.loadEngineMeta();s?this.refreshEngineStatus():(this.pendingSessionDeepLink=t,this.set({health:"bad"}),this.pollEngineMetaUntilReady()),n?this.setView(n):this.setView("overview"),r!==null&&this.set({overviewSection:r}),await this.refreshSessions(),this.refreshEvalCases(),this.refreshEvalRuns(),this.restoreEvalRun(),t&&s&&(this.selectDeepLinkedSession(t),n==="overview"&&this.setView("overview")),this.historyOnly||setInterval(()=>{this.refreshSessions()},this.state.meta.dev?2e3:5e3)}modelLabel(){return V7(this.state.info?.model)}}function BG(e){return e instanceof Error?e.message:String(e)}function FG(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function jM(e){return`agent-serve:evalRunId:${e||"/"}`}function UG(e){try{const t=sessionStorage.getItem(jM(e));return t!==null&&t!==""?t:null}catch{return null}}function qG(){try{const e=new URL(window.location.href).searchParams.get("evalRunId");if(e===null)return null;const t=e.trim();return t===""?null:t}catch{return null}}function HG(e){try{const t=new URL(window.location.href);if(t.searchParams.get("evalRunId")===e)return;t.searchParams.set("evalRunId",e),history.replaceState(null,"",t.toString())}catch{}}function Gd(e,t){try{sessionStorage.setItem(jM(e),t)}catch{}}const tt=new $G;tt.getState().aliasHosted&&eG(e=>tt.acceptAliasTokenHandoff(e));let ZT=tt.getState().overviewSection;Xo.subscribe(e=>{e.overviewSection!==ZT&&(ZT=e.overviewSection,NM(e.overviewSection))});if(tt.getState().embedded){let e=tt.getState().view,t=tt.getState().current?.sessionId??null,n=tt.getState().overviewSection,r=t!==null;Xo.subscribe(s=>{const a=s.current?.sessionId??null;a!==null&&(r=!0),!(s.view===e&&a===t&&s.overviewSection===n)&&(e=s.view,t=a,n=s.overviewSection,yG(s.view,r?a:void 0,void 0,s.overviewSection))})}function Ke(e){return Y7(Xo,e)}function GG(e){const t=[{key:"turns",value:String(e.turns)},{key:"fail",value:String(e.turnFailures)},{key:"tools",value:String(e.toolCalls)},{key:"tool err",value:String(e.toolErrors)},{key:"tokens",value:String(e.inputTokens+e.outputTokens)},{key:"wall",value:gi(e.wallTimeMs)}];e.costUsd!==void 0&&t.push({key:"cost",value:Uh(e.costUsd)});for(const[n,r]of Object.entries(e.custom).sort(([s],[a])=>s.localeCompare(a)))t.push({key:n,value:String(r)});return t}function LM(e){return e.turns>0||e.turnFailures>0||e.toolCalls>0||e.toolErrors>0||e.inputTokens>0||e.outputTokens>0||(e.costUsd??0)>0||e.wallTimeMs>0||Object.keys(e.custom).length>0}function zM({metrics:e}){return g.jsx("div",{className:"ab-metrics",children:GG(e).map(t=>g.jsxs("span",{className:"ab-metric",children:[g.jsx("span",{className:"ab-metric-k",children:t.key}),g.jsx("span",{className:"ab-metric-v",children:t.value})]},t.key))})}function VG({arm:e}){const t=e.variantLabel??e.variant,n=e.sessions>0||LM(e.metrics);return g.jsxs("div",{className:"ab-arm",children:[g.jsxs("div",{className:"ab-arm-head",children:[g.jsx("span",{className:"ab-kind",children:"Arm"}),g.jsx("span",{className:"ab-arm-name",children:t}),g.jsxs("span",{className:"ab-arm-n",children:[e.sessions," session",e.sessions===1?"":"s"]})]}),e.description!==void 0?g.jsx("div",{className:"ab-arm-desc",children:e.description}):null,n?g.jsx(zM,{metrics:e.metrics}):null]})}function WG({row:e,active:t}){return g.jsxs("button",{type:"button",className:`ab-session${t?" active":""}`,onClick:()=>{tt.selectSession({sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,turnCount:e.turnCount,...e.title===void 0?{}:{title:e.title},...e.updatedAt===void 0?{}:{updatedAt:e.updatedAt}}),tt.setView("chat")},children:[g.jsxs("div",{className:"ab-session-head",children:[g.jsx("span",{className:"ab-session-id",children:e.title||e.sessionId}),g.jsxs("span",{className:"ab-session-meta",children:[e.channelId,e.updatedAt!==void 0?` · ${Wp(e.updatedAt)??e.updatedAt}`:""]})]}),g.jsx("div",{className:"ab-session-arms",children:e.assignments.map(n=>{const r=n.variant===null,s=r?"Skipped":n.variantLabel??n.variant;return g.jsxs("div",{className:"ab-assignment",children:[g.jsxs("div",{className:"ab-assignment-row",children:[g.jsx("span",{className:"ab-assignment-exp",children:n.experiment}),g.jsx("span",{className:"ab-assignment-arrow","aria-hidden":!0,children:"→"}),g.jsx(qi,{variant:r?"neutral":"accent",size:"sm",pill:!0,children:s})]}),n.metrics!==void 0&&LM(n.metrics)?g.jsx(zM,{metrics:n.metrics}):null]},`${e.sessionId}:${n.experiment}`)})})]})}function PM(){const e=Ke(y=>y.current),[t,n]=v.useState(null),[r,s]=v.useState(null),[a,l]=v.useState(!0),c=v.useRef(!1),d=v.useCallback(async()=>{if(!c.current){c.current=!0,l(!0),s(null);try{const y=await tt.api.abs();if(!y.ok||y.body===null){s(`Failed to load A/Bs (${y.status})`),n(null);return}n(y.body)}catch(y){s(y instanceof Error?y.message:String(y)),n(null)}finally{l(!1),c.current=!1}}},[]);if(v.useEffect(()=>{d();const y=setInterval(()=>{d()},4e3);return()=>clearInterval(y)},[d]),a&&t===null)return g.jsx("div",{className:"pg-abs is-empty",children:g.jsxs("div",{className:"ab-empty",children:[g.jsx("span",{className:"spin"})," Loading A/B metrics…"]})});if(r!==null&&t===null)return g.jsxs("div",{className:"pg-abs is-empty",children:[g.jsx("div",{className:"ab-empty ab-error",children:r}),g.jsx(ln,{variant:"secondary",size:"sm",onClick:()=>{d()},children:"Retry"})]});const f=t?.experiments??[],h=t?.sessions??[];if(f.length===0&&h.length===0)return g.jsx("div",{className:"pg-abs is-empty",children:g.jsxs("div",{className:"ab-empty",children:["No A/B experiments loaded.",g.jsxs("div",{className:"ab-hint",children:["Author ",g.jsx("code",{children:"agent/ab.ts"})," with ",g.jsx("code",{children:"defineAB"}),", then run sessions — enrollment lands as durable ",g.jsx("code",{children:"ab.assigned"})," ","events at session create. Optional"," ",g.jsx("code",{children:"agent/ab.config.ts"})," controls fold retention and sample / snapshot persistence."]})]})});const b=t?.config?.maxPlaygroundSessions??200;return g.jsxs("div",{className:"pg-abs",children:[g.jsxs("div",{className:"ab-toolbar",children:[g.jsx("span",{className:"ab-toolbar-title",children:"A/B metrics"}),g.jsxs("span",{className:"ab-toolbar-meta",children:["last ",b," sessions"]}),r!==null?g.jsx("span",{className:"ab-error",children:r}):null,g.jsx("span",{className:"grow"}),g.jsx(ln,{variant:"secondary",size:"sm",onClick:()=>{d()},children:"Refresh"})]}),g.jsxs("section",{className:"ab-section",children:[g.jsx("h3",{children:"Experiments"}),f.length===0?g.jsx("div",{className:"ab-empty",children:"No declared experiments."}):g.jsx("div",{className:"ab-exp-list",children:f.map(y=>g.jsxs("div",{className:"ab-exp-card",children:[g.jsxs("div",{className:"ab-exp-card-head",children:[g.jsx("span",{className:"ab-kind",children:"Experiment"}),g.jsx("span",{className:"ab-exp-name",children:y.name}),y.skipped>0?g.jsxs(qi,{variant:"neutral",size:"sm",pill:!0,children:[y.skipped," skipped"]}):null]}),g.jsx("div",{className:"ab-arm-list",children:y.arms.map(k=>g.jsx(VG,{arm:k},k.variant))})]},y.name))})]}),g.jsxs("section",{className:"ab-section",children:[g.jsx("h3",{children:"Sessions"}),h.length===0?g.jsx("div",{className:"ab-empty",children:"No enrolled sessions yet. Start a chat to assign arms."}):g.jsx("div",{className:"ab-session-list",children:h.map(y=>g.jsx(WG,{row:y,active:e?.sessionId===y.sessionId},y.sessionId))})]})]})}function KG(){const[e,t]=v.useState(""),[n,r]=v.useState(null),[s,a]=v.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const d=await tt.signInWithAliasToken(e);a(!1),d.ok||r(d.error)}return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"agent-serve playground"}),g.jsx("p",{children:"This deployment requires its alias token."}),n!==null?g.jsx("div",{className:"pg-alias-signin-error",children:n}):null,g.jsxs("form",{onSubmit:c=>{l(c)},children:[g.jsx(Qc,{type:"password",size:"base","aria-label":"Alias token",placeholder:"adt_…",autoComplete:"off",autoFocus:!0,value:e,onChange:c=>t(c.target.value),disabled:s}),g.jsx(ln,{type:"submit",variant:"primary",disabled:s||e.trim()==="",children:s?"Checking…":"Open playground"})]}),g.jsxs("div",{className:"pg-alias-signin-hint",children:["The alias token was shown once when the agent was deployed. Lost it?",g.jsx("code",{children:"agent-sdk rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function YG(){return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"Playground disconnected"}),g.jsx("p",{children:"This playground connects through your Cursor dashboard. Use Reconnect on the dashboard, or reload the page."})]})})}const XG=["noopener","noreferrer"];function tk(e){return e.trim()===""}function $M(e){const t=e.trim();if(tk(t)||t.startsWith("#"))return!1;try{const n=new URL(t,"https://playground.invalid").protocol.toLowerCase();return n!=="javascript:"&&n!=="data:"&&n!=="vbscript:"&&n!=="file:"}catch{return!0}}function ZG(e){if(e.hasAttribute("download"))return;const t=e.getAttribute("href");if(t===null||!$M(t))return;e.target="_blank";const n=new Set(e.rel.split(/\s+/).map(r=>r.toLowerCase()).filter(r=>r!==""));for(const r of XG)n.add(r);e.rel=[...n].join(" ")}function QT(e){const t=e.target;if(!(t instanceof Element))return;const n=t.closest("a");if(!(n instanceof HTMLAnchorElement))return;ZG(n);const r=n.getAttribute("href");r!==null&&tk(r)&&!n.hasAttribute("download")&&e.preventDefault()}function QG(e=document){return e.addEventListener("click",QT,!0),()=>e.removeEventListener("click",QT,!0)}function aa({href:e,onClick:t,...n}){const s=e!==void 0&&tk(e)?a=>{a.preventDefault(),t?.(a)}:t;return e===void 0||!$M(e)?g.jsx("a",{href:e,...n,onClick:s}):g.jsx("a",{href:e,...n,onClick:s,target:"_blank",rel:"noopener noreferrer"})}const BM=512*1024,JG=64*1024*1024,eV=240;async function FM(e){try{const t=await tt.api.artifactContent(e,BM);if(!t.ok)return t.status===404?{phase:"absent"}:{phase:"error",message:`HTTP ${t.status}`};let n=null;if(nG(t.contentType)){const r=new TextDecoder("utf-8",{fatal:!1}).decode(t.bytes);n=rG(r)?null:r}return{phase:"loaded",text:n,isDiff:n!==null&&iG(t.contentType,n),contentType:t.contentType,size:t.bytes.length,truncated:t.truncated}}catch(t){return{phase:"error",message:t instanceof Error?t.message:String(t)}}}async function UM(e,t){try{const n=await tt.api.artifactContent(e,JG);if(!n.ok)return;const r=new Blob([n.bytes.buffer],{type:n.contentType??"application/octet-stream"}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=nV(t,e,n.contentType),a.click(),URL.revokeObjectURL(s)}catch{}}const tV={"text/x-diff":".diff","text/x-patch":".patch","application/json":".json","text/markdown":".md","text/plain":".txt","text/html":".html","text/csv":".csv"};function nV(e,t,n){const r=(e??t).trim().replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80),s=n?.split(";")[0]?.trim().toLowerCase()??"",a=tV[s]??"",l=r===""?t:r;return l.includes(".")?l:`${l}${a}`}function rV({text:e,isDiff:t}){const n=v.useMemo(()=>t?e.split(`
|
|
19
|
+
`):null,[e,t]);return n===null?g.jsx("pre",{className:"pg-artifact-file-text",children:e}):g.jsx("pre",{className:"pg-artifact-file-text pg-artifact-diff",children:n.map((r,s)=>g.jsx("span",{className:`diff-line diff-${sG(r)}`,children:r},s))})}function qM({artifactId:e,title:t,state:n}){if(n.phase==="idle"||n.phase==="loading")return g.jsx("div",{className:"pg-artifact-file-note",children:"Loading contents…"});if(n.phase==="absent")return null;if(n.phase==="error")return g.jsxs("div",{className:"pg-artifact-file-note",children:["Failed to load contents: ",n.message]});const r=ov(n.size),s=[n.contentType?.split(";")[0],r].filter(a=>a!==void 0&&a!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file",children:[g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(Yt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:s||"file payload"}),g.jsx(ln,{variant:"ghost",size:"sm",onClick:()=>{UM(e,t)},children:"Download"})]}),n.text!==null?g.jsx(rV,{text:n.text,isDiff:n.isDiff}):g.jsx("div",{className:"pg-artifact-file-note",children:"Binary payload — use Download to save it."}),n.truncated?g.jsxs("div",{className:"pg-artifact-file-note",children:["Preview truncated to ",ov(BM)," — Download has the full payload."]}):null]})}function iV({data:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>mo(e),[e]);if(r===""||r==="null")return null;const s=r.length>eV;return g.jsxs("div",{className:"pg-artifact-data",children:[g.jsx("pre",{className:s&&!t?"pg-artifact-json clamped":"pg-artifact-json",children:r}),s?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>n(a=>!a),children:t?"Collapse":"Show all"}):null]})}const sV=v.memo(function({artifactKind:t,title:n,url:r,artifactId:s,data:a}){const[l,c]=v.useState(!1),[d,f]=v.useState({phase:"idle"}),h=m=>{c(m),!(!m||s===void 0||d.phase!=="idle")&&(f({phase:"loading"}),FM(s).then(f))};return g.jsx("div",{className:"pg-artifact-card",children:g.jsx(hi,{action:"Artifact",details:g.jsxs("span",{className:"pg-artifact-head",children:[g.jsx(qi,{variant:"accent",size:"sm",pill:!0,children:t}),n!==void 0?g.jsx("span",{className:"pg-artifact-head-title",children:n}):null]}),leadingIcon:g.jsx(Yt,{name:"bookmark",size:"sm",color:"secondary"}),open:l,onOpenChange:h,tone:"tertiary",children:g.jsxs("div",{className:"pg-artifact-body",children:[r!==void 0?g.jsx(aa,{className:"pg-artifact-link",href:r,children:r}):null,a!==void 0?g.jsx(iV,{data:a}):null,s!==void 0?g.jsx(qM,{artifactId:s,title:n,state:d}):null]})})})}),JT=280,oV=8,Wb=1e3;function aV({record:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>{const a=RM(e.data);return a!==null?{url:a,json:"",short:""}:{url:null,json:mo(e.data),short:Hn(e.data,JT)}},[e.data]);if(r.url!==null)return g.jsx(aa,{className:"artifact-link",href:r.url,children:r.url});if(r.json==="")return null;const s=r.json.length>JT||r.json.split(`
|
|
20
|
+
`).length>oV;return g.jsxs("div",{className:"artifact-data",children:[g.jsx("pre",{className:"artifact-json",children:s&&!t?r.short:r.json}),s?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>n(!t),children:t?"Collapse":"Expand"}):null]})}function lV({record:e}){const[t,n]=v.useState({phase:"idle"}),r=e.content;if(r===void 0)return null;if(t.phase==="idle"){const s=[r.contentType,ov(r.size)].filter(a=>a!==void 0&&a!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(Yt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:s||"file payload"}),g.jsx(ln,{variant:"ghost",size:"sm",onClick:()=>{n({phase:"loading"}),FM(e.id).then(n)},children:"View"}),g.jsx(ln,{variant:"ghost",size:"sm",onClick:()=>{UM(e.id,e.title)},children:"Download"})]})}return g.jsx(qM,{artifactId:e.id,title:e.title,state:t})}const eR=v.memo(function({record:t}){return g.jsxs("div",{className:"artifact-row",children:[g.jsxs("div",{className:"artifact-row-head",children:[g.jsx("span",{className:"artifact-title",children:oG(t)}),g.jsx(qi,{variant:"accent",size:"sm",pill:!0,children:t.kind}),g.jsx(qi,{variant:t.source==="model"?"success":"neutral",size:"sm",pill:!0,children:t.source}),g.jsx("span",{className:"artifact-updated",title:`updated ${t.updatedAt}`,children:Wp(t.updatedAt)??t.updatedAt})]}),g.jsx(aV,{record:t}),g.jsx(lV,{record:t})]})});function uV({sessionId:e,count:t,title:n}){const r=`${t} artifact${t===1?"":"s"}`;return e===null?g.jsxs("div",{className:"artifact-group-head",children:[g.jsx("span",{className:"artifact-group-id",children:"No session"}),g.jsx("span",{className:"artifact-group-n",children:r})]}):g.jsxs("button",{type:"button",className:"artifact-group-head",onClick:()=>{tt.openSessionById(e)},title:"Open this session's replay",children:[g.jsx("span",{className:"artifact-group-id",children:n||e}),n?g.jsx("span",{className:"artifact-group-sub",children:e}):null,g.jsxs("span",{className:"artifact-group-n",children:[r," →"]})]})}function HM(){const e=Ke(N=>N.current),t=Ke(N=>N.sessions),[n,r]=v.useState(null),[s,a]=v.useState(null),[l,c]=v.useState(null),[d,f]=v.useState("all"),[h,m]=v.useState(0);e===null&&d==="session"&&f("all");const b=d==="session"&&e!==null?e.sessionId:null,y=n!==null&&n.scope===b?n.rows:null;v.useEffect(()=>{let N=!1,A=!1;a(null);const $=async()=>{if(!A){A=!0;try{const I=await tt.api.artifacts({sessionId:b??void 0,limit:Wb});if(N)return;if(!I.ok||I.body===null){a(`Failed to load artifacts (${I.status})`);return}a(null),r({scope:b,rows:I.body.artifacts??[]})}catch(I){N||a(I instanceof Error?I.message:String(I))}finally{A=!1}}};$();const z=setInterval(()=>{$()},4e3);return()=>{N=!0,clearInterval(z)}},[b,h]);const k=()=>m(N=>N+1),S=b!==null;if(y===null)return g.jsx("div",{className:"pg-artifacts is-empty",children:s!==null?g.jsx(ws,{body:s,cta:{label:"Retry",onClick:k}}):g.jsx(ws,{body:"Loading artifacts…"})});const E=_M(y);if(E.length===0)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(ws,{body:S?"No artifacts tagged for this session.":"No artifacts tagged yet."})});const R=aG(E),T=l!==null&&R.includes(l)?l:null,C=lG(E,T),_=S?[]:uG(C),L=new Map(t.map(N=>[N.sessionId,N.title]));return g.jsxs("div",{className:"pg-artifacts",children:[g.jsxs("div",{className:"ab-toolbar",children:[g.jsx("span",{className:"ab-toolbar-title",children:"Artifacts"}),g.jsxs("span",{className:"ab-toolbar-meta",children:[C.length," of ",E.length,E.length>=Wb?` (newest ${Wb})`:""]}),s!==null?g.jsx("span",{className:"ab-error",children:s}):null,g.jsx("span",{className:"grow"}),e!==null?g.jsxs(pc,{size:"sm",variant:"compact",value:d,onValueChange:N=>f(N==="session"?"session":"all"),"aria-label":"Artifact scope",children:[g.jsx(pc.Item,{value:"all",children:"All sessions"}),g.jsx(pc.Item,{value:"session",children:"This session"})]}):null,g.jsx(ln,{variant:"secondary",size:"sm",onClick:k,children:"Refresh"})]}),R.length>1?g.jsxs("div",{className:"artifact-kinds",role:"group","aria-label":"Filter by kind",children:[g.jsx("button",{type:"button",className:`artifact-kind-chip${T===null?" active":""}`,onClick:()=>c(null),children:"All"}),R.map(N=>g.jsx("button",{type:"button",className:`artifact-kind-chip${T===N?" active":""}`,onClick:()=>c(T===N?null:N),children:N},N))]}):null,C.length===0?g.jsx(ws,{body:"No artifacts match this kind filter."}):S?g.jsx("div",{className:"artifact-list",children:C.map(N=>g.jsx(eR,{record:N},N.id))}):g.jsx("div",{className:"artifact-group-list",children:_.map(N=>g.jsxs("section",{className:"artifact-group",children:[g.jsx(uV,{sessionId:N.sessionId,count:N.artifacts.length,title:N.sessionId===null?void 0:L.get(N.sessionId)}),g.jsx("div",{className:"artifact-list",children:N.artifacts.map(A=>g.jsx(eR,{record:A},A.id))})]},N.sessionId??"(none)"))})]})}function cV(e){const{localTrace:t,historyOnly:n,current:r,running:s,slashNames:a}=e;if(n)return{disabled:!0,hint:"This agent is stopped. Open a session from Runs to inspect its chat and trace."};if(t)return{disabled:!0,hint:"Local trace (view only). Click New or pick a live session to chat."};if(r===null)return{disabled:!1,hint:a.length>0?`Slash commands: ${a.slice(0,4).join(", ")}${a.length>4?", …":""}, /help.`:""};if(r.mode==="task"||r.channelId!=="http")return r.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:r.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${r.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${r.channelId}” channel take follow-ups through that channel; watch only here.`};if(!r.continuationToken)return{disabled:!0,hint:"This session has no continuation token; watch only."};const c=a.length>0?` Channel commands (${a.slice(0,3).join(", ")}${a.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:s?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${c}`}}function fV(){const e=Ke(t=>t.queued);return e.length===0?null:g.jsx("div",{className:"pg-queue",role:"list","aria-label":"Queued messages",children:e.map(t=>g.jsxs("div",{className:"pg-queue-item",role:"listitem",children:[g.jsx("button",{type:"button",className:"pg-queue-label",title:"Edit queued message",onClick:()=>tt.editQueued(t.id),children:t.text}),g.jsxs("span",{className:"pg-queue-actions",children:[g.jsx(dr,{icon:"arrow-up",size:"sm",variant:"ghost","aria-label":"Send now (interrupts the running turn)",onClick:()=>{tt.sendQueuedNow(t.id)}}),g.jsx(dr,{icon:"x",size:"sm",variant:"ghost","aria-label":"Remove queued message",onClick:()=>tt.removeQueued(t.id)})]})]},t.id))})}function GM(){const[e,t]=v.useState(""),[n,r]=v.useState(0),s=v.useRef(null),a=Ke(N=>N.localTrace),l=Ke(N=>N.meta.readonly===!0),c=Ke(N=>N.current),d=Ke(N=>N.running),f=Ke(N=>N.composerDraft),h=Ke(N=>N.info);v.useEffect(()=>{f!==null&&(t(N=>N.trim()?`${N} ${f}`:f),tt.consumeComposerDraft(),s.current?.focus())},[f]);const m=v.useMemo(()=>qh(h?.channels),[h]),b=v.useMemo(()=>OM(m),[m]),y=v.useMemo(()=>{if(a||l)return null;const N=e.replace(/^\s+/,"");return!N.startsWith("/")||/\s/.test(N)?null:N},[e,a,l]),k=v.useMemo(()=>y===null?[]:EG(y,m),[y,m]),S=y!==null&&k.length>0,{disabled:E,hint:R}=cV({localTrace:a,historyOnly:l,current:c,running:d,slashNames:b}),T=d&&c!==null&&!a&&!l,C=async(N=e,A=!1)=>{if(!N.trim())return;await tt.sendMessage(N,{force:A})&&(t(""),r(0))},_=N=>{t(`${N} `),r(0)},L=N=>{if(S){if(N.key==="ArrowDown"){N.preventDefault(),r(A=>(A+1)%k.length);return}if(N.key==="ArrowUp"){N.preventDefault(),r(A=>(A-1+k.length)%k.length);return}if(N.key==="Tab"||N.key==="Enter"&&!N.shiftKey){const A=k[n]??k[0];if(A!==void 0&&y!==A.name){N.preventDefault(),_(A.name);return}}if(N.key==="Escape"){N.preventDefault(),t(""),r(0);return}}N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),C(e,N.metaKey||N.ctrlKey))};return g.jsxs("div",{className:"pg-composer",children:[S?g.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[k.map((N,A)=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":A===n,className:A===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:$=>{$.preventDefault(),_(N.name)},onMouseEnter:()=>r(A),children:[g.jsx("code",{className:"pg-slash-name",children:N.name}),g.jsx("span",{className:"pg-slash-method",children:N.method}),N.description?g.jsx("span",{className:"pg-slash-desc",children:N.description}):null]})},`${N.name}:${N.method}`)),g.jsxs("li",{className:"pg-slash-footer",children:[g.jsx("code",{children:"/help"})," lists all channel commands"]})]}):null,g.jsxs("div",{className:"inner",children:[g.jsx(fV,{}),g.jsxs("div",{className:E&&!T?"pg-prompt disabled":"pg-prompt",children:[g.jsx("textarea",{ref:s,className:"pg-prompt-input",rows:1,placeholder:b.length>0?`Message the agent, or ${b[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":S?"list":void 0,"aria-expanded":S,value:e,onChange:N=>{t(N.target.value),r(0)},onKeyDown:L,disabled:E,autoFocus:!0}),g.jsxs("div",{className:"pg-prompt-toolbar",children:[g.jsx("span",{className:"pg-prompt-hint",title:R,children:R}),T&&!e.trim()?g.jsx(dr,{icon:"square",iconVariant:"filled",variant:"primary",tone:"monochrome",rounded:!0,size:"lg",className:"pg-prompt-stop","aria-label":"Stop the running turn",onClick:()=>{tt.stopTurn()}}):g.jsx(dr,{icon:"arrow-up",variant:"primary",tone:"monochrome",rounded:!0,size:"lg","aria-label":d?"Queue message (⌘Enter sends now)":"Send message",disabled:E,onClick:()=>{C()}})]})]})]})]})}function dV(e){return{filename:`${e.runId}.eval-results.json`,text:`${JSON.stringify(e,null,2)}
|
|
21
|
+
`}}function pV(e,t,n="application/json"){const r=new Blob([t],{type:n}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=e,a.target="_self",document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(s)}function ai(e){const t=e.at??null,n=e.ms??null;let r=e.startAt??null;return r===null&&t!==null&&n!==null&&n>0&&(r=t-n),r===null&&(r=t),{...e,startAt:r,at:t,ms:n}}function VM(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="";const c=new Map;let d=null,f=1,h=0,m=0;function b(E){return n&&n.endedAt===null||(n={turnId:E?.turnId||`turn_${t.length+1}`,startedAt:E?.at?ml(E.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function y(E){b({turnId:E.turnId,at:null}).rows.push(E),E.ms&&E.ms>f&&(f=E.ms)}function k(E){if(a===null)return;const R=b(),T=E!==null&&a!==null?Math.max(0,E-a):null,C=l.trim()||void 0;R.rows.push(ai({kind:"think",label:C?Kr(C,80):"thinking",body:C,ms:T,at:E,startAt:a})),T&&T>f&&(f=T),a=null,l=""}for(const E of e){const R=E.data||{},T=ml(E.at);switch(E.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=E.turnId||n.turnId,n.startedAt=T,n.provisional=!1):(n={turnId:E.turnId||`turn_${t.length+1}`,startedAt:T,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",d=null;break;case"message.received":y(ai({kind:"user",label:Kr(R.text,140),body:typeof R.text=="string"?R.text:void 0,at:T,startAt:T,ms:0,turnId:E.turnId}));break;case"reasoning.appended":if(typeof R.parentCallId=="string"&&R.parentCallId!==""){const C=c.get(R.parentCallId)??{start:T,text:""};C.start===null&&(C.start=T),typeof R.text=="string"&&(C.text=R.text),c.set(R.parentCallId,C);break}a===null&&(a=T),typeof R.text=="string"&&(l=R.text);break;case"reasoning.completed":if(typeof R.parentCallId=="string"&&R.parentCallId!==""){const C=R.parentCallId,_=c.get(C);c.delete(C);const L=_?.text.trim()||void 0;if(L!==void 0){const N=_?.start??T,A=N!==null&&T!==null?Math.max(0,T-N):null;y(ai({kind:"think",label:Kr(L,80),body:L,ms:A,at:T,startAt:N,turnId:E.turnId,depth:1,parentCallId:C}))}break}k(T);break;case"message.appended":if(typeof R.parentCallId=="string"&&R.parentCallId!=="")break;d===null&&(d=T);break;case"message.completed":{if(typeof R.parentCallId=="string"&&R.parentCallId!==""){const L=R.parentCallId;y(ai({kind:"agent",label:Kr(R.text,160)||"(empty reply)",body:typeof R.text=="string"?R.text:void 0,at:T,startAt:T,ms:0,turnId:E.turnId,depth:1,parentCallId:L}));break}const C=d??T,_=C!==null&&T!==null?Math.max(0,T-C):null;y(ai({kind:"agent",label:Kr(R.text,160)||"(empty reply)",body:typeof R.text=="string"?R.text:void 0,at:T,startAt:C,ms:_,turnId:E.turnId})),_&&_>f&&(f=_),d=null;break}case"actions.requested":for(const C of R.calls||[]){const _=typeof C.parentCallId=="string"&&C.parentCallId!==""?C.parentCallId:typeof R.parentCallId=="string"&&R.parentCallId!==""?R.parentCallId:void 0;if(_===void 0&&C.toolName==="task")continue;const L=_===void 0?C.callId:`${_}:${C.callId}`;r[L]={name:C.toolName,args:C.args,start:T,turnId:E.turnId,parentCallId:_}}break;case"action.result":{const C=R.callId;if(C==null)break;const _=typeof R.parentCallId=="string"&&R.parentCallId!==""?R.parentCallId:void 0;if(_===void 0&&R.toolName==="task"){delete r[C];break}const L=_===void 0?C:`${_}:${C}`,N=r[L];delete r[L];const A=N&&N.start!==null&&T!==null?T-N.start:null;h+=1,R.isError&&(m+=1);{const $=R.toolName||N?.name||"tool",z=N?.args;y(ai({kind:"tool",label:$+(z?` ${Kr(Hn(z,60),60)}`:""),toolName:$,callId:typeof C=="string"?C:String(C),toolArgs:z,toolOutput:R.output,body:typeof R.output=="string"?R.output:R.output!=null?Hn(R.output,4e3):void 0,ms:A,error:!!R.isError,at:T,startAt:N?.start??null,turnId:E.turnId,depth:_===void 0?0:1,parentCallId:_}))}A&&A>f&&(f=A);break}case"subagent.called":{const C=`task:${R.name||"subagent"}`,_=typeof R.callId=="string"?R.callId:String(R.callId);r[`sub:${_}`]={name:C,args:R.description,start:T,turnId:E.turnId};const L=b(E);L.rows.push(ai({kind:"tool",label:C,toolName:C,callId:_,toolArgs:R.description,ms:null,at:T,startAt:T,turnId:E.turnId,depth:0})),s.set(_,{turn:L,index:L.rows.length-1});break}case"subagent.completed":{const C=typeof R.callId=="string"?R.callId:String(R.callId),_=`sub:${C}`,L=r[_];delete r[_];const N=L&&L.start!==null&&T!==null?T-L.start:null;h+=1;const A=s.get(C);s.delete(C);const $=A!==void 0?A.turn.rows[A.index]:void 0;$!==void 0&&$.kind==="tool"?($.ms=N,$.at=T,N&&N>f&&(f=N)):y(ai({kind:"tool",label:L?.name||"subagent",toolName:L?.name||"subagent",callId:C,toolArgs:L?.args,ms:N,at:T,startAt:L?.start??null,turnId:E.turnId}));break}case"artifact.tagged":{const C=CM(R);y(ai({kind:"artifact",label:Kr(C.title===void 0?C.kind:`${C.kind} · ${C.title}`,120),body:R.data!=null?Hn(R.data,4e3):void 0,url:C.url,at:T,startAt:T,ms:0,turnId:E.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(E.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const C=b(E);if((E.type==="turn.completed"||E.type==="turn.failed")&&(C.endedAt=T,C.usage=R.usage||null,C.cost=R.cost||null,C.failed=E.type==="turn.failed",C.error=R.message,C.startedAt!==null&&C.endedAt!==null)){const _=C.endedAt-C.startedAt;_>f&&(f=_),C.wallMs=_}if(k(T),d!==null&&T!==null){const _=Math.max(0,T-d);C.rows.push(ai({kind:"agent",label:"(streaming…)",ms:_,at:T,startAt:d})),d=null}for(const _ of Object.keys(r)){const L=r[_],N=L.start!==null&&T!==null?T-L.start:null;C.rows.push(ai({kind:"tool",label:`${L.name||"tool"} (no result)`,ms:N,error:!0,at:T,startAt:L.start,turnId:L.turnId})),N&&N>f&&(f=N)}r={},(E.type==="turn.completed"||E.type==="turn.failed")&&(n=null);break}}}for(const E of Object.keys(r)){const R=r[E];y(ai({kind:"tool",label:`${R.name||"tool"} (running…)`,ms:null,at:R.start,startAt:R.start,turnId:R.turnId}))}let S=null;for(const E of t){const R=E.cost?.totalUsd;typeof R=="number"&&Number.isFinite(R)&&(S=(S??0)+R)}return{turns:t,maxWallMs:f,totalTools:h,failedTools:m,eventCount:e.length,totalCostUsd:S}}function hV(e,t=6){if(!Number.isFinite(e)||e<=0)return[0];const n=e/Math.max(2,t-1),r=10**Math.floor(Math.log10(Math.max(n,1))),s=[1,2,2.5,5,10].map(c=>c*r),a=s.find(c=>n/c<=1.5)??s[s.length-1],l=[0];for(let c=a;c<e-a*.25&&(l.push(c),!(l.length>=t-1));c+=a);return l[l.length-1]!==e&&l.push(e),l}function mV({case:e}){const t=Object.entries(e.metrics??{});return t.length===0?null:g.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:t.map(([n,r])=>g.jsxs("span",{className:"eval-metric",title:n,children:[g.jsx("span",{className:"eval-metric-name",children:n}),g.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))})}const gV={},bV={};function yV(e){return/\/factory\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const WM=new Map;for(const[e,t]of Object.entries(bV)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=yV(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)WM.set(a,t.default)}function vV(e){if(!(e===void 0||e.trim()===""))return WM.get(e.trim())}const xV={passed:"Pass",failed:"Fail",scored:"Scored",skipped:"Skipped"},kV={passed:"success",failed:"danger",scored:"warn",skipped:"neutral"};function SV(e){return e.verdict??(e.ok===!0?"passed":"failed")}function wV(e){const t=[];return e.score!==void 0&&t.push(`score ${e.score.toFixed(3)}${e.threshold===void 0?"":` ≥ ${e.threshold}`}`),e.detail!==void 0&&t.push(e.detail),t.length===0?void 0:t.join(" · ")}function EV({a:e}){return e.passed?g.jsx(Yt,{name:"check-circle",variant:"filled",size:"sm",color:"green"}):e.severity==="soft"?g.jsx(Yt,{name:"minus-circle",variant:"filled",size:"sm",color:"yellow"}):g.jsx(Yt,{name:"x-circle",variant:"filled",size:"sm",color:"red"})}function KM(e,t=200){const[n,r]=v.useState(e);return v.useEffect(()=>{if(e){r(!0);return}if(!n)return;const s=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(s)},[e,n,t]),e||n}const TV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},RV={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},CV={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function _V({row:e}){const[t,n]=v.useState(!1),r=e.body!==void 0&&e.body.length>0||e.toolArgs!==void 0||e.toolOutput!==void 0,s=t&&r,a=KM(s),l=e.error?"error":e.kind;return g.jsxs("div",{className:`eval-step eval-step-${e.kind}${e.error?" error":""}`,children:[g.jsxs("button",{type:"button",className:"eval-step-head",disabled:!r,onClick:()=>n(c=>!c),"aria-expanded":t,children:[g.jsxs("span",{className:`eval-step-kind kind-${l}`,children:[g.jsx(Yt,{name:TV[e.kind],size:"sm",color:e.error?"red":CV[e.kind]}),g.jsx("span",{className:"eval-step-kind-label",children:RV[e.kind]})]}),g.jsx("span",{className:"eval-step-label",title:e.label,children:e.kind==="tool"&&e.toolName!==void 0?e.toolName:e.label}),e.ms!=null&&e.ms>0?g.jsx("span",{className:"eval-step-ms",children:gi(e.ms)}):null,r?g.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:g.jsx(Yt,{name:"chevron-right",size:10})}):null]}),a?g.jsx("div",{className:s?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:g.jsxs("div",{className:"eval-step-detail",children:[e.kind==="tool"&&e.toolArgs!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"args"}),g.jsx("pre",{children:mo(e.toolArgs)})]}):null,e.kind==="tool"&&e.toolOutput!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:e.error?"error":"result"}),g.jsx("pre",{children:typeof e.toolOutput=="string"?e.toolOutput:mo(e.toolOutput)})]}):null,e.kind!=="tool"&&e.body!==void 0?g.jsx("div",{className:"eval-step-block",children:g.jsx("pre",{children:e.body})}):null,e.kind==="tool"&&e.body!==void 0&&e.toolOutput===void 0?g.jsx("div",{className:"eval-step-block",children:g.jsx("pre",{children:e.body})}):null]})}):null]})}function NV({sessionId:e,live:t}){const[n,r]=v.useState([]),[s,a]=v.useState(null),[l,c]=v.useState(!0),[d,f]=v.useState(!1),h=v.useRef(null);v.useEffect(()=>{let b=!1;const y=new AbortController;return c(!0),a(null),r([]),f(!1),(async()=>{let k=-1;try{const S=await tt.api.eventsText(e);if(b)return;if(S.ok){const E=await S.text();if(b)return;const R=sv(E);for(const T of R)typeof T.index=="number"&&T.index>k&&(k=T.index);r(R)}}catch(S){b||a(S instanceof Error?S.message:String(S))}finally{b||c(!1)}if(!(!t||b)){f(!0);try{const S=await tt.api.streamFetch(e,k+1,y.signal);if(!S.ok||!S.body){b||(a(`Stream failed (${S.status})`),f(!1));return}const E=S.body.getReader(),R=new TextDecoder;let T="";for(;;){const{done:C,value:_}=await E.read();if(C||b)break;T+=R.decode(_,{stream:!0});const L=T.split(`
|
|
22
|
+
`);T=L.pop()??"";const N=[];for(const A of L){const $=A.trim();if($)try{const z=JSON.parse($);N.push(z),typeof z.index=="number"&&z.index>k&&(k=z.index)}catch{}}N.length>0&&!b&&r(A=>[...A,...N])}}catch(S){!b&&!(S instanceof DOMException&&S.name==="AbortError")&&a(S instanceof Error?S.message:String(S))}finally{b||f(!1)}}})(),()=>{b=!0,y.abort()}},[e,t]),v.useEffect(()=>{t&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,t]);const m=v.useMemo(()=>VM(n),[n]);return l&&n.length===0?g.jsxs("div",{className:"eval-trace",children:[g.jsx("span",{className:"spin"})," Loading session trace…"]}):s!==null&&n.length===0?g.jsx("div",{className:"eval-error",children:s}):m.turns.length===0?g.jsx("div",{className:"eval-trace",children:g.jsx("div",{className:"eval-trace-empty",children:t?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," Waiting for first events…"]}):"No events in this session."})}):g.jsxs("div",{className:"eval-trace",children:[g.jsxs("div",{className:"eval-trace-meta",children:[m.eventCount," events · ",m.totalTools," tool",m.totalTools===1?"":"s",m.failedTools>0?` · ${m.failedTools} failed`:"",t||d?g.jsxs(g.Fragment,{children:[" · ",g.jsxs("span",{className:"eval-live",children:[g.jsx("span",{className:"spin"})," live"]})]}):null]}),s!==null?g.jsx("div",{className:"eval-error",children:s}):null,m.turns.map((b,y)=>g.jsxs("div",{className:"eval-turn",children:[g.jsxs("div",{className:"eval-turn-head",children:["Turn ",y+1,b.failed?" · failed":"",b.wallMs!=null&&b.wallMs>0?` · ${gi(b.wallMs)}`:""]}),b.rows.map((k,S)=>g.jsx(_V,{row:k},`${b.turnId}-${S}-${k.kind}`))]},b.turnId)),g.jsx("div",{ref:h})]})}function AV({c:e}){const t=e.inputs??[],n=e.toolCalls??[];return t.length>0||e.finalText!==void 0||n.length>0||e.tools!==void 0&&e.tools.length>0?g.jsxs("div",{className:"eval-io",children:[g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Inputs"}),t.length===0?g.jsx("div",{className:"eval-trace-empty",children:"None yet"}):t.map((s,a)=>g.jsxs("div",{className:"eval-step-block",children:[g.jsxs("div",{className:"eval-step-block-label",children:["message ",t.length>1?a+1:""]}),g.jsx("pre",{children:s})]},`in-${a}`))]}),g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Tool calls"}),n.length===0?g.jsx("div",{className:"eval-trace-empty",children:e.tools&&e.tools.length>0?e.tools.join(", "):"None"}):n.map((s,a)=>g.jsxs("div",{className:`eval-step eval-step-tool${s.isError?" error":""}`,children:[g.jsxs("div",{className:"eval-step-head",style:{cursor:"default"},children:[g.jsxs("span",{className:`eval-step-kind kind-${s.isError?"error":"tool"}`,children:[g.jsx(Yt,{name:"wrench",size:"sm",color:s.isError?"red":"purple"}),g.jsx("span",{className:"eval-step-kind-label",children:"Tool call"})]}),g.jsx("span",{className:"eval-step-label",children:s.toolName})]}),g.jsxs("div",{className:"eval-step-detail",children:[s.args!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"args"}),g.jsx("pre",{children:mo(s.args)})]}):null,s.output!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:s.isError?"error":"result"}),g.jsx("pre",{children:typeof s.output=="string"?s.output:mo(s.output)})]}):null]})]},`tc-${a}-${s.toolName}`))]}),g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Output"}),e.finalText!==void 0&&e.finalText!==""?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"final reply"}),g.jsx("pre",{children:e.finalText})]}):g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for reply…":"No final reply"})]})]}):g.jsx("div",{className:"eval-io",children:g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for inputs / outputs…":"No captured inputs or outputs."})})}function OV({c:e,batchRunning:t,customization:n}){const[r,s]=v.useState(!1),[a,l]=v.useState(!1),c=r||a,d=KM(c),f=v.useRef({io:!1,expanded:!1});c&&(f.current={io:a,expanded:r});const h=c?a:f.current.io,m=c?r:f.current.expanded,b=SV(e),y=e.status==="pending"?"Queued":e.status==="running"?"Running":xV[b],k=e.status==="done"?kV[b]:e.status==="running"?"accent":"neutral",S=e.sessionId!==void 0||e.status==="done"||e.status==="running",E=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0,R=n?.CaseMetrics,T=n?.CaseExtras;return g.jsxs("div",{className:`eval-case${r||a?" expanded":""}`,children:[g.jsxs("div",{className:"eval-case-head",children:[g.jsxs("button",{type:"button",className:"eval-id-btn",disabled:!S,"aria-expanded":r,title:S?r?"Collapse":"Expand live trace":void 0,onClick:()=>s(C=>!C),children:[g.jsx("span",{className:r?"eval-chevron open":"eval-chevron",children:g.jsx(Yt,{name:"chevron-right",size:10})}),g.jsx(qi,{variant:k,size:"sm",children:y}),g.jsx("span",{className:"eval-id",children:e.id})]}),g.jsxs("div",{className:"eval-case-actions",children:[e.durationMs!==void 0?g.jsxs("span",{className:"eval-dur",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null,E?g.jsx(ln,{variant:a?"secondary":"ghost",size:"sm",onClick:()=>l(C=>!C),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?g.jsxs(g.Fragment,{children:[g.jsx(ln,{variant:"ghost",size:"sm",onClick:()=>{tt.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),g.jsx(ln,{variant:"ghost",size:"sm",onClick:()=>{tt.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]})]}),e.description!==void 0?g.jsx("div",{className:"eval-desc",children:e.description}):null,R!==void 0?g.jsx(R,{case:e,batchRunning:t}):g.jsx(mV,{case:e}),T!==void 0?g.jsx(T,{case:e,batchRunning:t}):null,e.error!==void 0?g.jsxs("div",{className:"eval-error",children:["error: ",e.error]}):null,e.skipReason!==void 0?g.jsxs("div",{className:"eval-desc",children:["skipped: ",e.skipReason]}):null,e.assertions!==void 0&&e.assertions.length>0?g.jsx("div",{className:"eval-assertions",children:e.assertions.map(C=>{const _=wV(C);return g.jsxs("div",{className:C.passed||C.severity==="soft"?"eval-assertion":"eval-assertion fail",children:[g.jsx("span",{className:"eval-assertion-icon",children:g.jsx(EV,{a:C})}),g.jsxs("span",{className:"eval-assertion-text",children:[g.jsx("span",{className:"eval-assertion-name",children:C.name}),_!==void 0?g.jsx("span",{className:"eval-assertion-detail",children:_}):null]})]},`${C.name}-${C.passed}-${C.detail??""}`)})}):null,e.logs!==void 0&&e.logs.length>0?g.jsx("div",{className:"eval-logs",children:e.logs.map((C,_)=>g.jsx("div",{className:"eval-log-line",children:C},`${_}:${C}`))}):null,d?g.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?g.jsx(AV,{c:e}):null,m&&e.sessionId!==void 0?g.jsx(NV,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,m&&e.sessionId===void 0?g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," ",tR(e)?"Aggregating sibling cases…":"Waiting for session…"]}):tR(e)?g.jsxs(g.Fragment,{children:["Suite summary (no agent session)",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]}):g.jsxs(g.Fragment,{children:["No session for this case",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]})}):null]}):null]})}function tR(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function YM(){const e=Ke(y=>y.evalRun),t=Ke(y=>y.evalCases),n=Ke(y=>y.evalConfig),r=Ke(y=>y.meta.name),s=Ke(y=>y.meta.readonly===!0),a=v.useMemo(()=>vV(r),[r]),l=e?.status==="running",c=!s&&t.length>0,d=a?.RunSummary;if(e===null)return g.jsx("div",{className:"pg-evals",children:g.jsxs("div",{className:"eval-empty",children:[g.jsx("p",{children:"No eval run selected."}),g.jsxs("p",{className:"eval-hint",children:[t.length>0?`${t.length} case${t.length===1?"":"s"} discovered.`:"No evals/ cases found for this agent.",n?.maxConcurrency!==void 0?` Concurrency: ${n.maxConcurrency}.`:""]}),c?g.jsx("p",{className:"eval-hint",children:n?.durableRuns===!0?`Runs persist via the agent/storage.ts evals table (keeps last ${n.maxPlaygroundRuns??20}).`:`Runs stay in memory only (last ${n?.maxPlaygroundRuns??20}); lost when serve exits. Add an evals table to agent/storage.ts to keep them.`}):null,c?g.jsx(ln,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{tt.startEvalRun()},children:"Run all"}):null]})});const{summary:f,status:h}=e,m=h==="failed"||h==="cancelled"?"danger":l?"accent":"success",b=h==="failed"?"Failed":h==="cancelled"?"Cancelled":l?"Running":"Completed";return g.jsxs("div",{className:"pg-evals",children:[g.jsxs("div",{className:"eval-summary",children:[g.jsx(qi,{variant:m,size:"sm",children:b}),g.jsx("span",{className:"eval-run-id",title:"Eval ID",children:e.runId}),g.jsxs("span",{className:"eval-summary-stats",children:[g.jsxs("span",{className:"eval-summary-muted",children:[f.done,"/",f.total," done · ",f.passed," passed"]})," · ",f.failed," failed",f.scored!==void 0&&f.scored>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",f.scored," scored"]}):null,f.skipped!==void 0&&f.skipped>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",f.skipped," skipped"]}):null]}),d!==void 0?g.jsx(d,{run:e}):null,l?g.jsx("span",{className:"spin"}):null,e.error!==void 0?g.jsx("span",{className:"eval-error",children:e.error}):null,g.jsxs("div",{className:"eval-actions",children:[g.jsx(ln,{variant:"ghost",size:"sm",onClick:()=>{const y=dV(e);pV(y.filename,y.text)},title:"Download this eval run's results (assertions, metrics, I/O) as JSON",children:"Download run"}),l?g.jsx(ln,{variant:"secondary",size:"sm",onClick:()=>{tt.cancelEvalRun(e.runId)},children:"Cancel"}):null,c?g.jsx(ln,{variant:"secondary",size:"sm",disabled:l,onClick:()=>{tt.startEvalRun()},children:"Run all"}):null]})]}),g.jsx("div",{className:"eval-case-list",children:e.cases.map(y=>g.jsx(OV,{c:y,batchRunning:l,customization:a},y.id))})]})}const nR=typeof document<"u"?v.useLayoutEffect:v.useEffect;function MV({useFlushSync:e=!0,...t}){const n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?Ri.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=v.useState(()=>new yB(r));return s.setOptions(r),nR(()=>s._didMount(),[]),nR(()=>s._willUpdate()),s}function XM(e){return MV({observeElementRect:hB,observeElementOffset:mB,scrollToFn:bB,...e})}const ZM=48;function IV(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function DV(e,t=ZM){return IV(e)<=t}function Kb(e){e.scrollTop=e.scrollHeight}function QM(e){const{contentKey:t,latchKey:n,thresholdPx:r=ZM}=e,s=v.useRef(null),a=v.useRef(!0);return v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=DV(l,r)};return l.addEventListener("scroll",c,{passive:!0}),()=>l.removeEventListener("scroll",c)},[r,t,n]),v.useLayoutEffect(()=>{if(n===void 0)return;a.current=!0;const l=s.current;l&&Kb(l)},[n]),v.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&Kb(l)},[t]),v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&Kb(l)};c();const d=new Set,f=new ResizeObserver(c),h=y=>{d.has(y)||(d.add(y),f.observe(y))},m=y=>{h(y);for(const k of y.children)m(k)};m(l);const b=new MutationObserver(y=>{for(const k of y)k.addedNodes.forEach(S=>{S instanceof Element&&m(S)});c()});return b.observe(l,{childList:!0,subtree:!0}),()=>{f.disconnect(),b.disconnect()}},[t,n]),{scrollRef:s}}function JM(){const e=Ke(a=>a.traceEvents),t=Ke(a=>a.current),n=e.length,{scrollRef:r}=QM({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=XM({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?g.jsx("div",{className:"pg-raw",children:g.jsx(ws,{body:"Select a session to see the raw event stream."})}):g.jsxs("div",{className:"pg-raw",children:[g.jsx("div",{className:"head",children:"Raw NDJSON stream"}),g.jsx("div",{className:"raw-lines",ref:r,children:g.jsx("div",{style:{height:s.getTotalSize(),position:"relative",width:"100%"},children:s.getVirtualItems().map(a=>{const l=e[a.index];return g.jsxs("div",{"data-index":a.index,ref:s.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${a.start}px)`},children:[g.jsx("span",{children:`[${l.index??a.index}] `}),g.jsx("span",{className:"etype",children:l.type}),g.jsx("span",{children:` ${Hn(l.data,240)}`})]},a.key)})})})]})}const jV={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},LV={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},zV={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function PV(e,t){return t?"red":zV[e]}function eI({kind:e,error:t,showLabel:n=!0}){const r=PV(e,t),s=`${LV[e]}${t?" · error":""}`;return g.jsxs("span",{className:`wf-kind kind-${t?"error":e}`,title:n?void 0:s,"aria-label":n?void 0:s,children:[g.jsx(Yt,{name:jV[e],size:"sm",color:r}),n?g.jsx("span",{className:"wf-kind-label",children:s}):null]})}function $V(e){if(e.startedAt!=null)return e.startedAt;let t=Number.POSITIVE_INFINITY;for(const n of e.rows){const r=n.startAt??n.at;r!=null&&r<t&&(t=r)}return Number.isFinite(t)?t:0}function BV(e,t){if(e.wallMs!=null&&e.wallMs>0)return e.wallMs;if(e.endedAt!=null&&e.endedAt>t)return e.endedAt-t;let n=0;for(const r of e.rows){const a=(r.startAt??r.at??t)+(r.ms!=null&&r.ms>0?r.ms:0);a-t>n&&(n=a-t)}return Math.max(n,1)}function FV(e,t,n,r,s){const a=e.startAt??e.at??r,l=Math.max(0,a-r),c=e.ms!=null&&e.ms>0?e.ms:e.ms===0?0:null,d=c===null||c===0,f=s*.012,h=d?f:Math.max(c,f),m=Math.max(0,Math.min(100,l/s*100)),b=Math.max(.9,Math.min(100-m,h/s*100));return{id:`${n}-${t}`,row:e,turnId:n,wallMs:s,startMs:l,durMs:h,trueDurMs:c,leftPct:m,widthPct:b,instant:d}}function tI(e){return e===null?"—":e===0?"instant":gi(e)}function ms({label:e,value:t}){return g.jsxs("div",{children:[g.jsx("dt",{children:e}),g.jsx("dd",{title:t,children:t})]})}function UV({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,d=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",f=n.body?.trim()||"",h=n.toolArgs!=null?mo(n.toolArgs):"",m=n.toolOutput!=null?mo(n.toolOutput):n.kind==="tool"&&f?f:"";return g.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[g.jsxs("div",{className:"trace-detail-head",children:[g.jsx(eI,{kind:n.kind,error:n.error}),g.jsx(dr,{icon:"x",size:"sm",variant:"ghost","aria-label":"Close",onClick:t})]}),n.toolName?g.jsx("div",{className:"trace-detail-title",children:n.toolName}):null,n.url?g.jsx(aa,{className:"artifact-link",href:n.url,children:n.url}):null,n.kind!=="tool"&&f?g.jsx("pre",{className:"trace-detail-body",children:f}):null,n.kind!=="tool"&&!f&&n.label?g.jsx("div",{className:"trace-detail-label",children:n.label}):null,g.jsxs("dl",{className:"trace-detail-meta",children:[g.jsx(ms,{label:"Turn",value:r}),n.error?g.jsx(ms,{label:"Status",value:"error"}):null,g.jsx(ms,{label:"Start +",value:gi(s)}),g.jsx(ms,{label:"End +",value:gi(c)}),g.jsx(ms,{label:"Duration",value:tI(a)}),g.jsx(ms,{label:"% of turn",value:d}),g.jsx(ms,{label:"Started",value:KT(n.startAt)}),g.jsx(ms,{label:"Ended",value:KT(n.at)}),n.callId?g.jsx(ms,{label:"Call id",value:n.callId}):null]}),h?g.jsxs("div",{className:"trace-detail-section",children:[g.jsx("div",{className:"trace-detail-section-title",children:"Args"}),g.jsx("pre",{className:"trace-detail-body",children:h})]}):null,m?g.jsxs("div",{className:"trace-detail-section",children:[g.jsx("div",{className:"trace-detail-section-title",children:n.error?"Error":"Output"}),g.jsx("pre",{className:"trace-detail-body",children:m})]}):null]})}function qV({span:e,selected:t,detailOpen:n,onSelect:r}){const{row:s}=e,a=`${s.kind}${s.error?" error":""}`,l=tI(e.trueDurMs),c=e.widthPct>=8,d=s.depth??0;return g.jsxs("button",{type:"button",className:`wf-row ${a}${t?" selected":""}${d>0?" nested":""}`,onClick:r,"aria-pressed":t,style:d>0?{paddingLeft:`${8+d*14}px`}:void 0,children:[g.jsx(eI,{kind:s.kind,error:s.error,showLabel:!n}),g.jsx("span",{className:"wf-name",title:s.label,children:d>0?`↳ ${s.label||"—"}`:s.label||"—"}),g.jsx("span",{className:"wf-track","aria-hidden":"true",children:g.jsx("span",{className:`wf-bar ${a}${e.instant?" instant":""}`,style:{left:`${e.leftPct}%`,width:`${e.widthPct}%`},children:c?g.jsx("span",{className:"wf-bar-label",children:l}):null})}),g.jsx("span",{className:"wf-dur",children:l})]})}function HV({turn:e,index:t,selectedId:n,onSelect:r}){const s=$V(e),a=BV(e,s),l=v.useMemo(()=>e.rows.map((h,m)=>FV(h,m,e.turnId,s,a)),[e,s,a]),c=v.useMemo(()=>hV(a),[a]),d=[];e.wallMs!==void 0&&d.push(`Worked for ${Jx(e.wallMs)}`),e.usage&&d.push(`in ${Kp(e.usage.inputTokens)} · out ${Kp(e.usage.outputTokens)}`);const f=e.cost?.totalUsd;return typeof f=="number"&&Number.isFinite(f)&&d.push(Uh(f)),g.jsxs("div",{className:e.failed?"trace-turn trace-turn--failed":"trace-turn",children:[g.jsxs("div",{className:"thead",children:[g.jsxs("span",{className:"thead-title",children:["Turn ",t+1,g.jsx("code",{className:"thead-id",children:e.turnId}),e.failed?g.jsxs("span",{className:"thead-failed",children:[g.jsx(Yt,{name:"x-circle",size:"sm",variant:"filled",color:"red","aria-hidden":"true"}),"Failed"]}):null]}),g.jsx("span",{className:"wall",children:d.join(" · ")||"In progress"})]}),g.jsxs("div",{className:"wf",children:[g.jsxs("div",{className:"wf-ruler","aria-hidden":"true",children:[g.jsx("span",{className:"wf-kind"}),g.jsx("span",{className:"wf-name"}),g.jsx("span",{className:"wf-track wf-ruler-track",children:c.map(h=>g.jsxs("span",{className:"wf-tick",style:{left:`${h/a*100}%`},children:[g.jsx("span",{className:"wf-tick-line"}),g.jsx("span",{className:"wf-tick-label",children:gi(h)})]},h))}),g.jsx("span",{className:"wf-dur"})]}),l.length===0?g.jsx("div",{className:"trace-empty-turn",children:"No timed spans in this turn."}):l.map(h=>g.jsx(qV,{span:h,selected:n===h.id,detailOpen:n!=null,onSelect:()=>r(n===h.id?null:h)},h.id))]})]})}function nI(){const e=Ke(c=>c.traceEvents),t=Ke(c=>c.sessionCostUsd),n=v.useMemo(()=>VM(e),[e]),[r,s]=v.useState(null);if(!e.length)return g.jsx("div",{className:"pg-trace",children:g.jsx(ws,{body:"Select a session to see the timeline."})});const a=t??n.totalCostUsd,l=[`${n.eventCount} events`,`${n.turns.length} turn${n.turns.length===1?"":"s"}`,`${n.totalTools} tool call${n.totalTools===1?"":"s"}`,n.failedTools?`${n.failedTools} error${n.failedTools===1?"":"s"}`:null,a!==null?`cost ${Uh(a)}`:null].filter(Boolean).join(" · ");return g.jsx("div",{className:"pg-trace",children:g.jsxs("div",{className:"trace-rows",children:[g.jsx("div",{className:"trace-summary",children:l}),g.jsxs("div",{className:`trace-layout${r?" has-detail":""}`,children:[g.jsx("div",{className:"trace-main",children:n.turns.map((c,d)=>g.jsx(HV,{turn:c,index:d,selectedId:r?.id??null,onSelect:s},`${c.turnId||"turn"}-${d}`))}),r?g.jsx(UV,{span:r,onClose:()=>s(null)}):null]})]})})}function GV(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const VV=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WV=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KV={};function rR(e,t){return(KV.jsx?WV:VV).test(e)}const YV=/[ \t\n\f\r]/g;function XV(e){return typeof e=="object"?e.type==="text"?iR(e.value):!1:iR(e)}function iR(e){return e.replace(YV,"")===""}class rf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}rf.prototype.normal={};rf.prototype.property={};rf.prototype.space=void 0;function rI(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new rf(n,r,t)}function lv(e){return e.toLowerCase()}class jr{constructor(t,n){this.attribute=n,this.property=t}}jr.prototype.attribute="";jr.prototype.booleanish=!1;jr.prototype.boolean=!1;jr.prototype.commaOrSpaceSeparated=!1;jr.prototype.commaSeparated=!1;jr.prototype.defined=!1;jr.prototype.mustUseProperty=!1;jr.prototype.number=!1;jr.prototype.overloadedBoolean=!1;jr.prototype.property="";jr.prototype.spaceSeparated=!1;jr.prototype.space=void 0;let ZV=0;const Mt=ha(),qn=ha(),uv=ha(),Fe=ha(),xn=ha(),gl=ha(),Wr=ha();function ha(){return 2**++ZV}const cv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:qn,commaOrSpaceSeparated:Wr,commaSeparated:gl,number:Fe,overloadedBoolean:uv,spaceSeparated:xn},Symbol.toStringTag,{value:"Module"})),Yb=Object.keys(cv);class nk extends jr{constructor(t,n,r,s){let a=-1;if(super(t,n),sR(this,"space",s),typeof r=="number")for(;++a<Yb.length;){const l=Yb[a];sR(this,Yb[a],(r&cv[l])===cv[l])}}}nk.prototype.defined=!0;function sR(e,t,n){n&&(e[t]=n)}function $l(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new nk(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[lv(r)]=r,n[lv(a.attribute)]=r}return new rf(t,n,e.space)}const iI=$l({properties:{ariaActiveDescendant:null,ariaAtomic:qn,ariaAutoComplete:null,ariaBusy:qn,ariaChecked:qn,ariaColCount:Fe,ariaColIndex:Fe,ariaColSpan:Fe,ariaControls:xn,ariaCurrent:null,ariaDescribedBy:xn,ariaDetails:null,ariaDisabled:qn,ariaDropEffect:xn,ariaErrorMessage:null,ariaExpanded:qn,ariaFlowTo:xn,ariaGrabbed:qn,ariaHasPopup:null,ariaHidden:qn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xn,ariaLevel:Fe,ariaLive:null,ariaModal:qn,ariaMultiLine:qn,ariaMultiSelectable:qn,ariaOrientation:null,ariaOwns:xn,ariaPlaceholder:null,ariaPosInSet:Fe,ariaPressed:qn,ariaReadOnly:qn,ariaRelevant:null,ariaRequired:qn,ariaRoleDescription:xn,ariaRowCount:Fe,ariaRowIndex:Fe,ariaRowSpan:Fe,ariaSelected:qn,ariaSetSize:Fe,ariaSort:null,ariaValueMax:Fe,ariaValueMin:Fe,ariaValueNow:Fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function sI(e,t){return t in e?e[t]:t}function oI(e,t){return sI(e,t.toLowerCase())}const QV=$l({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gl,acceptCharset:xn,accessKey:xn,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:xn,autoFocus:Mt,autoPlay:Mt,blocking:xn,capture:null,charSet:null,checked:Mt,cite:null,className:xn,cols:Fe,colSpan:null,content:null,contentEditable:qn,controls:Mt,controlsList:xn,coords:Fe|gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:uv,draggable:qn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:xn,height:Fe,hidden:uv,high:Fe,href:null,hrefLang:null,htmlFor:xn,httpEquiv:xn,id:null,imageSizes:null,imageSrcSet:null,inert:Mt,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:xn,itemRef:xn,itemScope:Mt,itemType:xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:Fe,manifest:null,max:null,maxLength:Fe,media:null,method:null,min:null,minLength:Fe,multiple:Mt,muted:Mt,name:null,nonce:null,noModule:Mt,noValidate:Mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Mt,optimum:Fe,pattern:null,ping:xn,placeholder:null,playsInline:Mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:xn,required:Mt,reversed:Mt,rows:Fe,rowSpan:Fe,sandbox:xn,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shadowRootClonable:Mt,shadowRootDelegatesFocus:Mt,shadowRootMode:null,shape:null,size:Fe,sizes:null,slot:null,span:Fe,spellCheck:qn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Fe,step:null,style:null,tabIndex:Fe,target:null,title:null,translate:null,type:null,typeMustMatch:Mt,useMap:null,value:qn,width:Fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xn,axis:null,background:null,bgColor:null,border:Fe,borderColor:null,bottomMargin:Fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Mt,declare:Mt,event:null,face:null,frame:null,frameBorder:null,hSpace:Fe,leftMargin:Fe,link:null,longDesc:null,lowSrc:null,marginHeight:Fe,marginWidth:Fe,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Fe,rules:null,scheme:null,scrolling:qn,standby:null,summary:null,text:null,topMargin:Fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:Fe,security:null,unselectable:null},space:"html",transform:oI}),JV=$l({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Wr,accentHeight:Fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Fe,amplitude:Fe,arabicForm:null,ascent:Fe,attributeName:null,attributeType:null,azimuth:Fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Fe,by:null,calcMode:null,capHeight:Fe,className:xn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Fe,diffuseConstant:Fe,direction:null,display:null,dur:null,divisor:Fe,dominantBaseline:null,download:Mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Fe,enableBackground:null,end:null,event:null,exponent:Fe,externalResourcesRequired:null,fill:null,fillOpacity:Fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gl,g2:gl,glyphName:gl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Fe,horizOriginX:Fe,horizOriginY:Fe,id:null,ideographic:Fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Fe,k:Fe,k1:Fe,k2:Fe,k3:Fe,k4:Fe,kernelMatrix:Wr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Fe,overlineThickness:Fe,paintOrder:null,panose1:null,path:null,pathLength:Fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Fe,pointsAtY:Fe,pointsAtZ:Fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wr,rev:Wr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wr,requiredFeatures:Wr,requiredFonts:Wr,requiredFormats:Wr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Fe,specularExponent:Fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Fe,strikethroughThickness:Fe,string:null,stroke:null,strokeDashArray:Wr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Fe,strokeOpacity:Fe,strokeWidth:null,style:null,surfaceScale:Fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wr,tabIndex:Fe,tableValues:null,target:null,targetX:Fe,targetY:Fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Fe,underlineThickness:Fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Fe,values:null,vAlphabetic:Fe,vMathematical:Fe,vectorEffect:null,vHanging:Fe,vIdeographic:Fe,version:null,vertAdvY:Fe,vertOriginX:Fe,vertOriginY:Fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sI}),aI=$l({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),lI=$l({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:oI}),uI=$l({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),eW={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},tW=/[A-Z]/g,oR=/-[a-z]/g,nW=/^data[-\w.:]+$/i;function rW(e,t){const n=lv(t);let r=t,s=jr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&nW.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(oR,sW);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!oR.test(a)){let l=a.replace(tW,iW);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=nk}return new s(r,t)}function iW(e){return"-"+e.toLowerCase()}function sW(e){return e.charAt(1).toUpperCase()}const oW=rI([iI,QV,aI,lI,uI],"html"),rk=rI([iI,JV,aI,lI,uI],"svg");function aW(e){return e.join(" ").trim()}var tl={},Xb,aR;function lW(){if(aR)return Xb;aR=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
23
|
+
`,f="/",h="*",m="",b="comment",y="declaration";Xb=function(S,E){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];E=E||{};var R=1,T=1;function C(q){var D=q.match(t);D&&(R+=D.length);var F=q.lastIndexOf(d);T=~F?q.length-F:T+q.length}function _(){var q={line:R,column:T};return function(D){return D.position=new L(q),$(),D}}function L(q){this.start=q,this.end={line:R,column:T},this.source=E.source}L.prototype.content=S;function N(q){var D=new Error(E.source+":"+R+":"+T+": "+q);if(D.reason=q,D.filename=E.source,D.line=R,D.column=T,D.source=S,!E.silent)throw D}function A(q){var D=q.exec(S);if(D){var F=D[0];return C(F),S=S.slice(F.length),D}}function $(){A(n)}function z(q){var D;for(q=q||[];D=I();)D!==!1&&q.push(D);return q}function I(){var q=_();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var D=2;m!=S.charAt(D)&&(h!=S.charAt(D)||f!=S.charAt(D+1));)++D;if(D+=2,m===S.charAt(D-1))return N("End of comment missing");var F=S.slice(2,D-2);return T+=2,C(F),S=S.slice(D),T+=2,q({type:b,comment:F})}}function Y(){var q=_(),D=A(r);if(D){if(I(),!A(s))return N("property missing ':'");var F=A(a),U=q({type:y,property:k(D[0].replace(e,m)),value:F?k(F[0].replace(e,m)):m});return A(l),U}}function H(){var q=[];z(q);for(var D;D=Y();)D!==!1&&(q.push(D),z(q));return q}return $(),H()};function k(S){return S?S.replace(c,m):m}return Xb}var lR;function uW(){if(lR)return tl;lR=1;var e=tl&&tl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tl,"__esModule",{value:!0}),tl.default=n;var t=e(lW());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var l=(0,t.default)(r),c=typeof s=="function";return l.forEach(function(d){if(d.type==="declaration"){var f=d.property,h=d.value;c?s(f,h,d):h&&(a=a||{},a[f]=h)}}),a}return tl}var cW=uW();const uR=Bc(cW),fW=uR.default||uR,dW=Object.freeze(Object.defineProperty({__proto__:null,default:fW},Symbol.toStringTag,{value:"Module"})),pW=lz(dW);var Vu={},cR;function hW(){if(cR)return Vu;cR=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,h){return h.toUpperCase()},c=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(s,c):f=f.replace(r,c),f.replace(t,l))};return Vu.camelCase=d,Vu}var Wu,fR;function mW(){if(fR)return Wu;fR=1;var e=Wu&&Wu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(pW),n=hW();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(l[(0,n.camelCase)(c,a)]=d)}),l}return r.default=r,Wu=r,Wu}var gW=mW();const bW=Bc(gW),cI=fI("end"),ik=fI("start");function fI(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function yW(e){const t=ik(e),n=cI(e);if(t&&n)return{start:t,end:n}}function hc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?dR(e.position):"start"in e||"end"in e?dR(e):"line"in e||"column"in e?fv(e):""}function fv(e){return pR(e&&e.line)+":"+pR(e&&e.column)}function dR(e){return fv(e&&e.start)+"-"+fv(e&&e.end)}function pR(e){return e&&typeof e=="number"?e:1}class pr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(l=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=hc(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}pr.prototype.file="";pr.prototype.name="";pr.prototype.reason="";pr.prototype.message="";pr.prototype.stack="";pr.prototype.column=void 0;pr.prototype.line=void 0;pr.prototype.ancestors=void 0;pr.prototype.cause=void 0;pr.prototype.fatal=void 0;pr.prototype.place=void 0;pr.prototype.ruleId=void 0;pr.prototype.source=void 0;const sk={}.hasOwnProperty,vW=new Map,xW=/[A-Z]/g,kW=new Set(["table","tbody","thead","tfoot","tr"]),SW=new Set(["td","th"]),dI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wW(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=OW(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=AW(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?rk:oW,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=pI(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function pI(e,t,n){if(t.type==="element")return EW(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return TW(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return CW(e,t,n);if(t.type==="mdxjsEsm")return RW(e,t);if(t.type==="root")return _W(e,t,n);if(t.type==="text")return NW(e,t)}function EW(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=rk,e.schema=s),e.ancestors.push(t);const a=mI(e,t.tagName,!1),l=MW(e,t);let c=ak(e,t);return kW.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!XV(d):!0})),hI(e,l,a,t),ok(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function TW(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}zc(e,t.position)}function RW(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);zc(e,t.position)}function CW(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=rk,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:mI(e,t.name,!0),l=IW(e,t),c=ak(e,t);return hI(e,l,a,t),ok(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function _W(e,t,n){const r={};return ok(r,ak(e,t)),e.create(t,e.Fragment,r,n)}function NW(e,t){return t.value}function hI(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ok(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function AW(e,t,n){return r;function r(s,a,l,c){const f=Array.isArray(l.children)?n:t;return c?f(a,l,c):f(a,l)}}function OW(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),d=ik(r);return t(s,a,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function MW(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&sk.call(t.properties,s)){const a=DW(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&SW.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function IW(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else zc(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else zc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function ak(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:vW;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=s.get(d)||0;l=d+"-"+f,s.set(d,f+1)}}const c=pI(e,a,l);c!==void 0&&n.push(c)}return n}function DW(e,t,n){const r=rW(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?GV(n):aW(n)),r.property==="style"){let s=typeof n=="object"?n:jW(e,String(n));return e.stylePropertyNameCase==="css"&&(s=LW(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?eW[r.property]||r.property:r.attribute,n]}}function jW(e,t){try{return bW(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new pr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=dI+"#cannot-parse-style-attribute",s}}function mI(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,l;for(;++a<s.length;){const c=rR(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=rR(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return sk.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);zc(e)}function zc(e,t){const n=new pr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=dI+"#cannot-handle-mdx-estrees-without-createevaluater",n}function LW(e){const t={};let n;for(n in e)sk.call(e,n)&&(t[zW(n)]=e[n]);return t}function zW(e){let t=e.replace(xW,PW);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function PW(e){return"-"+e.toLowerCase()}const Zb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},$W={};function lk(e,t){const n=$W,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gI(e,r,s)}function gI(e,t,n){if(BW(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return hR(e.children,t,n)}return Array.isArray(e)?hR(e,t,n):""}function hR(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=gI(e[s],t,n);return r.join("")}function BW(e){return!!(e&&typeof e=="object")}const mR=document.createElement("i");function uk(e){const t="&"+e+";";mR.innerHTML=t;const n=mR.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Zr(e,t,n,r){const s=e.length;let a=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function li(e,t){return e.length>0?(Zr(e,e.length,0,t),e):t}const gR={}.hasOwnProperty;function bI(e){const t={};let n=-1;for(;++n<e.length;)FW(t,e[n]);return t}function FW(e,t){let n;for(n in t){const s=(gR.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){gR.call(s,l)||(s[l]=[]);const c=a[l];UW(s[l],Array.isArray(c)?c:c?[c]:[])}}}function UW(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Zr(e,0,0,r)}function yI(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function wi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vr=wo(/[A-Za-z]/),ur=wo(/[\dA-Za-z]/),qW=wo(/[#-'*+\--9=?A-Z^-~]/);function Xp(e){return e!==null&&(e<32||e===127)}const dv=wo(/\d/),HW=wo(/[\dA-Fa-f]/),GW=wo(/[!-/:-@[-`{-~]/);function mt(e){return e!==null&&e<-2}function bn(e){return e!==null&&(e<0||e===32)}function Ut(e){return e===-2||e===-1||e===32}const Vh=wo(new RegExp("\\p{P}|\\p{S}","u")),la=wo(/\s/);function wo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&ur(e.charCodeAt(n+1))&&ur(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),s=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function Zt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ut(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ut(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const VW={tokenize:WW};function WW(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Zt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return mt(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const KW={tokenize:YW},bR={tokenize:XW};function YW(e){const t=this,n=[];let r=0,s,a,l;return c;function c(C){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&T();const _=t.events.length;let L=_,N;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){N=t.events[L][1].end;break}R(r);let A=_;for(;A<t.events.length;)t.events[A][1].end={...N},A++;return Zr(t.events,L+1,0,t.events.slice(_)),t.events.length=A,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return k(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(bR,h,m)(C)}function h(C){return s&&T(),R(r),b(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,k(C)}function b(C){return t.containerState={},e.attempt(bR,y,k)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function k(C){if(C===null){s&&T(),R(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(C)}function S(C){if(C===null){E(e.exit("chunkFlow"),!0),R(0),e.consume(C);return}return mt(C)?(e.consume(C),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),S)}function E(C,_){const L=t.sliceStream(C);if(_&&L.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(L),t.parser.lazy[C.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<l&&(!s.events[N][1].end||s.events[N][1].end.offset>l))return;const A=t.events.length;let $=A,z,I;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(z){I=t.events[$][1].end;break}z=!0}for(R(r),N=A;N<t.events.length;)t.events[N][1].end={...I},N++;Zr(t.events,$+1,0,t.events.slice(A)),t.events.length=N}}function R(C){let _=n.length;for(;_-- >C;){const L=n[_];t.containerState=L[1],L[0].exit.call(t,e)}n.length=C}function T(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function XW(e,t,n){return Zt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Nl(e){if(e===null||bn(e)||la(e))return 1;if(Vh(e))return 2}function Wh(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const pv={name:"attention",resolveAll:ZW,tokenize:QW};function ZW(e,t){let n=-1,r,s,a,l,c,d,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},b={...e[n][1].start};yR(m,-d),yR(b,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=li(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=li(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),f=li(f,Wh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=li(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=li(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Zr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function QW(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Nl(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),h=Nl(d),m=!h||h===2&&s||n.includes(d),b=!s||s===2&&h||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(h||!m)),t(d)}}function yR(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const JW={name:"autolink",tokenize:eK};function eK(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return vr(y)?(e.consume(y),l):y===64?n(y):f(y)}function l(y){return y===43||y===45||y===46||ur(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||ur(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Xp(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),h):qW(y)?(e.consume(y),f):n(y)}function h(y){return ur(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||ur(y))&&r++<63){const k=y===45?b:m;return e.consume(y),k}return n(y)}}const sf={partial:!0,tokenize:tK};function tK(e,t,n){return r;function r(a){return Ut(a)?Zt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||mt(a)?t(a):n(a)}}const vI={continuation:{tokenize:rK},exit:iK,name:"blockQuote",tokenize:nK};function nK(e,t,n){const r=this;return s;function s(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ut(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function rK(e,t,n){const r=this;return s;function s(l){return Ut(l)?Zt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(vI,t,n)(l)}}function iK(e){e.exit("blockQuote")}const xI={name:"characterEscape",tokenize:sK};function sK(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return GW(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const kI={name:"characterReference",tokenize:oK};function oK(e,t,n){const r=this;let s=0,a,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=ur,h(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=HW,h):(e.enter("characterReferenceValue"),a=7,l=dv,h(m))}function h(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return l===ur&&!uk(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&s++<a?(e.consume(m),h):n(m)}}const vR={partial:!0,tokenize:lK},xR={concrete:!0,name:"codeFenced",tokenize:aK};function aK(e,t,n){const r=this,s={partial:!0,tokenize:L};let a=0,l=0,c;return d;function d(N){return f(N)}function f(N){const A=r.events[r.events.length-1];return a=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,c=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(N)}function h(N){return N===c?(l++,e.consume(N),h):l<3?n(N):(e.exit("codeFencedFenceSequence"),Ut(N)?Zt(e,m,"whitespace")(N):m(N))}function m(N){return N===null||mt(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(vR,S,_)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(N))}function b(N){return N===null||mt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(N)):Ut(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Zt(e,y,"whitespace")(N)):N===96&&N===c?n(N):(e.consume(N),b)}function y(N){return N===null||mt(N)?m(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(N))}function k(N){return N===null||mt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(N)):N===96&&N===c?n(N):(e.consume(N),k)}function S(N){return e.attempt(s,_,E)(N)}function E(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),R}function R(N){return a>0&&Ut(N)?Zt(e,T,"linePrefix",a+1)(N):T(N)}function T(N){return N===null||mt(N)?e.check(vR,S,_)(N):(e.enter("codeFlowValue"),C(N))}function C(N){return N===null||mt(N)?(e.exit("codeFlowValue"),T(N)):(e.consume(N),C)}function _(N){return e.exit("codeFenced"),t(N)}function L(N,A,$){let z=0;return I;function I(F){return N.enter("lineEnding"),N.consume(F),N.exit("lineEnding"),Y}function Y(F){return N.enter("codeFencedFence"),Ut(F)?Zt(N,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):H(F)}function H(F){return F===c?(N.enter("codeFencedFenceSequence"),q(F)):$(F)}function q(F){return F===c?(z++,N.consume(F),q):z>=l?(N.exit("codeFencedFenceSequence"),Ut(F)?Zt(N,D,"whitespace")(F):D(F)):$(F)}function D(F){return F===null||mt(F)?(N.exit("codeFencedFence"),A(F)):$(F)}}}function lK(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Qb={name:"codeIndented",tokenize:cK},uK={partial:!0,tokenize:fK};function cK(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),Zt(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):mt(f)?e.attempt(uK,l,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||mt(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function fK(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):mt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):Zt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):mt(l)?s(l):n(l)}}const dK={name:"codeText",previous:hK,resolve:pK,tokenize:mK};function pK(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function hK(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mK(e,t,n){let r=0,s,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):mt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||mt(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class gK{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Ku(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ku(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ku(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ku(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ku(this.left,n.reverse())}}}function Ku(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function SI(e){const t={};let n=-1,r,s,a,l,c,d,f;const h=new gK(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,bK(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(h.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...h.get(s)[1].start},c=h.slice(s,n),c.unshift(r),h.splice(s,n-s+1,c))}}return Zr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function bK(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],f={};let h,m,b=-1,y=n,k=0,S=0;const E=[S];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,E.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):E.pop(),b=E.length;b--;){const R=c.slice(E[b],E[b+1]),T=a.pop();d.push([T,T+R.length-1]),e.splice(T,2,R)}for(d.reverse(),b=-1;++b<d.length;)f[k+d[b][0]]=k+d[b][1],k+=d[b][1]-d[b][0]-1;return f}const yK={resolve:xK,tokenize:kK},vK={partial:!0,tokenize:SK};function xK(e){return SI(e),e}function kK(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):mt(c)?e.check(vK,l,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function SK(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Zt(e,a,"linePrefix")}function a(l){if(l===null||mt(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function wI(e,t,n,r,s,a,l,c,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return m;function m(R){return R===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(R),e.exit(a),b):R===null||R===32||R===41||Xp(R)?n(R):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(R))}function b(R){return R===62?(e.enter(a),e.consume(R),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(R))}function y(R){return R===62?(e.exit("chunkString"),e.exit(c),b(R)):R===null||R===60||mt(R)?n(R):(e.consume(R),R===92?k:y)}function k(R){return R===60||R===62||R===92?(e.consume(R),y):y(R)}function S(R){return!h&&(R===null||R===41||bn(R))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(R)):h<f&&R===40?(e.consume(R),h++,S):R===41?(e.consume(R),h--,S):R===null||R===32||R===40||Xp(R)?n(R):(e.consume(R),R===92?E:S)}function E(R){return R===40||R===41||R===92?(e.consume(R),S):S(R)}}function EI(e,t,n,r,s,a){const l=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),h}function h(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):mt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||mt(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),d||(d=!Ut(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function TI(e,t,n,r,s,a){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),l=b===40?41:b,d):n(b)}function d(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===l?(e.exit(a),d(l)):b===null?n(b):mt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Zt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===l||b===null||mt(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:h)}function m(b){return b===l||b===92?(e.consume(b),h):h(b)}}function mc(e,t){let n;return r;function r(s){return mt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ut(s)?Zt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const wK={name:"definition",tokenize:TK},EK={partial:!0,tokenize:RK};function TK(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return EI.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=wi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return bn(y)?mc(e,f)(y):f(y)}function f(y){return wI(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(EK,m,m)(y)}function m(y){return Ut(y)?Zt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||mt(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function RK(e,t,n){return r;function r(c){return bn(c)?mc(e,s)(c):n(c)}function s(c){return TI(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ut(c)?Zt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||mt(c)?t(c):n(c)}}const CK={name:"hardBreakEscape",tokenize:_K};function _K(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return mt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const NK={name:"headingAtx",resolve:AK,tokenize:OK};function AK(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Zr(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function OK(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||bn(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||mt(h)?(e.exit("atxHeading"),t(h)):Ut(h)?Zt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),c(h))}function f(h){return h===null||h===35||bn(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),f)}}const MK=["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"],kR=["pre","script","style","textarea"],IK={concrete:!0,name:"htmlFlow",resolveTo:LK,tokenize:zK},DK={partial:!0,tokenize:$K},jK={partial:!0,tokenize:PK};function LK(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zK(e,t,n){const r=this;let s,a,l,c,d;return f;function f(j){return h(j)}function h(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),m}function m(j){return j===33?(e.consume(j),b):j===47?(e.consume(j),a=!0,S):j===63?(e.consume(j),s=3,r.interrupt?t:O):vr(j)?(e.consume(j),l=String.fromCharCode(j),E):n(j)}function b(j){return j===45?(e.consume(j),s=2,y):j===91?(e.consume(j),s=5,c=0,k):vr(j)?(e.consume(j),s=4,r.interrupt?t:O):n(j)}function y(j){return j===45?(e.consume(j),r.interrupt?t:O):n(j)}function k(j){const Z="CDATA[";return j===Z.charCodeAt(c++)?(e.consume(j),c===Z.length?r.interrupt?t:H:k):n(j)}function S(j){return vr(j)?(e.consume(j),l=String.fromCharCode(j),E):n(j)}function E(j){if(j===null||j===47||j===62||bn(j)){const Z=j===47,te=l.toLowerCase();return!Z&&!a&&kR.includes(te)?(s=1,r.interrupt?t(j):H(j)):MK.includes(l.toLowerCase())?(s=6,Z?(e.consume(j),R):r.interrupt?t(j):H(j)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):a?T(j):C(j))}return j===45||ur(j)?(e.consume(j),l+=String.fromCharCode(j),E):n(j)}function R(j){return j===62?(e.consume(j),r.interrupt?t:H):n(j)}function T(j){return Ut(j)?(e.consume(j),T):I(j)}function C(j){return j===47?(e.consume(j),I):j===58||j===95||vr(j)?(e.consume(j),_):Ut(j)?(e.consume(j),C):I(j)}function _(j){return j===45||j===46||j===58||j===95||ur(j)?(e.consume(j),_):L(j)}function L(j){return j===61?(e.consume(j),N):Ut(j)?(e.consume(j),L):C(j)}function N(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),d=j,A):Ut(j)?(e.consume(j),N):$(j)}function A(j){return j===d?(e.consume(j),d=null,z):j===null||mt(j)?n(j):(e.consume(j),A)}function $(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||bn(j)?L(j):(e.consume(j),$)}function z(j){return j===47||j===62||Ut(j)?C(j):n(j)}function I(j){return j===62?(e.consume(j),Y):n(j)}function Y(j){return j===null||mt(j)?H(j):Ut(j)?(e.consume(j),Y):n(j)}function H(j){return j===45&&s===2?(e.consume(j),U):j===60&&s===1?(e.consume(j),W):j===62&&s===4?(e.consume(j),P):j===63&&s===3?(e.consume(j),O):j===93&&s===5?(e.consume(j),K):mt(j)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(DK,V,q)(j)):j===null||mt(j)?(e.exit("htmlFlowData"),q(j)):(e.consume(j),H)}function q(j){return e.check(jK,D,V)(j)}function D(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),F}function F(j){return j===null||mt(j)?q(j):(e.enter("htmlFlowData"),H(j))}function U(j){return j===45?(e.consume(j),O):H(j)}function W(j){return j===47?(e.consume(j),l="",B):H(j)}function B(j){if(j===62){const Z=l.toLowerCase();return kR.includes(Z)?(e.consume(j),P):H(j)}return vr(j)&&l.length<8?(e.consume(j),l+=String.fromCharCode(j),B):H(j)}function K(j){return j===93?(e.consume(j),O):H(j)}function O(j){return j===62?(e.consume(j),P):j===45&&s===2?(e.consume(j),O):H(j)}function P(j){return j===null||mt(j)?(e.exit("htmlFlowData"),V(j)):(e.consume(j),P)}function V(j){return e.exit("htmlFlow"),t(j)}}function PK(e,t,n){const r=this;return s;function s(l){return mt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function $K(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(sf,t,n)}}const BK={name:"htmlText",tokenize:FK};function FK(e,t,n){const r=this;let s,a,l;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),f):O===47?(e.consume(O),L):O===63?(e.consume(O),C):vr(O)?(e.consume(O),$):n(O)}function f(O){return O===45?(e.consume(O),h):O===91?(e.consume(O),a=0,k):vr(O)?(e.consume(O),T):n(O)}function h(O){return O===45?(e.consume(O),y):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),b):mt(O)?(l=m,W(O)):(e.consume(O),m)}function b(O){return O===45?(e.consume(O),y):m(O)}function y(O){return O===62?U(O):O===45?b(O):m(O)}function k(O){const P="CDATA[";return O===P.charCodeAt(a++)?(e.consume(O),a===P.length?S:k):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),E):mt(O)?(l=S,W(O)):(e.consume(O),S)}function E(O){return O===93?(e.consume(O),R):S(O)}function R(O){return O===62?U(O):O===93?(e.consume(O),R):S(O)}function T(O){return O===null||O===62?U(O):mt(O)?(l=T,W(O)):(e.consume(O),T)}function C(O){return O===null?n(O):O===63?(e.consume(O),_):mt(O)?(l=C,W(O)):(e.consume(O),C)}function _(O){return O===62?U(O):C(O)}function L(O){return vr(O)?(e.consume(O),N):n(O)}function N(O){return O===45||ur(O)?(e.consume(O),N):A(O)}function A(O){return mt(O)?(l=A,W(O)):Ut(O)?(e.consume(O),A):U(O)}function $(O){return O===45||ur(O)?(e.consume(O),$):O===47||O===62||bn(O)?z(O):n(O)}function z(O){return O===47?(e.consume(O),U):O===58||O===95||vr(O)?(e.consume(O),I):mt(O)?(l=z,W(O)):Ut(O)?(e.consume(O),z):U(O)}function I(O){return O===45||O===46||O===58||O===95||ur(O)?(e.consume(O),I):Y(O)}function Y(O){return O===61?(e.consume(O),H):mt(O)?(l=Y,W(O)):Ut(O)?(e.consume(O),Y):z(O)}function H(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,q):mt(O)?(l=H,W(O)):Ut(O)?(e.consume(O),H):(e.consume(O),D)}function q(O){return O===s?(e.consume(O),s=void 0,F):O===null?n(O):mt(O)?(l=q,W(O)):(e.consume(O),q)}function D(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||bn(O)?z(O):(e.consume(O),D)}function F(O){return O===47||O===62||bn(O)?z(O):n(O)}function U(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function W(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),B}function B(O){return Ut(O)?Zt(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):K(O)}function K(O){return e.enter("htmlTextData"),l(O)}}const ck={name:"labelEnd",resolveAll:GK,resolveTo:VK,tokenize:WK},UK={tokenize:KK},qK={tokenize:YK},HK={tokenize:XK};function GK(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Zr(e,0,e.length,n),e}function VK(e,t){let n=e.length,r=0,s,a,l,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",f,t]],c=li(c,e.slice(a+1,a+r+3)),c=li(c,[["enter",h,t]]),c=li(c,Wh(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=li(c,[["exit",h,t],e[l-2],e[l-1],["exit",f,t]]),c=li(c,e.slice(l+1)),c=li(c,[["exit",d,t]]),Zr(e,a,e.length,c),e}function WK(e,t,n){const r=this;let s=r.events.length,a,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(l=r.parser.defined.includes(wi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(UK,h,l?h:m)(b):b===91?e.attempt(qK,h,l?f:m)(b):l?h(b):m(b)}function f(b){return e.attempt(HK,h,m)(b)}function h(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function KK(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return bn(m)?mc(e,a)(m):a(m)}function a(m){return m===41?h(m):wI(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return bn(m)?mc(e,d)(m):h(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?TI(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return bn(m)?mc(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function YK(e,t,n){const r=this;return s;function s(c){return EI.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(wi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function XK(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const ZK={name:"labelStartImage",resolveAll:ck.resolveAll,tokenize:QK};function QK(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const JK={name:"labelStartLink",resolveAll:ck.resolveAll,tokenize:eY};function eY(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Jb={name:"lineEnding",tokenize:tY};function tY(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Zt(e,t,"linePrefix")}}const hp={name:"thematicBreak",tokenize:nY};function nY(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||mt(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ut(f)?Zt(e,c,"whitespace")(f):c(f))}}const Nr={continuation:{tokenize:oY},exit:lY,name:"list",tokenize:sY},rY={partial:!0,tokenize:uY},iY={partial:!0,tokenize:aY};function sY(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return c;function c(y){const k=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:dv(y)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(hp,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return dv(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(sf,r.interrupt?n:h,e.attempt(rY,b,m))}function h(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return Ut(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function oY(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(sf,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Zt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ut(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(iY,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Zt(e,e.attempt(Nr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function aY(e,t,n){const r=this;return Zt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function lY(e){e.exit(this.containerState.type)}function uY(e,t,n){const r=this;return Zt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!Ut(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const SR={name:"setextUnderline",resolveTo:cY,tokenize:fY};function cY(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function fY(e,t,n){const r=this;let s;return a;function a(f){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ut(f)?Zt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||mt(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const dY={tokenize:pY};function pY(e){const t=this,n=e.attempt(sf,r,e.attempt(this.parser.constructs.flowInitial,s,Zt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(yK,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const hY={resolveAll:CI()},mY=RI("string"),gY=RI("text");function RI(e){return{resolveAll:CI(e==="text"?bY:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,l,c);return l;function l(h){return f(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const m=s[h];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function CI(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function bY(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,l=-1,c=0,d;for(;a--;){const f=s[a];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const yY={42:Nr,43:Nr,45:Nr,48:Nr,49:Nr,50:Nr,51:Nr,52:Nr,53:Nr,54:Nr,55:Nr,56:Nr,57:Nr,62:vI},vY={91:wK},xY={[-2]:Qb,[-1]:Qb,32:Qb},kY={35:NK,42:hp,45:[SR,hp],60:IK,61:SR,95:hp,96:xR,126:xR},SY={38:kI,92:xI},wY={[-5]:Jb,[-4]:Jb,[-3]:Jb,33:ZK,38:kI,42:pv,60:[JW,BK],91:JK,92:[CK,xI],93:ck,95:pv,96:dK},EY={null:[pv,hY]},TY={null:[42,95]},RY={null:[]},CY=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:TY,contentInitial:vY,disable:RY,document:yY,flow:kY,flowInitial:xY,insideSpan:EY,string:SY,text:wY},Symbol.toStringTag,{value:"Module"}));function _Y(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let l=[],c=[];const d={attempt:A(L),check:A(N),consume:T,enter:C,exit:_,interrupt:A(N,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let h=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(Y){return l=li(l,Y),E(),l[l.length-1]!==null?[]:($(t,0),f.events=Wh(a,f.events,f),f.events)}function b(Y,H){return AY(y(Y),H)}function y(Y){return NY(l,Y)}function k(){const{_bufferIndex:Y,_index:H,line:q,column:D,offset:F}=r;return{_bufferIndex:Y,_index:H,line:q,column:D,offset:F}}function S(Y){s[Y.line]=Y.column,I()}function E(){let Y;for(;r._index<l.length;){const H=l[r._index];if(typeof H=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<H.length;)R(H.charCodeAt(r._bufferIndex));else R(H)}}function R(Y){h=h(Y)}function T(Y){mt(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,I()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=Y}function C(Y,H){const q=H||{};return q.type=Y,q.start=k(),f.events.push(["enter",q,f]),c.push(q),q}function _(Y){const H=c.pop();return H.end=k(),f.events.push(["exit",H,f]),H}function L(Y,H){$(Y,H.from)}function N(Y,H){H.restore()}function A(Y,H){return q;function q(D,F,U){let W,B,K,O;return Array.isArray(D)?V(D):"tokenize"in D?V([D]):P(D);function P(se){return ue;function ue(le){const fe=le!==null&&se[le],ge=le!==null&&se.null,_e=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return V(_e)(le)}}function V(se){return W=se,B=0,se.length===0?U:j(se[B])}function j(se){return ue;function ue(le){return O=z(),K=se,se.partial||(f.currentConstruct=se),se.name&&f.parser.constructs.disable.null.includes(se.name)?te():se.tokenize.call(H?Object.assign(Object.create(f),H):f,d,Z,te)(le)}}function Z(se){return Y(K,O),F}function te(se){return O.restore(),++B<W.length?j(W[B]):U}}}function $(Y,H){Y.resolveAll&&!a.includes(Y)&&a.push(Y),Y.resolve&&Zr(f.events,H,f.events.length-H,Y.resolve(f.events.slice(H),f)),Y.resolveTo&&(f.events=Y.resolveTo(f.events,f))}function z(){const Y=k(),H=f.previous,q=f.currentConstruct,D=f.events.length,F=Array.from(c);return{from:D,restore:U};function U(){r=Y,f.previous=H,f.currentConstruct=q,f.events.length=D,c=F,I()}}function I(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function NY(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,a)];else{if(l=e.slice(n,s),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function AY(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
24
|
+
`;break}case-3:{l=`\r
|
|
25
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(a)}s=a===-2,r.push(l)}return r.join("")}function OY(e){const r={constructs:bI([CY,...(e||{}).extensions||[]]),content:s(VW),defined:[],document:s(KW),flow:s(dY),lazy:{},string:s(mY),text:s(gY)};return r;function s(a){return l;function l(c){return _Y(r,a,c)}}}function MY(e){for(;!SI(e););return e}const wR=/[\0\t\n\r]/g;function IY(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const d=[];let f,h,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(wR.lastIndex=m,f=wR.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const DY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jY(e){return e.replace(DY,LY)}function LY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return yI(n.slice(a?2:1),a?16:10)}return uk(n)||e}const _I={}.hasOwnProperty;function zY(e,t,n){return typeof t!="string"&&(n=t,t=void 0),PY(n)(MY(OY(n).document().write(IY()(e,t,!0))))}function PY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Me),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(Oe),blockQuote:a(ge),characterEscape:z,characterReference:z,codeFenced:a(_e),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(_e,l),codeText:a(oe,l),codeTextData:z,data:z,codeFlowValue:z,definition:a(ye),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Se),hardBreakEscape:a(we),hardBreakTrailing:a(we),htmlFlow:a(ke,l),htmlFlowData:z,htmlText:a(ke,l),htmlTextData:z,image:a(De),label:l,link:a(Me),listItem:a(He),listItemValue:b,listOrdered:a(je,m),listUnordered:a(je),paragraph:a(be),reference:j,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Oe),strong:a(Re),thematicBreak:a(ce)},exit:{atxHeading:d(),atxHeadingSequence:L,autolink:d(),autolinkEmail:fe,autolinkProtocol:le,blockQuote:d(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:se,characterReference:ue,codeFenced:d(E),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:k,codeFlowValue:I,codeIndented:d(R),codeText:d(F),codeTextData:I,data:I,definition:d(),definitionDestinationString:_,definitionLabelString:T,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(H),hardBreakTrailing:d(H),htmlFlow:d(q),htmlFlowData:I,htmlText:d(D),htmlTextData:I,image:d(W),label:K,labelText:B,lineEnding:Y,link:d(U),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Z,resourceDestinationString:O,resourceTitleString:P,resource:V,setextHeading:d($),setextHeadingLineSequence:A,setextHeadingText:N,strong:d(),thematicBreak:d()}};NI(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let re={type:"root",children:[]};const xe={stack:[re],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:h,data:n},$e=[];let Xe=-1;for(;++Xe<J.length;)if(J[Xe][1].type==="listOrdered"||J[Xe][1].type==="listUnordered")if(J[Xe][0]==="enter")$e.push(Xe);else{const Ye=$e.pop();Xe=s(J,Ye,Xe)}for(Xe=-1;++Xe<J.length;){const Ye=t[J[Xe][0]];_I.call(Ye,J[Xe][1].type)&&Ye[J[Xe][1].type].call(Object.assign({sliceSerialize:J[Xe][2].sliceSerialize},xe),J[Xe][1])}if(xe.tokenStack.length>0){const Ye=xe.tokenStack[xe.tokenStack.length-1];(Ye[1]||ER).call(xe,void 0,Ye[0])}for(re.position={start:ro(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:ro(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<t.transforms.length;)re=t.transforms[Xe](re)||re;return re}function s(J,re,xe){let $e=re-1,Xe=-1,Ye=!1,ht,Qe,yt,kt;for(;++$e<=xe;){const nt=J[$e];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?Xe++:Xe--,kt=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(ht&&!kt&&!Xe&&!yt&&(yt=$e),kt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kt=void 0}if(!Xe&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||Xe===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(ht){let Tt=$e;for(Qe=void 0;Tt--;){const _t=J[Tt];if(_t[1].type==="lineEnding"||_t[1].type==="lineEndingBlank"){if(_t[0]==="exit")continue;Qe&&(J[Qe][1].type="lineEndingBlank",Ye=!0),_t[1].type="lineEnding",Qe=Tt}else if(!(_t[1].type==="linePrefix"||_t[1].type==="blockQuotePrefix"||_t[1].type==="blockQuotePrefixWhitespace"||_t[1].type==="blockQuoteMarker"||_t[1].type==="listItemIndent"))break}yt&&(!Qe||yt<Qe)&&(ht._spread=!0),ht.end=Object.assign({},Qe?J[Qe][1].start:nt[1].end),J.splice(Qe||$e,0,["exit",ht,nt[2]]),$e++,xe++}if(nt[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};ht=Tt,J.splice($e,0,["enter",Tt,nt[2]]),$e++,xe++,yt=void 0,kt=!0}}}return J[re][1]._spread=Ye,xe}function a(J,re){return xe;function xe($e){c.call(this,J($e),$e),re&&re.call(this,$e)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(J,re,xe){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([re,xe||void 0]),J.position={start:ro(re.start),end:void 0}}function d(J){return re;function re(xe){J&&J.call(this,xe),f.call(this,xe)}}function f(J,re){const xe=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==J.type&&(re?re.call(this,J,$e[0]):($e[1]||ER).call(this,J,$e[0]));else throw new Error("Cannot close `"+J.type+"` ("+hc({start:J.start,end:J.end})+"): it’s not open");xe.position.end=ro(J.end)}function h(){return lk(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),re=this.stack[this.stack.length-1];re.lang=J}function k(){const J=this.resume(),re=this.stack[this.stack.length-1];re.meta=J}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function R(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J.replace(/(\r?\n|\r)$/g,"")}function T(J){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.label=re,xe.identifier=wi(this.sliceSerialize(J)).toLowerCase()}function C(){const J=this.resume(),re=this.stack[this.stack.length-1];re.title=J}function _(){const J=this.resume(),re=this.stack[this.stack.length-1];re.url=J}function L(J){const re=this.stack[this.stack.length-1];if(!re.depth){const xe=this.sliceSerialize(J).length;re.depth=xe}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function A(J){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function z(J){const xe=this.stack[this.stack.length-1].children;let $e=xe[xe.length-1];(!$e||$e.type!=="text")&&($e=ee(),$e.position={start:ro(J.start),end:void 0},xe.push($e)),this.stack.push($e)}function I(J){const re=this.stack.pop();re.value+=this.sliceSerialize(J),re.position.end=ro(J.end)}function Y(J){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=re.children[re.children.length-1];xe.position.end=ro(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(z.call(this,J),I.call(this,J))}function H(){this.data.atHardBreak=!0}function q(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function D(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function F(){const J=this.resume(),re=this.stack[this.stack.length-1];re.value=J}function U(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=re,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function W(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=re,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function B(J){const re=this.sliceSerialize(J),xe=this.stack[this.stack.length-2];xe.label=jY(re),xe.identifier=wi(re).toLowerCase()}function K(){const J=this.stack[this.stack.length-1],re=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const $e=J.children;xe.children=$e}else xe.alt=re}function O(){const J=this.resume(),re=this.stack[this.stack.length-1];re.url=J}function P(){const J=this.resume(),re=this.stack[this.stack.length-1];re.title=J}function V(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function Z(J){const re=this.resume(),xe=this.stack[this.stack.length-1];xe.label=re,xe.identifier=wi(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function te(J){this.data.characterReferenceType=J.type}function se(J){const re=this.sliceSerialize(J),xe=this.data.characterReferenceType;let $e;xe?($e=yI(re,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=uk(re);const Xe=this.stack[this.stack.length-1];Xe.value+=$e}function ue(J){const re=this.stack.pop();re.position.end=ro(J.end)}function le(J){I.call(this,J);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(J)}function fe(J){I.call(this,J);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(J)}function ge(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Se(){return{type:"emphasis",children:[]}}function Oe(){return{type:"heading",depth:0,children:[]}}function we(){return{type:"break"}}function ke(){return{type:"html",value:""}}function De(){return{type:"image",title:null,url:"",alt:null}}function Me(){return{type:"link",title:null,url:"",children:[]}}function je(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function He(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function be(){return{type:"paragraph",children:[]}}function Re(){return{type:"strong",children:[]}}function ee(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function ro(e){return{line:e.line,column:e.column,offset:e.offset}}function NI(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?NI(e,r):$Y(e,r)}}function $Y(e,t){let n;for(n in t)if(_I.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ER(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+hc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+hc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+hc({start:t.start,end:t.end})+") is still open")}function BY(e){const t=this;t.parser=n;function n(r){return zY(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function FY(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function UY(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
26
|
+
`}]}function qY(e,t){const n=t.value?t.value+`
|
|
27
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function HY(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GY(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VY(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Bl(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function WY(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KY(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function AI(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function YY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return AI(e,t);const s={src:Bl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function XY(e,t){const n={src:Bl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ZY(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function QY(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return AI(e,t);const s={href:Bl(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function JY(e,t){const n={href:Bl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eX(e,t,n){const r=e.all(t),s=n?tX(n):OI(t),a={},l=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const h=r[c];(s||c!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
|
|
28
|
+
`}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
29
|
+
`});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function tX(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=OI(n[r])}return t}function OI(e){const t=e.spread;return t??e.children.length>1}function nX(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function rX(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iX(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sX(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oX(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=ik(t.children[1]),d=cI(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function aX(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],b={},y=l?l[d]:void 0;y&&(b.align=y);let k={type:"element",tagName:a,properties:b,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),f.push(k)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function lX(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const TR=9,RR=32;function uX(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(CR(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(CR(t.slice(s),s>0,!1)),a.join("")}function CR(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===TR||a===RR;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===TR||a===RR;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function cX(e,t){const n={type:"text",value:uX(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fX(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const dX={blockquote:FY,break:UY,code:qY,delete:HY,emphasis:GY,footnoteReference:VY,heading:WY,html:KY,imageReference:YY,image:XY,inlineCode:ZY,linkReference:QY,link:JY,listItem:eX,list:nX,paragraph:rX,root:iX,strong:sX,table:oX,tableCell:lX,tableRow:aX,text:cX,thematicBreak:fX,toml:Vd,yaml:Vd,definition:Vd,footnoteDefinition:Vd};function Vd(){}const MI=-1,Kh=0,gc=1,Zp=2,fk=3,dk=4,pk=5,hk=6,II=7,DI=8,_R=typeof self=="object"?self:globalThis,pX=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=t[s];switch(a){case Kh:case MI:return n(l,s);case gc:{const c=n([],s);for(const d of l)c.push(r(d));return c}case Zp:{const c=n({},s);for(const[d,f]of l)c[r(d)]=r(f);return c}case fk:return n(new Date(l),s);case dk:{const{source:c,flags:d}=l;return n(new RegExp(c,d),s)}case pk:{const c=n(new Map,s);for(const[d,f]of l)c.set(r(d),r(f));return c}case hk:{const c=n(new Set,s);for(const d of l)c.add(r(d));return c}case II:{const{name:c,message:d}=l;return n(new _R[c](d),s)}case DI:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new _R[a](l),s)};return r},NR=e=>pX(new Map,e)(0),nl="",{toString:hX}={},{keys:mX}=Object,Yu=e=>{const t=typeof e;if(t!=="object"||!e)return[Kh,t];const n=hX.call(e).slice(8,-1);switch(n){case"Array":return[gc,nl];case"Object":return[Zp,nl];case"Date":return[fk,nl];case"RegExp":return[dk,nl];case"Map":return[pk,nl];case"Set":return[hk,nl];case"DataView":return[gc,n]}return n.includes("Array")?[gc,n]:n.includes("Error")?[II,n]:[Zp,n]},Wd=([e,t])=>e===Kh&&(t==="function"||t==="symbol"),gX=(e,t,n,r)=>{const s=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},a=l=>{if(n.has(l))return n.get(l);let[c,d]=Yu(l);switch(c){case Kh:{let h=l;switch(d){case"bigint":c=DI,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return s([MI],l)}return s([c,h],l)}case gc:{if(d){let b=l;return d==="DataView"?b=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(l)),s([d,[...b]],l)}const h=[],m=s([c,h],l);for(const b of l)h.push(a(b));return m}case Zp:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const b of mX(l))(e||!Wd(Yu(l[b])))&&h.push([a(b),a(l[b])]);return m}case fk:return s([c,l.toISOString()],l);case dk:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case pk:{const h=[],m=s([c,h],l);for(const[b,y]of l)(e||!(Wd(Yu(b))||Wd(Yu(y))))&&h.push([a(b),a(y)]);return m}case hk:{const h=[],m=s([c,h],l);for(const b of l)(e||!Wd(Yu(b)))&&h.push(a(b));return m}}const{message:f}=l;return s([c,{name:d,message:f}],l)};return a},AR=(e,{json:t,lossy:n}={})=>{const r=[];return gX(!(t||n),!!t,new Map,r)(e),r},Qp=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?NR(AR(e,t)):structuredClone(e):(e,t)=>NR(AR(e,t));function bX(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function yX(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function vX(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||bX,r=e.options.footnoteBackLabel||yX,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const h=e.all(f),m=String(f.identifier).toUpperCase(),b=Bl(m.toLowerCase());let y=0;const k=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){k.length>0&&k.push({type:"text",value:" "});let T=typeof n=="string"?n:n(d,y);typeof T=="string"&&(T={type:"text",value:T}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const E=h[h.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const T=E.children[E.children.length-1];T&&T.type==="text"?T.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...k)}else h.push(...k);const R={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(h,!0)};e.patch(f,R),c.push(R)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Qp(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
30
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
31
|
+
`}]}}const of=(function(e){if(e==null)return wX;if(typeof e=="function")return Yh(e);if(typeof e=="object")return Array.isArray(e)?xX(e):kX(e);if(typeof e=="string")return SX(e);throw new Error("Expected function, string, or object as test")});function xX(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=of(e[n]);return Yh(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function kX(e){const t=e;return Yh(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function SX(e){return Yh(t);function t(n){return n&&n.type===e}}function Yh(e){return t;function t(n,r,s){return!!(EX(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function wX(){return!0}function EX(e){return e!==null&&typeof e=="object"&&"type"in e}const jI=[],TX=!0,hv=!1,RX="skip";function LI(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=of(s),l=r?-1:1;c(e,void 0,[])();function c(d,f,h){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=jI,k,S,E;if((!t||a(d,f,h[h.length-1]||void 0))&&(y=CX(n(d,h)),y[0]===hv))return y;if("children"in d&&d.children){const R=d;if(R.children&&y[0]!==RX)for(S=(r?R.children.length:-1)+l,E=h.concat(R);S>-1&&S<R.children.length;){const T=R.children[S];if(k=c(T,S,E)(),k[0]===hv)return k;S=typeof k[1]=="number"?k[1]:S+l}}return y}}}function CX(e){return Array.isArray(e)?e:typeof e=="number"?[TX,e]:e==null?jI:[e]}function Xh(e,t,n,r){let s,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,s=n):(a=t,l=n,s=r),LI(e,a,c,s);function c(d,f){const h=f[f.length-1],m=h?h.children.indexOf(d):void 0;return l(d,m,h)}}const mv={}.hasOwnProperty,_X={};function NX(e,t){const n=t||_X,r=new Map,s=new Map,a=new Map,l={...dX,...n.handlers},c={all:f,applyData:OX,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:d,options:n,patch:AX,wrap:IX};return Xh(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,b=String(h.identifier).toUpperCase();m.has(b)||m.set(b,h)}}),c;function d(h,m){const b=h.type,y=c.handlers[b];if(mv.call(c.handlers,b)&&y)return y(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in h){const{children:S,...E}=h,R=Qp(E);return R.children=c.all(h),R}return Qp(h)}return(c.options.unknownHandler||MX)(c,h,m)}function f(h){const m=[];if("children"in h){const b=h.children;let y=-1;for(;++y<b.length;){const k=c.one(b[y],h);if(k){if(y&&b[y-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=OR(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=OR(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function AX(e,t){e.position&&(t.position=yW(e))}function OX(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Qp(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function MX(e,t){const n=t.data||{},r="value"in t&&!(mv.call(n,"hProperties")||mv.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function IX(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
32
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
33
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
34
|
+
`}),n}function OR(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function MR(e,t){const n=NX(e,t),r=n.one(e,void 0),s=vX(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
35
|
+
`},s),a}function DX(e,t){return e&&"run"in e?async function(n,r){const s=MR(n,{file:r,...t});await e.run(s,r)}:function(n,r){return MR(n,{file:r,...e||t})}}function IR(e){if(e)throw e}var ey,DR;function jX(){if(DR)return ey;DR=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!m)return!1;var b;for(b in f);return typeof b>"u"||e.call(f,b)},l=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},c=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return ey=function d(){var f,h,m,b,y,k,S=arguments[0],E=1,R=arguments.length,T=!1;for(typeof S=="boolean"&&(T=S,S=arguments[1]||{},E=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});E<R;++E)if(f=arguments[E],f!=null)for(h in f)m=c(S,h),b=c(f,h),S!==b&&(T&&b&&(a(b)||(y=s(b)))?(y?(y=!1,k=m&&s(m)?m:[]):k=m&&a(m)?m:{},l(S,{name:h,newValue:d(T,k,b)})):typeof b<"u"&&l(S,{name:h,newValue:b}));return S},ey}var LX=jX();const ty=Bc(LX);function gv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zX(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...s);function c(d,...f){const h=e[++a];let m=-1;if(d){l(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,h?PX(h,c)(...f):l(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function PX(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(s);try{d=e.apply(this,l)}catch(f){const h=f;if(c&&n)throw h;return s(h)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const Di={basename:$X,dirname:BX,extname:FX,join:UX,sep:"/"};function $X(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');af(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else l<0&&(a=!0,l=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function BX(e){if(af(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function FX(e){af(e);let t=e.length,n=-1,r=0,s=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function UX(...e){let t=-1,n;for(;++t<e.length;)af(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qX(n)}function qX(e){af(e);const t=e.codePointAt(0)===47;let n=HX(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function HX(e,t){let n="",r=0,s=-1,a=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(s===l-1||a===1))if(s!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=l,a=0;continue}}else if(n.length>0){n="",r=0,s=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function af(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const GX={cwd:VX};function VX(){return"/"}function bv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function WX(e){if(typeof e=="string")e=new URL(e);else if(!bv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return KX(e)}function KX(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const ny=["history","path","basename","stem","extname","dirname"];class zI{constructor(t){let n;t?bv(t)?n={path:t}:typeof t=="string"||YX(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":GX.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ny.length;){const a=ny[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)ny.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Di.basename(this.path):void 0}set basename(t){iy(t,"basename"),ry(t,"basename"),this.path=Di.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Di.dirname(this.path):void 0}set dirname(t){jR(this.basename,"dirname"),this.path=Di.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Di.extname(this.path):void 0}set extname(t){if(ry(t,"extname"),jR(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Di.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){bv(t)&&(t=WX(t)),iy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Di.basename(this.path,this.extname):void 0}set stem(t){iy(t,"stem"),ry(t,"stem"),this.path=Di.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new pr(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ry(e,t){if(e&&e.includes(Di.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Di.sep+"`")}function iy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jR(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YX(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XX=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),ZX={}.hasOwnProperty;class mk extends XX{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=zX()}copy(){const t=new mk;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ty(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ay("data",this.frozen),this.namespace[t]=n,this):ZX.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ay("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Kd(t),r=this.parser||this.Parser;return sy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),sy("process",this.parser||this.Parser),oy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=Kd(t),d=r.parse(c);r.run(d,c,function(h,m,b){if(h||!m||!b)return f(h);const y=m,k=r.stringify(y,b);eZ(k)?b.value=k:b.result=k,f(h,b)});function f(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),sy("processSync",this.parser||this.Parser),oy("processSync",this.compiler||this.Compiler),this.process(t,s),zR("processSync","process",n),r;function s(a,l){n=!0,IR(a),r=l}}run(t,n,r){LR(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const d=Kd(n);s.run(t,d,f);function f(h,m,b){const y=m||t;h?c(h):l?l(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),zR("runSync","run",r),s;function a(l,c){IR(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=Kd(n),s=this.compiler||this.Compiler;return oy("stringify",s),LR(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ay("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...m]=f;d(h,m)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=ty(!0,s.settings,f.settings))}function c(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const m=f[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...h]);else if(h.length>0){let[y,...k]=h;const S=r[b][1];gv(S)&&gv(y)&&(y=ty(!0,S,y)),r[b]=[f,y,...k]}}}}const QX=new mk().freeze();function sy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function oy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ay(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function LR(e){if(!gv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zR(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Kd(e){return JX(e)?e:new zI(e)}function JX(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eZ(e){return typeof e=="string"||tZ(e)}function tZ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nZ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",PR=[],$R={allowDangerousHtml:!0},rZ=/^(https?|ircs?|mailto|xmpp)$/i,iZ=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function sZ(e){const t=oZ(e),n=aZ(e);return lZ(t.runSync(t.parse(n),n),e)}function oZ(e){const t=e.rehypePlugins||PR,n=e.remarkPlugins||PR,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$R}:$R;return QX().use(BY).use(n).use(DX,r).use(t)}function aZ(e){const t=e.children||"",n=new zI;return typeof t=="string"&&(n.value=t),n}function lZ(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||uZ;for(const h of iZ)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+nZ+h.id,void 0);return Xh(e,f),wW(e,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(h,m,b){if(h.type==="raw"&&b&&typeof m=="number")return l?b.children.splice(m,1):b.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in Zb)if(Object.hasOwn(Zb,y)&&Object.hasOwn(h.properties,y)){const k=h.properties[y],S=Zb[y];(S===null||S.includes(h.tagName))&&(h.properties[y]=d(String(k||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,b)),y&&b&&typeof m=="number")return c&&h.children?b.children.splice(m,1,...h.children):b.children.splice(m,1),m}}}function uZ(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||rZ.test(e.slice(0,t))?e:""}const BR=(function(e,t,n){const r=of(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),ma=(function(e){if(e==null)return dZ;if(typeof e=="string")return fZ(e);if(typeof e=="object")return cZ(e);if(typeof e=="function")return gk(e);throw new Error("Expected function, string, or array as `test`")});function cZ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ma(e[n]);return gk(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function fZ(e){return gk(t);function t(n){return n.tagName===e}}function gk(e){return t;function t(n,r,s){return!!(pZ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function dZ(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function pZ(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const FR=/\n/g,UR=/[\t ]+/g,yv=ma("br"),qR=ma(kZ),hZ=ma("p"),HR=ma("tr"),mZ=ma(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",xZ,SZ]),PI=ma(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function gZ(e,t){const n=t||{},r="children"in e?e.children:[],s=PI(e),a=FI(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...BI(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...$I(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?yv(r[c+1]):s}));const d=[];let f;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?f!==void 0&&h>f&&(f=h):h&&(f!==void 0&&f>-1&&d.push(`
|
|
36
|
+
`.repeat(f)||" "),f=-1,d.push(h))}return d.join("")}function $I(e,t,n){return e.type==="element"?bZ(e,t,n):e.type==="text"?n.whitespace==="normal"?BI(e,n):yZ(e):[]}function bZ(e,t,n){const r=FI(e,n),s=e.children||[];let a=-1,l=[];if(mZ(e))return l;let c,d;for(yv(e)||HR(e)&&BR(t,e,HR)?d=`
|
|
37
|
+
`:hZ(e)?(c=2,d=2):PI(e)&&(c=1,d=1);++a<s.length;)l=l.concat($I(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?yv(s[a+1]):d}));return qR(e)&&BR(t,e,qR)&&l.push(" "),c&&l.unshift(c),d&&l.push(d),l}function BI(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){FR.lastIndex=a;const d=FR.exec(n),f=d&&"index"in d?d.index:n.length;r.push(vZ(n.slice(a,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,f===n.length?t.breakAfter:!0)),a=f+1}let l=-1,c;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(s.push(r[l]),c=void 0):r[l]?(typeof c=="number"&&s.push(c),s.push(r[l]),c=0):(l===0||l===r.length-1)&&s.push(0);return s}function yZ(e){return[String(e.value)]}function vZ(e,t,n){const r=[];let s=0,a;for(;s<e.length;){UR.lastIndex=s;const l=UR.exec(e);a=l?l.index:e.length,!s&&!a&&l&&!t&&r.push(""),s!==a&&r.push(e.slice(s,a)),s=l?a+l[0].length:a}return s!==a&&!n&&r.push(""),r.join(" ")}function FI(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function xZ(e){return!!(e.properties||{}).hidden}function kZ(e){return e.tagName==="td"||e.tagName==="th"}function SZ(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function wZ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],E=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],R=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:E},L={className:"function.dispatch",relevance:0,keywords:{_hint:R},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[L,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:N.concat([{begin:/\(/,end:/\)/,keywords:_,contains:N.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(A,$,L,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function EZ(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=wZ(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function TZ(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(c);const d={match:/\\"/},f={className:"string",begin:/'/,end:/'/},h={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},b=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],y=e.SHEBANG({binary:`(${b.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],E=["true","false"],R={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],C=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],_=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],L=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:S,literal:E,built_in:[...T,...C,"set","shopt",..._,...L]},contains:[y,e.SHEBANG(),k,m,a,l,R,c,d,f,h,n]}}function RZ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",E={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},R=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:R.concat([{begin:/\(/,end:/\)/,keywords:E,contains:R.concat(["self"]),relevance:0}]),relevance:0},C={begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:E,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:E,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:E,disableAutodetect:!0,illegal:"</",contains:[].concat(T,C,R,[m,{begin:e.IDENT_RE+"::",keywords:E},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:f,keywords:E}}}function CZ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},f={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},m={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(f,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],E=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],R=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:E},L={className:"function.dispatch",relevance:0,keywords:{_hint:R},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[L,m,c,n,e.C_BLOCK_COMMENT_MODE,h,f],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:N.concat([{begin:/\(/,end:/\)/,keywords:_,contains:N.concat(["self"]),relevance:0}]),relevance:0},$={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[f,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,f,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,f,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(A,$,L,N,[m,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function _Z(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],l={keyword:s.concat(a),built_in:t,literal:r},c=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},f={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},h={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(h,{illegal:/\n/}),b={className:"subst",begin:/\{/,end:/\}/,keywords:l},y=e.inherit(b,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},E=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});b.contains=[S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],y.contains=[E,k,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const R={variants:[f,S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},T={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},C=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",_={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},R,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,T,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,T,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+C+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,T],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[R,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}const NZ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),AZ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],OZ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],MZ=[...AZ,...OZ],IZ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),DZ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),jZ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),LZ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function zZ(e){const t=e.regex,n=NZ(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",a=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",c=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+DZ.join("|")+")"},{begin:":(:)?("+jZ.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+LZ.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:IZ.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+MZ.join("|")+")\\b"}]}}function PZ(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function $Z(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,illegal:/["']/}]}]}}function BZ(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function FZ(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[r,a,s,l,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,f=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(d,f,h),b=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:b,className:"attr",starts:{end:/$/,contains:[r,c,a,s,l,n]}}]}}var sl="[0-9](_*[0-9])*",Yd=`\\.(${sl})`,Xd="[0-9a-fA-F](_*[0-9a-fA-F])*",GR={className:"number",variants:[{begin:`(\\b(${sl})((${Yd})|\\.)?|(${Yd}))[eE][+-]?(${sl})[fFdD]?\\b`},{begin:`\\b(${sl})((${Yd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Yd})[fFdD]?\\b`},{begin:`\\b(${sl})[fFdD]\\b`},{begin:`\\b0[xX]((${Xd})\\.?|(${Xd})?\\.(${Xd}))[pP][+-]?(${sl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Xd})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function UI(e,t,n){return n===-1?"":e.replace(t,r=>UI(e,t,n-1))}function UZ(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+UI("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},f={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,GR,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},GR,f]}}const VR="[A-Za-z$_][0-9A-Za-z$_]*",qZ=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],HZ=["true","false","null","undefined","NaN","Infinity"],qI=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],HI=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],GI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],GZ=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],VZ=[].concat(GI,qI,HI);function WZ(e){const t=e.regex,n=(B,{after:K})=>{const O="</"+B[0].slice(1);return B.input.indexOf(O,K)!==-1},r=VR,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(B,K)=>{const O=B[0].length+B.index,P=B.input[O];if(P==="<"||P===","){K.ignoreMatch();return}P===">"&&(n(B,{after:O})||K.ignoreMatch());let V;const j=B.input.substring(O);if(V=j.match(/^\s*=/)){K.ignoreMatch();return}if((V=j.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},c={$pattern:VR,keyword:qZ,literal:HZ,built_in:VZ,"variable.language":GZ},d="[0-9](_?[0-9])*",f=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,E,{match:/\$\d+/},m];b.contains=C.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(C)});const _=[].concat(T,b.contains),L=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(_)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:L},A={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},$={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...qI,...HI]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function H(B){return t.concat("(?!",B.join("|"),")")}const q={match:t.concat(/\b/,H([...GI,"super","import"].map(B=>`${B}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},D={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},U="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(U)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,E,T,{match:/\$\d+/},m,$,{scope:"attr",match:r+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:U,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},D,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},q,Y,A,F,{match:/\$[(.]/}]}}function KZ(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ol="[0-9](_*[0-9])*",Zd=`\\.(${ol})`,Qd="[0-9a-fA-F](_*[0-9a-fA-F])*",YZ={className:"number",variants:[{begin:`(\\b(${ol})((${Zd})|\\.)?|(${Zd}))[eE][+-]?(${ol})[fFdD]?\\b`},{begin:`\\b(${ol})((${Zd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Zd})[fFdD]?\\b`},{begin:`\\b(${ol})[fFdD]\\b`},{begin:`\\b0[xX]((${Qd})\\.?|(${Qd})?\\.(${Qd}))[pP][+-]?(${ol})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Qd})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function XZ(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(l);const c={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},f=YZ,h=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},b=m;return b.variants[1].contains=[m],m.variants[1].contains=[b],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,h,n,r,c,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,h],relevance:0},e.C_LINE_COMMENT_MODE,h,c,d,l,e.C_NUMBER_MODE]},h]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},c,d]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
38
|
+
`},f]}}const ZZ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),QZ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],JZ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],eQ=[...QZ,...JZ],tQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),VI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),WI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nQ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),rQ=VI.concat(WI).sort().reverse();function iQ(e){const t=ZZ(e),n=rQ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],d=function(C){return{className:"string",begin:"~?"+C+".*?"+C}},f=function(C,_,L){return{className:C,begin:_,relevance:L}},h={$pattern:/[a-z-]+/,keyword:r,attribute:tQ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,f("variable","@@?"+s,10),f("variable","@\\{"+s+"\\}"),f("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const b=c.concat({begin:/\{/,end:/\}/,contains:l}),y={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(c)},k={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nQ.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},S={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:h,returnEnd:!0,contains:c,relevance:0}},E={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:b}},R={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,f("keyword","all\\b"),f("variable","@\\{"+s+"\\}"),{begin:"\\b("+eQ.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,f("selector-tag",a,0),f("selector-id","#"+a),f("selector-class","\\."+a,0),f("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+VI.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+WI.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},T={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[R]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,E,T,k,R,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function sQ(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function oQ(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,s,a,l]}}function aQ(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},f={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(f,{contains:[]}),b=e.inherit(h,{contains:[]});f.contains.push(b),h.contains.push(m);let y=[n,d];return[f,h,m,b].forEach(R=>{R.contains=R.contains.concat(y)}),y=y.concat(f,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},n,a,f,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,d,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function lQ(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,c={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:c,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function uQ(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},l={begin:/->\{/,end:/\}/},c={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[c]},f={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},h=[e.BACKSLASH_ESCAPE,a,d],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(S,E,R="\\1")=>{const T=R==="\\1"?R:t.concat(R,E);return t.concat(t.concat("(?:",S,")"),E,/(?:\\.|[^\\\/])*?/,T,/(?:\\.|[^\\\/])*?/,R,r)},y=(S,E,R)=>t.concat(t.concat("(?:",S,")"),E,/(?:\\.|[^\\\/])*?/,R,r),k=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:h,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},f,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:b("s|tr|y",t.either(...m,{capture:!0}))},{begin:b("s|tr|y","\\(","\\)")},{begin:b("s|tr|y","\\[","\\]")},{begin:b("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:y("(?:m|qr)?",/\//,/\//)},{begin:y("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:y("m|qr",/\(/,/\)/)},{begin:y("m|qr",/\[/,/\]/)},{begin:y("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c,f]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=k,l.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:k}}function cQ(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+r},c={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},f=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(D,F)=>{F.data._beginMatch=D[1]||D[2]},"on:end":(D,F)=>{F.data._beginMatch!==D[1]&&F.ignoreMatch()}},b=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
|
|
39
|
+
]`,k={scope:"string",variants:[h,f,m,b]},S={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},E=["false","null","true"],R=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],T=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],_={keyword:R,literal:(D=>{const F=[];return D.forEach(U=>{F.push(U),U.toLowerCase()===U?F.push(U.toUpperCase()):F.push(U.toLowerCase())}),F})(E),built_in:T},L=D=>D.map(F=>F.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",L(T).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},A=t.concat(r,"\\b(?!\\()"),$={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},z={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},I={relevance:0,begin:/\(/,end:/\)/,keywords:_,contains:[z,l,$,e.C_BLOCK_COMMENT_MODE,k,S,N]},Y={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",L(R).join("\\b|"),"|",L(T).join("\\b|"),"\\b)"),r,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[I]};I.contains.push(Y);const H=[z,$,e.C_BLOCK_COMMENT_MODE,k,S,N],q={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...H]},...H,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:_,contains:[q,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},c,{scope:"variable.language",match:/\$this\b/},l,Y,$,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:_,contains:["self",q,l,$,e.C_BLOCK_COMMENT_MODE,k,S]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},k,S]}}function fQ(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function dQ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function pQ(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},f={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},h={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,h,f]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,h,f]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,f]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b="[0-9](_?[0-9])*",y=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,k=`\\b|${r.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${y}))[eE][+-]?(${b})[jJ]?(?=${k})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${b})[jJ](?=${k})`}]},E={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},R={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",d,S,m,e.HASH_COMMENT_MODE]}]};return f.contains=[m,S,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[d,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,E,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[R]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,R,m]}]}}function hQ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function mQ(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function gQ(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(r,/(::\w+)*/),l={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},c={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},f=[e.COMMENT("#","$",{contains:[c]}),e.COMMENT("^=begin","^=end",{contains:[c],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],h={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,h],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,h]})]}]},b="[1-9](_?[0-9])*|0",y="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${y}))?([eE][+-]?(${y})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},N=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:l},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,h],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,f),relevance:0}].concat(d,f);h.contains=N,S.contains=N;const I=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:N}}];return f.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(I).concat(f).concat(N)}}function bQ(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",c=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],f=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],h=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:h,keyword:c,literal:d,built_in:f},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:f,type:h}},{className:"punctuation",begin:"->"},a]}}const yQ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),vQ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],xQ=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],kQ=[...vQ,...xQ],SQ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),wQ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),EQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),TQ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function RQ(e){const t=yQ(e),n=EQ,r=wQ,s="@[a-z-]+",a="and or not only",c={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+kQ.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+TQ.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,c,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:SQ.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},c,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function CQ(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function _Q(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],c=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],f=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],h=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],m=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],b=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],y=h,k=[...f,...d].filter(L=>!h.includes(L)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},E={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},R={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function T(L){return t.concat(/\b/,t.either(...L.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const C={scope:"keyword",match:T(b),relevance:0};function _(L,{exceptions:N,when:A}={}){const $=A;return N=N||[],L.map(z=>z.match(/\|\d+$/)||N.includes(z)?z:$(z)?`${z}|0`:z)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(k,{when:L=>L.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:T(l)},C,R,S,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,E]}}function KI(e){return e?typeof e=="string"?e:e.source:null}function Xu(e){return pn("(?=",e,")")}function pn(...e){return e.map(n=>KI(n)).join("")}function NQ(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function br(...e){return"("+(NQ(e).capture?"":"?:")+e.map(r=>KI(r)).join("|")+")"}const bk=e=>pn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),AQ=["Protocol","Type"].map(bk),WR=["init","self"].map(bk),OQ=["Any","Self"],ly=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],KR=["false","nil","true"],MQ=["assignment","associativity","higherThan","left","lowerThan","none","right"],IQ=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],YR=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],YI=br(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),XI=br(YI,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),uy=pn(YI,XI,"*"),ZI=br(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Jp=br(ZI,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Ii=pn(ZI,Jp,"*"),Jd=pn(/[A-Z]/,Jp,"*"),DQ=["attached","autoclosure",pn(/convention\(/,br("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",pn(/objc\(/,Ii,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],jQ=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function LQ(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,br(...AQ,...WR)],className:{2:"keyword"}},a={match:pn(/\./,br(...ly)),relevance:0},l=ly.filter(we=>typeof we=="string").concat(["_|0"]),c=ly.filter(we=>typeof we!="string").concat(OQ).map(bk),d={variants:[{className:"keyword",match:br(...c,...WR)}]},f={$pattern:br(/\b\w+/,/#\w+/),keyword:l.concat(IQ),literal:KR},h=[s,a,d],m={match:pn(/\./,br(...YR)),relevance:0},b={className:"built_in",match:pn(/\b/,br(...YR),/(?=\()/)},y=[m,b],k={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:uy},{match:`\\.(\\.|${XI})+`}]},E=[k,S],R="([0-9]_*)+",T="([0-9a-fA-F]_*)+",C={className:"number",relevance:0,variants:[{match:`\\b(${R})(\\.(${R}))?([eE][+-]?(${R}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${R}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(we="")=>({className:"subst",variants:[{match:pn(/\\/,we,/[0\\tnr"']/)},{match:pn(/\\/,we,/u\{[0-9a-fA-F]{1,8}\}/)}]}),L=(we="")=>({className:"subst",match:pn(/\\/,we,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(we="")=>({className:"subst",label:"interpol",begin:pn(/\\/,we,/\(/),end:/\)/}),A=(we="")=>({begin:pn(we,/"""/),end:pn(/"""/,we),contains:[_(we),L(we),N(we)]}),$=(we="")=>({begin:pn(we,/"/),end:pn(/"/,we),contains:[_(we),N(we)]}),z={className:"string",variants:[A(),A("#"),A("##"),A("###"),$(),$("#"),$("##"),$("###")]},I=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],Y={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:I},H=we=>{const ke=pn(we,/\//),De=pn(/\//,we);return{begin:ke,end:De,contains:[...I,{scope:"comment",begin:`#(?!.*${De})`,end:/$/}]}},q={scope:"regexp",variants:[H("###"),H("##"),H("#"),Y]},D={match:pn(/`/,Ii,/`/)},F={className:"variable",match:/\$\d+/},U={className:"variable",match:`\\$${Jp}+`},W=[D,F,U],B={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:jQ,contains:[...E,C,z]}]}},K={scope:"keyword",match:pn(/@/,br(...DQ),Xu(br(/\(/,/\s+/)))},O={scope:"meta",match:pn(/@/,Ii)},P=[B,K,O],V={match:Xu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:pn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Jp,"+")},{className:"type",match:Jd,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:pn(/\s+&\s+/,Xu(Jd)),relevance:0}]},j={begin:/</,end:/>/,keywords:f,contains:[...r,...h,...P,k,V]};V.contains.push(j);const Z={match:pn(Ii,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:f,contains:["self",Z,...r,q,...h,...y,...E,C,z,...W,...P,V]},se={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,V]},ue={begin:br(Xu(pn(Ii,/\s*:/)),Xu(pn(Ii,/\s+/,Ii,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Ii}]},le={begin:/\(/,end:/\)/,keywords:f,contains:[ue,...r,...h,...E,C,z,...P,V,te],endsParent:!0,illegal:/["']/},fe={match:[/(func|macro)/,/\s+/,br(D.match,Ii,uy)],className:{1:"keyword",3:"title.function"},contains:[se,le,t],illegal:[/\[/,/%/]},ge={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[se,le,t],illegal:/\[|%/},_e={match:[/operator/,/\s+/,uy],className:{1:"keyword",3:"title"}},oe={begin:[/precedencegroup/,/\s+/,Jd],className:{1:"keyword",3:"title"},contains:[V],keywords:[...MQ,...KR],end:/}/},ye={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Se={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Oe={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Ii,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:f,contains:[se,...h,{begin:/:/,end:/\{/,keywords:f,contains:[{scope:"title.class.inherited",match:Jd},...h],relevance:0}]};for(const we of z.variants){const ke=we.contains.find(Me=>Me.label==="interpol");ke.keywords=f;const De=[...h,...y,...E,C,z,...W];ke.contains=[...De,{begin:/\(/,end:/\)/,contains:["self",...De]}]}return{name:"Swift",keywords:f,contains:[...r,fe,ge,ye,Se,Oe,_e,oe,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},q,...h,...y,...E,C,z,...W,...P,V,te]}}const eh="[A-Za-z$_][0-9A-Za-z$_]*",QI=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],JI=["true","false","null","undefined","NaN","Infinity"],eD=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],tD=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],nD=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],rD=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],iD=[].concat(nD,eD,tD);function zQ(e){const t=e.regex,n=(B,{after:K})=>{const O="</"+B[0].slice(1);return B.input.indexOf(O,K)!==-1},r=eh,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(B,K)=>{const O=B[0].length+B.index,P=B.input[O];if(P==="<"||P===","){K.ignoreMatch();return}P===">"&&(n(B,{after:O})||K.ignoreMatch());let V;const j=B.input.substring(O);if(V=j.match(/^\s*=/)){K.ignoreMatch();return}if((V=j.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},c={$pattern:eh,keyword:QI,literal:JI,built_in:iD,"variable.language":rD},d="[0-9](_?[0-9])*",f=`\\.(${d})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${f})|\\.)?|(${f}))[eE][+-]?(${d})\\b`},{begin:`\\b(${h})\\b((${f})\\b|\\.)?|(${f})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},C=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,E,{match:/\$\d+/},m];b.contains=C.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(C)});const _=[].concat(T,b.contains),L=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(_)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:L},A={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},$={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...eD,...tD]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function H(B){return t.concat("(?!",B.join("|"),")")}const q={match:t.concat(/\b/,H([...nD,"super","import"].map(B=>`${B}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},D={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},U="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(U)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,E,T,{match:/\$\d+/},m,$,{scope:"attr",match:r+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:U,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},D,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},q,Y,A,F,{match:/\$[(.]/}]}}function PQ(e){const t=e.regex,n=zQ(e),r=eh,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],f={$pattern:eh,keyword:QI.concat(d),literal:JI,built_in:iD.concat(s),"variable.language":rD},h={className:"meta",begin:"@"+r},m=(S,E,R)=>{const T=S.contains.findIndex(C=>C.label===E);if(T===-1)throw new Error("can not find mode to replace");S.contains.splice(T,1,R)};Object.assign(n.keywords,f),n.exports.PARAMS_CONTAINS.push(h);const b=n.contains.find(S=>S.scope==="attr"),y=Object.assign({},b,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,b,y]),n.contains=n.contains.concat([h,a,l,y]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",c);const k=n.contains.find(S=>S.label==="func.def");return k.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function $Q(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,c=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,s),/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(a,s),/ +/,t.either(l,c),/ *#/)}]},f={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},h={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),b=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,d,f,h,m,b,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[b]}]}}function BQ(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},c={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},f={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,l,s,e.QUOTE_STRING_MODE,d,f,c]}}function FQ(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},l=e.inherit(a,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),f={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,d,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,d,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[f],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[f],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:f}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function UQ(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},c=e.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),b={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},y={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},k={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},E=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},b,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},k,S,a,l],R=[...E];return R.pop(),R.push(c),y.contains=R,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}const qQ={arduino:EZ,bash:TZ,c:RZ,cpp:CZ,csharp:_Z,css:zZ,diff:PZ,go:$Z,graphql:BZ,ini:FZ,java:UZ,javascript:WZ,json:KZ,kotlin:XZ,less:iQ,lua:sQ,makefile:oQ,markdown:aQ,objectivec:lQ,perl:uQ,php:cQ,"php-template":fQ,plaintext:dQ,python:pQ,"python-repl":hQ,r:mQ,ruby:gQ,rust:bQ,scss:RQ,shell:CQ,sql:_Q,swift:LQ,typescript:PQ,vbnet:$Q,wasm:BQ,xml:FQ,yaml:UQ};var cy,XR;function HQ(){if(XR)return cy;XR=1;function e(X){return X instanceof Map?X.clear=X.delete=X.set=function(){throw new Error("map is read-only")}:X instanceof Set&&(X.add=X.clear=X.delete=function(){throw new Error("set is read-only")}),Object.freeze(X),Object.getOwnPropertyNames(X).forEach(he=>{const Le=X[he],Ze=typeof Le;(Ze==="object"||Ze==="function")&&!Object.isFrozen(Le)&&e(Le)}),X}class t{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(X){return X.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(X,...he){const Le=Object.create(null);for(const Ze in X)Le[Ze]=X[Ze];return he.forEach(function(Ze){for(const St in Ze)Le[St]=Ze[St]}),Le}const s="</span>",a=X=>!!X.scope,l=(X,{prefix:he})=>{if(X.startsWith("language:"))return X.replace("language:","language-");if(X.includes(".")){const Le=X.split(".");return[`${he}${Le.shift()}`,...Le.map((Ze,St)=>`${Ze}${"_".repeat(St+1)}`)].join(" ")}return`${he}${X}`};class c{constructor(he,Le){this.buffer="",this.classPrefix=Le.classPrefix,he.walk(this)}addText(he){this.buffer+=n(he)}openNode(he){if(!a(he))return;const Le=l(he.scope,{prefix:this.classPrefix});this.span(Le)}closeNode(he){a(he)&&(this.buffer+=s)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const d=(X={})=>{const he={children:[]};return Object.assign(he,X),he};class f{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const Le=d({scope:he});this.add(Le),this.stack.push(Le)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,Le){return typeof Le=="string"?he.addText(Le):Le.children&&(he.openNode(Le),Le.children.forEach(Ze=>this._walk(he,Ze)),he.closeNode(Le)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(Le=>typeof Le=="string")?he.children=[he.children.join("")]:he.children.forEach(Le=>{f._collapse(Le)}))}}class h extends f{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,Le){const Ze=he.root;Le&&(Ze.scope=`language:${Le}`),this.add(Ze)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(X){return X?typeof X=="string"?X:X.source:null}function b(X){return S("(?=",X,")")}function y(X){return S("(?:",X,")*")}function k(X){return S("(?:",X,")?")}function S(...X){return X.map(Le=>m(Le)).join("")}function E(X){const he=X[X.length-1];return typeof he=="object"&&he.constructor===Object?(X.splice(X.length-1,1),he):{}}function R(...X){return"("+(E(X).capture?"":"?:")+X.map(Ze=>m(Ze)).join("|")+")"}function T(X){return new RegExp(X.toString()+"|").exec("").length-1}function C(X,he){const Le=X&&X.exec(he);return Le&&Le.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function L(X,{joinWith:he}){let Le=0;return X.map(Ze=>{Le+=1;const St=Le;let at=m(Ze),qe="";for(;at.length>0;){const Ee=_.exec(at);if(!Ee){qe+=at;break}qe+=at.substring(0,Ee.index),at=at.substring(Ee.index+Ee[0].length),Ee[0][0]==="\\"&&Ee[1]?qe+="\\"+String(Number(Ee[1])+St):(qe+=Ee[0],Ee[0]==="("&&Le++)}return qe}).map(Ze=>`(${Ze})`).join(he)}const N=/\b\B/,A="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",z="\\b\\d+(\\.\\d+)?",I="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Y="\\b(0b[01]+)",H="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",q=(X={})=>{const he=/^#![ ]*\//;return X.binary&&(X.begin=S(he,/.*\b/,X.binary,/\b.*/)),r({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(Le,Ze)=>{Le.index!==0&&Ze.ignoreMatch()}},X)},D={begin:"\\\\[\\s\\S]",relevance:0},F={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[D]},U={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[D]},W={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},B=function(X,he,Le={}){const Ze=r({scope:"comment",begin:X,end:he,contains:[]},Le);Ze.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const St=R("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ze.contains.push({begin:S(/[ ]+/,"(",St,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ze},K=B("//","$"),O=B("/\\*","\\*/"),P=B("#","$"),V={scope:"number",begin:z,relevance:0},j={scope:"number",begin:I,relevance:0},Z={scope:"number",begin:Y,relevance:0},te={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[D,{begin:/\[/,end:/\]/,relevance:0,contains:[D]}]},se={scope:"title",begin:A,relevance:0},ue={scope:"title",begin:$,relevance:0},le={begin:"\\.\\s*"+$,relevance:0};var ge=Object.freeze({__proto__:null,APOS_STRING_MODE:F,BACKSLASH_ESCAPE:D,BINARY_NUMBER_MODE:Z,BINARY_NUMBER_RE:Y,COMMENT:B,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:j,C_NUMBER_RE:I,END_SAME_AS_BEGIN:function(X){return Object.assign(X,{"on:begin":(he,Le)=>{Le.data._beginMatch=he[1]},"on:end":(he,Le)=>{Le.data._beginMatch!==he[1]&&Le.ignoreMatch()}})},HASH_COMMENT_MODE:P,IDENT_RE:A,MATCH_NOTHING_RE:N,METHOD_GUARD:le,NUMBER_MODE:V,NUMBER_RE:z,PHRASAL_WORDS_MODE:W,QUOTE_STRING_MODE:U,REGEXP_MODE:te,RE_STARTERS_RE:H,SHEBANG:q,TITLE_MODE:se,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:ue});function _e(X,he){X.input[X.index-1]==="."&&he.ignoreMatch()}function oe(X,he){X.className!==void 0&&(X.scope=X.className,delete X.className)}function ye(X,he){he&&X.beginKeywords&&(X.begin="\\b("+X.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",X.__beforeBegin=_e,X.keywords=X.keywords||X.beginKeywords,delete X.beginKeywords,X.relevance===void 0&&(X.relevance=0))}function Se(X,he){Array.isArray(X.illegal)&&(X.illegal=R(...X.illegal))}function Oe(X,he){if(X.match){if(X.begin||X.end)throw new Error("begin & end are not supported with match");X.begin=X.match,delete X.match}}function we(X,he){X.relevance===void 0&&(X.relevance=1)}const ke=(X,he)=>{if(!X.beforeMatch)return;if(X.starts)throw new Error("beforeMatch cannot be used with starts");const Le=Object.assign({},X);Object.keys(X).forEach(Ze=>{delete X[Ze]}),X.keywords=Le.keywords,X.begin=S(Le.beforeMatch,b(Le.begin)),X.starts={relevance:0,contains:[Object.assign(Le,{endsParent:!0})]},X.relevance=0,delete Le.beforeMatch},De=["of","and","for","in","not","or","if","then","parent","list","value"],Me="keyword";function je(X,he,Le=Me){const Ze=Object.create(null);return typeof X=="string"?St(Le,X.split(" ")):Array.isArray(X)?St(Le,X):Object.keys(X).forEach(function(at){Object.assign(Ze,je(X[at],he,at))}),Ze;function St(at,qe){he&&(qe=qe.map(Ee=>Ee.toLowerCase())),qe.forEach(function(Ee){const Ue=Ee.split("|");Ze[Ue[0]]=[at,He(Ue[0],Ue[1])]})}}function He(X,he){return he?Number(he):be(X)?0:1}function be(X){return De.includes(X.toLowerCase())}const Re={},ee=X=>{console.error(X)},ce=(X,...he)=>{console.log(`WARN: ${X}`,...he)},J=(X,he)=>{Re[`${X}/${he}`]||(console.log(`Deprecated as of ${X}. ${he}`),Re[`${X}/${he}`]=!0)},re=new Error;function xe(X,he,{key:Le}){let Ze=0;const St=X[Le],at={},qe={};for(let Ee=1;Ee<=he.length;Ee++)qe[Ee+Ze]=St[Ee],at[Ee+Ze]=!0,Ze+=T(he[Ee-1]);X[Le]=qe,X[Le]._emit=at,X[Le]._multi=!0}function $e(X){if(Array.isArray(X.begin)){if(X.skip||X.excludeBegin||X.returnBegin)throw ee("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),re;if(typeof X.beginScope!="object"||X.beginScope===null)throw ee("beginScope must be object"),re;xe(X,X.begin,{key:"beginScope"}),X.begin=L(X.begin,{joinWith:""})}}function Xe(X){if(Array.isArray(X.end)){if(X.skip||X.excludeEnd||X.returnEnd)throw ee("skip, excludeEnd, returnEnd not compatible with endScope: {}"),re;if(typeof X.endScope!="object"||X.endScope===null)throw ee("endScope must be object"),re;xe(X,X.end,{key:"endScope"}),X.end=L(X.end,{joinWith:""})}}function Ye(X){X.scope&&typeof X.scope=="object"&&X.scope!==null&&(X.beginScope=X.scope,delete X.scope)}function ht(X){Ye(X),typeof X.beginScope=="string"&&(X.beginScope={_wrap:X.beginScope}),typeof X.endScope=="string"&&(X.endScope={_wrap:X.endScope}),$e(X),Xe(X)}function Qe(X){function he(qe,Ee){return new RegExp(m(qe),"m"+(X.case_insensitive?"i":"")+(X.unicodeRegex?"u":"")+(Ee?"g":""))}class Le{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ee,Ue){Ue.position=this.position++,this.matchIndexes[this.matchAt]=Ue,this.regexes.push([Ue,Ee]),this.matchAt+=T(Ee)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ee=this.regexes.map(Ue=>Ue[1]);this.matcherRe=he(L(Ee,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ee){this.matcherRe.lastIndex=this.lastIndex;const Ue=this.matcherRe.exec(Ee);if(!Ue)return null;const ze=Ue.findIndex((Ie,ut)=>ut>0&&Ie!==void 0),Ne=this.matchIndexes[ze];return Ue.splice(0,ze),Object.assign(Ue,Ne)}}class Ze{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ee){if(this.multiRegexes[Ee])return this.multiRegexes[Ee];const Ue=new Le;return this.rules.slice(Ee).forEach(([ze,Ne])=>Ue.addRule(ze,Ne)),Ue.compile(),this.multiRegexes[Ee]=Ue,Ue}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ee,Ue){this.rules.push([Ee,Ue]),Ue.type==="begin"&&this.count++}exec(Ee){const Ue=this.getMatcher(this.regexIndex);Ue.lastIndex=this.lastIndex;let ze=Ue.exec(Ee);if(this.resumingScanAtSamePosition()&&!(ze&&ze.index===this.lastIndex)){const Ne=this.getMatcher(0);Ne.lastIndex=this.lastIndex+1,ze=Ne.exec(Ee)}return ze&&(this.regexIndex+=ze.position+1,this.regexIndex===this.count&&this.considerAll()),ze}}function St(qe){const Ee=new Ze;return qe.contains.forEach(Ue=>Ee.addRule(Ue.begin,{rule:Ue,type:"begin"})),qe.terminatorEnd&&Ee.addRule(qe.terminatorEnd,{type:"end"}),qe.illegal&&Ee.addRule(qe.illegal,{type:"illegal"}),Ee}function at(qe,Ee){const Ue=qe;if(qe.isCompiled)return Ue;[oe,Oe,ht,ke].forEach(Ne=>Ne(qe,Ee)),X.compilerExtensions.forEach(Ne=>Ne(qe,Ee)),qe.__beforeBegin=null,[ye,Se,we].forEach(Ne=>Ne(qe,Ee)),qe.isCompiled=!0;let ze=null;return typeof qe.keywords=="object"&&qe.keywords.$pattern&&(qe.keywords=Object.assign({},qe.keywords),ze=qe.keywords.$pattern,delete qe.keywords.$pattern),ze=ze||/\w+/,qe.keywords&&(qe.keywords=je(qe.keywords,X.case_insensitive)),Ue.keywordPatternRe=he(ze,!0),Ee&&(qe.begin||(qe.begin=/\B|\b/),Ue.beginRe=he(Ue.begin),!qe.end&&!qe.endsWithParent&&(qe.end=/\B|\b/),qe.end&&(Ue.endRe=he(Ue.end)),Ue.terminatorEnd=m(Ue.end)||"",qe.endsWithParent&&Ee.terminatorEnd&&(Ue.terminatorEnd+=(qe.end?"|":"")+Ee.terminatorEnd)),qe.illegal&&(Ue.illegalRe=he(qe.illegal)),qe.contains||(qe.contains=[]),qe.contains=[].concat(...qe.contains.map(function(Ne){return kt(Ne==="self"?qe:Ne)})),qe.contains.forEach(function(Ne){at(Ne,Ue)}),qe.starts&&at(qe.starts,Ee),Ue.matcher=St(Ue),Ue}if(X.compilerExtensions||(X.compilerExtensions=[]),X.contains&&X.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return X.classNameAliases=r(X.classNameAliases||{}),at(X)}function yt(X){return X?X.endsWithParent||yt(X.starts):!1}function kt(X){return X.variants&&!X.cachedVariants&&(X.cachedVariants=X.variants.map(function(he){return r(X,{variants:null},he)})),X.cachedVariants?X.cachedVariants:yt(X)?r(X,{starts:X.starts?r(X.starts):null}):Object.isFrozen(X)?r(X):X}var nt="11.11.1";class Tt extends Error{constructor(he,Le){super(he),this.name="HTMLInjectionError",this.html=Le}}const _t=n,st=r,vt=Symbol("nomatch"),Dt=7,Pt=function(X){const he=Object.create(null),Le=Object.create(null),Ze=[];let St=!0;const at="Could not find the language '{}', did you forget to load/include a language module?",qe={disableAutodetect:!0,name:"Plain text",contains:[]};let Ee={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function Ue(Pe){return Ee.noHighlightRe.test(Pe)}function ze(Pe){let ot=Pe.className+" ";ot+=Pe.parentNode?Pe.parentNode.className:"";const jt=Ee.languageDetectRe.exec(ot);if(jt){const rn=hr(jt[1]);return rn||(ce(at.replace("{}",jt[1])),ce("Falling back to no-highlight mode for this block.",Pe)),rn?jt[1]:"no-highlight"}return ot.split(/\s+/).find(rn=>Ue(rn)||hr(rn))}function Ne(Pe,ot,jt){let rn="",Mn="";typeof ot=="object"?(rn=Pe,jt=ot.ignoreIllegals,Mn=ot.language):(J("10.7.0","highlight(lang, code, ...args) has been deprecated."),J("10.7.0",`Please use highlight(code, options) instead.
|
|
40
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Mn=Pe,rn=ot),jt===void 0&&(jt=!0);const rr={code:rn,language:Mn};To("before:highlight",rr);const Pr=rr.result?rr.result:Ie(rr.language,rr.code,jt);return Pr.code=rr.code,To("after:highlight",Pr),Pr}function Ie(Pe,ot,jt,rn){const Mn=Object.create(null);function rr(Ve,rt){return Ve.keywords[rt]}function Pr(){if(!bt.keywords){Pn.addText(sn);return}let Ve=0;bt.keywordPatternRe.lastIndex=0;let rt=bt.keywordPatternRe.exec(sn),Ct="";for(;rt;){Ct+=sn.substring(Ve,rt.index);const qt=Xn.case_insensitive?rt[0].toLowerCase():rt[0],Cn=rr(bt,qt);if(Cn){const[Qr,Hl]=Cn;if(Pn.addText(Ct),Ct="",Mn[qt]=(Mn[qt]||0)+1,Mn[qt]<=Dt&&(Ms+=Hl),Qr.startsWith("_"))Ct+=rt[0];else{const hf=Xn.classNameAliases[Qr]||Qr;$r(rt[0],hf)}}else Ct+=rt[0];Ve=bt.keywordPatternRe.lastIndex,rt=bt.keywordPatternRe.exec(sn)}Ct+=sn.substring(Ve),Pn.addText(Ct)}function kr(){if(sn==="")return;let Ve=null;if(typeof bt.subLanguage=="string"){if(!he[bt.subLanguage]){Pn.addText(sn);return}Ve=Ie(bt.subLanguage,sn,!0,pf[bt.subLanguage]),pf[bt.subLanguage]=Ve._top}else Ve=Be(sn,bt.subLanguage.length?bt.subLanguage:null);bt.relevance>0&&(Ms+=Ve.relevance),Pn.__addSublanguage(Ve._emitter,Ve.language)}function yn(){bt.subLanguage!=null?kr():Pr(),sn=""}function $r(Ve,rt){Ve!==""&&(Pn.startScope(rt),Pn.addText(Ve),Pn.endScope())}function ff(Ve,rt){let Ct=1;const qt=rt.length-1;for(;Ct<=qt;){if(!Ve._emit[Ct]){Ct++;continue}const Cn=Xn.classNameAliases[Ve[Ct]]||Ve[Ct],Qr=rt[Ct];Cn?$r(Qr,Cn):(sn=Qr,Pr(),sn=""),Ct++}}function ya(Ve,rt){return Ve.scope&&typeof Ve.scope=="string"&&Pn.openNode(Xn.classNameAliases[Ve.scope]||Ve.scope),Ve.beginScope&&(Ve.beginScope._wrap?($r(sn,Xn.classNameAliases[Ve.beginScope._wrap]||Ve.beginScope._wrap),sn=""):Ve.beginScope._multi&&(ff(Ve.beginScope,rt),sn="")),bt=Object.create(Ve,{parent:{value:bt}}),bt}function Fl(Ve,rt,Ct){let qt=C(Ve.endRe,Ct);if(qt){if(Ve["on:end"]){const Cn=new t(Ve);Ve["on:end"](rt,Cn),Cn.isMatchIgnored&&(qt=!1)}if(qt){for(;Ve.endsParent&&Ve.parent;)Ve=Ve.parent;return Ve}}if(Ve.endsWithParent)return Fl(Ve.parent,rt,Ct)}function va(Ve){return bt.matcher.regexIndex===0?(sn+=Ve[0],1):(Is=!0,0)}function Qh(Ve){const rt=Ve[0],Ct=Ve.rule,qt=new t(Ct),Cn=[Ct.__beforeBegin,Ct["on:begin"]];for(const Qr of Cn)if(Qr&&(Qr(Ve,qt),qt.isMatchIgnored))return va(rt);return Ct.skip?sn+=rt:(Ct.excludeBegin&&(sn+=rt),yn(),!Ct.returnBegin&&!Ct.excludeBegin&&(sn=rt)),ya(Ct,Ve),Ct.returnBegin?0:rt.length}function Sr(Ve){const rt=Ve[0],Ct=ot.substring(Ve.index),qt=Fl(bt,Ve,Ct);if(!qt)return vt;const Cn=bt;bt.endScope&&bt.endScope._wrap?(yn(),$r(rt,bt.endScope._wrap)):bt.endScope&&bt.endScope._multi?(yn(),ff(bt.endScope,Ve)):Cn.skip?sn+=rt:(Cn.returnEnd||Cn.excludeEnd||(sn+=rt),yn(),Cn.excludeEnd&&(sn=rt));do bt.scope&&Pn.closeNode(),!bt.skip&&!bt.subLanguage&&(Ms+=bt.relevance),bt=bt.parent;while(bt!==qt.parent);return qt.starts&&ya(qt.starts,Ve),Cn.returnEnd?0:rt.length}function Ul(){const Ve=[];for(let rt=bt;rt!==Xn;rt=rt.parent)rt.scope&&Ve.unshift(rt.scope);Ve.forEach(rt=>Pn.openNode(rt))}let Ro={};function xa(Ve,rt){const Ct=rt&&rt[0];if(sn+=Ve,Ct==null)return yn(),0;if(Ro.type==="begin"&&rt.type==="end"&&Ro.index===rt.index&&Ct===""){if(sn+=ot.slice(rt.index,rt.index+1),!St){const qt=new Error(`0 width match regex (${Pe})`);throw qt.languageName=Pe,qt.badRule=Ro.rule,qt}return 1}if(Ro=rt,rt.type==="begin")return Qh(rt);if(rt.type==="illegal"&&!jt){const qt=new Error('Illegal lexeme "'+Ct+'" for mode "'+(bt.scope||"<unnamed>")+'"');throw qt.mode=bt,qt}else if(rt.type==="end"){const qt=Sr(rt);if(qt!==vt)return qt}if(rt.type==="illegal"&&Ct==="")return sn+=`
|
|
41
|
+
`,1;if(ql>1e5&&ql>rt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return sn+=Ct,Ct.length}const Xn=hr(Pe);if(!Xn)throw ee(at.replace("{}",Pe)),new Error('Unknown language: "'+Pe+'"');const df=Qe(Xn);let ka="",bt=rn||df;const pf={},Pn=new Ee.__emitter(Ee);Ul();let sn="",Ms=0,Qi=0,ql=0,Is=!1;try{if(Xn.__emitTokens)Xn.__emitTokens(ot,Pn);else{for(bt.matcher.considerAll();;){ql++,Is?Is=!1:bt.matcher.considerAll(),bt.matcher.lastIndex=Qi;const Ve=bt.matcher.exec(ot);if(!Ve)break;const rt=ot.substring(Qi,Ve.index),Ct=xa(rt,Ve);Qi=Ve.index+Ct}xa(ot.substring(Qi))}return Pn.finalize(),ka=Pn.toHTML(),{language:Pe,value:ka,relevance:Ms,illegal:!1,_emitter:Pn,_top:bt}}catch(Ve){if(Ve.message&&Ve.message.includes("Illegal"))return{language:Pe,value:_t(ot),illegal:!0,relevance:0,_illegalBy:{message:Ve.message,index:Qi,context:ot.slice(Qi-100,Qi+100),mode:Ve.mode,resultSoFar:ka},_emitter:Pn};if(St)return{language:Pe,value:_t(ot),illegal:!1,relevance:0,errorRaised:Ve,_emitter:Pn,_top:bt};throw Ve}}function ut(Pe){const ot={value:_t(Pe),illegal:!1,relevance:0,_top:qe,_emitter:new Ee.__emitter(Ee)};return ot._emitter.addText(Pe),ot}function Be(Pe,ot){ot=ot||Ee.languages||Object.keys(he);const jt=ut(Pe),rn=ot.filter(hr).filter(As).map(yn=>Ie(yn,Pe,!1));rn.unshift(jt);const Mn=rn.sort((yn,$r)=>{if(yn.relevance!==$r.relevance)return $r.relevance-yn.relevance;if(yn.language&&$r.language){if(hr(yn.language).supersetOf===$r.language)return 1;if(hr($r.language).supersetOf===yn.language)return-1}return 0}),[rr,Pr]=Mn,kr=rr;return kr.secondBest=Pr,kr}function Rt(Pe,ot,jt){const rn=ot&&Le[ot]||jt;Pe.classList.add("hljs"),Pe.classList.add(`language-${rn}`)}function wt(Pe){let ot=null;const jt=ze(Pe);if(Ue(jt))return;if(To("before:highlightElement",{el:Pe,language:jt}),Pe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Pe);return}if(Pe.children.length>0&&(Ee.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Pe)),Ee.throwUnescapedHTML))throw new Tt("One of your code blocks includes unescaped HTML.",Pe.innerHTML);ot=Pe;const rn=ot.textContent,Mn=jt?Ne(rn,{language:jt,ignoreIllegals:!0}):Be(rn);Pe.innerHTML=Mn.value,Pe.dataset.highlighted="yes",Rt(Pe,jt,Mn.language),Pe.result={language:Mn.language,re:Mn.relevance,relevance:Mn.relevance},Mn.secondBest&&(Pe.secondBest={language:Mn.secondBest.language,relevance:Mn.secondBest.relevance}),To("after:highlightElement",{el:Pe,result:Mn,text:rn})}function $t(Pe){Ee=st(Ee,Pe)}const Rn=()=>{Sn(),J("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Lr(){Sn(),J("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let zr=!1;function Sn(){function Pe(){Sn()}if(document.readyState==="loading"){zr||window.addEventListener("DOMContentLoaded",Pe,!1),zr=!0;return}document.querySelectorAll(Ee.cssSelector).forEach(wt)}function ba(Pe,ot){let jt=null;try{jt=ot(X)}catch(rn){if(ee("Language definition for '{}' could not be registered.".replace("{}",Pe)),St)ee(rn);else throw rn;jt=qe}jt.name||(jt.name=Pe),he[Pe]=jt,jt.rawDefinition=ot.bind(null,X),jt.aliases&&Xi(jt.aliases,{languageName:Pe})}function Yi(Pe){delete he[Pe];for(const ot of Object.keys(Le))Le[ot]===Pe&&delete Le[ot]}function Eo(){return Object.keys(he)}function hr(Pe){return Pe=(Pe||"").toLowerCase(),he[Pe]||he[Le[Pe]]}function Xi(Pe,{languageName:ot}){typeof Pe=="string"&&(Pe=[Pe]),Pe.forEach(jt=>{Le[jt.toLowerCase()]=ot})}function As(Pe){const ot=hr(Pe);return ot&&!ot.disableAutodetect}function Os(Pe){Pe["before:highlightBlock"]&&!Pe["before:highlightElement"]&&(Pe["before:highlightElement"]=ot=>{Pe["before:highlightBlock"](Object.assign({block:ot.el},ot))}),Pe["after:highlightBlock"]&&!Pe["after:highlightElement"]&&(Pe["after:highlightElement"]=ot=>{Pe["after:highlightBlock"](Object.assign({block:ot.el},ot))})}function zn(Pe){Os(Pe),Ze.push(Pe)}function cf(Pe){const ot=Ze.indexOf(Pe);ot!==-1&&Ze.splice(ot,1)}function To(Pe,ot){const jt=Pe;Ze.forEach(function(rn){rn[jt]&&rn[jt](ot)})}function Zi(Pe){return J("10.7.0","highlightBlock will be removed entirely in v12.0"),J("10.7.0","Please use highlightElement now."),wt(Pe)}Object.assign(X,{highlight:Ne,highlightAuto:Be,highlightAll:Sn,highlightElement:wt,highlightBlock:Zi,configure:$t,initHighlighting:Rn,initHighlightingOnLoad:Lr,registerLanguage:ba,unregisterLanguage:Yi,listLanguages:Eo,getLanguage:hr,registerAliases:Xi,autoDetection:As,inherit:st,addPlugin:zn,removePlugin:cf}),X.debugMode=function(){St=!1},X.safeMode=function(){St=!0},X.versionString=nt,X.regex={concat:S,lookahead:b,either:R,optional:k,anyNumberOfTimes:y};for(const Pe in ge)typeof ge[Pe]=="object"&&e(ge[Pe]);return Object.assign(X,ge),X},At=Pt({});return At.newInstance=()=>Pt({}),cy=At,At.HighlightJS=At,At.default=At,cy}var GQ=HQ();const VQ=Bc(GQ),ZR={},WQ="hljs-";function KQ(e){const t=VQ.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(d,f,h){const m=h||ZR,b=typeof m.prefix=="string"?m.prefix:WQ;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:YQ,classPrefix:b});const y=t.highlight(f,{ignoreIllegals:!0,language:d});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const k=y._emitter.root,S=k.data;return S.language=y.language,S.relevance=y.relevance,k}function r(d,f){const m=(f||ZR).subset||s();let b=-1,y=0,k;for(;++b<m.length;){const S=m[b];if(!t.getLanguage(S))continue;const E=n(S,d,f);E.data&&E.data.relevance!==void 0&&E.data.relevance>y&&(y=E.data.relevance,k=E)}return k||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(d,f){if(typeof d=="string")t.registerLanguage(d,f);else{let h;for(h in d)Object.hasOwn(d,h)&&t.registerLanguage(h,d[h])}}function l(d,f){if(typeof d=="string")t.registerAliases(typeof f=="string"?f:[...f],{languageName:d});else{let h;for(h in d)if(Object.hasOwn(d,h)){const m=d[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(d){return!!t.getLanguage(d)}}class YQ{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],s=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):r.children.push(...s)}openNode(t){const n=this,r=t.split(".").map(function(l,c){return c?l+"_".repeat(c):n.options.classPrefix+l}),s=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};s.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const XQ={};function ZQ(e){const t=e||XQ,n=t.aliases,r=t.detect||!1,s=t.languages||qQ,a=t.plainText,l=t.prefix,c=t.subset;let d="hljs";const f=KQ(s);if(n&&f.registerAlias(n),l){const h=l.indexOf("-");d=h===-1?l:l.slice(0,h)}return function(h,m){Xh(h,"element",function(b,y,k){if(b.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const S=QQ(b);if(S===!1||!S&&!r||S&&a&&a.includes(S))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(d)||b.properties.className.unshift(d);const E=gZ(b,{whitespace:"pre"});let R;try{R=S?f.highlight(S,E,{prefix:l}):f.highlightAuto(E,{prefix:l,subset:c})}catch(T){const C=T;if(S&&/Unknown language/.test(C.message)){m.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[k,b],cause:C,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw C}!S&&R.data&&R.data.language&&b.properties.className.push("language-"+R.data.language),R.children.length>0&&(b.children=R.children)})}}function QQ(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!r&&s.slice(0,5)==="lang-"&&(r=s.slice(5)),!r&&s.slice(0,9)==="language-"&&(r=s.slice(9))}return r}function QR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function JQ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eJ(e,t,n){const s=of((n||{}).ignore||[]),a=tJ(t);let l=-1;for(;++l<a.length;)LI(e,"text",c);function c(f,h){let m=-1,b;for(;++m<h.length;){const y=h[m],k=b?b.children:void 0;if(s(y,k?k.indexOf(y):void 0,b))return;b=y}if(b)return d(f,h)}function d(f,h){const m=h[h.length-1],b=a[l][0],y=a[l][1];let k=0;const E=m.children.indexOf(f);let R=!1,T=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const _=C.index,L={index:C.index,input:C.input,stack:[...h,f]};let N=y(...C,L);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?b.lastIndex=_+1:(k!==_&&T.push({type:"text",value:f.value.slice(k,_)}),Array.isArray(N)?T.push(...N):N&&T.push(N),k=_+C[0].length,R=!0),!b.global)break;C=b.exec(f.value)}return R?(k<f.value.length&&T.push({type:"text",value:f.value.slice(k)}),m.children.splice(E,1,...T)):T=[f],E+T.length}}function tJ(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([nJ(s[0]),rJ(s[1])])}return t}function nJ(e){return typeof e=="string"?new RegExp(JQ(e),"g"):e}function rJ(e){return typeof e=="function"?e:function(){return e}}const fy="phrasing",dy=["autolink","link","image","label"];function iJ(){return{transforms:[fJ],enter:{literalAutolink:oJ,literalAutolinkEmail:py,literalAutolinkHttp:py,literalAutolinkWww:py},exit:{literalAutolink:cJ,literalAutolinkEmail:uJ,literalAutolinkHttp:aJ,literalAutolinkWww:lJ}}}function sJ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:dy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fy,notInConstruct:dy},{character:":",before:"[ps]",after:"\\/",inConstruct:fy,notInConstruct:dy}]}}function oJ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function py(e){this.config.enter.autolinkProtocol.call(this,e)}function aJ(e){this.config.exit.autolinkProtocol.call(this,e)}function lJ(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function uJ(e){this.config.exit.autolinkEmail.call(this,e)}function cJ(e){this.exit(e)}function fJ(e){eJ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,dJ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),pJ]],{ignore:["link","linkReference"]})}function dJ(e,t,n,r,s){let a="";if(!sD(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!hJ(n)))return!1;const l=mJ(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function pJ(e,t,n,r){return!sD(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function hJ(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function mJ(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=QR(e,"(");let a=QR(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function sD(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||la(n)||Vh(n))&&(!t||n!==47)}oD.peek=EJ;function gJ(){this.buffer()}function bJ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yJ(){this.buffer()}function vJ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function xJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=wi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kJ(e){this.exit(e)}function SJ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=wi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wJ(e){this.exit(e)}function EJ(){return"["}function oD(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=s.move("]"),a}function TJ(){return{enter:{gfmFootnoteCallString:gJ,gfmFootnoteCall:bJ,gfmFootnoteDefinitionLabelString:yJ,gfmFootnoteDefinition:vJ},exit:{gfmFootnoteCallString:xJ,gfmFootnoteCall:kJ,gfmFootnoteDefinitionLabelString:SJ,gfmFootnoteDefinition:wJ}}}function RJ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:oD},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let d=c.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),h(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
42
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?aD:CJ))),f(),d}}function CJ(e,t,n){return t===0?e:aD(e,t,n)}function aD(e,t,n){return(n?"":" ")+e}const _J=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];lD.peek=IJ;function NJ(){return{canContainEols:["delete"],enter:{strikethrough:OJ},exit:{strikethrough:MJ}}}function AJ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_J}],handlers:{delete:lD}}}function OJ(e){this.enter({type:"delete",children:[]},e)}function MJ(e){this.exit(e)}function lD(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),a(),l}function IJ(){return"~"}function DJ(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||LJ,s=[],a=[],l=[],c=[];let d=0,f=-1;for(;++f<e.length;){const k=[],S=[];let E=-1;for(e[f].length>d&&(d=e[f].length);++E<e[f].length;){const R=jJ(e[f][E]);if(t.alignDelimiters!==!1){const T=r(R);S[E]=T,(c[E]===void 0||T>c[E])&&(c[E]=T)}k.push(R)}a[f]=k,l[f]=S}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<d;)s[h]=JR(n[h]);else{const k=JR(n);for(;++h<d;)s[h]=k}h=-1;const m=[],b=[];for(;++h<d;){const k=s[h];let S="",E="";k===99?(S=":",E=":"):k===108?S=":":k===114&&(E=":");let R=t.alignDelimiters===!1?1:Math.max(1,c[h]-S.length-E.length);const T=S+"-".repeat(R)+E;t.alignDelimiters!==!1&&(R=S.length+R+E.length,R>c[h]&&(c[h]=R),b[h]=R),m[h]=T}a.splice(1,0,m),l.splice(1,0,b),f=-1;const y=[];for(;++f<a.length;){const k=a[f],S=l[f];h=-1;const E=[];for(;++h<d;){const R=k[h]||"";let T="",C="";if(t.alignDelimiters!==!1){const _=c[h]-(S[h]||0),L=s[h];L===114?T=" ".repeat(_):L===99?_%2?(T=" ".repeat(_/2+.5),C=" ".repeat(_/2-.5)):(T=" ".repeat(_/2),C=T):C=" ".repeat(_)}t.delimiterStart!==!1&&!h&&E.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&R==="")&&(t.delimiterStart!==!1||h)&&E.push(" "),t.alignDelimiters!==!1&&E.push(T),E.push(R),t.alignDelimiters!==!1&&E.push(C),t.padding!==!1&&E.push(" "),(t.delimiterEnd!==!1||h!==d-1)&&E.push("|")}y.push(t.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return y.join(`
|
|
43
|
+
`)}function jJ(e){return e==null?"":String(e)}function LJ(e){return e.length}function JR(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function zJ(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),PJ);return s(),l}function PJ(e,t,n){return">"+(n?"":" ")+e}function $J(e,t){return eC(e,t.inConstruct,!0)&&!eC(e,t.notInConstruct,!1)}function eC(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function tC(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
44
|
+
`&&$J(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
45
|
+
`}function BJ(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>l&&(l=a):a=1,s=r+t.length,r=n.indexOf(t,s);return l}function FJ(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function UJ(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function qJ(e,t,n,r){const s=UJ(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(FJ(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,HJ);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(BJ(a,s)+1,3)),f=n.enter("codeFenced");let h=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${l}`);h+=c.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,{before:h,after:`
|
|
46
|
+
`,encode:["`"],...c.current()})),m()}return h+=c.move(`
|
|
47
|
+
`),a&&(h+=c.move(a+`
|
|
48
|
+
`)),h+=c.move(d),f(),h}function HJ(e,t,n){return(n?"":" ")+e}function yk(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function GJ(e,t,n,r){const s=yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
49
|
+
`,...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),c()),l(),f}function VJ(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Pc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function th(e,t,n){const r=Nl(e),s=Nl(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}uD.peek=WJ;function uD(e,t,n,r){const s=VJ(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=d.charCodeAt(0),h=th(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Pc(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=th(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Pc(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+d+y}function WJ(e,t,n){return n.options.emphasis||"*"}function KJ(e,t){let n=!1;return Xh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,hv}),!!((!e.depth||e.depth<3)&&lk(e)&&(t.options.setext||n))}function YJ(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(KJ(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,{...a.current(),before:`
|
|
50
|
+
`,after:`
|
|
51
|
+
`});return m(),h(),b+`
|
|
52
|
+
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
53
|
+
`))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
54
|
+
`,...a.current()});return/^[\t ]/.test(f)&&(f=Pc(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),c(),f}cD.peek=XJ;function cD(e){return e.value||""}function XJ(){return"<"}fD.peek=ZJ;function fD(e,t,n,r){const s=yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),c()),f+=d.move(")"),l(),f}function ZJ(){return"!"}dD.peek=QJ;function dD(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function QJ(){return"!"}pD.peek=JJ;function pD(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let d;if(l.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function JJ(){return"`"}function hD(e,t){const n=lk(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}mD.peek=eee;function mD(e,t,n,r){const s=yk(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(hD(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=h,m}c=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${a}`),f+=l.move(" "+s),f+=l.move(n.safe(e.title,{before:f,after:s,...l.current()})),f+=l.move(s),d()),f+=l.move(")"),c(),f}function eee(e,t,n){return hD(e,n)?"<":"["}gD.peek=tee;function gD(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function tee(){return"["}function vk(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nee(e){const t=vk(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ree(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function bD(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function iee(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?ree(n):vk(n);const c=e.ordered?l==="."?")":".":nee(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),bD(n)===l&&h){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=c),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),f}function see(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function oee(e,t,n,r){const s=see(n);let a=n.bulletCurrent||vk(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),h);return d(),f;function h(m,b,y){return b?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function aee(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const lee=of(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uee(e,t,n,r){return(e.children.some(function(l){return lee(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function cee(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}yD.peek=fee;function yD(e,t,n,r){const s=cee(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const f=d.charCodeAt(0),h=th(r.before.charCodeAt(r.before.length-1),f,s);h.inside&&(d=Pc(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=th(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Pc(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+d+y}function fee(e,t,n){return n.options.strong||"*"}function dee(e,t,n,r){return n.safe(e.value,r)}function pee(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function hee(e,t,n){const r=(bD(n)+(n.options.ruleSpaces?" ":"")).repeat(pee(n));return n.options.ruleSpaces?r.slice(0,-1):r}const vD={blockquote:zJ,break:tC,code:qJ,definition:GJ,emphasis:uD,hardBreak:tC,heading:YJ,html:cD,image:fD,imageReference:dD,inlineCode:pD,link:mD,linkReference:gD,list:iee,listItem:oee,paragraph:aee,root:uee,strong:yD,text:dee,thematicBreak:hee};function mee(){return{enter:{table:gee,tableData:nC,tableHeader:nC,tableRow:yee},exit:{codeText:vee,table:bee,tableData:hy,tableHeader:hy,tableRow:hy}}}function gee(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function bee(e){this.exit(e),this.data.inTable=void 0}function yee(e){this.enter({type:"tableRow",children:[]},e)}function hy(e){this.exit(e)}function nC(e){this.enter({type:"tableCell",children:[]},e)}function vee(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,xee));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function xee(e,t){return t==="|"?t:e}function kee(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
55
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:d,tableRow:c}};function l(y,k,S,E){return f(h(y,S,E),y.align)}function c(y,k,S,E){const R=m(y,S,E),T=f([R]);return T.slice(0,T.indexOf(`
|
|
56
|
+
`))}function d(y,k,S,E){const R=S.enter("tableCell"),T=S.enter("phrasing"),C=S.containerPhrasing(y,{...E,before:a,after:a});return T(),R(),C}function f(y,k){return DJ(y,{align:k,alignDelimiters:r,padding:n,stringLength:s})}function h(y,k,S){const E=y.children;let R=-1;const T=[],C=k.enter("table");for(;++R<E.length;)T[R]=m(E[R],k,S);return C(),T}function m(y,k,S){const E=y.children;let R=-1;const T=[],C=k.enter("tableRow");for(;++R<E.length;)T[R]=d(E[R],y,k,S);return C(),T}function b(y,k,S){let E=vD.inlineCode(y,k,S);return S.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function See(){return{exit:{taskListCheckValueChecked:rC,taskListCheckValueUnchecked:rC,paragraph:Eee}}}function wee(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Tee}}}function rC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Eee(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,l;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Tee(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let d=vD.listItem(e,t,n,{...r,...c.current()});return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function Ree(){return[iJ(),TJ(),NJ(),mee(),See()]}function Cee(e){return{extensions:[sJ(),RJ(e),AJ(),kee(e),wee()]}}const _ee={tokenize:Dee,partial:!0},xD={tokenize:jee,partial:!0},kD={tokenize:Lee,partial:!0},SD={tokenize:zee,partial:!0},Nee={tokenize:Pee,partial:!0},wD={name:"wwwAutolink",tokenize:Mee,previous:TD},ED={name:"protocolAutolink",tokenize:Iee,previous:RD},Ns={name:"emailAutolink",tokenize:Oee,previous:CD},Ki={};function Aee(){return{text:Ki}}let Go=48;for(;Go<123;)Ki[Go]=Ns,Go++,Go===58?Go=65:Go===91&&(Go=97);Ki[43]=Ns;Ki[45]=Ns;Ki[46]=Ns;Ki[95]=Ns;Ki[72]=[Ns,ED];Ki[104]=[Ns,ED];Ki[87]=[Ns,wD];Ki[119]=[Ns,wD];function Oee(e,t,n){const r=this;let s,a;return l;function l(m){return!vv(m)||!CD.call(r,r.previous)||xk(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return vv(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(Nee,h,f)(m):m===45||m===95||ur(m)?(a=!0,e.consume(m),d):h(m)}function f(m){return e.consume(m),s=!0,d}function h(m){return a&&s&&vr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function Mee(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!TD.call(r,r.previous)||xk(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_ee,e.attempt(xD,e.attempt(kD,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Iee(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&RD.call(r,r.previous)&&!xk(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(vr(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||Xp(m)||bn(m)||la(m)||Vh(m)?n(m):e.attempt(xD,e.attempt(kD,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Dee(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function jee(e,t,n){let r,s,a;return l;function l(f){return f===46||f===95?e.check(SD,d,c)(f):f===null||bn(f)||la(f)||f!==45&&Vh(f)?d(f):(a=!0,e.consume(f),l)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),l}function d(f){return s||r||!a?n(f):t(f)}}function Lee(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(SD,t,a)(l):l===null||bn(l)||la(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function zee(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||bn(c)||la(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||bn(c)||la(c)?t(c):r(c)}function a(c){return vr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):vr(c)?(e.consume(c),l):n(c)}}function Pee(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return ur(a)?n(a):t(a)}}function TD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||bn(e)}function RD(e){return!vr(e)}function CD(e){return!(e===47||vv(e))}function vv(e){return e===43||e===45||e===46||e===95||ur(e)}function xk(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const $ee={tokenize:Wee,partial:!0};function Bee(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Hee,continuation:{tokenize:Gee},exit:Vee}},text:{91:{name:"gfmFootnoteCall",tokenize:qee},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Fee,resolveTo:Uee}}}}function Fee(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const f=wi(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function Uee(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function qee(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!l||m===null||m===91||bn(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(wi(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return bn(m)||(l=!0),a++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function Hee(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(k)}function h(k){if(l>999||k===93&&!c||k===null||k===91||bn(k))return n(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=wi(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return bn(k)||(c=!0),l++,e.consume(k),k===92?m:h}function m(k){return k===91||k===92||k===93?(e.consume(k),l++,h):h(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(a)||s.push(a),Zt(e,y,"gfmFootnoteDefinitionWhitespace")):n(k)}function y(k){return t(k)}}function Gee(e,t,n){return e.check(sf,t,e.attempt($ee,t,n))}function Vee(e){e.exit("gfmFootnoteDefinition")}function Wee(e,t,n){const r=this;return Zt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function Kee(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,c){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},m={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},b=[["enter",h,c],["enter",l[f][1],c],["exit",l[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Zr(b,b.length,0,Wh(y,l.slice(f+1,d),c)),Zr(b,b.length,0,[["exit",m,c],["enter",l[d][1],c],["exit",l[d][1],c],["exit",h,c]]),Zr(l,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function a(l,c,d){const f=this.previous,h=this.events;let m=0;return b;function b(k){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(k):(l.enter("strikethroughSequenceTemporary"),y(k))}function y(k){const S=Nl(f);if(k===126)return m>1?d(k):(l.consume(k),m++,y);if(m<2&&!n)return d(k);const E=l.exit("strikethroughSequenceTemporary"),R=Nl(k);return E._open=!R||R===2&&!!S,E._close=!S||S===2&&!!R,c(k)}}}class Yee{constructor(){this.map=[]}add(t,n,r){Xee(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function Xee(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function Zee(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Qee(){return{flow:{null:{name:"table",tokenize:Jee,resolveAll:ete}}}}function Jee(e,t,n){const r=this;let s=0,a=0,l;return c;function c(I){let Y=r.events.length-1;for(;Y>-1;){const D=r.events[Y][1].type;if(D==="lineEnding"||D==="linePrefix")Y--;else break}const H=Y>-1?r.events[Y][1].type:null,q=H==="tableHead"||H==="tableRow"?N:d;return q===N&&r.parser.lazy[r.now().line]?n(I):q(I)}function d(I){return e.enter("tableHead"),e.enter("tableRow"),f(I)}function f(I){return I===124||(l=!0,a+=1),h(I)}function h(I){return I===null?n(I):mt(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),y):n(I):Ut(I)?Zt(e,h,"whitespace")(I):(a+=1,l&&(l=!1,s+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(I)))}function m(I){return I===null||I===124||bn(I)?(e.exit("data"),h(I)):(e.consume(I),I===92?b:m)}function b(I){return I===92||I===124?(e.consume(I),m):m(I)}function y(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),l=!1,Ut(I)?Zt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):k(I))}function k(I){return I===45||I===58?E(I):I===124?(l=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),S):L(I)}function S(I){return Ut(I)?Zt(e,E,"whitespace")(I):E(I)}function E(I){return I===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),R):I===45?(a+=1,R(I)):I===null||mt(I)?_(I):L(I)}function R(I){return I===45?(e.enter("tableDelimiterFiller"),T(I)):L(I)}function T(I){return I===45?(e.consume(I),T):I===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(I))}function C(I){return Ut(I)?Zt(e,_,"whitespace")(I):_(I)}function _(I){return I===124?k(I):I===null||mt(I)?!l||s!==a?L(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):L(I)}function L(I){return n(I)}function N(I){return e.enter("tableRow"),A(I)}function A(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),A):I===null||mt(I)?(e.exit("tableRow"),t(I)):Ut(I)?Zt(e,A,"whitespace")(I):(e.enter("data"),$(I))}function $(I){return I===null||I===124||bn(I)?(e.exit("data"),A(I)):(e.consume(I),I===92?z:$)}function z(I){return I===92||I===124?(e.consume(I),$):$(I)}}function ete(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,f,h,m;const b=new Yee;for(;++n<e.length;){const y=e[n],k=y[1];y[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(iC(b,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",f,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",h,t]])),s=k.type==="tableDelimiterRow"?2:h?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=ep(b,t,a,s,void 0,m),a=[0,0,0,0]),l[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],m=ep(b,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,a[1]!==0?(l[0]=l[1],m=ep(b,t,a,s,n,m)):l[1]!==0&&(m=ep(b,t,l,s,n,m)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&iC(b,t,d,f,h),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Zee(t.events,n))}return e}function ep(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},al(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=al(t.events,n[1]);if(a={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=al(t.events,n[2]),h=al(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,S=n[3]-n[2]-1;e.add(k,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},al(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function iC(e,t,n,r,s){const a=[],l=al(t.events,n);s&&(s.end=Object.assign({},l),a.push(["exit",s,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function al(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const tte={name:"tasklistCheck",tokenize:rte};function nte(){return{text:{91:tte}}}function rte(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return bn(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return mt(d)?t(d):Ut(d)?e.check({tokenize:ite},t,n)(d):n(d)}}function ite(e,t,n){return Zt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function ste(e){return bI([Aee(),Bee(),Kee(e),Qee(),nte()])}const ote={};function ate(e){const t=this,n=e||ote,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(ste(n)),a.push(Ree()),l.push(Cee(n))}function lte(e){return g.jsx("div",{className:"md-table-wrap",children:g.jsx("table",{...e})})}function _D(e){return g.jsx("span",{className:"md-cell",children:e})}function ute({children:e,...t}){return g.jsx("th",{...t,children:_D(e)})}function cte({children:e,...t}){return g.jsx("td",{...t,children:_D(e)})}function xv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(xv).join(""):v.isValidElement(e)?xv(e.props.children):""}function fte({children:e,...t}){const[n,r]=v.useState(!1),s=v.useRef(void 0),a=v.useCallback(()=>{navigator.clipboard.writeText(xv(e)),r(!0),clearTimeout(s.current),s.current=setTimeout(()=>r(!1),2e3)},[e]);return g.jsxs("div",{className:"md-pre-wrap",children:[g.jsx("pre",{...t,children:e}),g.jsx("span",{className:"md-copy",children:g.jsx(dr,{icon:n?"check":"copy",size:"sm",variant:"ghost","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const dte={table:lte,th:ute,td:cte,pre:fte,a:aa},Al=v.memo(function({text:t,className:n}){return g.jsx("div",{className:n?`md ${n}`:"md",children:g.jsx(sZ,{remarkPlugins:[ate],rehypePlugins:[[ZQ,{detect:!1}]],components:dte,children:t??""})})});function pte(e){switch(e){case"done":return{name:"check-circle",color:"secondary"};case"error":return{name:"x-circle",color:"red"};case"awaiting":return{name:"clock",color:"yellow"};case"orphan":return{name:"slash-circle",color:"tertiary"};default:return{name:"spinner",color:"blue",modifier:"spin"}}}function lf(e){const[t,n]=v.useState(()=>Date.now()),r=e.status==="running"||e.status==="awaiting";v.useEffect(()=>{if(!r||e.endedAt!=null)return;const a=setInterval(()=>n(Date.now()),250);return()=>clearInterval(a)},[r,e.endedAt]);const s=e.endedAt??(r?t:e.startedAt??t);return e.startedAt!=null?Math.max(0,s-e.startedAt):null}function ga({status:e}){const t=pte(e);return g.jsx(Yt,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function hte({callId:e}){return g.jsxs("div",{className:"approval-bar",children:[g.jsx("span",{children:"Awaiting human approval"}),g.jsx(ln,{variant:"secondary",tone:"success",size:"sm",onClick:()=>{tt.submitApproval(e,"approve")},children:"Approve"}),g.jsx(ln,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{tt.submitApproval(e,"deny")},children:"Deny"})]})}function mte({callId:e,authUrl:t,connection:n}){return g.jsxs("div",{className:"approval-bar",children:[g.jsxs("span",{children:["Connect ",n]}),g.jsx(ln,{variant:"secondary",tone:"success",size:"sm",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),children:"Connect"}),g.jsx(ln,{variant:"secondary",size:"sm",onClick:()=>{tt.submitAuth(e,"approve")},children:"Connected"}),g.jsx(ln,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{tt.submitAuth(e,"deny")},children:"Cancel"})]})}function uf({item:e}){return e.status!=="awaiting"?null:e.gate!=="auth"?g.jsx(hte,{callId:e.callId}):e.authUrl===void 0||e.connection===void 0?null:g.jsx(mte,{callId:e.callId,authUrl:e.authUrl,connection:e.connection})}function kk(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function bl(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const ND=new Map;for(const[e,t]of Object.entries(gV)){if(t?.default==null)continue;const n=typeof t.toolName=="string"&&t.toolName.trim()!==""?t.toolName.trim():void 0,r=e.split("/").pop()?.replace(/\.(tsx|ts)$/,""),s=n??r;s&&ND.set(s,t.default)}function gte(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function sC(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e;if("stdout"in t||"stderr"in t||"exitCode"in t)return t}return null}function bte(e){const t=sC(e.outputRaw);if(t)return t;if(e.output)try{return sC(JSON.parse(e.output))}catch{}return null}function oC(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const yte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=lf(t),a=gte(t.args),l=bte(t),c=oC(l?.stdout??""),d=oC(l?.stderr??""),f=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&f?"error":t.status,m=[a?Kr(a,80):"shell"];return f&&m.push(`exit ${l?.exitCode}`),m.push(gi(s)),g.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[g.jsxs(hi,{action:"shell",details:m.join(" · "),leadingIcon:g.jsx(ga,{status:h}),open:n,onOpenChange:b=>r(b),tabularNums:!0,children:[a?g.jsx("pre",{className:"shell-cmd",children:a}):null,c?g.jsx("pre",{className:"shell-std",children:c}):null,d?g.jsx("pre",{className:"shell-std shell-err",children:d}):null,!c&&!d?g.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),g.jsx(uf,{item:t})]})}),vte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=lf(t),a=bl(kk(t.args),"path"),l=xte(t),c=[a?q7(a,80):"read",gi(s)];return g.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[g.jsxs(hi,{action:"read",details:c.join(" · "),leadingIcon:g.jsx(ga,{status:t.status}),open:n,onOpenChange:d=>r(d),tabularNums:!0,children:[a?g.jsx("pre",{className:"tool-primary",children:a}):null,l!=null?l?g.jsx("pre",{className:"tool-body",children:l}):g.jsx("div",{className:"tool-empty",children:"(empty file)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(uf,{item:t})]})});function xte(e){const t=aC(e.outputRaw);if(t!=null)return t;if(e.output)try{return aC(JSON.parse(e.output))}catch{}return null}function aC(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e.content;if(typeof t=="string")return t}if(typeof e=="string")try{const t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t)){const n=t.content;if(typeof n=="string")return n}}catch{return e}return null}const kte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=lf(t),a=kk(t.args),l=bl(a,"glob_pattern","globPattern"),c=bl(a,"target_directory","targetDirectory"),d=Ste(t),f=[l?Kr(l,80):"glob",gi(s)];return g.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[g.jsxs(hi,{action:"glob",details:f.join(" · "),leadingIcon:g.jsx(ga,{status:t.status}),open:n,onOpenChange:h=>r(h),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,c?g.jsx("pre",{className:"tool-meta",children:c}):null,d!=null?d.length>0?g.jsx("pre",{className:"tool-body",children:d.join(`
|
|
57
|
+
`)}):g.jsx("div",{className:"tool-empty",children:"(no matches)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(uf,{item:t})]})});function Ste(e){const t=lC(e.outputRaw);if(t!=null)return t;if(e.output)try{return lC(JSON.parse(e.output))}catch{}return null}function lC(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t.files;return Array.isArray(n)?n.filter(r=>typeof r=="string"):null}const wte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=lf(t),a=kk(t.args),l=bl(a,"pattern"),c=bl(a,"path"),d=bl(a,"glob"),f=[l?Kr(l,80):"grep",gi(s)],h=[c,d?`glob ${d}`:""].filter(Boolean).join(`
|
|
58
|
+
`);return g.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[g.jsxs(hi,{action:"grep",details:f.join(" · "),leadingIcon:g.jsx(ga,{status:t.status}),open:n,onOpenChange:m=>r(m),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,h?g.jsx("pre",{className:"tool-meta",children:h}):null,g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(uf,{item:t})]})}),Ete=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(hi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Al,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(hi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Al,{text:t,className:"body"})})})}),Tte=v.memo(function({child:t}){if(t.kind==="assistant")return g.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:g.jsx(Al,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return g.jsx(Ete,{text:t.text,open:t.open});const n=t.args==null?"":Hn(t.args,80),r=t.status==="running"?"running…":t.status==="error"?"error":t.status==="done"?"done":t.status;return g.jsxs("div",{className:`pg-subagent-tool ${t.status}`,children:[g.jsxs("div",{className:"pg-subagent-tool-head",children:[g.jsx(ga,{status:t.status}),g.jsx("span",{className:"pg-subagent-tool-name",children:t.name}),n?g.jsx("span",{className:"pg-subagent-tool-args",children:n}):null,g.jsx("span",{className:"pg-subagent-tool-status",children:r})]}),t.output?g.jsx("pre",{className:"pg-subagent-tool-out",children:t.output}):null]})});function Rte(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r!==void 0&&r.kind==="tool")return r.status==="running"?`Running ${r.name}`:r.status==="error"?`Failed ${r.name}`:`Ran ${r.name}`}return e.status==="running"?"Generating":e.status==="error"?"Error":"Completed"}const Cte=v.memo(function({item:t}){const n=t.children??[],r=n.length>0,[s,a]=v.useState(t.status==="running"),l=t.name.replace(/^subagent:/,"")||"subagent",c=typeof t.args=="string"?t.args:t.args==null?"":Hn(t.args,100),d=t.status==="running",f=c?Kr(c,120):l;return g.jsxs("div",{className:`pg-tool pg-subagent-card ${t.status}`,children:[g.jsxs("button",{type:"button",className:"pg-subagent-head","aria-expanded":s,onClick:()=>a(h=>!h),children:[g.jsx("span",{className:"pg-subagent-status",children:g.jsx(ga,{status:t.status})}),g.jsxs("span",{className:"pg-subagent-titles",children:[g.jsx("span",{className:d?"pg-subagent-title shimmer":"pg-subagent-title",children:f}),g.jsxs("span",{className:"pg-subagent-subtitle",children:[Rte(t,n)," · ",l]})]}),g.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:g.jsx(Yt,{name:"chevron-right",size:10})})]}),g.jsx("div",{className:s?"pg-subagent-clip":"pg-subagent-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:g.jsx("div",{className:"pg-subagent-body",children:r?n.map(h=>g.jsx(Tte,{child:h},h.id)):g.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})});function _te(e){if(e==null)return"";if(typeof e=="string")return Kr(e,80);if(typeof e=="object"&&!Array.isArray(e)){const t=Object.entries(e);if(t.length===1){const n=t[0]?.[1];if(typeof n=="string"&&n!=="")return Kr(n,80)}}return Hn(e,120)}const Nte=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=lf(t),a=_te(t.args),l=gi(s);return g.jsxs("div",{className:`pg-tool ${t.status}`,children:[g.jsx(hi,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:g.jsx(ga,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:g.jsx("div",{className:"out",children:t.output??"running…"})}),g.jsx(uf,{item:t})]})}),Ate={shell:e=>g.jsx(yte,{item:e}),read:e=>g.jsx(vte,{item:e}),glob:e=>g.jsx(kte,{item:e}),grep:e=>g.jsx(wte,{item:e})};function Ote(e){return e.name.startsWith("subagent:")}const Mte=v.memo(function({item:t}){if(Ote(t))return g.jsx(Cte,{item:t});const n=ND.get(t.name);if(n)return g.jsx(n,{item:t});const r=Ate[t.name];return r?r(t):g.jsx(Nte,{item:t})}),uC=120,Ite=v.memo(function({text:t}){const[n,r]=v.useState(!1),[s,a]=v.useState(!1),l=v.useRef(null);v.useLayoutEffect(()=>{const h=l.current;if(!h)return;const m=()=>{a(h.scrollHeight>uC)};m();const b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[t]);const c=s&&!n,d=()=>{s&&r(h=>!h)},f=h=>{s&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),d())};return g.jsx("div",{className:"msg user",children:g.jsx("div",{ref:l,className:c?"bubble furled":s?"bubble expandable":"bubble",style:c?{maxHeight:uC}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?n:void 0,"aria-label":s?n?"Collapse message":"Expand message":void 0,onClick:s?d:void 0,onKeyDown:s?f:void 0,children:t})})}),Dte=v.memo(function({text:t,streaming:n}){return g.jsx("div",{className:"msg assistant",children:g.jsx(Al,{text:t,className:n?"bubble streaming":"bubble"})})}),jte=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-reasoning",children:g.jsx(hi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Al,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-reasoning",children:g.jsx(hi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Al,{text:t,className:"body"})})})}),Lte=v.memo(function({text:t,fail:n,url:r}){return g.jsxs("div",{className:n?"divider fail":"divider",children:[t,r?g.jsxs(g.Fragment,{children:[" · ",g.jsx(aa,{href:r,children:r})]}):null]})});function bc(e){switch(e.kind){case"user":return g.jsx(Ite,{text:e.text},e.id);case"assistant":return g.jsx(Dte,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return g.jsx(jte,{text:e.text,open:e.open},e.id);case"tool":return g.jsx(Mte,{item:e},e.id);case"divider":return g.jsx(Lte,{text:e.text,fail:e.fail,url:e.url},e.id);case"artifact":return g.jsx(sV,{artifactKind:e.artifactKind,title:e.title,url:e.url,artifactId:e.artifactId,data:e.data},e.id);case"turn-end":return null;default:return null}}function cC(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function zte({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=v.useState(void 0),c=a??s,d=[];(r.inTokens!==void 0||r.outTokens!==void 0)&&d.push(`${Kp(r.inTokens)} in · ${Kp(r.outTokens)} out tokens`),r.costUsd!==void 0&&d.push(Uh(r.costUsd));const f=d.length>0?d.join(" · "):void 0;return g.jsxs(g.Fragment,{children:[e.length>0?g.jsx("div",{className:"pg-turn-group",title:f,children:g.jsx(hi,{action:"Worked",details:r.ms!==null?`for ${Jx(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:g.jsx("div",{className:"pg-turn-group-content",children:e.map(bc)})})}):null,t.map(bc),n?bc(n):null]})}function Pte({startMs:e}){const[t,n]=v.useState(()=>Date.now());return v.useEffect(()=>{const r=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(r)},[]),g.jsx("div",{className:"pg-turn-group",children:g.jsx(hi,{action:"Working",details:`for ${Jx(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function $te(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(bc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(bc(l));break;case"turn-end":{const c=s[s.length-1],d=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,f=d===null?s:s.slice(0,-1),h=f.filter(b=>!cC(b)),m=f.filter(cC);r.push(g.jsx(zte,{steps:h,cards:m,final:d,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(g.jsx(Pte,{startMs:t},"working")),a(),r}function AD(){const e=Ke(h=>h.transcript),t=Ke(h=>h.current),n=Ke(h=>h.localTrace),r=Ke(h=>h.running),s=Ke(h=>h.turnStartedAt),a=e.length===0&&t===null&&!n,l=v.useMemo(()=>e.map(h=>{switch(h.kind){case"user":case"assistant":case"reasoning":return`${h.id}:${h.text.length}`;case"tool":return`${h.id}:${h.status}:${h.output?.length??0}`;case"divider":return`${h.id}:${h.text}`;case"artifact":case"turn-end":return h.id;default:return h}}).join("|"),[e]),c=e.findLast(h=>h.kind==="user")?.id??"",d=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:f}=QM({contentKey:l,latchKey:d});return g.jsx("div",{ref:f,className:a?"pg-transcript is-empty":"pg-transcript",children:a?g.jsx(ws,{body:"Start a session to talk to your agent. Type below or pick a session, then use the Trace tab for a timeline with tool timings."}):$te(e,r?s:null)})}const fC=["accent","blue","magenta","orange","purple"];function OD(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return fC[t%fC.length]}function dC(e,t,n){if(e.length===0)return 0;if(t<=0)return e.length;let r=1,s=0;for(const a of e){const l=s===0?a:s+n+a;l>t&&s>0?(r+=1,s=a):s=l}return r}function Bte(e){const{availableWidth:t,itemWidths:n,gap:r,triggerWidth:s,maxLines:a=2}=e,l=n.length;if(l===0)return 0;if(dC(n,t,r)<=a)return l;for(let c=l-1;c>=0;c-=1){const d=[...n.slice(0,c),s];if(dC(d,t,r)<=a)return c}return 0}const Fte="Send a message below to start a new HTTP session. Use the Trace tab for a timeline with tool timings.",Ute="This agent is stopped. Pick a session from the Runs tab to inspect its chat and trace.",pC="... More";function qte({cases:e,disabled:t}){const n=v.useRef(null),r=v.useRef(null),s=v.useRef(null),a=e.map(m=>m.id).join("|"),[l,c]=v.useState({key:a,visibleCount:Number.POSITIVE_INFINITY});l.key!==a&&c({key:a,visibleCount:Number.POSITIVE_INFINITY}),v.useLayoutEffect(()=>{const m=n.current;if(!m||e.length===0)return;if(s.current?.key!==a){const S=Array.from(m.querySelectorAll(":scope > [data-measure]"));if(S.length!==e.length)return;const E=getComputedStyle(m);s.current={key:a,widths:S.map(R=>R.offsetWidth),gap:parseFloat(E.gap)||0,triggerWidth:r.current?.offsetWidth??0}}const b=()=>{const S=s.current;if(!S)return;const E=Bte({availableWidth:m.clientWidth,itemWidths:S.widths,gap:S.gap,triggerWidth:S.triggerWidth});c(R=>R.visibleCount===E?R:{...R,visibleCount:E})};b();let y;const k=new ResizeObserver(()=>{y!==void 0&&cancelAnimationFrame(y),y=requestAnimationFrame(()=>{y=void 0,b()})});return k.observe(m),()=>{k.disconnect(),y!==void 0&&cancelAnimationFrame(y)}},[e.length,a]);const d=Math.min(l.visibleCount,e.length),f=e.slice(0,d),h=e.slice(d);return g.jsxs("div",{ref:n,className:"pg-panel-empty__evals",children:[f.map(m=>g.jsx("button",{type:"button",className:"pg-panel-empty__eval","data-measure":"",title:m.description||`Run ${m.id}`,disabled:t,onClick:()=>{tt.startEvalRun([m.id])},children:m.id},m.id)),g.jsx("button",{ref:r,type:"button",className:"pg-panel-empty__eval pg-panel-empty__eval-more-measure",tabIndex:-1,"aria-hidden":"true",children:pC}),h.length>0?g.jsxs(Xr,{placement:"bottom",children:[g.jsx(Xr.Trigger,{disabled:t,children:g.jsx("button",{type:"button",className:"pg-panel-empty__eval",disabled:t,"aria-label":`Show ${h.length} more evaluations`,children:pC})}),g.jsx(Xr.Content,{"aria-label":"More evaluations",size:"sm",children:h.map(m=>g.jsx(Xr.Item,{disabled:t,onSelect:()=>{tt.startEvalRun([m.id])},children:m.id},m.id))})]}):null]})}function Hte(){const e=Ke(d=>d.meta),t=Ke(d=>d.info),n=Ke(d=>d.evalCases),r=Ke(d=>d.evalRun?.status==="running"),s=e.name||t?.name||"Agent",a=e.readonly===!0,l=OD(s),c=a?Ute:t?.description||Fte;return g.jsxs("div",{className:"pg-panel-empty",children:[g.jsx("div",{className:"pg-panel-empty__avatar","data-color":l,"aria-hidden":"true",children:g.jsx(Yt,{name:"robot",variant:"filled",size:24,color:l})}),g.jsx("div",{className:"pg-panel-empty__name",children:s}),g.jsx("p",{className:"pg-panel-empty__description",children:c}),n.length>0&&!a?g.jsx(qte,{cases:n,disabled:r}):null]})}const my={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},wrap:{kwnvtZ:"ui-1a02dak",$$css:!0},underline:{k1xSpc:"ui-78zum5",kVAEAm:"ui-1n2onr6",kGNEyG:"ui-1qjc9v5",kzqmXN:"ui-h8yej3",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0}},Gte={sm:{kOIVth:"ui-137clkk",$$css:!0},md:{kOIVth:"ui-pkkfsy",$$css:!0}},hC={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",khDVqt:"ui-uxw1ft",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1i4c3av",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr ui-1szrgyu",kFalU9:"ui-ggy1nq",kOIVth:"ui-11twubx",kMnn75:"ui-krqix3",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},default:{kWkggS:"ui-jbqb8w ui-q24i1q ui-x05fgs",$$css:!0},filter:{kaIpWk:"ui-1e1y6u3",kAzted:"ui-4jlmx6",kMwMTN:"ui-19aaqeu ui-1t93vz6 ui-t6ogrd",kWkggS:"ui-jbqb8w ui-1834tr1 ui-d9g367",k63SB2:"ui-1yl5bsf",$$css:!0},underline:{kaIpWk:"ui-2u8bby",kWkggS:"ui-jbqb8w",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",$$css:!0}},Vte={sm:{kLKAdn:"ui-493x5y",kpe85a:"ui-17v7654",kGO01o:"ui-b6dno7",kE3dHu:"ui-1lfpczk",$$css:!0},md:{kLKAdn:"ui-1gv78wz",kpe85a:"ui-1yxiud8",kGO01o:"ui-1cea8gx",kE3dHu:"ui-yab65l",$$css:!0},lg:{kLKAdn:"ui-1to6kjf",kpe85a:"ui-16b7oty",kGO01o:"ui-5wifs",kE3dHu:"ui-o7x2bt",$$css:!0}},MD=v.createContext(null);function ID(e){const t=v.use(MD);if(t===null)throw new Error(`${e} must be used within Tabs.Root`);return t}function Wte({value:e,defaultValue:t,onValueChange:n,size:r="md",variant:s="default",children:a,...l}){const c=v.useMemo(()=>({size:r,variant:s}),[r,s]);return g.jsx(MD.Provider,{value:c,children:g.jsx(BO,{...l,value:e,defaultValue:t,onValueChange:n,"data-component":"tabs-root","data-size":r,"data-variant":s,className:"ui-jp7ctv",children:a})})}function Kte({activateOnFocus:e,spacing:t,wrap:n=!1,children:r,...s}){const a=ID("Tabs.List"),l=t??(a.variant==="filter"?"md":"sm"),c=n&&a.variant!=="underline";return g.jsxs(VO,{...s,activateOnFocus:e,"data-component":"tabs-list","data-variant":a.variant,"data-wrap":c?"true":void 0,...Lt(my.base,a.variant==="underline"&&my.underline,Gte[l],c&&my.wrap),children:[r,a.variant==="underline"?g.jsx(GO,{"data-component":"tabs-underline-indicator",className:"ui-10l6tqk ui-1vjfegm ui-47corl ui-9f619 ui-vbikie ui-offw1 ui-jm9jq1 ui-qmqy1e ui-mak4db ui-1ym43eq ui-1bqoo3p ui-sagj69 ui-1tkypeg"}):null]})}function Yte({value:e,secondaryLabel:t,href:n,children:r,...s}){const a=ID("Tabs.Item");return g.jsxs(qO,{...s,value:e,render:n===void 0?void 0:l=>g.jsx("a",{...l,href:n}),nativeButton:n===void 0,"data-component":"tabs-item","data-size":a.size,"data-variant":a.variant,...Lt(hC.base,a.size==="sm"?Gi.root:Fi.root,Vte[a.size],hC[a.variant],a.variant==="filter"&&gN.root),children:[r,t!=null?g.jsx("span",{className:"ui-2lah0s ui-4b2ntj",children:t}):null]})}const gy={Root:Wte,List:Kte,Item:Yte};function Xte(e,t){if(t===null)return!0;switch(e){case"abs":return(t.abs?.length??0)>0;case"artifacts":return t.artifacts!==void 0;default:return!0}}function DD(e,t,n){return e.filter(r=>r.value===n||Xte(r.value,t))}const mC=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"abs",label:"A/Bs"},{value:"artifacts",label:"Artifacts"}],gC=new Set(["evals","abs"]);function Sk(e){return e==="overview"?"chat":e}function Zte({size:e="lg"}){const t=Ke(l=>l.view),n=Ke(l=>l.evalNavReturn),r=Ke(l=>l.info),s=n||gC.has(t)?mC:mC.filter(l=>!gC.has(l.value)),a=DD(s,r,t);return g.jsx(gy.Root,{value:Sk(t),onValueChange:l=>tt.setView(l),size:e,children:g.jsx(gy.List,{"aria-label":"Visualization mode",wrap:!0,children:a.map(l=>g.jsx(gy.Item,{value:l.value,children:l.label},l.value))})})}function jD(){const e=Ke(s=>s.view),t=Ke(s=>s.current),n=Ke(s=>s.transcript.length===0),r=t===null&&n;return g.jsxs(g.Fragment,{children:[Sk(e)==="chat"?g.jsxs(g.Fragment,{children:[r?g.jsx(Hte,{}):g.jsx(AD,{}),g.jsx(GM,{})]}):null,e==="trace"?g.jsx(nI,{}):null,e==="raw"?g.jsx(JM,{}):null,e==="evals"?g.jsx(YM,{}):null,e==="abs"?g.jsx(PM,{}):null,e==="artifacts"?g.jsx(HM,{}):null]})}function Qte({className:e,labeled:t=!1}){const n=Ke(r=>r.authToken);return g.jsxs("div",{className:e,children:[t?g.jsx("label",{className:"pg-auth-token-label",htmlFor:"pg-auth-token",children:"Bearer token"}):null,g.jsx(Qc,{id:t?"pg-auth-token":void 0,type:"password",size:"base","aria-label":"Bearer token",placeholder:t?"Optional":"Bearer token (optional)",value:n,onChange:r=>tt.setAuthToken(r.target.value),title:"Sent as Authorization: Bearer ... on API calls"})]})}function Jte(){return Ke(t=>t.aliasHosted)?null:g.jsxs(Xr,{placement:"bottom-end",children:[g.jsx(Xr.Trigger,{children:g.jsx(dr,{icon:"dots-3-horizontal",size:"lg","aria-label":"More actions"})}),g.jsx(Xr.Content,{"aria-label":"More actions",className:"pg-detail-more",size:"sm",width:240,footer:g.jsx(Qte,{className:"pg-detail-more__token",labeled:!0}),children:null})]})}function LD({variant:e}){const t=Ke(l=>l.barTitle),n=Ke(l=>l.barId),r=Ke(l=>l.current),s=e==="panel",a=n||t;return g.jsxs("div",{className:s?"pg-detail__head pg-detail__head--panel":"pg-detail__head",children:[g.jsxs("div",{className:"pg-detail__head-start",children:[s?null:g.jsx(dr,{icon:"arrow-left",size:"lg","aria-label":"Back to overview",onClick:()=>tt.backToOverview()}),r!==null||n?g.jsx("div",{className:"pg-detail__session",title:a,children:g.jsx("span",{className:"pg-detail__session-id",children:a})}):null]}),g.jsx(Zte,{}),g.jsxs("div",{className:"pg-detail__head-end",children:[g.jsx(Jte,{}),s?g.jsx(dr,{icon:"x",size:"lg","aria-label":"Close chat panel",onClick:()=>tt.setChatPanelOpen(!1)}):null]})]})}function ene(){return g.jsxs("div",{className:"pg-detail",children:[g.jsx(LD,{variant:"page"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(jD,{})})]})}const tne="agent-serve.playground.try.";function zD(e,t){return`${tne}${e}:${t}`}function bC(e,t){try{const n=localStorage.getItem(zD(e,t));if(n===null)return null;const r=JSON.parse(n);if(typeof r!="object"||r===null||Array.isArray(r))return null;const s=r,a={};return typeof s.body=="string"&&(a.body=s.body),typeof s.query=="string"&&(a.query=s.query),a}catch{return null}}function nne(e,t,n){try{localStorage.setItem(zD(e,t),JSON.stringify(n))}catch{}}function yC(e){if(e===void 0)return"{}";const t=e.properties;if(e.type!=="object"||t===void 0)return"{}";const n={};for(const[r,s]of Object.entries(t)){const a=s.type;a==="string"?n[r]="":a==="number"||a==="integer"?n[r]=0:a==="boolean"?n[r]=!1:a==="array"?n[r]=[]:a==="object"?n[r]={}:n[r]=null}return JSON.stringify(n,null,2)}function vC({label:e,schema:t}){if(t===void 0)return g.jsxs("div",{className:"pg-try-schema-missing",children:["No ",e," schema on this route — body is free-form JSON."]});const n=t.properties,r=new Set(Array.isArray(t.required)?t.required.filter(s=>typeof s=="string"):[]);return n===void 0||Object.keys(n).length===0?g.jsxs("details",{className:"pg-try-schema",children:[g.jsxs("summary",{children:[e," schema"]}),g.jsx("pre",{children:JSON.stringify(t,null,2)})]}):g.jsxs("details",{className:"pg-try-schema",open:!0,children:[g.jsxs("summary",{children:[e," schema"]}),g.jsx("ul",{children:Object.entries(n).map(([s,a])=>{const l=typeof a.type=="string"?a.type:"any",c=typeof a.description=="string"?a.description:null;return g.jsxs("li",{children:[g.jsx("code",{children:s}),r.has(s)?g.jsx("span",{className:"req",children:" required"}):g.jsx("span",{className:"opt",children:" optional"}),g.jsxs("span",{className:"type",children:[" · ",l]}),c?g.jsx("div",{className:"desc",children:c}):null]},s)})})]})}function PD(e,t){const n=e.trim();if(n==="")return{ok:!0,value:{}};try{const r=JSON.parse(n);return typeof r!="object"||r===null||Array.isArray(r)?{ok:!1,error:`${t} must be a JSON object`}:{ok:!0,value:r}}catch(r){return{ok:!1,error:`${t}: ${r instanceof Error?r.message:String(r)}`}}}function tp(e){return`'${e.replace(/'/g,"'\\''")}'`}function rne(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",tp(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",tp("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",tp(r))}return t.push(tp(e.absoluteUrl)),t.join(" ")}function ine(e,t,n){let r=tt.api.url(e);if(n){const s=PD(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,d]of Object.entries(s.value)){if(d==null)continue;const f=typeof d=="string"?d:String(d);f!==""&&a.set(c,f)}const l=a.toString();l!==""&&(r=`${r}?${l}`)}try{return{ok:!0,url:new URL(r,window.location.origin).toString()}}catch(s){return{ok:!1,error:`URL: ${s instanceof Error?s.message:String(s)}`}}}function $D({channelId:e,route:t,onClose:n}){const r=t.method.toUpperCase(),s=r!=="GET"&&r!=="HEAD",a=t.querySchema!==void 0||r==="GET"||r==="HEAD",l=Ke(A=>A.authToken),[c,d]=v.useState(()=>{const A=bC(r,t.url);return A?.query!==void 0&&A.query.trim()!==""?A.query:yC(t.querySchema)}),[f,h]=v.useState(()=>{const A=bC(r,t.url);return A?.body!==void 0&&A.body.trim()!==""?A.body:yC(t.bodySchema)}),[m,b]=v.useState(!1),[y,k]=v.useState(!1),[S,E]=v.useState(null),[R,T]=v.useState(null);v.useEffect(()=>{const A=$=>{$.key==="Escape"&&n()};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[n]);const C=A=>{const $={};s&&($.body=A.body??f),a&&($.query=A.query??c),nne(r,t.url,$)},_=()=>{C({body:f,query:c}),n()},L=async()=>{if(E(null),k(!1),s&&f.trim()!=="")try{JSON.parse(f)}catch(z){E(`Body: ${z instanceof Error?z.message:String(z)}`);return}const A=ine(t.url,c,a);if(!A.ok){E(A.error);return}const $=rne({method:r,absoluteUrl:A.url,token:l,hasBody:s,bodyText:f});try{await navigator.clipboard.writeText($),k(!0),tt.toast("Copied curl to clipboard"),window.setTimeout(()=>k(!1),1500)}catch(z){E(`Copy failed: ${z instanceof Error?z.message:String(z)}`)}},N=async()=>{E(null),T(null);let A;if(a){const z=PD(c,"Query");if(!z.ok){E(z.error);return}A={};for(const[I,Y]of Object.entries(z.value))Y!=null&&(A[I]=typeof Y=="string"?Y:String(Y))}let $;if(s){const z=f.trim();if(z==="")$={};else try{$=JSON.parse(z)}catch(I){E(`Body: ${I instanceof Error?I.message:String(I)}`);return}}C({body:f,query:c}),b(!0);try{const z=await tt.api.channelRequest(r,t.url,{body:s?$:void 0,query:A});if(z.ok&&z.body&&await tt.openSessionFromChannelResponse(e,z.body)){n();return}T({status:z.status,body:z.body})}catch(z){E(z instanceof Error?z.message:String(z))}finally{b(!1)}};return g.jsx("div",{className:"pg-try-backdrop",role:"presentation",onClick:_,children:g.jsxs("div",{className:"pg-try-modal",role:"dialog","aria-modal":"true","aria-label":`Try ${r} ${t.url}`,onClick:A=>A.stopPropagation(),children:[g.jsxs("div",{className:"pg-try-head",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"pg-try-title",children:[g.jsx("span",{className:"pg-try-method",children:r})," ",g.jsx("code",{children:t.url})]}),g.jsxs("div",{className:"pg-try-sub",children:["channel ",g.jsx("code",{children:e}),t.description?` · ${t.description}`:null]})]}),g.jsx("button",{type:"button",className:"link-btn",onClick:_,children:"Close"})]}),g.jsxs("div",{className:"pg-try-body",children:[a?g.jsxs(g.Fragment,{children:[g.jsx(vC,{label:"Query",schema:t.querySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Query (JSON object → search params)"}),g.jsx("textarea",{value:c,onChange:A=>d(A.target.value),spellCheck:!1,rows:6})]})]}):null,s?g.jsxs(g.Fragment,{children:[g.jsx(vC,{label:"Body",schema:t.bodySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Body (JSON)"}),g.jsx("textarea",{value:f,onChange:A=>h(A.target.value),spellCheck:!1,rows:10})]})]}):null,S?g.jsx("div",{className:"pg-try-error",children:S}):null,R?g.jsxs("div",{className:"pg-try-result",children:[g.jsxs("div",{className:"pg-try-status",children:["Status ",g.jsx("code",{children:R.status})]}),g.jsx("pre",{children:JSON.stringify(R.body,null,2)})]}):null]}),g.jsxs("div",{className:"pg-try-foot",children:[g.jsx(ln,{variant:"secondary",size:"sm",onClick:()=>{L()},children:y?"Copied":"Copy curl"}),g.jsx("div",{className:"pg-try-foot-spacer"}),g.jsx(ln,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),g.jsx(ln,{variant:"primary",size:"sm",disabled:m,onClick:()=>{N()},children:m?"Sending…":"Send"})]})]})})}const BD="agent-serve.playground.drawerWidth",by=340,kv=280,Sv=720;function mp(e){return Math.min(Sv,Math.max(kv,e))}function sne(){try{const e=localStorage.getItem(BD);if(e===null)return by;const t=Number.parseInt(e,10);return Number.isFinite(t)?mp(t):by}catch{return by}}function Vo({title:e,children:t}){return g.jsxs(g.Fragment,{children:[g.jsx("h4",{children:e}),t]})}function rl({name:e,detail:t}){return g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:e}),t?g.jsx("div",{className:"d",children:t}):null]})}function one(){const e=Ke(C=>C.drawerOpen),t=Ke(C=>C.info),[n,r]=v.useState(null),[s,a]=v.useState(sne),[l,c]=v.useState(!1),d=v.useRef(s);d.current=s,v.useEffect(()=>{try{localStorage.setItem(BD,String(s))}catch{}},[s]);const f=v.useCallback(C=>{C.preventDefault();const _=C.currentTarget,L=C.clientX,N=d.current;_.setPointerCapture(C.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const A=z=>{a(mp(N+(z.clientX-L)))},$=z=>{_.releasePointerCapture(z.pointerId),_.removeEventListener("pointermove",A),_.removeEventListener("pointerup",$),_.removeEventListener("pointercancel",$),c(!1),document.body.classList.remove("pg-resizing-drawer")};_.addEventListener("pointermove",A),_.addEventListener("pointerup",$),_.addEventListener("pointercancel",$)},[]),h=t?.tools??[],m=t?.skills??[],b=t?.subagents??[],y=t?.connections??[],k=t?.channels??[],S=t?.hooks??[],E=t?.abs??[],R=v.useMemo(()=>{const C=new Map;for(const _ of qh(k))C.set(`${_.method}:${_.url}`,_.name);return C},[k]),T=t!==null&&h.length===0&&m.length===0&&b.length===0&&y.length===0&&k.length===0&&S.length===0&&E.length===0;return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:e?l?"pg-drawer open resizing":"pg-drawer open":"pg-drawer",style:{width:s},children:[g.jsx("div",{className:l?"pg-drawer-resizer dragging":"pg-drawer-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize agent surface","aria-valuenow":s,"aria-valuemin":kv,"aria-valuemax":Sv,tabIndex:0,onPointerDown:f,onKeyDown:C=>{C.key==="ArrowLeft"?(C.preventDefault(),a(_=>mp(_-16))):C.key==="ArrowRight"?(C.preventDefault(),a(_=>mp(_+16))):C.key==="Home"?(C.preventDefault(),a(kv)):C.key==="End"&&(C.preventDefault(),a(Sv))}}),g.jsxs("div",{className:"head",children:[g.jsx("span",{children:"Agent surface"}),g.jsx("button",{type:"button",className:"link-btn",onClick:()=>tt.setDrawerOpen(!1),children:"Close"})]}),g.jsxs("div",{className:"body",children:[t===null?g.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,T?g.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?g.jsx(Vo,{title:"Tools",children:h.map(C=>g.jsx(rl,{name:C.name,detail:C.description},C.name))}):null,m.length?g.jsx(Vo,{title:"Skills",children:m.map(C=>g.jsx(rl,{name:C.name,detail:C.description},C.name))}):null,b.length?g.jsx(Vo,{title:"Subagents",children:b.map(C=>g.jsx(rl,{name:C.name,detail:C.description},C.name))}):null,y.length?g.jsx(Vo,{title:"MCP Connections",children:y.map(C=>g.jsx(rl,{name:C.name,detail:C.transport},C.name))}):null,k.length?g.jsx(Vo,{title:"Channels",children:k.map(C=>g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:C.id}),(C.routes??[]).length===0?g.jsx("div",{className:"d",children:"(events only)"}):g.jsx("div",{className:"channel-routes",children:(C.routes??[]).map(_=>{const L=C.id!=="http",N=`${_.method} ${_.url}`,A=R.get(`${_.method.toUpperCase()}:${_.url}`);return L?g.jsxs("div",{className:"channel-route",children:[g.jsx("code",{children:N}),A?g.jsx("code",{className:"channel-slash",title:"Composer slash command",children:A}):null,g.jsx("button",{type:"button",className:"link-btn",onClick:()=>r({channelId:C.id,route:_}),children:"Try"})]},N):g.jsx("div",{className:"channel-route",children:g.jsx("code",{children:N})},N)})})]},C.id))}):null,S.length?g.jsx(Vo,{title:"Hooks",children:S.map(C=>g.jsx(rl,{name:C},C))}):null,E.length?g.jsx(Vo,{title:"A/Bs",children:E.map(C=>g.jsx(rl,{name:C},C))}):null]})]}),n?g.jsx($D,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}function ane(){const e=Ke(f=>f.meta.readonly===!0),[t,n]=v.useState([]),[r,s]=v.useState(null),a=v.useRef(-1),l=v.useRef(null),c=t.length,d=XM({count:c,getScrollElement:()=>l.current,estimateSize:()=>18,overscan:24});return v.useEffect(()=>{let f=!1;const h=async()=>{const b=await tt.api.logs(a.current);if(f)return;if(!b.ok||b.body===null){s(`logs failed (${b.status})`);return}s(null);const y=b.body.entries??[];y.length>0&&(a.current=b.body.nextAfter,n(k=>{const S=k.concat(y);return S.length>2e3?S.slice(S.length-2e3):S}))};if(h(),e)return()=>{f=!0};const m=window.setInterval(()=>{h()},1e3);return()=>{f=!0,window.clearInterval(m)}},[e]),v.useEffect(()=>{c>0&&d.scrollToIndex(c-1,{align:"end"})},[c,d]),r!==null&&c===0?g.jsx("div",{className:"pg-raw",children:g.jsx(ws,{body:r})}):c===0?g.jsx("div",{className:"pg-raw",children:g.jsx(ws,{body:e?"No stored logs for this stopped agent.":"Waiting for agent logs… webhook captures and session activity appear here."})}):g.jsxs("div",{className:"pg-raw",children:[g.jsx("div",{className:"head",children:"Agent logs"}),g.jsx("div",{className:"raw-lines",ref:l,children:g.jsx("div",{style:{height:d.getTotalSize(),position:"relative",width:"100%"},children:d.getVirtualItems().map(f=>{const h=t[f.index];if(h===void 0)return null;const m=h.at.slice(11,19);return g.jsxs("div",{"data-index":f.index,ref:d.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${f.start}px)`},children:[g.jsxs("span",{className:"elog-time",children:[m," "]}),g.jsx("span",{children:h.line})]},f.key)})})})]})}const wk={root:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",kMwMTN:"ui-4b2ntj",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kcqcaj:"ui-ss6m8b",$$css:!0},controls:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-ehausa",$$css:!0},status:{kMwMTN:"ui-4b2ntj",kcqcaj:"ui-ss6m8b",$$css:!0}};function lne(){return wk.root}function une(){return wk.controls}function cne(){return wk.status}function fne({currentPage:e,totalPages:t,totalItems:n,pageSize:r,onPageChange:s,isLoading:a=!1,leading:l,rootStyle:c,className:d}){const f=Math.min(Math.max(1,e),t),h=n===0?0:Math.min(n,(f-1)*r+1),m=Math.min(n,f*r),b=E=>{E<1||E>t||E===f||a||s(E)},y=Kt({rootClass:"ui-pagination-footer",stylexStyles:[lne(),c],className:["pagination-footer",d].filter(Boolean).join(" ")}),k=Kt({rootClass:"ui-pagination-footer__controls",stylexStyles:une(),className:"pagination-footer__controls"}),S=Kt({rootClass:"ui-pagination-footer__status",stylexStyles:cne(),className:"pagination-footer__status"});return g.jsxs("div",{className:y.className,style:y.style,children:[g.jsxs("div",{className:"pagination-footer__summary",children:[l,g.jsxs("span",{className:S.className,style:S.style,children:[h.toLocaleString(),"–",m.toLocaleString()," of ",n.toLocaleString()]})]}),g.jsxs("div",{className:k.className,style:k.style,children:[g.jsx(dr,{"aria-label":"Previous page",disabled:f<=1||a,icon:"chevron-left",onClick:()=>b(f-1),size:"sm",variant:"ghost"}),g.jsxs("span",{className:S.className,style:S.style,children:[f.toLocaleString()," / ",t.toLocaleString()]}),g.jsx(dr,{"aria-label":"Next page",disabled:f>=t||a,icon:"chevron-right",onClick:()=>b(f+1),size:"sm",variant:"ghost"})]})]})}const dne={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",kXwgrk:"ui-dt5ytf",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-f6zju3",kpe85a:"ui-17v7654",kGO01o:"ui-1rgtt3y",kE3dHu:"ui-1lfpczk",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1w002xl",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-1ppb01f",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-1g95lbd",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-fektcw",kaIpWk:"ui-1m7fhj7",kWkggS:"ui-f1vpex",$$css:!0}},FD={base:{k1xSpc:"ui-78zum5",k7Eaqz:"ui-euugli",kGNEyG:"ui-6s0dn4",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-1t8xvyj",kpe85a:"ui-14ndyrl",kGO01o:"ui-usxwy5",kE3dHu:"ui-1e7ydrk",kMwMTN:"ui-19aaqeu",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",kmkexE:"ui-po99wt",$$css:!0}},pne={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},hne={base:{kMwMTN:"ui-1wd3ewq",$$css:!0}},mne={base:{k1xSpc:"ui-78zum5",k7Eaqz:"ui-euugli",kGNEyG:"ui-6s0dn4",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-1t8xvyj",kpe85a:"ui-14ndyrl",kGO01o:"ui-usxwy5",kE3dHu:"ui-1e7ydrk",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-fifm61",k63SB2:"ui-20ajya",kLWn49:"ui-1d3mw78",k9WMMc:"ui-dpxx8g",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},gne={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},bne={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1qjc9v5",kOIVth:"ui-1oot3zn",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0}},yne={base:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1qjc9v5",kOIVth:"ui-1oot3zn",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",k4Z53h:"ui-gfevyv",kGzVvX:"ui-qjnua1",kSWMeD:"ui-h5l0ry",kNVotH:"ui-1487vgl",k2syFR:"ui-o4r6jd",kyZIQH:"ui-fp6kh7",$$css:!0}},vne={base:{kkrTdU:"ui-1ypdohk",$$css:!0}},xne={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kCIrl2:"ui-1qo02jc",kbCHJM:"ui-134kyd4",kZKoxP:"ui-jyxbwm",kWkggS:"ui-iw1gut",kfzvcC:"ui-47corl",k1xSpc:"ui-1vga6i0",$$css:!0}},xC={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},kne={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},Sne={base:{kMwMTN:"ui-1e4uaio",$$css:!0}},wne={base:{kMwMTN:"ui-19aaqeu",$$css:!0}},Ene={base:{kMwMTN:"ui-4b2ntj",$$css:!0}},Tne={base:{k1xSpc:"ui-78zum5",kAzted:"ui-i3av73",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",kLKAdn:"ui-t9g0qb",kpe85a:"ui-1yxiud8",kGO01o:"ui-20eq2h",kE3dHu:"ui-yab65l",k9WMMc:"ui-2b8uid",kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},Rne={base:{kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-d4r4e8",$$css:!0}},Cne={base:{kMwMTN:"ui-19aaqeu",kGuDYH:"ui-4z9k3i",k63SB2:"ui-20ajya",kLWn49:"ui-d4r4e8",$$css:!0}},_ne={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},kC={base:{k1xSpc:"ui-jp7ctv",kMwMTN:"ui-1heor9g",kybGjl:"ui-1hl2dhg",kysU6D:"ui-jyslct",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kVVagm:"ui-ln7xf2",k9WMMc:"ui-16tdsg8",kkrTdU:"ui-1ypdohk",kDPRdz:"ui-144v4sp",k67Jb4:"ui-1lku1pv",kfbEmr:"ui-17kgsl5",kxHR8W:"ui-1dmdw0h",$$css:!0}},Nne={base:{k1xSpc:"ui-1lliihq",kZKoxP:"ui-1qx5ct2",kaIpWk:"ui-1e1y6u3",kWkggS:"ui-flfp0o",kKVMdj:"ui-16iawpz",k44tkh:"ui-1c74tu6",kyAemX:"ui-w1l40g",ko0y90:"ui-a4qsjk",$$css:!0}},Ane={base:{kzqmXN:"ui-3hqpx7",$$css:!0}},One={base:{kzqmXN:"ui-1iy3nof",$$css:!0}},Mne={base:{kzqmXN:"ui-g0jo4d",$$css:!0}},Ine={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXwgrk:"ui-dt5ytf",$$css:!0}},Dne={base:{keoZOQ:"ui-1e66mq1",kLKAdn:"ui-f6zju3",kpe85a:"ui-1yxiud8",kGO01o:"ui-cnij5n",kE3dHu:"ui-yab65l",$$css:!0}},SC=[{identityClass:"automations-run-history-table__skeleton--wide",style:Mne.base},{identityClass:"automations-run-history-table__skeleton--medium",style:Ane.base},{identityClass:"automations-run-history-table__skeleton--short",style:One.base}];function jne(e){return typeof e=="number"?`${e}px`:e}function Lne(e){if(e.fixedWidth!==void 0)return{flexValue:`0 0 ${jne(e.fixedWidth)}`,minWidth:e.fixedWidth,maxWidth:e.fixedWidth};const t=e.flexWidth;return t!==void 0?{flexValue:`${t.grow??1} 1 0`,minWidth:t.minWidth,maxWidth:t.maxWidth}:{flexValue:"1 1 0",minWidth:void 0,maxWidth:void 0}}function Ek(e){const t=Lne(e),n={flex:t.flexValue};return t.minWidth!==void 0&&(n.minWidth=t.minWidth),t.maxWidth!==void 0&&(n.maxWidth=t.maxWidth),n}const Tk={identityClass:"",style:null};function UD(e){switch(e){case"right":return{identityClass:"automations-run-history-table__cell--align-right",style:pne.base};case"center":return{identityClass:"automations-run-history-table__cell--align-center",style:kne.base};default:return Tk}}function zne(e){switch(e){case"right":return{identityClass:"automations-run-history-table__header--align-right",style:gne.base};case"center":return{identityClass:"automations-run-history-table__header--align-center",style:_ne.base};default:return Tk}}function Pne(e){switch(e){case"primary":return{identityClass:"automations-run-history-table__cell--tint-primary",style:hne.base};case"secondary":return{identityClass:"automations-run-history-table__cell--tint-secondary",style:wne.base};case"tertiary":return{identityClass:"automations-run-history-table__cell--tint-tertiary",style:Ene.base};case"quaternary":return{identityClass:"automations-run-history-table__cell--tint-quaternary",style:Sne.base};default:return Tk}}function $ne(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.currentTarget.target!=="_blank"}function $c(...e){return e.filter(Boolean).join(" ")}function qD(e){return nn(Kt({rootClass:"ui-automations-run-history-table__row",stylexStyles:[yne.base,e&&vne.base],className:$c("automations-run-history-table__row",e&&"automations-run-history-table__row--linked")}).className,"ui--default-marker")}function HD(){return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__row-divider",stylexStyles:xne.base,className:"automations-run-history-table__row-divider"}).className,"data-run-history-row-divider":""})}function Bne({columns:e}){return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__header-row",stylexStyles:bne.base,className:"automations-run-history-table__header-row"}).className,children:e.map(t=>{const n=zne(t.align);return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__header",stylexStyles:[mne.base,n.style],className:$c("automations-run-history-table__header",n.identityClass)}).className,style:Ek(t),children:t.header},`header-${t.key}`)})})}function wC({row:e,column:t}){const n=UD(t.align),r=Pne(t.tintColor);return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[FD.base,n.style,r.style],className:$c("automations-run-history-table__cell",n.identityClass,r.identityClass)}).className,style:Ek(t),children:t.render(e)})}function Fne({columns:e,rowIndex:t}){const n=SC[t%SC.length];return g.jsxs("div",{className:qD(!1),"data-run-history-row":"",children:[g.jsx(HD,{}),e.map(r=>{const s=UD(r.align);return g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[FD.base,s.style],className:$c("automations-run-history-table__cell",s.identityClass)}).className,style:Ek(r),children:r.header!==""&&r.header!=null&&g.jsx("span",{className:Kt({rootClass:"ui-automations-run-history-table__skeleton",stylexStyles:[Nne.base,n.style],className:$c("automations-run-history-table__skeleton",n.identityClass)}).className})},`skeleton-${r.key}`)})]})}function GD({data:e,columns:t,isLoading:n=!1,skeletonRowCount:r=3,emptyState:s,onRowClick:a,getRowHref:l,pagination:c,ariaLabel:d="Run history"}){const{linkColumns:f,excludedColumns:h,hasExcludedColumns:m}=v.useMemo(()=>{const S=[],E=[];for(const R of t)R.excludeFromRowLink===!0?E.push(R):S.push(R);return{linkColumns:S,excludedColumns:E,hasExcludedColumns:E.length>0}},[t]),b=n&&e.length===0,y=!n&&e.length===0,k=c!==void 0&&c.totalPages>1&&!n;return g.jsxs("div",{className:Kt({rootClass:"ui-automations-run-history-table__wrapper",stylexStyles:Ine.base,className:"automations-run-history-table__wrapper"}).className,"data-vr":"all-runs",children:[g.jsxs("section",{"aria-busy":n,"aria-label":d,className:Kt({rootClass:"ui-automations-run-history-table",stylexStyles:dne.base,className:"automations-run-history-table"}).className,children:[g.jsx(Bne,{columns:t}),b?g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:xC.base,className:"automations-run-history-table__rows"}).className,children:Array.from({length:r},(S,E)=>g.jsx(Fne,{columns:t,rowIndex:E},`skeleton-row-${E.toString()}`))}):y?g.jsx("div",{"aria-live":"polite",className:Kt({rootClass:"ui-automations-run-history-table__empty",stylexStyles:Tne.base,className:"automations-run-history-table__empty"}).className,role:"status",children:s??g.jsxs(g.Fragment,{children:[g.jsx("span",{className:Kt({rootClass:"ui-automations-run-history-table__empty-title",stylexStyles:Cne.base,className:"automations-run-history-table__empty-title"}).className,children:"No Results"}),g.jsx("span",{className:Kt({rootClass:"ui-automations-run-history-table__empty-description",stylexStyles:Rne.base,className:"automations-run-history-table__empty-description"}).className,children:"Try different filters"})]})}):g.jsx("div",{className:Kt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:xC.base,className:"automations-run-history-table__rows"}).className,children:e.map(S=>{const E=l?.(S),R=E!==void 0&&E!==""&&f.length>0,T=R||a!==void 0&&f.length>0,C=()=>f.map(_=>g.jsx(wC,{column:_,row:S},`cell-${S.id}-${_.key}`));return g.jsx(v.Fragment,{children:g.jsxs("div",{className:qD(T),"data-run-history-row":"",children:[g.jsx(HD,{}),R?g.jsx("a",{className:Kt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:kC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",href:E,onClick:_=>{a!==void 0&&$ne(_)&&(_.preventDefault(),a(S))},children:C()}):a!==void 0&&f.length>0?g.jsx("button",{className:Kt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:kC.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",onClick:()=>a(S),type:"button",children:C()}):C(),m&&h.map(_=>g.jsx(wC,{column:_,row:S},`cell-${S.id}-${_.key}`))]})},S.id)})})]}),k&&c!==void 0&&g.jsx(fne,{currentPage:c.currentPage,onPageChange:c.onPageChange,pageSize:c.pageSize,rootStyle:Dne.base,totalItems:c.totalItems,totalPages:c.totalPages})]})}function Zh(e,...t){const n=e.trim().toLowerCase();return n===""?!0:t.filter(r=>r!=null&&r!=="").join(" ").toLowerCase().includes(n)}function VD({title:e,count:t,singularLabel:n,pluralLabel:r,search:s,searchPlaceholder:a,onSearchChange:l,actions:c,children:d}){const f=t===1?n:r;return g.jsxs("section",{className:"pg-list-section",children:[e!==void 0?g.jsxs("header",{className:"pg-list-section__header",children:[g.jsx("h1",{className:"pg-list-section__title",children:e}),c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]}):null,g.jsxs("div",{className:"pg-list-section__toolbar",children:[g.jsxs("p",{className:"pg-list-section__count",children:[t," ",f]}),g.jsxs("div",{className:"pg-list-section__toolbar-end",children:[g.jsx("div",{className:"pg-list-section__search",children:g.jsx(Qc,{type:"search",size:"lg",startIcon:"search",value:s,onChange:h=>l(h.target.value),placeholder:a,"aria-label":a,autoComplete:"off"})}),e===void 0&&c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]})]}),d]})}function Une(e){return e==="running"?"Running":e==="cancelled"?"Cancelled":e==="failed"?"Failed":"Completed"}function qne(e){return e==="running"?"accent":e==="failed"?"danger":"neutral"}function Hne(e,t){return Zh(t,e.id,e.description,e.verdict,e.error,e.sessionId)}function Gne(e,t){return Zh(t,e.runId,"eval",e.status,e.error,`${e.summary.passed} passed`,`${e.summary.failed} failed`,`${e.summary.done}/${e.summary.total}`)?!0:e.cases.some(n=>Hne(n,t))}function Vne(e,t){return Zh(t,e.title,e.sessionId,e.channelId,e.mode)}function EC({running:e,active:t=!1,children:n}){const r=["pg-agent-run__primary",t?"pg-agent-run__primary--active":null].filter(Boolean).join(" ");return g.jsxs("span",{className:r,children:[e===!0?g.jsx("span",{className:"spin","aria-label":"Running"}):null,g.jsx("span",{className:"pg-agent-run__primary-text",children:n})]})}function Wne({sessions:e,runs:t,currentSessionId:n,currentEvalRunId:r,readOnly:s=!1,onSelectSession:a,onOpenEvalRun:l}){const[c,d]=v.useState(""),f=v.useMemo(()=>[...e.map(S=>({kind:"session",at:S.updatedAt??S.createdAt??"",session:S})),...t.map(S=>({kind:"evalRun",at:S.finishedAt??S.startedAt,run:S}))].sort((S,E)=>E.at.localeCompare(S.at)),[e,t]),h=v.useMemo(()=>f.filter(k=>k.kind==="session"?Vne(k.session,c):Gne(k.run,c)),[f,c]),m=v.useMemo(()=>h.map(k=>k.kind==="session"?{id:`session:${k.session.sessionId}`,kind:"session",session:k.session,active:k.session.sessionId===n}:{id:`eval:${k.run.runId}`,kind:"evalRun",run:k.run,active:k.run.runId===r}),[h,n,r]),b=v.useMemo(()=>[{key:"run",header:"Run",flexWidth:{minWidth:160,grow:2},tintColor:"primary",render:k=>k.kind==="session"?g.jsx(EC,{running:k.session.running,active:k.active,children:k.session.title||k.session.sessionId}):g.jsx(EC,{running:k.run.status==="running",active:k.active,children:k.run.runId})},{key:"type",header:"Type",flexWidth:{minWidth:140,grow:1},render:k=>{if(k.kind==="session")return k.session.channelId||"—";const{status:S,summary:E}=k.run;return g.jsxs("span",{className:"pg-agent-run__type",children:[g.jsx(qi,{variant:qne(S),size:"sm",children:"Eval"}),g.jsxs("span",{className:"pg-eval-run__meta",children:[Une(S),S==="running"?` · ${E.done}/${E.total} done`:""]})]})}},{key:"details",header:"Details",flexWidth:{minWidth:160,grow:1.5},render:k=>{if(k.kind==="session"){const E=k.session.turnCount;return`${E} ${E===1?"turn":"turns"}`}const{summary:S}=k.run;return g.jsxs("span",{className:"pg-eval-run__cases-summary",children:[g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--success",children:[g.jsx(Yt,{name:"check-circle",size:12,variant:"filled","aria-hidden":!0}),S.passed," passed"]}),g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--danger",children:[g.jsx(Yt,{name:"x-circle",size:12,variant:"filled","aria-hidden":!0}),S.failed," failed"]})]})}},{key:"activity",header:"Last activity",fixedWidth:96,align:"right",render:k=>k.kind==="session"?k.session.updatedAt?Wp(k.session.updatedAt)??"—":"—":Wp(k.run.finishedAt??k.run.startedAt)??"—"}],[]),y=f.length===0?g.jsx("span",{children:s?"No stored runs for this stopped agent.":"No runs yet — start a chat."}):g.jsx("span",{children:"No runs match your search."});return g.jsx(VD,{count:h.length,singularLabel:"run",pluralLabel:"runs",search:c,searchPlaceholder:"Search runs",onSearchChange:d,children:g.jsx(GD,{data:m,columns:b,ariaLabel:"Agent runs",emptyState:y,onRowClick:k=>{if(k.kind==="session"){a(k.session);return}l(k.run.runId)}})})}function Kne(e,t){const n=e?.cases.find(s=>s.id===t);if(n===void 0)return{label:"—",className:"",icon:void 0};if(n.status==="running")return{label:"Running…",className:"pg-verdict--warn",icon:void 0};const r=n.verdict??(n.ok===!0?"passed":"failed");return r==="passed"?{label:"Passed",className:"pg-verdict--success",icon:"check-circle"}:r==="failed"?{label:"Failed",className:"pg-verdict--danger",icon:"x-circle"}:{label:r,className:"pg-verdict--muted",icon:void 0}}function Yne({cases:e,latestRun:t,running:n,onRun:r,onRunAll:s,readOnly:a=!1}){const[l,c]=v.useState(""),d=v.useMemo(()=>e.filter(b=>Zh(l,b.id,b.description,b.fileId,b.tags?.join(" "))),[e,l]),f=v.useMemo(()=>d.map(b=>{const y=Kne(t,b.id);return{id:b.id,evalCase:b,verdictLabel:y.label,verdictClassName:y.className,verdictIcon:y.icon,isSummary:b.id.endsWith("/overall")||(b.tags?.includes("summary")??!1)}}),[d,t]),h=v.useMemo(()=>{const b=[{key:"case",header:"Case",flexWidth:{minWidth:160,grow:1.4},tintColor:"primary",render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.id})},{key:"description",header:"Description",flexWidth:{minWidth:180,grow:2.4},render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.description||"—"})},{key:"tags",header:"Tags",flexWidth:{minWidth:100,grow:1},render:y=>y.evalCase.tags?.join(", ")||"—"},{key:"latest",header:"Latest",flexWidth:{minWidth:80,grow:1},render:y=>g.jsxs("span",{className:y.verdictClassName?`pg-eval-run__stat ${y.verdictClassName}`:"pg-eval-run__stat",children:[y.verdictIcon!==void 0?g.jsx(Yt,{name:y.verdictIcon,variant:"filled",size:12,"aria-hidden":!0}):null,y.verdictLabel]})}];return a||b.push({key:"actions",header:"",fixedWidth:40,align:"right",excludeFromRowLink:!0,render:y=>g.jsx(dr,{icon:"play",size:"sm","aria-label":"Run",disabled:n,title:y.isSummary?`Runs full ${y.evalCase.fileId} suite (summary needs siblings)`:void 0,onClick:()=>r(y.evalCase.id)})}),b},[r,n,a]),m=e.length===0?g.jsx("span",{children:"No evals/ cases found for this agent."}):g.jsx("span",{children:"No evaluations match your search."});return g.jsx(VD,{count:d.length,singularLabel:"evaluation",pluralLabel:"evaluations",search:l,searchPlaceholder:"Search evaluations",onSearchChange:c,actions:!a&&e.length>0?g.jsx(ln,{variant:"primary",tone:"monochrome",size:"lg",disabled:n,title:n?"Eval run in progress":void 0,onClick:s,children:"Run all"}):null,children:g.jsx(GD,{data:f,columns:h,ariaLabel:"Evaluations",emptyState:m})})}function Zu({label:e,children:t}){return g.jsxs("div",{className:"pg-meta-table__cell",children:[g.jsx("div",{className:"pg-meta-table__label",children:e}),g.jsx("div",{className:"pg-meta-table__value",children:t})]})}function yy(){return g.jsx("span",{className:"pg-meta-table__empty",children:"—"})}function Xne(e,t){return t?"History":e?"Development":"Production"}function Zne(e,t){return t?"neutral":e?"warn":"neutral"}function Qne(e,t){return t&&e!=="bad"?"Stopped":e==="ok"?"Healthy":e==="bad"?"Unhealthy":"Unknown"}function Jne(e,t){return t&&e!=="bad"?"neutral":e==="ok"?"success":e==="bad"?"danger":"neutral"}function ere(e,t){return t&&t.trim()!==""?t:e&&e.trim()!==""?e.charAt(0).toUpperCase()+e.slice(1):null}function tre({dev:e=!1,health:t="unknown",model:n,runtime:r,sourcePath:s,version:a,readOnly:l=!1}){const c=ere(r,s),d=n&&n.trim()!==""?n:null,f=a&&a.trim()!==""?a.trim():null,h=l&&t!=="bad",m=!h&&t==="ok";return g.jsxs("section",{className:"pg-meta-table","aria-labelledby":"pg-overview-title",children:[g.jsx("h2",{id:"pg-overview-title",className:"pg-section-title",children:"Overview"}),g.jsxs("div",{className:"pg-meta-table__card",children:[g.jsx(Zu,{label:"Mode",children:g.jsxs(qi,{variant:Zne(e,l),size:"sm",pill:!0,children:[e&&!l?g.jsx("span",{className:"pg-meta-table__dot pg-meta-table__dot--dev","aria-hidden":!0}):null,Xne(e,l)]})}),g.jsx(Zu,{label:"Status",children:g.jsxs(qi,{variant:Jne(t,l),size:"sm",pill:!0,children:[g.jsx(Yt,{name:h?"pause-circle":m?"check-circle":"x-circle",variant:"filled",size:12,color:m?"green":t==="bad"?"red":"secondary","aria-hidden":!0}),Qne(t,l)]})}),g.jsx(Zu,{label:"Model",children:d?g.jsx("span",{className:"pg-meta-table__text",children:d}):g.jsx(yy,{})}),g.jsx(Zu,{label:"Source",children:c?g.jsx("span",{className:"pg-meta-table__text",title:c,children:c}):g.jsx(yy,{})}),g.jsx(Zu,{label:"Agent SDK",children:f?g.jsx("span",{className:"pg-meta-table__text",children:f}):g.jsx(yy,{})})]})]})}function nre({schedules:e,dev:t,onDispatch:n}){return e.length===0?null:g.jsxs("section",{className:"pg-schedules","aria-labelledby":"pg-schedules-title",children:[g.jsx("h2",{id:"pg-schedules-title",className:"pg-section-title",children:"Schedules"}),g.jsx("div",{className:"pg-schedules__card",children:e.map(r=>g.jsxs("div",{className:"pg-schedules__row",children:[g.jsxs("div",{className:"pg-schedules__copy",children:[g.jsx("div",{className:"pg-schedules__name",children:r.name}),g.jsx("div",{className:"pg-schedules__cron",children:r.cron})]}),g.jsx(ln,{variant:"outline",size:"lg",className:"pg-outline-button",disabled:!t,title:t?`Dispatch ${r.name} once`:"Start the server with --dev to dispatch schedules by hand",onClick:()=>{n(r.name)},children:"Dispatch"})]},r.name))})]})}function np(e){return g.jsx("span",{className:"pg-surface-field__text",children:e.map((t,n)=>g.jsxs("span",{children:[n>0?", ":"",t.name]},t.name))})}function rp(e){return e.map(t=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:t.name}),t.detail?g.jsx("div",{className:"pg-surface-detail__desc",children:t.detail}):null]},t.name))}function rre({field:e,expanded:t,onToggle:n}){const s=!e.empty&&e.details!==void 0?g.jsxs("button",{type:"button",className:"pg-surface-field__head","aria-expanded":t,"aria-label":`${t?"Collapse":"Expand"} ${e.label}`,onClick:n,children:[g.jsx("span",{className:"pg-surface-field__label",children:e.label}),g.jsx(Yt,{name:"chevron-down",size:12,"aria-hidden":!0,className:t?"pg-surface-field__chevron open":"pg-surface-field__chevron"})]}):g.jsx("div",{className:"pg-surface-field__label",children:e.label});return g.jsxs("div",{className:"pg-surface-field",children:[s,g.jsx("div",{className:"pg-surface-field__value",children:e.empty?g.jsx("span",{className:"pg-surface-field__empty",children:"Empty"}):t&&e.details!==void 0?g.jsx("div",{className:"pg-surface-field__details",children:e.details}):e.summary})]})}function ire({info:e,onTryRoute:t,readOnly:n=!1}){const[r,s]=v.useState(null),[a,l]=v.useState(new Set),c=e?.tools??[],d=e?.skills??[],f=e?.subagents??[],h=e?.connections??[],m=e?.channels??[],b=e?.hooks??[],y=e?.abs??[],k=v.useMemo(()=>{const T=new Map;for(const C of qh(m))T.set(`${C.method}:${C.url}`,C.name);return T},[m]),S=(T,C)=>{if(t){t(T,C);return}s({channelId:T,route:C})},E=m.map(T=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:T.id}),(T.routes??[]).length===0?g.jsx("div",{className:"pg-surface-detail__desc",children:"(events only)"}):g.jsx("div",{className:"pg-surface-channel__routes",children:(T.routes??[]).map(C=>{const _=!n&&T.id!=="http",L=`${C.method} ${C.url}`,N=k.get(`${C.method.toUpperCase()}:${C.url}`);return g.jsxs("div",{className:"pg-surface-channel__route",children:[g.jsx("code",{children:L}),N?g.jsx("code",{className:"pg-surface-channel__slash",title:"Composer slash command",children:N}):null,_?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>S(T.id,C),children:"Try"}):null]},L)})})]},T.id)),R=[{id:"tools",label:"Tools",empty:c.length===0,summary:np(c),details:rp(c.map(T=>({name:T.name,detail:T.description})))},{id:"skills",label:"Skills",empty:d.length===0,summary:np(d),details:rp(d.map(T=>({name:T.name,detail:T.description})))},{id:"subagents",label:"Subagents",empty:f.length===0,summary:np(f),details:rp(f.map(T=>({name:T.name,detail:T.description})))},{id:"connections",label:"MCP Connections",empty:h.length===0,summary:np(h),details:rp(h.map(T=>({name:T.name,detail:T.transport})))},{id:"channels",label:"Channels",empty:m.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:m.map(T=>T.id).join(", ")}),details:E},{id:"hooks",label:"Hooks",empty:b.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:b.join(", ")})},{id:"abs",label:"A/Bs",empty:y.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:y.join(", ")})}];return g.jsxs("section",{className:"pg-surface",id:"pg-agent-surface","aria-labelledby":"pg-agent-trace-title",children:[g.jsx("h2",{id:"pg-agent-trace-title",className:"pg-section-title",children:"Agent Trace"}),e===null?g.jsx("div",{className:"pg-surface-empty",children:"Loading…"}):g.jsx("div",{className:"pg-surface-card",children:R.map(T=>g.jsx(rre,{field:T,expanded:a.has(T.id),onToggle:()=>{l(C=>{const _=new Set(C);return _.has(T.id)?_.delete(T.id):_.add(T.id),_})}},T.id))}),r?g.jsx($D,{channelId:r.channelId,route:r.route,onClose:()=>s(null)}):null]})}function TC(){const e=Ke(z=>z.meta),t=Ke(z=>z.info),n=Ke(z=>z.health),r=Ke(z=>z.sessions),s=Ke(z=>z.current),a=Ke(z=>z.view),l=Ke(z=>z.evalCases),c=Ke(z=>z.evalRuns),d=Ke(z=>z.evalRun),f=Ke(z=>z.evalNavReturn),h=Ke(z=>z.overviewSection),m=Ke(z=>z.surfaceFocusNonce),b=v.useRef(null);v.useEffect(()=>{m!==0&&b.current?.scrollIntoView({behavior:"smooth",block:"start"})},[m]);const y=e.name||t?.name||"Agent",k=OD(y),S=d??c?.[0]??null,E=d?.status==="running",R=tt.modelLabel(),T=v.useMemo(()=>{const z=d===null?c:[d,...c],I=new Set(z.flatMap(Y=>Y.cases.flatMap(H=>H.sessionId===void 0?[]:[H.sessionId])));return r.filter(Y=>!I.has(Y.sessionId))},[r,c,d]),C=kG(T),_=Sk(a),L=f||_==="evals"||_==="abs",N=L?null:s?.sessionId??null,A=L?d?.runId??null:null,$=[{id:"home",label:"Agent"},{id:"runs",label:C>0?`Runs (${C})`:"Runs"},{id:"evals",label:"Evaluations"},{id:"logs",label:"Logs"}];return g.jsxs("div",{className:"pg-overview",children:[g.jsxs("div",{className:"pg-overview-identity",children:[g.jsx("div",{className:"pg-overview-identity__avatar","data-color":k,"aria-hidden":"true",children:g.jsx(Yt,{name:"robot",variant:"filled",size:24,color:k})}),g.jsxs("div",{className:"pg-overview-identity__text",children:[g.jsx("h1",{className:"pg-overview-identity__name",children:y}),t?.description?g.jsx("p",{className:"pg-overview-identity__description",children:t.description}):null]})]}),g.jsx("div",{className:"pg-tabs",role:"tablist","aria-label":"Overview sections",children:$.map(z=>g.jsx("button",{type:"button",role:"tab","aria-selected":h===z.id,className:h===z.id?"pg-tab pg-tab--active":"pg-tab",onClick:()=>tt.setOverviewSection(z.id),children:z.label},z.id))}),h==="home"?g.jsxs(g.Fragment,{children:[g.jsx(tre,{dev:e.dev,health:n,model:R||void 0,runtime:t?.runtime,sourcePath:t?.local?.cwd,version:e.version,readOnly:e.readonly===!0}),g.jsx(nre,{schedules:t?.schedules??[],dev:e.dev&&e.readonly!==!0,onDispatch:z=>tt.dispatchSchedule(z)}),g.jsx("div",{ref:b,children:g.jsx(ire,{info:t,readOnly:e.readonly===!0})})]}):null,h==="runs"?g.jsx(Wne,{sessions:T,runs:c,currentSessionId:N,currentEvalRunId:A,readOnly:e.readonly===!0,onSelectSession:z=>tt.selectSession(z),onOpenEvalRun:z=>{tt.selectEvalRun(z)}}):null,h==="evals"?g.jsx(Yne,{cases:l,latestRun:S,running:E,readOnly:e.readonly===!0,onRun:z=>{tt.startEvalRun([z])},onRunAll:()=>{tt.startEvalRun()}}):null,h==="logs"?g.jsx("div",{className:"pg-overview-logs",children:g.jsx(ane,{})}):null]})}const WD="agent-serve.playground.chatPanelWidth.v2",nh=320,sre=.5,ore=.8;function Qu(e){const t=e?.parentElement;return t&&t.clientWidth>0?t.clientWidth:typeof window<"u"?window.innerWidth:1200}function wv(e){return Math.max(nh,Math.floor(e*ore))}function cl(e,t){return Math.min(wv(t),Math.max(nh,Math.round(e)))}function vy(e){return cl(e*sre,e)}function RC(e){try{const t=localStorage.getItem(WD);if(t===null)return vy(e);const n=Number.parseInt(t,10);return Number.isFinite(n)?cl(n,e):vy(e)}catch{return vy(e)}}function are(){const e=Ke(h=>h.chatPanelOpen),t=v.useRef(null),[n,r]=v.useState(()=>RC(typeof window<"u"?window.innerWidth:1200)),[s,a]=v.useState(!1),l=v.useRef(n);l.current=n,v.useLayoutEffect(()=>{const h=t.current?.parentElement;if(!h)return;r(RC(Qu(t.current)));const m=()=>{const y=Qu(t.current);r(k=>cl(k,y))},b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[]),v.useEffect(()=>{try{localStorage.setItem(WD,String(n))}catch{}},[n]);const c=v.useCallback(h=>{h.preventDefault();const m=h.currentTarget,b=h.clientX,y=l.current;m.setPointerCapture(h.pointerId),a(!0),document.body.classList.add("pg-resizing-chat-panel");const k=E=>{const R=Qu(t.current);r(cl(y-(E.clientX-b),R))},S=E=>{m.releasePointerCapture(E.pointerId),m.removeEventListener("pointermove",k),m.removeEventListener("pointerup",S),m.removeEventListener("pointercancel",S),a(!1),document.body.classList.remove("pg-resizing-chat-panel")};m.addEventListener("pointermove",k),m.addEventListener("pointerup",S),m.addEventListener("pointercancel",S)},[]);if(!e)return null;const d=Qu(t.current),f=wv(d);return g.jsxs("aside",{ref:t,className:s?"pg-chat-panel pg-chat-panel--resizing":"pg-chat-panel",style:{width:n},children:[g.jsx("div",{className:s?"pg-chat-panel__resizer dragging":"pg-chat-panel__resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize chat panel","aria-valuenow":n,"aria-valuemin":nh,"aria-valuemax":f,tabIndex:0,onPointerDown:c,onKeyDown:h=>{const m=Qu(t.current);h.key==="ArrowLeft"?(h.preventDefault(),r(b=>cl(b+16,m))):h.key==="ArrowRight"?(h.preventDefault(),r(b=>cl(b-16,m))):h.key==="Home"?(h.preventDefault(),r(nh)):h.key==="End"&&(h.preventDefault(),r(wv(m)))}}),g.jsx(LD,{variant:"panel"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(jD,{})})]})}function lre(e){const t=e.replace("#","").trim();if(t.length===8)return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:parseInt(t.slice(6,8),16)/255};if(t.length===6)return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1};if(t.length===3)return{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1};throw new Error(`Invalid hex: ${e}`)}function KD(e){const t=e.r.toString(16).padStart(2,"0"),n=e.g.toString(16).padStart(2,"0"),r=e.b.toString(16).padStart(2,"0");return`#${t}${n}${r}`.toUpperCase()}function ure(e){const t=Math.round(Math.min(1,Math.max(0,e.a))*255).toString(16).padStart(2,"0");return`${KD(e)}${t}`.toUpperCase()}const cre=/^oklch\(\s*([^\s/]+)\s+([^\s/]+)\s+([^\s/)]+?)(?:\s*\/\s*([^)]+?))?\s*\)$/i,fre=/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i,YD=.5/255;function ip(e,t,n){return Math.min(n,Math.max(t,e))}function xy(e){const t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4}function ky(e){const t=Math.abs(e);return t<=.0031308?e*12.92:(e<0?-1:1)*(1.055*t**(1/2.4)-.055)}function dre(e){const t=xy(e.r/255),n=xy(e.g/255),r=xy(e.b/255),s=.4122214708*t+.5363325363*n+.0514459929*r,a=.2119034982*t+.6806995451*n+.1073969566*r,l=.0883024619*t+.2817188376*n+.6299787005*r,c=Math.cbrt(s),d=Math.cbrt(a),f=Math.cbrt(l),h=.2104542553*c+.793617785*d-.0040720468*f,m=1.9779984951*c-2.428592205*d+.4505937099*f,b=.0259040371*c+.7827717662*d-.808675766*f,y=Math.sqrt(m*m+b*b);let k=Math.atan2(b,m)*180/Math.PI;return k<0&&(k+=360),{l:h,c:y,h:y<5e-4?0:k,a:e.a}}function pre(e){const t=e.h*Math.PI/180,n=e.c*Math.cos(t),r=e.c*Math.sin(t),s=e.l+.3963377774*n+.2158037573*r,a=e.l-.1055613458*n-.0638541728*r,l=e.l-.0894841775*n-1.291485548*r,c=s*s*s,d=a*a*a,f=l*l*l,h=4.0767416621*c-3.3077115913*d+.2309699292*f,m=-1.2684380046*c+2.6097574011*d-.3413193965*f,b=-.0041960863*c-.7034186147*d+1.707614701*f;return{r:Math.round(ip(ky(h),0,1)*255),g:Math.round(ip(ky(m),0,1)*255),b:Math.round(ip(ky(b),0,1)*255),a:ip(e.a,0,1)}}function sp(e,t){const n=5e-4*10**(1-t);return!Number.isFinite(e)||Object.is(e,-0)||Math.abs(e)<n?"0":e.toFixed(t).replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function XD(e){const t=sp(e.l,3),n=sp(e.c,3),r=n==="0"?"0":sp(e.h,3);return e.a<1-YD?`oklch(${t} ${n} ${r} / ${sp(e.a,3)})`:`oklch(${t} ${n} ${r})`}function op(e,t){const n=e.trim();if(n.endsWith("%"))return Number.parseFloat(n.slice(0,-1))/100*t;const r=n.replace(/deg$/i,"");return Number.parseFloat(r)}function ZD(e){const t=cre.exec(e.trim());if(t===null)throw new Error(`Invalid oklch: ${e}`);const n=op(t[1],1),r=op(t[2],.4),s=op(t[3],1),a=t[4]===void 0?1:op(t[4],1);if(![n,r,s,a].every(Number.isFinite))throw new Error(`Invalid oklch: ${e}`);return{l:n,c:r,h:s,a}}function hre(e){const t=fre.exec(e.trim());if(t===null)throw new Error(`Invalid rgb: ${e}`);return{r:Number.parseFloat(t[1]),g:Number.parseFloat(t[2]),b:Number.parseFloat(t[3]),a:t[4]===void 0?1:Number.parseFloat(t[4])}}function QD(e){const t=e.trim();if(t.startsWith("#"))return lre(t);if(t.toLowerCase().startsWith("oklch("))return pre(ZD(t));if(/^rgba?\(/i.test(t))return hre(t);throw new Error(`Unsupported CSS color: ${e}`)}function mre(e){return XD(dre(e))}function gre(e){const t=e.trim();return t.toLowerCase().startsWith("oklch(")?XD(ZD(t)):mre(QD(t))}function bre(e){const t=QD(e);return t.a<1-YD?ure(t):KD(t)}function yre(e,t){const n=Object.keys(e).sort((l,c)=>l.localeCompare(c)),r=n.map(l=>`${t}--cursor-${l}: ${bre(e[l])};`),s=`${t} `,a=n.map(l=>`${s}--cursor-${l}: ${gre(e[l])};`);return[...r,`${t}@supports (color: oklch(0 0 0)) {`,...a,`${t}}`]}const vre={name:"dark",appearance:"dark",highContrast:!1,sidebar:"oklch(0.209 0 0)",chrome:"oklch(0.191 0 0)",editor:"oklch(0.209 0 0)",base:"oklch(0.955 0 0)",accent:"oklch(0.681 0.131 252.629)",actionLabel:"oklch(0.226 0.013 264.284)",brand:"oklch(0.652 0.214 37.99)",focus:"oklch(0.955 0 0)",success:"oklch(0.638 0.129 153.739)",warn:"oklch(0.811 0.118 71.255)",danger:"oklch(0.628 0.194 8.387)",added:"oklch(0.713 0.094 155.438)",modified:"oklch(0.811 0.118 71.255)",removed:"oklch(0.712 0.177 12.651)",untracked:"oklch(0.775 0.062 217.469)",terminalAnsiBlack:"oklch(0.26 0 0)",terminalAnsiRed:"oklch(0.712 0.177 12.651)",terminalAnsiYellow:"oklch(0.712 0.125 71.923)",terminalAnsiGreen:"oklch(0.638 0.129 153.739)",terminalAnsiCyan:"oklch(0.775 0.062 217.469)",terminalAnsiBlue:"oklch(0.697 0.059 248.687)",terminalAnsiMagenta:"oklch(0.692 0.062 332.665)",terminalAnsiWhite:"oklch(0.955 0 0)",terminalAnsiBrightBlack:"oklch(0.955 0 0 / 0.6)",terminalAnsiBrightRed:"oklch(0.712 0.177 12.651)",terminalAnsiBrightYellow:"oklch(0.811 0.118 71.255)",terminalAnsiBrightGreen:"oklch(0.713 0.094 155.438)",terminalAnsiBrightCyan:"oklch(0.775 0.062 217.469)",terminalAnsiBrightBlue:"oklch(0.713 0.056 247.764)",terminalAnsiBrightMagenta:"oklch(0.692 0.062 332.665)",terminalAnsiBrightWhite:"oklch(0.955 0 0)",red:"oklch(0.712 0.177 12.651)",orange:"oklch(0.693 0.096 38.241)",yellow:"oklch(0.811 0.118 71.255)",green:"oklch(0.638 0.129 153.739)",cyan:"oklch(0.697 0.059 248.687)",blue:"oklch(0.74 0.101 251.884)",magenta:"oklch(0.692 0.062 332.665)",purple:"oklch(0.679 0.156 286.998)",diffAddedLineBackground:"oklch(0.638 0.129 153.739 / 0.2)",diffAddedTextBackground:"oklch(0.638 0.129 153.739 / 0.133)",diffRemovedLineBackground:"oklch(0.5 0.2 9.842 / 0.2)",diffRemovedTextBackground:"oklch(0.5 0.2 9.842 / 0.133)"},xre={name:"light",appearance:"light",highContrast:!1,sidebar:"oklch(0.964 0 0)",chrome:"oklch(0.979 0 0)",editor:"oklch(0.991 0 0)",base:"oklch(0.191 0 0)",accent:"oklch(0.561 0.137 249.943)",actionLabel:"oklch(0.991 0 0)",brand:"oklch(0.652 0.214 37.99)",focus:"oklch(0.561 0.137 249.943)",success:"oklch(0.479 0.116 156.327)",warn:"oklch(0.567 0.123 69.543)",danger:"oklch(0.518 0.196 14.313)",added:"oklch(0.479 0.116 156.327)",modified:"oklch(0.567 0.123 69.543)",removed:"oklch(0.518 0.196 14.313)",untracked:"oklch(0.487 0.077 204.607)",terminalAnsiBlack:"oklch(0.191 0 0)",terminalAnsiRed:"oklch(0.518 0.196 14.313)",terminalAnsiYellow:"oklch(0.503 0.109 69.936)",terminalAnsiGreen:"oklch(0.479 0.116 156.327)",terminalAnsiCyan:"oklch(0.487 0.077 204.607)",terminalAnsiBlue:"oklch(0.497 0.143 250.703)",terminalAnsiMagenta:"oklch(0.449 0.176 345.345)",terminalAnsiWhite:"oklch(0.991 0 0)",terminalAnsiBrightBlack:"oklch(0.191 0 0 / 0.741)",terminalAnsiBrightRed:"oklch(0.582 0.178 13.604)",terminalAnsiBrightYellow:"oklch(0.567 0.123 69.543)",terminalAnsiBrightGreen:"oklch(0.542 0.133 155.45)",terminalAnsiBrightCyan:"oklch(0.552 0.068 203.209)",terminalAnsiBrightBlue:"oklch(0.561 0.137 249.943)",terminalAnsiBrightMagenta:"oklch(0.577 0.154 343.697)",terminalAnsiBrightWhite:"oklch(1 0 0)",red:"oklch(0.518 0.196 14.313)",orange:"oklch(0.576 0.183 39.534)",yellow:"oklch(0.567 0.123 69.543)",green:"oklch(0.479 0.116 156.327)",cyan:"oklch(0.487 0.077 204.607)",blue:"oklch(0.561 0.137 249.943)",magenta:"oklch(0.449 0.176 345.345)",purple:"oklch(0.572 0.154 287.656)",diffAddedLineBackground:"oklch(0.663 0.162 155.537 / 0.141)",diffAddedTextBackground:"oklch(0.666 0.162 155.968 / 0.22)",diffRemovedLineBackground:"oklch(0.703 0.192 13.697 / 0.22)",diffRemovedTextBackground:"oklch(0.703 0.192 13.697 / 0.341)"},JD=["sidebar","chrome","editor","base","accent","actionLabel","brand","focus","success","warn","danger","added","modified","removed","untracked","terminalAnsiBlack","terminalAnsiRed","terminalAnsiYellow","terminalAnsiGreen","terminalAnsiCyan","terminalAnsiBlue","terminalAnsiMagenta","terminalAnsiWhite","terminalAnsiBrightBlack","terminalAnsiBrightRed","terminalAnsiBrightYellow","terminalAnsiBrightGreen","terminalAnsiBrightCyan","terminalAnsiBrightBlue","terminalAnsiBrightMagenta","terminalAnsiBrightWhite","red","orange","yellow","green","cyan","blue","magenta","purple","diffAddedLineBackground","diffAddedTextBackground","diffRemovedLineBackground","diffRemovedTextBackground"];function kre(e){const t={};for(const n of JD){const r=e[n],s=Gc(n);t[s]=r}return t}function Sre(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}new Set(JD);const wre={foreground:{op:"ref",ref:"base"},textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:74},textTertiary:{op:"mixTransparent",ref:"base",percent:60},textQuaternary:{op:"mixTransparent",ref:"base",percent:36},textInvert:{op:"ref",ref:"editor"},textMedia:{op:"mixWhite",whitePercent:100},textActive:{op:"ref",ref:"textPrimary"},textFocused:{op:"ref",ref:"textPrimary"},textGitAddedPrimary:{op:"ref",ref:"added"},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:78},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:64},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:40},textGitModifiedPrimary:{op:"ref",ref:"modified"},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:78},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:64},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:40},textGitRemovedPrimary:{op:"ref",ref:"removed"},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:78},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:64},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:40},textGitUntrackedPrimary:{op:"ref",ref:"untracked"},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:78},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:64},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:40},textRedPrimary:{op:"ref",ref:"red"},textRedSecondary:{op:"mixTransparent",ref:"red",percent:78},textYellowPrimary:{op:"ref",ref:"yellow"},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:78},textGreenPrimary:{op:"ref",ref:"green"},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:78},textMagentaPrimary:{op:"ref",ref:"magenta"},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:78},textPurplePrimary:{op:"ref",ref:"purple"},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:78},textCyanPrimary:{op:"ref",ref:"cyan"},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:78},textBluePrimary:{op:"ref",ref:"blue"},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:78},textOrangePrimary:{op:"ref",ref:"orange"},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:78},textAccent:{op:"ref",ref:"accent"},textLink:{op:"ref",ref:"textBluePrimary"},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:66},iconTertiary:{op:"mixTransparent",ref:"base",percent:52},iconQuaternary:{op:"mixTransparent",ref:"base",percent:28},iconGitAddedPrimary:{op:"ref",ref:"added"},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:70},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:56},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:32},iconGitModifiedPrimary:{op:"ref",ref:"modified"},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:70},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:56},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:32},iconGitRemovedPrimary:{op:"ref",ref:"removed"},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:70},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:56},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:32},iconGitUntrackedPrimary:{op:"ref",ref:"untracked"},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:70},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:56},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:32},iconAccentPrimary:{op:"ref",ref:"accent"},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:70},iconRedPrimary:{op:"ref",ref:"red"},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:70},iconYellowPrimary:{op:"ref",ref:"yellow"},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:70},iconGreenPrimary:{op:"ref",ref:"green"},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:70},iconMagentaPrimary:{op:"ref",ref:"magenta"},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:70},iconCyanPrimary:{op:"ref",ref:"cyan"},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:70},iconBluePrimary:{op:"ref",ref:"blue"},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:70},iconOrangePrimary:{op:"ref",ref:"orange"},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:70},iconPurplePrimary:{op:"ref",ref:"purple"},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:70},bgPrimary:{op:"mixTransparent",ref:"base",percent:20},bgSecondary:{op:"mixTransparent",ref:"base",percent:14},bgTertiary:{op:"mixTransparent",ref:"base",percent:8},bgQuaternary:{op:"mixTransparent",ref:"base",percent:6},bgQuinary:{op:"mixTransparent",ref:"base",percent:4},bgMedia:{op:"mixBlack",blackPercent:72},bgMediaHover:{op:"mixBlack",blackPercent:54},bgElevated:{op:"ref",ref:"editor"},bgChrome:{op:"ref",ref:"chrome"},bgCard:{op:"ref",ref:"bgQuaternary"},bgInput:{op:"ref",ref:"editor"},bgInputField:{op:"mixTransparentOverlay",ref:"base",percent:3},bgInputSurface:{op:"ref",ref:"bgQuaternary"},bgEditor:{op:"ref",ref:"editor"},bgSidebar:{op:"ref",ref:"sidebar"},bgDiffInserted:{op:"ref",ref:"diffAddedLineBackground"},bgDiffRemoved:{op:"ref",ref:"diffRemovedLineBackground"},bgGitAddedPrimary:{op:"ref",ref:"added"},bgGitAddedHover:{op:"mixTwo",k1:"base",p1:10,k2:"added"},bgGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:24},bgGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:12},bgGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:8},bgGitModifiedPrimary:{op:"ref",ref:"modified"},bgGitModifiedHover:{op:"mixTwo",k1:"base",p1:10,k2:"modified"},bgGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:24},bgGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:12},bgGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:8},bgGitRemovedPrimary:{op:"ref",ref:"removed"},bgGitRemovedHover:{op:"mixTwo",k1:"base",p1:10,k2:"removed"},bgGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:24},bgGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:12},bgGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:8},bgGitUntrackedPrimary:{op:"ref",ref:"untracked"},bgGitUntrackedHover:{op:"mixTwo",k1:"base",p1:10,k2:"untracked"},bgGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:24},bgGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:12},bgGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:8},bgActive:{op:"mixTransparent",ref:"base",percent:16},bgFocused:{op:"mixTransparent",ref:"base",percent:22},bgRedPrimary:{op:"ref",ref:"red"},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:12},bgYellowPrimary:{op:"ref",ref:"yellow"},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:12},bgGreenPrimary:{op:"ref",ref:"green"},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:12},bgMagentaPrimary:{op:"ref",ref:"magenta"},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:12},bgCyanPrimary:{op:"ref",ref:"cyan"},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:12},bgBluePrimary:{op:"ref",ref:"blue"},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:12},bgOrangePrimary:{op:"ref",ref:"orange"},bgOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:12},bgPurplePrimary:{op:"ref",ref:"purple"},bgPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:12},bgPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:8},bgAccent:{op:"ref",ref:"accent"},bgAccentHover:{op:"mixTwo",k1:"base",p1:10,k2:"accent"},bgAccentSecondary:{op:"mixTransparent",ref:"accent",percent:24},bgAccentTertiary:{op:"mixTransparent",ref:"accent",percent:12},bgAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:8},strokeControlDivider:{op:"mixBlack",blackPercent:16},strokeControlDividerMonochrome:{op:"mixTransparent",ref:"editor",percent:16},strokePrimary:{op:"mixTransparent",ref:"base",percent:20},strokeSecondary:{op:"mixTransparent",ref:"base",percent:12},strokeMedia:{op:"mixWhite",whitePercent:12},strokeTertiary:{op:"mixTransparent",ref:"base",percent:8},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:8,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:4},strokeFocused:{op:"ref",ref:"focus",fadePercent:15},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:0},strokeAccent:{op:"mixTransparent",ref:"accent",percent:56},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:56},strokeGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:32},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:56},strokeGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:32},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:56},strokeGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:32},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:56},strokeGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:32},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:56},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:32},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:56},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:32},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:56},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:32},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:56},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:32},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:56},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:32},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:56},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:32},strokeOrangePrimary:{op:"mixTransparent",ref:"orange",percent:56},strokeOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:32},shadowPrimary:{op:"mixBlack",blackPercent:20},shadowSecondary:{op:"mixTransparent",ref:"shadowPrimary",percent:60},shadowTertiary:{op:"mixTransparent",ref:"shadowPrimary",percent:30},shadowWorkbench:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,primaryMixPercent:40}]},boxShadowSm:{op:"shadow",candidates:[{x:0,y:2,blur:8,spread:0,shadowToken:"shadowSecondary"}]},boxShadowBase:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowPrimary"}]},boxShadowSoft:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowTertiary"}]},boxShadowPopup:{op:"shadow",candidates:[{x:0,y:3,blur:8,spread:0,shadowToken:"shadowSecondary"},{x:0,y:2,blur:5,spread:0,shadowToken:"shadowSecondary"},{x:0,y:1,blur:1,spread:0,shadowToken:"shadowSecondary"}]},boxShadowLg:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"oklch(1 0 0 / 0.05)"},{x:0,y:0,blur:3,spread:0,shadowToken:"shadowSecondary"},{x:0,y:16,blur:24,spread:0,shadowToken:"shadowTertiary"}]},boxShadowXl:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"oklch(1 0 0 / 0.05)"},{x:0,y:0,blur:6,spread:8,shadowToken:"shadowSecondary"},{x:0,y:24,blur:16,spread:6,shadowToken:"shadowTertiary"}]},buttonSecondaryBackground:{op:"ref",ref:"bgTertiary"},buttonSecondaryForeground:{op:"ref",ref:"textPrimary"},buttonSecondaryHoverBackground:{op:"ref",ref:"bgSecondary"},titlebarActiveForeground:{op:"ref",ref:"textSecondary"},titlebarInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterForeground:{op:"ref",ref:"textSecondary"},commandCenterBackground:{op:"ref",ref:"bgTertiary"},commandCenterBorder:{op:"ref",ref:"strokeSecondary"},commandCenterActiveForeground:{op:"ref",ref:"textSecondary"},commandCenterActiveBorder:{op:"ref",ref:"strokePrimary"},commandCenterActiveBackground:{op:"ref",ref:"bgSecondary"},commandCenterInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterInactiveBorder:{op:"ref",ref:"strokeSecondary"},terminalBackground:{op:"ref",ref:"chrome"},terminalForeground:{op:"ref",ref:"textPrimary"},terminalSelectionBackground:{op:"mixTransparent",ref:"base",percent:12},scrollbarThumbBackground:{op:"mixTransparentOverlay",ref:"base",percent:14},scrollbarThumbHoverBackground:{op:"mixTransparentOverlay",ref:"base",percent:22},scrollbarThumbActiveBackground:{op:"mixTransparentOverlay",ref:"base",percent:26},scrollbarShadow:{op:"ref",ref:"shadowPrimary"},progressBarBackground:{op:"ref",ref:"accent"},toolbarHoverBackground:{op:"ref",ref:"bgTertiary"},inputBorder:{op:"ref",ref:"strokeSecondary"},inputPlaceholderForeground:{op:"ref",ref:"textQuaternary"},editorForeground:{op:"ref",ref:"textPrimary"},editorLineHighlightBackground:{op:"mixTransparent",ref:"base",percent:8},editorLineNumberForeground:{op:"ref",ref:"textTertiary"},editorLineNumberActiveForeground:{op:"ref",ref:"textPrimary"},editorCursorForeground:{op:"ref",ref:"textPrimary"},editorSelectionBackground:{op:"mixTransparent",ref:"accent",percent:42},editorInactiveSelectionBackground:{op:"mixTransparent",ref:"accent",percent:30},editorSelectionHighlightBackground:{op:"mixTransparentAlpha",key:"accent",percent:32,alpha:128/255},editorWidgetBackground:{op:"ref",ref:"bgElevated"},editorWidgetBorder:{op:"ref",ref:"strokeSecondary"},editorWidgetForeground:{op:"ref",ref:"textPrimary"},editorGutterBackground:{op:"ref",ref:"editor"},editorWhitespaceForeground:{op:"mixTransparent",ref:"base",percent:22},editorBracketMatchBackground:{op:"mixTransparent",ref:"success",percent:22},editorBracketMatchBorder:{op:"mixTransparent",ref:"base",percent:52},editorIndentGuideBackground:{op:"mixTransparent",ref:"base",percent:22},editorIndentGuideActiveBackground:{op:"mixTransparent",ref:"base",percent:40},editorFindMatchBackground:{op:"mixTransparent",ref:"warn",percent:72},editorFindMatchHighlightBackground:{op:"mixTransparentOverlay",ref:"warn",percent:32},textCodeBlockBackground:{op:"ref",ref:"bgElevated"},textLinkActive:{op:"ref",ref:"accent"}},CC={textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:84},textTertiary:{op:"mixTransparent",ref:"base",percent:72},textQuaternary:{op:"mixTransparent",ref:"base",percent:60},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:88},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:76},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:64},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:88},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:76},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:64},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:88},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:76},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:64},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:88},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:76},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:64},textRedSecondary:{op:"mixTransparent",ref:"red",percent:88},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:88},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:88},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:88},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:88},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:88},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:88},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:88},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:80},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:68},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:56},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:80},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:68},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:56},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:80},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:68},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:56},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:80},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:68},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:56},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:80},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:80},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:80},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:80},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:80},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:80},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:80},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:80},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:80},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:76},iconTertiary:{op:"mixTransparent",ref:"base",percent:64},iconQuaternary:{op:"mixTransparent",ref:"base",percent:52},bgPrimary:{op:"mixTransparent",ref:"base",percent:36},bgSecondary:{op:"mixTransparent",ref:"base",percent:24},bgTertiary:{op:"mixTransparent",ref:"base",percent:14},bgQuaternary:{op:"mixTransparent",ref:"base",percent:8},bgQuinary:{op:"mixTransparent",ref:"base",percent:5},bgInputField:{op:"ref",ref:"bgInput"},bgInputSurface:{op:"ref",ref:"bgInput"},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:24},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:24},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:24},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:24},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:24},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:24},strokePrimary:{op:"mixTransparent",ref:"base",percent:48},strokeSecondary:{op:"mixTransparent",ref:"base",percent:36},strokeTertiary:{op:"mixTransparent",ref:"base",percent:28},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:28,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:20},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:80},strokeGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:56},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:80},strokeGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:56},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:80},strokeGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:56},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:80},strokeGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:56},strokeAccent:{op:"mixTransparent",ref:"accent",percent:80},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:80},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:56},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:80},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:56},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:80},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:56},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:80},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:56},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:80},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:56},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:80},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:56},strokeFocused:{op:"ref",ref:"focus",fadePercent:100},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:36}},Ere={light:{shadowPrimary:{op:"mixBlack",blackPercent:6},boxShadowPopup:{op:"shadow",candidates:[{x:0,y:6,blur:18,spread:0,literalColor:"lch(0% 0 0 / 0.02)"},{x:0,y:3,blur:9,spread:0,literalColor:"lch(0% 0 0 / 0.04)"},{x:0,y:1,blur:1,spread:0,literalColor:"lch(0% 0 0 / 0.04)"}]}},dark:{},lightHighContrast:{...CC},darkHighContrast:{...CC}};function vs(e){return`var(--cursor-${Gc(e)})`}function Tre(e){const t=e.inset?"inset ":"",n=`${e.x}px ${e.y}px ${e.blur}px ${e.spread}px`;return"literalColor"in e?`${t}${n} ${e.literalColor}`:"shadowToken"in e?`${t}${n} ${vs(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${vs("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function Rre(e){return e.map(t=>Tre(t)).join(", ")}function Cre(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${vs(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${vs(e.k1)} ${e.p1}%, ${vs(e.k2)})`;case"mixBlackChrome":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, ${vs("chrome")})`;case"mixBlack":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, transparent)`;case"mixWhite":return`color-mix(in srgb, oklch(1 0 0) ${e.whitePercent}%, transparent)`;case"ref":return e.fadePercent!==void 0?`color-mix(in srgb, ${vs(e.ref)} ${e.fadePercent}%, transparent)`:vs(e.ref);case"shadow":return Rre(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${vs(e.key)} ${e.percent}%, transparent)`;default:return e}}function _re(e){const t=Ere[e];return Object.entries(wre).map(([n,r])=>({name:Gc(n),expr:t[n]??r}))}function Nre(e){const t=_re(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${Cre(s)};`);return n}function Are(e){const t=kre(e),n=yre(t," "),r=Sre(e),s=Nre(r).join(`
|
|
59
|
+
`);return`:root {
|
|
60
|
+
${n.join(`
|
|
61
|
+
`)}
|
|
62
|
+
}
|
|
63
|
+
:root {
|
|
64
|
+
${s}
|
|
65
|
+
}`}const Ev={fontFamily:Fb.fontFamily,scrollbar:Fb.scrollbar,syntax:Fb.syntax},Ore=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function Mre(e,t){const n=Gc(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function gs(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${Mre(e,s)}: ${l};`)}}function Ire(e={}){const t=e.selector??":root",n=e.theme??Ev,r=[`${t} {`];for(const{key:s,cssMid:a}of Ore)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${Gc(l)}: ${c};`);return gs("duration",Fy,r,"ms"),gs("easing",JA,r),gs("spacing",i9,r,"px"),gs("radius",s9,r,"px"),gs("height",o9,r,"px"),gs("font-size",a9,r,"px"),gs("line-height",l9,r,"px"),gs("letter-spacing",u9,r,"px"),gs("elevation",r9,r),r.push("}"),r.join(`
|
|
66
|
+
`)}function Dre(e){const t=Are(e.core),n=Ire(e.nonColor);return`${t}
|
|
67
|
+
${n}`}function jre(e){if(!e)return"default";const t=e.toLowerCase().replace(/_/g,"-");return t==="ja"||t.startsWith("ja-")?"ja":t==="ko"||t.startsWith("ko-")?"ko":t==="zh-tw"||t==="zh-hk"||t==="zh-mo"||t.includes("hant")?"zh-Hant":t==="zh"||t.startsWith("zh-")?"zh-Hans":"default"}function Lre(e,t){switch(e){case"mac":switch(t){case"zh-Hans":return'-apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif';case"zh-Hant":return'-apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif';case"ja":return'-apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif';case"ko":return'-apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif';default:return"-apple-system, BlinkMacSystemFont, sans-serif"}case"windows":switch(t){case"zh-Hans":return'"Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif';case"zh-Hant":return'"Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif';case"ja":return'"Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif';case"ko":return'"Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif';default:return'"Segoe WPC", "Segoe UI", sans-serif'}case"linux":switch(t){case"zh-Hans":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif';case"zh-Hant":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif';case"ja":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif';case"ko":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif';default:return'system-ui, "Ubuntu", "Droid Sans", sans-serif'}default:return e}}function zre(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function Pre(e){return Lre(e.platform,jre(e.locale))}function $re(e){switch(e){case"mac":return'"SF Mono", Monaco, Menlo, Courier, monospace';case"windows":return'Consolas, "Courier New", monospace';case"linux":return'"Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace';default:return e}}const _C="agent-serve-cursor-theme",ej="agent-serve.playground.theme";function tj(){try{return localStorage.getItem(ej)}catch{return null}}function Bre(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function Fre(e=typeof window<"u"?window.location.search:"",t={}){const n=new URLSearchParams(e).get("theme");if(n==="light"||n==="dark")return n;const r=t.stored!==void 0?t.stored:tj();return r==="light"||r==="dark"?r:(t.prefersDark!==void 0?t.prefersDark:Bre())?"dark":"light"}function Tv(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=zre(navigator.userAgent,navigator.platform),r=Dre({core:e==="light"?xre:vre,nonColor:{theme:{...Ev,fontFamily:{...Ev.fontFamily,sans:Pre({platform:n,locale:navigator.language}),mono:$re(n)}}}});let s=document.getElementById(_C);s==null&&(s=document.createElement("style"),s.id=_C,document.head.appendChild(s)),s.textContent=r}function Ure(){return document.documentElement.dataset.theme==="cursor-light"?"light":"dark"}function qre(e){try{localStorage.setItem(ej,e)}catch{}try{const t=new URL(window.location.href);t.searchParams.set("theme",e),history.replaceState(null,"",t.toString())}catch{}Tv(e)}function Hre(e=window.location.search){if(Tv(Fre(e)),typeof window.matchMedia!="function")return()=>{};const t=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>{const r=new URLSearchParams(window.location.search).get("theme");if(r==="light"||r==="dark")return;const s=tj();s==="light"||s==="dark"||Tv(t.matches?"dark":"light")};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)}function Gre(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()}function Vre(){return v.useSyncExternalStore(Gre,Ure,()=>"dark")}function NC({title:e="Playground",onNewChat:t}){const n=Vre(),r=Ke(s=>s.chatPanelOpen);return g.jsxs("header",{className:"pg-overview-header",children:[g.jsxs("div",{className:"pg-overview-header__start",children:[g.jsx("div",{className:"pg-overview-header__title",children:e}),g.jsx(dr,{icon:n==="dark"?"sun":"moon",size:"lg","aria-label":n==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>qre(n==="dark"?"light":"dark")})]}),g.jsxs("div",{className:"pg-overview-header__actions",children:[t?g.jsx(ln,{variant:"primary",tone:"monochrome",size:"lg",title:"New chat",onClick:t,children:"New Chat"}):null,g.jsx("span",{className:"pg-overview-header__panel-toggle",children:g.jsx($8,{icon:"layout-sidebar-right",size:"lg","aria-label":r?"Close chat panel":"Open chat panel",pressed:r,onPressedChange:s=>tt.setChatPanelOpen(s)})})]})]})}function Wre(){const e=Ke(t=>t.toast);return e?g.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const Kre=/\b([\w.-]+)\/([\w.-]+)#(\d+)\b/,Yre=/https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)/i;function Xre(e){const t=Qre(e.externalUrl),n=AC(e.prUrl)??AC(e.externalUrl)??Zre(e.title);return{slack:t,github:n!==void 0&&n!==t?n:void 0}}function Zre(e){const n=e.match(Yre)??e.match(Kre);if(n!==null)return`https://github.com/${n[1]}/${n[2]}/pull/${n[3]}`}function Qre(e){if(!(e===null||e===""||!eie(e)||EM(e)))return Jre(e)?e:void 0}function AC(e){if(!(e==null||e===""))return EM(e)?e:void 0}function Jre(e){try{const t=new URL(e).hostname.toLowerCase();return t==="slack.com"||t.endsWith(".slack.com")}catch{return!1}}function eie(e){return e.startsWith("https://")||e.startsWith("http://")}const tie=[{value:"overview",label:"Overview"},{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"abs",label:"A/Bs"},{value:"artifacts",label:"Artifacts"}],nj="(max-width: 640px)";function nie(e){const t=window.matchMedia(nj);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function rie(){return v.useSyncExternalStore(nie,()=>window.matchMedia(nj).matches)}function iie(){const e=Ke(_=>_.barTitle),t=Ke(_=>_.barId),n=Ke(_=>_.externalUrl),r=Ke(_=>_.current),s=Ke(_=>_.view),a=Ke(_=>_.authToken),l=Ke(_=>_.aliasHosted),c=Ke(_=>_.embedded),d=Ke(_=>_.evalNavReturn),f=Ke(_=>_.evalRun),h=Ke(_=>_.info),m=rie(),b=DD(tie,h,s),y=r?.sessionId??null,k=d&&s!=="evals"&&f!==null,S=Xre({title:e,externalUrl:n,prUrl:r?.prUrl}),E=S.slack,R=S.github,T=async()=>{if(y)try{const _=await tt.api.eventsText(y);if(!_.ok){tt.toast(`Download failed (${_.status})`);return}const L=await _.blob(),N=URL.createObjectURL(L),A=document.createElement("a");A.href=N,A.download=`${y}.events.ndjson`,A.target="_self",document.body.appendChild(A),A.click(),A.remove(),URL.revokeObjectURL(N)}catch(_){tt.toast(`Download failed: ${_ instanceof Error?_.message:String(_)}`)}},C=m?g.jsx(I8,{size:"md","aria-label":"Visualization mode",value:s,onValueChange:_=>tt.setView(_??"overview"),options:b}):g.jsx(pc,{size:"sm",variant:"compact",value:s,onValueChange:_=>tt.setView(_),"aria-label":"Visualization mode",children:b.map(_=>g.jsx(pc.Item,{value:_.value,children:_.label},_.value))});return g.jsxs("div",{className:"pg-topbar",children:[g.jsx(dr,{icon:"arrow-left",size:"sm","aria-label":"Back to overview",onClick:()=>tt.backToOverview()}),k?g.jsx(ln,{variant:"secondary",size:"sm",onClick:()=>tt.backToEvals(),title:"Return to eval results",children:"← Back to Evals"}):null,g.jsx("span",{className:"session-title",children:e}),t?g.jsx("span",{className:"session-id",children:t}):null,c?null:g.jsxs(g.Fragment,{children:[E!==void 0?g.jsx(aa,{className:"tlink",href:E,title:"Open the Slack thread",children:"Open in Slack"}):null,R!==void 0?g.jsx(aa,{className:"tlink",href:R,title:"Open the GitHub pull request",children:"Open in GitHub"}):null,y?g.jsx(ln,{variant:"ghost",size:"sm",onClick:()=>{T()},title:"Download this session's event log",children:"Download"}):null]}),g.jsx("span",{className:"grow"}),C,c&&(y!==null||E!==void 0||R!==void 0)?g.jsxs(Xr,{children:[g.jsx(Xr.Trigger,{children:g.jsx(dr,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),g.jsxs(Xr.Content,{"aria-label":"Session actions",size:"sm",children:[E!==void 0?g.jsx(Xr.Item,{onSelect:()=>window.open(E,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,R!==void 0?g.jsx(Xr.Item,{onSelect:()=>window.open(R,"_blank","noopener,noreferrer"),children:"Open in GitHub"}):null,y!==null?g.jsx(Xr.Item,{onSelect:()=>{T()},children:"Download event log"}):null]})]}):null,l?null:g.jsx("div",{className:"pg-token",children:g.jsx(Qc,{type:"password",size:"base","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:_=>tt.setAuthToken(_.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const rj="(min-width: 1201px)";function sie(e){const t=window.matchMedia(rj);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function oie(){return window.matchMedia(rj).matches}function aie(){return!0}function lie(){return v.useSyncExternalStore(sie,oie,aie)}function uie(){const e=Ke(d=>d.view),t=Ke(d=>d.drawerOpen),n=Ke(d=>d.aliasHosted),r=Ke(d=>d.aliasToken),s=Ke(d=>d.embedded),a=Ke(d=>d.meta.readonly===!0),l=lie();if(v.useEffect(()=>{tt.boot()},[]),n&&r.trim()==="")return s?g.jsx(YG,{}):g.jsx(KG,{});const c=l||s;return g.jsxs("div",{className:"pg-app",children:[g.jsx("div",{className:"pg-main",children:c?g.jsxs("div",{className:"pg-overview-layout",children:[g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(NC,{onNewChat:a?void 0:()=>tt.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(TC,{})})]}),g.jsx(are,{})]}):e==="overview"?g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(NC,{onNewChat:a?void 0:()=>tt.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(TC,{})})]}):s?g.jsxs(g.Fragment,{children:[g.jsx(iie,{}),g.jsxs("div",{className:"pg-columns",children:[e==="chat"?g.jsxs("div",{className:"pg-transcript-wrap",children:[g.jsx(AD,{}),g.jsx(GM,{})]}):null,e==="trace"?g.jsx(nI,{}):null,e==="raw"?g.jsx(JM,{}):null,e==="evals"?g.jsx(YM,{}):null,e==="abs"?g.jsx(PM,{}):null,e==="artifacts"?g.jsx(HM,{}):null]})]}):g.jsx(ene,{})}),t?g.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>tt.setDrawerOpen(!1)}):null,g.jsx(one,{}),g.jsx(Wre,{})]})}Hre();QG();const ij=document.getElementById("root");if(ij===null)throw new Error("Playground bootstrap failed: #root element is missing.");bz.createRoot(ij).render(g.jsx(v.StrictMode,{children:g.jsx(Cs,{menuSize:"md",children:g.jsx(uie,{})})}));
|